@lee576/vue3-gantt 1.0.1 → 1.0.2

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.
@@ -1,86 +1,86 @@
1
- (function(ye,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("dayjs"),require("svg.js"),require("interactjs")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","svg.js","interactjs"],e):(ye=typeof globalThis<"u"?globalThis:ye||self,e(ye.Vue3Gantt={},ye.Vue,ye.dayjs,ye.SVG,ye.interact))})(this,function(ye,e,w,un,ze){"use strict";var iu=Object.defineProperty;var su=(ye,e,w)=>e in ye?iu(ye,e,{enumerable:!0,configurable:!0,writable:!0,value:w}):ye[e]=w;var et=(ye,e,w)=>su(ye,typeof e!="symbol"?e+"":e,w);function fn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Pt={exports:{}},na=Pt.exports,Sn;function aa(){return Sn||(Sn=1,function(t,n){(function(o,r){t.exports=r()})(na,function(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,u={},d=function(m){return(m=+m)+(m>68?1900:2e3)},p=function(m){return function(R){this[m]=+R}},g=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var b=R.match(/([+-]|\d\d)/g),v=60*b[1]+(+b[2]||0);return v===0?0:b[0]==="+"?-v:v}(m)}],C=function(m){var R=u[m];return R&&(R.indexOf?R:R.s.concat(R.f))},G=function(m,R){var b,v=u.meridiem;if(v){for(var V=1;V<=24;V+=1)if(m.indexOf(v(V,0,R))>-1){b=V>12;break}}else b=m===(R?"pm":"PM");return b},E={A:[l,function(m){this.afternoon=G(m,!1)}],a:[l,function(m){this.afternoon=G(m,!0)}],Q:[i,function(m){this.month=3*(m-1)+1}],S:[i,function(m){this.milliseconds=100*+m}],SS:[s,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,p("seconds")],ss:[a,p("seconds")],m:[a,p("minutes")],mm:[a,p("minutes")],H:[a,p("hours")],h:[a,p("hours")],HH:[a,p("hours")],hh:[a,p("hours")],D:[a,p("day")],DD:[s,p("day")],Do:[l,function(m){var R=u.ordinal,b=m.match(/\d+/);if(this.day=b[0],R)for(var v=1;v<=31;v+=1)R(v).replace(/\[|\]/g,"")===m&&(this.day=v)}],w:[a,p("week")],ww:[s,p("week")],M:[a,p("month")],MM:[s,p("month")],MMM:[l,function(m){var R=C("months"),b=(C("monthsShort")||R.map(function(v){return v.slice(0,3)})).indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[l,function(m){var R=C("months").indexOf(m)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,p("year")],YY:[s,function(m){this.year=d(m)}],YYYY:[/\d{4}/,p("year")],Z:g,ZZ:g};function F(m){var R,b;R=m,b=u&&u.formats;for(var v=(m=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,Y,H){var X=H&&H.toUpperCase();return Y||b[H]||o[H]||b[X].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Te,h,c){return h||c.slice(1)})})).match(r),V=v.length,k=0;k<V;k+=1){var J=v[k],j=E[J],U=j&&j[0],Q=j&&j[1];v[k]=Q?{regex:U,parser:Q}:J.replace(/^\[|\]$/g,"")}return function(A){for(var Y={},H=0,X=0;H<V;H+=1){var Te=v[H];if(typeof Te=="string")X+=Te.length;else{var h=Te.regex,c=Te.parser,y=A.slice(X),f=h.exec(y)[0];c.call(Y,f),A=A.replace(f,"")}}return function(D){var L=D.afternoon;if(L!==void 0){var M=D.hours;L?M<12&&(D.hours+=12):M===12&&(D.hours=0),delete D.afternoon}}(Y),Y}}return function(m,R,b){b.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(d=m.parseTwoDigitYear);var v=R.prototype,V=v.parse;v.parse=function(k){var J=k.date,j=k.utc,U=k.args;this.$u=j;var Q=U[1];if(typeof Q=="string"){var A=U[2]===!0,Y=U[3]===!0,H=A||Y,X=U[2];Y&&(X=U[2]),u=this.$locale(),!A&&X&&(u=b.Ls[X]),this.$d=function(y,f,D,L){try{if(["x","X"].indexOf(f)>-1)return new Date((f==="X"?1e3:1)*y);var M=F(f)(y),B=M.year,x=M.month,P=M.day,W=M.hours,te=M.minutes,le=M.seconds,re=M.milliseconds,De=M.zone,$=M.week,_=new Date,oe=P||(B||x?1:_.getDate()),q=B||_.getFullYear(),ne=0;B&&!x||(ne=x>0?x-1:_.getMonth());var ge,Me=W||0,Se=te||0,S=le||0,ee=re||0;return De?new Date(Date.UTC(q,ne,oe,Me,Se,S,ee+60*De.offset*1e3)):D?new Date(Date.UTC(q,ne,oe,Me,Se,S,ee)):(ge=new Date(q,ne,oe,Me,Se,S,ee),$&&(ge=L(ge).week($).toDate()),ge)}catch{return new Date("")}}(J,Q,j,b),this.init(),X&&X!==!0&&(this.$L=this.locale(X).$L),H&&J!=this.format(Q)&&(this.$d=new Date("")),u={}}else if(Q instanceof Array)for(var Te=Q.length,h=1;h<=Te;h+=1){U[1]=Q[h-1];var c=b.apply(this,U);if(c.isValid()){this.$d=c.$d,this.$L=c.$L,this.init();break}h===Te&&(this.$d=new Date(""))}else V.call(this,k)}}})}(Pt)),Pt.exports}var oa=aa();const ra=fn(oa);var Zt={exports:{}},ia=Zt.exports,vn;function sa(){return vn||(vn=1,function(t,n){(function(o,r){t.exports=r(w)})(ia,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(o),s={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var u=100*a+l;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return i.default.locale(s,null,!0),s})}(Zt)),Zt.exports}sa();var Gt={exports:{}},la=Gt.exports,Dn;function da(){return Dn||(Dn=1,function(t,n){(function(o,r){t.exports=r()})(la,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var r=["th","st","nd","rd"],i=o%100;return"["+o+(r[(i-20)%10]||r[i]||r[0])+"]"}}})}(Gt)),Gt.exports}da();var Wt={exports:{}},ca=Wt.exports,En;function ua(){return En||(En=1,function(t,n){(function(o,r){t.exports=r(w)})(ca,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(o),s={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return i.default.locale(s,null,!0),s})}(Wt)),Wt.exports}ua();var Ut={exports:{}},fa=Ut.exports,Mn;function ma(){return Mn||(Mn=1,function(t,n){(function(o,r){t.exports=r(w)})(fa,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(o),s={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(a){return a+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(a){return a<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return i.default.locale(s,null,!0),s})}(Ut)),Ut.exports}ma();var jt={exports:{}},ha=jt.exports,$n;function pa(){return $n||($n=1,function(t,n){(function(o,r){t.exports=r(w)})(ha,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(o),s={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return i.default.locale(s,null,!0),s})}(jt)),jt.exports}pa();var qt={exports:{}},ga=qt.exports,Nn;function ya(){return Nn||(Nn=1,function(t,n){(function(o,r){t.exports=r(w)})(ga,function(o){function r(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var i=r(o),s={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function a(u,d,p){var g=s[p];return Array.isArray(g)&&(g=g[d?0:1]),g.replace("%d",u)}var l={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(u){return u+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return i.default.locale(l,null,!0),l})}(qt)),qt.exports}ya();var Jt={exports:{}},ka=Jt.exports,Vn;function ba(){return Vn||(Vn=1,function(t,n){(function(o,r){t.exports=r(w)})(ka,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(o),s={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return a+"º"}};return i.default.locale(s,null,!0),s})}(Jt)),Jt.exports}ba();var Kt={exports:{}},wa=Kt.exports,_n;function Ca(){return _n||(_n=1,function(t,n){(function(o,r){t.exports=r(w)})(wa,function(o){function r(E){return E&&typeof E=="object"&&"default"in E?E:{default:E}}var i=r(o),s="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),a="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),u="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),d=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function p(E,F,m){var R,b;return m==="m"?F?"минута":"минуту":E+" "+(R=+E,b={mm:F?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[m].split("_"),R%10==1&&R%100!=11?b[0]:R%10>=2&&R%10<=4&&(R%100<10||R%100>=20)?b[1]:b[2])}var g=function(E,F){return d.test(F)?s[E.month()]:a[E.month()]};g.s=a,g.f=s;var C=function(E,F){return d.test(F)?l[E.month()]:u[E.month()]};C.s=u,C.f=l;var G={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:g,monthsShort:C,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:p,mm:p,h:"час",hh:p,d:"день",dd:p,M:"месяц",MM:p,y:"год",yy:p},ordinal:function(E){return E},meridiem:function(E){return E<4?"ночи":E<12?"утра":E<17?"дня":"вечера"}};return i.default.locale(G,null,!0),G})}(Kt)),Kt.exports}Ca();const Ta=Symbol("SetBarColor"),Sa=Symbol("SetTaskType"),va=Symbol("AddRootTask"),mt={SetBarColorSymbol:Ta,SetTaskTypeSymbol:Sa,AddRootTaskSymbol:va};var wt=(t=>(t.TASK="task",t.PROJECT="project",t.MILESTONE="milestone",t))(wt||{}),de=(t=>(t.FINISH_TO_START="finish-to-start",t.START_TO_START="start-to-start",t.FINISH_TO_FINISH="finish-to-finish",t.START_TO_FINISH="start-to-finish",t.PARENT_CHILD="parent-child",t))(de||{}),Ne=(t=>(t.STRAIGHT="straight",t.BEZIER="bezier",t.RIGHT_ANGLE="right-angle",t))(Ne||{});const Ct={default:{color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ne.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"},linkTypeColors:{finishToStart:"#3498db",startToStart:"#2ecc71",finishToFinish:"#e74c3c",startToFinish:"#f39c12"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},business:{color:"#2c3e50",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#e74c3c",arrowSize:10,showLabels:!0,labelColor:"#34495e",labelFontSize:11,cornerRadius:8,pathType:Ne.RIGHT_ANGLE,bezierCurvature:.3,rightAngleOffset:40,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.6,parentChildStyle:{color:"#7f8c8d",width:2,dashArray:"5,2"},linkTypeColors:{finishToStart:"#2c3e50",startToStart:"#27ae60",finishToFinish:"#c0392b",startToFinish:"#d35400"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},modern:{color:"#00bcd4",width:3,dashArray:void 0,showArrow:!0,arrowColor:"#ff5722",arrowSize:12,showLabels:!1,labelColor:"#607d8b",labelFontSize:12,cornerRadius:10,pathType:Ne.BEZIER,bezierCurvature:.6,rightAngleOffset:50,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#90a4ae",width:2,dashArray:"8,4"},linkTypeColors:{finishToStart:"#00bcd4",startToStart:"#4caf50",finishToFinish:"#f44336",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},minimal:{color:"#666",width:1,dashArray:void 0,showArrow:!1,arrowColor:void 0,arrowSize:6,showLabels:!1,labelColor:"#999",labelFontSize:10,cornerRadius:3,pathType:Ne.STRAIGHT,bezierCurvature:.2,rightAngleOffset:20,smoothCorners:!1,enableDashAnimation:!1,dashAnimationSpeed:.8,parentChildStyle:{color:"#ccc",width:1,dashArray:"2,2"},linkTypeColors:{finishToStart:"#666",startToStart:"#888",finishToFinish:"#555",startToFinish:"#777"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},colorful:{color:"#9c27b0",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#ff9800",arrowSize:9,showLabels:!0,labelColor:"#673ab7",labelFontSize:11,cornerRadius:6,pathType:Ne.RIGHT_ANGLE,bezierCurvature:.5,rightAngleOffset:35,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#4caf50",width:2,dashArray:"4,3"},linkTypeColors:{finishToStart:"#9c27b0",startToStart:"#4caf50",finishToFinish:"#e91e63",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}}},An={[de.FINISH_TO_START]:{name:"完成-开始",description:"前置任务完成后,后续任务才能开始",color:"#3498db",priority:1},[de.START_TO_START]:{name:"开始-开始",description:"两个任务同时开始",color:"#2ecc71",priority:2},[de.FINISH_TO_FINISH]:{name:"完成-完成",description:"两个任务同时完成",color:"#e74c3c",priority:3},[de.START_TO_FINISH]:{name:"开始-完成",description:"前置任务开始后,后续任务才能完成",color:"#f39c12",priority:4},[de.PARENT_CHILD]:{name:"父子关系",description:"显示任务的层级关系",color:"#95a5a6",priority:0}};class Da{constructor(){et(this,"config",e.reactive({...Ct.default}));et(this,"STORAGE_KEY","gantt-link-config");this.loadFromStorage()}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const o=JSON.parse(n);Object.assign(this.config,o)}}catch(n){console.warn("加载连线配置失败,使用默认配置:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.config))}catch(n){console.warn("保存连线配置失败:",n)}}getConfig(){return this.config}setTheme(n){Object.assign(this.config,Ct[n]),this.saveToStorage()}updateConfig(n){Object.assign(this.config,n),this.saveToStorage()}reset(){Object.assign(this.config,Ct.default),this.saveToStorage()}getLinkStyle(n){const o=An[n];return n===de.PARENT_CHILD?{color:this.config.parentChildStyle.color,width:this.config.parentChildStyle.width,dashArray:this.config.parentChildStyle.dashArray}:{color:o.color,width:this.config.width,dashArray:this.config.dashArray}}exportConfig(){return JSON.stringify(this.config,null,2)}importConfig(n){try{const o=JSON.parse(n);return this.updateConfig(o),!0}catch(o){return console.error("导入配置失败:",o),!1}}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.reset()}catch(n){console.warn("清除配置失败:",n)}}}const Le=new Da;function Tt(){return{config:Le.getConfig(),setTheme:Le.setTheme.bind(Le),updateConfig:Le.updateConfig.bind(Le),reset:Le.reset.bind(Le),getLinkStyle:Le.getLinkStyle.bind(Le),exportConfig:Le.exportConfig.bind(Le),importConfig:Le.importConfig.bind(Le),clearStorage:Le.clearStorage.bind(Le),themes:Ct,linkTypes:An}}class Ea{constructor(){et(this,"dependencies",e.reactive([]));et(this,"STORAGE_KEY","gantt-link-dependencies");this.loadFromStorage()}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const o=JSON.parse(n);this.dependencies.splice(0,this.dependencies.length,...o)}}catch(n){console.warn("加载连线依赖关系失败:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.dependencies))}catch(n){console.warn("保存连线依赖关系失败:",n)}}addDependency(n){const o=`link-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;return this.dependencies.push({...n,id:o}),this.saveToStorage(),o}removeDependency(n){const o=this.dependencies.findIndex(r=>r.id===n);return o>-1?(this.dependencies.splice(o,1),this.saveToStorage(),!0):!1}getDependencies(){return this.dependencies}getTaskDependencies(n){return this.dependencies.filter(o=>o.sourceTaskId===n||o.targetTaskId===n)}clear(){this.dependencies.splice(0),this.saveToStorage()}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.clear()}catch(n){console.warn("清除依赖关系失败:",n)}}wouldCreateCycle(n,o){const r=new Set,i=new Set,s=l=>{if(i.has(l))return!0;if(r.has(l))return!1;r.add(l),i.add(l);const u=this.dependencies.filter(d=>d.sourceTaskId===l);for(const d of u)if(s(d.targetTaskId))return!0;return i.delete(l),!1};this.dependencies.push({id:"temp",sourceTaskId:n,targetTaskId:o,type:de.FINISH_TO_START});const a=s(n);return this.dependencies.pop(),a}}const Qt=new Ea,mn={"zh-CN":{common:{confirm:"确定",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",close:"关闭",export:"导出",import:"导入",config:"配置",settings:"设置",theme:"主题",to:"至",selectDate:"请选择日期"},date:{year:"年",month:"月",day:"日",hour:"时",week:"周",today:"今天",monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日",january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY-MM-DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{month:"月",week:"周",day:"日",hour:"时"},task:{addRoot:"添加根任务",addSub:"添加子任务",remove:"删除任务",edit:"编辑任务",name:"任务名称",priority:"优先级",startDate:"开始时间",endDate:"结束时间",duration:"耗时",progress:"进度",serialNumber:"序号",type:"类型",taskType:"任务",projectType:"项目",milestoneType:"里程碑"},link:{legend:"连线图例",parentChild:"父子关系",finishToStart:"完成-开始",startToStart:"开始-开始",finishToFinish:"完成-完成",startToFinish:"开始-完成",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"甘特图配置",themeSettings:"主题设置",linkSettings:"连线设置",languageSettings:"语言设置",currentTheme:"当前",previewTheme:"预览",exportConfig:"导出配置",importConfig:"导入配置",linkConfig:{info:"以下配置用于任务依赖连线(完成-开始、开始-开始等关系)",pathType:"路径类型",straight:"直线",bezier:"贝塞尔",rightAngle:"直角",color:"颜色",width:"线宽",dashStyle:"虚线样式",solid:"实线",shortDash:"短虚线",mediumDash:"中虚线",longDash:"长虚线",dotDash:"点划线",curvature:"弯曲度",offset:"偏移距离",smoothCorners:"平滑转角",cornerRadius:"转角半径",showArrow:"显示箭头",arrowSize:"箭头大小",arrowColor:"箭头颜色",syncColor:"同步",dashAnimation:"虚线流动动画",animationSpeed:"动画速度",showLabels:"显示标签",labelColor:"标签颜色",fontSize:"字体大小",typeColors:"依赖类型颜色",parentChildStyle:"父子关系连线样式",parentChildInfo:"用于显示父任务与子任务之间的层级结构关系"}},theme:{metro:"Metro 金属质感",light:"浅色主题",dark:"深色主题",colorful:"多彩主题",ocean:"海洋主题",apple:"Apple 苹果风格",classic:"经典商务",liquidGlass:"Liquid Glass 液态玻璃",metroDesc:"经典 Windows Metro 风格",lightDesc:"清爽明亮的浅色风格",darkDesc:"优雅专业的深色风格",colorfulDesc:"活力四射的多彩风格",oceanDesc:"沉静舒适的海洋风格",appleDesc:"简约优雅的 macOS 风格",classicDesc:"传统稳重的商务风格",liquidGlassDesc:"iOS 26 液态玻璃效果,半透明流动质感"},datePicker:{selectDate:"请选择日期",clearDate:"清除日期"},tooltip:{addSubTask:"添加子任务",removeTask:"删除当前任务",syncArrowColor:"与线条颜色同步",close:"关闭"}},"en-US":{common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",close:"Close",export:"Export",import:"Import",config:"Config",settings:"Settings",theme:"Theme",to:"to",selectDate:"Select Date"},date:{year:"Year",month:"Month",day:"Day",hour:"Hour",week:"Week",today:"Today",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},dateFormat:{full:"MMMM DD, YYYY",short:"MM/DD/YYYY",monthDay:"MMM DD",yearMonth:"MMMM YYYY"},viewMode:{month:"Month",week:"Week",day:"Day",hour:"Hour"},task:{addRoot:"Add Root Task",addSub:"Add Sub Task",remove:"Delete Task",edit:"Edit Task",name:"Task Name",priority:"Priority",startDate:"Start Date",endDate:"End Date",duration:"Duration",progress:"Progress",serialNumber:"No.",type:"Type",taskType:"Task",projectType:"Project",milestoneType:"Milestone"},link:{legend:"Link Legend",parentChild:"Parent-Child",finishToStart:"Finish-to-Start",startToStart:"Start-to-Start",finishToFinish:"Finish-to-Finish",startToFinish:"Start-to-Finish",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"Gantt Configuration",themeSettings:"Theme Settings",linkSettings:"Link Settings",languageSettings:"Language Settings",currentTheme:"Current",previewTheme:"Preview",exportConfig:"Export Config",importConfig:"Import Config",linkConfig:{info:"Configure task dependency links (Finish-to-Start, Start-to-Start, etc.)",pathType:"Path Type",straight:"Straight",bezier:"Bezier",rightAngle:"Right Angle",color:"Color",width:"Line Width",dashStyle:"Dash Style",solid:"Solid",shortDash:"Short Dash",mediumDash:"Medium Dash",longDash:"Long Dash",dotDash:"Dot Dash",curvature:"Curvature",offset:"Offset Distance",smoothCorners:"Smooth Corners",cornerRadius:"Corner Radius",showArrow:"Show Arrow",arrowSize:"Arrow Size",arrowColor:"Arrow Color",syncColor:"Sync",dashAnimation:"Dash Animation",animationSpeed:"Animation Speed",showLabels:"Show Labels",labelColor:"Label Color",fontSize:"Font Size",typeColors:"Dependency Type Colors",parentChildStyle:"Parent-Child Link Style",parentChildInfo:"Display hierarchical relationship between parent and child tasks"}},theme:{metro:"Metro",light:"Light",dark:"Dark",colorful:"Colorful",ocean:"Ocean",apple:"Apple",classic:"Classic",liquidGlass:"Liquid Glass",metroDesc:"Classic Windows Metro style",lightDesc:"Fresh and bright light style",darkDesc:"Elegant and professional dark style",colorfulDesc:"Vibrant and colorful style",oceanDesc:"Calm and comfortable ocean style",appleDesc:"Minimalist and elegant macOS style",classicDesc:"Traditional and stable business style",liquidGlassDesc:"iOS 26 Liquid Glass effect with translucent fluidity"},datePicker:{selectDate:"Select Date",clearDate:"Clear Date"},tooltip:{addSubTask:"Add Sub Task",removeTask:"Delete Current Task",syncArrowColor:"Sync with line color",close:"Close"}},"ja-JP":{common:{confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",edit:"編集",add:"追加",close:"閉じる",export:"エクスポート",import:"インポート",config:"設定",settings:"設定",theme:"テーマ",to:"から",selectDate:"日付を選択"},date:{year:"年",month:"月",day:"日",hour:"時",week:"週",today:"今日",monday:"月",tuesday:"火",wednesday:"水",thursday:"木",friday:"金",saturday:"土",sunday:"日",january:"1月",february:"2月",march:"3月",april:"4月",may:"5月",june:"6月",july:"7月",august:"8月",september:"9月",october:"10月",november:"11月",december:"12月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY/MM/DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{month:"月",week:"週",day:"日",hour:"時"},task:{addRoot:"ルートタスクを追加",addSub:"サブタスクを追加",remove:"タスクを削除",edit:"タスクを編集",name:"タスク名",priority:"優先度",startDate:"開始日",endDate:"終了日",duration:"期間",progress:"進捗",serialNumber:"番号",type:"タイプ",taskType:"タスク",projectType:"プロジェクト",milestoneType:"マイルストーン"},link:{legend:"リンク凡例",parentChild:"親子関係",finishToStart:"終了-開始",startToStart:"開始-開始",finishToFinish:"終了-終了",startToFinish:"開始-終了",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"ガントチャート設定",themeSettings:"テーマ設定",linkSettings:"リンク設定",languageSettings:"言語設定",currentTheme:"現在",previewTheme:"プレビュー",exportConfig:"設定をエクスポート",importConfig:"設定をインポート",linkConfig:{info:"タスク依存関係リンク(終了-開始、開始-開始など)を設定",pathType:"パスタイプ",straight:"直線",bezier:"ベジェ曲線",rightAngle:"直角",color:"色",width:"線の太さ",dashStyle:"破線スタイル",solid:"実線",shortDash:"短い破線",mediumDash:"中破線",longDash:"長い破線",dotDash:"点線破線",curvature:"曲率",offset:"オフセット距離",smoothCorners:"滑らかな角",cornerRadius:"角の半径",showArrow:"矢印を表示",arrowSize:"矢印サイズ",arrowColor:"矢印の色",syncColor:"同期",dashAnimation:"破線アニメーション",animationSpeed:"アニメーション速度",showLabels:"ラベルを表示",labelColor:"ラベルの色",fontSize:"フォントサイズ",typeColors:"依存関係タイプの色",parentChildStyle:"親子リンクスタイル",parentChildInfo:"親タスクと子タスクの階層関係を表示"}},theme:{metro:"メトロ",light:"ライト",dark:"ダーク",colorful:"カラフル",ocean:"オーシャン",apple:"Apple",classic:"クラシック",liquidGlass:"リキッドグラス",metroDesc:"クラシックWindowsメトロスタイル",lightDesc:"明るく爽やかなライトスタイル",darkDesc:"エレガントでプロフェッショナルなダークスタイル",colorfulDesc:"活気あるカラフルスタイル",oceanDesc:"落ち着いた快適なオーシャンスタイル",appleDesc:"ミニマルでエレガントなmacOSスタイル",classicDesc:"伝統的で安定感のあるビジネススタイル",liquidGlassDesc:"iOS 26 リキッドグラス効果、半透明で流動的な質感"},datePicker:{selectDate:"日付を選択",clearDate:"日付をクリア"},tooltip:{addSubTask:"サブタスクを追加",removeTask:"現在のタスクを削除",syncArrowColor:"線の色と同期",close:"閉じる"}},"ko-KR":{common:{confirm:"확인",cancel:"취소",save:"저장",delete:"삭제",edit:"편집",add:"추가",close:"닫기",export:"내보내기",import:"가져오기",config:"설정",settings:"설정",theme:"테마",to:"에서",selectDate:"날짜 선택"},date:{year:"년",month:"월",day:"일",hour:"시",week:"주",today:"오늘",monday:"월",tuesday:"화",wednesday:"수",thursday:"목",friday:"금",saturday:"토",sunday:"일",january:"1월",february:"2월",march:"3월",april:"4월",may:"5월",june:"6월",july:"7월",august:"8월",september:"9월",october:"10월",november:"11월",december:"12월"},dateFormat:{full:"YYYY년 MM월 DD일",short:"YYYY-MM-DD",monthDay:"MM월 DD일",yearMonth:"YYYY년 MM월"},viewMode:{month:"월",week:"주",day:"일",hour:"시"},task:{addRoot:"루트 작업 추가",addSub:"하위 작업 추가",remove:"작업 삭제",edit:"작업 편집",name:"작업 이름",priority:"우선순위",startDate:"시작일",endDate:"종료일",duration:"기간",progress:"진행률",serialNumber:"번호",type:"유형",taskType:"작업",projectType:"프로젝트",milestoneType:"마일스톤"},link:{legend:"링크 범례",parentChild:"부모-자식",finishToStart:"종료-시작",startToStart:"시작-시작",finishToFinish:"종료-종료",startToFinish:"시작-종료",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"간트 차트 설정",themeSettings:"테마 설정",linkSettings:"링크 설정",languageSettings:"언어 설정",currentTheme:"현재",previewTheme:"미리보기",exportConfig:"설정 내보내기",importConfig:"설정 가져오기",linkConfig:{info:"작업 종속성 링크 설정 (종료-시작, 시작-시작 등)",pathType:"경로 유형",straight:"직선",bezier:"베지어 곡선",rightAngle:"직각",color:"색상",width:"선 두께",dashStyle:"파선 스타일",solid:"실선",shortDash:"짧은 파선",mediumDash:"중간 파선",longDash:"긴 파선",dotDash:"점선 파선",curvature:"곡률",offset:"오프셋 거리",smoothCorners:"부드러운 모서리",cornerRadius:"모서리 반경",showArrow:"화살표 표시",arrowSize:"화살표 크기",arrowColor:"화살표 색상",syncColor:"동기화",dashAnimation:"파선 애니메이션",animationSpeed:"애니메이션 속도",showLabels:"레이블 표시",labelColor:"레이블 색상",fontSize:"글꼴 크기",typeColors:"종속성 유형 색상",parentChildStyle:"부모-자식 링크 스타일",parentChildInfo:"부모 작업과 자식 작업의 계층 관계 표시"}},theme:{metro:"메트로",light:"라이트",dark:"다크",colorful:"컬러풀",ocean:"오션",apple:"Apple",classic:"클래식",liquidGlass:"리퀴드 글래스",metroDesc:"클래식 Windows 메트로 스타일",lightDesc:"밝고 상쾌한 라이트 스타일",darkDesc:"우아하고 전문적인 다크 스타일",colorfulDesc:"활기찬 컬러풀 스타일",oceanDesc:"차분하고 편안한 오션 스타일",appleDesc:"미니멀하고 우아한 macOS 스타일",classicDesc:"전통적이고 안정적인 비즈니스 스타일",liquidGlassDesc:"iOS 26 반투명 유동성을 지닌 리퀴드 글래스 효과"},datePicker:{selectDate:"날짜 선택",clearDate:"날짜 지우기"},tooltip:{addSubTask:"하위 작업 추가",removeTask:"현재 작업 삭제",syncArrowColor:"선 색상과 동기화",close:"닫기"}},"fr-FR":{common:{confirm:"Confirmer",cancel:"Annuler",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",add:"Ajouter",close:"Fermer",export:"Exporter",import:"Importer",config:"Configuration",settings:"Paramètres",theme:"Thème",to:"à",selectDate:"Sélectionner la date"},date:{year:"Année",month:"Mois",day:"Jour",hour:"Heure",week:"Semaine",today:"Aujourd'hui",monday:"Lun",tuesday:"Mar",wednesday:"Mer",thursday:"Jeu",friday:"Ven",saturday:"Sam",sunday:"Dim",january:"Janvier",february:"Février",march:"Mars",april:"Avril",may:"Mai",june:"Juin",july:"Juillet",august:"Août",september:"Septembre",october:"Octobre",november:"Novembre",december:"Décembre"},dateFormat:{full:"DD MMMM YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Mois",week:"Semaine",day:"Jour",hour:"Heure"},task:{addRoot:"Ajouter une tâche racine",addSub:"Ajouter une sous-tâche",remove:"Supprimer la tâche",edit:"Modifier la tâche",name:"Nom de la tâche",priority:"Priorité",startDate:"Date de début",endDate:"Date de fin",duration:"Durée",progress:"Progrès",serialNumber:"N°",type:"Type",taskType:"Tâche",projectType:"Projet",milestoneType:"Jalon"},link:{legend:"Légende des liens",parentChild:"Parent-Enfant",finishToStart:"Fin-Début",startToStart:"Début-Début",finishToFinish:"Fin-Fin",startToFinish:"Début-Fin",fs:"FD",ss:"DD",ff:"FF",sf:"DF",pc:"PE"},configPanel:{title:"Configuration Gantt",themeSettings:"Paramètres du thème",linkSettings:"Paramètres des liens",languageSettings:"Paramètres de langue",currentTheme:"Actuel",previewTheme:"Aperçu",exportConfig:"Exporter la configuration",importConfig:"Importer la configuration",linkConfig:{info:"Configurer les liens de dépendance des tâches (Fin-Début, Début-Début, etc.)",pathType:"Type de chemin",straight:"Droit",bezier:"Bézier",rightAngle:"Angle droit",color:"Couleur",width:"Épaisseur de ligne",dashStyle:"Style de tiret",solid:"Solide",shortDash:"Tiret court",mediumDash:"Tiret moyen",longDash:"Tiret long",dotDash:"Point-tiret",curvature:"Courbure",offset:"Distance de décalage",smoothCorners:"Coins lisses",cornerRadius:"Rayon du coin",showArrow:"Afficher la flèche",arrowSize:"Taille de la flèche",arrowColor:"Couleur de la flèche",syncColor:"Synchroniser",dashAnimation:"Animation de tiret",animationSpeed:"Vitesse d'animation",showLabels:"Afficher les étiquettes",labelColor:"Couleur de l'étiquette",fontSize:"Taille de police",typeColors:"Couleurs des types de dépendance",parentChildStyle:"Style de lien parent-enfant",parentChildInfo:"Afficher la relation hiérarchique entre les tâches parent et enfant"}},theme:{metro:"Metro",light:"Clair",dark:"Sombre",colorful:"Coloré",ocean:"Océan",apple:"Apple",classic:"Classique",liquidGlass:"Verre Liquide",metroDesc:"Style Metro Windows classique",lightDesc:"Style clair frais et lumineux",darkDesc:"Style sombre élégant et professionnel",colorfulDesc:"Style coloré vibrant",oceanDesc:"Style océan calme et confortable",appleDesc:"Style macOS minimaliste et élégant",classicDesc:"Style business traditionnel et stable",liquidGlassDesc:"Effet Verre Liquide iOS 26 avec fluidité translucide"},datePicker:{selectDate:"Sélectionner la date",clearDate:"Effacer la date"},tooltip:{addSubTask:"Ajouter une sous-tâche",removeTask:"Supprimer la tâche actuelle",syncArrowColor:"Synchroniser avec la couleur de la ligne",close:"Fermer"}},"de-DE":{common:{confirm:"Bestätigen",cancel:"Abbrechen",save:"Speichern",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",export:"Exportieren",import:"Importieren",config:"Konfiguration",settings:"Einstellungen",theme:"Thema",to:"bis",selectDate:"Datum auswählen"},date:{year:"Jahr",month:"Monat",day:"Tag",hour:"Stunde",week:"Woche",today:"Heute",monday:"Mo",tuesday:"Di",wednesday:"Mi",thursday:"Do",friday:"Fr",saturday:"Sa",sunday:"So",january:"Januar",february:"Februar",march:"März",april:"April",may:"Mai",june:"Juni",july:"Juli",august:"August",september:"September",october:"Oktober",november:"November",december:"Dezember"},dateFormat:{full:"DD. MMMM YYYY",short:"DD.MM.YYYY",monthDay:"DD. MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Monat",week:"Woche",day:"Tag",hour:"Stunde"},task:{addRoot:"Hauptaufgabe hinzufügen",addSub:"Unteraufgabe hinzufügen",remove:"Aufgabe löschen",edit:"Aufgabe bearbeiten",name:"Aufgabenname",priority:"Priorität",startDate:"Startdatum",endDate:"Enddatum",duration:"Dauer",progress:"Fortschritt",serialNumber:"Nr.",type:"Typ",taskType:"Aufgabe",projectType:"Projekt",milestoneType:"Meilenstein"},link:{legend:"Verknüpfungslegende",parentChild:"Übergeordnet-Untergeordnet",finishToStart:"Ende-Anfang",startToStart:"Anfang-Anfang",finishToFinish:"Ende-Ende",startToFinish:"Anfang-Ende",fs:"EA",ss:"AA",ff:"EE",sf:"AE",pc:"ÜU"},configPanel:{title:"Gantt-Konfiguration",themeSettings:"Themeneinstellungen",linkSettings:"Verknüpfungseinstellungen",languageSettings:"Spracheinstellungen",currentTheme:"Aktuell",previewTheme:"Vorschau",exportConfig:"Konfiguration exportieren",importConfig:"Konfiguration importieren",linkConfig:{info:"Aufgabenabhängigkeitsverknüpfungen konfigurieren (Ende-Anfang, Anfang-Anfang usw.)",pathType:"Pfadtyp",straight:"Gerade",bezier:"Bézier",rightAngle:"Rechter Winkel",color:"Farbe",width:"Linienstärke",dashStyle:"Strichstil",solid:"Durchgezogen",shortDash:"Kurzer Strich",mediumDash:"Mittlerer Strich",longDash:"Langer Strich",dotDash:"Punkt-Strich",curvature:"Krümmung",offset:"Versatzabstand",smoothCorners:"Glatte Ecken",cornerRadius:"Eckenradius",showArrow:"Pfeil anzeigen",arrowSize:"Pfeilgröße",arrowColor:"Pfeilfarbe",syncColor:"Synchronisieren",dashAnimation:"Strich-Animation",animationSpeed:"Animationsgeschwindigkeit",showLabels:"Beschriftungen anzeigen",labelColor:"Beschriftungsfarbe",fontSize:"Schriftgröße",typeColors:"Abhängigkeitstypfarben",parentChildStyle:"Übergeordnet-Untergeordnet-Verknüpfungsstil",parentChildInfo:"Hierarchische Beziehung zwischen übergeordneten und untergeordneten Aufgaben anzeigen"}},theme:{metro:"Metro",light:"Hell",dark:"Dunkel",colorful:"Farbenfroh",ocean:"Ozean",apple:"Apple",classic:"Klassisch",liquidGlass:"Flüssigglas",metroDesc:"Klassischer Windows Metro-Stil",lightDesc:"Frischer und heller Stil",darkDesc:"Eleganter und professioneller dunkler Stil",colorfulDesc:"Lebendiger farbenfroher Stil",oceanDesc:"Ruhiger und komfortabler Ozean-Stil",appleDesc:"Minimalistischer und eleganter macOS-Stil",classicDesc:"Traditioneller und stabiler Geschäftsstil",liquidGlassDesc:"iOS 26 Flüssigglas-Effekt mit durchscheinender Fließfähigkeit"},datePicker:{selectDate:"Datum auswählen",clearDate:"Datum löschen"},tooltip:{addSubTask:"Unteraufgabe hinzufügen",removeTask:"Aktuelle Aufgabe löschen",syncArrowColor:"Mit Linienfarbe synchronisieren",close:"Schließen"}},"es-ES":{common:{confirm:"Confirmar",cancel:"Cancelar",save:"Guardar",delete:"Eliminar",edit:"Editar",add:"Agregar",close:"Cerrar",export:"Exportar",import:"Importar",config:"Configuración",settings:"Ajustes",theme:"Tema",to:"a",selectDate:"Seleccionar fecha"},date:{year:"Año",month:"Mes",day:"Día",hour:"Hora",week:"Semana",today:"Hoy",monday:"Lun",tuesday:"Mar",wednesday:"Mié",thursday:"Jue",friday:"Vie",saturday:"Sáb",sunday:"Dom",january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre"},dateFormat:{full:"DD [de] MMMM [de] YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Mes",week:"Semana",day:"Día",hour:"Hora"},task:{addRoot:"Agregar tarea raíz",addSub:"Agregar subtarea",remove:"Eliminar tarea",edit:"Editar tarea",name:"Nombre de tarea",priority:"Prioridad",startDate:"Fecha de inicio",endDate:"Fecha de fin",duration:"Duración",progress:"Progreso",serialNumber:"Nº",type:"Tipo",taskType:"Tarea",projectType:"Proyecto",milestoneType:"Hito"},link:{legend:"Leyenda de enlaces",parentChild:"Padre-Hijo",finishToStart:"Fin-Inicio",startToStart:"Inicio-Inicio",finishToFinish:"Fin-Fin",startToFinish:"Inicio-Fin",fs:"FI",ss:"II",ff:"FF",sf:"IF",pc:"PH"},configPanel:{title:"Configuración Gantt",themeSettings:"Configuración de tema",linkSettings:"Configuración de enlaces",languageSettings:"Configuración de idioma",currentTheme:"Actual",previewTheme:"Vista previa",exportConfig:"Exportar configuración",importConfig:"Importar configuración",linkConfig:{info:"Configurar enlaces de dependencia de tareas (Fin-Inicio, Inicio-Inicio, etc.)",pathType:"Tipo de ruta",straight:"Recta",bezier:"Bézier",rightAngle:"Ángulo recto",color:"Color",width:"Grosor de línea",dashStyle:"Estilo de guión",solid:"Sólido",shortDash:"Guión corto",mediumDash:"Guión medio",longDash:"Guión largo",dotDash:"Punto-guión",curvature:"Curvatura",offset:"Distancia de desplazamiento",smoothCorners:"Esquinas suaves",cornerRadius:"Radio de esquina",showArrow:"Mostrar flecha",arrowSize:"Tamaño de flecha",arrowColor:"Color de flecha",syncColor:"Sincronizar",dashAnimation:"Animación de guión",animationSpeed:"Velocidad de animación",showLabels:"Mostrar etiquetas",labelColor:"Color de etiqueta",fontSize:"Tamaño de fuente",typeColors:"Colores de tipo de dependencia",parentChildStyle:"Estilo de enlace padre-hijo",parentChildInfo:"Mostrar relación jerárquica entre tareas padre e hijo"}},theme:{metro:"Metro",light:"Claro",dark:"Oscuro",colorful:"Colorido",ocean:"Océano",apple:"Apple",classic:"Clásico",liquidGlass:"Cristal Líquido",metroDesc:"Estilo Metro Windows clásico",lightDesc:"Estilo claro fresco y brillante",darkDesc:"Estilo oscuro elegante y profesional",colorfulDesc:"Estilo colorido vibrante",oceanDesc:"Estilo océano tranquilo y cómodo",appleDesc:"Estilo macOS minimalista y elegante",classicDesc:"Estilo empresarial tradicional y estable",liquidGlassDesc:"Efecto de Cristal Líquido iOS 26 con fluidez translúcida"},datePicker:{selectDate:"Seleccionar fecha",clearDate:"Borrar fecha"},tooltip:{addSubTask:"Agregar subtarea",removeTask:"Eliminar tarea actual",syncArrowColor:"Sincronizar con color de línea",close:"Cerrar"}},"ru-RU":{common:{confirm:"Подтвердить",cancel:"Отмена",save:"Сохранить",delete:"Удалить",edit:"Редактировать",add:"Добавить",close:"Закрыть",export:"Экспорт",import:"Импорт",config:"Конфигурация",settings:"Настройки",theme:"Тема",to:"до",selectDate:"Выбрать дату"},date:{year:"Год",month:"Месяц",day:"День",hour:"Час",week:"Неделя",today:"Сегодня",monday:"Пн",tuesday:"Вт",wednesday:"Ср",thursday:"Чт",friday:"Пт",saturday:"Сб",sunday:"Вс",january:"Январь",february:"Февраль",march:"Март",april:"Апрель",may:"Май",june:"Июнь",july:"Июль",august:"Август",september:"Сентябрь",october:"Октябрь",november:"Ноябрь",december:"Декабрь"},dateFormat:{full:"DD MMMM YYYY г.",short:"DD.MM.YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Месяц",week:"Неделя",day:"День",hour:"Час"},task:{addRoot:"Добавить корневую задачу",addSub:"Добавить подзадачу",remove:"Удалить задачу",edit:"Редактировать задачу",name:"Название задачи",priority:"Приоритет",startDate:"Дата начала",endDate:"Дата окончания",duration:"Длительность",progress:"Прогресс",serialNumber:"№",type:"Тип",taskType:"Задача",projectType:"Проект",milestoneType:"Веха"},link:{legend:"Легенда связей",parentChild:"Родитель-Потомок",finishToStart:"Окончание-Начало",startToStart:"Начало-Начало",finishToFinish:"Окончание-Окончание",startToFinish:"Начало-Окончание",fs:"ОН",ss:"НН",ff:"ОО",sf:"НО",pc:"РП"},configPanel:{title:"Конфигурация Gantt",themeSettings:"Настройки темы",linkSettings:"Настройки связей",languageSettings:"Настройки языка",currentTheme:"Текущая",previewTheme:"Предпросмотр",exportConfig:"Экспорт конфигурации",importConfig:"Импорт конфигурации",linkConfig:{info:"Настройка связей зависимостей задач (Окончание-Начало, Начало-Начало и т.д.)",pathType:"Тип пути",straight:"Прямая",bezier:"Безье",rightAngle:"Прямой угол",color:"Цвет",width:"Толщина линии",dashStyle:"Стиль пунктира",solid:"Сплошная",shortDash:"Короткий пунктир",mediumDash:"Средний пунктир",longDash:"Длинный пунктир",dotDash:"Точка-тире",curvature:"Кривизна",offset:"Расстояние смещения",smoothCorners:"Сглаженные углы",cornerRadius:"Радиус угла",showArrow:"Показать стрелку",arrowSize:"Размер стрелки",arrowColor:"Цвет стрелки",syncColor:"Синхронизировать",dashAnimation:"Анимация пунктира",animationSpeed:"Скорость анимации",showLabels:"Показать метки",labelColor:"Цвет метки",fontSize:"Размер шрифта",typeColors:"Цвета типов зависимостей",parentChildStyle:"Стиль связи родитель-потомок",parentChildInfo:"Показать иерархическую связь между родительскими и дочерними задачами"}},theme:{metro:"Метро",light:"Светлая",dark:"Темная",colorful:"Красочная",ocean:"Океан",apple:"Apple",classic:"Классический",liquidGlass:"Жидкое стекло",metroDesc:"Классический стиль Windows Metro",lightDesc:"Свежий и яркий светлый стиль",darkDesc:"Элегантный и профессиональный темный стиль",colorfulDesc:"Яркий красочный стиль",oceanDesc:"Спокойный и комфортный океанский стиль",appleDesc:"Минималистичный и элегантный стиль macOS",classicDesc:"Традиционный и стабильный деловой стиль",liquidGlassDesc:"Эффект жидкого стекла iOS 26 с полупрозрачной текучестью"},datePicker:{selectDate:"Выбрать дату",clearDate:"Очистить дату"},tooltip:{addSubTask:"Добавить подзадачу",removeTask:"Удалить текущую задачу",syncArrowColor:"Синхронизировать с цветом линии",close:"Закрыть"}}},St=e.ref("zh-CN"),hn=localStorage.getItem("gantt-locale");hn&&mn[hn]&&(St.value=hn);function Ma(t){const n=t.split(".");let o=mn[St.value];for(const r of n)if(o&&typeof o=="object")o=o[r];else return t;return typeof o=="string"?o:t}function Ln(t){mn[t]&&(St.value=t,localStorage.setItem("gantt-locale",t))}function $a(){return St.value}function Na(){return[{value:"zh-CN",label:"🇨🇳 简体中文"},{value:"en-US",label:"🇺🇸 English"},{value:"ja-JP",label:"🇯🇵 日本語"},{value:"ko-KR",label:"🇰🇷 한국어"},{value:"fr-FR",label:"🇫🇷 Français"},{value:"de-DE",label:"🇩🇪 Deutsch"},{value:"es-ES",label:"🇪🇸 Español"},{value:"ru-RU",label:"🇷🇺 Русский"}]}function tt(){return{locale:e.computed(()=>St.value),t:Ma,setLocale:Ln,getLocale:$a,getLocales:Na}}const He=[{id:"metro",nameKey:"theme.metro",descKey:"theme.metroDesc",preview:"#0078d4",cssVariables:{"--primary":"#0078d4","--primary-dark":"#106ebe","--primary-light":"#1084d8","--secondary":"#0d5aa7","--bg-metal-light":"linear-gradient(145deg, #ffffff, #f5f5f5)","--bg-metal-normal":"linear-gradient(145deg, #f5f5f5, #e8e8e8)","--bg-metal-dark":"linear-gradient(145deg, #e6e6e6, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #e0e0e0, #f8f8f8)","--bg-active":"linear-gradient(145deg, #0078d4, #106ebe)","--bg-active-hover":"linear-gradient(145deg, #1084d8, #0d5aa7)","--bg-active-pressed":"linear-gradient(145deg, #0d5aa7, #1084d8)","--border":"#d0d0d0","--border-dark":"#b0b0b0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.1)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--text-primary":"#333333","--text-secondary":"#666666","--text-muted":"#999999","--text-white":"#ffffff","--bg-primary":"#f8f8f8","--bg-secondary":"#e8e8e8","--bg-content":"#ffffff","--row-hover":"#FFF3A1","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"dark",nameKey:"theme.dark",descKey:"theme.darkDesc",preview:"#00d4ff",cssVariables:{"--primary":"#00d4ff","--primary-dark":"#00b8e6","--primary-light":"#33ddff","--secondary":"#0099cc","--bg-metal-light":"linear-gradient(145deg, #3a3a3a, #2d2d2d)","--bg-metal-normal":"linear-gradient(145deg, #2d2d2d, #1f1f1f)","--bg-metal-dark":"linear-gradient(145deg, #1f1f1f, #0d0d0d)","--bg-metal-pressed":"linear-gradient(145deg, #0d0d0d, #2d2d2d)","--bg-active":"linear-gradient(145deg, #00d4ff, #0099cc)","--bg-active-hover":"linear-gradient(145deg, #33ddff, #00b8e6)","--bg-active-pressed":"linear-gradient(145deg, #00b8e6, #33ddff)","--border":"#404040","--border-dark":"#2d2d2d","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--shadow-outset":"0 2px 8px rgba(0, 0, 0, 0.3)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.5)","--text-primary":"#ffffff","--text-secondary":"#cccccc","--text-muted":"#888888","--text-white":"#ffffff","--bg-primary":"#1a1a1a","--bg-secondary":"#2d2d2d","--bg-content":"#262626","--row-hover":"#3a4a5a","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"modern",nameKey:"theme.light",descKey:"theme.lightDesc",preview:"#6366f1",cssVariables:{"--primary":"#6366f1","--primary-dark":"#4f46e5","--primary-light":"#8b5cf6","--secondary":"#3730a3","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f0f0f0)","--bg-metal-normal":"linear-gradient(145deg, #f0f0f0, #e0e0e0)","--bg-metal-dark":"linear-gradient(145deg, #e0e0e0, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #d8d8d8, #f0f0f0)","--bg-active":"linear-gradient(145deg, #6366f1, #4f46e5)","--bg-active-hover":"linear-gradient(145deg, #8b5cf6, #6366f1)","--bg-active-pressed":"linear-gradient(145deg, #4f46e5, #8b5cf6)","--border":"#e0e0e0","--border-dark":"#c0c0c0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.05)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#1f2937","--text-secondary":"#6b7280","--text-muted":"#9ca3af","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f9fafb","--bg-content":"#ffffff","--row-hover":"#e0e7ff","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Inter', 'Segoe UI', sans-serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"classic",nameKey:"theme.classic",descKey:"theme.classicDesc",preview:"#2563eb",cssVariables:{"--primary":"#2563eb","--primary-dark":"#1d4ed8","--primary-light":"#3b82f6","--secondary":"#1e40af","--bg-metal-light":"linear-gradient(145deg, #f8f9fa, #e9ecef)","--bg-metal-normal":"linear-gradient(145deg, #e9ecef, #dee2e6)","--bg-metal-dark":"linear-gradient(145deg, #dee2e6, #ced4da)","--bg-metal-pressed":"linear-gradient(145deg, #ced4da, #e9ecef)","--bg-active":"linear-gradient(145deg, #2563eb, #1d4ed8)","--bg-active-hover":"linear-gradient(145deg, #3b82f6, #2563eb)","--bg-active-pressed":"linear-gradient(145deg, #1d4ed8, #3b82f6)","--border":"#ced4da","--border-dark":"#adb5bd","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.12)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.25)","--text-primary":"#212529","--text-secondary":"#495057","--text-muted":"#6c757d","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f8f9fa","--bg-content":"#ffffff","--row-hover":"#dbeafe","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Times New Roman', serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"700"}},{id:"colorful",nameKey:"theme.colorful",descKey:"theme.colorfulDesc",preview:"#f59e0b",cssVariables:{"--primary":"#f59e0b","--primary-dark":"#d97706","--primary-light":"#fbbf24","--secondary":"#b45309","--bg-metal-light":"linear-gradient(145deg, #fef3c7, #fed7aa)","--bg-metal-normal":"linear-gradient(145deg, #fed7aa, #fdba74)","--bg-metal-dark":"linear-gradient(145deg, #fdba74, #fb923c)","--bg-metal-pressed":"linear-gradient(145deg, #fb923c, #fed7aa)","--bg-active":"linear-gradient(145deg, #f59e0b, #d97706)","--bg-active-hover":"linear-gradient(145deg, #fbbf24, #f59e0b)","--bg-active-pressed":"linear-gradient(145deg, #d97706, #fbbf24)","--border":"#fdba74","--border-dark":"#fb923c","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 6px rgba(245, 158, 11, 0.2)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#92400e","--text-secondary":"#b45309","--text-muted":"#d97706","--text-white":"#ffffff","--bg-primary":"#fffbeb","--bg-secondary":"#fef3c7","--bg-content":"#ffffff","--row-hover":"#fef3c7","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Comic Sans MS', cursive","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"apple",nameKey:"theme.apple",descKey:"theme.appleDesc",preview:"#007aff",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f2f2f7)","--bg-metal-normal":"linear-gradient(145deg, #f2f2f7, #e5e5ea)","--bg-metal-dark":"linear-gradient(145deg, #e5e5ea, #d1d1d6)","--bg-metal-pressed":"linear-gradient(145deg, #d1d1d6, #f2f2f7)","--bg-active":"linear-gradient(145deg, #007aff, #0051d5)","--bg-active-hover":"linear-gradient(145deg, #4da3ff, #007aff)","--bg-active-pressed":"linear-gradient(145deg, #0051d5, #4da3ff)","--border":"#d1d1d6","--border-dark":"#c7c7cc","--shadow-inset":"inset 0 0.5px 0 rgba(255, 255, 255, 0.9), inset 0 -0.5px 0 rgba(0, 0, 0, 0.08)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#000000","--text-secondary":"#3c3c43","--text-muted":"#8e8e93","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f2f2f7","--bg-content":"#ffffff","--row-hover":"#e8f4fd","--transition-fast":"0.2s cubic-bezier(0.4, 0, 0.2, 1)","--transition-normal":"0.3s cubic-bezier(0.4, 0, 0.2, 1)","--transition-slow":"0.4s cubic-bezier(0.4, 0, 0.2, 1)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Text', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"liquidGlass",nameKey:"theme.liquidGlass",descKey:"theme.liquidGlassDesc",preview:"linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(220,240,255,0.6) 100%)",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"rgba(255, 255, 255, 0.65)","--bg-metal-normal":"rgba(245, 247, 250, 0.55)","--bg-metal-dark":"rgba(230, 235, 241, 0.6)","--bg-metal-pressed":"rgba(220, 228, 238, 0.7)","--bg-active":"rgba(0, 122, 255, 0.75)","--bg-active-hover":"rgba(77, 163, 255, 0.8)","--bg-active-pressed":"rgba(0, 81, 213, 0.85)","--border":"rgba(255, 255, 255, 0.4)","--border-dark":"rgba(200, 210, 220, 0.5)","--shadow-inset":"inset 0 1px 2px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.05)","--shadow-outset":"0 8px 32px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(255, 255, 255, 0.8)","--shadow-active":"inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 122, 255, 0.25)","--text-primary":"#1d1d1f","--text-secondary":"#424245","--text-muted":"#86868b","--text-white":"#ffffff","--bg-primary":"rgba(250, 250, 252, 0.85)","--bg-secondary":"rgba(242, 242, 247, 0.75)","--bg-content":"rgba(255, 255, 255, 0.7)","--row-hover":"rgba(232, 244, 253, 0.6)","--transition-fast":"0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-normal":"0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-slow":"0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Display', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600","--glass-blur":"12px","--glass-saturation":"180%","--glass-brightness":"105%","--glass-edge-highlight":"rgba(255, 255, 255, 0.9)","--glass-edge-shadow":"rgba(0, 0, 0, 0.1)","--glass-reflection":"linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%)"}}],ft=class ft{constructor(){et(this,"currentTheme","metro");et(this,"storageKey","gantt-theme");et(this,"ganttContainer",null)}static getInstance(){return ft.instance||(ft.instance=new ft),ft.instance}setGanttContainer(n){this.ganttContainer=n,this.loadTheme()}getCurrentTheme(){return this.currentTheme}setTheme(n){const o=He.find(r=>r.id===n);if(!o){console.warn(`Theme ${n} not found`);return}this.currentTheme=n,this.applyTheme(o),this.saveTheme()}applyTheme(n){if(!this.ganttContainer){console.warn("No gantt container available for theme application");return}this.ganttContainer.setAttribute("data-gantt-theme",n.id),Object.entries(n.cssVariables).forEach(([o,r])=>{this.ganttContainer.style.setProperty(o,r)})}loadTheme(){try{const n=localStorage.getItem(this.storageKey);n&&He.find(r=>r.id===n)&&(this.currentTheme=n);const o=He.find(r=>r.id===this.currentTheme);o&&this.applyTheme(o)}catch(n){console.warn("Failed to load theme from localStorage:",n)}}saveTheme(){try{localStorage.setItem(this.storageKey,this.currentTheme)}catch(n){console.warn("Failed to save theme to localStorage:",n)}}getThemes(){return He}getThemeInfo(n){return He.find(o=>o.id===n)}previewTheme(n){const o=He.find(r=>r.id===n);o&&this.applyTheme(o)}cancelPreview(){const n=He.find(o=>o.id===this.currentTheme);n&&this.applyTheme(n)}exportThemeConfig(){return JSON.stringify({currentTheme:this.currentTheme,timestamp:new Date().toISOString()},null,2)}importThemeConfig(n){try{const o=JSON.parse(n);return o.currentTheme&&He.find(r=>r.id===o.currentTheme)?(this.setTheme(o.currentTheme),!0):!1}catch(o){return console.error("Failed to import theme config:",o),!1}}};et(ft,"instance");let pn=ft;const Ie=pn.getInstance(),Va=e.defineComponent({props:{date:{type:String,required:!0},minDate:String,maxDate:String},emits:["confirm","clear"],setup(t,{emit:n}){const{t:o,locale:r}=tt(),i=()=>({"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[r.value]||"en",s=e.computed(()=>{const z=i();return Array.from({length:7},(pe,_e)=>w().day(_e+1).locale(z).format("dd"))}),a=z=>w().month(z-1).locale(i()).format("MMMM"),l=e.ref(!1),u=e.ref(!1),d=e.ref(!1),p=e.ref(""),g=e.ref(0),C=e.ref("fadeX_Prev"),G=e.ref(!1),E=e.ref(!1),F=e.ref(null),m=e.ref(null),R=e.ref(null),b=e.ref(null),v=e.ref(0),V=e.ref(0),k=e.ref(Ie.getCurrentTheme()),J=e.ref(-1),j=e.ref(-1),U=e.ref({row:-1,col:-1}),Q=e.ref(new Date().getFullYear()),A=e.ref(new Date().getMonth()+1),Y=e.ref(new Date().getFullYear()),H=e.ref(new Date().getMonth()+1),X=e.ref(new Date().getDate()),Te=e.ref(1970),h=e.ref(1),c=e.ref(1),y=e.ref(2099),f=e.ref(12),D=e.ref(31),L=z=>{if(!z)return null;const pe=z.split("-");if(pe.length!==3)return null;const _e=parseInt(pe[0],10),Fe=parseInt(pe[1],10),je=parseInt(pe[2],10);return isNaN(_e)||isNaN(Fe)||isNaN(je)?null:{year:_e,month:Fe,day:je}},M=z=>z>9?String(z):`0${z}`,B=e.computed(()=>({year:Q.value,month:A.value,monthStr:a(A.value)})),x=e.computed(()=>({year:Y.value,month:H.value,day:X.value})),P=e.computed(()=>{const z=[];for(let pe=Te.value;pe<=y.value;pe++)z.push(pe);return z}),W=e.computed(()=>Array.from({length:12},(z,pe)=>pe+1)),te=e.computed(()=>({position:"fixed",top:`${v.value}px`,left:`${V.value}px`,zIndex:100002})),le=()=>Q.value<Te.value||Q.value===Te.value&&A.value<=h.value,re=()=>Q.value>y.value||Q.value===y.value&&A.value>=f.value,De=e.computed(()=>{g.value;const z=Q.value,pe=A.value,_e=new Date(z,pe,0).getDate(),Fe=[];let je=[];for(let qe=1;qe<=_e;qe++){const ta=new Date(z,pe-1,qe).getDay(),Ot=ta===0?7:ta;if(qe===1&&Ot>1)for(let xt=1;xt<Ot;xt++)je.push({value:""});const ru=z===Y.value&&pe===H.value&&qe===X.value;let Tn=!1;if(z===Te.value&&pe===h.value&&qe<c.value&&(Tn=!0),z===y.value&&pe===f.value&&qe>D.value&&(Tn=!0),je.push({value:qe,selected:ru,disabled:Tn}),qe===_e&&Ot<7)for(let xt=Ot;xt<7;xt++)je.push({value:""});(Ot===7||qe===_e)&&(Fe.push(je),je=[])}return Fe}),$=()=>{const z=L(t.date);if(z)Q.value=z.year,A.value=z.month,Y.value=z.year,H.value=z.month,X.value=z.day;else{const Fe=new Date;Q.value=Fe.getFullYear(),A.value=Fe.getMonth()+1,Y.value=Fe.getFullYear(),H.value=Fe.getMonth()+1,X.value=Fe.getDate()}const pe=L(t.minDate||"1970-01-01");pe&&(Te.value=pe.year,h.value=pe.month,c.value=pe.day);const _e=L(t.maxDate||"2099-12-31");_e&&(y.value=_e.year,f.value=_e.month,D.value=_e.day),_()},_=()=>{const z=`${Y.value}-${M(H.value)}-${M(X.value)}`,pe=i(),_e=o("dateFormat.full");p.value=w(z).locale(pe).format(_e)},oe=z=>{Q.value=z,u.value=!1,d.value=!1,g.value++},q=z=>{A.value=z,u.value=!1,d.value=!1,g.value++},ne=z=>{if(z.disabled||z.value==="")return;Y.value=Q.value,H.value=A.value,X.value=z.value,_(),l.value=!1;const pe=new Date(Y.value,H.value-1,X.value).getDay(),_e=pe===0?7:pe,Fe=i(),je=w(`${Y.value}-${H.value}-${X.value}`).locale(Fe).format("dddd");n("confirm",{date:`${Y.value}-${M(H.value)}-${M(X.value)}`,year:Y.value,month:H.value,day:X.value,week:_e,weekStr:je,monthStr:a(H.value)})},ge=()=>{G.value||le()||(G.value=!0,setTimeout(()=>G.value=!1,300),C.value="fadeX_Prev",A.value<=1?(Q.value--,A.value=12):A.value--,g.value++)},Me=()=>{E.value||re()||(E.value=!0,setTimeout(()=>E.value=!1,300),C.value="fadeX_Next",A.value>=12?(Q.value++,A.value=1):A.value++,g.value++)},Se=()=>{if(u.value=!u.value,d.value=!1,u.value&&R.value){const z=P.value.indexOf(Y.value);setTimeout(()=>{R.value&&(R.value.scrollTop=Math.max(0,z-3)*40)},0)}},S=()=>{if(d.value=!d.value,u.value=!1,d.value&&b.value){const z=H.value-1;setTimeout(()=>{b.value&&(b.value.scrollTop=Math.max(0,z-3)*40)},0)}},ee=()=>{u.value=!1},fe=()=>{if(m.value){const z=m.value.getBoundingClientRect();v.value=z.bottom+5,V.value=z.left}l.value=!0,setTimeout(()=>{k.value=Ie.getCurrentTheme(),Z(k.value)},0)},ve=()=>{p.value="",l.value=!1,n("clear")},Z=z=>{if(!F.value)return;const pe=Ie.getThemeInfo(z);pe&&(F.value.setAttribute("data-gantt-theme",z),Object.entries(pe.cssVariables).forEach(([_e,Fe])=>{F.value.style.setProperty(_e,Fe)}))},we=z=>{F.value&&m.value&&!F.value.contains(z.target)&&!m.value.contains(z.target)&&(l.value=!1)},Ee=z=>J.value===z,ae=z=>j.value===z,be=(z,pe)=>U.value.row===pe&&U.value.col===z,he=z=>J.value=z,Ce=()=>J.value=-1,Ze=z=>j.value=z,Xe=()=>j.value=-1,st=(z,pe)=>U.value={row:pe,col:z},zt=()=>U.value={row:-1,col:-1};return e.onBeforeMount(()=>$()),e.watch(()=>t.date,()=>$()),e.watch(()=>t.minDate,()=>$()),e.watch(()=>t.maxDate,()=>$()),e.onMounted(()=>{document.addEventListener("click",we);const z=setInterval(()=>{const pe=Ie.getCurrentTheme();pe!==k.value&&(k.value=pe,Z(pe))},100);e.onUnmounted(()=>clearInterval(z))}),e.onUnmounted(()=>document.removeEventListener("click",we)),{t:o,locale:r,getWeekNames:s,getMonthName:a,selectDate:x,showDate:B,copyMinDate:e.computed(()=>({year:Te.value,month:h.value,day:c.value})),copyMaxDate:e.computed(()=>({year:y.value,month:f.value,day:D.value})),fadeXType:C,nextMonthClick:E,prevMonthClick:G,keepDoubleDigit:M,showYear:u,updateKey:g,yearList:P,rows:De,yearListRef:R,prevMonth:ge,nextMonth:Me,selectDay:ne,selectYear:oe,openYearList:Se,openMonthList:S,monthList:W,monthListRef:b,showMonth:d,selectMonth:q,openCalendarList:ee,showCalendar:l,openCalendar:fe,selectedDateText:p,clearDate:ve,calendarRef:F,inputRef:m,calendarPosition:te,isYearHovered:Ee,isMonthHovered:ae,isDayHovered:be,handleYearMouseEnter:he,handleYearMouseLeave:Ce,handleMonthMouseEnter:Ze,handleMonthMouseLeave:Xe,handleDayMouseEnter:st,handleDayMouseLeave:zt}}}),Ve=(t,n)=>{const o=t.__vccOpts||t;for(const[r,i]of n)o[r]=i;return o},_a={class:"date-picker-input-wrapper"},Aa=["placeholder"],La={class:"e-date-select"},Ba={class:"e-date-year"},Fa={class:"e-date-monthday"},Ha={class:"e-calendar-container"},Ia={class:"e-calendar-toolbar"},Ra={key:0,class:"e-calendar-svg-cover"},Ya={class:"e-calendar-toolbar-title"},za={key:0,class:"e-calendar-svg-cover"},Oa={class:"e-calendar-week"},xa={class:"e-calendar-monthday"},Pa=["onClick","onMouseenter"],Za=["textContent"],Ga={key:0,class:"e-calendar-monthday-row-day-cover"},Wa={class:"e-calendar-year",ref:"yearListRef"},Ua=["onClick","onMouseenter"],ja={class:"e-calendar-year",ref:"monthListRef"},qa=["onClick","onMouseenter"];function Ja(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",_a,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=a=>t.selectedDateText=a),onClick:n[1]||(n[1]=(...a)=>t.openCalendar&&t.openCalendar(...a)),readonly:"",placeholder:t.t("datePicker.selectDate"),class:"date-picker-input",ref:"inputRef"},null,8,Aa),[[e.vModelText,t.selectedDateText]]),t.selectedDateText?(e.openBlock(),e.createElementBlock("span",{key:0,class:"clear-date-button",onClick:n[2]||(n[2]=(...a)=>t.clearDate&&t.clearDate(...a))},n[12]||(n[12]=[e.createElementVNode("svg",{viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"e-calendar",ref:"calendarRef",style:e.normalizeStyle(t.calendarPosition)},[e.createElementVNode("div",La,[e.createElementVNode("div",Ba,[e.createVNode(e.Transition,{name:"fadeY"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year,class:e.normalizeClass(["e-date-year-select",{active:t.showYear}]),onClick:n[3]||(n[3]=(...a)=>t.openYearList&&t.openYearList(...a))},e.toDisplayString(t.showDate.year),3))]),_:1})]),e.createElementVNode("div",Fa,[e.createVNode(e.Transition,{name:"fadeY"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year+"-"+t.showDate.month,class:e.normalizeClass(["e-date-monthday-select",{active:!t.showYear}]),onClick:n[5]||(n[5]=(...a)=>t.openCalendarList&&t.openCalendarList(...a))},[e.createElementVNode("span",null,e.toDisplayString(t.keepDoubleDigit(t.showDate.month))+"-"+e.toDisplayString(t.keepDoubleDigit(t.selectDate.day)),1),n[13]||(n[13]=e.createTextVNode("  ")),e.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[4]||(n[4]=(...a)=>t.openMonthList&&t.openMonthList(...a))},e.toDisplayString(t.showDate.monthStr),1)],2))]),_:1})])]),e.withDirectives(e.createElementVNode("div",Ha,[e.createElementVNode("div",Ia,[e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[6]||(n[6]=(...a)=>t.prevMonth&&t.prevMonth(...a))},[n[14]||(n[14]=e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[e.createElementVNode("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})],-1)),e.createVNode(e.Transition,{name:"e_calendar_svg_btn"},{default:e.withCtx(()=>[t.prevMonthClick?(e.openBlock(),e.createElementBlock("div",Ra)):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",Ya,[e.createVNode(e.Transition,{name:t.fadeXType},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year+"-"+t.showDate.month,class:"e-calendar-toolbar-title-content"},[e.createElementVNode("strong",null,e.toDisplayString(t.showDate.year),1),n[15]||(n[15]=e.createTextVNode("  ")),e.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[7]||(n[7]=(...a)=>t.openMonthList&&t.openMonthList(...a))},e.toDisplayString(t.showDate.monthStr),1)]))]),_:1},8,["name"])]),e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[8]||(n[8]=(...a)=>t.nextMonth&&t.nextMonth(...a))},[n[16]||(n[16]=e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[e.createElementVNode("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})],-1)),e.createVNode(e.Transition,{name:"e_calendar_svg_btn"},{default:e.withCtx(()=>[t.nextMonthClick?(e.openBlock(),e.createElementBlock("div",za)):e.createCommentVNode("",!0)]),_:1})])]),e.createElementVNode("div",Oa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getWeekNames,(a,l)=>(e.openBlock(),e.createElementBlock("span",{key:l,class:"e-calendar-week-day"},e.toDisplayString(a),1))),128))]),e.createElementVNode("div",xa,[(e.openBlock(),e.createElementBlock("div",{key:t.updateKey,class:"e-calendar-monthday-wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"e-calendar-monthday-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(u,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:e.normalizeClass(["e-calendar-monthday-row-day",{active:u.selected,disabled:u.disabled,pointer:u.value!=="",hover:t.isDayHovered(d,l)}]),onClick:p=>t.selectDay(u),onMouseenter:p=>t.handleDayMouseEnter(d,l),onMouseleave:n[9]||(n[9]=p=>t.handleDayMouseLeave())},[e.createElementVNode("span",{textContent:e.toDisplayString(u.value),class:"e-calendar-monthday-row-day-value"},null,8,Za),e.createVNode(e.Transition,{name:"e_calendar_day"},{default:e.withCtx(()=>[u.selected?(e.openBlock(),e.createElementBlock("span",Ga)):e.createCommentVNode("",!0)]),_:2},1024)],42,Pa))),128))]))),128))]))])],512),[[e.vShow,!t.showYear&&!t.showMonth]]),e.withDirectives(e.createElementVNode("ul",Wa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.yearList,(a,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:a===t.selectDate.year,hover:t.isYearHovered(l)}),onClick:u=>t.selectYear(a),onMouseenter:u=>t.handleYearMouseEnter(l),onMouseleave:n[10]||(n[10]=u=>t.handleYearMouseLeave())},e.toDisplayString(a),43,Ua))),128))],512),[[e.vShow,t.showYear]]),e.withDirectives(e.createElementVNode("ul",ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthList,(a,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:a===t.selectDate.month,hover:t.isMonthHovered(l)}),onClick:u=>t.selectMonth(a),onMouseenter:u=>t.handleMonthMouseEnter(l),onMouseleave:n[11]||(n[11]=u=>t.handleMonthMouseLeave())},e.toDisplayString(t.getMonthName(a)),43,qa))),128))],512),[[e.vShow,t.showMonth]])],4),[[e.vShow,t.showCalendar]])]))])}const Bn=Ve(Va,[["render",Ja],["__scopeId","data-v-097ae780"]]),Ka=e.defineComponent({props:{direction:{type:String,default:"row"},min:{type:Number,required:!0},max:{type:Number,required:!0},paneLengthPercent:{type:Number,required:!0},triggerLength:{type:Number,required:!0}},emits:["update:paneLengthPercent"],setup(t,{emit:n}){let o=e.ref(null),r=e.ref(null),i=e.ref(0),s=e.ref("");const a=e.ref(Ie.getCurrentTheme()),l=e.computed(()=>t.direction==="row"?"width":"height"),u=e.computed(()=>{var j;const V=a.value,k=t.direction==="row",J={metro:{default:k?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:k?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:k?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:k?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:k?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:k?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:k?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:k?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:k?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:k?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:k?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:k?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:k?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:k?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((j=J[V])==null?void 0:j.default)||J.metro.default}),d=e.computed(()=>{var j;const V=a.value,k=t.direction==="row",J={metro:{default:k?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:k?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:k?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:k?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:k?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:k?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:k?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:k?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:k?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:k?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:k?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:k?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:k?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:k?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((j=J[V])==null?void 0:j.move)||J.metro.move}),p=e.computed(()=>`calc(${t.paneLengthPercent}% - ${t.triggerLength/2}px)`),g=e.computed(()=>`${t.triggerLength}px`),C=e.computed(()=>{const V=a.value,k={metro:"brightness(0.4) opacity(0.5)",dark:"brightness(0) invert(1) opacity(0.9)",modern:"grayscale(0.3) brightness(0.6) opacity(0.4)",classic:"contrast(1.2) brightness(0.5) opacity(0.5)",colorful:"hue-rotate(-30deg) saturate(1.5) brightness(0.7) opacity(0.6)",apple:"brightness(0.5) contrast(1.1) opacity(0.45)",liquidGlass:"opacity(0.6)"};return k[V]||k.metro}),G=e.computed(()=>{const V=a.value,k={metro:"brightness(0.3) opacity(0.8)",dark:"brightness(0) invert(1) opacity(1) drop-shadow(0 0 3px cyan)",modern:"grayscale(0) brightness(0.5) hue-rotate(240deg) opacity(0.8)",classic:"contrast(1.5) brightness(0.4) saturate(1.5) opacity(0.9)",colorful:"hue-rotate(-20deg) saturate(2) brightness(0.6) contrast(1.2) opacity(0.95)",apple:"brightness(0.35) contrast(1.3) saturate(1.2) opacity(0.85)",liquidGlass:"opacity(0.9)"};return k[V]||k.metro});e.onMounted(async()=>{await e.nextTick(),s.value=`background: ${u.value}`});const E=async()=>{await e.nextTick(),s.value=`background: ${u.value}`},F=async()=>{await e.nextTick(),s.value=`background: ${d.value}`},m=V=>{document.addEventListener("mousemove",R),document.addEventListener("mouseup",b),t.direction==="row"?i.value=V.pageX-V.target.getBoundingClientRect().left:i.value=V.pageY-V.target.getBoundingClientRect().top},R=async V=>{if(await e.nextTick(),s.value=`background: ${d.value}`,o.value){const k=o.value.getBoundingClientRect();let J=0;t.direction==="row"?J=(V.pageX-k.left-i.value+t.triggerLength/2)/k.width*100:J=(V.pageY-k.top-i.value+t.triggerLength/2)/k.height*100,J<t.min&&(J=t.min),J>t.max&&(J=t.max),n("update:paneLengthPercent",J)}},b=async()=>{await e.nextTick(),s.value=`background: ${u.value}`,document.removeEventListener("mousemove",R)},v=setInterval(()=>{const V=Ie.getCurrentTheme();V!==a.value&&(a.value=V,s.value=`background: ${u.value}`)},100);return e.onUnmounted(()=>{clearInterval(v)}),{splitPane:o,trigger:r,lengthType:l,triggerDefaultColor:u,triggerMoveColor:d,paneLengthValue:p,triggerLengthValue:g,triggerBackGroud:s,iconStyle:C,iconHoverStyle:G,handleMouseLeave:E,handleMouseOver:F,handleMouseDown:m,handleMouseUp:b}}});function Qa(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",{ref:"splitPane",class:e.normalizeClass(["split-pane",t.direction]),style:e.normalizeStyle({flexDirection:t.direction})},[e.createElementVNode("div",{class:"pane pane-one",style:e.normalizeStyle(`${t.lengthType}: ${t.paneLengthValue}`)},[e.renderSlot(t.$slots,"one",{},void 0,!0)],4),t.triggerDefaultColor&&t.triggerMoveColor?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"trigger",class:"pane-trigger",style:e.normalizeStyle(`${t.lengthType}: ${t.triggerLengthValue}; ${t.triggerBackGroud}`)},[e.createElementVNode("div",{onClick:n[0]||(n[0]=(...a)=>t.handleMouseOver&&t.handleMouseOver(...a)),onMouseover:n[1]||(n[1]=(...a)=>t.handleMouseOver&&t.handleMouseOver(...a)),onMouseleave:n[2]||(n[2]=(...a)=>t.handleMouseLeave&&t.handleMouseLeave(...a)),onMousedown:n[3]||(n[3]=(...a)=>t.handleMouseDown&&t.handleMouseDown(...a)),class:"icon",style:e.normalizeStyle(`${t.lengthType}: ${t.triggerLengthValue}; filter: ${t.iconStyle}`)},null,36)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"pane pane-two",style:e.normalizeStyle(`${t.lengthType}: calc(${100-t.paneLengthPercent}% - ${t.triggerLength/2}px)`)},[e.renderSlot(t.$slots,"two",{},void 0,!0)],4)],6)}const Xa=Ve(Ka,[["render",Qa],["__scopeId","data-v-374e7312"]]),eo=e.defineComponent({props:{headers:{type:Array,required:!0}},setup(t){const{t:n}=tt(),o=e.ref(!1),r=e.ref(-1),i=e.ref(0),s=e.ref(0),a=e.ref(null),l=C=>{const E={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[C.property];return E?E.includes(".")?n(E):E:C.title},u=(C,G)=>{C.preventDefault(),C.stopPropagation(),o.value=!0,r.value=G,i.value=C.clientX,s.value=t.headers[G].width;const E=C.target;a.value=E.closest(".headerCaption"),document.addEventListener("mousemove",p,{passive:!1}),document.addEventListener("mouseup",g),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};let d=null;const p=C=>{!o.value||r.value<0||(C.preventDefault(),d!==null&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{const G=C.clientX-i.value,E=Math.max(50,s.value+G);a.value&&(a.value.style.width=`${E}px`),document.querySelectorAll(`.cellNo[columnindex="${r.value}"], .cell[columnindex="${r.value}"]`).forEach(m=>{m.style.minWidth=`${E}px`,m.style.maxWidth=`${E}px`}),d=null}))},g=()=>{if(o.value){if(d!==null&&(cancelAnimationFrame(d),d=null),a.value&&r.value>=0){const C=parseInt(a.value.style.width);t.headers[r.value].width=C}o.value=!1,r.value=-1,a.value=null,document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",g),document.body.style.cursor="",document.body.style.userSelect=""}};return{getHeaderTitle:l,startResize:u}}}),to={class:"header"},no=["property","columnindex"],ao=["onMousedown"];function oo(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",to,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:l,property:a.property,columnindex:l,class:"headerCaption",style:e.normalizeStyle({width:`${a.width}px`})},[e.createElementVNode("span",null,e.toDisplayString(t.getHeaderTitle(a)),1),l<t.headers.length-1&&a.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resize-handle",onMousedown:u=>t.startResize(u,l)},null,40,ao)):e.createCommentVNode("",!0)],12,no)),[[e.vShow,a.show]])),128))])}const ro=Ve(eo,[["render",oo],["__scopeId","data-v-bd5028b9"]]),io={monthHeaders:[],weekHeaders:[],dayHeaders:[],hourHeaders:[],tasks:[],taskHeaders:[],mapFields:{},scale:90,timelineCellCount:0,startGanttDate:null,endGanttDate:null,scrollFlag:!0,mode:null,expandRow:{pid:0,expand:!0},collapsedTasks:new Set,rootTask:{},subTask:{},editTask:{},removeTask:{},allowChangeTaskDate:{},barDate:{id:"",startDate:"",endDate:""}};let T=e.reactive(io),ce={setMonthHeaders(t){T.monthHeaders=t},setDayHeaders(t){T.dayHeaders=t},setTasks(t){T.tasks=t},setTaskHeaders(t){T.taskHeaders=t},setWeekHeaders(t){T.weekHeaders=t},setHourHeaders(t){T.hourHeaders=t},setScale(t){T.scale=t},setMapFields(t){T.mapFields=t},setTimelineCellCount(t){T.timelineCellCount=t},setStartGanttDate(t){T.startGanttDate=t},setEndGanttDate(t){T.endGanttDate=t},setScrollFlag(t){T.scrollFlag=t},setMode(t){T.mode=t},setExpandRow(t){T.expandRow=t},toggleTaskCollapse(t){T.collapsedTasks.has(t)?T.collapsedTasks.delete(t):T.collapsedTasks.add(t),T.collapsedTasks=new Set(T.collapsedTasks)},setRootTask(t){T.rootTask=t},setSubTask(t){T.subTask=t},setEditTask(t){T.editTask=t},setRemoveTask(t){T.removeTask=t},setBarDate(t){T.barDate=t},setAllowChangeTaskDate(t){T.allowChangeTaskDate=t}};const Ye=e.reactive({shouldScrollToToday:!1,triggerScrollToToday(){this.shouldScrollToToday=!0},shouldScroll:!1,triggerScroll(){this.shouldScroll=!0},highlightedId:null,triggerHighlight(t){this.highlightedId=t}}),Fn=e.ref(0),Hn=e.ref(!1),so=t=>{Fn.value=t},lo=t=>{Hn.value=t},In=()=>({scrollTop:Fn,scrollFlag:Hn,setScrollTop:so,setScrollFlag:lo}),co=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})}},setup(t){const n=e.ref(!0),o=e.ref(!1),r="添加子任务",i="删除当前任务",s=e.computed(()=>T.mapFields),a=e.computed(()=>T.subTask),l=e.computed(()=>T.collapsedTasks);e.inject("barHover");const u=e.inject("addRootTask"),d=e.computed(()=>{const k=t.row[s.value.id];return T.tasks.some(J=>J[s.value.parentId]===k)}),p=e.computed(()=>{const k=t.row[s.value.id];return l.value.has(k)}),g=e.computed(()=>{const k=t.row[s.value.parentId];if(!k||k==="0")return!1;const J=T.tasks.filter(Q=>Q[s.value.parentId]===k);if(J.length===0)return!1;const j=t.row[s.value.id];return J[J.length-1][s.value.id]===j}),C=e.computed(()=>{const k=[],J=t.row.treeLevel||0;if(J<=1)return k;const j=J-1,U=[];let Q=t.row;for(;Q;){U.unshift(Q);const A=Q[s.value.parentId];if(!A||A==="0")break;const Y=T.tasks.find(H=>H[s.value.id]===A);if(!Y)break;Q=Y}for(let A=U.length-2;A>=0;A--){const Y=U[A],H=Y[s.value.id],X=Y[s.value.parentId],Te=T.tasks.filter(h=>h[s.value.parentId]===X);if(Te.length>0){if(Te[Te.length-1][s.value.id]===H)break;{const y=Y.treeLevel;y&&y>=1&&y!==j&&k.push(y)}}}return k}),G=()=>{const k=t.row[s.value.id];ce.toggleTaskCollapse(k)};e.onMounted(()=>{});const E=ce.setSubTask,F=ce.setEditTask,m=ce.setRemoveTask,R=(k,J)=>s.value[J]?k[s.value[J]]:k[J]?k[J]:null;return e.watch(()=>Ye.highlightedId,k=>{t.row[s.value.id]===k?o.value=!0:o.value=!1}),{showRow:n,hover:o,addTips:r,removeTips:i,mapFields:s,subTask:a,hasChildren:d,isCollapsed:p,isLastChild:g,getAncestorLines:C,toggleCollapse:G,setSubTask:E,setEditTask:F,setRemoveTask:m,checkField:R,hoverActive:()=>{Ye.triggerHighlight(t.row[s.value.id])},hoverInactive:()=>{Ye.triggerHighlight(null)},addRootTask:()=>{u&&u(t.row)}}}}),uo=["columnindex"],fo={class:"no-cell-content"},mo={class:"tree-lines"},ho=["title"],po={key:1,class:"collapse-placeholder"},go={class:"no-text"},yo={class:"action-buttons"},ko=["columnindex"];function bo(t,n,o,r,i,s){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,onMouseover:n[4]||(n[4]=a=>t.hoverActive()),onMouseleave:n[5]||(n[5]=a=>t.hoverInactive()),class:e.normalizeClass({active:t.hover})},[e.createElementVNode("div",{class:"row",onDblclick:n[3]||(n[3]=a=>t.setEditTask(t.row)),style:e.normalizeStyle({height:t.rowHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.property==="no"?(e.openBlock(),e.createElementBlock("div",{class:"cellNo",key:l,columnindex:l,style:e.normalizeStyle({minWidth:a.width+"px",maxWidth:a.width+"px",height:t.rowHeight+"px"})},[e.createElementVNode("div",fo,[e.createElementVNode("div",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getAncestorLines,u=>(e.openBlock(),e.createElementBlock("div",{key:"ancestor-"+u,class:"tree-line-vertical ancestor",style:e.normalizeStyle({left:u*16+8+"px"})},null,4))),128)),t.row.treeLevel===1&&t.hasChildren&&!t.isCollapsed?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:e.normalizeStyle({left:t.row.treeLevel*16+8+"px"})},null,4)):e.createCommentVNode("",!0),t.row.treeLevel&&t.row.treeLevel>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(["tree-line-vertical current",{"is-last-child":t.isLastChild}]),style:e.normalizeStyle({left:(t.row.treeLevel-1)*16+8+"px"})},null,6),e.createElementVNode("div",{class:"tree-line-horizontal",style:e.normalizeStyle({left:(t.row.treeLevel-1)*16+8+"px",width:"32px"})},null,4),t.hasChildren&&!t.isCollapsed?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:e.normalizeStyle({left:t.row.treeLevel*16+8+"px"})},null,4)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"no-left-section",style:e.normalizeStyle({paddingLeft:(t.row.treeLevel||0)*16+"px"})},[t.hasChildren?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=e.withModifiers((...u)=>t.toggleCollapse&&t.toggleCollapse(...u),["stop"])),class:e.normalizeClass(["collapse-btn",{collapsed:t.isCollapsed}]),title:t.isCollapsed?"展开":"折叠"},n[6]||(n[6]=[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},[e.createElementVNode("path",{class:"arrow",d:"M5 4 L14 9 L5 14 Z",fill:"currentColor"})],-1)]),10,ho)):(e.openBlock(),e.createElementBlock("span",po)),e.createElementVNode("span",go,e.toDisplayString(t.row.no),1)],4),e.createElementVNode("div",yo,[e.createElementVNode("button",{onClick:n[1]||(n[1]=e.withModifiers(u=>t.setSubTask(t.row),["stop"])),class:"action-btn add-btn",title:"添加子任务"},n[7]||(n[7]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[e.createElementVNode("path",{d:"M8 2a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 2z"})],-1)])),e.createElementVNode("button",{onClick:n[2]||(n[2]=e.withModifiers(u=>t.setRemoveTask(t.row),["stop"])),class:"action-btn delete-btn",title:"删除任务"},n[8]||(n[8]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5.5 5.5A.5.5 0 016 6v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm2.5 0a.5.5 0 01.5.5v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm3 .5a.5.5 0 00-1 0v6a.5.5 0 001 0V6z"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 01-1 1H13v9a2 2 0 01-2 2H5a2 2 0 01-2-2V4h-.5a1 1 0 01-1-1V2a1 1 0 011-1H6a1 1 0 011-1h2a1 1 0 011 1h3.5a1 1 0 011 1v1zM4.118 4L4 4.059V13a1 1 0 001 1h6a1 1 0 001-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"})],-1)]))])])],12,uo)):e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"cell",key:l+"-header",columnindex:l,style:e.normalizeStyle({minWidth:a.width+"px",maxWidth:a.width+"px",height:t.rowHeight+"px"})},e.toDisplayString(t.checkField(t.row,a.property)),13,ko)),[[e.vShow,a.show]])],64))),256))],36)],34)):e.createCommentVNode("",!0)}const wo=Ve(co,[["render",bo],["__scopeId","data-v-4f2728a4"]]),Co=e.defineComponent({props:{headers:Array,rowHeight:Number,tasks:Array},components:{TaskRow:wo},setup(t){const n=e.ref([]),o=e.computed(()=>T.mapFields),r=e.computed(()=>T.collapsedTasks),i=d=>{const p=new Set,g=t.tasks||T.tasks,C=G=>{g.filter(F=>F[o.value.parentId]===G).forEach(F=>{const m=F[o.value.id];p.add(m),C(m)})};return C(d),p},s=e.computed(()=>new Set(n.value.map(d=>d[o.value.id]))),a=e.computed(()=>{const d=s.value,p=T.tasks.filter(C=>!d.has(C[o.value.id])),g=new Set;return r.value.forEach(C=>{i(C).forEach(E=>g.add(E))}),p.filter(C=>!g.has(C[o.value.id]))}),l=e.computed({get:()=>T.expandRow,set:d=>{ce.setExpandRow(d)}});e.watch(l,d=>{n.value=[],u(d.pid)});const u=d=>{let p=t.tasks?t.tasks.filter(g=>g[o.value.parentId]===d):[];if(p&&p.length>0)for(let g=0;g<p.length;g++)l.value.expand===!1&&n.value.push(p[g]),u(p[g][o.value.id])};return{filterTask:a,expandRow:l,recursionRow:u,mapFields:o}}});function To(t,n,o,r,i,s){const a=e.resolveComponent("TaskRow");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filterTask,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id+"_taskrow"},[t.headers?(e.openBlock(),e.createBlock(a,{key:0,headers:t.headers,rowHeight:t.rowHeight,row:l},null,8,["headers","rowHeight","row"])):e.createCommentVNode("",!0)],64))),128))])}const So=Ve(Co,[["render",To]]),vo=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0}},components:{TaskRecursionRow:So},setup(t){const n=e.computed(()=>T.tasks),{scrollTop:o,scrollFlag:r,setScrollTop:i,setScrollFlag:s}=In(),a=e.ref(null),l=e.computed(()=>T.mapFields),u=e.computed(()=>n.value.length*t.rowHeight),d=()=>n.value.filter(F=>F[l.value.parentId]==="0");e.watch(o,F=>{!r.value&&a.value&&(a.value.scrollTop=F)});let p=null;const g=()=>{p&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{a.value&&(s(!0),i(a.value.scrollTop)),p=null})},C=()=>{},G=()=>{if(a.value){const F=document.querySelector(".table .content");F&&(F.scrollWidth>F.clientWidth?a.value.style.paddingBottom="20px":a.value.style.paddingBottom="0px")}};e.watch(n,()=>{setTimeout(G,50)});const E=()=>{setTimeout(G,50)};return e.onMounted(()=>{a.value&&(a.value.scrollTop=o.value,setTimeout(G,100),window.addEventListener("resize",E))}),e.onUnmounted(()=>{window.removeEventListener("resize",E)}),{tasks:n,taskContent:a,scrollFlag:r,mapFields:l,setScrollFlag:s,getRootNode:d,scroll:g,mouseover:C,contentHeight:u}}});function Do(t,n,o,r,i,s){const a=e.resolveComponent("TaskRecursionRow");return e.openBlock(),e.createElementBlock("div",{ref:"taskContent",class:"content",onScroll:n[0]||(n[0]=l=>t.scroll()),onMouseover:n[1]||(n[1]=l=>t.mouseover())},[e.createElementVNode("div",{class:"content-inner",style:e.normalizeStyle({minHeight:t.contentHeight+"px"})},[e.createVNode(a,{headers:t.headers,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["headers","rowHeight","tasks"])],4)],544)}const Eo=Ve(vo,[["render",Do],["__scopeId","data-v-f24b681d"]]);var Xt={exports:{}},Mo=Xt.exports,Rn;function $o(){return Rn||(Rn=1,function(t,n){(function(o,r){t.exports=r()})(Mo,function(){return function(o,r,i){r.prototype.isBetween=function(s,a,l,u){var d=i(s),p=i(a),g=(u=u||"()")[0]==="(",C=u[1]===")";return(g?this.isAfter(d,l):!this.isBefore(d,l))&&(C?this.isBefore(p,l):!this.isAfter(p,l))||(g?this.isBefore(d,l):!this.isAfter(d,l))&&(C?this.isAfter(p,l):!this.isBefore(p,l))}}})}(Xt)),Xt.exports}var No=$o();const Vo=fn(No);w.extend(Vo);const _o=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:0}},components:{TaskHeader:ro,TaskContent:Eo},setup(){const t=e.computed(()=>T.tasks),n=e.computed(()=>T.taskHeaders),o=e.computed({get:()=>T.rootTask,set:l=>{ce.setRootTask(l)}}),r=e.computed(()=>T.startGanttDate),i=e.computed(()=>T.endGanttDate),s=ce.setRootTask;return{tasks:t,taskHeaders:n,rootTask:o,startGanttDate:r,endGanttDate:i,setRootTask:s,scrollToToday:()=>{w().isBetween(r.value,i.value)&&Ye.triggerScrollToToday()}}}}),Ao={class:"table"};function Lo(t,n,o,r,i,s){const a=e.resolveComponent("TaskHeader"),l=e.resolveComponent("TaskContent");return e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`})},[(e.openBlock(),e.createElementBlock("svg",{ref:"addTaskSvg",t:"1647915776075",onClick:n[0]||(n[0]=u=>t.setRootTask({})),class:"addRootTask",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3147",width:"28",height:"28"},n[2]||(n[2]=[e.createElementVNode("path",{d:"M864 0H160C70.4 0 0 70.4 0 160v704c0 89.6 70.4 160 160 160h704c89.6 0 160-70.4 160-160V160c0-89.6-70.4-160-160-160z m96 864c0 54.4-41.6 96-96 96H160c-54.4 0-96-41.6-96-96V160c0-54.4 41.6-96 96-96h704c54.4 0 96 41.6 96 96v704z",fill:"currentColor","p-id":"3148"},null,-1),e.createElementVNode("path",{d:"M768 480h-224V256c0-19.2-12.8-32-32-32s-32 12.8-32 32v224H256c-19.2 0-32 12.8-32 32s12.8 32 32 32h224v224c0 19.2 12.8 32 32 32s32-12.8 32-32v-224h224c19.2 0 32-12.8 32-32s-12.8-32-32-32z","p-id":"3149",fill:"currentColor"},null,-1)]),512)),(e.openBlock(),e.createElementBlock("svg",{ref:"jumpTodaySvg",onClick:n[1]||(n[1]=u=>t.scrollToToday()),class:"jumpToToday",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[3]||(n[3]=[e.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16.5 11.5l2 2-2 2",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M18.5 13.5h-4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]),512)),e.createVNode(a,{headers:t.taskHeaders},null,8,["headers"])],4),e.createElementVNode("div",{style:e.normalizeStyle({height:`calc(100% - ${t.headersHeight}px)`})},[Array.isArray(t.tasks)&&t.tasks.length>0?(e.openBlock(),e.createBlock(l,{key:0,headers:t.taskHeaders,rowHeight:t.rowHeight},null,8,["headers","rowHeight"])):e.createCommentVNode("",!0)],4)])}const Bo=Ve(_o,[["render",Lo],["__scopeId","data-v-7efd20f0"]]),Fo=e.defineComponent({props:{weekHeaders:{type:Array,default:()=>[]},dayHeaders:{type:Array,default:()=>[]},monthHeaders:{type:Array,default:()=>[]},hourHeaders:{type:Array,default:()=>[]}},setup(t){const{weekHeaders:n,dayHeaders:o,monthHeaders:r,hourHeaders:i}=e.toRefs(t),{locale:s}=tt();return{weekHeaders:n,dayHeaders:o,monthHeaders:r,hourHeaders:i,isToday:l=>{const d={"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"}[s.value]||"en";return l===w().locale(d).format("YYYY-MM-DD")}}}}),Ho={class:"headerContainer"},Io={key:0,class:"header"},Ro={key:1,class:"header"},Yo={key:2,class:"header"},zo={key:0,class:"today",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},Oo={key:3,class:"header"};function xo(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",Ho,[t.monthHeaders&&t.monthHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle([{"border-bottom":"0px"},{width:a.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0),t.weekHeaders&&t.weekHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Ro,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.weekHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle([{"border-top":"1px"},{width:a.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0),t.dayHeaders&&t.dayHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dayHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle({width:a.width+"px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5),t.isToday(a.fulldate)?(e.openBlock(),e.createElementBlock("svg",zo,n[0]||(n[0]=[e.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M8 11l4 4 4-4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):e.createCommentVNode("",!0)],4))),128))])):e.createCommentVNode("",!0),t.hourHeaders&&t.hourHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.hourHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle({width:a.width+"px",marginTop:"-2px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0)])}const Po=Ve(Fo,[["render",xo],["__scopeId","data-v-da19c883"]]);var en={exports:{}},Zo=en.exports,Yn;function Go(){return Yn||(Yn=1,function(t,n){(function(o,r){t.exports=r()})(Zo,function(){var o="day";return function(r,i,s){var a=function(d){return d.add(4-d.isoWeekday(),o)},l=i.prototype;l.isoWeekYear=function(){return a(this).year()},l.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),o);var p,g,C,G,E=a(this),F=(p=this.isoWeekYear(),g=this.$u,C=(g?s.utc:s)().year(p).startOf("year"),G=4-C.isoWeekday(),C.isoWeekday()>4&&(G+=7),C.add(G,o));return E.diff(F,"week")+1},l.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var u=l.startOf;l.startOf=function(d,p){var g=this.$utils(),C=!!g.u(p)||p;return g.p(d)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(d,p)}}})}(en)),en.exports}var Wo=Go();const zn=fn(Wo);w.extend(zn);const Uo=e.defineComponent({name:"Bar",emits:["progress-update"],props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(t,{emit:n}){const o=e.ref(null),r=e.ref(t.rowHeight*.7),i=e.ref(null),s=e.ref(0),a=e.ref(0),l=e.ref(!0),u=e.ref(!1),d=e.ref(""),p=e.ref(!1),g=e.ref(0),C=e.ref(!1),G=e.computed(()=>T.timelineCellCount),E=e.computed(()=>T.scale),F=e.computed(()=>T.mode),m=e.computed(()=>T.mapFields),R=e.computed(()=>{const A=Number(t.row[m.value.progress]);return isNaN(A)?"0.00%":(A*100).toFixed(2)+"%"}),b=e.inject(mt.SetBarColorSymbol),v=A=>{const Y={taskId:t.row[m.value.id],oldProgress:Number(t.row[m.value.progress])||0,newProgress:A,task:t.row};n("progress-update",Y),window.dispatchEvent(new CustomEvent("taskProgressUpdate",{detail:Y})),console.log("Task progress updated:",Y)};e.watch(()=>Ye.highlightedId,A=>{u.value=t.row[m.value.id]===A});const V=()=>Ye.triggerHighlight(t.row[m.value.id]),k=()=>Ye.triggerHighlight(null),J=A=>{g.value;let Y="#ffffff",H="#f8f8f8";if(o.value){let X=o.value.parentElement;for(;X;){if(X.hasAttribute("data-gantt-theme")){Y=getComputedStyle(X).getPropertyValue("--bg-content").trim()||"#ffffff",H=getComputedStyle(X).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}X=X.parentElement}}switch(F.value){case"月":case"日":{let X=w(t.startGanttDate).add(A,"days");return X.isoWeekday()===7||X.isoWeekday()===1?H:Y}case"周":case"时":return Y}},j=ce.setBarDate,U=ce.setAllowChangeTaskDate,Q=A=>{let Y=0;switch(F.value){case"月":case"日":{let $=w(t.row[m.value.startdate]).diff(w(t.startGanttDate),"days");Y=E.value*$;let _=w(t.row[m.value.enddate]).diff(w(t.row[m.value.startdate]),"days")+1;a.value=_*E.value,t.row[m.value.takestime]=_+"天";break}case"周":{const $=w(t.startGanttDate).startOf("isoWeek"),_=w(t.row[m.value.startdate]).startOf("isoWeek");let oe=_.diff($,"week");Y=E.value*oe;let ne=w(t.row[m.value.enddate]).startOf("isoWeek").diff(_,"week")+1;a.value=ne*E.value,t.row[m.value.takestime]=ne+"周";break}case"时":{let $=w(t.row[m.value.startdate]).diff(w(t.startGanttDate),"hours");Y=E.value*$;let _=w(t.row[m.value.enddate]).diff(w(t.row[m.value.startdate]),"hours")+1;a.value=_*E.value,t.row[m.value.takestime]=_+"小时";break}}s.value=Y;let H=un(A);const X=getComputedStyle(A).getPropertyValue("--border")||"#cecece";A.setAttribute("data-x",Y.toString()),A.setAttribute("width",a.value.toString()),A.setAttribute("stroke",X),A.setAttribute("stroke-width","1px"),A.style.transform=`translate(${Y}px, 0px)`;let Te=H.select("pattern").first(),h=H.children().filter($=>$.type==="g")[0]||H.group(),c=H.select(".innerRect").first(),y=H.select("rect:not(.innerRect):not(.progressHandle)").first(),f=H.select("text").first(),D=H.select(".progressHandle").first();Te||(Te=H.pattern(10,10,$=>{$.path("M10 -5 -10,15M15,0,0,15M0 -5 -20,15").fill("none").stroke({color:"gray",opacity:.4,width:5})})),h||(h=H.group());let L=t.row[m.value.progress]?Number(a.value)*Number(t.row[m.value.progress]):Number(a.value);c?(c.fill({color:d.value,opacity:.4}),c.width(L)):(c=H.rect(L,r.value).radius(10),c.addClass("innerRect"),h.add(c)),y?y.width(a.value):(y=H.rect(a.value,r.value).radius(10).fill(Te).stroke({color:X,width:1}),y.on("mouseover",()=>y.animate(200).attr({stroke:"#000",strokeWidth:2,opacity:1})),y.on("mouseleave",()=>y.animate(200).attr({stroke:"#0066ff",strokeWidth:10,opacity:.4}))),f?f.text(R.value):f=H.text(R.value).stroke("#faf7ec");const M=f.bbox();f.font({size:15,anchor:"middle",leading:"1em"}).fill("#000").attr("opacity",1).attr("dominant-baseline","middle").center(c.width()/2+M.width/2,c.height()/2);const B=12,x=8,P=L-B/2,W=r.value-x/2,te=L,le=()=>{let $="#f59e0b",_="#d97706",oe="#fbbf24",q=A.parentElement;for(;q;){if(q.hasAttribute("data-gantt-theme")){$=getComputedStyle(q).getPropertyValue("--primary").trim()||$,_=getComputedStyle(q).getPropertyValue("--primary-dark").trim()||_,oe=getComputedStyle(q).getPropertyValue("--primary-light").trim()||oe;break}q=q.parentElement}return{primary:$,primaryDark:_,primaryLight:oe}};let re=A.querySelector(".progressGuideLine");const De=le();if(!re){const $=document.createElementNS("http://www.w3.org/2000/svg","line");$.setAttribute("class","progressGuideLine"),$.setAttribute("x1",String(te)),$.setAttribute("y1","0"),$.setAttribute("x2",String(te)),$.setAttribute("y2",String(W)),$.setAttribute("stroke",De.primaryDark),$.setAttribute("stroke-width","2"),$.setAttribute("stroke-dasharray","4,3"),$.setAttribute("opacity","0.8"),A.appendChild($),re=$}if(re.setAttribute("x1",String(te)),re.setAttribute("x2",String(te)),re.setAttribute("y2",String(W)),re.setAttribute("stroke",De.primaryDark),re.setAttribute("opacity","0.8"),D){D.move(P,W);const $=D.node;$.setAttribute("fill",De.primary),$.setAttribute("stroke",De.primaryDark)}else{const $=`${B/2},0 0,${x} ${B},${x}`;D=H.polygon($).fill(De.primary).stroke({color:De.primaryDark,width:1}).addClass("progressHandle");const _=D.node;_.style.cursor="ew-resize",_.style.pointerEvents="auto",D.move(P,W);let oe=P;_.addEventListener("mouseenter",()=>{if(!C.value){const q=le();_.setAttribute("fill",q.primaryLight),_.setAttribute("stroke",q.primary),_.setAttribute("stroke-width","2"),re.setAttribute("stroke",q.primaryLight),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","1")}}),_.addEventListener("mouseleave",()=>{if(!C.value){const q=le();_.setAttribute("fill",q.primary),_.setAttribute("stroke",q.primaryDark),_.setAttribute("stroke-width","1"),re.setAttribute("stroke",q.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","0.8")}}),ze(_).draggable({inertia:!1,listeners:{start:()=>{C.value=!0;const q=le();_.setAttribute("fill",q.primaryDark),_.setAttribute("stroke",q.primaryDark),_.setAttribute("stroke-width","2"),re.setAttribute("stroke",q.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","1")},move:q=>{oe+=q.dx,oe=Math.max(-12/2,Math.min(oe,a.value-B/2)),D.move(oe,W);const ne=oe+B/2;re.setAttribute("x1",String(ne)),re.setAttribute("x2",String(ne));const ge=Math.min(1,Math.max(0,(oe+B/2)/a.value));c.width(ge*a.value),f.text((ge*100).toFixed(2)+"%"),f.center(c.width()/2+M.width/2,c.height()/2)},end:()=>{C.value=!1;const q=le();_.setAttribute("fill",q.primary),_.setAttribute("stroke",q.primaryDark),_.setAttribute("stroke-width","1"),re.setAttribute("stroke",q.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","0.8");const ne=Math.min(1,Math.max(0,(oe+B/2)/a.value));t.row[m.value.progress]=ne,v(ne)}}})}j({id:t.row[m.value.id],startDate:t.row[m.value.startdate],endDate:t.row[m.value.enddate]}),ze(A).draggable({inertia:!1,modifiers:[ze.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:$=>{C.value||(s.value=Number($.target.getAttribute("data-x")),a.value=$.target.width.baseVal.value)},move:$=>{if(C.value)return;let _=((parseFloat($.target.getAttribute("data-x")||"0")||0)+$.dx).toString();Object.assign($.target.style,{width:`${$.rect.width}px`,height:`${$.rect.height}px`,transform:`translate(${_}px, 0px)`}),$.target.setAttribute("data-x",_),$.target.setAttribute("data-y","0")},end:$=>{if(C.value)return;let _=$.target,oe=parseFloat(_.getAttribute("data-x")||"0")||0,ne=Math.round(oe/E.value)*E.value;ne<0&&(ne=0),ne>G.value*E.value&&(ne=G.value*E.value);const ge=m.value.parentId||"pid",Me=t.row[ge];if(Me&&Me!=="0"){const ae=T.tasks.find(be=>String(be[m.value.id])===String(Me));if(ae){let be=0;if(F.value==="月"||F.value==="日")be=w(ae[m.value.startdate]).diff(w(t.startGanttDate),"days")*E.value;else if(F.value==="周"){const he=w(t.startGanttDate).startOf("isoWeek");be=w(ae[m.value.startdate]).startOf("isoWeek").diff(he,"week")*E.value}else F.value==="时"&&(be=w(ae[m.value.startdate]).diff(w(t.startGanttDate),"hours")*E.value);ne<be&&(ne=be)}}_.style.transform=`translate(${ne}px, 0px)`,_.setAttribute("data-x",ne.toString());const Se=Math.round((ne-s.value)/E.value);let S=0,ee=0;if(F.value==="月"||F.value==="日"?S=Se:F.value==="周"?S=Se*7:F.value==="时"&&(ee=Se),F.value==="时")t.row[m.value.startdate]=w(t.row[m.value.startdate]).add(ee,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=w(t.row[m.value.enddate]).add(ee,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.takestime]=w(t.row[m.value.enddate]).diff(w(t.row[m.value.startdate]),"hours")+1+"小时";else if(t.row[m.value.startdate]=w(t.row[m.value.startdate]).add(S,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=w(t.row[m.value.enddate]).add(S,"days").format("YYYY-MM-DD HH:mm:ss"),F.value==="月"||F.value==="日")t.row[m.value.takestime]=w(t.row[m.value.enddate]).diff(w(t.row[m.value.startdate]),"days")+1+"天";else if(F.value==="周"){const ae=w(t.row[m.value.startdate]).startOf("isoWeek"),be=w(t.row[m.value.enddate]).startOf("isoWeek");t.row[m.value.takestime]=be.diff(ae,"week")+1+"周"}const fe=w(t.row[m.value.startdate]),ve=t.row[m.value.id],Z=(ae,be)=>{const he=[];for(const Ce of be)String(Ce[ge])===String(ae)&&(he.push(Ce),he.push(...Z(Ce[m.value.id],be)));return he},we=Z(ve,T.tasks);if((F.value==="时"?ee:S)>0)for(const ae of we)w(ae[m.value.startdate]).isBefore(fe)&&(F.value==="时"?(ae[m.value.startdate]=w(ae[m.value.startdate]).add(ee,"hours").format("YYYY-MM-DD HH:mm:ss"),ae[m.value.enddate]=w(ae[m.value.enddate]).add(ee,"hours").format("YYYY-MM-DD HH:mm:ss")):(ae[m.value.startdate]=w(ae[m.value.startdate]).add(S,"days").format("YYYY-MM-DD HH:mm:ss"),ae[m.value.enddate]=w(ae[m.value.enddate]).add(S,"days").format("YYYY-MM-DD HH:mm:ss")),j({id:ae[m.value.id],startDate:ae[m.value.startdate],endDate:ae[m.value.enddate]}));j({id:t.row[m.value.id],startDate:t.row[m.value.startdate],endDate:t.row[m.value.enddate]})}}}),ze(A).resizable({edges:{left:!0,right:!0,bottom:!1,top:!1},listeners:{start:$=>{s.value=Number($.target.getAttribute("data-x")),a.value=Number($.target.getAttribute("width"))},end:$=>{U(t.row);let _=$.target,oe=$.rect.width,q=Math.round(oe/E.value);q<1&&(q=1),oe=q*E.value;let ne=s.value;if($.edges&&$.edges.left){ne=s.value+(a.value-oe),ne=Math.round(ne/E.value)*E.value,ne<0&&(ne=0);const Z=m.value.parentId||"pid",we=t.row[Z];if(we&&we!=="0"){const Ee=T.tasks.find(ae=>String(ae[m.value.id])===String(we));if(Ee){let ae=0;if(F.value==="月"||F.value==="日")ae=w(Ee[m.value.startdate]).diff(w(t.startGanttDate),"days")*E.value;else if(F.value==="周"){const be=w(t.startGanttDate).startOf("isoWeek");ae=w(Ee[m.value.startdate]).startOf("isoWeek").diff(be,"week")*E.value}else F.value==="时"&&(ae=w(Ee[m.value.startdate]).diff(w(t.startGanttDate),"hours")*E.value);ne<ae&&(ne=ae,oe=s.value+a.value-ne,q=Math.round(oe/E.value),q<1&&(q=1),oe=q*E.value)}}}_.setAttribute("width",oe.toString()),_.style.width=oe+"px",_.style.transform=`translate(${ne}px, 0px)`,_.setAttribute("data-x",ne.toString());const ge=Math.round(ne/E.value),Me=ge+q-1;let Se,S;if(F.value==="月"||F.value==="日")Se=w(t.startGanttDate).add(ge,"days").format("YYYY-MM-DD HH:mm:ss"),S=w(t.startGanttDate).add(Me,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.takestime]=q+"天";else if(F.value==="周"){const Z=w(t.startGanttDate).startOf("isoWeek");Se=Z.add(ge,"weeks").format("YYYY-MM-DD HH:mm:ss"),S=Z.add(Me,"weeks").endOf("isoWeek").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.takestime]=q+"周"}else Se=w(t.startGanttDate).add(ge,"hours").format("YYYY-MM-DD HH:mm:ss"),S=w(t.startGanttDate).add(Me,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.takestime]=q+"小时";t.row[m.value.startdate]=Se,t.row[m.value.enddate]=S;let ee=un(A),fe=ee.select(".innerRect").first(),ve=ee.select("rect:not(.innerRect):not(.progressHandle)").first();if(fe){let Z=t.row[m.value.progress]?oe*Number(t.row[m.value.progress]):oe;fe.width(Z)}if(ve&&ve.width(oe),$.edges&&$.edges.left){const Z=w(Se),we=t.row[m.value.id],Ee=m.value.parentId||"pid",ae=(he,Ce)=>{const Ze=[];for(const Xe of Ce)String(Xe[Ee])===String(he)&&(Ze.push(Xe),Ze.push(...ae(Xe[m.value.id],Ce)));return Ze},be=ae(we,T.tasks);for(const he of be)if(w(he[m.value.startdate]).isBefore(Z)){const Ce=Z.diff(w(he[m.value.startdate]),F.value==="时"?"hours":"days");F.value==="时"?(he[m.value.startdate]=w(he[m.value.startdate]).add(Ce,"hours").format("YYYY-MM-DD HH:mm:ss"),he[m.value.enddate]=w(he[m.value.enddate]).add(Ce,"hours").format("YYYY-MM-DD HH:mm:ss")):(he[m.value.startdate]=w(he[m.value.startdate]).add(Ce,"days").format("YYYY-MM-DD HH:mm:ss"),he[m.value.enddate]=w(he[m.value.enddate]).add(Ce,"days").format("YYYY-MM-DD HH:mm:ss")),j({id:he[m.value.id],startDate:he[m.value.startdate],endDate:he[m.value.enddate]})}}j({id:t.row[m.value.id],startDate:Se,endDate:S})}},modifiers:[ze.modifiers.restrictEdges({outer:"parent"}),ze.modifiers.restrictSize({min:{width:E.value,height:r.value}})],inertia:!1,hold:1})};return e.watch(()=>[t.row[m.value.startdate],t.row[m.value.enddate]],()=>{o.value&&p.value&&Q(o.value)},{deep:!1}),e.onMounted(()=>{if(o.value&&!p.value&&(Q(o.value),p.value=!0),b&&(d.value=b(t.row),o.value&&Q(o.value)),o.value){let A=o.value.parentElement;for(;A&&!A.hasAttribute("data-gantt-theme");)A=A.parentElement;if(A){const Y=new MutationObserver(()=>{g.value++});Y.observe(A,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>Y.disconnect())}}}),e.onDeactivated(()=>{if(o.value)try{ze(o.value).unset()}catch{}l.value=!1}),e.onBeforeUnmount(()=>{if(o.value)try{ze(o.value).unset()}catch{}l.value=!1}),{bar:o,barHeight:r,direction:i,oldBarDataX:s,oldBarWidth:a,showRow:l,hover:u,barColor:d,timelineCellCount:G,scale:E,mode:F,mapFields:m,hoverActive:V,hoverInactive:k,WeekEndColor:J}}}),jo=["data-task-id"],qo=["height"];function Jo(t,n,o,r,i,s){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["barRow",{active:t.hover}]),style:e.normalizeStyle({height:t.rowHeight+"px"}),onMouseover:n[0]||(n[0]=a=>t.hoverActive()),onMouseleave:n[1]||(n[1]=a=>t.hoverInactive()),"data-task-id":t.row[t.mapFields.id]},[t.showRow?(e.openBlock(),e.createElementBlock("svg",{key:"row.no",ref:"bar",class:e.normalizeClass(["bar",{active:t.hover}]),height:t.barHeight+"px",style:{overflow:"visible"}},null,10,qo)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,a=>(e.openBlock(),e.createElementBlock("div",{key:a+t.row.id+t.timelineCellCount+t.showRow+"_template",class:"cell",style:e.normalizeStyle({width:t.scale+"px",minWidth:t.scale+"px",maxWidth:t.scale+"px",height:t.rowHeight+"px",background:t.WeekEndColor(a)})},null,4))),128))],46,jo)):e.createCommentVNode("",!0)}const Ko=Ve(Uo,[["render",Jo],["__scopeId","data-v-fe950226"]]);w.extend(zn);const Qo=e.defineComponent({name:"Milestone",props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(t){const n=e.ref(null),o=e.ref(t.rowHeight*.6),r=e.ref(!0),i=e.ref(!1),s=e.ref(""),a=e.ref(0),l=e.ref(0),u=e.computed(()=>T.timelineCellCount),d=e.computed(()=>T.scale),p=e.computed(()=>T.mode),g=e.computed(()=>T.mapFields),C=e.inject(mt.SetBarColorSymbol);e.watch(()=>Ye.highlightedId,b=>{i.value=t.row[g.value.id]===b});const G=()=>Ye.triggerHighlight(t.row[g.value.id]),E=()=>Ye.triggerHighlight(null),F=b=>{a.value;let v="#ffffff",V="#f8f8f8";if(n.value){let k=n.value.parentElement;for(;k;){if(k.hasAttribute("data-gantt-theme")){v=getComputedStyle(k).getPropertyValue("--bg-content").trim()||"#ffffff",V=getComputedStyle(k).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}k=k.parentElement}}switch(p.value){case"月":case"日":{let k=w(t.startGanttDate).add(b,"days");return k.isoWeekday()===7||k.isoWeekday()===1?V:v}case"周":case"时":return v}},m=ce.setBarDate,R=b=>{let v=0;switch(p.value){case"月":case"日":{let te=w(t.row[g.value.startdate]).diff(w(t.startGanttDate),"days");v=d.value*te+d.value/2,t.row[g.value.takestime]="0天",t.row[g.value.enddate]=t.row[g.value.startdate];break}case"周":{const te=w(t.startGanttDate).startOf("isoWeek");let re=w(t.row[g.value.startdate]).startOf("isoWeek").diff(te,"week");v=d.value*re+d.value/2,t.row[g.value.takestime]="0周",t.row[g.value.enddate]=t.row[g.value.startdate];break}case"时":{let te=w(t.row[g.value.startdate]).diff(w(t.startGanttDate),"hours");v=d.value*te+d.value/2,t.row[g.value.takestime]="0小时",t.row[g.value.enddate]=t.row[g.value.startdate];break}}l.value=v;let V=un(b);const k=getComputedStyle(b).getPropertyValue("--border")||"#cecece";b.setAttribute("data-x",v.toString()),b.setAttribute("stroke",k),b.setAttribute("stroke-width","2px"),b.style.transform=`translate(${v}px, 0px)`;let J="#f59e0b",j="#333333",U="#ffffff",Q=b.parentElement;for(;Q;){if(Q.hasAttribute("data-gantt-theme")){const te=getComputedStyle(Q);J=te.getPropertyValue("--primary").trim()||J,j=te.getPropertyValue("--text-primary").trim()||j,U=te.getPropertyValue("--bg-content").trim()||U;break}Q=Q.parentElement}(U.includes("#1")||U.includes("#2")||U.toLowerCase().includes("dark"))&&j==="#333333"&&(j="#ffffff"),V.clear();const A=o.value,Y=A/2,H=t.rowHeight/2,X=Y,Te=X,h=H-Y,c=X+Y,y=H,f=X,D=H+Y,L=X-Y,B=`M ${Te},${h} L ${c},${y} L ${f},${D} L ${L},${H} Z`,x=V.path(B).fill(s.value||J).stroke({color:k,width:2}).attr("opacity",.9);x.on("mouseover",()=>{x.animate(200).attr({opacity:1,strokeWidth:3})}),x.on("mouseleave",()=>{x.animate(200).attr({opacity:.9,strokeWidth:2})});const P=V.text(t.row[g.value.task]||"Milestone").move(A+5,H-7).fill(j).attr({"font-size":"14px","font-family":"'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif","font-weight":"400","text-anchor":"start","dominant-baseline":"auto"});U.includes("#1")||U.includes("#2")||U.toLowerCase().includes("dark")?P.attr({stroke:"#000000","stroke-width":"0.5px","paint-order":"stroke fill"}):P.attr({stroke:"#ffffff","stroke-width":"0.5px","paint-order":"stroke fill"}),m({id:t.row[g.value.id],startDate:t.row[g.value.startdate],endDate:t.row[g.value.startdate]}),ze(b).draggable({inertia:!1,modifiers:[ze.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:te=>{l.value=Number(te.target.getAttribute("data-x"))},move:te=>{let le=((parseFloat(te.target.getAttribute("data-x")||"0")||0)+te.dx).toString();te.target.style.transform=`translate(${le}px, 0px)`,te.target.setAttribute("data-x",le)},end:te=>{let le=te.target,re=parseFloat(le.getAttribute("data-x")||"0")||0,$=Math.round((re-d.value/2)/d.value)*d.value+d.value/2;$<d.value/2&&($=d.value/2),$>u.value*d.value&&($=u.value*d.value-d.value/2);const _=g.value.parentId||"pid",oe=t.row[_];if(oe&&oe!=="0"){const Me=T.tasks.find(Se=>String(Se[g.value.id])===String(oe));if(Me){let Se=0;if(p.value==="月"||p.value==="日")Se=w(Me[g.value.startdate]).diff(w(t.startGanttDate),"days")*d.value+d.value/2;else if(p.value==="周"){const S=w(t.startGanttDate).startOf("isoWeek");Se=w(Me[g.value.startdate]).startOf("isoWeek").diff(S,"week")*d.value+d.value/2}else p.value==="时"&&(Se=w(Me[g.value.startdate]).diff(w(t.startGanttDate),"hours")*d.value+d.value/2);$<Se&&($=Se)}}le.style.transform=`translate(${$}px, 0px)`,le.setAttribute("data-x",$.toString());const q=Math.round(($-l.value)/d.value);let ne=0,ge=0;p.value==="月"||p.value==="日"?ne=q:p.value==="周"?ne=q*7:p.value==="时"&&(ge=q),p.value==="时"?(t.row[g.value.startdate]=w(t.row[g.value.startdate]).add(ge,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[g.value.enddate]=t.row[g.value.startdate]):(t.row[g.value.startdate]=w(t.row[g.value.startdate]).add(ne,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[g.value.enddate]=t.row[g.value.startdate]),m({id:t.row[g.value.id],startDate:t.row[g.value.startdate],endDate:t.row[g.value.startdate]})}}})};return e.watch(()=>[t.row[g.value.startdate]],()=>{n.value&&R(n.value)},{deep:!1}),e.onMounted(()=>{if(n.value&&R(n.value),C&&(s.value=C(t.row),n.value&&R(n.value)),n.value){let b=n.value.parentElement;for(;b&&!b.hasAttribute("data-gantt-theme");)b=b.parentElement;if(b){const v=new MutationObserver(()=>{a.value++});v.observe(b,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>v.disconnect())}}}),e.onBeforeUnmount(()=>{if(n.value)try{ze(n.value).unset()}catch{}r.value=!1}),{milestone:n,showRow:r,hover:i,milestoneColor:s,timelineCellCount:u,scale:d,mode:p,mapFields:g,hoverActive:G,hoverInactive:E,WeekEndColor:F}}}),Xo=["data-task-id"],er=["height","width"];function tr(t,n,o,r,i,s){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["milestoneRow",{active:t.hover}]),style:e.normalizeStyle({height:t.rowHeight+"px"}),onMouseover:n[0]||(n[0]=a=>t.hoverActive()),onMouseleave:n[1]||(n[1]=a=>t.hoverInactive()),"data-task-id":t.row[t.mapFields.id]},[t.showRow?(e.openBlock(),e.createElementBlock("svg",{key:"milestone",ref:"milestone",class:e.normalizeClass(["milestone",{active:t.hover}]),height:t.rowHeight+"px",width:t.rowHeight*.6+200+"px",style:{overflow:"visible"}},null,10,er)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,a=>(e.openBlock(),e.createElementBlock("div",{key:a+t.row.id+"_milestone_template",class:"cell",style:e.normalizeStyle({width:t.scale+"px",minWidth:t.scale+"px",maxWidth:t.scale+"px",height:t.rowHeight+"px",background:t.WeekEndColor(a)})},null,4))),128))],46,Xo)):e.createCommentVNode("",!0)}const nr=Ve(Qo,[["render",tr],["__scopeId","data-v-627a46c0"]]),ar=e.defineComponent({name:"BarRecursionRow",props:{rowHeight:{type:Number,default:0}},setup(){const t=e.ref([]),n=e.ref(0),o=e.inject(mt.SetTaskTypeSymbol),r=e.computed(()=>T.tasks),i=e.computed(()=>T.timelineCellCount),s=e.computed(()=>T.scale),a=e.computed(()=>T.mode),l=e.computed(()=>T.startGanttDate?T.startGanttDate.toISOString():void 0),u=e.computed(()=>T.endGanttDate?T.endGanttDate.toISOString():void 0),d=e.computed(()=>T.mapFields),p=e.computed(()=>T.collapsedTasks),g=b=>{if(o)return o(b);if(b.type)return b.type;const v=b[d.value.startdate],V=b[d.value.enddate];return v&&V&&v===V?wt.MILESTONE:wt.TASK},C=b=>{const v=new Set,V=k=>{r.value.filter(j=>j[d.value.parentId]===k).forEach(j=>{const U=j[d.value.id];v.add(U),V(U)})};return V(b),v},G=e.computed(()=>new Set(t.value.map(b=>b[d.value.id]))),E=e.computed(()=>{const b=G.value,v=T.tasks.filter(k=>!b.has(k[d.value.id])),V=new Set;return p.value.forEach(k=>{C(k).forEach(j=>V.add(j))}),v.filter(k=>!V.has(k[d.value.id]))}),F=e.computed({get:()=>T.expandRow,set:b=>{ce.setExpandRow(b)}});e.watch(F,b=>{t.value=[],m(b.pid)});const m=b=>{let v=r.value.filter(V=>V[d.value.parentId]===b);if(v&&v.length>0)for(let V=0;V<v.length;V++)F.value.expand===!1&&t.value.push(v[V]),m(v[V][d.value.id])},R=ce.setExpandRow;return{hiddenTask:t,componentKey:n,allTask:r,timelineCellCount:i,scale:s,mode:a,startGanttDate:l,endGanttDate:u,mapFields:d,filterTask:E,expandRow:F,setExpandRow:R,recursionRow:m,getTaskType:g,TaskType:wt}},components:{Bar:Ko,Milestone:nr},mounted(){this.$nextTick(()=>{})},activated(){this.componentKey++}});function or(t,n,o,r,i,s){const a=e.resolveComponent("Milestone"),l=e.resolveComponent("Bar");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filterTask,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.id},[t.getTaskType(u)===t.TaskType.MILESTONE?(e.openBlock(),e.createBlock(a,{key:0,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:u,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"])):(e.openBlock(),e.createBlock(l,{key:1,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:u,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"]))],64))),128))])}const rr=Ve(ar,[["render",or]]),ir=e.defineComponent({name:"TaskLinks",props:{containerWidth:{type:Number,required:!0},containerHeight:{type:Number,required:!0},linkConfig:{type:Object,default:()=>({color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ne.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"}})}},setup(t){const n=e.ref([]),o=h=>{if(!T.tasks.find(te=>te[T.mapFields.id]===h))return null;const y=document.querySelector(`[data-task-id="${h}"]`);if(!y)return null;let f=y.querySelector(".bar"),D=!1;if(f||(f=y.querySelector(".milestone"),D=!0),!f)return null;const L=y.closest(".table .content");if(!L)return null;const M=parseFloat(f.getAttribute("data-x")||"0");let B;D?B=y.getBoundingClientRect().height*.6:B=f.width.baseVal.value;const x=y.getBoundingClientRect(),P=L.getBoundingClientRect(),W=x.top-P.top;if(D){const te=B/2;return{x:M,y:W,width:B,height:x.height,centerX:M+te,centerY:W+x.height/2,rightX:M+B,leftX:M,topY:W,bottomY:W+x.height}}else return{x:M,y:W,width:B,height:x.height,centerX:M+B/2,centerY:W+x.height/2,rightX:M+B,leftX:M,topY:W,bottomY:W+x.height}},r=(h,c)=>T.tasks.filter(f=>f[T.mapFields.parentId]===h&&f[T.mapFields.parentId]!=="0").findIndex(f=>f[T.mapFields.id]===c),i=()=>{const h=document.querySelector(".barRow");return h?h.offsetHeight:50},s=h=>{const c=i();return Math.floor(h/c)*c+c/2},a=(h,c)=>{const y=i();return(Math.floor(h/y)+1+c)*y+y/2},l=(h,c,y)=>{const f=i(),L=Math.floor(h/f)*f+f+y;return c>L+f?s(L+f/2):s(L)},u=h=>{const c=t.linkConfig.linkTypeColors;if(!c)return{[de.FINISH_TO_START]:"#3498db",[de.START_TO_START]:"#2ecc71",[de.FINISH_TO_FINISH]:"#e74c3c",[de.START_TO_FINISH]:"#f39c12",[de.PARENT_CHILD]:"#95a5a6"}[h]||t.linkConfig.color;switch(h){case de.FINISH_TO_START:return c.finishToStart||"#3498db";case de.START_TO_START:return c.startToStart||"#2ecc71";case de.FINISH_TO_FINISH:return c.finishToFinish||"#e74c3c";case de.START_TO_FINISH:return c.startToFinish||"#f39c12";default:return t.linkConfig.color}},d=h=>h===de.PARENT_CHILD?{color:t.linkConfig.parentChildStyle.color||"#95a5a6",width:t.linkConfig.parentChildStyle.width,dashArray:t.linkConfig.parentChildStyle.dashArray}:{color:u(h),width:t.linkConfig.width,dashArray:t.linkConfig.dashArray},p=(h,c,y,f="")=>{if(!h||!c)return"";const{pathType:D}=t.linkConfig;switch(y){case de.PARENT_CHILD:return g(h,c,D);case de.FINISH_TO_START:return F(h,c,D);case de.START_TO_START:return m(h,c,D);case de.FINISH_TO_FINISH:return R(h,c,D);case de.START_TO_FINISH:return b(h,c,D);default:return F(h,c,D)}},g=(h,c,y,f)=>{const D=h.id||h.taskId,L=c.id||c.taskId,M=r(D,L),B=h.leftX,x=h.centerY,P=t.linkConfig.arrowSize||8,W=c.leftX-P,te=c.centerY;return C(B,x,W,te,M,y)},C=(h,c,y,f,D,L)=>{const M=y-h,B=f-c;if(Math.abs(M)<30&&Math.abs(B)<15)return`M ${h} ${c} L ${y} ${f}`;switch(L){case Ne.STRAIGHT:return`M ${h} ${c} L ${y} ${f}`;case Ne.BEZIER:return G(h,c,y,f);case Ne.RIGHT_ANGLE:default:return E(h,c,y,f,D)}},G=(h,c,y,f,D)=>{const L=y-h,{bezierCurvature:M}=t.linkConfig;if(L>0){const B=Math.min(Math.abs(L)*M,60),x=h+B,P=y-B;return`M ${h} ${c} C ${x} ${c} ${P} ${f} ${y} ${f}`}else{const B=t.linkConfig.rightAngleOffset,x=l(c,f,B),P=B*M;return`M ${h} ${c}
2
- C ${h+P} ${c} ${h+P} ${x} ${h+B/2} ${x}
3
- C ${y-P} ${x} ${y-P} ${f} ${y} ${f}`}},E=(h,c,y,f,D)=>{const L=y-h,{rightAngleOffset:M,smoothCorners:B,cornerRadius:x}=t.linkConfig;if(a(c,D),L>0){const P=h+M;if(B&&x>0){const W=Math.min(x,Math.abs(f-c)/2,Math.abs(y-P)/2);return`M ${h} ${c}
4
- L ${P-W} ${c}
5
- Q ${P} ${c} ${P} ${c+(f>c?W:-W)}
6
- L ${P} ${f-(f>c?W:-W)}
7
- Q ${P} ${f} ${P+W} ${f}
8
- L ${y} ${f}`}else return`M ${h} ${c}
9
- L ${P} ${c}
10
- L ${P} ${f}
11
- L ${y} ${f}`}else{const P=M,W=l(c,f,P),te=h+P/2,le=y-P/2;if(B&&x>0){const re=Math.min(x,P/4);return`M ${h} ${c}
12
- L ${te-re} ${c}
13
- Q ${te} ${c} ${te} ${c+re}
14
- L ${te} ${W-re}
15
- Q ${te} ${W} ${te+re} ${W}
1
+ (function(ge,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("dayjs"),require("svg.js"),require("interactjs")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","svg.js","interactjs"],e):(ge=typeof globalThis<"u"?globalThis:ge||self,e(ge.Vue3Gantt={},ge.Vue,ge.dayjs,ge.SVG,ge.interact))})(this,function(ge,e,T,cn,Oe){"use strict";var Ou=Object.defineProperty;var Pu=(ge,e,T)=>e in ge?Ou(ge,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):ge[e]=T;var et=(ge,e,T)=>Pu(ge,typeof e!="symbol"?e+"":e,T);function un(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ot={exports:{}},oo=Ot.exports,Tn;function ao(){return Tn||(Tn=1,function(t,n){(function(o,r){t.exports=r()})(oo,function(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,i=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,u={},c=function(h){return(h=+h)+(h>68?1900:2e3)},m=function(h){return function(O){this[h]=+O}},y=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(O){if(!O||O==="Z")return 0;var S=O.match(/([+-]|\d\d)/g),D=60*S[1]+(+S[2]||0);return D===0?0:S[0]==="+"?-D:D}(h)}],w=function(h){var O=u[h];return O&&(O.indexOf?O:O.s.concat(O.f))},I=function(h,O){var S,D=u.meridiem;if(D){for(var V=1;V<=24;V+=1)if(h.indexOf(D(V,0,O))>-1){S=V>12;break}}else S=h===(O?"pm":"PM");return S},g={A:[l,function(h){this.afternoon=I(h,!1)}],a:[l,function(h){this.afternoon=I(h,!0)}],Q:[s,function(h){this.month=3*(h-1)+1}],S:[s,function(h){this.milliseconds=100*+h}],SS:[i,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[a,m("seconds")],ss:[a,m("seconds")],m:[a,m("minutes")],mm:[a,m("minutes")],H:[a,m("hours")],h:[a,m("hours")],HH:[a,m("hours")],hh:[a,m("hours")],D:[a,m("day")],DD:[i,m("day")],Do:[l,function(h){var O=u.ordinal,S=h.match(/\d+/);if(this.day=S[0],O)for(var D=1;D<=31;D+=1)O(D).replace(/\[|\]/g,"")===h&&(this.day=D)}],w:[a,m("week")],ww:[i,m("week")],M:[a,m("month")],MM:[i,m("month")],MMM:[l,function(h){var O=w("months"),S=(w("monthsShort")||O.map(function(D){return D.slice(0,3)})).indexOf(h)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[l,function(h){var O=w("months").indexOf(h)+1;if(O<1)throw new Error;this.month=O%12||O}],Y:[/[+-]?\d+/,m("year")],YY:[i,function(h){this.year=c(h)}],YYYY:[/\d{4}/,m("year")],Z:y,ZZ:y};function F(h){var O,S;O=h,S=u&&u.formats;for(var D=(h=O.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,P,H){var ee=H&&H.toUpperCase();return P||S[H]||o[H]||S[ee].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ke,p,d){return p||d.slice(1)})})).match(r),V=D.length,C=0;C<V;C+=1){var K=D[C],q=g[K],j=q&&q[0],X=q&&q[1];D[C]=X?{regex:j,parser:X}:K.replace(/^\[|\]$/g,"")}return function(A){for(var P={},H=0,ee=0;H<V;H+=1){var ke=D[H];if(typeof ke=="string")ee+=ke.length;else{var p=ke.regex,d=ke.parser,b=A.slice(ee),f=p.exec(b)[0];d.call(P,f),A=A.replace(f,"")}}return function($){var B=$.afternoon;if(B!==void 0){var _=$.hours;B?_<12&&($.hours+=12):_===12&&($.hours=0),delete $.afternoon}}(P),P}}return function(h,O,S){S.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(c=h.parseTwoDigitYear);var D=O.prototype,V=D.parse;D.parse=function(C){var K=C.date,q=C.utc,j=C.args;this.$u=q;var X=j[1];if(typeof X=="string"){var A=j[2]===!0,P=j[3]===!0,H=A||P,ee=j[2];P&&(ee=j[2]),u=this.$locale(),!A&&ee&&(u=S.Ls[ee]),this.$d=function(b,f,$,B){try{if(["x","X"].indexOf(f)>-1)return new Date((f==="X"?1e3:1)*b);var _=F(f)(b),L=_.year,Z=_.month,G=_.day,W=_.hours,ne=_.minutes,le=_.seconds,re=_.milliseconds,Te=_.zone,E=_.week,M=new Date,ae=G||(L||Z?1:M.getDate()),J=L||M.getFullYear(),k=0;L&&!Z||(k=Z>0?Z-1:M.getMonth());var R,te=W||0,oe=ne||0,Y=le||0,me=re||0;return Te?new Date(Date.UTC(J,k,ae,te,oe,Y,me+60*Te.offset*1e3)):$?new Date(Date.UTC(J,k,ae,te,oe,Y,me)):(R=new Date(J,k,ae,te,oe,Y,me),E&&(R=B(R).week(E).toDate()),R)}catch{return new Date("")}}(K,X,q,S),this.init(),ee&&ee!==!0&&(this.$L=this.locale(ee).$L),H&&K!=this.format(X)&&(this.$d=new Date("")),u={}}else if(X instanceof Array)for(var ke=X.length,p=1;p<=ke;p+=1){j[1]=X[p-1];var d=S.apply(this,j);if(d.isValid()){this.$d=d.$d,this.$L=d.$L,this.init();break}p===ke&&(this.$d=new Date(""))}else V.call(this,C)}}})}(Ot)),Ot.exports}var ro=ao();const so=un(ro);var Pt={exports:{}},io=Pt.exports,vn;function lo(){return vn||(vn=1,function(t,n){(function(o,r){t.exports=r(T)})(io,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var u=100*a+l;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return s.default.locale(i,null,!0),i})}(Pt)),Pt.exports}lo();var xt={exports:{}},co=xt.exports,$n;function uo(){return $n||($n=1,function(t,n){(function(o,r){t.exports=r()})(co,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var r=["th","st","nd","rd"],s=o%100;return"["+o+(r[(s-20)%10]||r[s]||r[0])+"]"}}})}(xt)),xt.exports}uo();var Zt={exports:{}},fo=Zt.exports,Dn;function ho(){return Dn||(Dn=1,function(t,n){(function(o,r){t.exports=r(T)})(fo,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return s.default.locale(i,null,!0),i})}(Zt)),Zt.exports}ho();var Gt={exports:{}},mo=Gt.exports,En;function po(){return En||(En=1,function(t,n){(function(o,r){t.exports=r(T)})(mo,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(a){return a+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(a){return a<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return s.default.locale(i,null,!0),i})}(Gt)),Gt.exports}po();var Wt={exports:{}},go=Wt.exports,Mn;function yo(){return Mn||(Mn=1,function(t,n){(function(o,r){t.exports=r(T)})(go,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return s.default.locale(i,null,!0),i})}(Wt)),Wt.exports}yo();var jt={exports:{}},ko=jt.exports,Vn;function bo(){return Vn||(Vn=1,function(t,n){(function(o,r){t.exports=r(T)})(ko,function(o){function r(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var s=r(o),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function a(u,c,m){var y=i[m];return Array.isArray(y)&&(y=y[c?0:1]),y.replace("%d",u)}var l={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(u){return u+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return s.default.locale(l,null,!0),l})}(jt)),jt.exports}bo();var Ut={exports:{}},wo=Ut.exports,Nn;function Co(){return Nn||(Nn=1,function(t,n){(function(o,r){t.exports=r(T)})(wo,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return a+"º"}};return s.default.locale(i,null,!0),i})}(Ut)),Ut.exports}Co();var qt={exports:{}},So=qt.exports,_n;function To(){return _n||(_n=1,function(t,n){(function(o,r){t.exports=r(T)})(So,function(o){function r(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var s=r(o),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),a="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),u="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),c=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function m(g,F,h){var O,S;return h==="m"?F?"минута":"минуту":g+" "+(O=+g,S={mm:F?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[h].split("_"),O%10==1&&O%100!=11?S[0]:O%10>=2&&O%10<=4&&(O%100<10||O%100>=20)?S[1]:S[2])}var y=function(g,F){return c.test(F)?i[g.month()]:a[g.month()]};y.s=a,y.f=i;var w=function(g,F){return c.test(F)?l[g.month()]:u[g.month()]};w.s=u,w.f=l;var I={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:y,monthsShort:w,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m,mm:m,h:"час",hh:m,d:"день",dd:m,M:"месяц",MM:m,y:"год",yy:m},ordinal:function(g){return g},meridiem:function(g){return g<4?"ночи":g<12?"утра":g<17?"дня":"вечера"}};return s.default.locale(I,null,!0),I})}(qt)),qt.exports}To();const vo=Symbol("SetBarColor"),$o=Symbol("SetTaskType"),Do=Symbol("AddRootTask"),ft={SetBarColorSymbol:vo,SetTaskTypeSymbol:$o,AddRootTaskSymbol:Do};var wt=(t=>(t.TASK="task",t.PROJECT="project",t.MILESTONE="milestone",t))(wt||{}),de=(t=>(t.FINISH_TO_START="finish-to-start",t.START_TO_START="start-to-start",t.FINISH_TO_FINISH="finish-to-finish",t.START_TO_FINISH="start-to-finish",t.PARENT_CHILD="parent-child",t))(de||{}),Ve=(t=>(t.STRAIGHT="straight",t.BEZIER="bezier",t.RIGHT_ANGLE="right-angle",t))(Ve||{});const tt={default:{color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ve.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"},linkTypeColors:{finishToStart:"#3498db",startToStart:"#2ecc71",finishToFinish:"#e74c3c",startToFinish:"#f39c12"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},business:{color:"#2c3e50",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#e74c3c",arrowSize:10,showLabels:!0,labelColor:"#34495e",labelFontSize:11,cornerRadius:8,pathType:Ve.RIGHT_ANGLE,bezierCurvature:.3,rightAngleOffset:40,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.6,parentChildStyle:{color:"#7f8c8d",width:2,dashArray:"5,2"},linkTypeColors:{finishToStart:"#2c3e50",startToStart:"#27ae60",finishToFinish:"#c0392b",startToFinish:"#d35400"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},modern:{color:"#00bcd4",width:3,dashArray:void 0,showArrow:!0,arrowColor:"#ff5722",arrowSize:12,showLabels:!1,labelColor:"#607d8b",labelFontSize:12,cornerRadius:10,pathType:Ve.BEZIER,bezierCurvature:.6,rightAngleOffset:50,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#90a4ae",width:2,dashArray:"8,4"},linkTypeColors:{finishToStart:"#00bcd4",startToStart:"#4caf50",finishToFinish:"#f44336",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},minimal:{color:"#666",width:1,dashArray:void 0,showArrow:!1,arrowColor:void 0,arrowSize:6,showLabels:!1,labelColor:"#999",labelFontSize:10,cornerRadius:3,pathType:Ve.STRAIGHT,bezierCurvature:.2,rightAngleOffset:20,smoothCorners:!1,enableDashAnimation:!1,dashAnimationSpeed:.8,parentChildStyle:{color:"#ccc",width:1,dashArray:"2,2"},linkTypeColors:{finishToStart:"#666",startToStart:"#888",finishToFinish:"#555",startToFinish:"#777"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},colorful:{color:"#9c27b0",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#ff9800",arrowSize:9,showLabels:!0,labelColor:"#673ab7",labelFontSize:11,cornerRadius:6,pathType:Ve.RIGHT_ANGLE,bezierCurvature:.5,rightAngleOffset:35,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#4caf50",width:2,dashArray:"4,3"},linkTypeColors:{finishToStart:"#9c27b0",startToStart:"#4caf50",finishToFinish:"#e91e63",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}}},An={[de.FINISH_TO_START]:{name:"完成-开始",description:"前置任务完成后,后续任务才能开始",color:"#3498db",priority:1},[de.START_TO_START]:{name:"开始-开始",description:"两个任务同时开始",color:"#2ecc71",priority:2},[de.FINISH_TO_FINISH]:{name:"完成-完成",description:"两个任务同时完成",color:"#e74c3c",priority:3},[de.START_TO_FINISH]:{name:"开始-完成",description:"前置任务开始后,后续任务才能完成",color:"#f39c12",priority:4},[de.PARENT_CHILD]:{name:"父子关系",description:"显示任务的层级关系",color:"#95a5a6",priority:0}};function Jt(t){return JSON.parse(JSON.stringify(t))}class Eo{constructor(){et(this,"config");et(this,"STORAGE_KEY","gantt-link-config");this.config=e.reactive(Jt(tt.default)),this.loadFromStorage()}deepMergeConfig(n){if(this.config.linkTypeVisibility||(this.config.linkTypeVisibility=Jt(tt.default.linkTypeVisibility)),this.config.linkTypeColors||(this.config.linkTypeColors=Jt(tt.default.linkTypeColors)),this.config.parentChildStyle||(this.config.parentChildStyle=Jt(tt.default.parentChildStyle)),n.linkTypeVisibility&&this.config.linkTypeVisibility){const a=n.linkTypeVisibility;a.finishToStart!==void 0&&(this.config.linkTypeVisibility.finishToStart=a.finishToStart),a.startToStart!==void 0&&(this.config.linkTypeVisibility.startToStart=a.startToStart),a.finishToFinish!==void 0&&(this.config.linkTypeVisibility.finishToFinish=a.finishToFinish),a.startToFinish!==void 0&&(this.config.linkTypeVisibility.startToFinish=a.startToFinish),a.parentChild!==void 0&&(this.config.linkTypeVisibility.parentChild=a.parentChild)}if(n.linkTypeColors&&this.config.linkTypeColors){const a=n.linkTypeColors;a.finishToStart!==void 0&&(this.config.linkTypeColors.finishToStart=a.finishToStart),a.startToStart!==void 0&&(this.config.linkTypeColors.startToStart=a.startToStart),a.finishToFinish!==void 0&&(this.config.linkTypeColors.finishToFinish=a.finishToFinish),a.startToFinish!==void 0&&(this.config.linkTypeColors.startToFinish=a.startToFinish)}if(n.parentChildStyle&&this.config.parentChildStyle){const a=n.parentChildStyle;a.color!==void 0&&(this.config.parentChildStyle.color=a.color),a.width!==void 0&&(this.config.parentChildStyle.width=a.width),a.dashArray!==void 0&&(this.config.parentChildStyle.dashArray=a.dashArray)}const{linkTypeVisibility:o,linkTypeColors:r,parentChildStyle:s,...i}=n;Object.assign(this.config,i)}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const o=JSON.parse(n);this.deepMergeConfig(o)}}catch(n){console.warn("加载连线配置失败,使用默认配置:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.config))}catch(n){console.warn("保存连线配置失败:",n)}}getConfig(){return this.config}setTheme(n){this.deepMergeConfig({...tt[n]}),this.saveToStorage()}updateConfig(n){this.deepMergeConfig(n),this.saveToStorage()}reset(){this.deepMergeConfig({...tt.default}),this.saveToStorage()}getLinkStyle(n){const o=An[n];return n===de.PARENT_CHILD?{color:this.config.parentChildStyle.color,width:this.config.parentChildStyle.width,dashArray:this.config.parentChildStyle.dashArray}:{color:o.color,width:this.config.width,dashArray:this.config.dashArray}}exportConfig(){return JSON.stringify(this.config,null,2)}importConfig(n){try{const o=JSON.parse(n);return this.updateConfig(o),!0}catch(o){return console.error("导入配置失败:",o),!1}}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.reset()}catch(n){console.warn("清除配置失败:",n)}}}const Be=new Eo;function Ct(){return{config:Be.getConfig(),setTheme:Be.setTheme.bind(Be),updateConfig:Be.updateConfig.bind(Be),reset:Be.reset.bind(Be),getLinkStyle:Be.getLinkStyle.bind(Be),exportConfig:Be.exportConfig.bind(Be),importConfig:Be.importConfig.bind(Be),clearStorage:Be.clearStorage.bind(Be),themes:tt,linkTypes:An}}class Mo{constructor(){et(this,"dependencies",e.reactive([]));et(this,"STORAGE_KEY","gantt-link-dependencies");this.loadFromStorage()}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const o=JSON.parse(n);this.dependencies.splice(0,this.dependencies.length,...o)}}catch(n){console.warn("加载连线依赖关系失败:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.dependencies))}catch(n){console.warn("保存连线依赖关系失败:",n)}}addDependency(n){const o=`link-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;return this.dependencies.push({...n,id:o}),this.saveToStorage(),o}removeDependency(n){const o=this.dependencies.findIndex(r=>r.id===n);return o>-1?(this.dependencies.splice(o,1),this.saveToStorage(),!0):!1}getDependencies(){return this.dependencies}getTaskDependencies(n){return this.dependencies.filter(o=>o.sourceTaskId===n||o.targetTaskId===n)}clear(){this.dependencies.splice(0),this.saveToStorage()}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.clear()}catch(n){console.warn("清除依赖关系失败:",n)}}wouldCreateCycle(n,o){const r=new Set,s=new Set,i=l=>{if(s.has(l))return!0;if(r.has(l))return!1;r.add(l),s.add(l);const u=this.dependencies.filter(c=>c.sourceTaskId===l);for(const c of u)if(i(c.targetTaskId))return!0;return s.delete(l),!1};this.dependencies.push({id:"temp",sourceTaskId:n,targetTaskId:o,type:de.FINISH_TO_START});const a=i(n);return this.dependencies.pop(),a}}const Kt=new Mo,fn={"zh-CN":{common:{confirm:"确定",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",close:"关闭",export:"导出",import:"导入",config:"配置",settings:"设置",theme:"主题",to:"至",selectDate:"请选择日期"},date:{year:"年",month:"月",day:"日",hour:"时",week:"周",today:"今天",monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日",january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY-MM-DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{month:"月",week:"周",day:"日",hour:"时"},task:{addRoot:"添加根任务",addSub:"添加子任务",remove:"删除任务",edit:"编辑任务",name:"任务名称",priority:"优先级",startDate:"开始时间",endDate:"结束时间",duration:"耗时",progress:"进度",serialNumber:"序号",type:"类型",taskType:"任务",projectType:"项目",milestoneType:"里程碑"},link:{legend:"连线图例",parentChild:"父子关系",finishToStart:"完成-开始",startToStart:"开始-开始",finishToFinish:"完成-完成",startToFinish:"开始-完成",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"甘特图配置",themeSettings:"主题设置",linkSettings:"连线设置",languageSettings:"语言设置",currentTheme:"当前",previewTheme:"预览",exportConfig:"导出配置",importConfig:"导入配置",linkConfig:{info:"以下配置用于任务依赖连线(完成-开始、开始-开始等关系)",pathType:"路径类型",straight:"直线",bezier:"贝塞尔",rightAngle:"直角",color:"颜色",width:"线宽",dashStyle:"虚线样式",solid:"实线",shortDash:"短虚线",mediumDash:"中虚线",longDash:"长虚线",dotDash:"点划线",curvature:"弯曲度",offset:"偏移距离",smoothCorners:"平滑转角",cornerRadius:"转角半径",showArrow:"显示箭头",arrowSize:"箭头大小",arrowColor:"箭头颜色",syncColor:"同步",dashAnimation:"虚线流动动画",animationSpeed:"动画速度",showLabels:"显示标签",labelColor:"标签颜色",fontSize:"字体大小",typeColors:"依赖类型颜色",parentChildStyle:"父子关系连线样式",parentChildInfo:"用于显示父任务与子任务之间的层级结构关系"}},theme:{metro:"Metro 金属质感",light:"浅色主题",dark:"深色主题",colorful:"多彩主题",ocean:"海洋主题",apple:"Apple 苹果风格",classic:"经典商务",liquidGlass:"Liquid Glass 液态玻璃",metroDesc:"经典 Windows Metro 风格",lightDesc:"清爽明亮的浅色风格",darkDesc:"优雅专业的深色风格",colorfulDesc:"活力四射的多彩风格",oceanDesc:"沉静舒适的海洋风格",appleDesc:"简约优雅的 macOS 风格",classicDesc:"传统稳重的商务风格",liquidGlassDesc:"iOS 26 液态玻璃效果,半透明流动质感"},datePicker:{selectDate:"请选择日期",clearDate:"清除日期"},columnSettings:{title:"列显示设置",desc:"勾选要显示的列",showAll:"全部显示",hideAll:"全部隐藏",reset:"恢复默认"},tooltip:{addSubTask:"添加子任务",removeTask:"删除当前任务",syncArrowColor:"与线条颜色同步",close:"关闭",columnSettings:"列显示设置"}},"en-US":{common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",close:"Close",export:"Export",import:"Import",config:"Config",settings:"Settings",theme:"Theme",to:"to",selectDate:"Select Date"},date:{year:"Year",month:"Month",day:"Day",hour:"Hour",week:"Week",today:"Today",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},dateFormat:{full:"MMMM DD, YYYY",short:"MM/DD/YYYY",monthDay:"MMM DD",yearMonth:"MMMM YYYY"},viewMode:{month:"Month",week:"Week",day:"Day",hour:"Hour"},task:{addRoot:"Add Root Task",addSub:"Add Sub Task",remove:"Delete Task",edit:"Edit Task",name:"Task Name",priority:"Priority",startDate:"Start Date",endDate:"End Date",duration:"Duration",progress:"Progress",serialNumber:"No.",type:"Type",taskType:"Task",projectType:"Project",milestoneType:"Milestone"},link:{legend:"Link Legend",parentChild:"Parent-Child",finishToStart:"Finish-to-Start",startToStart:"Start-to-Start",finishToFinish:"Finish-to-Finish",startToFinish:"Start-to-Finish",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"Gantt Configuration",themeSettings:"Theme Settings",linkSettings:"Link Settings",languageSettings:"Language Settings",currentTheme:"Current",previewTheme:"Preview",exportConfig:"Export Config",importConfig:"Import Config",linkConfig:{info:"Configure task dependency links (Finish-to-Start, Start-to-Start, etc.)",pathType:"Path Type",straight:"Straight",bezier:"Bezier",rightAngle:"Right Angle",color:"Color",width:"Line Width",dashStyle:"Dash Style",solid:"Solid",shortDash:"Short Dash",mediumDash:"Medium Dash",longDash:"Long Dash",dotDash:"Dot Dash",curvature:"Curvature",offset:"Offset Distance",smoothCorners:"Smooth Corners",cornerRadius:"Corner Radius",showArrow:"Show Arrow",arrowSize:"Arrow Size",arrowColor:"Arrow Color",syncColor:"Sync",dashAnimation:"Dash Animation",animationSpeed:"Animation Speed",showLabels:"Show Labels",labelColor:"Label Color",fontSize:"Font Size",typeColors:"Dependency Type Colors",parentChildStyle:"Parent-Child Link Style",parentChildInfo:"Display hierarchical relationship between parent and child tasks"}},theme:{metro:"Metro",light:"Light",dark:"Dark",colorful:"Colorful",ocean:"Ocean",apple:"Apple",classic:"Classic",liquidGlass:"Liquid Glass",metroDesc:"Classic Windows Metro style",lightDesc:"Fresh and bright light style",darkDesc:"Elegant and professional dark style",colorfulDesc:"Vibrant and colorful style",oceanDesc:"Calm and comfortable ocean style",appleDesc:"Minimalist and elegant macOS style",classicDesc:"Traditional and stable business style",liquidGlassDesc:"iOS 26 Liquid Glass effect with translucent fluidity"},datePicker:{selectDate:"Select Date",clearDate:"Clear Date"},columnSettings:{title:"Column Display Settings",desc:"Check columns to display",showAll:"Show All",hideAll:"Hide All",reset:"Reset Default"},tooltip:{addSubTask:"Add Sub Task",removeTask:"Delete Current Task",syncArrowColor:"Sync with line color",close:"Close",columnSettings:"Column Display Settings"}},"ja-JP":{common:{confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",edit:"編集",add:"追加",close:"閉じる",export:"エクスポート",import:"インポート",config:"設定",settings:"設定",theme:"テーマ",to:"から",selectDate:"日付を選択"},date:{year:"年",month:"月",day:"日",hour:"時",week:"週",today:"今日",monday:"月",tuesday:"火",wednesday:"水",thursday:"木",friday:"金",saturday:"土",sunday:"日",january:"1月",february:"2月",march:"3月",april:"4月",may:"5月",june:"6月",july:"7月",august:"8月",september:"9月",october:"10月",november:"11月",december:"12月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY/MM/DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{month:"月",week:"週",day:"日",hour:"時"},task:{addRoot:"ルートタスクを追加",addSub:"サブタスクを追加",remove:"タスクを削除",edit:"タスクを編集",name:"タスク名",priority:"優先度",startDate:"開始日",endDate:"終了日",duration:"期間",progress:"進捗",serialNumber:"番号",type:"タイプ",taskType:"タスク",projectType:"プロジェクト",milestoneType:"マイルストーン"},link:{legend:"リンク凡例",parentChild:"親子関係",finishToStart:"終了-開始",startToStart:"開始-開始",finishToFinish:"終了-終了",startToFinish:"開始-終了",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"ガントチャート設定",themeSettings:"テーマ設定",linkSettings:"リンク設定",languageSettings:"言語設定",currentTheme:"現在",previewTheme:"プレビュー",exportConfig:"設定をエクスポート",importConfig:"設定をインポート",linkConfig:{info:"タスク依存関係リンク(終了-開始、開始-開始など)を設定",pathType:"パスタイプ",straight:"直線",bezier:"ベジェ曲線",rightAngle:"直角",color:"色",width:"線の太さ",dashStyle:"破線スタイル",solid:"実線",shortDash:"短い破線",mediumDash:"中破線",longDash:"長い破線",dotDash:"点線破線",curvature:"曲率",offset:"オフセット距離",smoothCorners:"滑らかな角",cornerRadius:"角の半径",showArrow:"矢印を表示",arrowSize:"矢印サイズ",arrowColor:"矢印の色",syncColor:"同期",dashAnimation:"破線アニメーション",animationSpeed:"アニメーション速度",showLabels:"ラベルを表示",labelColor:"ラベルの色",fontSize:"フォントサイズ",typeColors:"依存関係タイプの色",parentChildStyle:"親子リンクスタイル",parentChildInfo:"親タスクと子タスクの階層関係を表示"}},theme:{metro:"メトロ",light:"ライト",dark:"ダーク",colorful:"カラフル",ocean:"オーシャン",apple:"Apple",classic:"クラシック",liquidGlass:"リキッドグラス",metroDesc:"クラシックWindowsメトロスタイル",lightDesc:"明るく爽やかなライトスタイル",darkDesc:"エレガントでプロフェッショナルなダークスタイル",colorfulDesc:"活気あるカラフルスタイル",oceanDesc:"落ち着いた快適なオーシャンスタイル",appleDesc:"ミニマルでエレガントなmacOSスタイル",classicDesc:"伝統的で安定感のあるビジネススタイル",liquidGlassDesc:"iOS 26 リキッドグラス効果、半透明で流動的な質感"},datePicker:{selectDate:"日付を選択",clearDate:"日付をクリア"},columnSettings:{title:"列表示設定",desc:"表示する列を選択",showAll:"すべて表示",hideAll:"すべて非表示",reset:"デフォルトに戻す"},tooltip:{addSubTask:"サブタスクを追加",removeTask:"現在のタスクを削除",syncArrowColor:"線の色と同期",close:"閉じる",columnSettings:"列表示設定"}},"ko-KR":{common:{confirm:"확인",cancel:"취소",save:"저장",delete:"삭제",edit:"편집",add:"추가",close:"닫기",export:"내보내기",import:"가져오기",config:"설정",settings:"설정",theme:"테마",to:"에서",selectDate:"날짜 선택"},date:{year:"년",month:"월",day:"일",hour:"시",week:"주",today:"오늘",monday:"월",tuesday:"화",wednesday:"수",thursday:"목",friday:"금",saturday:"토",sunday:"일",january:"1월",february:"2월",march:"3월",april:"4월",may:"5월",june:"6월",july:"7월",august:"8월",september:"9월",october:"10월",november:"11월",december:"12월"},dateFormat:{full:"YYYY년 MM월 DD일",short:"YYYY-MM-DD",monthDay:"MM월 DD일",yearMonth:"YYYY년 MM월"},viewMode:{month:"월",week:"주",day:"일",hour:"시"},task:{addRoot:"루트 작업 추가",addSub:"하위 작업 추가",remove:"작업 삭제",edit:"작업 편집",name:"작업 이름",priority:"우선순위",startDate:"시작일",endDate:"종료일",duration:"기간",progress:"진행률",serialNumber:"번호",type:"유형",taskType:"작업",projectType:"프로젝트",milestoneType:"마일스톤"},link:{legend:"링크 범례",parentChild:"부모-자식",finishToStart:"종료-시작",startToStart:"시작-시작",finishToFinish:"종료-종료",startToFinish:"시작-종료",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"간트 차트 설정",themeSettings:"테마 설정",linkSettings:"링크 설정",languageSettings:"언어 설정",currentTheme:"현재",previewTheme:"미리보기",exportConfig:"설정 내보내기",importConfig:"설정 가져오기",linkConfig:{info:"작업 종속성 링크 설정 (종료-시작, 시작-시작 등)",pathType:"경로 유형",straight:"직선",bezier:"베지어 곡선",rightAngle:"직각",color:"색상",width:"선 두께",dashStyle:"파선 스타일",solid:"실선",shortDash:"짧은 파선",mediumDash:"중간 파선",longDash:"긴 파선",dotDash:"점선 파선",curvature:"곡률",offset:"오프셋 거리",smoothCorners:"부드러운 모서리",cornerRadius:"모서리 반경",showArrow:"화살표 표시",arrowSize:"화살표 크기",arrowColor:"화살표 색상",syncColor:"동기화",dashAnimation:"파선 애니메이션",animationSpeed:"애니메이션 속도",showLabels:"레이블 표시",labelColor:"레이블 색상",fontSize:"글꼴 크기",typeColors:"종속성 유형 색상",parentChildStyle:"부모-자식 링크 스타일",parentChildInfo:"부모 작업과 자식 작업의 계층 관계 표시"}},theme:{metro:"메트로",light:"라이트",dark:"다크",colorful:"컬러풀",ocean:"오션",apple:"Apple",classic:"클래식",liquidGlass:"리퀴드 글래스",metroDesc:"클래식 Windows 메트로 스타일",lightDesc:"밝고 상쾌한 라이트 스타일",darkDesc:"우아하고 전문적인 다크 스타일",colorfulDesc:"활기찬 컬러풀 스타일",oceanDesc:"차분하고 편안한 오션 스타일",appleDesc:"미니멀하고 우아한 macOS 스타일",classicDesc:"전통적이고 안정적인 비즈니스 스타일",liquidGlassDesc:"iOS 26 반투명 유동성을 지닌 리퀴드 글래스 효과"},datePicker:{selectDate:"날짜 선택",clearDate:"날짜 지우기"},columnSettings:{title:"열 표시 설정",desc:"표시할 열 선택",showAll:"모두 표시",hideAll:"모두 숨기기",reset:"기본값 복원"},tooltip:{addSubTask:"하위 작업 추가",removeTask:"현재 작업 삭제",syncArrowColor:"선 색상과 동기화",close:"닫기",columnSettings:"열 표시 설정"}},"fr-FR":{common:{confirm:"Confirmer",cancel:"Annuler",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",add:"Ajouter",close:"Fermer",export:"Exporter",import:"Importer",config:"Configuration",settings:"Paramètres",theme:"Thème",to:"à",selectDate:"Sélectionner la date"},date:{year:"Année",month:"Mois",day:"Jour",hour:"Heure",week:"Semaine",today:"Aujourd'hui",monday:"Lun",tuesday:"Mar",wednesday:"Mer",thursday:"Jeu",friday:"Ven",saturday:"Sam",sunday:"Dim",january:"Janvier",february:"Février",march:"Mars",april:"Avril",may:"Mai",june:"Juin",july:"Juillet",august:"Août",september:"Septembre",october:"Octobre",november:"Novembre",december:"Décembre"},dateFormat:{full:"DD MMMM YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Mois",week:"Semaine",day:"Jour",hour:"Heure"},task:{addRoot:"Ajouter une tâche racine",addSub:"Ajouter une sous-tâche",remove:"Supprimer la tâche",edit:"Modifier la tâche",name:"Nom de la tâche",priority:"Priorité",startDate:"Date de début",endDate:"Date de fin",duration:"Durée",progress:"Progrès",serialNumber:"N°",type:"Type",taskType:"Tâche",projectType:"Projet",milestoneType:"Jalon"},link:{legend:"Légende des liens",parentChild:"Parent-Enfant",finishToStart:"Fin-Début",startToStart:"Début-Début",finishToFinish:"Fin-Fin",startToFinish:"Début-Fin",fs:"FD",ss:"DD",ff:"FF",sf:"DF",pc:"PE"},configPanel:{title:"Configuration Gantt",themeSettings:"Paramètres du thème",linkSettings:"Paramètres des liens",languageSettings:"Paramètres de langue",currentTheme:"Actuel",previewTheme:"Aperçu",exportConfig:"Exporter la configuration",importConfig:"Importer la configuration",linkConfig:{info:"Configurer les liens de dépendance des tâches (Fin-Début, Début-Début, etc.)",pathType:"Type de chemin",straight:"Droit",bezier:"Bézier",rightAngle:"Angle droit",color:"Couleur",width:"Épaisseur de ligne",dashStyle:"Style de tiret",solid:"Solide",shortDash:"Tiret court",mediumDash:"Tiret moyen",longDash:"Tiret long",dotDash:"Point-tiret",curvature:"Courbure",offset:"Distance de décalage",smoothCorners:"Coins lisses",cornerRadius:"Rayon du coin",showArrow:"Afficher la flèche",arrowSize:"Taille de la flèche",arrowColor:"Couleur de la flèche",syncColor:"Synchroniser",dashAnimation:"Animation de tiret",animationSpeed:"Vitesse d'animation",showLabels:"Afficher les étiquettes",labelColor:"Couleur de l'étiquette",fontSize:"Taille de police",typeColors:"Couleurs des types de dépendance",parentChildStyle:"Style de lien parent-enfant",parentChildInfo:"Afficher la relation hiérarchique entre les tâches parent et enfant"}},theme:{metro:"Metro",light:"Clair",dark:"Sombre",colorful:"Coloré",ocean:"Océan",apple:"Apple",classic:"Classique",liquidGlass:"Verre Liquide",metroDesc:"Style Metro Windows classique",lightDesc:"Style clair frais et lumineux",darkDesc:"Style sombre élégant et professionnel",colorfulDesc:"Style coloré vibrant",oceanDesc:"Style océan calme et confortable",appleDesc:"Style macOS minimaliste et élégant",classicDesc:"Style business traditionnel et stable",liquidGlassDesc:"Effet Verre Liquide iOS 26 avec fluidité translucide"},datePicker:{selectDate:"Sélectionner la date",clearDate:"Effacer la date"},columnSettings:{title:"Paramètres de colonne",desc:"Sélectionner les colonnes à afficher",showAll:"Tout afficher",hideAll:"Tout masquer",reset:"Réinitialiser par défaut"},tooltip:{addSubTask:"Ajouter une sous-tâche",removeTask:"Supprimer la tâche actuelle",syncArrowColor:"Synchroniser avec la couleur de la ligne",close:"Fermer",columnSettings:"Paramètres de colonne"}},"de-DE":{common:{confirm:"Bestätigen",cancel:"Abbrechen",save:"Speichern",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",export:"Exportieren",import:"Importieren",config:"Konfiguration",settings:"Einstellungen",theme:"Thema",to:"bis",selectDate:"Datum auswählen"},date:{year:"Jahr",month:"Monat",day:"Tag",hour:"Stunde",week:"Woche",today:"Heute",monday:"Mo",tuesday:"Di",wednesday:"Mi",thursday:"Do",friday:"Fr",saturday:"Sa",sunday:"So",january:"Januar",february:"Februar",march:"März",april:"April",may:"Mai",june:"Juni",july:"Juli",august:"August",september:"September",october:"Oktober",november:"November",december:"Dezember"},dateFormat:{full:"DD. MMMM YYYY",short:"DD.MM.YYYY",monthDay:"DD. MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Monat",week:"Woche",day:"Tag",hour:"Stunde"},task:{addRoot:"Hauptaufgabe hinzufügen",addSub:"Unteraufgabe hinzufügen",remove:"Aufgabe löschen",edit:"Aufgabe bearbeiten",name:"Aufgabenname",priority:"Priorität",startDate:"Startdatum",endDate:"Enddatum",duration:"Dauer",progress:"Fortschritt",serialNumber:"Nr.",type:"Typ",taskType:"Aufgabe",projectType:"Projekt",milestoneType:"Meilenstein"},link:{legend:"Verknüpfungslegende",parentChild:"Übergeordnet-Untergeordnet",finishToStart:"Ende-Anfang",startToStart:"Anfang-Anfang",finishToFinish:"Ende-Ende",startToFinish:"Anfang-Ende",fs:"EA",ss:"AA",ff:"EE",sf:"AE",pc:"ÜU"},configPanel:{title:"Gantt-Konfiguration",themeSettings:"Themeneinstellungen",linkSettings:"Verknüpfungseinstellungen",languageSettings:"Spracheinstellungen",currentTheme:"Aktuell",previewTheme:"Vorschau",exportConfig:"Konfiguration exportieren",importConfig:"Konfiguration importieren",linkConfig:{info:"Aufgabenabhängigkeitsverknüpfungen konfigurieren (Ende-Anfang, Anfang-Anfang usw.)",pathType:"Pfadtyp",straight:"Gerade",bezier:"Bézier",rightAngle:"Rechter Winkel",color:"Farbe",width:"Linienstärke",dashStyle:"Strichstil",solid:"Durchgezogen",shortDash:"Kurzer Strich",mediumDash:"Mittlerer Strich",longDash:"Langer Strich",dotDash:"Punkt-Strich",curvature:"Krümmung",offset:"Versatzabstand",smoothCorners:"Glatte Ecken",cornerRadius:"Eckenradius",showArrow:"Pfeil anzeigen",arrowSize:"Pfeilgröße",arrowColor:"Pfeilfarbe",syncColor:"Synchronisieren",dashAnimation:"Strich-Animation",animationSpeed:"Animationsgeschwindigkeit",showLabels:"Beschriftungen anzeigen",labelColor:"Beschriftungsfarbe",fontSize:"Schriftgröße",typeColors:"Abhängigkeitstypfarben",parentChildStyle:"Übergeordnet-Untergeordnet-Verknüpfungsstil",parentChildInfo:"Hierarchische Beziehung zwischen übergeordneten und untergeordneten Aufgaben anzeigen"}},theme:{metro:"Metro",light:"Hell",dark:"Dunkel",colorful:"Farbenfroh",ocean:"Ozean",apple:"Apple",classic:"Klassisch",liquidGlass:"Flüssigglas",metroDesc:"Klassischer Windows Metro-Stil",lightDesc:"Frischer und heller Stil",darkDesc:"Eleganter und professioneller dunkler Stil",colorfulDesc:"Lebendiger farbenfroher Stil",oceanDesc:"Ruhiger und komfortabler Ozean-Stil",appleDesc:"Minimalistischer und eleganter macOS-Stil",classicDesc:"Traditioneller und stabiler Geschäftsstil",liquidGlassDesc:"iOS 26 Flüssigglas-Effekt mit durchscheinender Fließfähigkeit"},datePicker:{selectDate:"Datum auswählen",clearDate:"Datum löschen"},columnSettings:{title:"Spalteneinstellungen",desc:"Anzuzeigende Spalten auswählen",showAll:"Alle anzeigen",hideAll:"Alle ausblenden",reset:"Standard wiederherstellen"},tooltip:{addSubTask:"Unteraufgabe hinzufügen",removeTask:"Aktuelle Aufgabe löschen",syncArrowColor:"Mit Linienfarbe synchronisieren",close:"Schließen",columnSettings:"Spalteneinstellungen"}},"es-ES":{common:{confirm:"Confirmar",cancel:"Cancelar",save:"Guardar",delete:"Eliminar",edit:"Editar",add:"Agregar",close:"Cerrar",export:"Exportar",import:"Importar",config:"Configuración",settings:"Ajustes",theme:"Tema",to:"a",selectDate:"Seleccionar fecha"},date:{year:"Año",month:"Mes",day:"Día",hour:"Hora",week:"Semana",today:"Hoy",monday:"Lun",tuesday:"Mar",wednesday:"Mié",thursday:"Jue",friday:"Vie",saturday:"Sáb",sunday:"Dom",january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre"},dateFormat:{full:"DD [de] MMMM [de] YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Mes",week:"Semana",day:"Día",hour:"Hora"},task:{addRoot:"Agregar tarea raíz",addSub:"Agregar subtarea",remove:"Eliminar tarea",edit:"Editar tarea",name:"Nombre de tarea",priority:"Prioridad",startDate:"Fecha de inicio",endDate:"Fecha de fin",duration:"Duración",progress:"Progreso",serialNumber:"Nº",type:"Tipo",taskType:"Tarea",projectType:"Proyecto",milestoneType:"Hito"},link:{legend:"Leyenda de enlaces",parentChild:"Padre-Hijo",finishToStart:"Fin-Inicio",startToStart:"Inicio-Inicio",finishToFinish:"Fin-Fin",startToFinish:"Inicio-Fin",fs:"FI",ss:"II",ff:"FF",sf:"IF",pc:"PH"},configPanel:{title:"Configuración Gantt",themeSettings:"Configuración de tema",linkSettings:"Configuración de enlaces",languageSettings:"Configuración de idioma",currentTheme:"Actual",previewTheme:"Vista previa",exportConfig:"Exportar configuración",importConfig:"Importar configuración",linkConfig:{info:"Configurar enlaces de dependencia de tareas (Fin-Inicio, Inicio-Inicio, etc.)",pathType:"Tipo de ruta",straight:"Recta",bezier:"Bézier",rightAngle:"Ángulo recto",color:"Color",width:"Grosor de línea",dashStyle:"Estilo de guión",solid:"Sólido",shortDash:"Guión corto",mediumDash:"Guión medio",longDash:"Guión largo",dotDash:"Punto-guión",curvature:"Curvatura",offset:"Distancia de desplazamiento",smoothCorners:"Esquinas suaves",cornerRadius:"Radio de esquina",showArrow:"Mostrar flecha",arrowSize:"Tamaño de flecha",arrowColor:"Color de flecha",syncColor:"Sincronizar",dashAnimation:"Animación de guión",animationSpeed:"Velocidad de animación",showLabels:"Mostrar etiquetas",labelColor:"Color de etiqueta",fontSize:"Tamaño de fuente",typeColors:"Colores de tipo de dependencia",parentChildStyle:"Estilo de enlace padre-hijo",parentChildInfo:"Mostrar relación jerárquica entre tareas padre e hijo"}},theme:{metro:"Metro",light:"Claro",dark:"Oscuro",colorful:"Colorido",ocean:"Océano",apple:"Apple",classic:"Clásico",liquidGlass:"Cristal Líquido",metroDesc:"Estilo Metro Windows clásico",lightDesc:"Estilo claro fresco y brillante",darkDesc:"Estilo oscuro elegante y profesional",colorfulDesc:"Estilo colorido vibrante",oceanDesc:"Estilo océano tranquilo y cómodo",appleDesc:"Estilo macOS minimalista y elegante",classicDesc:"Estilo empresarial tradicional y estable",liquidGlassDesc:"Efecto de Cristal Líquido iOS 26 con fluidez translúcida"},datePicker:{selectDate:"Seleccionar fecha",clearDate:"Borrar fecha"},columnSettings:{title:"Configuración de columnas",desc:"Seleccionar columnas a mostrar",showAll:"Mostrar todo",hideAll:"Ocultar todo",reset:"Restablecer predeterminado"},tooltip:{addSubTask:"Agregar subtarea",removeTask:"Eliminar tarea actual",syncArrowColor:"Sincronizar con color de línea",close:"Cerrar",columnSettings:"Configuración de columnas"}},"ru-RU":{common:{confirm:"Подтвердить",cancel:"Отмена",save:"Сохранить",delete:"Удалить",edit:"Редактировать",add:"Добавить",close:"Закрыть",export:"Экспорт",import:"Импорт",config:"Конфигурация",settings:"Настройки",theme:"Тема",to:"до",selectDate:"Выбрать дату"},date:{year:"Год",month:"Месяц",day:"День",hour:"Час",week:"Неделя",today:"Сегодня",monday:"Пн",tuesday:"Вт",wednesday:"Ср",thursday:"Чт",friday:"Пт",saturday:"Сб",sunday:"Вс",january:"Январь",february:"Февраль",march:"Март",april:"Апрель",may:"Май",june:"Июнь",july:"Июль",august:"Август",september:"Сентябрь",october:"Октябрь",november:"Ноябрь",december:"Декабрь"},dateFormat:{full:"DD MMMM YYYY г.",short:"DD.MM.YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Месяц",week:"Неделя",day:"День",hour:"Час"},task:{addRoot:"Добавить корневую задачу",addSub:"Добавить подзадачу",remove:"Удалить задачу",edit:"Редактировать задачу",name:"Название задачи",priority:"Приоритет",startDate:"Дата начала",endDate:"Дата окончания",duration:"Длительность",progress:"Прогресс",serialNumber:"№",type:"Тип",taskType:"Задача",projectType:"Проект",milestoneType:"Веха"},link:{legend:"Легенда связей",parentChild:"Родитель-Потомок",finishToStart:"Окончание-Начало",startToStart:"Начало-Начало",finishToFinish:"Окончание-Окончание",startToFinish:"Начало-Окончание",fs:"ОН",ss:"НН",ff:"ОО",sf:"НО",pc:"РП"},configPanel:{title:"Конфигурация Gantt",themeSettings:"Настройки темы",linkSettings:"Настройки связей",languageSettings:"Настройки языка",currentTheme:"Текущая",previewTheme:"Предпросмотр",exportConfig:"Экспорт конфигурации",importConfig:"Импорт конфигурации",linkConfig:{info:"Настройка связей зависимостей задач (Окончание-Начало, Начало-Начало и т.д.)",pathType:"Тип пути",straight:"Прямая",bezier:"Безье",rightAngle:"Прямой угол",color:"Цвет",width:"Толщина линии",dashStyle:"Стиль пунктира",solid:"Сплошная",shortDash:"Короткий пунктир",mediumDash:"Средний пунктир",longDash:"Длинный пунктир",dotDash:"Точка-тире",curvature:"Кривизна",offset:"Расстояние смещения",smoothCorners:"Сглаженные углы",cornerRadius:"Радиус угла",showArrow:"Показать стрелку",arrowSize:"Размер стрелки",arrowColor:"Цвет стрелки",syncColor:"Синхронизировать",dashAnimation:"Анимация пунктира",animationSpeed:"Скорость анимации",showLabels:"Показать метки",labelColor:"Цвет метки",fontSize:"Размер шрифта",typeColors:"Цвета типов зависимостей",parentChildStyle:"Стиль связи родитель-потомок",parentChildInfo:"Показать иерархическую связь между родительскими и дочерними задачами"}},theme:{metro:"Метро",light:"Светлая",dark:"Темная",colorful:"Красочная",ocean:"Океан",apple:"Apple",classic:"Классический",liquidGlass:"Жидкое стекло",metroDesc:"Классический стиль Windows Metro",lightDesc:"Свежий и яркий светлый стиль",darkDesc:"Элегантный и профессиональный темный стиль",colorfulDesc:"Яркий красочный стиль",oceanDesc:"Спокойный и комфортный океанский стиль",appleDesc:"Минималистичный и элегантный стиль macOS",classicDesc:"Традиционный и стабильный деловой стиль",liquidGlassDesc:"Эффект жидкого стекла iOS 26 с полупрозрачной текучестью"},datePicker:{selectDate:"Выбрать дату",clearDate:"Очистить дату"},columnSettings:{title:"Настройки столбцов",desc:"Выберите столбцы для отображения",showAll:"Показать все",hideAll:"Скрыть все",reset:"Восстановить по умолчанию"},tooltip:{addSubTask:"Добавить подзадачу",removeTask:"Удалить текущую задачу",syncArrowColor:"Синхронизировать с цветом линии",close:"Закрыть",columnSettings:"Настройки столбцов"}}};function hn(){const t=navigator.language||navigator.userLanguage,n={zh:"zh-CN","zh-CN":"zh-CN","zh-Hans":"zh-CN","zh-Hans-CN":"zh-CN","zh-TW":"zh-CN","zh-HK":"zh-CN",en:"en-US","en-US":"en-US","en-GB":"en-US",ja:"ja-JP","ja-JP":"ja-JP",ko:"ko-KR","ko-KR":"ko-KR",fr:"fr-FR","fr-FR":"fr-FR",de:"de-DE","de-DE":"de-DE",es:"es-ES","es-ES":"es-ES",ru:"ru-RU","ru-RU":"ru-RU"};if(n[t])return n[t];const o=t.split("-")[0];return n[o]?n[o]:"en-US"}const ht=e.ref("zh-CN"),mn=localStorage.getItem("gantt-locale");mn&&fn[mn]?ht.value=mn:ht.value=hn();function Vo(t){const n=t.split(".");let o=fn[ht.value];for(const r of n)if(o&&typeof o=="object")o=o[r];else return t;return typeof o=="string"?o:t}function Bn(t){fn[t]&&(ht.value=t,localStorage.setItem("gantt-locale",t))}function No(){return ht.value}function _o(){return[{value:"zh-CN",label:"🇨🇳 简体中文"},{value:"en-US",label:"🇺🇸 English"},{value:"ja-JP",label:"🇯🇵 日本語"},{value:"ko-KR",label:"🇰🇷 한국어"},{value:"fr-FR",label:"🇫🇷 Français"},{value:"de-DE",label:"🇩🇪 Deutsch"},{value:"es-ES",label:"🇪🇸 Español"},{value:"ru-RU",label:"🇷🇺 Русский"}]}function ze(){return{locale:e.computed(()=>ht.value),t:Vo,setLocale:Bn,getLocale:No,getLocales:_o,detectBrowserLocale:hn}}const He=[{id:"metro",nameKey:"theme.metro",descKey:"theme.metroDesc",preview:"#0078d4",cssVariables:{"--primary":"#0078d4","--primary-dark":"#106ebe","--primary-light":"#1084d8","--secondary":"#0d5aa7","--bg-metal-light":"linear-gradient(145deg, #ffffff, #f5f5f5)","--bg-metal-normal":"linear-gradient(145deg, #f5f5f5, #e8e8e8)","--bg-metal-dark":"linear-gradient(145deg, #e6e6e6, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #e0e0e0, #f8f8f8)","--bg-active":"linear-gradient(145deg, #0078d4, #106ebe)","--bg-active-hover":"linear-gradient(145deg, #1084d8, #0d5aa7)","--bg-active-pressed":"linear-gradient(145deg, #0d5aa7, #1084d8)","--border":"#d0d0d0","--border-dark":"#b0b0b0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.1)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--text-primary":"#333333","--text-secondary":"#666666","--text-muted":"#999999","--text-white":"#ffffff","--bg-primary":"#f8f8f8","--bg-secondary":"#e8e8e8","--bg-content":"#ffffff","--row-hover":"#FFF3A1","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"dark",nameKey:"theme.dark",descKey:"theme.darkDesc",preview:"#00d4ff",cssVariables:{"--primary":"#00d4ff","--primary-dark":"#00b8e6","--primary-light":"#33ddff","--secondary":"#0099cc","--bg-metal-light":"linear-gradient(145deg, #3a3a3a, #2d2d2d)","--bg-metal-normal":"linear-gradient(145deg, #2d2d2d, #1f1f1f)","--bg-metal-dark":"linear-gradient(145deg, #1f1f1f, #0d0d0d)","--bg-metal-pressed":"linear-gradient(145deg, #0d0d0d, #2d2d2d)","--bg-active":"linear-gradient(145deg, #00d4ff, #0099cc)","--bg-active-hover":"linear-gradient(145deg, #33ddff, #00b8e6)","--bg-active-pressed":"linear-gradient(145deg, #00b8e6, #33ddff)","--border":"#404040","--border-dark":"#2d2d2d","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--shadow-outset":"0 2px 8px rgba(0, 0, 0, 0.3)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.5)","--text-primary":"#ffffff","--text-secondary":"#cccccc","--text-muted":"#888888","--text-white":"#ffffff","--bg-primary":"#1a1a1a","--bg-secondary":"#2d2d2d","--bg-content":"#262626","--row-hover":"#3a4a5a","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"modern",nameKey:"theme.light",descKey:"theme.lightDesc",preview:"#6366f1",cssVariables:{"--primary":"#6366f1","--primary-dark":"#4f46e5","--primary-light":"#8b5cf6","--secondary":"#3730a3","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f0f0f0)","--bg-metal-normal":"linear-gradient(145deg, #f0f0f0, #e0e0e0)","--bg-metal-dark":"linear-gradient(145deg, #e0e0e0, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #d8d8d8, #f0f0f0)","--bg-active":"linear-gradient(145deg, #6366f1, #4f46e5)","--bg-active-hover":"linear-gradient(145deg, #8b5cf6, #6366f1)","--bg-active-pressed":"linear-gradient(145deg, #4f46e5, #8b5cf6)","--border":"#e0e0e0","--border-dark":"#c0c0c0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.05)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#1f2937","--text-secondary":"#6b7280","--text-muted":"#9ca3af","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f9fafb","--bg-content":"#ffffff","--row-hover":"#e0e7ff","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Inter', 'Segoe UI', sans-serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"classic",nameKey:"theme.classic",descKey:"theme.classicDesc",preview:"#2563eb",cssVariables:{"--primary":"#2563eb","--primary-dark":"#1d4ed8","--primary-light":"#3b82f6","--secondary":"#1e40af","--bg-metal-light":"linear-gradient(145deg, #f8f9fa, #e9ecef)","--bg-metal-normal":"linear-gradient(145deg, #e9ecef, #dee2e6)","--bg-metal-dark":"linear-gradient(145deg, #dee2e6, #ced4da)","--bg-metal-pressed":"linear-gradient(145deg, #ced4da, #e9ecef)","--bg-active":"linear-gradient(145deg, #2563eb, #1d4ed8)","--bg-active-hover":"linear-gradient(145deg, #3b82f6, #2563eb)","--bg-active-pressed":"linear-gradient(145deg, #1d4ed8, #3b82f6)","--border":"#ced4da","--border-dark":"#adb5bd","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.12)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.25)","--text-primary":"#212529","--text-secondary":"#495057","--text-muted":"#6c757d","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f8f9fa","--bg-content":"#ffffff","--row-hover":"#dbeafe","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Times New Roman', serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"700"}},{id:"colorful",nameKey:"theme.colorful",descKey:"theme.colorfulDesc",preview:"#f59e0b",cssVariables:{"--primary":"#f59e0b","--primary-dark":"#d97706","--primary-light":"#fbbf24","--secondary":"#b45309","--bg-metal-light":"linear-gradient(145deg, #fef3c7, #fed7aa)","--bg-metal-normal":"linear-gradient(145deg, #fed7aa, #fdba74)","--bg-metal-dark":"linear-gradient(145deg, #fdba74, #fb923c)","--bg-metal-pressed":"linear-gradient(145deg, #fb923c, #fed7aa)","--bg-active":"linear-gradient(145deg, #f59e0b, #d97706)","--bg-active-hover":"linear-gradient(145deg, #fbbf24, #f59e0b)","--bg-active-pressed":"linear-gradient(145deg, #d97706, #fbbf24)","--border":"#fdba74","--border-dark":"#fb923c","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 6px rgba(245, 158, 11, 0.2)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#92400e","--text-secondary":"#b45309","--text-muted":"#d97706","--text-white":"#ffffff","--bg-primary":"#fffbeb","--bg-secondary":"#fef3c7","--bg-content":"#ffffff","--row-hover":"#fef3c7","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Comic Sans MS', cursive","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"apple",nameKey:"theme.apple",descKey:"theme.appleDesc",preview:"#007aff",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f2f2f7)","--bg-metal-normal":"linear-gradient(145deg, #f2f2f7, #e5e5ea)","--bg-metal-dark":"linear-gradient(145deg, #e5e5ea, #d1d1d6)","--bg-metal-pressed":"linear-gradient(145deg, #d1d1d6, #f2f2f7)","--bg-active":"linear-gradient(145deg, #007aff, #0051d5)","--bg-active-hover":"linear-gradient(145deg, #4da3ff, #007aff)","--bg-active-pressed":"linear-gradient(145deg, #0051d5, #4da3ff)","--border":"#d1d1d6","--border-dark":"#c7c7cc","--shadow-inset":"inset 0 0.5px 0 rgba(255, 255, 255, 0.9), inset 0 -0.5px 0 rgba(0, 0, 0, 0.08)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#000000","--text-secondary":"#3c3c43","--text-muted":"#8e8e93","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f2f2f7","--bg-content":"#ffffff","--row-hover":"#e8f4fd","--transition-fast":"0.2s cubic-bezier(0.4, 0, 0.2, 1)","--transition-normal":"0.3s cubic-bezier(0.4, 0, 0.2, 1)","--transition-slow":"0.4s cubic-bezier(0.4, 0, 0.2, 1)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Text', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"liquidGlass",nameKey:"theme.liquidGlass",descKey:"theme.liquidGlassDesc",preview:"linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(220,240,255,0.6) 100%)",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"rgba(255, 255, 255, 0.65)","--bg-metal-normal":"rgba(245, 247, 250, 0.55)","--bg-metal-dark":"rgba(230, 235, 241, 0.6)","--bg-metal-pressed":"rgba(220, 228, 238, 0.7)","--bg-active":"rgba(0, 122, 255, 0.75)","--bg-active-hover":"rgba(77, 163, 255, 0.8)","--bg-active-pressed":"rgba(0, 81, 213, 0.85)","--border":"rgba(255, 255, 255, 0.4)","--border-dark":"rgba(200, 210, 220, 0.5)","--shadow-inset":"inset 0 1px 2px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.05)","--shadow-outset":"0 8px 32px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(255, 255, 255, 0.8)","--shadow-active":"inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 122, 255, 0.25)","--text-primary":"#1d1d1f","--text-secondary":"#424245","--text-muted":"#86868b","--text-white":"#ffffff","--bg-primary":"rgba(250, 250, 252, 0.85)","--bg-secondary":"rgba(242, 242, 247, 0.75)","--bg-content":"rgba(255, 255, 255, 0.7)","--row-hover":"rgba(232, 244, 253, 0.6)","--transition-fast":"0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-normal":"0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-slow":"0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Display', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600","--glass-blur":"12px","--glass-saturation":"180%","--glass-brightness":"105%","--glass-edge-highlight":"rgba(255, 255, 255, 0.9)","--glass-edge-shadow":"rgba(0, 0, 0, 0.1)","--glass-reflection":"linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%)"}}],ut=class ut{constructor(){et(this,"currentTheme","metro");et(this,"storageKey","gantt-theme");et(this,"ganttContainer",null)}static getInstance(){return ut.instance||(ut.instance=new ut),ut.instance}setGanttContainer(n){this.ganttContainer=n,this.loadTheme()}getCurrentTheme(){return this.currentTheme}setTheme(n){const o=He.find(r=>r.id===n);if(!o){console.warn(`Theme ${n} not found`);return}this.currentTheme=n,this.applyTheme(o),this.saveTheme()}applyTheme(n){if(!this.ganttContainer){console.warn("No gantt container available for theme application");return}this.ganttContainer.setAttribute("data-gantt-theme",n.id),Object.entries(n.cssVariables).forEach(([o,r])=>{this.ganttContainer.style.setProperty(o,r)})}loadTheme(){try{const n=localStorage.getItem(this.storageKey);n&&He.find(r=>r.id===n)&&(this.currentTheme=n);const o=He.find(r=>r.id===this.currentTheme);o&&this.applyTheme(o)}catch(n){console.warn("Failed to load theme from localStorage:",n)}}saveTheme(){try{localStorage.setItem(this.storageKey,this.currentTheme)}catch(n){console.warn("Failed to save theme to localStorage:",n)}}getThemes(){return He}getThemeInfo(n){return He.find(o=>o.id===n)}previewTheme(n){const o=He.find(r=>r.id===n);o&&this.applyTheme(o)}cancelPreview(){const n=He.find(o=>o.id===this.currentTheme);n&&this.applyTheme(n)}exportThemeConfig(){return JSON.stringify({currentTheme:this.currentTheme,timestamp:new Date().toISOString()},null,2)}importThemeConfig(n){try{const o=JSON.parse(n);return o.currentTheme&&He.find(r=>r.id===o.currentTheme)?(this.setTheme(o.currentTheme),!0):!1}catch(o){return console.error("Failed to import theme config:",o),!1}}};et(ut,"instance");let pn=ut;const Le=pn.getInstance(),Ao=e.defineComponent({props:{date:{type:String,required:!0},minDate:String,maxDate:String},emits:["confirm","clear"],setup(t,{emit:n}){const{t:o,locale:r}=ze(),s=()=>({"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[r.value]||"en",i=e.computed(()=>{const U=s();return Array.from({length:7},(pe,Ne)=>T().day(Ne+1).locale(U).format("dd"))}),a=U=>T().month(U-1).locale(s()).format("MMMM"),l=e.ref(!1),u=e.ref(!1),c=e.ref(!1),m=e.ref(""),y=e.ref(0),w=e.ref("fadeX_Prev"),I=e.ref(!1),g=e.ref(!1),F=e.ref(null),h=e.ref(null),O=e.ref(null),S=e.ref(null),D=e.ref(0),V=e.ref(0),C=e.ref(Le.getCurrentTheme()),K=e.ref(-1),q=e.ref(-1),j=e.ref({row:-1,col:-1}),X=e.ref(new Date().getFullYear()),A=e.ref(new Date().getMonth()+1),P=e.ref(new Date().getFullYear()),H=e.ref(new Date().getMonth()+1),ee=e.ref(new Date().getDate()),ke=e.ref(1970),p=e.ref(1),d=e.ref(1),b=e.ref(2099),f=e.ref(12),$=e.ref(31),B=U=>{if(!U)return null;const pe=U.split("-");if(pe.length!==3)return null;const Ne=parseInt(pe[0],10),Ie=parseInt(pe[1],10),qe=parseInt(pe[2],10);return isNaN(Ne)||isNaN(Ie)||isNaN(qe)?null:{year:Ne,month:Ie,day:qe}},_=U=>U>9?String(U):`0${U}`,L=e.computed(()=>({year:X.value,month:A.value,monthStr:a(A.value)})),Z=e.computed(()=>({year:P.value,month:H.value,day:ee.value})),G=e.computed(()=>{const U=[];for(let pe=ke.value;pe<=b.value;pe++)U.push(pe);return U}),W=e.computed(()=>Array.from({length:12},(U,pe)=>pe+1)),ne=e.computed(()=>({position:"fixed",top:`${D.value}px`,left:`${V.value}px`,zIndex:100002})),le=()=>X.value<ke.value||X.value===ke.value&&A.value<=p.value,re=()=>X.value>b.value||X.value===b.value&&A.value>=f.value,Te=e.computed(()=>{y.value;const U=X.value,pe=A.value,Ne=new Date(U,pe,0).getDate(),Ie=[];let qe=[];for(let Je=1;Je<=Ne;Je++){const no=new Date(U,pe-1,Je).getDay(),zt=no===0?7:no;if(Je===1&&zt>1)for(let Yt=1;Yt<zt;Yt++)qe.push({value:""});const Yu=U===P.value&&pe===H.value&&Je===ee.value;let Sn=!1;if(U===ke.value&&pe===p.value&&Je<d.value&&(Sn=!0),U===b.value&&pe===f.value&&Je>$.value&&(Sn=!0),qe.push({value:Je,selected:Yu,disabled:Sn}),Je===Ne&&zt<7)for(let Yt=zt;Yt<7;Yt++)qe.push({value:""});(zt===7||Je===Ne)&&(Ie.push(qe),qe=[])}return Ie}),E=()=>{const U=B(t.date);if(U)X.value=U.year,A.value=U.month,P.value=U.year,H.value=U.month,ee.value=U.day;else{const Ie=new Date;X.value=Ie.getFullYear(),A.value=Ie.getMonth()+1,P.value=Ie.getFullYear(),H.value=Ie.getMonth()+1,ee.value=Ie.getDate()}const pe=B(t.minDate||"1970-01-01");pe&&(ke.value=pe.year,p.value=pe.month,d.value=pe.day);const Ne=B(t.maxDate||"2099-12-31");Ne&&(b.value=Ne.year,f.value=Ne.month,$.value=Ne.day),M()},M=()=>{const U=`${P.value}-${_(H.value)}-${_(ee.value)}`,pe=s(),Ne=o("dateFormat.full");m.value=T(U).locale(pe).format(Ne)},ae=U=>{X.value=U,u.value=!1,c.value=!1,y.value++},J=U=>{A.value=U,u.value=!1,c.value=!1,y.value++},k=U=>{if(U.disabled||U.value==="")return;P.value=X.value,H.value=A.value,ee.value=U.value,M(),l.value=!1;const pe=new Date(P.value,H.value-1,ee.value).getDay(),Ne=pe===0?7:pe,Ie=s(),qe=T(`${P.value}-${H.value}-${ee.value}`).locale(Ie).format("dddd");n("confirm",{date:`${P.value}-${_(H.value)}-${_(ee.value)}`,year:P.value,month:H.value,day:ee.value,week:Ne,weekStr:qe,monthStr:a(H.value)})},R=()=>{I.value||le()||(I.value=!0,setTimeout(()=>I.value=!1,300),w.value="fadeX_Prev",A.value<=1?(X.value--,A.value=12):A.value--,y.value++)},te=()=>{g.value||re()||(g.value=!0,setTimeout(()=>g.value=!1,300),w.value="fadeX_Next",A.value>=12?(X.value++,A.value=1):A.value++,y.value++)},oe=()=>{if(u.value=!u.value,c.value=!1,u.value&&O.value){const U=G.value.indexOf(P.value);setTimeout(()=>{O.value&&(O.value.scrollTop=Math.max(0,U-3)*40)},0)}},Y=()=>{if(c.value=!c.value,u.value=!1,c.value&&S.value){const U=H.value-1;setTimeout(()=>{S.value&&(S.value.scrollTop=Math.max(0,U-3)*40)},0)}},me=()=>{u.value=!1},De=()=>{if(h.value){const U=h.value.getBoundingClientRect();D.value=U.bottom+5,V.value=U.left}l.value=!0,setTimeout(()=>{C.value=Le.getCurrentTheme(),be(C.value)},0)},ve=()=>{m.value="",l.value=!1,n("clear")},be=U=>{if(!F.value)return;const pe=Le.getThemeInfo(U);pe&&(F.value.setAttribute("data-gantt-theme",U),Object.entries(pe.cssVariables).forEach(([Ne,Ie])=>{F.value.style.setProperty(Ne,Ie)}))},$e=U=>{F.value&&h.value&&!F.value.contains(U.target)&&!h.value.contains(U.target)&&(l.value=!1)},Ce=U=>K.value===U,he=U=>q.value===U,Me=(U,pe)=>j.value.row===pe&&j.value.col===U,we=U=>K.value=U,_e=()=>K.value=-1,Ue=U=>q.value=U,Rt=()=>q.value=-1,Ru=(U,pe)=>j.value={row:pe,col:U},zu=()=>j.value={row:-1,col:-1};return e.onBeforeMount(()=>E()),e.watch(()=>t.date,()=>E()),e.watch(()=>t.minDate,()=>E()),e.watch(()=>t.maxDate,()=>E()),e.watch(()=>r.value,()=>{m.value&&M(),y.value++}),e.onMounted(()=>{document.addEventListener("click",$e);const U=setInterval(()=>{const pe=Le.getCurrentTheme();pe!==C.value&&(C.value=pe,be(pe))},100);e.onUnmounted(()=>clearInterval(U))}),e.onUnmounted(()=>document.removeEventListener("click",$e)),{t:o,locale:r,getWeekNames:i,getMonthName:a,selectDate:Z,showDate:L,copyMinDate:e.computed(()=>({year:ke.value,month:p.value,day:d.value})),copyMaxDate:e.computed(()=>({year:b.value,month:f.value,day:$.value})),fadeXType:w,nextMonthClick:g,prevMonthClick:I,keepDoubleDigit:_,showYear:u,updateKey:y,yearList:G,rows:Te,yearListRef:O,prevMonth:R,nextMonth:te,selectDay:k,selectYear:ae,openYearList:oe,openMonthList:Y,monthList:W,monthListRef:S,showMonth:c,selectMonth:J,openCalendarList:me,showCalendar:l,openCalendar:De,selectedDateText:m,clearDate:ve,calendarRef:F,inputRef:h,calendarPosition:ne,isYearHovered:Ce,isMonthHovered:he,isDayHovered:Me,handleYearMouseEnter:we,handleYearMouseLeave:_e,handleMonthMouseEnter:Ue,handleMonthMouseLeave:Rt,handleDayMouseEnter:Ru,handleDayMouseLeave:zu}}}),Se=(t,n)=>{const o=t.__vccOpts||t;for(const[r,s]of n)o[r]=s;return o},Bo={class:"date-picker-input-wrapper"},Lo=["placeholder"],Fo={class:"e-date-select"},Io={class:"e-date-year"},Ho={class:"e-date-monthday"},Ro={class:"e-calendar-container"},zo={class:"e-calendar-toolbar"},Yo={key:0,class:"e-calendar-svg-cover"},Oo={class:"e-calendar-toolbar-title"},Po={key:0,class:"e-calendar-svg-cover"},xo={class:"e-calendar-week"},Zo={class:"e-calendar-monthday"},Go=["onClick","onMouseenter"],Wo=["textContent"],jo={key:0,class:"e-calendar-monthday-row-day-cover"},Uo={class:"e-calendar-year",ref:"yearListRef"},qo=["onClick","onMouseenter"],Jo={class:"e-calendar-year",ref:"monthListRef"},Ko=["onClick","onMouseenter"];function Qo(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Bo,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=a=>t.selectedDateText=a),onClick:n[1]||(n[1]=(...a)=>t.openCalendar&&t.openCalendar(...a)),readonly:"",placeholder:t.t("datePicker.selectDate"),class:"date-picker-input",ref:"inputRef"},null,8,Lo),[[e.vModelText,t.selectedDateText]]),t.selectedDateText?(e.openBlock(),e.createElementBlock("span",{key:0,class:"clear-date-button",onClick:n[2]||(n[2]=(...a)=>t.clearDate&&t.clearDate(...a))},n[12]||(n[12]=[e.createElementVNode("svg",{viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"e-calendar",ref:"calendarRef",style:e.normalizeStyle(t.calendarPosition)},[e.createElementVNode("div",Fo,[e.createElementVNode("div",Io,[e.createVNode(e.Transition,{name:"fadeY"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year,class:e.normalizeClass(["e-date-year-select",{active:t.showYear}]),onClick:n[3]||(n[3]=(...a)=>t.openYearList&&t.openYearList(...a))},e.toDisplayString(t.showDate.year),3))]),_:1})]),e.createElementVNode("div",Ho,[e.createVNode(e.Transition,{name:"fadeY"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year+"-"+t.showDate.month,class:e.normalizeClass(["e-date-monthday-select",{active:!t.showYear}]),onClick:n[5]||(n[5]=(...a)=>t.openCalendarList&&t.openCalendarList(...a))},[e.createElementVNode("span",null,e.toDisplayString(t.keepDoubleDigit(t.showDate.month))+"-"+e.toDisplayString(t.keepDoubleDigit(t.selectDate.day)),1),n[13]||(n[13]=e.createTextVNode("  ")),e.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[4]||(n[4]=(...a)=>t.openMonthList&&t.openMonthList(...a))},e.toDisplayString(t.showDate.monthStr),1)],2))]),_:1})])]),e.withDirectives(e.createElementVNode("div",Ro,[e.createElementVNode("div",zo,[e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[6]||(n[6]=(...a)=>t.prevMonth&&t.prevMonth(...a))},[n[14]||(n[14]=e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[e.createElementVNode("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})],-1)),e.createVNode(e.Transition,{name:"e_calendar_svg_btn"},{default:e.withCtx(()=>[t.prevMonthClick?(e.openBlock(),e.createElementBlock("div",Yo)):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",Oo,[e.createVNode(e.Transition,{name:t.fadeXType},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year+"-"+t.showDate.month,class:"e-calendar-toolbar-title-content"},[e.createElementVNode("strong",null,e.toDisplayString(t.showDate.year),1),n[15]||(n[15]=e.createTextVNode("  ")),e.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[7]||(n[7]=(...a)=>t.openMonthList&&t.openMonthList(...a))},e.toDisplayString(t.showDate.monthStr),1)]))]),_:1},8,["name"])]),e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[8]||(n[8]=(...a)=>t.nextMonth&&t.nextMonth(...a))},[n[16]||(n[16]=e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[e.createElementVNode("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})],-1)),e.createVNode(e.Transition,{name:"e_calendar_svg_btn"},{default:e.withCtx(()=>[t.nextMonthClick?(e.openBlock(),e.createElementBlock("div",Po)):e.createCommentVNode("",!0)]),_:1})])]),e.createElementVNode("div",xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getWeekNames,(a,l)=>(e.openBlock(),e.createElementBlock("span",{key:l,class:"e-calendar-week-day"},e.toDisplayString(a),1))),128))]),e.createElementVNode("div",Zo,[(e.openBlock(),e.createElementBlock("div",{key:t.updateKey,class:"e-calendar-monthday-wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"e-calendar-monthday-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(u,c)=>(e.openBlock(),e.createElementBlock("span",{key:c,class:e.normalizeClass(["e-calendar-monthday-row-day",{active:u.selected,disabled:u.disabled,pointer:u.value!=="",hover:t.isDayHovered(c,l)}]),onClick:m=>t.selectDay(u),onMouseenter:m=>t.handleDayMouseEnter(c,l),onMouseleave:n[9]||(n[9]=m=>t.handleDayMouseLeave())},[e.createElementVNode("span",{textContent:e.toDisplayString(u.value),class:"e-calendar-monthday-row-day-value"},null,8,Wo),e.createVNode(e.Transition,{name:"e_calendar_day"},{default:e.withCtx(()=>[u.selected?(e.openBlock(),e.createElementBlock("span",jo)):e.createCommentVNode("",!0)]),_:2},1024)],42,Go))),128))]))),128))]))])],512),[[e.vShow,!t.showYear&&!t.showMonth]]),e.withDirectives(e.createElementVNode("ul",Uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.yearList,(a,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:a===t.selectDate.year,hover:t.isYearHovered(l)}),onClick:u=>t.selectYear(a),onMouseenter:u=>t.handleYearMouseEnter(l),onMouseleave:n[10]||(n[10]=u=>t.handleYearMouseLeave())},e.toDisplayString(a),43,qo))),128))],512),[[e.vShow,t.showYear]]),e.withDirectives(e.createElementVNode("ul",Jo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthList,(a,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:a===t.selectDate.month,hover:t.isMonthHovered(l)}),onClick:u=>t.selectMonth(a),onMouseenter:u=>t.handleMonthMouseEnter(l),onMouseleave:n[11]||(n[11]=u=>t.handleMonthMouseLeave())},e.toDisplayString(t.getMonthName(a)),43,Ko))),128))],512),[[e.vShow,t.showMonth]])],4),[[e.vShow,t.showCalendar]])]))])}const Ln=Se(Ao,[["render",Qo],["__scopeId","data-v-225de415"]]),Xo=e.defineComponent({props:{direction:{type:String,default:"row"},min:{type:Number,required:!0},max:{type:Number,required:!0},paneLengthPercent:{type:Number,required:!0},triggerLength:{type:Number,required:!0}},emits:["update:paneLengthPercent"],setup(t,{emit:n}){let o=e.ref(null),r=e.ref(null),s=e.ref(0),i=e.ref("");const a=e.ref(Le.getCurrentTheme()),l=e.computed(()=>t.direction==="row"?"width":"height"),u=e.computed(()=>{var q;const V=a.value,C=t.direction==="row",K={metro:{default:C?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:C?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:C?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:C?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:C?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:C?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:C?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:C?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:C?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:C?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:C?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:C?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((q=K[V])==null?void 0:q.default)||K.metro.default}),c=e.computed(()=>{var q;const V=a.value,C=t.direction==="row",K={metro:{default:C?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:C?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:C?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:C?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:C?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:C?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:C?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:C?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:C?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:C?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:C?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:C?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((q=K[V])==null?void 0:q.move)||K.metro.move}),m=e.computed(()=>`calc(${t.paneLengthPercent}% - ${t.triggerLength/2}px)`),y=e.computed(()=>`${t.triggerLength}px`),w=e.computed(()=>{const V=a.value,C={metro:"brightness(0.4) opacity(0.5)",dark:"brightness(0) invert(1) opacity(0.9)",modern:"grayscale(0.3) brightness(0.6) opacity(0.4)",classic:"contrast(1.2) brightness(0.5) opacity(0.5)",colorful:"hue-rotate(-30deg) saturate(1.5) brightness(0.7) opacity(0.6)",apple:"brightness(0.5) contrast(1.1) opacity(0.45)",liquidGlass:"opacity(0.6)"};return C[V]||C.metro}),I=e.computed(()=>{const V=a.value,C={metro:"brightness(0.3) opacity(0.8)",dark:"brightness(0) invert(1) opacity(1) drop-shadow(0 0 3px cyan)",modern:"grayscale(0) brightness(0.5) hue-rotate(240deg) opacity(0.8)",classic:"contrast(1.5) brightness(0.4) saturate(1.5) opacity(0.9)",colorful:"hue-rotate(-20deg) saturate(2) brightness(0.6) contrast(1.2) opacity(0.95)",apple:"brightness(0.35) contrast(1.3) saturate(1.2) opacity(0.85)",liquidGlass:"opacity(0.9)"};return C[V]||C.metro});e.onMounted(async()=>{await e.nextTick(),i.value=`background: ${u.value}`});const g=async()=>{await e.nextTick(),i.value=`background: ${u.value}`},F=async()=>{await e.nextTick(),i.value=`background: ${c.value}`},h=V=>{document.addEventListener("mousemove",O),document.addEventListener("mouseup",S),t.direction==="row"?s.value=V.pageX-V.target.getBoundingClientRect().left:s.value=V.pageY-V.target.getBoundingClientRect().top},O=async V=>{if(await e.nextTick(),i.value=`background: ${c.value}`,o.value){const C=o.value.getBoundingClientRect();let K=0;t.direction==="row"?K=(V.pageX-C.left-s.value+t.triggerLength/2)/C.width*100:K=(V.pageY-C.top-s.value+t.triggerLength/2)/C.height*100,K<t.min&&(K=t.min),K>t.max&&(K=t.max),n("update:paneLengthPercent",K)}},S=async()=>{await e.nextTick(),i.value=`background: ${u.value}`,document.removeEventListener("mousemove",O)},D=setInterval(()=>{const V=Le.getCurrentTheme();V!==a.value&&(a.value=V,i.value=`background: ${u.value}`)},100);return e.onUnmounted(()=>{clearInterval(D)}),{splitPane:o,trigger:r,lengthType:l,triggerDefaultColor:u,triggerMoveColor:c,paneLengthValue:m,triggerLengthValue:y,triggerBackGroud:i,iconStyle:w,iconHoverStyle:I,handleMouseLeave:g,handleMouseOver:F,handleMouseDown:h,handleMouseUp:S}}});function ea(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",{ref:"splitPane",class:e.normalizeClass(["split-pane",t.direction]),style:e.normalizeStyle({flexDirection:t.direction})},[e.createElementVNode("div",{class:"pane pane-one",style:e.normalizeStyle(`${t.lengthType}: ${t.paneLengthValue}`)},[e.renderSlot(t.$slots,"one",{},void 0,!0)],4),t.triggerDefaultColor&&t.triggerMoveColor?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"trigger",class:"pane-trigger",style:e.normalizeStyle(`${t.lengthType}: ${t.triggerLengthValue}; ${t.triggerBackGroud}`)},[e.createElementVNode("div",{onClick:n[0]||(n[0]=(...a)=>t.handleMouseOver&&t.handleMouseOver(...a)),onMouseover:n[1]||(n[1]=(...a)=>t.handleMouseOver&&t.handleMouseOver(...a)),onMouseleave:n[2]||(n[2]=(...a)=>t.handleMouseLeave&&t.handleMouseLeave(...a)),onMousedown:n[3]||(n[3]=(...a)=>t.handleMouseDown&&t.handleMouseDown(...a)),class:"icon",style:e.normalizeStyle(`${t.lengthType}: ${t.triggerLengthValue}; filter: ${t.iconStyle}`)},null,36)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"pane pane-two",style:e.normalizeStyle(`${t.lengthType}: calc(${100-t.paneLengthPercent}% - ${t.triggerLength/2}px)`)},[e.renderSlot(t.$slots,"two",{},void 0,!0)],4)],6)}const ta=Se(Xo,[["render",ea],["__scopeId","data-v-7a646dc7"]]),na=e.defineComponent({props:{headers:{type:Array,required:!0}},setup(t){const{t:n}=ze(),o=e.ref(!1),r=e.ref(-1),s=e.ref(0),i=e.ref(0),a=e.ref(null),l=w=>{const g={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[w.property];return g?g.includes(".")?n(g):g:w.title},u=(w,I)=>{w.preventDefault(),w.stopPropagation(),o.value=!0,r.value=I,s.value=w.clientX,i.value=t.headers[I].width;const g=w.target;a.value=g.closest(".headerCaption"),document.addEventListener("mousemove",m,{passive:!1}),document.addEventListener("mouseup",y),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};let c=null;const m=w=>{!o.value||r.value<0||(w.preventDefault(),c!==null&&cancelAnimationFrame(c),c=requestAnimationFrame(()=>{const I=w.clientX-s.value,g=Math.max(50,i.value+I);a.value&&(a.value.style.width=`${g}px`),document.querySelectorAll(`.cellNo[columnindex="${r.value}"], .cell[columnindex="${r.value}"]`).forEach(h=>{h.style.minWidth=`${g}px`,h.style.maxWidth=`${g}px`}),c=null}))},y=()=>{if(o.value){if(c!==null&&(cancelAnimationFrame(c),c=null),a.value&&r.value>=0){const w=parseInt(a.value.style.width);t.headers[r.value].width=w}o.value=!1,r.value=-1,a.value=null,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),document.body.style.cursor="",document.body.style.userSelect=""}};return{getHeaderTitle:l,startResize:u}}}),oa={class:"header"},aa=["property","columnindex"],ra=["onMousedown"];function sa(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",oa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:l,property:a.property,columnindex:l,class:"headerCaption",style:e.normalizeStyle({width:`${a.width}px`})},[e.createElementVNode("span",null,e.toDisplayString(t.getHeaderTitle(a)),1),(a.property==="no"||a.show)&&l<t.headers.length-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resize-handle",onMousedown:u=>t.startResize(u,l)},null,40,ra)):e.createCommentVNode("",!0)],12,aa)),[[e.vShow,a.show]])),128))])}const ia=Se(na,[["render",sa],["__scopeId","data-v-ed37aca8"]]),la={monthHeaders:[],weekHeaders:[],dayHeaders:[],hourHeaders:[],tasks:[],taskHeaders:[],mapFields:{},scale:90,timelineCellCount:0,startGanttDate:null,endGanttDate:null,scrollFlag:!0,mode:null,expandRow:{pid:0,expand:!0},collapsedTasks:new Set,rootTask:{},subTask:{},editTask:{},removeTask:{},allowChangeTaskDate:{},barDate:{id:"",startDate:"",endDate:""}};let v=e.reactive(la),ce={setMonthHeaders(t){v.monthHeaders=t},setDayHeaders(t){v.dayHeaders=t},setTasks(t){v.tasks=t},setTaskHeaders(t){v.taskHeaders=t},setWeekHeaders(t){v.weekHeaders=t},setHourHeaders(t){v.hourHeaders=t},setScale(t){v.scale=t},setMapFields(t){v.mapFields=t},setTimelineCellCount(t){v.timelineCellCount=t},setStartGanttDate(t){v.startGanttDate=t},setEndGanttDate(t){v.endGanttDate=t},setScrollFlag(t){v.scrollFlag=t},setMode(t){v.mode=t},setExpandRow(t){v.expandRow=t},toggleTaskCollapse(t){v.collapsedTasks.has(t)?v.collapsedTasks.delete(t):v.collapsedTasks.add(t),v.collapsedTasks=new Set(v.collapsedTasks)},setRootTask(t){v.rootTask=t},setSubTask(t){v.subTask=t},setEditTask(t){v.editTask=t},setRemoveTask(t){v.removeTask=t},setBarDate(t){v.barDate=t},setAllowChangeTaskDate(t){v.allowChangeTaskDate=t}};const Ye=e.reactive({shouldScrollToToday:!1,triggerScrollToToday(){this.shouldScrollToToday=!0},shouldScroll:!1,triggerScroll(){this.shouldScroll=!0},highlightedId:null,triggerHighlight(t){this.highlightedId=t}}),Fn=e.ref(0),In=e.ref(!1),da=t=>{Fn.value=t},ca=t=>{In.value=t},Hn=()=>({scrollTop:Fn,scrollFlag:In,setScrollTop:da,setScrollFlag:ca}),ua=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})}},setup(t){const n=e.ref(!0),o=e.ref(!1),r="添加子任务",s="删除当前任务",i=e.computed(()=>v.mapFields),a=e.computed(()=>v.subTask),l=e.computed(()=>v.collapsedTasks);e.inject("barHover");const u=e.inject("addRootTask"),c=e.computed(()=>{const C=t.row[i.value.id];return v.tasks.some(K=>K[i.value.parentId]===C)}),m=e.computed(()=>{const C=t.row[i.value.id];return l.value.has(C)}),y=e.computed(()=>{const C=t.row[i.value.parentId];if(!C||C==="0")return!1;const K=v.tasks.filter(X=>X[i.value.parentId]===C);if(K.length===0)return!1;const q=t.row[i.value.id];return K[K.length-1][i.value.id]===q}),w=e.computed(()=>{const C=[],K=t.row.treeLevel||0;if(K<=1)return C;const q=K-1,j=[];let X=t.row;for(;X;){j.unshift(X);const A=X[i.value.parentId];if(!A||A==="0")break;const P=v.tasks.find(H=>H[i.value.id]===A);if(!P)break;X=P}for(let A=j.length-2;A>=0;A--){const P=j[A],H=P[i.value.id],ee=P[i.value.parentId],ke=v.tasks.filter(p=>p[i.value.parentId]===ee);if(ke.length>0){if(ke[ke.length-1][i.value.id]===H)break;{const b=P.treeLevel;b&&b>=1&&b!==q&&C.push(b)}}}return C}),I=()=>{const C=t.row[i.value.id];ce.toggleTaskCollapse(C)};e.onMounted(()=>{});const g=ce.setSubTask,F=ce.setEditTask,h=ce.setRemoveTask,O=(C,K)=>i.value[K]?C[i.value[K]]:C[K]?C[K]:null;return e.watch(()=>Ye.highlightedId,C=>{t.row[i.value.id]===C?o.value=!0:o.value=!1}),{showRow:n,hover:o,addTips:r,removeTips:s,mapFields:i,subTask:a,hasChildren:c,isCollapsed:m,isLastChild:y,getAncestorLines:w,toggleCollapse:I,setSubTask:g,setEditTask:F,setRemoveTask:h,checkField:O,hoverActive:()=>{Ye.triggerHighlight(t.row[i.value.id])},hoverInactive:()=>{Ye.triggerHighlight(null)},addRootTask:()=>{u&&u(t.row)}}}}),fa=["columnindex"],ha={class:"no-cell-content"},ma={class:"tree-lines"},pa=["title"],ga={key:1,class:"collapse-placeholder"},ya={class:"no-text"},ka={class:"action-buttons"},ba=["columnindex"];function wa(t,n,o,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,onMouseover:n[4]||(n[4]=a=>t.hoverActive()),onMouseleave:n[5]||(n[5]=a=>t.hoverInactive()),class:e.normalizeClass({active:t.hover})},[e.createElementVNode("div",{class:"row",onDblclick:n[3]||(n[3]=a=>t.setEditTask(t.row)),style:e.normalizeStyle({height:t.rowHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.property==="no"?(e.openBlock(),e.createElementBlock("div",{class:"cellNo",key:l,columnindex:l,style:e.normalizeStyle({minWidth:a.width+"px",maxWidth:a.width+"px",height:t.rowHeight+"px"})},[e.createElementVNode("div",ha,[e.createElementVNode("div",ma,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getAncestorLines,u=>(e.openBlock(),e.createElementBlock("div",{key:"ancestor-"+u,class:"tree-line-vertical ancestor",style:e.normalizeStyle({left:u*16+8+"px"})},null,4))),128)),t.row.treeLevel===1&&t.hasChildren&&!t.isCollapsed?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:e.normalizeStyle({left:t.row.treeLevel*16+8+"px"})},null,4)):e.createCommentVNode("",!0),t.row.treeLevel&&t.row.treeLevel>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(["tree-line-vertical current",{"is-last-child":t.isLastChild}]),style:e.normalizeStyle({left:(t.row.treeLevel-1)*16+8+"px"})},null,6),e.createElementVNode("div",{class:"tree-line-horizontal",style:e.normalizeStyle({left:(t.row.treeLevel-1)*16+8+"px",width:"32px"})},null,4),t.hasChildren&&!t.isCollapsed?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:e.normalizeStyle({left:t.row.treeLevel*16+8+"px"})},null,4)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"no-left-section",style:e.normalizeStyle({paddingLeft:(t.row.treeLevel||0)*16+"px"})},[t.hasChildren?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=e.withModifiers((...u)=>t.toggleCollapse&&t.toggleCollapse(...u),["stop"])),class:e.normalizeClass(["collapse-btn",{collapsed:t.isCollapsed}]),title:t.isCollapsed?"展开":"折叠"},n[6]||(n[6]=[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},[e.createElementVNode("path",{class:"arrow",d:"M5 4 L14 9 L5 14 Z",fill:"currentColor"})],-1)]),10,pa)):(e.openBlock(),e.createElementBlock("span",ga)),e.createElementVNode("span",ya,e.toDisplayString(t.row.no),1)],4),e.createElementVNode("div",ka,[e.createElementVNode("button",{onClick:n[1]||(n[1]=e.withModifiers(u=>t.setSubTask(t.row),["stop"])),class:"action-btn add-btn",title:"添加子任务"},n[7]||(n[7]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[e.createElementVNode("path",{d:"M8 2a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 2z"})],-1)])),e.createElementVNode("button",{onClick:n[2]||(n[2]=e.withModifiers(u=>t.setRemoveTask(t.row),["stop"])),class:"action-btn delete-btn",title:"删除任务"},n[8]||(n[8]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5.5 5.5A.5.5 0 016 6v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm2.5 0a.5.5 0 01.5.5v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm3 .5a.5.5 0 00-1 0v6a.5.5 0 001 0V6z"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 01-1 1H13v9a2 2 0 01-2 2H5a2 2 0 01-2-2V4h-.5a1 1 0 01-1-1V2a1 1 0 011-1H6a1 1 0 011-1h2a1 1 0 011 1h3.5a1 1 0 011 1v1zM4.118 4L4 4.059V13a1 1 0 001 1h6a1 1 0 001-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"})],-1)]))])])],12,fa)):e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"cell",key:l+"-header",columnindex:l,style:e.normalizeStyle({minWidth:a.width+"px",maxWidth:a.width+"px",height:t.rowHeight+"px"})},e.toDisplayString(t.checkField(t.row,a.property)),13,ba)),[[e.vShow,a.show]])],64))),256))],36)],34)):e.createCommentVNode("",!0)}const Ca=Se(ua,[["render",wa],["__scopeId","data-v-84b9433f"]]),Sa=e.defineComponent({props:{headers:Array,rowHeight:Number,tasks:Array},components:{TaskRow:Ca},setup(t){const n=e.ref([]),o=e.computed(()=>v.mapFields),r=e.computed(()=>v.collapsedTasks),s=c=>{const m=new Set,y=t.tasks||v.tasks,w=I=>{y.filter(F=>F[o.value.parentId]===I).forEach(F=>{const h=F[o.value.id];m.add(h),w(h)})};return w(c),m},i=e.computed(()=>new Set(n.value.map(c=>c[o.value.id]))),a=e.computed(()=>{const c=i.value,m=v.tasks.filter(w=>!c.has(w[o.value.id])),y=new Set;return r.value.forEach(w=>{s(w).forEach(g=>y.add(g))}),m.filter(w=>!y.has(w[o.value.id]))}),l=e.computed({get:()=>v.expandRow,set:c=>{ce.setExpandRow(c)}});e.watch(l,c=>{n.value=[],u(c.pid)});const u=c=>{let m=t.tasks?t.tasks.filter(y=>y[o.value.parentId]===c):[];if(m&&m.length>0)for(let y=0;y<m.length;y++)l.value.expand===!1&&n.value.push(m[y]),u(m[y][o.value.id])};return{filterTask:a,expandRow:l,recursionRow:u,mapFields:o}}});function Ta(t,n,o,r,s,i){const a=e.resolveComponent("TaskRow");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filterTask,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id+"_taskrow"},[t.headers?(e.openBlock(),e.createBlock(a,{key:0,headers:t.headers,rowHeight:t.rowHeight,row:l},null,8,["headers","rowHeight","row"])):e.createCommentVNode("",!0)],64))),128))])}const va=Se(Sa,[["render",Ta]]),$a=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0}},components:{TaskRecursionRow:va},setup(t){const n=e.computed(()=>v.tasks),{scrollTop:o,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=Hn(),a=e.ref(null),l=e.computed(()=>v.mapFields),u=e.computed(()=>n.value.length*t.rowHeight),c=()=>n.value.filter(F=>F[l.value.parentId]==="0");e.watch(o,F=>{!r.value&&a.value&&(a.value.scrollTop=F)});let m=null;const y=()=>{m&&cancelAnimationFrame(m),m=requestAnimationFrame(()=>{a.value&&(i(!0),s(a.value.scrollTop)),m=null})},w=()=>{},I=()=>{if(a.value){const F=document.querySelector(".table .content");F&&(F.scrollWidth>F.clientWidth?a.value.style.paddingBottom="20px":a.value.style.paddingBottom="0px")}};e.watch(n,()=>{setTimeout(I,50)});const g=()=>{setTimeout(I,50)};return e.onMounted(()=>{a.value&&(a.value.scrollTop=o.value,setTimeout(I,100),window.addEventListener("resize",g))}),e.onUnmounted(()=>{window.removeEventListener("resize",g)}),{tasks:n,taskContent:a,scrollFlag:r,mapFields:l,setScrollFlag:i,getRootNode:c,scroll:y,mouseover:w,contentHeight:u}}});function Da(t,n,o,r,s,i){const a=e.resolveComponent("TaskRecursionRow");return e.openBlock(),e.createElementBlock("div",{ref:"taskContent",class:"content",onScroll:n[0]||(n[0]=l=>t.scroll()),onMouseover:n[1]||(n[1]=l=>t.mouseover())},[e.createElementVNode("div",{class:"content-inner",style:e.normalizeStyle({minHeight:t.contentHeight+"px"})},[e.createVNode(a,{headers:t.headers,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["headers","rowHeight","tasks"])],4)],544)}const Ea=Se($a,[["render",Da],["__scopeId","data-v-f13dd030"]]),Ma=e.defineComponent({props:{visible:{type:Boolean,default:!1},headers:{type:Array,required:!0}},emits:["close","update:headers"],setup(t,{emit:n}){const{t:o}=ze(),r=e.ref(null),s=e.ref("metro"),i=w=>{if(!r.value)return;const I=Le.getThemeInfo(w);I&&(r.value.setAttribute("data-gantt-theme",w),Object.entries(I.cssVariables).forEach(([g,F])=>{r.value.style.setProperty(g,F)}))};return e.watch(()=>t.visible,w=>{w&&(s.value=Le.getCurrentTheme(),setTimeout(()=>{i(s.value)},0))}),{t:o,panelRef:r,currentTheme:s,getHeaderTitle:w=>{const g={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[w.property];return g?g.includes(".")?o(g):g:w.title},handleClose:()=>{n("close")},toggleColumn:w=>{const I=[...t.headers];I[w].show=!I[w].show,n("update:headers",I)},showAll:()=>{const w=t.headers.map(I=>({...I,show:!0}));n("update:headers",w)},hideAll:()=>{const w=t.headers.map(I=>({...I,show:!1}));n("update:headers",w)},reset:()=>{const w={no:!0,task:!0,priority:!0,startdate:!0,enddate:!0,takestime:!0,progress:!0,id:!1,parentId:!1},I=t.headers.map(g=>({...g,show:w[g.property]!==void 0?w[g.property]:!0}));n("update:headers",I)}}}}),Va=["data-gantt-theme"],Na=["data-gantt-theme"],_a={class:"panel-header"},Aa=["title"],Ba={class:"panel-desc"},La={class:"action-buttons"},Fa={class:"column-list"},Ia={class:"checkbox-wrapper"},Ha=["checked","onChange"],Ra={class:"column-label"};function za(t,n,o,r,s,i){return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column-config-overlay",onClick:n[4]||(n[4]=e.withModifiers((...a)=>t.handleClose&&t.handleClose(...a),["self"])),"data-gantt-theme":t.currentTheme},[e.createElementVNode("div",{class:"column-config-panel",ref:"panelRef","data-gantt-theme":t.currentTheme},[e.createElementVNode("div",_a,[e.createElementVNode("h3",null,e.toDisplayString(t.t("columnSettings.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=(...a)=>t.handleClose&&t.handleClose(...a)),title:t.t("tooltip.close")},n[5]||(n[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"20",height:"20"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"currentColor"})],-1)]),8,Aa)]),e.createElementVNode("div",Ba,e.toDisplayString(t.t("columnSettings.desc")),1),e.createElementVNode("div",La,[e.createElementVNode("button",{class:"action-btn",onClick:n[1]||(n[1]=(...a)=>t.showAll&&t.showAll(...a))},[n[6]||(n[6]=e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[e.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",fill:"currentColor"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("columnSettings.showAll")),1)]),e.createElementVNode("button",{class:"action-btn",onClick:n[2]||(n[2]=(...a)=>t.hideAll&&t.hideAll(...a))},[n[7]||(n[7]=e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[e.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z",fill:"currentColor"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("columnSettings.hideAll")),1)]),e.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...a)=>t.reset&&t.reset(...a))},[n[8]||(n[8]=e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[e.createElementVNode("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:"currentColor"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("columnSettings.reset")),1)])]),e.createElementVNode("div",Fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:a.property,class:e.normalizeClass(["column-item",{disabled:!a.show}])},[e.createElementVNode("label",Ia,[e.createElementVNode("input",{type:"checkbox",checked:a.show,onChange:u=>t.toggleColumn(l)},null,40,Ha),n[9]||(n[9]=e.createElementVNode("span",{class:"checkbox-custom"},null,-1)),e.createElementVNode("span",Ra,e.toDisplayString(t.getHeaderTitle(a)),1)])],2))),128))])],8,Na)],8,Va)):e.createCommentVNode("",!0)])}const Ya=Se(Ma,[["render",za],["__scopeId","data-v-fd147c82"]]);var Qt={exports:{}},Oa=Qt.exports,Rn;function Pa(){return Rn||(Rn=1,function(t,n){(function(o,r){t.exports=r()})(Oa,function(){return function(o,r,s){r.prototype.isBetween=function(i,a,l,u){var c=s(i),m=s(a),y=(u=u||"()")[0]==="(",w=u[1]===")";return(y?this.isAfter(c,l):!this.isBefore(c,l))&&(w?this.isBefore(m,l):!this.isAfter(m,l))||(y?this.isBefore(c,l):!this.isAfter(c,l))&&(w?this.isAfter(m,l):!this.isBefore(m,l))}}})}(Qt)),Qt.exports}var xa=Pa();const Za=un(xa);T.extend(Za);const Ga=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:0}},components:{TaskHeader:ia,TaskContent:Ea,ColumnConfigPanel:Ya},setup(){const{t}=ze(),n=e.computed(()=>v.tasks),o=e.computed(()=>v.taskHeaders),r=e.computed({get:()=>v.rootTask,set:y=>{ce.setRootTask(y)}}),s=e.computed(()=>v.startGanttDate),i=e.computed(()=>v.endGanttDate),a=e.ref(!1),l=ce.setRootTask;return{t,tasks:n,taskHeaders:o,rootTask:r,startGanttDate:s,endGanttDate:i,setRootTask:l,scrollToToday:()=>{T().isBetween(s.value,i.value)&&Ye.triggerScrollToToday()},columnConfigVisible:a,showColumnConfig:()=>{a.value=!0},updateHeaders:y=>{ce.setTaskHeaders(y)}}}}),Wa={class:"table"},ja=["title"];function Ua(t,n,o,r,s,i){const a=e.resolveComponent("TaskHeader"),l=e.resolveComponent("TaskContent"),u=e.resolveComponent("ColumnConfigPanel");return e.openBlock(),e.createElementBlock("div",Wa,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`})},[(e.openBlock(),e.createElementBlock("svg",{ref:"addTaskSvg",t:"1647915776075",onClick:n[0]||(n[0]=c=>t.setRootTask({})),class:"addRootTask",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3147",width:"28",height:"28"},n[4]||(n[4]=[e.createElementVNode("path",{d:"M864 0H160C70.4 0 0 70.4 0 160v704c0 89.6 70.4 160 160 160h704c89.6 0 160-70.4 160-160V160c0-89.6-70.4-160-160-160z m96 864c0 54.4-41.6 96-96 96H160c-54.4 0-96-41.6-96-96V160c0-54.4 41.6-96 96-96h704c54.4 0 96 41.6 96 96v704z",fill:"currentColor","p-id":"3148"},null,-1),e.createElementVNode("path",{d:"M768 480h-224V256c0-19.2-12.8-32-32-32s-32 12.8-32 32v224H256c-19.2 0-32 12.8-32 32s12.8 32 32 32h224v224c0 19.2 12.8 32 32 32s32-12.8 32-32v-224h224c19.2 0 32-12.8 32-32s-12.8-32-32-32z","p-id":"3149",fill:"currentColor"},null,-1)]),512)),(e.openBlock(),e.createElementBlock("svg",{ref:"jumpTodaySvg",onClick:n[1]||(n[1]=c=>t.scrollToToday()),class:"jumpToToday",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[5]||(n[5]=[e.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16.5 11.5l2 2-2 2",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M18.5 13.5h-4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]),512)),(e.openBlock(),e.createElementBlock("svg",{ref:"columnSettingsSvg",onClick:n[2]||(n[2]=(...c)=>t.showColumnConfig&&t.showColumnConfig(...c)),class:"columnSettings",title:t.t("tooltip.columnSettings"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[6]||(n[6]=[e.createElementVNode("path",{d:"M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z",fill:"none",stroke:"currentColor","stroke-width":"1.5"},null,-1),e.createElementVNode("path",{d:"M5 6h4M5 8h4M15 6h4M15 8h4M5 16h4M5 18h4M15 16h4M15 18h4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),e.createElementVNode("circle",{cx:"20",cy:"4",r:"3",fill:"var(--primary, #0078d4)",stroke:"var(--bg-content, #ffffff)","stroke-width":"1.5"},null,-1)]),8,ja)),e.createVNode(a,{headers:t.taskHeaders},null,8,["headers"])],4),e.createElementVNode("div",{style:e.normalizeStyle({height:`calc(100% - ${t.headersHeight}px)`})},[Array.isArray(t.tasks)&&t.tasks.length>0?(e.openBlock(),e.createBlock(l,{key:0,headers:t.taskHeaders,rowHeight:t.rowHeight},null,8,["headers","rowHeight"])):e.createCommentVNode("",!0)],4),e.createVNode(u,{visible:t.columnConfigVisible,headers:t.taskHeaders,onClose:n[3]||(n[3]=c=>t.columnConfigVisible=!1),"onUpdate:headers":t.updateHeaders},null,8,["visible","headers","onUpdate:headers"])])}const qa=Se(Ga,[["render",Ua],["__scopeId","data-v-d8ceb9cf"]]),Ja=e.defineComponent({props:{weekHeaders:{type:Array,default:()=>[]},dayHeaders:{type:Array,default:()=>[]},monthHeaders:{type:Array,default:()=>[]},hourHeaders:{type:Array,default:()=>[]}},setup(t){const{weekHeaders:n,dayHeaders:o,monthHeaders:r,hourHeaders:s}=e.toRefs(t),{locale:i}=ze();return{weekHeaders:n,dayHeaders:o,monthHeaders:r,hourHeaders:s,isToday:l=>{const c={"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"}[i.value]||"en";return l===T().locale(c).format("YYYY-MM-DD")}}}}),Ka={class:"headerContainer"},Qa={key:0,class:"header"},Xa={key:1,class:"header"},er={key:2,class:"header"},tr={key:0,class:"today",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},nr={key:3,class:"header"};function or(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Ka,[t.monthHeaders&&t.monthHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Qa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle([{"border-bottom":"0px"},{width:a.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0),t.weekHeaders&&t.weekHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Xa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.weekHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle([{"border-top":"1px"},{width:a.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0),t.dayHeaders&&t.dayHeaders.length>0?(e.openBlock(),e.createElementBlock("div",er,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dayHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle({width:a.width+"px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5),t.isToday(a.fulldate)?(e.openBlock(),e.createElementBlock("svg",tr,n[0]||(n[0]=[e.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M8 11l4 4 4-4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):e.createCommentVNode("",!0)],4))),128))])):e.createCommentVNode("",!0),t.hourHeaders&&t.hourHeaders.length>0?(e.openBlock(),e.createElementBlock("div",nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.hourHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle({width:a.width+"px",marginTop:"-2px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0)])}const ar=Se(Ja,[["render",or],["__scopeId","data-v-95fbb3d2"]]);var Xt={exports:{}},rr=Xt.exports,zn;function sr(){return zn||(zn=1,function(t,n){(function(o,r){t.exports=r()})(rr,function(){var o="day";return function(r,s,i){var a=function(c){return c.add(4-c.isoWeekday(),o)},l=s.prototype;l.isoWeekYear=function(){return a(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),o);var m,y,w,I,g=a(this),F=(m=this.isoWeekYear(),y=this.$u,w=(y?i.utc:i)().year(m).startOf("year"),I=4-w.isoWeekday(),w.isoWeekday()>4&&(I+=7),w.add(I,o));return g.diff(F,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var u=l.startOf;l.startOf=function(c,m){var y=this.$utils(),w=!!y.u(m)||m;return y.p(c)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(c,m)}}})}(Xt)),Xt.exports}var ir=sr();const Yn=un(ir);T.extend(Yn);const lr=e.defineComponent({name:"Bar",emits:["progress-update"],props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(t,{emit:n}){const o=e.ref(null),r=e.ref(t.rowHeight*.7),s=e.ref(null),i=e.ref(0),a=e.ref(0),l=e.ref(!0),u=e.ref(!1),c=e.ref(""),m=e.ref(!1),y=e.ref(0),w=e.ref(!1),I=e.computed(()=>v.timelineCellCount),g=e.computed(()=>v.scale),F=e.computed(()=>v.mode),h=e.computed(()=>v.mapFields),O=e.computed(()=>{const A=Number(t.row[h.value.progress]);return isNaN(A)?"0.00%":(A*100).toFixed(2)+"%"}),S=e.inject(ft.SetBarColorSymbol),D=A=>{const P={taskId:t.row[h.value.id],oldProgress:Number(t.row[h.value.progress])||0,newProgress:A,task:t.row};n("progress-update",P),window.dispatchEvent(new CustomEvent("taskProgressUpdate",{detail:P})),console.log("Task progress updated:",P)};e.watch(()=>Ye.highlightedId,A=>{u.value=t.row[h.value.id]===A});const V=()=>Ye.triggerHighlight(t.row[h.value.id]),C=()=>Ye.triggerHighlight(null),K=A=>{y.value;let P="#ffffff",H="#f8f8f8";if(o.value){let ee=o.value.parentElement;for(;ee;){if(ee.hasAttribute("data-gantt-theme")){P=getComputedStyle(ee).getPropertyValue("--bg-content").trim()||"#ffffff",H=getComputedStyle(ee).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}ee=ee.parentElement}}switch(F.value){case"月":case"日":{let ee=T(t.startGanttDate).add(A,"days");return ee.isoWeekday()===7||ee.isoWeekday()===1?H:P}case"周":case"时":return P}},q=ce.setBarDate,j=ce.setAllowChangeTaskDate,X=A=>{let P=0;switch(F.value){case"月":case"日":{let E=T(t.row[h.value.startdate]).diff(T(t.startGanttDate),"days");P=g.value*E;let M=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"days")+1;a.value=M*g.value,t.row[h.value.takestime]=M+"天";break}case"周":{const E=T(t.startGanttDate).startOf("isoWeek"),M=T(t.row[h.value.startdate]).startOf("isoWeek");let ae=M.diff(E,"week");P=g.value*ae;let k=T(t.row[h.value.enddate]).startOf("isoWeek").diff(M,"week")+1;a.value=k*g.value,t.row[h.value.takestime]=k+"周";break}case"时":{let E=T(t.row[h.value.startdate]).diff(T(t.startGanttDate),"hours");P=g.value*E;let M=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"hours")+1;a.value=M*g.value,t.row[h.value.takestime]=M+"小时";break}}i.value=P;let H=cn(A);const ee=getComputedStyle(A).getPropertyValue("--border")||"#cecece";A.setAttribute("data-x",P.toString()),A.setAttribute("width",a.value.toString()),A.setAttribute("stroke",ee),A.setAttribute("stroke-width","1px"),A.style.transform=`translate(${P}px, 0px)`;let ke=H.select("pattern").first(),p=H.children().filter(E=>E.type==="g")[0]||H.group(),d=H.select(".innerRect").first(),b=H.select("rect:not(.innerRect):not(.progressHandle)").first(),f=H.select("text").first(),$=H.select(".progressHandle").first();ke||(ke=H.pattern(10,10,E=>{E.path("M10 -5 -10,15M15,0,0,15M0 -5 -20,15").fill("none").stroke({color:"gray",opacity:.4,width:5})})),p||(p=H.group());let B=t.row[h.value.progress]?Number(a.value)*Number(t.row[h.value.progress]):Number(a.value);d?(d.fill({color:c.value,opacity:.4}),d.width(B)):(d=H.rect(B,r.value).radius(10),d.addClass("innerRect"),p.add(d)),b?b.width(a.value):(b=H.rect(a.value,r.value).radius(10).fill(ke).stroke({color:ee,width:1}),b.on("mouseover",()=>b.animate(200).attr({stroke:"#000",strokeWidth:2,opacity:1})),b.on("mouseleave",()=>b.animate(200).attr({stroke:"#0066ff",strokeWidth:10,opacity:.4}))),f?f.text(O.value):f=H.text(O.value).stroke("#faf7ec");const _=f.bbox();f.font({size:15,anchor:"middle",leading:"1em"}).fill("#000").attr("opacity",1).attr("dominant-baseline","middle").center(d.width()/2+_.width/2,d.height()/2);const L=12,Z=8,G=B-L/2,W=r.value-Z/2,ne=B,le=()=>{let E="#f59e0b",M="#d97706",ae="#fbbf24",J=A.parentElement;for(;J;){if(J.hasAttribute("data-gantt-theme")){E=getComputedStyle(J).getPropertyValue("--primary").trim()||E,M=getComputedStyle(J).getPropertyValue("--primary-dark").trim()||M,ae=getComputedStyle(J).getPropertyValue("--primary-light").trim()||ae;break}J=J.parentElement}return{primary:E,primaryDark:M,primaryLight:ae}};let re=A.querySelector(".progressGuideLine");const Te=le();if(!re){const E=document.createElementNS("http://www.w3.org/2000/svg","line");E.setAttribute("class","progressGuideLine"),E.setAttribute("x1",String(ne)),E.setAttribute("y1","0"),E.setAttribute("x2",String(ne)),E.setAttribute("y2",String(W)),E.setAttribute("stroke",Te.primaryDark),E.setAttribute("stroke-width","2"),E.setAttribute("stroke-dasharray","4,3"),E.setAttribute("opacity","0.8"),A.appendChild(E),re=E}if(re.setAttribute("x1",String(ne)),re.setAttribute("x2",String(ne)),re.setAttribute("y2",String(W)),re.setAttribute("stroke",Te.primaryDark),re.setAttribute("opacity","0.8"),$){$.move(G,W);const E=$.node;E.setAttribute("fill",Te.primary),E.setAttribute("stroke",Te.primaryDark)}else{const E=`${L/2},0 0,${Z} ${L},${Z}`;$=H.polygon(E).fill(Te.primary).stroke({color:Te.primaryDark,width:1}).addClass("progressHandle");const M=$.node;M.style.cursor="ew-resize",M.style.pointerEvents="auto",$.move(G,W);let ae=G;M.addEventListener("mouseenter",()=>{if(!w.value){const J=le();M.setAttribute("fill",J.primaryLight),M.setAttribute("stroke",J.primary),M.setAttribute("stroke-width","2"),re.setAttribute("stroke",J.primaryLight),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","1")}}),M.addEventListener("mouseleave",()=>{if(!w.value){const J=le();M.setAttribute("fill",J.primary),M.setAttribute("stroke",J.primaryDark),M.setAttribute("stroke-width","1"),re.setAttribute("stroke",J.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","0.8")}}),Oe(M).draggable({inertia:!1,listeners:{start:()=>{w.value=!0;const J=le();M.setAttribute("fill",J.primaryDark),M.setAttribute("stroke",J.primaryDark),M.setAttribute("stroke-width","2"),re.setAttribute("stroke",J.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","1")},move:J=>{ae+=J.dx,ae=Math.max(-12/2,Math.min(ae,a.value-L/2)),$.move(ae,W);const k=ae+L/2;re.setAttribute("x1",String(k)),re.setAttribute("x2",String(k));const R=Math.min(1,Math.max(0,(ae+L/2)/a.value));d.width(R*a.value),f.text((R*100).toFixed(2)+"%"),f.center(d.width()/2+_.width/2,d.height()/2)},end:()=>{w.value=!1;const J=le();M.setAttribute("fill",J.primary),M.setAttribute("stroke",J.primaryDark),M.setAttribute("stroke-width","1"),re.setAttribute("stroke",J.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","0.8");const k=Math.min(1,Math.max(0,(ae+L/2)/a.value));t.row[h.value.progress]=k,D(k)}}})}q({id:t.row[h.value.id],startDate:t.row[h.value.startdate],endDate:t.row[h.value.enddate]}),Oe(A).draggable({inertia:!1,modifiers:[Oe.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:E=>{w.value||(i.value=Number(E.target.getAttribute("data-x")),a.value=E.target.width.baseVal.value)},move:E=>{if(w.value)return;let M=((parseFloat(E.target.getAttribute("data-x")||"0")||0)+E.dx).toString();Object.assign(E.target.style,{width:`${E.rect.width}px`,height:`${E.rect.height}px`,transform:`translate(${M}px, 0px)`}),E.target.setAttribute("data-x",M),E.target.setAttribute("data-y","0")},end:E=>{if(w.value)return;let M=E.target,ae=parseFloat(M.getAttribute("data-x")||"0")||0,k=Math.round(ae/g.value)*g.value;k<0&&(k=0),k>I.value*g.value&&(k=I.value*g.value);const R=h.value.parentId||"pid",te=t.row[R];if(te&&te!=="0"){const he=v.tasks.find(Me=>String(Me[h.value.id])===String(te));if(he){let Me=0;if(F.value==="月"||F.value==="日")Me=T(he[h.value.startdate]).diff(T(t.startGanttDate),"days")*g.value;else if(F.value==="周"){const we=T(t.startGanttDate).startOf("isoWeek");Me=T(he[h.value.startdate]).startOf("isoWeek").diff(we,"week")*g.value}else F.value==="时"&&(Me=T(he[h.value.startdate]).diff(T(t.startGanttDate),"hours")*g.value);k<Me&&(k=Me)}}M.style.transform=`translate(${k}px, 0px)`,M.setAttribute("data-x",k.toString());const oe=Math.round((k-i.value)/g.value);let Y=0,me=0;if(F.value==="月"||F.value==="日"?Y=oe:F.value==="周"?Y=oe*7:F.value==="时"&&(me=oe),F.value==="时")t.row[h.value.startdate]=T(t.row[h.value.startdate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.enddate]=T(t.row[h.value.enddate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"hours")+1+"小时";else if(t.row[h.value.startdate]=T(t.row[h.value.startdate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.enddate]=T(t.row[h.value.enddate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss"),F.value==="月"||F.value==="日")t.row[h.value.takestime]=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"days")+1+"天";else if(F.value==="周"){const he=T(t.row[h.value.startdate]).startOf("isoWeek"),Me=T(t.row[h.value.enddate]).startOf("isoWeek");t.row[h.value.takestime]=Me.diff(he,"week")+1+"周"}const De=T(t.row[h.value.startdate]),ve=t.row[h.value.id],be=(he,Me)=>{const we=[];for(const _e of Me)String(_e[R])===String(he)&&(we.push(_e),we.push(...be(_e[h.value.id],Me)));return we},$e=be(ve,v.tasks);if((F.value==="时"?me:Y)>0)for(const he of $e)T(he[h.value.startdate]).isBefore(De)&&(F.value==="时"?(he[h.value.startdate]=T(he[h.value.startdate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss"),he[h.value.enddate]=T(he[h.value.enddate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss")):(he[h.value.startdate]=T(he[h.value.startdate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss"),he[h.value.enddate]=T(he[h.value.enddate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss")),q({id:he[h.value.id],startDate:he[h.value.startdate],endDate:he[h.value.enddate]}));q({id:t.row[h.value.id],startDate:t.row[h.value.startdate],endDate:t.row[h.value.enddate]})}}}),Oe(A).resizable({edges:{left:!0,right:!0,bottom:!1,top:!1},listeners:{start:E=>{i.value=Number(E.target.getAttribute("data-x")),a.value=Number(E.target.getAttribute("width"))},end:E=>{j(t.row);let M=E.target,ae=E.rect.width,J=Math.round(ae/g.value);J<1&&(J=1),ae=J*g.value;let k=i.value;if(E.edges&&E.edges.left){k=i.value+(a.value-ae),k=Math.round(k/g.value)*g.value,k<0&&(k=0);const be=h.value.parentId||"pid",$e=t.row[be];if($e&&$e!=="0"){const Ce=v.tasks.find(he=>String(he[h.value.id])===String($e));if(Ce){let he=0;if(F.value==="月"||F.value==="日")he=T(Ce[h.value.startdate]).diff(T(t.startGanttDate),"days")*g.value;else if(F.value==="周"){const Me=T(t.startGanttDate).startOf("isoWeek");he=T(Ce[h.value.startdate]).startOf("isoWeek").diff(Me,"week")*g.value}else F.value==="时"&&(he=T(Ce[h.value.startdate]).diff(T(t.startGanttDate),"hours")*g.value);k<he&&(k=he,ae=i.value+a.value-k,J=Math.round(ae/g.value),J<1&&(J=1),ae=J*g.value)}}}M.setAttribute("width",ae.toString()),M.style.width=ae+"px",M.style.transform=`translate(${k}px, 0px)`,M.setAttribute("data-x",k.toString());const R=Math.round(k/g.value),te=R+J-1;let oe,Y;if(F.value==="月"||F.value==="日")oe=T(t.startGanttDate).add(R,"days").format("YYYY-MM-DD HH:mm:ss"),Y=T(t.startGanttDate).add(te,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=J+"天";else if(F.value==="周"){const be=T(t.startGanttDate).startOf("isoWeek");oe=be.add(R,"weeks").format("YYYY-MM-DD HH:mm:ss"),Y=be.add(te,"weeks").endOf("isoWeek").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=J+"周"}else oe=T(t.startGanttDate).add(R,"hours").format("YYYY-MM-DD HH:mm:ss"),Y=T(t.startGanttDate).add(te,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=J+"小时";t.row[h.value.startdate]=oe,t.row[h.value.enddate]=Y;let me=cn(A),De=me.select(".innerRect").first(),ve=me.select("rect:not(.innerRect):not(.progressHandle)").first();if(De){let be=t.row[h.value.progress]?ae*Number(t.row[h.value.progress]):ae;De.width(be)}if(ve&&ve.width(ae),E.edges&&E.edges.left){const be=T(oe),$e=t.row[h.value.id],Ce=h.value.parentId||"pid",he=(we,_e)=>{const Ue=[];for(const Rt of _e)String(Rt[Ce])===String(we)&&(Ue.push(Rt),Ue.push(...he(Rt[h.value.id],_e)));return Ue},Me=he($e,v.tasks);for(const we of Me)if(T(we[h.value.startdate]).isBefore(be)){const _e=be.diff(T(we[h.value.startdate]),F.value==="时"?"hours":"days");F.value==="时"?(we[h.value.startdate]=T(we[h.value.startdate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss"),we[h.value.enddate]=T(we[h.value.enddate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss")):(we[h.value.startdate]=T(we[h.value.startdate]).add(_e,"days").format("YYYY-MM-DD HH:mm:ss"),we[h.value.enddate]=T(we[h.value.enddate]).add(_e,"days").format("YYYY-MM-DD HH:mm:ss")),q({id:we[h.value.id],startDate:we[h.value.startdate],endDate:we[h.value.enddate]})}}q({id:t.row[h.value.id],startDate:oe,endDate:Y})}},modifiers:[Oe.modifiers.restrictEdges({outer:"parent"}),Oe.modifiers.restrictSize({min:{width:g.value,height:r.value}})],inertia:!1,hold:1})};return e.watch(()=>[t.row[h.value.startdate],t.row[h.value.enddate]],()=>{o.value&&m.value&&X(o.value)},{deep:!1}),e.onMounted(()=>{if(o.value&&!m.value&&(X(o.value),m.value=!0),S&&(c.value=S(t.row),o.value&&X(o.value)),o.value){let A=o.value.parentElement;for(;A&&!A.hasAttribute("data-gantt-theme");)A=A.parentElement;if(A){const P=new MutationObserver(()=>{y.value++});P.observe(A,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>P.disconnect())}}}),e.onDeactivated(()=>{if(o.value)try{Oe(o.value).unset()}catch{}l.value=!1}),e.onBeforeUnmount(()=>{if(o.value)try{Oe(o.value).unset()}catch{}l.value=!1}),{bar:o,barHeight:r,direction:s,oldBarDataX:i,oldBarWidth:a,showRow:l,hover:u,barColor:c,timelineCellCount:I,scale:g,mode:F,mapFields:h,hoverActive:V,hoverInactive:C,WeekEndColor:K}}}),dr=["data-task-id"],cr=["height"];function ur(t,n,o,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["barRow",{active:t.hover}]),style:e.normalizeStyle({height:t.rowHeight+"px"}),onMouseover:n[0]||(n[0]=a=>t.hoverActive()),onMouseleave:n[1]||(n[1]=a=>t.hoverInactive()),"data-task-id":t.row[t.mapFields.id]},[t.showRow?(e.openBlock(),e.createElementBlock("svg",{key:"row.no",ref:"bar",class:e.normalizeClass(["bar",{active:t.hover}]),height:t.barHeight+"px",style:{overflow:"visible"}},null,10,cr)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,a=>(e.openBlock(),e.createElementBlock("div",{key:a+t.row.id+t.timelineCellCount+t.showRow+"_template",class:"cell",style:e.normalizeStyle({width:t.scale+"px",minWidth:t.scale+"px",maxWidth:t.scale+"px",height:t.rowHeight+"px",background:t.WeekEndColor(a)})},null,4))),128))],46,dr)):e.createCommentVNode("",!0)}const fr=Se(lr,[["render",ur],["__scopeId","data-v-0692589b"]]);T.extend(Yn);const hr=e.defineComponent({name:"Milestone",props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(t){const n=e.ref(null),o=e.ref(t.rowHeight*.6),r=e.ref(!0),s=e.ref(!1),i=e.ref(""),a=e.ref(0),l=e.ref(0),u=e.computed(()=>v.timelineCellCount),c=e.computed(()=>v.scale),m=e.computed(()=>v.mode),y=e.computed(()=>v.mapFields),w=e.inject(ft.SetBarColorSymbol);e.watch(()=>Ye.highlightedId,S=>{s.value=t.row[y.value.id]===S});const I=()=>Ye.triggerHighlight(t.row[y.value.id]),g=()=>Ye.triggerHighlight(null),F=S=>{a.value;let D="#ffffff",V="#f8f8f8";if(n.value){let C=n.value.parentElement;for(;C;){if(C.hasAttribute("data-gantt-theme")){D=getComputedStyle(C).getPropertyValue("--bg-content").trim()||"#ffffff",V=getComputedStyle(C).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}C=C.parentElement}}switch(m.value){case"月":case"日":{let C=T(t.startGanttDate).add(S,"days");return C.isoWeekday()===7||C.isoWeekday()===1?V:D}case"周":case"时":return D}},h=ce.setBarDate,O=S=>{let D=0;switch(m.value){case"月":case"日":{let ne=T(t.row[y.value.startdate]).diff(T(t.startGanttDate),"days");D=c.value*ne+c.value/2,t.row[y.value.takestime]="0天",t.row[y.value.enddate]=t.row[y.value.startdate];break}case"周":{const ne=T(t.startGanttDate).startOf("isoWeek");let re=T(t.row[y.value.startdate]).startOf("isoWeek").diff(ne,"week");D=c.value*re+c.value/2,t.row[y.value.takestime]="0周",t.row[y.value.enddate]=t.row[y.value.startdate];break}case"时":{let ne=T(t.row[y.value.startdate]).diff(T(t.startGanttDate),"hours");D=c.value*ne+c.value/2,t.row[y.value.takestime]="0小时",t.row[y.value.enddate]=t.row[y.value.startdate];break}}l.value=D;let V=cn(S);const C=getComputedStyle(S).getPropertyValue("--border")||"#cecece";S.setAttribute("data-x",D.toString()),S.setAttribute("stroke",C),S.setAttribute("stroke-width","2px"),S.style.transform=`translate(${D}px, 0px)`;let K="#f59e0b",q="#333333",j="#ffffff",X=S.parentElement;for(;X;){if(X.hasAttribute("data-gantt-theme")){const ne=getComputedStyle(X);K=ne.getPropertyValue("--primary").trim()||K,q=ne.getPropertyValue("--text-primary").trim()||q,j=ne.getPropertyValue("--bg-content").trim()||j;break}X=X.parentElement}(j.includes("#1")||j.includes("#2")||j.toLowerCase().includes("dark"))&&q==="#333333"&&(q="#ffffff"),V.clear();const A=o.value,P=A/2,H=t.rowHeight/2,ee=P,ke=ee,p=H-P,d=ee+P,b=H,f=ee,$=H+P,B=ee-P,L=`M ${ke},${p} L ${d},${b} L ${f},${$} L ${B},${H} Z`,Z=V.path(L).fill(i.value||K).stroke({color:C,width:2}).attr("opacity",.9);Z.on("mouseover",()=>{Z.animate(200).attr({opacity:1,strokeWidth:3})}),Z.on("mouseleave",()=>{Z.animate(200).attr({opacity:.9,strokeWidth:2})});const G=V.text(t.row[y.value.task]||"Milestone").move(A+5,H-7).fill(q).attr({"font-size":"14px","font-family":"'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif","font-weight":"400","text-anchor":"start","dominant-baseline":"auto"});j.includes("#1")||j.includes("#2")||j.toLowerCase().includes("dark")?G.attr({stroke:"#000000","stroke-width":"0.5px","paint-order":"stroke fill"}):G.attr({stroke:"#ffffff","stroke-width":"0.5px","paint-order":"stroke fill"}),h({id:t.row[y.value.id],startDate:t.row[y.value.startdate],endDate:t.row[y.value.startdate]}),Oe(S).draggable({inertia:!1,modifiers:[Oe.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:ne=>{l.value=Number(ne.target.getAttribute("data-x"))},move:ne=>{let le=((parseFloat(ne.target.getAttribute("data-x")||"0")||0)+ne.dx).toString();ne.target.style.transform=`translate(${le}px, 0px)`,ne.target.setAttribute("data-x",le)},end:ne=>{let le=ne.target,re=parseFloat(le.getAttribute("data-x")||"0")||0,E=Math.round((re-c.value/2)/c.value)*c.value+c.value/2;E<c.value/2&&(E=c.value/2),E>u.value*c.value&&(E=u.value*c.value-c.value/2);const M=y.value.parentId||"pid",ae=t.row[M];if(ae&&ae!=="0"){const te=v.tasks.find(oe=>String(oe[y.value.id])===String(ae));if(te){let oe=0;if(m.value==="月"||m.value==="日")oe=T(te[y.value.startdate]).diff(T(t.startGanttDate),"days")*c.value+c.value/2;else if(m.value==="周"){const Y=T(t.startGanttDate).startOf("isoWeek");oe=T(te[y.value.startdate]).startOf("isoWeek").diff(Y,"week")*c.value+c.value/2}else m.value==="时"&&(oe=T(te[y.value.startdate]).diff(T(t.startGanttDate),"hours")*c.value+c.value/2);E<oe&&(E=oe)}}le.style.transform=`translate(${E}px, 0px)`,le.setAttribute("data-x",E.toString());const J=Math.round((E-l.value)/c.value);let k=0,R=0;m.value==="月"||m.value==="日"?k=J:m.value==="周"?k=J*7:m.value==="时"&&(R=J),m.value==="时"?(t.row[y.value.startdate]=T(t.row[y.value.startdate]).add(R,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[y.value.enddate]=t.row[y.value.startdate]):(t.row[y.value.startdate]=T(t.row[y.value.startdate]).add(k,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[y.value.enddate]=t.row[y.value.startdate]),h({id:t.row[y.value.id],startDate:t.row[y.value.startdate],endDate:t.row[y.value.startdate]})}}})};return e.watch(()=>[t.row[y.value.startdate]],()=>{n.value&&O(n.value)},{deep:!1}),e.onMounted(()=>{if(n.value&&O(n.value),w&&(i.value=w(t.row),n.value&&O(n.value)),n.value){let S=n.value.parentElement;for(;S&&!S.hasAttribute("data-gantt-theme");)S=S.parentElement;if(S){const D=new MutationObserver(()=>{a.value++});D.observe(S,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>D.disconnect())}}}),e.onBeforeUnmount(()=>{if(n.value)try{Oe(n.value).unset()}catch{}r.value=!1}),{milestone:n,showRow:r,hover:s,milestoneColor:i,timelineCellCount:u,scale:c,mode:m,mapFields:y,hoverActive:I,hoverInactive:g,WeekEndColor:F}}}),mr=["data-task-id"],pr=["height","width"];function gr(t,n,o,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["milestoneRow",{active:t.hover}]),style:e.normalizeStyle({height:t.rowHeight+"px"}),onMouseover:n[0]||(n[0]=a=>t.hoverActive()),onMouseleave:n[1]||(n[1]=a=>t.hoverInactive()),"data-task-id":t.row[t.mapFields.id]},[t.showRow?(e.openBlock(),e.createElementBlock("svg",{key:"milestone",ref:"milestone",class:e.normalizeClass(["milestone",{active:t.hover}]),height:t.rowHeight+"px",width:t.rowHeight*.6+200+"px",style:{overflow:"visible"}},null,10,pr)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,a=>(e.openBlock(),e.createElementBlock("div",{key:a+t.row.id+"_milestone_template",class:"cell",style:e.normalizeStyle({width:t.scale+"px",minWidth:t.scale+"px",maxWidth:t.scale+"px",height:t.rowHeight+"px",background:t.WeekEndColor(a)})},null,4))),128))],46,mr)):e.createCommentVNode("",!0)}const yr=Se(hr,[["render",gr],["__scopeId","data-v-b49d46f1"]]),kr=e.defineComponent({name:"BarRecursionRow",props:{rowHeight:{type:Number,default:0}},setup(){const t=e.ref([]),n=e.ref(0),o=e.inject(ft.SetTaskTypeSymbol),r=e.computed(()=>v.tasks),s=e.computed(()=>v.timelineCellCount),i=e.computed(()=>v.scale),a=e.computed(()=>v.mode),l=e.computed(()=>v.startGanttDate?v.startGanttDate.toISOString():void 0),u=e.computed(()=>v.endGanttDate?v.endGanttDate.toISOString():void 0),c=e.computed(()=>v.mapFields),m=e.computed(()=>v.collapsedTasks),y=S=>{if(o)return o(S);if(S.type)return S.type;const D=S[c.value.startdate],V=S[c.value.enddate];return D&&V&&D===V?wt.MILESTONE:wt.TASK},w=S=>{const D=new Set,V=C=>{r.value.filter(q=>q[c.value.parentId]===C).forEach(q=>{const j=q[c.value.id];D.add(j),V(j)})};return V(S),D},I=e.computed(()=>new Set(t.value.map(S=>S[c.value.id]))),g=e.computed(()=>{const S=I.value,D=v.tasks.filter(C=>!S.has(C[c.value.id])),V=new Set;return m.value.forEach(C=>{w(C).forEach(q=>V.add(q))}),D.filter(C=>!V.has(C[c.value.id]))}),F=e.computed({get:()=>v.expandRow,set:S=>{ce.setExpandRow(S)}});e.watch(F,S=>{t.value=[],h(S.pid)});const h=S=>{let D=r.value.filter(V=>V[c.value.parentId]===S);if(D&&D.length>0)for(let V=0;V<D.length;V++)F.value.expand===!1&&t.value.push(D[V]),h(D[V][c.value.id])},O=ce.setExpandRow;return{hiddenTask:t,componentKey:n,allTask:r,timelineCellCount:s,scale:i,mode:a,startGanttDate:l,endGanttDate:u,mapFields:c,filterTask:g,expandRow:F,setExpandRow:O,recursionRow:h,getTaskType:y,TaskType:wt}},components:{Bar:fr,Milestone:yr},mounted(){this.$nextTick(()=>{})},activated(){this.componentKey++}});function br(t,n,o,r,s,i){const a=e.resolveComponent("Milestone"),l=e.resolveComponent("Bar");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filterTask,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.id},[t.getTaskType(u)===t.TaskType.MILESTONE?(e.openBlock(),e.createBlock(a,{key:0,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:u,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"])):(e.openBlock(),e.createBlock(l,{key:1,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:u,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"]))],64))),128))])}const wr=Se(kr,[["render",br]]),Cr=e.defineComponent({name:"TaskLinks",props:{containerWidth:{type:Number,required:!0},containerHeight:{type:Number,required:!0},linkConfig:{type:Object,default:()=>({color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ve.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"}})}},setup(t){const n=e.ref([]),o=p=>{if(!v.tasks.find(ne=>ne[v.mapFields.id]===p))return null;const b=document.querySelector(`[data-task-id="${p}"]`);if(!b)return null;let f=b.querySelector(".bar"),$=!1;if(f||(f=b.querySelector(".milestone"),$=!0),!f)return null;const B=b.closest(".table .content");if(!B)return null;const _=parseFloat(f.getAttribute("data-x")||"0");let L;$?L=b.getBoundingClientRect().height*.6:L=f.width.baseVal.value;const Z=b.getBoundingClientRect(),G=B.getBoundingClientRect(),W=Z.top-G.top;if($){const ne=L/2;return{x:_,y:W,width:L,height:Z.height,centerX:_+ne,centerY:W+Z.height/2,rightX:_+L,leftX:_,topY:W,bottomY:W+Z.height}}else return{x:_,y:W,width:L,height:Z.height,centerX:_+L/2,centerY:W+Z.height/2,rightX:_+L,leftX:_,topY:W,bottomY:W+Z.height}},r=(p,d)=>v.tasks.filter(f=>f[v.mapFields.parentId]===p&&f[v.mapFields.parentId]!=="0").findIndex(f=>f[v.mapFields.id]===d),s=()=>{const p=document.querySelector(".barRow");return p?p.offsetHeight:50},i=p=>{const d=s();return Math.floor(p/d)*d+d/2},a=(p,d)=>{const b=s();return(Math.floor(p/b)+1+d)*b+b/2},l=(p,d,b)=>{const f=s(),B=Math.floor(p/f)*f+f+b;return d>B+f?i(B+f/2):i(B)},u=p=>{const d=t.linkConfig.linkTypeColors;if(!d)return{[de.FINISH_TO_START]:"#3498db",[de.START_TO_START]:"#2ecc71",[de.FINISH_TO_FINISH]:"#e74c3c",[de.START_TO_FINISH]:"#f39c12",[de.PARENT_CHILD]:"#95a5a6"}[p]||t.linkConfig.color;switch(p){case de.FINISH_TO_START:return d.finishToStart||"#3498db";case de.START_TO_START:return d.startToStart||"#2ecc71";case de.FINISH_TO_FINISH:return d.finishToFinish||"#e74c3c";case de.START_TO_FINISH:return d.startToFinish||"#f39c12";default:return t.linkConfig.color}},c=p=>p===de.PARENT_CHILD?{color:t.linkConfig.parentChildStyle.color||"#95a5a6",width:t.linkConfig.parentChildStyle.width,dashArray:t.linkConfig.parentChildStyle.dashArray}:{color:u(p),width:t.linkConfig.width,dashArray:t.linkConfig.dashArray},m=(p,d,b,f="")=>{if(!p||!d)return"";const{pathType:$}=t.linkConfig;switch(b){case de.PARENT_CHILD:return y(p,d,$);case de.FINISH_TO_START:return F(p,d,$);case de.START_TO_START:return h(p,d,$);case de.FINISH_TO_FINISH:return O(p,d,$);case de.START_TO_FINISH:return S(p,d,$);default:return F(p,d,$)}},y=(p,d,b,f)=>{const $=p.id||p.taskId,B=d.id||d.taskId,_=r($,B),L=p.leftX,Z=p.centerY,G=t.linkConfig.arrowSize||8,W=d.leftX-G,ne=d.centerY;return w(L,Z,W,ne,_,b)},w=(p,d,b,f,$,B)=>{const _=b-p,L=f-d;if(Math.abs(_)<30&&Math.abs(L)<15)return`M ${p} ${d} L ${b} ${f}`;switch(B){case Ve.STRAIGHT:return`M ${p} ${d} L ${b} ${f}`;case Ve.BEZIER:return I(p,d,b,f);case Ve.RIGHT_ANGLE:default:return g(p,d,b,f,$)}},I=(p,d,b,f,$)=>{const B=b-p,{bezierCurvature:_}=t.linkConfig;if(B>0){const L=Math.min(Math.abs(B)*_,60),Z=p+L,G=b-L;return`M ${p} ${d} C ${Z} ${d} ${G} ${f} ${b} ${f}`}else{const L=t.linkConfig.rightAngleOffset,Z=l(d,f,L),G=L*_;return`M ${p} ${d}
2
+ C ${p+G} ${d} ${p+G} ${Z} ${p+L/2} ${Z}
3
+ C ${b-G} ${Z} ${b-G} ${f} ${b} ${f}`}},g=(p,d,b,f,$)=>{const B=b-p,{rightAngleOffset:_,smoothCorners:L,cornerRadius:Z}=t.linkConfig;if(a(d,$),B>0){const G=p+_;if(L&&Z>0){const W=Math.min(Z,Math.abs(f-d)/2,Math.abs(b-G)/2);return`M ${p} ${d}
4
+ L ${G-W} ${d}
5
+ Q ${G} ${d} ${G} ${d+(f>d?W:-W)}
6
+ L ${G} ${f-(f>d?W:-W)}
7
+ Q ${G} ${f} ${G+W} ${f}
8
+ L ${b} ${f}`}else return`M ${p} ${d}
9
+ L ${G} ${d}
10
+ L ${G} ${f}
11
+ L ${b} ${f}`}else{const G=_,W=l(d,f,G),ne=p+G/2,le=b-G/2;if(L&&Z>0){const re=Math.min(Z,G/4);return`M ${p} ${d}
12
+ L ${ne-re} ${d}
13
+ Q ${ne} ${d} ${ne} ${d+re}
14
+ L ${ne} ${W-re}
15
+ Q ${ne} ${W} ${ne+re} ${W}
16
16
  L ${le-re} ${W}
17
17
  Q ${le} ${W} ${le} ${W+re}
18
18
  L ${le} ${f-re}
19
19
  Q ${le} ${f} ${le+re} ${f}
20
- L ${y} ${f}`}else return`M ${h} ${c}
21
- L ${te} ${c}
22
- L ${te} ${W}
20
+ L ${b} ${f}`}else return`M ${p} ${d}
21
+ L ${ne} ${d}
22
+ L ${ne} ${W}
23
23
  L ${le} ${W}
24
24
  L ${le} ${f}
25
- L ${y} ${f}`}},F=(h,c,y)=>{const f=t.linkConfig.arrowSize||8,D=h.rightX,L=h.centerY,M=c.leftX-f,B=c.centerY;return v(D,L,M,B,y,"horizontal")},m=(h,c,y)=>{const f=t.linkConfig.arrowSize||8,D=h.leftX,L=h.centerY,M=c.leftX-f,B=c.centerY;return v(D,L,M,B,y,"left-u")},R=(h,c,y)=>{const f=t.linkConfig.arrowSize||8,D=h.rightX,L=h.centerY,M=c.rightX+f,B=c.centerY;return v(D,L,M,B,y,"right-u")},b=(h,c,y)=>{const f=t.linkConfig.arrowSize||8,D=h.leftX,L=h.centerY,M=c.rightX+f,B=c.centerY;return v(D,L,M,B,y,"cross")},v=(h,c,y,f,D,L)=>{const{bezierCurvature:M,rightAngleOffset:B,smoothCorners:x,cornerRadius:P}=t.linkConfig;switch(D){case Ne.STRAIGHT:return`M ${h} ${c} L ${y} ${f}`;case Ne.BEZIER:return V(h,c,y,f,L,M);case Ne.RIGHT_ANGLE:default:return k(h,c,y,f,L,B,x,P)}},V=(h,c,y,f,D,L)=>{const M=y-h,B=f-c;switch(D){case"horizontal":if(M>20&&Math.abs(B)<10)return`M ${h} ${c} L ${y} ${f}`;if(M<20){const Me=l(c,f,30),Se=30*L;return`M ${h} ${c}
26
- C ${h+Se} ${c} ${h+Se} ${Me} ${h+30/2} ${Me}
27
- C ${y-Se} ${Me} ${y-Se} ${f} ${y} ${f}`}const x=Math.min(Math.abs(M)*L,60),P=h+x,W=y-x;return`M ${h} ${c} C ${P} ${c} ${W} ${f} ${y} ${f}`;case"left-u":const te=25,le=Math.min(h,y)-te,re=te*L;if(Math.abs(B)>i()){const ge=s((c+f)/2);return`M ${h} ${c}
28
- C ${h-re} ${c} ${le} ${c+re} ${le} ${ge}
29
- C ${le} ${f-re} ${y-re} ${f} ${y} ${f}`}return`M ${h} ${c} C ${le} ${c} ${le} ${f} ${y} ${f}`;case"right-u":const De=25,$=Math.max(h,y)+De,_=De*L;if(Math.abs(B)>i()){const ge=s((c+f)/2);return`M ${h} ${c}
30
- C ${h+_} ${c} ${$} ${c+_} ${$} ${ge}
31
- C ${$} ${f-_} ${y+_} ${f} ${y} ${f}`}return`M ${h} ${c} C ${$} ${c} ${$} ${f} ${y} ${f}`;case"cross":if(M>20&&Math.abs(B)<10)return`M ${h} ${c} L ${y} ${f}`;const oe=Math.min(Math.abs(M)*L,60),q=h-oe,ne=y+oe;return`M ${h} ${c} C ${q} ${c} ${ne} ${f} ${y} ${f}`;default:return`M ${h} ${c} L ${y} ${f}`}},k=(h,c,y,f,D,L,M,B)=>{const x=y-h,P=f-c;switch(D){case"horizontal":if(x>20&&Math.abs(P)<10)return`M ${h} ${c} L ${y} ${f}`;if(x<20){const _=L,oe=l(c,f,_),q=h+_/2,ne=y-_/2;if(M&&B>0){const ge=Math.min(B,_/4);return`M ${h} ${c}
32
- L ${q-ge} ${c}
33
- Q ${q} ${c} ${q} ${c+ge}
34
- L ${q} ${oe-ge}
35
- Q ${q} ${oe} ${q+ge} ${oe}
36
- L ${ne-ge} ${oe}
37
- Q ${ne} ${oe} ${ne} ${oe+ge}
38
- L ${ne} ${f-ge}
39
- Q ${ne} ${f} ${ne+ge} ${f}
40
- L ${y} ${f}`}return`M ${h} ${c}
41
- L ${q} ${c}
42
- L ${q} ${oe}
43
- L ${ne} ${oe}
44
- L ${ne} ${f}
45
- L ${y} ${f}`}const W=h+Math.abs(x)/2;if(M&&B>0){const _=Math.min(B,Math.abs(x)/4,Math.abs(P)/2);return P>0?`M ${h} ${c}
46
- L ${W-_} ${c}
47
- Q ${W} ${c} ${W} ${c+_}
48
- L ${W} ${f-_}
49
- Q ${W} ${f} ${W+_} ${f}
50
- L ${y} ${f}`:`M ${h} ${c}
51
- L ${W-_} ${c}
52
- Q ${W} ${c} ${W} ${c-_}
53
- L ${W} ${f+_}
54
- Q ${W} ${f} ${W+_} ${f}
55
- L ${y} ${f}`}return`M ${h} ${c} L ${W} ${c} L ${W} ${f} L ${y} ${f}`;case"left-u":const te=L,le=Math.min(h,y)-te;if(M&&B>0){const _=Math.min(B,te/2,Math.abs(P)/4);return`M ${h} ${c}
56
- L ${le+_} ${c}
57
- Q ${le} ${c} ${le} ${c+(P>0?_:-_)}
58
- L ${le} ${f-(P>0?_:-_)}
59
- Q ${le} ${f} ${le+_} ${f}
60
- L ${y} ${f}`}return`M ${h} ${c} L ${le} ${c} L ${le} ${f} L ${y} ${f}`;case"right-u":const re=L,De=Math.max(h,y)+re;if(M&&B>0){const _=Math.min(B,re/2,Math.abs(P)/4);return`M ${h} ${c}
61
- L ${De-_} ${c}
62
- Q ${De} ${c} ${De} ${c+(P>0?_:-_)}
63
- L ${De} ${f-(P>0?_:-_)}
64
- Q ${De} ${f} ${De-_} ${f}
65
- L ${y} ${f}`}return`M ${h} ${c} L ${De} ${c} L ${De} ${f} L ${y} ${f}`;case"cross":if(x>20&&Math.abs(P)<10)return`M ${h} ${c} L ${y} ${f}`;const $=h+x/2;if(M&&B>0){const _=Math.min(B,Math.abs(x)/4,Math.abs(P)/2);return P>0?`M ${h} ${c}
66
- L ${$-_} ${c}
67
- Q ${$} ${c} ${$} ${c+_}
68
- L ${$} ${f-_}
69
- Q ${$} ${f} ${$+_} ${f}
70
- L ${y} ${f}`:`M ${h} ${c}
71
- L ${$-_} ${c}
72
- Q ${$} ${c} ${$} ${c-_}
73
- L ${$} ${f+_}
74
- Q ${$} ${f} ${$+_} ${f}
75
- L ${y} ${f}`}return`M ${h} ${c} L ${$} ${c} L ${$} ${f} L ${y} ${f}`;default:return`M ${h} ${c} L ${y} ${f}`}},J=(h,c,y=de.FINISH_TO_START)=>{if(!h)return console.warn("子任务位置无效"),"";try{const f=h.leftX,D=h.centerY,L=f-c,M=D-c/2,B=D+c/2;return`${f},${D} ${L},${M} ${L},${B}`}catch(f){return console.error("箭头生成失败:",f),""}},j=(h,c,y,f)=>{if(!h||!c)return"";try{let D,L,M="right";switch(y){case de.FINISH_TO_START:D=c.leftX,L=c.centerY,M="right";break;case de.START_TO_START:D=c.leftX,L=c.centerY,M="right";break;case de.FINISH_TO_FINISH:D=c.rightX,L=c.centerY,M="left";break;case de.START_TO_FINISH:D=c.rightX,L=c.centerY,M="left";break;default:D=c.leftX,L=c.centerY,M="right"}let B,x,P,W;return M==="right"?(B=D-f,x=L-f/2,P=D-f,W=L+f/2):(B=D+f,x=L-f/2,P=D+f,W=L+f/2),`${D},${L} ${B},${x} ${P},${W}`}catch(D){return console.error("依赖箭头生成失败:",D),""}},U=h=>{const c=new Set,y=f=>{T.tasks.filter(L=>L[T.mapFields.parentId]===f).forEach(L=>{const M=L[T.mapFields.id];c.add(M),y(M)})};return y(h),c},Q=h=>{for(const c of T.collapsedTasks)if(U(c).has(h))return!0;return!1},A=()=>{const h=[],c=t.linkConfig.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0};c.parentChild&&T.tasks.forEach(D=>{const L=D[T.mapFields.parentId],M=D[T.mapFields.id];if(L&&L!=="0"){if(Q(M))return;const B=o(L),x=o(M);if(B&&x){const P=`parent-child-${L}-${M}`,W={...B,id:L,taskId:L},te={...x,id:M,taskId:M},le=p(W,te,de.PARENT_CHILD,P),re=t.linkConfig.showArrow?J(x,t.linkConfig.arrowSize,de.PARENT_CHILD):"";h.push({id:P,sourceId:L,targetId:M,type:de.PARENT_CHILD,path:le,arrowPoints:re,labelX:x.centerX,labelY:x.centerY-10})}}});const y=Qt.getDependencies(),f=D=>{switch(D){case de.FINISH_TO_START:return c.finishToStart;case de.START_TO_START:return c.startToStart;case de.FINISH_TO_FINISH:return c.finishToFinish;case de.START_TO_FINISH:return c.startToFinish;case de.PARENT_CHILD:return c.parentChild;default:return!0}};y.forEach(D=>{if(!f(D.type))return;const L=o(D.sourceTaskId),M=o(D.targetTaskId);if(L&&M){const B=`dependency-${D.id}`,x={...L,id:D.sourceTaskId,taskId:D.sourceTaskId},P={...M,id:D.targetTaskId,taskId:D.targetTaskId},W=p(x,P,D.type,B),te=t.linkConfig.showArrow?j(x,P,D.type,t.linkConfig.arrowSize):"",le={[de.FINISH_TO_START]:"FS",[de.START_TO_START]:"SS",[de.FINISH_TO_FINISH]:"FF",[de.START_TO_FINISH]:"SF",[de.PARENT_CHILD]:""};h.push({id:B,sourceId:D.sourceTaskId,targetId:D.targetTaskId,type:D.type,path:W,arrowPoints:te,label:le[D.type]||"",labelX:(L.centerX+M.centerX)/2,labelY:(L.centerY+M.centerY)/2-10})}}),n.value=h};e.watch(()=>T.tasks,()=>{setTimeout(A,50)},{deep:!0}),e.watch(()=>T.scale,()=>{setTimeout(A,50)}),e.watch(()=>T.mode,()=>{setTimeout(A,200)}),e.watch(()=>T.timelineCellCount,()=>{setTimeout(A,100)}),e.watch(()=>[T.startGanttDate,T.endGanttDate],()=>{setTimeout(A,100)}),e.watch(()=>T.barDate,()=>{requestAnimationFrame(A)},{deep:!0}),e.watch(()=>t.linkConfig.linkTypeVisibility,()=>{setTimeout(A,50)},{deep:!0}),e.watch(()=>T.collapsedTasks,()=>{setTimeout(A,50)},{deep:!0});let Y=null,H=null;e.onMounted(()=>{setTimeout(A,100);const h=document.querySelector(".gantt");h&&(Y=new ResizeObserver(A),Y.observe(h),H=new MutationObserver(c=>{let y=!1;c.forEach(f=>{var L,M;const D=f.target;if(f.type==="attributes"){const B=f.attributeName;(B==="data-x"||B==="width"||B==="style"||B==="transform")&&((L=D.classList)!=null&&L.contains("bar")||(M=D.classList)!=null&&M.contains("barRow")||D.tagName==="svg")&&(y=!0)}}),y&&requestAnimationFrame(A)}),H.observe(h,{attributes:!0,subtree:!0,attributeFilter:["style","data-x","transform","width"]}))}),e.onUnmounted(()=>{Y&&Y.disconnect(),H&&H.disconnect()});const X=h=>{const c=d(h);return!!(c.dashArray&&c.dashArray.length>0)};return{links:n,updateLinks:A,getLinkStyle:d,isDashedLine:X,getDashAnimationStyle:h=>{if(!X(h.type)||!t.linkConfig.enableDashAnimation)return{};const c=d(h.type),y=t.linkConfig.dashAnimationSpeed||.8,f=h.type===de.PARENT_CHILD?y*.6:y,M=(c.dashArray||"5,5").split(",").map(Number).reduce((B,x)=>B+x,0);return{"--animation-duration":`${f}s`,"--dash-length":`${M}px`}}}}}),sr=["width","height"],lr=["d","stroke","stroke-width","stroke-dasharray"],dr=["points","fill","stroke"],cr=["x","y","fill","font-size"];function ur(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("svg",{class:"task-links-layer",width:t.containerWidth,height:t.containerHeight,style:{position:"absolute",top:"0px",left:"0px",pointerEvents:"none",zIndex:50,overflow:"visible"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,a=>(e.openBlock(),e.createElementBlock("g",{key:a.id},[e.createElementVNode("path",{d:a.path,stroke:t.getLinkStyle(a.type).color,"stroke-width":t.getLinkStyle(a.type).width,"stroke-dasharray":t.getLinkStyle(a.type).dashArray,fill:"none",class:e.normalizeClass(["task-link",a.type,{"dash-animated":t.isDashedLine(a.type)&&t.linkConfig.enableDashAnimation}]),style:e.normalizeStyle(t.getDashAnimationStyle(a))},null,14,lr),t.linkConfig.showArrow&&a.arrowPoints&&a.arrowPoints.length>0?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:a.arrowPoints,fill:t.getLinkStyle(a.type).color,stroke:t.getLinkStyle(a.type).color,"stroke-width":.5,class:"task-link-arrow"},null,8,dr)):e.createCommentVNode("",!0),a.label&&t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock("text",{key:1,x:a.labelX,y:a.labelY,fill:t.linkConfig.labelColor,"font-size":t.linkConfig.labelFontSize,"text-anchor":"middle",class:"task-link-label"},e.toDisplayString(a.label),9,cr)):e.createCommentVNode("",!0)]))),128))],8,sr)}const fr=Ve(ir,[["render",ur],["__scopeId","data-v-479c409d"]]),mr=e.defineComponent({props:{rowHeight:{type:Number,required:!0},headers:{type:Array,default:()=>[]}},components:{BarRecursionRow:rr,TaskLinks:fr},setup(t){const n=e.ref(null),{scrollTop:o,scrollFlag:r,setScrollTop:i,setScrollFlag:s}=In(),{config:a}=Tt(),l=e.computed(()=>T.tasks),u=e.computed(()=>T.timelineCellCount),d=e.computed(()=>T.scale),p=e.computed(()=>T.mode),g=e.computed(()=>T.startGanttDate),C=e.computed(()=>T.endGanttDate),G=e.computed(()=>T.mapFields),E=e.computed(()=>u.value*d.value),F=e.computed(()=>l.value.length*t.rowHeight);e.watch(o,U=>{r.value&&n.value&&(n.value.scrollTop=U)}),e.onMounted(()=>{n.value&&(n.value.scrollTop=o.value)});const m=()=>l.value.filter(U=>U[G.value.parentId]==="0");let R=null;const b=()=>{R&&cancelAnimationFrame(R),R=requestAnimationFrame(()=>{n.value&&(s(!1),i(n.value.scrollTop)),R=null})},v=()=>{},V=e.ref(!1),k=e.ref(0);return{barContent:n,scrollFlag:r,tasks:l,timelineCellCount:u,scale:d,mode:p,startGanttDate:g,endGanttDate:C,mapFields:G,getRootNode:m,scroll:b,mouseover:v,setScrollFlag:s,containerWidth:E,containerHeight:F,linkConfig:a,showGuideLine:V,guideLineX:k,handleMouseMove:U=>{if(!n.value)return;const Q=n.value.getBoundingClientRect(),A=U.clientX-Q.left+n.value.scrollLeft,Y=d.value,X=Math.floor(A/Y)*Y+Y/2;k.value=X,V.value=!0},handleMouseLeave:()=>{V.value=!1}}}});function hr(t,n,o,r,i,s){const a=e.resolveComponent("BarRecursionRow"),l=e.resolveComponent("TaskLinks");return t.tasks?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"barContent",onScroll:n[0]||(n[0]=u=>t.scroll()),onMousemove:n[1]||(n[1]=(...u)=>t.handleMouseMove&&t.handleMouseMove(...u)),onMouseleave:n[2]||(n[2]=(...u)=>t.handleMouseLeave&&t.handleMouseLeave(...u)),class:"content"},[e.createElementVNode("div",{class:"content-inner",style:e.normalizeStyle({minHeight:t.containerHeight+"px",position:"relative"})},[t.showGuideLine?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column-guide-line",style:e.normalizeStyle({left:t.guideLineX+"px",height:t.containerHeight+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(a,{key:`${t.mode}-${t.scale}-${t.timelineCellCount}`,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["rowHeight","tasks"])),e.createVNode(l,{containerWidth:t.containerWidth,containerHeight:t.containerHeight,linkConfig:t.linkConfig},null,8,["containerWidth","containerHeight","linkConfig"])],4)],544)):e.createCommentVNode("",!0)}const pr=Ve(mr,[["render",hr],["__scopeId","data-v-bdd53971"]]),gr=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:50}},components:{TimelineHeader:Po,TableContent:pr},setup(t){const n=e.ref(null),o=e.computed(()=>T.dayHeaders),r=e.computed(()=>T.weekHeaders),i=e.computed(()=>T.monthHeaders),s=e.computed(()=>T.hourHeaders),a=e.computed(()=>T.startGanttDate),l=e.computed(()=>T.mode),u=e.computed(()=>T.scale);T.timelineCellCount*u.value+100,T.tasks.length*t.rowHeight+100;const d=()=>{if(n.value)switch(l.value){case"月":case"日":n.value.scrollLeft=Number(w().diff(w(a.value),"day"))*Number(u.value);break;case"周":const p=w().startOf("isoWeek"),g=w(a.value).startOf("isoWeek");n.value.scrollLeft=Number(p.diff(g,"week"))*Number(u.value);break;case"时":n.value.scrollLeft=Number(w().diff(w(a.value),"hour"))*Number(u.value);break}};return e.watch(()=>Ye.shouldScrollToToday,p=>{p&&(d(),Ye.shouldScrollToToday=!1)}),e.onMounted(()=>{}),{tableBar:n,dayHeaders:o,weekHeaders:r,monthHeaders:i,hourHeaders:s,startGanttDate:a,mode:l,scale:u,scrollToToday:d}}}),yr={ref:"tableBar",class:"table"};function kr(t,n,o,r,i,s){const a=e.resolveComponent("TimelineHeader"),l=e.resolveComponent("TableContent");return e.openBlock(),e.createElementBlock("div",yr,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`,width:"fit-content"})},[e.createVNode(a,{weekHeaders:t.weekHeaders,hourHeaders:t.hourHeaders,dayHeaders:t.dayHeaders,monthHeaders:t.monthHeaders},null,8,["weekHeaders","hourHeaders","dayHeaders","monthHeaders"])],4),e.createElementVNode("div",{class:"content",style:e.normalizeStyle({height:`calc(100% - ${t.headersHeight}px)`,width:"fit-content",position:"relative"})},[e.createVNode(l,{rowHeight:t.rowHeight},null,8,["rowHeight"])],4)],512)}const br=Ve(gr,[["render",kr],["__scopeId","data-v-3dce5fd1"]]),wr=e.defineComponent({name:"GanttConfigPanel",setup(){var J,j,U,Q,A,Y,H,X,Te,h,c,y;const{t,locale:n,setLocale:o,getLocales:r}=tt(),i=e.ref(!1),s=e.ref(He),a=e.ref("metro"),l=e.ref(null),u=e.computed(()=>n.value),d=e.computed(()=>r()),p=f=>{o(f)},g=e.inject("ganttContainer"),{config:C,updateConfig:G}=Tt(),E=e.ref({pathType:C.pathType||Ne.BEZIER,color:C.color||"#3498db",width:C.width||2,dashArray:C.dashArray,bezierCurvature:C.bezierCurvature||.5,rightAngleOffset:C.rightAngleOffset||40,smoothCorners:C.smoothCorners||!1,cornerRadius:C.cornerRadius||5,showArrow:C.showArrow!==void 0?C.showArrow:!0,arrowSize:C.arrowSize||8,arrowColor:C.arrowColor||"#3498db",enableDashAnimation:C.enableDashAnimation||!1,dashAnimationSpeed:C.dashAnimationSpeed||1,showLabels:C.showLabels||!1,labelColor:C.labelColor||"#333333",labelFontSize:C.labelFontSize||12,parentChildStyle:{color:((J=C.parentChildStyle)==null?void 0:J.color)||"#999999",width:((j=C.parentChildStyle)==null?void 0:j.width)||1.5,dashArray:((U=C.parentChildStyle)==null?void 0:U.dashArray)||"3,3"},linkTypeColors:{finishToStart:((Q=C.linkTypeColors)==null?void 0:Q.finishToStart)||"#3498db",startToStart:((A=C.linkTypeColors)==null?void 0:A.startToStart)||"#2ecc71",finishToFinish:((Y=C.linkTypeColors)==null?void 0:Y.finishToFinish)||"#e74c3c",startToFinish:((H=C.linkTypeColors)==null?void 0:H.startToFinish)||"#f39c12"},linkTypeVisibility:{finishToStart:((X=C.linkTypeVisibility)==null?void 0:X.finishToStart)??!0,startToStart:((Te=C.linkTypeVisibility)==null?void 0:Te.startToStart)??!0,finishToFinish:((h=C.linkTypeVisibility)==null?void 0:h.finishToFinish)??!0,startToFinish:((c=C.linkTypeVisibility)==null?void 0:c.startToFinish)??!0,parentChild:((y=C.linkTypeVisibility)==null?void 0:y.parentChild)??!0}}),F=e.computed(()=>[{value:Ne.STRAIGHT,name:t("configPanel.linkConfig.straight"),preview:"M 10 20 L 50 20"},{value:Ne.BEZIER,name:t("configPanel.linkConfig.bezier"),preview:"M 10 25 Q 30 5 50 25"},{value:Ne.RIGHT_ANGLE,name:t("configPanel.linkConfig.rightAngle"),preview:"M 10 15 L 25 15 L 25 25 L 50 25"}]),m=()=>{i.value=!i.value,i.value&&setTimeout(()=>{b(a.value)},0)},R=()=>{i.value=!1},b=f=>{if(!l.value)return;const D=Ie.getThemeInfo(f);D&&(l.value.setAttribute("data-gantt-theme",f),Object.entries(D.cssVariables).forEach(([L,M])=>{l.value.style.setProperty(L,M)}))},v=f=>{a.value=f,Ie.setTheme(f),b(f)},V=f=>{E.value.pathType=f,k()},k=()=>{G(E.value)};return e.onMounted(()=>{g!=null&&g.value?Ie.setGanttContainer(g.value):console.warn("GanttConfigPanel: ganttContainer not available"),a.value=Ie.getCurrentTheme()}),e.watch(E,f=>{G(f)},{deep:!0}),{t,isOpen:i,themes:s,currentTheme:a,linkConfig:E,pathTypes:F,currentLocale:u,locales:d,togglePanel:m,closePanel:R,selectTheme:v,selectPathType:V,selectLocale:p,updateLinkConfig:k,configPanelRef:l}}}),Cr={class:"config-panel-wrapper"},Tr=["title"],Sr={class:"btn-content"},vr={class:"btn-text"},Dr=["data-gantt-theme"],Er={class:"panel-header"},Mr=["title"],$r={class:"panel-content"},Nr={class:"config-section"},Vr={class:"section-title"},_r={class:"language-selector-inline"},Ar=["onClick"],Lr={class:"lang-label"},Br={key:0,class:"lang-check"},Fr={class:"config-section"},Hr={class:"section-title"},Ir={class:"theme-grid"},Rr=["onClick"],Yr={class:"theme-info"},zr={class:"theme-name"},Or={class:"theme-desc"},xr={key:0,class:"theme-check"},Pr={class:"config-section"},Zr={class:"section-title"},Gr={class:"link-config-content"},Wr={class:"config-info-box"},Ur={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"flex-shrink":"0"}},jr={class:"config-group"},qr={class:"config-label"},Jr={class:"path-type-grid"},Kr=["onClick"],Qr={width:"60",height:"35",viewBox:"0 0 60 40"},Xr={key:0,cx:"10",cy:"20",r:"2.5",fill:"currentColor"},ei={key:1,cx:"10",cy:"25",r:"2.5",fill:"currentColor"},ti={key:2,cx:"10",cy:"15",r:"2.5",fill:"currentColor"},ni=["d"],ai={key:3,d:"M 50 20 L 46 17 M 50 20 L 46 23",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},oi={key:4,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},ri={key:5,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},ii={class:"path-name"},si={class:"config-group"},li={class:"config-label"},di={class:"config-group"},ci={class:"config-label"},ui={class:"config-group"},fi={class:"config-label"},mi={value:void 0},hi={value:"3,3"},pi={value:"5,5"},gi={value:"8,4"},yi={value:"2,2,8,2"},ki={key:0,class:"config-group"},bi={class:"config-label"},wi={class:"config-group"},Ci={class:"config-label"},Ti={class:"config-group"},Si={class:"config-label"},vi={key:0,class:"config-group"},Di={class:"config-label"},Ei={class:"config-group"},Mi={class:"config-label"},$i={class:"config-group"},Ni={class:"config-label"},Vi={class:"config-group"},_i={class:"config-label"},Ai={class:"color-group"},Li=["title"],Bi={class:"config-group"},Fi={class:"config-label"},Hi={key:3,class:"config-group"},Ii={class:"config-label"},Ri={class:"config-group"},Yi={class:"config-label"},zi={class:"config-group"},Oi={class:"config-label"},xi={class:"config-group"},Pi={class:"config-label"},Zi={class:"config-subsection"},Gi={class:"subsection-title"},Wi={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},Ui={class:"link-type-colors"},ji={class:"color-item"},qi={class:"color-preview"},Ji={width:"20",height:"10",viewBox:"0 0 20 10"},Ki=["stroke"],Qi=["fill"],Xi={class:"color-label"},es={class:"color-desc"},ts={class:"color-item"},ns={class:"color-preview"},as={width:"20",height:"10",viewBox:"0 0 20 10"},os=["stroke"],rs=["fill"],is={class:"color-label"},ss={class:"color-desc"},ls={class:"color-item"},ds={class:"color-preview"},cs={width:"20",height:"10",viewBox:"0 0 20 10"},us=["stroke"],fs=["fill"],ms={class:"color-label"},hs={class:"color-desc"},ps={class:"color-item"},gs={class:"color-preview"},ys={width:"20",height:"10",viewBox:"0 0 20 10"},ks=["stroke"],bs=["fill"],ws={class:"color-label"},Cs={class:"color-desc"},Ts={class:"config-subsection"},Ss={class:"subsection-title"},vs={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},Ds={class:"config-info-box",style:{"margin-bottom":"12px"}},Es={style:{"font-size":"11px"}},Ms={class:"config-group"},$s={class:"config-label"},Ns={class:"config-group"},Vs={class:"config-label"},_s={class:"config-group"},As={class:"config-label"},Ls={value:void 0},Bs={value:"3,3"},Fs={value:"5,5"},Hs={value:"8,4"},Is=["data-gantt-theme"];function Rs(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",Cr,[e.createElementVNode("button",{class:e.normalizeClass(["config-btn",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...a)=>t.togglePanel&&t.togglePanel(...a)),title:t.t("configPanel.title")},[e.createElementVNode("div",Sr,[n[49]||(n[49]=e.createElementVNode("div",{class:"btn-icon"},[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"})])],-1)),e.createElementVNode("span",vr,e.toDisplayString(t.t("common.config")),1)])],10,Tr),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"panel-fade"},{default:e.withCtx(()=>[t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"config-panel",onClick:n[47]||(n[47]=e.withModifiers(()=>{},["stop"])),ref:"configPanelRef","data-gantt-theme":t.currentTheme},[e.createElementVNode("div",Er,[e.createElementVNode("h3",null,e.toDisplayString(t.t("configPanel.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...a)=>t.closePanel&&t.closePanel(...a)),title:t.t("common.close")},n[50]||(n[50]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]),8,Mr)]),e.createElementVNode("div",$r,[e.createElementVNode("div",Nr,[e.createElementVNode("h4",Vr,[n[51]||(n[51]=e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.languageSettings")),1)]),e.createElementVNode("div",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locales,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["language-option",{active:t.currentLocale===a.value}]),onClick:l=>t.selectLocale(a.value)},[e.createElementVNode("span",Lr,e.toDisplayString(a.label),1),t.currentLocale===a.value?(e.openBlock(),e.createElementBlock("div",Br,n[52]||(n[52]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,Ar))),128))])]),e.createElementVNode("div",Fr,[e.createElementVNode("h4",Hr,[n[53]||(n[53]=e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.themeSettings")),1)]),e.createElementVNode("div",Ir,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["theme-card",{active:t.currentTheme===a.id}]),onClick:l=>t.selectTheme(a.id)},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({background:a.preview})},null,4),e.createElementVNode("div",Yr,[e.createElementVNode("div",zr,e.toDisplayString(t.t(a.nameKey)),1),e.createElementVNode("div",Or,e.toDisplayString(t.t(a.descKey)),1)]),t.currentTheme===a.id?(e.openBlock(),e.createElementBlock("div",xr,n[54]||(n[54]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,Rr))),128))])]),e.createElementVNode("div",Pr,[e.createElementVNode("h4",Zr,[n[55]||(n[55]=e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M6 9l6 6 6-6"}),e.createElementVNode("circle",{cx:"4",cy:"9",r:"2"}),e.createElementVNode("circle",{cx:"20",cy:"9",r:"2"}),e.createElementVNode("path",{d:"M10 9h4"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkSettings")),1)]),e.createElementVNode("div",Gr,[e.createElementVNode("div",Wr,[(e.openBlock(),e.createElementBlock("svg",Ur,n[56]||(n[56]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),e.createElementVNode("span",null,e.toDisplayString(t.t("configPanel.linkConfig.info")),1)]),e.createElementVNode("div",jr,[e.createElementVNode("label",qr,e.toDisplayString(t.t("configPanel.linkConfig.pathType")),1),e.createElementVNode("div",Jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["path-type-card",{active:t.linkConfig.pathType===a.value}]),onClick:l=>t.selectPathType(a.value)},[(e.openBlock(),e.createElementBlock("svg",Qr,[a.value==="straight"?(e.openBlock(),e.createElementBlock("circle",Xr)):e.createCommentVNode("",!0),a.value==="bezier"?(e.openBlock(),e.createElementBlock("circle",ei)):e.createCommentVNode("",!0),a.value==="right-angle"?(e.openBlock(),e.createElementBlock("circle",ti)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:a.preview,stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},null,8,ni),a.value==="straight"?(e.openBlock(),e.createElementBlock("path",ai)):e.createCommentVNode("",!0),a.value==="bezier"?(e.openBlock(),e.createElementBlock("path",oi)):e.createCommentVNode("",!0),a.value==="right-angle"?(e.openBlock(),e.createElementBlock("path",ri)):e.createCommentVNode("",!0)])),e.createElementVNode("span",ii,e.toDisplayString(a.name),1)],10,Kr))),128))])]),e.createElementVNode("div",si,[e.createElementVNode("label",li,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[2]||(n[2]=a=>t.linkConfig.color=a),onChange:n[3]||(n[3]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.linkConfig.color]])]),e.createElementVNode("div",di,[e.createElementVNode("label",ci,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.width)+"px",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[4]||(n[4]=a=>t.linkConfig.width=a),onInput:n[5]||(n[5]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"1",max:"5",step:"0.5",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.width,void 0,{number:!0}]])]),e.createElementVNode("div",ui,[e.createElementVNode("label",fi,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[6]||(n[6]=a=>t.linkConfig.dashArray=a),onChange:n[7]||(n[7]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"select-input"},[e.createElementVNode("option",mi,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",hi,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",pi,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",gi,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1),e.createElementVNode("option",yi,e.toDisplayString(t.t("configPanel.linkConfig.dotDash")),1)],544),[[e.vModelSelect,t.linkConfig.dashArray]])]),t.linkConfig.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("label",bi,e.toDisplayString(t.t("configPanel.linkConfig.curvature"))+": "+e.toDisplayString(t.linkConfig.bezierCurvature),1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[8]||(n[8]=a=>t.linkConfig.bezierCurvature=a),onInput:n[9]||(n[9]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"0.1",max:"1",step:"0.1",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.bezierCurvature,void 0,{number:!0}]])])):e.createCommentVNode("",!0),t.linkConfig.pathType==="right-angle"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",wi,[e.createElementVNode("label",Ci,e.toDisplayString(t.t("configPanel.linkConfig.offset"))+": "+e.toDisplayString(t.linkConfig.rightAngleOffset)+"px",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[10]||(n[10]=a=>t.linkConfig.rightAngleOffset=a),onInput:n[11]||(n[11]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"10",max:"80",step:"5",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.rightAngleOffset,void 0,{number:!0}]])]),e.createElementVNode("div",Ti,[e.createElementVNode("label",Si,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=a=>t.linkConfig.smoothCorners=a),onChange:n[13]||(n[13]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a))},null,544),[[e.vModelCheckbox,t.linkConfig.smoothCorners]]),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.smoothCorners")),1)])]),t.linkConfig.smoothCorners?(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("label",Di,e.toDisplayString(t.t("configPanel.linkConfig.cornerRadius"))+": "+e.toDisplayString(t.linkConfig.cornerRadius)+"px",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[14]||(n[14]=a=>t.linkConfig.cornerRadius=a),onInput:n[15]||(n[15]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"0",max:"15",step:"1",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.cornerRadius,void 0,{number:!0}]])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Ei,[e.createElementVNode("label",Mi,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[16]||(n[16]=a=>t.linkConfig.showArrow=a),onChange:n[17]||(n[17]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a))},null,544),[[e.vModelCheckbox,t.linkConfig.showArrow]]),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.showArrow")),1)])]),t.linkConfig.showArrow?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",$i,[e.createElementVNode("label",Ni,e.toDisplayString(t.t("configPanel.linkConfig.arrowSize"))+": "+e.toDisplayString(t.linkConfig.arrowSize)+"px",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[18]||(n[18]=a=>t.linkConfig.arrowSize=a),onInput:n[19]||(n[19]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"4",max:"16",step:"1",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.arrowSize,void 0,{number:!0}]])]),e.createElementVNode("div",Vi,[e.createElementVNode("label",_i,e.toDisplayString(t.t("configPanel.linkConfig.arrowColor")),1),e.createElementVNode("div",Ai,[e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[20]||(n[20]=a=>t.linkConfig.arrowColor=a),onChange:n[21]||(n[21]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.linkConfig.arrowColor]]),e.createElementVNode("button",{onClick:n[22]||(n[22]=a=>{t.linkConfig.arrowColor=t.linkConfig.color,t.updateLinkConfig()}),class:"sync-btn",title:t.t("tooltip.syncArrowColor")},e.toDisplayString(t.t("configPanel.linkConfig.syncColor")),9,Li)])])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Bi,[e.createElementVNode("label",Fi,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=a=>t.linkConfig.enableDashAnimation=a),onChange:n[24]||(n[24]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a))},null,544),[[e.vModelCheckbox,t.linkConfig.enableDashAnimation]]),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.dashAnimation")),1)])]),t.linkConfig.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",Hi,[e.createElementVNode("label",Ii,e.toDisplayString(t.t("configPanel.linkConfig.animationSpeed"))+": "+e.toDisplayString(t.linkConfig.dashAnimationSpeed)+"s",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[25]||(n[25]=a=>t.linkConfig.dashAnimationSpeed=a),onInput:n[26]||(n[26]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"0.2",max:"3",step:"0.2",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.dashAnimationSpeed,void 0,{number:!0}]])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ri,[e.createElementVNode("label",Yi,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=a=>t.linkConfig.showLabels=a),onChange:n[28]||(n[28]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a))},null,544),[[e.vModelCheckbox,t.linkConfig.showLabels]]),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.showLabels")),1)])]),t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",zi,[e.createElementVNode("label",Oi,e.toDisplayString(t.t("configPanel.linkConfig.labelColor")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[29]||(n[29]=a=>t.linkConfig.labelColor=a),onChange:n[30]||(n[30]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.linkConfig.labelColor]])]),e.createElementVNode("div",xi,[e.createElementVNode("label",Pi,e.toDisplayString(t.t("configPanel.linkConfig.fontSize"))+": "+e.toDisplayString(t.linkConfig.labelFontSize)+"px",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[31]||(n[31]=a=>t.linkConfig.labelFontSize=a),onInput:n[32]||(n[32]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"8",max:"16",step:"1",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.labelFontSize,void 0,{number:!0}]])])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Zi,[e.createElementVNode("h5",Gi,[(e.openBlock(),e.createElementBlock("svg",Wi,n[57]||(n[57]=[e.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.typeColors")),1)]),e.createElementVNode("div",Ui,[e.createElementVNode("div",ji,[e.createElementVNode("div",qi,[(e.openBlock(),e.createElementBlock("svg",Ji,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.linkConfig.linkTypeColors.finishToStart,"stroke-width":"2"},null,8,Ki),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.linkConfig.linkTypeColors.finishToStart},null,8,Qi)]))]),e.createElementVNode("span",Xi,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",es,e.toDisplayString(t.t("link.finishToStart")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[33]||(n[33]=a=>t.linkConfig.linkTypeColors.finishToStart=a),onChange:n[34]||(n[34]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input-small"},null,544),[[e.vModelText,t.linkConfig.linkTypeColors.finishToStart]])]),e.createElementVNode("div",ts,[e.createElementVNode("div",ns,[(e.openBlock(),e.createElementBlock("svg",as,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.linkConfig.linkTypeColors.startToStart,"stroke-width":"2"},null,8,os),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.linkConfig.linkTypeColors.startToStart},null,8,rs)]))]),e.createElementVNode("span",is,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",ss,e.toDisplayString(t.t("link.startToStart")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[35]||(n[35]=a=>t.linkConfig.linkTypeColors.startToStart=a),onChange:n[36]||(n[36]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input-small"},null,544),[[e.vModelText,t.linkConfig.linkTypeColors.startToStart]])]),e.createElementVNode("div",ls,[e.createElementVNode("div",ds,[(e.openBlock(),e.createElementBlock("svg",cs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.linkConfig.linkTypeColors.finishToFinish,"stroke-width":"2"},null,8,us),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.linkConfig.linkTypeColors.finishToFinish},null,8,fs)]))]),e.createElementVNode("span",ms,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",hs,e.toDisplayString(t.t("link.finishToFinish")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[37]||(n[37]=a=>t.linkConfig.linkTypeColors.finishToFinish=a),onChange:n[38]||(n[38]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input-small"},null,544),[[e.vModelText,t.linkConfig.linkTypeColors.finishToFinish]])]),e.createElementVNode("div",ps,[e.createElementVNode("div",gs,[(e.openBlock(),e.createElementBlock("svg",ys,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.linkConfig.linkTypeColors.startToFinish,"stroke-width":"2"},null,8,ks),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.linkConfig.linkTypeColors.startToFinish},null,8,bs)]))]),e.createElementVNode("span",ws,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",Cs,e.toDisplayString(t.t("link.startToFinish")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[39]||(n[39]=a=>t.linkConfig.linkTypeColors.startToFinish=a),onChange:n[40]||(n[40]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input-small"},null,544),[[e.vModelText,t.linkConfig.linkTypeColors.startToFinish]])])])]),e.createElementVNode("div",Ts,[e.createElementVNode("h5",Ss,[(e.openBlock(),e.createElementBlock("svg",vs,n[58]||(n[58]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.parentChildStyle")),1)]),e.createElementVNode("div",Ds,[e.createElementVNode("span",Es,e.toDisplayString(t.t("configPanel.linkConfig.parentChildInfo")),1)]),e.createElementVNode("div",Ms,[e.createElementVNode("label",$s,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[41]||(n[41]=a=>t.linkConfig.parentChildStyle.color=a),onChange:n[42]||(n[42]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.linkConfig.parentChildStyle.color]])]),e.createElementVNode("div",Ns,[e.createElementVNode("label",Vs,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.parentChildStyle.width)+"px",1),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":n[43]||(n[43]=a=>t.linkConfig.parentChildStyle.width=a),onInput:n[44]||(n[44]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),min:"1",max:"3",step:"0.5",class:"range-input"},null,544),[[e.vModelText,t.linkConfig.parentChildStyle.width,void 0,{number:!0}]])]),e.createElementVNode("div",_s,[e.createElementVNode("label",As,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[45]||(n[45]=a=>t.linkConfig.parentChildStyle.dashArray=a),onChange:n[46]||(n[46]=(...a)=>t.updateLinkConfig&&t.updateLinkConfig(...a)),class:"select-input"},[e.createElementVNode("option",Ls,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",Bs,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Fs,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Hs,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1)],544),[[e.vModelSelect,t.linkConfig.parentChildStyle.dashArray]])])])])])])],8,Dr)):e.createCommentVNode("",!0)]),_:1}),t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-overlay",onClick:n[48]||(n[48]=(...a)=>t.closePanel&&t.closePanel(...a)),"data-gantt-theme":t.currentTheme},null,8,Is)):e.createCommentVNode("",!0)]))])}const On=Ve(wr,[["render",Rs],["__scopeId","data-v-38c7d8c5"]]);var ke;(function(t){t.assertEqual=i=>i;function n(i){}t.assertIs=n;function o(i){throw new Error}t.assertNever=o,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),a={};for(const l of s)a[l]=i[l];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(ke||(ke={}));var gn;(function(t){t.mergeShapes=(n,o)=>({...n,...o})})(gn||(gn={}));const O=ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Je=t=>{switch(typeof t){case"undefined":return O.undefined;case"string":return O.string;case"number":return isNaN(t)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(t)?O.array:t===null?O.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?O.promise:typeof Map<"u"&&t instanceof Map?O.map:typeof Set<"u"&&t instanceof Set?O.set:typeof Date<"u"&&t instanceof Date?O.date:O.object;default:return O.unknown}},N=ke.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ys=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Re extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=n}format(n){const o=n||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(o(a));else{let l=r,u=0;for(;u<a.path.length;){const d=a.path[u];u===a.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(o(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return i(this),r}static assert(n){if(!(n instanceof Re))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=o=>o.message){const o={},r=[];for(const i of this.issues)i.path.length>0?(o[i.path[0]]=o[i.path[0]]||[],o[i.path[0]].push(n(i))):r.push(n(i));return{formErrors:r,fieldErrors:o}}get formErrors(){return this.flatten()}}Re.create=t=>new Re(t);const ht=(t,n)=>{let o;switch(t.code){case N.invalid_type:t.received===O.undefined?o="Required":o=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(t.expected,ke.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:o=`Unrecognized key(s) in object: ${ke.joinValues(t.keys,", ")}`;break;case N.invalid_union:o="Invalid input";break;case N.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${ke.joinValues(t.options)}`;break;case N.invalid_enum_value:o=`Invalid enum value. Expected ${ke.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:o="Invalid function arguments";break;case N.invalid_return_type:o="Invalid function return type";break;case N.invalid_date:o="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(o=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?o=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?o=`Invalid input: must end with "${t.validation.endsWith}"`:ke.assertNever(t.validation):t.validation!=="regex"?o=`Invalid ${t.validation}`:o="Invalid";break;case N.too_small:t.type==="array"?o=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?o=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?o=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:o="Invalid input";break;case N.too_big:t.type==="array"?o=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?o=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?o=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?o=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?o=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:o="Invalid input";break;case N.custom:o="Invalid input";break;case N.invalid_intersection_types:o="Intersection results could not be merged";break;case N.not_multiple_of:o=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:o="Number must be finite";break;default:o=n.defaultError,ke.assertNever(t)}return{message:o}};let xn=ht;function zs(t){xn=t}function tn(){return xn}const nn=t=>{const{data:n,path:o,errorMaps:r,issueData:i}=t,s=[...o,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let l="";const u=r.filter(d=>!!d).slice().reverse();for(const d of u)l=d(a,{data:n,defaultError:l}).message;return{...i,path:s,message:l}},Os=[];function I(t,n){const o=tn(),r=nn({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,o,o===ht?void 0:ht].filter(i=>!!i)});t.common.issues.push(r)}class Ae{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,o){const r=[];for(const i of o){if(i.status==="aborted")return se;i.status==="dirty"&&n.dirty(),r.push(i.value)}return{status:n.value,value:r}}static async mergeObjectAsync(n,o){const r=[];for(const i of o){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return Ae.mergeObjectSync(n,r)}static mergeObjectSync(n,o){const r={};for(const i of o){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return se;s.status==="dirty"&&n.dirty(),a.status==="dirty"&&n.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:n.value,value:r}}}const se=Object.freeze({status:"aborted"}),pt=t=>({status:"dirty",value:t}),Be=t=>({status:"valid",value:t}),yn=t=>t.status==="aborted",kn=t=>t.status==="dirty",lt=t=>t.status==="valid",vt=t=>typeof Promise<"u"&&t instanceof Promise;function an(t,n,o,r){if(typeof n=="function"?t!==n||!0:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(t)}function Pn(t,n,o,r,i){if(typeof n=="function"?t!==n||!0:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(t,o),o}typeof SuppressedError=="function"&&SuppressedError;var K;(function(t){t.errToObj=n=>typeof n=="string"?{message:n}:n||{},t.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(K||(K={}));var Dt,Et;class Ge{constructor(n,o,r,i){this._cachedPath=[],this.parent=n,this.data=o,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zn=(t,n)=>{if(lt(n))return{success:!0,data:n.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new Re(t.common.issues);return this._error=o,this._error}}};function ue(t){if(!t)return{};const{errorMap:n,invalid_type_error:o,required_error:r,description:i}=t;if(n&&(o||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:i}:{errorMap:(a,l)=>{var u,d;const{message:p}=t;return a.code==="invalid_enum_value"?{message:p??l.defaultError}:typeof l.data>"u"?{message:(u=p??r)!==null&&u!==void 0?u:l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:(d=p??o)!==null&&d!==void 0?d:l.defaultError}},description:i}}class me{get description(){return this._def.description}_getType(n){return Je(n.data)}_getOrReturnCtx(n,o){return o||{common:n.parent.common,data:n.data,parsedType:Je(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new Ae,ctx:{common:n.parent.common,data:n.data,parsedType:Je(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const o=this._parse(n);if(vt(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(n){const o=this._parse(n);return Promise.resolve(o)}parse(n,o){const r=this.safeParse(n,o);if(r.success)return r.data;throw r.error}safeParse(n,o){var r;const i={common:{issues:[],async:(r=o==null?void 0:o.async)!==null&&r!==void 0?r:!1,contextualErrorMap:o==null?void 0:o.errorMap},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Je(n)},s=this._parseSync({data:n,path:i.path,parent:i});return Zn(i,s)}"~validate"(n){var o,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Je(n)};if(!this["~standard"].async)try{const s=this._parseSync({data:n,path:[],parent:i});return lt(s)?{value:s.value}:{issues:i.common.issues}}catch(s){!((r=(o=s==null?void 0:s.message)===null||o===void 0?void 0:o.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:i}).then(s=>lt(s)?{value:s.value}:{issues:i.common.issues})}async parseAsync(n,o){const r=await this.safeParseAsync(n,o);if(r.success)return r.data;throw r.error}async safeParseAsync(n,o){const r={common:{issues:[],contextualErrorMap:o==null?void 0:o.errorMap,async:!0},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Je(n)},i=this._parse({data:n,path:r.path,parent:r}),s=await(vt(i)?i:Promise.resolve(i));return Zn(r,s)}refine(n,o){const r=i=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(i):o;return this._refinement((i,s)=>{const a=n(i),l=()=>s.addIssue({code:N.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(n,o){return this._refinement((r,i)=>n(r)?!0:(i.addIssue(typeof o=="function"?o(r,i):o),!1))}_refinement(n){return new Pe({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return Ue.create(this,this._def)}nullable(){return rt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xe.create(this)}promise(){return bt.create(this,this._def)}or(n){return Vt.create([this,n],this._def)}and(n){return _t.create(this,n,this._def)}transform(n){return new Pe({...ue(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const o=typeof n=="function"?n:()=>n;return new Ht({...ue(this._def),innerType:this,defaultValue:o,typeName:ie.ZodDefault})}brand(){return new Cn({typeName:ie.ZodBranded,type:this,...ue(this._def)})}catch(n){const o=typeof n=="function"?n:()=>n;return new It({...ue(this._def),innerType:this,catchValue:o,typeName:ie.ZodCatch})}describe(n){const o=this.constructor;return new o({...this._def,description:n})}pipe(n){return Rt.create(this,n)}readonly(){return Yt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xs=/^c[^\s-]{8,}$/i,Ps=/^[0-9a-z]+$/,Zs=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Gs=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ws=/^[a-z0-9_-]{21}$/i,Us=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,js=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Js="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let bn;const Ks=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Qs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Xs=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,el=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Gn="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",al=new RegExp(`^${Gn}$`);function Wn(t){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?n=`${n}\\.\\d{${t.precision}}`:t.precision==null&&(n=`${n}(\\.\\d+)?`),n}function ol(t){return new RegExp(`^${Wn(t)}$`)}function Un(t){let n=`${Gn}T${Wn(t)}`;const o=[];return o.push(t.local?"Z?":"Z"),t.offset&&o.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${o.join("|")})`,new RegExp(`^${n}$`)}function rl(t,n){return!!((n==="v4"||!n)&&Ks.test(t)||(n==="v6"||!n)&&Xs.test(t))}function il(t,n){if(!Us.test(t))return!1;try{const[o]=t.split("."),r=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||n&&i.alg!==n)}catch{return!1}}function sl(t,n){return!!((n==="v4"||!n)&&Qs.test(t)||(n==="v6"||!n)&&el.test(t))}class Oe extends me{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==O.string){const s=this._getOrReturnCtx(n);return I(s,{code:N.invalid_type,expected:O.string,received:s.parsedType}),se}const r=new Ae;let i;for(const s of this._def.checks)if(s.kind==="min")n.data.length<s.value&&(i=this._getOrReturnCtx(n,i),I(i,{code:N.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")n.data.length>s.value&&(i=this._getOrReturnCtx(n,i),I(i,{code:N.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=n.data.length>s.value,l=n.data.length<s.value;(a||l)&&(i=this._getOrReturnCtx(n,i),a?I(i,{code:N.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):l&&I(i,{code:N.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")qs.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"email",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")bn||(bn=new RegExp(Js,"u")),bn.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"emoji",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Gs.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"uuid",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")Ws.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"nanoid",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")xs.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"cuid",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Ps.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"cuid2",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")Zs.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"ulid",code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(n.data)}catch{i=this._getOrReturnCtx(n,i),I(i,{validation:"url",code:N.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"regex",code:N.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?n.data=n.data.trim():s.kind==="includes"?n.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(n,i),I(i,{code:N.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?n.data=n.data.toLowerCase():s.kind==="toUpperCase"?n.data=n.data.toUpperCase():s.kind==="startsWith"?n.data.startsWith(s.value)||(i=this._getOrReturnCtx(n,i),I(i,{code:N.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?n.data.endsWith(s.value)||(i=this._getOrReturnCtx(n,i),I(i,{code:N.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Un(s).test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{code:N.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?al.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{code:N.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?ol(s).test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{code:N.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?js.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"duration",code:N.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?rl(n.data,s.version)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"ip",code:N.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?il(n.data,s.alg)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"jwt",code:N.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?sl(n.data,s.version)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"cidr",code:N.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?tl.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"base64",code:N.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?nl.test(n.data)||(i=this._getOrReturnCtx(n,i),I(i,{validation:"base64url",code:N.invalid_string,message:s.message}),r.dirty()):ke.assertNever(s);return{status:r.value,value:n.data}}_regex(n,o,r){return this.refinement(i=>n.test(i),{validation:o,code:N.invalid_string,...K.errToObj(r)})}_addCheck(n){return new Oe({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...K.errToObj(n)})}url(n){return this._addCheck({kind:"url",...K.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...K.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...K.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...K.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...K.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...K.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...K.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...K.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...K.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...K.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...K.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...K.errToObj(n)})}datetime(n){var o,r;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(o=n==null?void 0:n.offset)!==null&&o!==void 0?o:!1,local:(r=n==null?void 0:n.local)!==null&&r!==void 0?r:!1,...K.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...K.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...K.errToObj(n)})}regex(n,o){return this._addCheck({kind:"regex",regex:n,...K.errToObj(o)})}includes(n,o){return this._addCheck({kind:"includes",value:n,position:o==null?void 0:o.position,...K.errToObj(o==null?void 0:o.message)})}startsWith(n,o){return this._addCheck({kind:"startsWith",value:n,...K.errToObj(o)})}endsWith(n,o){return this._addCheck({kind:"endsWith",value:n,...K.errToObj(o)})}min(n,o){return this._addCheck({kind:"min",value:n,...K.errToObj(o)})}max(n,o){return this._addCheck({kind:"max",value:n,...K.errToObj(o)})}length(n,o){return this._addCheck({kind:"length",value:n,...K.errToObj(o)})}nonempty(n){return this.min(1,K.errToObj(n))}trim(){return new Oe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Oe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Oe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxLength(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}}Oe.create=t=>{var n;return new Oe({checks:[],typeName:ie.ZodString,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ue(t)})};function ll(t,n){const o=(t.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,i=o>r?o:r,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(n.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class nt extends me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==O.number){const s=this._getOrReturnCtx(n);return I(s,{code:N.invalid_type,expected:O.number,received:s.parsedType}),se}let r;const i=new Ae;for(const s of this._def.checks)s.kind==="int"?ke.isInteger(n.data)||(r=this._getOrReturnCtx(n,r),I(r,{code:N.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?n.data<s.value:n.data<=s.value)&&(r=this._getOrReturnCtx(n,r),I(r,{code:N.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?n.data>s.value:n.data>=s.value)&&(r=this._getOrReturnCtx(n,r),I(r,{code:N.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?ll(n.data,s.value)!==0&&(r=this._getOrReturnCtx(n,r),I(r,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(n.data)||(r=this._getOrReturnCtx(n,r),I(r,{code:N.not_finite,message:s.message}),i.dirty()):ke.assertNever(s);return{status:i.value,value:n.data}}gte(n,o){return this.setLimit("min",n,!0,K.toString(o))}gt(n,o){return this.setLimit("min",n,!1,K.toString(o))}lte(n,o){return this.setLimit("max",n,!0,K.toString(o))}lt(n,o){return this.setLimit("max",n,!1,K.toString(o))}setLimit(n,o,r,i){return new nt({...this._def,checks:[...this._def.checks,{kind:n,value:o,inclusive:r,message:K.toString(i)}]})}_addCheck(n){return new nt({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:K.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:K.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:K.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:K.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:K.toString(n)})}multipleOf(n,o){return this._addCheck({kind:"multipleOf",value:n,message:K.toString(o)})}finite(n){return this._addCheck({kind:"finite",message:K.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:K.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:K.toString(n)})}get minValue(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxValue(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&ke.isInteger(n.value))}get isFinite(){let n=null,o=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(o===null||r.value>o)&&(o=r.value):r.kind==="max"&&(n===null||r.value<n)&&(n=r.value)}return Number.isFinite(o)&&Number.isFinite(n)}}nt.create=t=>new nt({checks:[],typeName:ie.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ue(t)});class at extends me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==O.bigint)return this._getInvalidInput(n);let r;const i=new Ae;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?n.data<s.value:n.data<=s.value)&&(r=this._getOrReturnCtx(n,r),I(r,{code:N.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?n.data>s.value:n.data>=s.value)&&(r=this._getOrReturnCtx(n,r),I(r,{code:N.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?n.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(n,r),I(r,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):ke.assertNever(s);return{status:i.value,value:n.data}}_getInvalidInput(n){const o=this._getOrReturnCtx(n);return I(o,{code:N.invalid_type,expected:O.bigint,received:o.parsedType}),se}gte(n,o){return this.setLimit("min",n,!0,K.toString(o))}gt(n,o){return this.setLimit("min",n,!1,K.toString(o))}lte(n,o){return this.setLimit("max",n,!0,K.toString(o))}lt(n,o){return this.setLimit("max",n,!1,K.toString(o))}setLimit(n,o,r,i){return new at({...this._def,checks:[...this._def.checks,{kind:n,value:o,inclusive:r,message:K.toString(i)}]})}_addCheck(n){return new at({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:K.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:K.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:K.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:K.toString(n)})}multipleOf(n,o){return this._addCheck({kind:"multipleOf",value:n,message:K.toString(o)})}get minValue(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxValue(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}}at.create=t=>{var n;return new at({checks:[],typeName:ie.ZodBigInt,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ue(t)})};class Mt extends me{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==O.boolean){const r=this._getOrReturnCtx(n);return I(r,{code:N.invalid_type,expected:O.boolean,received:r.parsedType}),se}return Be(n.data)}}Mt.create=t=>new Mt({typeName:ie.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ue(t)});class dt extends me{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==O.date){const s=this._getOrReturnCtx(n);return I(s,{code:N.invalid_type,expected:O.date,received:s.parsedType}),se}if(isNaN(n.data.getTime())){const s=this._getOrReturnCtx(n);return I(s,{code:N.invalid_date}),se}const r=new Ae;let i;for(const s of this._def.checks)s.kind==="min"?n.data.getTime()<s.value&&(i=this._getOrReturnCtx(n,i),I(i,{code:N.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?n.data.getTime()>s.value&&(i=this._getOrReturnCtx(n,i),I(i,{code:N.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ke.assertNever(s);return{status:r.value,value:new Date(n.data.getTime())}}_addCheck(n){return new dt({...this._def,checks:[...this._def.checks,n]})}min(n,o){return this._addCheck({kind:"min",value:n.getTime(),message:K.toString(o)})}max(n,o){return this._addCheck({kind:"max",value:n.getTime(),message:K.toString(o)})}get minDate(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n!=null?new Date(n):null}}dt.create=t=>new dt({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ie.ZodDate,...ue(t)});class on extends me{_parse(n){if(this._getType(n)!==O.symbol){const r=this._getOrReturnCtx(n);return I(r,{code:N.invalid_type,expected:O.symbol,received:r.parsedType}),se}return Be(n.data)}}on.create=t=>new on({typeName:ie.ZodSymbol,...ue(t)});class $t extends me{_parse(n){if(this._getType(n)!==O.undefined){const r=this._getOrReturnCtx(n);return I(r,{code:N.invalid_type,expected:O.undefined,received:r.parsedType}),se}return Be(n.data)}}$t.create=t=>new $t({typeName:ie.ZodUndefined,...ue(t)});class Nt extends me{_parse(n){if(this._getType(n)!==O.null){const r=this._getOrReturnCtx(n);return I(r,{code:N.invalid_type,expected:O.null,received:r.parsedType}),se}return Be(n.data)}}Nt.create=t=>new Nt({typeName:ie.ZodNull,...ue(t)});class gt extends me{constructor(){super(...arguments),this._any=!0}_parse(n){return Be(n.data)}}gt.create=t=>new gt({typeName:ie.ZodAny,...ue(t)});class ct extends me{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Be(n.data)}}ct.create=t=>new ct({typeName:ie.ZodUnknown,...ue(t)});class Ke extends me{_parse(n){const o=this._getOrReturnCtx(n);return I(o,{code:N.invalid_type,expected:O.never,received:o.parsedType}),se}}Ke.create=t=>new Ke({typeName:ie.ZodNever,...ue(t)});class rn extends me{_parse(n){if(this._getType(n)!==O.undefined){const r=this._getOrReturnCtx(n);return I(r,{code:N.invalid_type,expected:O.void,received:r.parsedType}),se}return Be(n.data)}}rn.create=t=>new rn({typeName:ie.ZodVoid,...ue(t)});class xe extends me{_parse(n){const{ctx:o,status:r}=this._processInputParams(n),i=this._def;if(o.parsedType!==O.array)return I(o,{code:N.invalid_type,expected:O.array,received:o.parsedType}),se;if(i.exactLength!==null){const a=o.data.length>i.exactLength.value,l=o.data.length<i.exactLength.value;(a||l)&&(I(o,{code:a?N.too_big:N.too_small,minimum:l?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&o.data.length<i.minLength.value&&(I(o,{code:N.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&o.data.length>i.maxLength.value&&(I(o,{code:N.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),o.common.async)return Promise.all([...o.data].map((a,l)=>i.type._parseAsync(new Ge(o,a,o.path,l)))).then(a=>Ae.mergeArray(r,a));const s=[...o.data].map((a,l)=>i.type._parseSync(new Ge(o,a,o.path,l)));return Ae.mergeArray(r,s)}get element(){return this._def.type}min(n,o){return new xe({...this._def,minLength:{value:n,message:K.toString(o)}})}max(n,o){return new xe({...this._def,maxLength:{value:n,message:K.toString(o)}})}length(n,o){return new xe({...this._def,exactLength:{value:n,message:K.toString(o)}})}nonempty(n){return this.min(1,n)}}xe.create=(t,n)=>new xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...ue(n)});function yt(t){if(t instanceof $e){const n={};for(const o in t.shape){const r=t.shape[o];n[o]=Ue.create(yt(r))}return new $e({...t._def,shape:()=>n})}else return t instanceof xe?new xe({...t._def,type:yt(t.element)}):t instanceof Ue?Ue.create(yt(t.unwrap())):t instanceof rt?rt.create(yt(t.unwrap())):t instanceof We?We.create(t.items.map(n=>yt(n))):t}class $e extends me{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),o=ke.objectKeys(n);return this._cached={shape:n,keys:o}}_parse(n){if(this._getType(n)!==O.object){const d=this._getOrReturnCtx(n);return I(d,{code:N.invalid_type,expected:O.object,received:d.parsedType}),se}const{status:r,ctx:i}=this._processInputParams(n),{shape:s,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ke&&this._def.unknownKeys==="strip"))for(const d in i.data)a.includes(d)||l.push(d);const u=[];for(const d of a){const p=s[d],g=i.data[d];u.push({key:{status:"valid",value:d},value:p._parse(new Ge(i,g,i.path,d)),alwaysSet:d in i.data})}if(this._def.catchall instanceof Ke){const d=this._def.unknownKeys;if(d==="passthrough")for(const p of l)u.push({key:{status:"valid",value:p},value:{status:"valid",value:i.data[p]}});else if(d==="strict")l.length>0&&(I(i,{code:N.unrecognized_keys,keys:l}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const p of l){const g=i.data[p];u.push({key:{status:"valid",value:p},value:d._parse(new Ge(i,g,i.path,p)),alwaysSet:p in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const d=[];for(const p of u){const g=await p.key,C=await p.value;d.push({key:g,value:C,alwaysSet:p.alwaysSet})}return d}).then(d=>Ae.mergeObjectSync(r,d)):Ae.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(n){return K.errToObj,new $e({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(o,r)=>{var i,s,a,l;const u=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,o,r).message)!==null&&a!==void 0?a:r.defaultError;return o.code==="unrecognized_keys"?{message:(l=K.errToObj(n).message)!==null&&l!==void 0?l:u}:{message:u}}}:{}})}strip(){return new $e({...this._def,unknownKeys:"strip"})}passthrough(){return new $e({...this._def,unknownKeys:"passthrough"})}extend(n){return new $e({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new $e({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:ie.ZodObject})}setKey(n,o){return this.augment({[n]:o})}catchall(n){return new $e({...this._def,catchall:n})}pick(n){const o={};return ke.objectKeys(n).forEach(r=>{n[r]&&this.shape[r]&&(o[r]=this.shape[r])}),new $e({...this._def,shape:()=>o})}omit(n){const o={};return ke.objectKeys(this.shape).forEach(r=>{n[r]||(o[r]=this.shape[r])}),new $e({...this._def,shape:()=>o})}deepPartial(){return yt(this)}partial(n){const o={};return ke.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];n&&!n[r]?o[r]=i:o[r]=i.optional()}),new $e({...this._def,shape:()=>o})}required(n){const o={};return ke.objectKeys(this.shape).forEach(r=>{if(n&&!n[r])o[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Ue;)s=s._def.innerType;o[r]=s}}),new $e({...this._def,shape:()=>o})}keyof(){return jn(ke.objectKeys(this.shape))}}$e.create=(t,n)=>new $e({shape:()=>t,unknownKeys:"strip",catchall:Ke.create(),typeName:ie.ZodObject,...ue(n)}),$e.strictCreate=(t,n)=>new $e({shape:()=>t,unknownKeys:"strict",catchall:Ke.create(),typeName:ie.ZodObject,...ue(n)}),$e.lazycreate=(t,n)=>new $e({shape:t,unknownKeys:"strip",catchall:Ke.create(),typeName:ie.ZodObject,...ue(n)});class Vt extends me{_parse(n){const{ctx:o}=this._processInputParams(n),r=this._def.options;function i(s){for(const l of s)if(l.result.status==="valid")return l.result;for(const l of s)if(l.result.status==="dirty")return o.common.issues.push(...l.ctx.common.issues),l.result;const a=s.map(l=>new Re(l.ctx.common.issues));return I(o,{code:N.invalid_union,unionErrors:a}),se}if(o.common.async)return Promise.all(r.map(async s=>{const a={...o,common:{...o.common,issues:[]},parent:null};return{result:await s._parseAsync({data:o.data,path:o.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const u of r){const d={...o,common:{...o.common,issues:[]},parent:null},p=u._parseSync({data:o.data,path:o.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!s&&(s={result:p,ctx:d}),d.common.issues.length&&a.push(d.common.issues)}if(s)return o.common.issues.push(...s.ctx.common.issues),s.result;const l=a.map(u=>new Re(u));return I(o,{code:N.invalid_union,unionErrors:l}),se}}get options(){return this._def.options}}Vt.create=(t,n)=>new Vt({options:t,typeName:ie.ZodUnion,...ue(n)});const Qe=t=>t instanceof Lt?Qe(t.schema):t instanceof Pe?Qe(t.innerType()):t instanceof Bt?[t.value]:t instanceof ot?t.options:t instanceof Ft?ke.objectValues(t.enum):t instanceof Ht?Qe(t._def.innerType):t instanceof $t?[void 0]:t instanceof Nt?[null]:t instanceof Ue?[void 0,...Qe(t.unwrap())]:t instanceof rt?[null,...Qe(t.unwrap())]:t instanceof Cn||t instanceof Yt?Qe(t.unwrap()):t instanceof It?Qe(t._def.innerType):[];class sn extends me{_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==O.object)return I(o,{code:N.invalid_type,expected:O.object,received:o.parsedType}),se;const r=this.discriminator,i=o.data[r],s=this.optionsMap.get(i);return s?o.common.async?s._parseAsync({data:o.data,path:o.path,parent:o}):s._parseSync({data:o.data,path:o.path,parent:o}):(I(o,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,o,r){const i=new Map;for(const s of o){const a=Qe(s.shape[n]);if(!a.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const l of a){if(i.has(l))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(l)}`);i.set(l,s)}}return new sn({typeName:ie.ZodDiscriminatedUnion,discriminator:n,options:o,optionsMap:i,...ue(r)})}}function wn(t,n){const o=Je(t),r=Je(n);if(t===n)return{valid:!0,data:t};if(o===O.object&&r===O.object){const i=ke.objectKeys(n),s=ke.objectKeys(t).filter(l=>i.indexOf(l)!==-1),a={...t,...n};for(const l of s){const u=wn(t[l],n[l]);if(!u.valid)return{valid:!1};a[l]=u.data}return{valid:!0,data:a}}else if(o===O.array&&r===O.array){if(t.length!==n.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],l=n[s],u=wn(a,l);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return o===O.date&&r===O.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}class _t extends me{_parse(n){const{status:o,ctx:r}=this._processInputParams(n),i=(s,a)=>{if(yn(s)||yn(a))return se;const l=wn(s.value,a.value);return l.valid?((kn(s)||kn(a))&&o.dirty(),{status:o.value,value:l.data}):(I(r,{code:N.invalid_intersection_types}),se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}_t.create=(t,n,o)=>new _t({left:t,right:n,typeName:ie.ZodIntersection,...ue(o)});class We extends me{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==O.array)return I(r,{code:N.invalid_type,expected:O.array,received:r.parsedType}),se;if(r.data.length<this._def.items.length)return I(r,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),se;!this._def.rest&&r.data.length>this._def.items.length&&(I(r,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const s=[...r.data].map((a,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Ge(r,a,r.path,l)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>Ae.mergeArray(o,a)):Ae.mergeArray(o,s)}get items(){return this._def.items}rest(n){return new We({...this._def,rest:n})}}We.create=(t,n)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new We({items:t,typeName:ie.ZodTuple,rest:null,...ue(n)})};class At extends me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==O.object)return I(r,{code:N.invalid_type,expected:O.object,received:r.parsedType}),se;const i=[],s=this._def.keyType,a=this._def.valueType;for(const l in r.data)i.push({key:s._parse(new Ge(r,l,r.path,l)),value:a._parse(new Ge(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?Ae.mergeObjectAsync(o,i):Ae.mergeObjectSync(o,i)}get element(){return this._def.valueType}static create(n,o,r){return o instanceof me?new At({keyType:n,valueType:o,typeName:ie.ZodRecord,...ue(r)}):new At({keyType:Oe.create(),valueType:n,typeName:ie.ZodRecord,...ue(o)})}}class ln extends me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==O.map)return I(r,{code:N.invalid_type,expected:O.map,received:r.parsedType}),se;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([l,u],d)=>({key:i._parse(new Ge(r,l,r.path,[d,"key"])),value:s._parse(new Ge(r,u,r.path,[d,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of a){const d=await u.key,p=await u.value;if(d.status==="aborted"||p.status==="aborted")return se;(d.status==="dirty"||p.status==="dirty")&&o.dirty(),l.set(d.value,p.value)}return{status:o.value,value:l}})}else{const l=new Map;for(const u of a){const d=u.key,p=u.value;if(d.status==="aborted"||p.status==="aborted")return se;(d.status==="dirty"||p.status==="dirty")&&o.dirty(),l.set(d.value,p.value)}return{status:o.value,value:l}}}}ln.create=(t,n,o)=>new ln({valueType:n,keyType:t,typeName:ie.ZodMap,...ue(o)});class ut extends me{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==O.set)return I(r,{code:N.invalid_type,expected:O.set,received:r.parsedType}),se;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(I(r,{code:N.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),o.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(I(r,{code:N.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),o.dirty());const s=this._def.valueType;function a(u){const d=new Set;for(const p of u){if(p.status==="aborted")return se;p.status==="dirty"&&o.dirty(),d.add(p.value)}return{status:o.value,value:d}}const l=[...r.data.values()].map((u,d)=>s._parse(new Ge(r,u,r.path,d)));return r.common.async?Promise.all(l).then(u=>a(u)):a(l)}min(n,o){return new ut({...this._def,minSize:{value:n,message:K.toString(o)}})}max(n,o){return new ut({...this._def,maxSize:{value:n,message:K.toString(o)}})}size(n,o){return this.min(n,o).max(n,o)}nonempty(n){return this.min(1,n)}}ut.create=(t,n)=>new ut({valueType:t,minSize:null,maxSize:null,typeName:ie.ZodSet,...ue(n)});class kt extends me{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==O.function)return I(o,{code:N.invalid_type,expected:O.function,received:o.parsedType}),se;function r(l,u){return nn({data:l,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,tn(),ht].filter(d=>!!d),issueData:{code:N.invalid_arguments,argumentsError:u}})}function i(l,u){return nn({data:l,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,tn(),ht].filter(d=>!!d),issueData:{code:N.invalid_return_type,returnTypeError:u}})}const s={errorMap:o.common.contextualErrorMap},a=o.data;if(this._def.returns instanceof bt){const l=this;return Be(async function(...u){const d=new Re([]),p=await l._def.args.parseAsync(u,s).catch(G=>{throw d.addIssue(r(u,G)),d}),g=await Reflect.apply(a,this,p);return await l._def.returns._def.type.parseAsync(g,s).catch(G=>{throw d.addIssue(i(g,G)),d})})}else{const l=this;return Be(function(...u){const d=l._def.args.safeParse(u,s);if(!d.success)throw new Re([r(u,d.error)]);const p=Reflect.apply(a,this,d.data),g=l._def.returns.safeParse(p,s);if(!g.success)throw new Re([i(p,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new kt({...this._def,args:We.create(n).rest(ct.create())})}returns(n){return new kt({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,o,r){return new kt({args:n||We.create([]).rest(ct.create()),returns:o||ct.create(),typeName:ie.ZodFunction,...ue(r)})}}class Lt extends me{get schema(){return this._def.getter()}_parse(n){const{ctx:o}=this._processInputParams(n);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}Lt.create=(t,n)=>new Lt({getter:t,typeName:ie.ZodLazy,...ue(n)});class Bt extends me{_parse(n){if(n.data!==this._def.value){const o=this._getOrReturnCtx(n);return I(o,{received:o.data,code:N.invalid_literal,expected:this._def.value}),se}return{status:"valid",value:n.data}}get value(){return this._def.value}}Bt.create=(t,n)=>new Bt({value:t,typeName:ie.ZodLiteral,...ue(n)});function jn(t,n){return new ot({values:t,typeName:ie.ZodEnum,...ue(n)})}class ot extends me{constructor(){super(...arguments),Dt.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const o=this._getOrReturnCtx(n),r=this._def.values;return I(o,{expected:ke.joinValues(r),received:o.parsedType,code:N.invalid_type}),se}if(an(this,Dt)||Pn(this,Dt,new Set(this._def.values)),!an(this,Dt).has(n.data)){const o=this._getOrReturnCtx(n),r=this._def.values;return I(o,{received:o.data,code:N.invalid_enum_value,options:r}),se}return Be(n.data)}get options(){return this._def.values}get enum(){const n={};for(const o of this._def.values)n[o]=o;return n}get Values(){const n={};for(const o of this._def.values)n[o]=o;return n}get Enum(){const n={};for(const o of this._def.values)n[o]=o;return n}extract(n,o=this._def){return ot.create(n,{...this._def,...o})}exclude(n,o=this._def){return ot.create(this.options.filter(r=>!n.includes(r)),{...this._def,...o})}}Dt=new WeakMap,ot.create=jn;class Ft extends me{constructor(){super(...arguments),Et.set(this,void 0)}_parse(n){const o=ke.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(n);if(r.parsedType!==O.string&&r.parsedType!==O.number){const i=ke.objectValues(o);return I(r,{expected:ke.joinValues(i),received:r.parsedType,code:N.invalid_type}),se}if(an(this,Et)||Pn(this,Et,new Set(ke.getValidEnumValues(this._def.values))),!an(this,Et).has(n.data)){const i=ke.objectValues(o);return I(r,{received:r.data,code:N.invalid_enum_value,options:i}),se}return Be(n.data)}get enum(){return this._def.values}}Et=new WeakMap,Ft.create=(t,n)=>new Ft({values:t,typeName:ie.ZodNativeEnum,...ue(n)});class bt extends me{unwrap(){return this._def.type}_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==O.promise&&o.common.async===!1)return I(o,{code:N.invalid_type,expected:O.promise,received:o.parsedType}),se;const r=o.parsedType===O.promise?o.data:Promise.resolve(o.data);return Be(r.then(i=>this._def.type.parseAsync(i,{path:o.path,errorMap:o.common.contextualErrorMap})))}}bt.create=(t,n)=>new bt({type:t,typeName:ie.ZodPromise,...ue(n)});class Pe extends me{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:o,ctx:r}=this._processInputParams(n),i=this._def.effect||null,s={addIssue:a=>{I(r,a),a.fatal?o.abort():o.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async l=>{if(o.value==="aborted")return se;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?se:u.status==="dirty"||o.value==="dirty"?pt(u.value):u});{if(o.value==="aborted")return se;const l=this._def.schema._parseSync({data:a,path:r.path,parent:r});return l.status==="aborted"?se:l.status==="dirty"||o.value==="dirty"?pt(l.value):l}}if(i.type==="refinement"){const a=l=>{const u=i.refinement(l,s);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?se:(l.status==="dirty"&&o.dirty(),a(l.value),{status:o.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?se:(l.status==="dirty"&&o.dirty(),a(l.value).then(()=>({status:o.value,value:l.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!lt(a))return a;const l=i.transform(a.value,s);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>lt(a)?Promise.resolve(i.transform(a.value,s)).then(l=>({status:o.value,value:l})):a);ke.assertNever(i)}}Pe.create=(t,n,o)=>new Pe({schema:t,typeName:ie.ZodEffects,effect:n,...ue(o)}),Pe.createWithPreprocess=(t,n,o)=>new Pe({schema:n,effect:{type:"preprocess",transform:t},typeName:ie.ZodEffects,...ue(o)});class Ue extends me{_parse(n){return this._getType(n)===O.undefined?Be(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}Ue.create=(t,n)=>new Ue({innerType:t,typeName:ie.ZodOptional,...ue(n)});class rt extends me{_parse(n){return this._getType(n)===O.null?Be(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}rt.create=(t,n)=>new rt({innerType:t,typeName:ie.ZodNullable,...ue(n)});class Ht extends me{_parse(n){const{ctx:o}=this._processInputParams(n);let r=o.data;return o.parsedType===O.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Ht.create=(t,n)=>new Ht({innerType:t,typeName:ie.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...ue(n)});class It extends me{_parse(n){const{ctx:o}=this._processInputParams(n),r={...o,common:{...o.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return vt(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Re(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Re(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}It.create=(t,n)=>new It({innerType:t,typeName:ie.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...ue(n)});class dn extends me{_parse(n){if(this._getType(n)!==O.nan){const r=this._getOrReturnCtx(n);return I(r,{code:N.invalid_type,expected:O.nan,received:r.parsedType}),se}return{status:"valid",value:n.data}}}dn.create=t=>new dn({typeName:ie.ZodNaN,...ue(t)});const dl=Symbol("zod_brand");class Cn extends me{_parse(n){const{ctx:o}=this._processInputParams(n),r=o.data;return this._def.type._parse({data:r,path:o.path,parent:o})}unwrap(){return this._def.type}}class Rt extends me{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?se:s.status==="dirty"?(o.dirty(),pt(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?se:i.status==="dirty"?(o.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(n,o){return new Rt({in:n,out:o,typeName:ie.ZodPipeline})}}class Yt extends me{_parse(n){const o=this._def.innerType._parse(n),r=i=>(lt(i)&&(i.value=Object.freeze(i.value)),i);return vt(o)?o.then(i=>r(i)):r(o)}unwrap(){return this._def.innerType}}Yt.create=(t,n)=>new Yt({innerType:t,typeName:ie.ZodReadonly,...ue(n)});function qn(t,n){const o=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t;return typeof o=="string"?{message:o}:o}function Jn(t,n={},o){return t?gt.create().superRefine((r,i)=>{var s,a;const l=t(r);if(l instanceof Promise)return l.then(u=>{var d,p;if(!u){const g=qn(n,r),C=(p=(d=g.fatal)!==null&&d!==void 0?d:o)!==null&&p!==void 0?p:!0;i.addIssue({code:"custom",...g,fatal:C})}});if(!l){const u=qn(n,r),d=(a=(s=u.fatal)!==null&&s!==void 0?s:o)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...u,fatal:d})}}):gt.create()}const cl={object:$e.lazycreate};var ie;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ie||(ie={}));const ul=(t,n={message:`Input not instance of ${t.name}`})=>Jn(o=>o instanceof t,n),Kn=Oe.create,Qn=nt.create,fl=dn.create,ml=at.create,Xn=Mt.create,hl=dt.create,pl=on.create,gl=$t.create,yl=Nt.create,kl=gt.create,bl=ct.create,wl=Ke.create,Cl=rn.create,Tl=xe.create,Sl=$e.create,vl=$e.strictCreate,Dl=Vt.create,El=sn.create,Ml=_t.create,$l=We.create,Nl=At.create,Vl=ln.create,_l=ut.create,Al=kt.create,Ll=Lt.create,Bl=Bt.create,Fl=ot.create,Hl=Ft.create,Il=bt.create,ea=Pe.create,Rl=Ue.create,Yl=rt.create,zl=Pe.createWithPreprocess,Ol=Rt.create;var it=Object.freeze({__proto__:null,defaultErrorMap:ht,setErrorMap:zs,getErrorMap:tn,makeIssue:nn,EMPTY_PATH:Os,addIssueToContext:I,ParseStatus:Ae,INVALID:se,DIRTY:pt,OK:Be,isAborted:yn,isDirty:kn,isValid:lt,isAsync:vt,get util(){return ke},get objectUtil(){return gn},ZodParsedType:O,getParsedType:Je,ZodType:me,datetimeRegex:Un,ZodString:Oe,ZodNumber:nt,ZodBigInt:at,ZodBoolean:Mt,ZodDate:dt,ZodSymbol:on,ZodUndefined:$t,ZodNull:Nt,ZodAny:gt,ZodUnknown:ct,ZodNever:Ke,ZodVoid:rn,ZodArray:xe,ZodObject:$e,ZodUnion:Vt,ZodDiscriminatedUnion:sn,ZodIntersection:_t,ZodTuple:We,ZodRecord:At,ZodMap:ln,ZodSet:ut,ZodFunction:kt,ZodLazy:Lt,ZodLiteral:Bt,ZodEnum:ot,ZodNativeEnum:Ft,ZodPromise:bt,ZodEffects:Pe,ZodTransformer:Pe,ZodOptional:Ue,ZodNullable:rt,ZodDefault:Ht,ZodCatch:It,ZodNaN:dn,BRAND:dl,ZodBranded:Cn,ZodPipeline:Rt,ZodReadonly:Yt,custom:Jn,Schema:me,ZodSchema:me,late:cl,get ZodFirstPartyTypeKind(){return ie},coerce:{string:t=>Oe.create({...t,coerce:!0}),number:t=>nt.create({...t,coerce:!0}),boolean:t=>Mt.create({...t,coerce:!0}),bigint:t=>at.create({...t,coerce:!0}),date:t=>dt.create({...t,coerce:!0})},any:kl,array:Tl,bigint:ml,boolean:Xn,date:hl,discriminatedUnion:El,effect:ea,enum:Fl,function:Al,instanceof:ul,intersection:Ml,lazy:Ll,literal:Bl,map:Vl,nan:fl,nativeEnum:Hl,never:wl,null:yl,nullable:Yl,number:Qn,object:Sl,oboolean:()=>Xn().optional(),onumber:()=>Qn().optional(),optional:Rl,ostring:()=>Kn().optional(),pipeline:Ol,preprocess:zl,promise:Il,record:Nl,set:_l,strictObject:vl,string:Kn,symbol:pl,transformer:ea,tuple:$l,undefined:gl,union:Dl,unknown:bl,void:Cl,NEVER:se,ZodIssueCode:N,quotelessJson:Ys,ZodError:Re});it.object({date:it.string().regex(/^\d{4}-\d{2}-\d{2}$/),year:it.number().int(),month:it.number().int().min(1).max(12),week:it.number().int().min(1).max(7),monthStr:it.string(),weekStr:it.string(),day:it.number().int().min(1).max(31)}),w.extend(ra);const xl=e.defineComponent({name:"Gantt",props:{styleConfig:{type:Object,required:!0,default:()=>({headersHeight:100,rowHeight:60}),validator:t=>t.headersHeight>0&&t.rowHeight>0},dataConfig:{type:Object,required:!0,default:()=>({dataSource:[],taskHeaders:[],mapFields:{}}),validator:t=>Array.isArray(t.dataSource)&&Array.isArray(t.taskHeaders)&&typeof t.mapFields=="object"&&t.mapFields!==null},eventConfig:{type:Object,required:!0}},components:{DatePicker:Bn,SplitPane:Xa,TaskTable:Bo,RightTable:br,GanttConfigPanel:On},setup(t){var q,ne,ge,Me,Se;const{t:n,locale:o}=tt(),r=()=>({"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[o.value]||"en",i=e.computed(()=>t.dataConfig.mapFields),s=e.computed(()=>t.dataConfig.dataSource),{config:a,updateConfig:l}=Tt(),u=e.ref({finishToStart:((q=a.linkTypeVisibility)==null?void 0:q.finishToStart)??!0,startToStart:((ne=a.linkTypeVisibility)==null?void 0:ne.startToStart)??!0,finishToFinish:((ge=a.linkTypeVisibility)==null?void 0:ge.finishToFinish)??!0,startToFinish:((Me=a.linkTypeVisibility)==null?void 0:Me.startToFinish)??!0,parentChild:((Se=a.linkTypeVisibility)==null?void 0:Se.parentChild)??!0}),d=()=>{l({linkTypeVisibility:{...u.value}})},p=e.ref([]),g=e.ref(35),C=e.ref(["button is-active","button","button","button"]),G=e.ref("月"),E=e.ref(t.dataConfig.queryStartDate||w().locale(r()).startOf("month").format("YYYY-MM-DD")),F=e.ref(w().locale(r()).add(-5,"y").format("YYYY-MM-DD")),m=e.ref(w().locale(r()).add(5,"y").format("YYYY-MM-DD")),R=e.ref(!1),b=e.ref(E.value),v=e.ref(t.dataConfig.queryEndDate||w().locale(r()).endOf("month").format("YYYY-MM-DD")),V=e.ref(w().locale(r()).add(-5,"y").format("YYYY-MM-DD")),k=e.ref(w(E.value).locale(r()).add(5,"y").format("YYYY-MM-DD")),J=e.ref(!1),j=e.ref(v.value),U=e.ref([]),Q=e.ref([]),A=e.ref([]),Y=e.ref([]),H=e.ref(0),X=e.ref(0),Te=e.ref(E.value+" 00:00:00"),h=e.ref(v.value+" 23:59:59"),c=e.ref(""),y=e.ref(),f=e.computed(()=>T.subTask),D=e.computed(()=>T.editTask),L=e.computed(()=>T.removeTask),M=e.computed(()=>T.rootTask),B=e.computed(()=>T.allowChangeTaskDate),x=S=>{const ee=w(b.value),fe=w(j.value);if(!(!ee.isValid()||!fe.isValid()||fe.diff(ee,"day")<0)){switch(Te.value=b.value+" 00:00:00",h.value=j.value+" 23:59:59",A.value=[],Q.value=[],U.value=[],Y.value=[],S){case"月":{H.value=80;const Z=[];let we=ee.startOf("month");for(;we.isBefore(fe)||we.isSame(fe,"month");)Z.push(we.format("YYYY-MM-DD")),we=we.add(1,"month");if(Z.some(ae=>w(ae).format("YYYY-MM")===fe.format("YYYY-MM"))||Z.push(fe.format("YYYY-MM-DD")),Z.length===1){const ae=fe.diff(ee,"day")+1;U.value.push({title:ee.locale(r()).format("MMMM"),width:ae*H.value})}else Z.forEach((ae,be)=>{if(be===0){const he=ee.endOf("month").format("YYYY-MM-DD"),Ce=w(he).diff(ee,"day")+1;U.value.push({title:w(ae).locale(r()).format("MMMM"),width:Ce*H.value})}else if(be===Z.length-1){const he=fe.startOf("month").format("YYYY-MM-DD"),Ce=fe.diff(w(he),"day")+1;U.value.push({title:w(ae).locale(r()).format("MMMM"),width:Ce*H.value})}else{const he=w(ae,"YYYY-MM").daysInMonth();U.value.push({title:w(ae).locale(r()).format("MMMM"),width:he*H.value})}});let Ee=ee;for(;Ee.isBefore(fe)||Ee.isSame(fe,"day");){const be=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Ee.format("DD")+"日":Ee.format("DD"),he=Ee.format("YYYY-MM-DD"),Ce=Ee.locale(r()).format("dddd");A.value.push({title:Ce,width:H.value,fulldate:he}),Q.value.push({title:be,width:H.value,fulldate:he}),Ee=Ee.add(1,"day")}X.value=Q.value.length;break}case"周":{H.value=120;let Z=ee.startOf("isoWeek");const we=fe.endOf("isoWeek"),Ee=[];let ae=Z.startOf("month");for(;ae.isBefore(we)||ae.isSame(we,"month");)Ee.push(ae.format("YYYY-MM-DD")),ae=ae.add(1,"month");for(Ee.forEach((be,he)=>{const Ce=w(be),Ze=Ce.endOf("month");let Xe=0,st=Z.clone();for(;st.isBefore(we)||st.isSame(we,"week");){const zt=st.startOf("isoWeek"),z=st.endOf("isoWeek");(zt.isSame(Ce,"month")||z.isSame(Ce,"month")||zt.isBefore(Ze)&&z.isAfter(Ce))&&Xe++,st=st.add(1,"week")}if(Xe>0){const z=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Ce.format("YYYY年MM月"):Ce.locale(r()).format("MMMM YYYY");U.value.push({title:z,width:Xe*H.value})}});Z.isBefore(we)||Z.isSame(we,"week");){const be=Z.startOf("isoWeek"),he=Z.endOf("isoWeek"),Ze=["zh-CN","ja-JP","ko-KR"].includes(o.value)?`第${Z.isoWeek()}周 (${be.format("MM/DD")}-${he.format("MM/DD")})`:`Week ${Z.isoWeek()} (${be.format("MM/DD")}-${he.format("MM/DD")})`;A.value.push({title:Ze,width:H.value,fulldate:be.format("YYYY-MM-DD")}),Z=Z.add(1,"week")}X.value=A.value.length;break}case"日":{H.value=80;let Z=ee;for(;Z.isBefore(fe)||Z.isSame(fe,"day");){const Ee=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Z.locale(r()).format("MMMM DD")+"日":Z.locale(r()).format("MMMM DD"),ae=Z.format("YYYY-MM-DD"),be=Z.locale(r()).format("dddd");A.value.push({title:be,width:H.value,fulldate:ae}),Q.value.push({title:Ee,width:H.value,fulldate:ae}),Z=Z.add(1,"day")}X.value=Q.value.length;break}case"时":{H.value=30;let Z=ee;const we=fe.endOf("day");for(;Z.isBefore(we);){const ae=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Z.locale(r()).format("MMMM DD")+"日":Z.locale(r()).format("MMMM DD"),be=Z.format("YYYY-MM-DD"),he=Z.locale(r()).format("dddd");A.value.push({title:he,width:24*H.value,fulldate:be}),Q.value.push({title:ae,width:24*H.value,fulldate:be});for(let Ce=0;Ce<=23;Ce++){const Ze=["zh-CN","ja-JP","ko-KR"].includes(o.value);Y.value.push({title:Ze?Ce+"点":`${Ce}:00`,width:H.value})}Z=Z.add(1,"day")}X.value=Y.value.length;break}}t.eventConfig.queryTask(b.value,j.value,G.value)}},P=(S,ee)=>{let fe=S.filter(ve=>ve[i.value.id]===ee);fe&&fe.length>0&&(c.value=fe[0].index+"."+c.value,P(S,fe[0][i.value.parentId]))},W=(S,ee,fe)=>{let ve=ee.filter(Z=>Z[i.value.parentId]===S);if(ve&&ve.length>0){fe++;for(let Z=0;Z<ve.length;Z++){ve[Z].treeLevel=fe,ve[Z].index=Z+1;let we=p.value.filter(Ee=>Ee[i.value.id]===ve[Z][i.value.parentId]);c.value="",we&&we.length>0?(c.value=we[0].index+"."+ve[Z].index,P(p.value,we[0][i.value.parentId]),ve[Z].no=c.value):ve[Z].no=Z+1+"",p.value.push(ve[Z]),W(ve[Z][i.value.id],ee,fe)}}},te=S=>{for(let ee=0;ee<C.value.length;ee++)C.value[ee]="button";switch(S){case"月":{C.value[0]="button is-active";break}case"周":{C.value[1]="button is-active";break}case"日":{C.value[2]="button is-active";break}case"时":{C.value[3]="button is-active";break}}G.value=S,e.nextTick(()=>{const ee=document.querySelector(".table .content");ee&&(ee.scrollLeft=0)})},le=S=>{w(v.value).diff(w(S.date),"days")<0&&(j.value=S.date,v.value=S.date,ce.setEndGanttDate(w(S.date).toDate())),R.value=!1,b.value=S.date,E.value=S.date,ce.setStartGanttDate(w(S.date).toDate()),V.value=S.date},re=S=>{w(S.date).diff(w(E.value),"days")<0&&(b.value=w(S.date).format("YYYY-MM-DD"),E.value=w(S.date).format("YYYY-MM-DD"),ce.setStartGanttDate(w(S.date).toDate())),J.value=!1,j.value=S.date,v.value=S.date,ce.setEndGanttDate(w(S.date).toDate())};e.watch([G,b,j],([S,ee,fe],[ve,Z,we])=>{(S!==ve||ee!==Z||fe!==we)&&x(S)}),e.watch(o,()=>{x(G.value)}),e.watch(M,S=>{t.eventConfig.addRootTask(S)}),e.watch(f,S=>{t.eventConfig.addSubTask(S)}),e.watch(L,S=>{t.eventConfig.removeTask(S)}),e.watch(D,S=>{t.eventConfig.editTask(S)}),e.watch(B,S=>{t.eventConfig.allowChangeTaskDate(S)}),e.watch(()=>T.barDate,S=>{if(S){const{id:ee,startDate:fe,endDate:ve}=S;ee&&fe&&ve&&t.eventConfig.barDate(ee,fe,ve)}}),e.watch(H,S=>{ce.setScale(S)}),e.watch(()=>t.dataConfig.taskHeaders,S=>{ce.setTaskHeaders(S)}),e.watch([U,Q,A,Y],([S,ee,fe,ve])=>{ce.setMonthHeaders(S),ce.setDayHeaders(ee),ce.setWeekHeaders(fe),ce.setHourHeaders(ve)}),e.watch(G,S=>{ce.setMode(S)}),e.watch(i,S=>{S&&ce.setMapFields(S)}),e.watch(()=>t.dataConfig.queryStartDate,S=>{S&&(ce.setStartGanttDate(w(S).toDate()),Te.value=S,b.value=S,E.value=S)}),e.watch(()=>t.dataConfig.queryEndDate,S=>{S&&(ce.setEndGanttDate(w(S).toDate()),h.value=S,j.value=S,v.value=S)}),e.watch(X,S=>{S&&ce.setTimelineCellCount(S)}),e.onBeforeMount(()=>{ce.setStartGanttDate(w(E.value).toDate()),ce.setEndGanttDate(w(v.value).toDate()),ce.setMonthHeaders(U.value),ce.setWeekHeaders(A.value),ce.setDayHeaders(Q.value),ce.setHourHeaders(Y.value),ce.setTaskHeaders(t.dataConfig.taskHeaders),ce.setMapFields(i.value),ce.setTimelineCellCount(X.value),s.value&&s.value.length>0&&ce.setTasks(s.value)});const De=S=>{const ee=S;t.eventConfig.updateProgress&&t.eventConfig.updateProgress(ee.detail)};e.onMounted(()=>{U.value=[],A.value=[],Q.value=[],Y.value=[],W("0",s.value,0),ce.setTasks(p.value),e.nextTick(()=>{G.value="月",ce.setMode(G.value),x(G.value)}),window.addEventListener("taskProgressUpdate",De)});let $=null;e.watch(s,S=>{S&&S.length>0?($&&clearTimeout($),$=setTimeout(()=>{p.value=[],W("0",S,0),ce.setTasks(p.value),$=null},100)):S&&S.length===0&&ce.setTasks([])},{immediate:!1}),e.onBeforeUnmount(()=>{window.removeEventListener("taskProgressUpdate",De)}),e.provide(mt.AddRootTaskSymbol,S=>t.eventConfig.addRootTask(S)),e.provide(mt.SetBarColorSymbol,S=>t.styleConfig.setBarColor(S)),t.styleConfig.setTaskType&&e.provide(mt.SetTaskTypeSymbol,t.styleConfig.setTaskType),e.provide("ganttContainer",y),e.watch(()=>t.dataConfig.dependencies,S=>{S&&S.length>0&&(Qt.clear(),S.forEach(ee=>{Qt.addDependency(ee)}))},{immediate:!0});const _=S=>{},oe=e.computed(()=>{var S,ee,fe,ve;return{finishToStart:((S=a.linkTypeColors)==null?void 0:S.finishToStart)||"#3498db",startToStart:((ee=a.linkTypeColors)==null?void 0:ee.startToStart)||"#2ecc71",finishToFinish:((fe=a.linkTypeColors)==null?void 0:fe.finishToFinish)||"#e74c3c",startToFinish:((ve=a.linkTypeColors)==null?void 0:ve.startToFinish)||"#f39c12"}});return{t:n,subTask:f,editTask:D,removeTask:L,rootTask:M,allowChangeTaskDate:B,paneLengthPercent:g,startDate:E,endDate:v,minStartDate:F,maxStartDate:m,confirmStart:le,minEndDate:V,maxEndDate:k,confirmEnd:re,buttonClass:C,timeMode:te,onLinkConfigChange:_,ganttContainer:y,linkTypeColors:oe,linkTypeVisibility:u,updateLinkVisibility:d}}}),Pl={class:"page gantt-container",ref:"ganttContainer"},Zl={class:"toolbar"},Gl={class:"dateInput"},Wl={style:{"margin-right":"20px","margin-left":"20px",color:"#606266"}},Ul={class:"buttonGroup"},jl={class:"metro-content"},ql={class:"metro-text"},Jl={class:"metro-content"},Kl={class:"metro-text"},Ql={class:"metro-content"},Xl={class:"metro-text"},ed={class:"metro-content"},td={class:"metro-text"},nd={class:"link-legend"},ad={class:"legend-title"},od={class:"legend-items"},rd={class:"legend-label"},id={class:"legend-desc"},sd={width:"24",height:"12",viewBox:"0 0 24 12"},ld=["stroke"],dd=["fill"],cd={class:"legend-label"},ud={class:"legend-desc"},fd={width:"24",height:"12",viewBox:"0 0 24 12"},md=["stroke"],hd=["fill"],pd={class:"legend-label"},gd={class:"legend-desc"},yd={width:"24",height:"12",viewBox:"0 0 24 12"},kd=["stroke"],bd=["fill"],wd={class:"legend-label"},Cd={class:"legend-desc"},Td={width:"24",height:"12",viewBox:"0 0 24 12"},Sd=["stroke"],vd=["fill"],Dd={class:"legend-label"},Ed={class:"legend-desc"},Md={class:"config-buttons"},$d={class:"gantt"};function Nd(t,n,o,r,i,s){const a=e.resolveComponent("DatePicker"),l=e.resolveComponent("GanttConfigPanel"),u=e.resolveComponent("TaskTable"),d=e.resolveComponent("RightTable"),p=e.resolveComponent("SplitPane");return e.openBlock(),e.createElementBlock("div",Pl,[e.createElementVNode("div",Zl,[e.createElementVNode("div",Gl,[e.createVNode(a,{date:t.startDate,"min-date":t.minStartDate,"max-date":t.maxStartDate,onConfirm:t.confirmStart},null,8,["date","min-date","max-date","onConfirm"]),e.createElementVNode("span",Wl,e.toDisplayString(t.t("common.to")),1),e.createVNode(a,{date:t.endDate,"min-date":t.minEndDate,"max-date":t.maxEndDate,onConfirm:t.confirmEnd},null,8,["date","min-date","max-date","onConfirm"])]),e.createElementVNode("div",Ul,[e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[0],"metro-btn"]),onClick:n[0]||(n[0]=g=>t.timeMode("月"))},[e.createElementVNode("div",jl,[n[15]||(n[15]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"})])],-1)),e.createElementVNode("div",ql,e.toDisplayString(t.t("viewMode.month")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[1],"metro-btn"]),onClick:n[1]||(n[1]=g=>t.timeMode("周"))},[e.createElementVNode("div",Jl,[n[16]||(n[16]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"})])],-1)),e.createElementVNode("div",Kl,e.toDisplayString(t.t("viewMode.week")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[2],"metro-btn"]),onClick:n[2]||(n[2]=g=>t.timeMode("日"))},[e.createElementVNode("div",Ql,[n[17]||(n[17]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 2 2h8c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H6V4h8v16z"})])],-1)),e.createElementVNode("div",Xl,e.toDisplayString(t.t("viewMode.day")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[3],"metro-btn"]),onClick:n[3]||(n[3]=g=>t.timeMode("时"))},[e.createElementVNode("div",ed,[n[18]||(n[18]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})])],-1)),e.createElementVNode("div",td,e.toDisplayString(t.t("viewMode.hour")),1)])],2)]),e.createElementVNode("div",nd,[e.createElementVNode("div",ad,[n[19]||(n[19]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("link.legend")),1)]),e.createElementVNode("div",od,[e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.parentChild}]),title:"父子关系:显示任务的层级结构"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=g=>t.linkTypeVisibility.parentChild=g),onChange:n[5]||(n[5]=(...g)=>t.updateLinkVisibility&&t.updateLinkVisibility(...g))},null,544),[[e.vModelCheckbox,t.linkTypeVisibility.parentChild]]),n[20]||(n[20]=e.createElementVNode("svg",{width:"24",height:"12",viewBox:"0 0 24 12"},[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:"#95a5a6","stroke-width":"1.5","stroke-dasharray":"3,3"}),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:"#95a5a6"})],-1)),e.createElementVNode("span",rd,e.toDisplayString(t.t("link.pc")),1),e.createElementVNode("span",id,e.toDisplayString(t.t("link.parentChild")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.finishToStart}]),title:"完成-开始:前置任务完成后,后续任务才能开始"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[6]||(n[6]=g=>t.linkTypeVisibility.finishToStart=g),onChange:n[7]||(n[7]=(...g)=>t.updateLinkVisibility&&t.updateLinkVisibility(...g))},null,544),[[e.vModelCheckbox,t.linkTypeVisibility.finishToStart]]),(e.openBlock(),e.createElementBlock("svg",sd,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToStart,"stroke-width":"2"},null,8,ld),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToStart},null,8,dd)])),e.createElementVNode("span",cd,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",ud,e.toDisplayString(t.t("link.finishToStart")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.startToStart}]),title:"开始-开始:两个任务同时开始"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[8]||(n[8]=g=>t.linkTypeVisibility.startToStart=g),onChange:n[9]||(n[9]=(...g)=>t.updateLinkVisibility&&t.updateLinkVisibility(...g))},null,544),[[e.vModelCheckbox,t.linkTypeVisibility.startToStart]]),(e.openBlock(),e.createElementBlock("svg",fd,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToStart,"stroke-width":"2"},null,8,md),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToStart},null,8,hd)])),e.createElementVNode("span",pd,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",gd,e.toDisplayString(t.t("link.startToStart")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.finishToFinish}]),title:"完成-完成:两个任务同时完成"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[10]||(n[10]=g=>t.linkTypeVisibility.finishToFinish=g),onChange:n[11]||(n[11]=(...g)=>t.updateLinkVisibility&&t.updateLinkVisibility(...g))},null,544),[[e.vModelCheckbox,t.linkTypeVisibility.finishToFinish]]),(e.openBlock(),e.createElementBlock("svg",yd,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToFinish,"stroke-width":"2"},null,8,kd),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToFinish},null,8,bd)])),e.createElementVNode("span",wd,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",Cd,e.toDisplayString(t.t("link.finishToFinish")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.startToFinish}]),title:"开始-完成:前置任务开始后,后续任务才能完成"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=g=>t.linkTypeVisibility.startToFinish=g),onChange:n[13]||(n[13]=(...g)=>t.updateLinkVisibility&&t.updateLinkVisibility(...g))},null,544),[[e.vModelCheckbox,t.linkTypeVisibility.startToFinish]]),(e.openBlock(),e.createElementBlock("svg",Td,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToFinish,"stroke-width":"2"},null,8,Sd),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToFinish},null,8,vd)])),e.createElementVNode("span",Dd,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",Ed,e.toDisplayString(t.t("link.startToFinish")),1)],2)])]),e.createElementVNode("div",Md,[e.createVNode(l)])]),e.createElementVNode("div",$d,[e.createVNode(p,{direction:"row",min:0,max:100,triggerLength:10,paneLengthPercent:t.paneLengthPercent,"onUpdate:paneLengthPercent":n[14]||(n[14]=g=>t.paneLengthPercent=g)},{one:e.withCtx(()=>[e.createVNode(u,{headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),two:e.withCtx(()=>[e.createVNode(d,{ref:"barContent",headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),_:1},8,["paneLengthPercent"])])],512)}const cn=Ve(xl,[["render",Nd],["__scopeId","data-v-b001c5e0"]]),Vd=e.defineComponent({name:"GanttThemeSelector",setup(){const{t}=tt(),n=e.ref(!1),o=e.ref("metro"),r=e.ref(""),i=e.ref(),s=e.ref(He),a=e.inject("ganttContainer"),l=()=>{n.value=!n.value},u=()=>{n.value=!1,g()},d=b=>{o.value=b,r.value="",m(b);let v=null;if(a&&a.value?v=a.value:v=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),v){v.setAttribute("data-gantt-theme",b);const V=document.querySelector(".page");V&&V.setAttribute("data-gantt-theme",b);try{localStorage.setItem("gantt-theme",b)}catch(k){console.warn("Failed to save theme:",k)}setTimeout(()=>{v&&(v.style.display="none",v.offsetHeight,v.style.display="")},50)}u()},p=b=>{b!==o.value&&a&&a.value&&(r.value=b,m(b))},g=()=>{r.value&&a&&a.value&&(r.value="",m(o.value))},C=()=>{const b=Ie.exportThemeConfig(),v=new Blob([b],{type:"application/json"}),V=URL.createObjectURL(v),k=document.createElement("a");k.href=V,k.download=`gantt-theme-config-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(V)},G=()=>{var b;(b=i.value)==null||b.click()},E=b=>{var V;const v=(V=b.target.files)==null?void 0:V[0];if(v){const k=new FileReader;k.onload=J=>{var j;try{const U=(j=J.target)==null?void 0:j.result;Ie.importThemeConfig(U)?(o.value=Ie.getCurrentTheme(),alert("主题配置导入成功!")):alert("主题配置文件格式错误!")}catch{alert("主题配置文件格式错误!")}},k.readAsText(v)}},F=b=>{b.target.closest(".gantt-theme-selector")||u()},m=b=>{const v=document.getElementById("gantt-theme-styles");v&&v.remove();const V=He.find(U=>U.id===b);if(!V)return;const k=document.createElement("style");k.id="gantt-theme-styles";const J=Object.entries(V.cssVariables).map(([U,Q])=>`${U}: ${Q};`).join(`
76
- `);k.textContent=`
77
- /* 甘特图主题样式 - ${b} */
25
+ L ${b} ${f}`}},F=(p,d,b)=>{const f=t.linkConfig.arrowSize||8,$=p.rightX,B=p.centerY,_=d.leftX-f,L=d.centerY;return D($,B,_,L,b,"horizontal")},h=(p,d,b)=>{const f=t.linkConfig.arrowSize||8,$=p.leftX,B=p.centerY,_=d.leftX-f,L=d.centerY;return D($,B,_,L,b,"left-u")},O=(p,d,b)=>{const f=t.linkConfig.arrowSize||8,$=p.rightX,B=p.centerY,_=d.rightX+f,L=d.centerY;return D($,B,_,L,b,"right-u")},S=(p,d,b)=>{const f=t.linkConfig.arrowSize||8,$=p.leftX,B=p.centerY,_=d.rightX+f,L=d.centerY;return D($,B,_,L,b,"cross")},D=(p,d,b,f,$,B)=>{const{bezierCurvature:_,rightAngleOffset:L,smoothCorners:Z,cornerRadius:G}=t.linkConfig;switch($){case Ve.STRAIGHT:return`M ${p} ${d} L ${b} ${f}`;case Ve.BEZIER:return V(p,d,b,f,B,_);case Ve.RIGHT_ANGLE:default:return C(p,d,b,f,B,L,Z,G)}},V=(p,d,b,f,$,B)=>{const _=b-p,L=f-d;switch($){case"horizontal":if(_>20&&Math.abs(L)<10)return`M ${p} ${d} L ${b} ${f}`;if(_<20){const te=l(d,f,30),oe=30*B;return`M ${p} ${d}
26
+ C ${p+oe} ${d} ${p+oe} ${te} ${p+30/2} ${te}
27
+ C ${b-oe} ${te} ${b-oe} ${f} ${b} ${f}`}const Z=Math.min(Math.abs(_)*B,60),G=p+Z,W=b-Z;return`M ${p} ${d} C ${G} ${d} ${W} ${f} ${b} ${f}`;case"left-u":const ne=25,le=Math.min(p,b)-ne,re=ne*B;if(Math.abs(L)>s()){const R=i((d+f)/2);return`M ${p} ${d}
28
+ C ${p-re} ${d} ${le} ${d+re} ${le} ${R}
29
+ C ${le} ${f-re} ${b-re} ${f} ${b} ${f}`}return`M ${p} ${d} C ${le} ${d} ${le} ${f} ${b} ${f}`;case"right-u":const Te=25,E=Math.max(p,b)+Te,M=Te*B;if(Math.abs(L)>s()){const R=i((d+f)/2);return`M ${p} ${d}
30
+ C ${p+M} ${d} ${E} ${d+M} ${E} ${R}
31
+ C ${E} ${f-M} ${b+M} ${f} ${b} ${f}`}return`M ${p} ${d} C ${E} ${d} ${E} ${f} ${b} ${f}`;case"cross":if(_>20&&Math.abs(L)<10)return`M ${p} ${d} L ${b} ${f}`;const ae=Math.min(Math.abs(_)*B,60),J=p-ae,k=b+ae;return`M ${p} ${d} C ${J} ${d} ${k} ${f} ${b} ${f}`;default:return`M ${p} ${d} L ${b} ${f}`}},C=(p,d,b,f,$,B,_,L)=>{const Z=b-p,G=f-d;switch($){case"horizontal":if(Z>20&&Math.abs(G)<10)return`M ${p} ${d} L ${b} ${f}`;if(Z<20){const M=B,ae=l(d,f,M),J=p+M/2,k=b-M/2;if(_&&L>0){const R=Math.min(L,M/4);return`M ${p} ${d}
32
+ L ${J-R} ${d}
33
+ Q ${J} ${d} ${J} ${d+R}
34
+ L ${J} ${ae-R}
35
+ Q ${J} ${ae} ${J+R} ${ae}
36
+ L ${k-R} ${ae}
37
+ Q ${k} ${ae} ${k} ${ae+R}
38
+ L ${k} ${f-R}
39
+ Q ${k} ${f} ${k+R} ${f}
40
+ L ${b} ${f}`}return`M ${p} ${d}
41
+ L ${J} ${d}
42
+ L ${J} ${ae}
43
+ L ${k} ${ae}
44
+ L ${k} ${f}
45
+ L ${b} ${f}`}const W=p+Math.abs(Z)/2;if(_&&L>0){const M=Math.min(L,Math.abs(Z)/4,Math.abs(G)/2);return G>0?`M ${p} ${d}
46
+ L ${W-M} ${d}
47
+ Q ${W} ${d} ${W} ${d+M}
48
+ L ${W} ${f-M}
49
+ Q ${W} ${f} ${W+M} ${f}
50
+ L ${b} ${f}`:`M ${p} ${d}
51
+ L ${W-M} ${d}
52
+ Q ${W} ${d} ${W} ${d-M}
53
+ L ${W} ${f+M}
54
+ Q ${W} ${f} ${W+M} ${f}
55
+ L ${b} ${f}`}return`M ${p} ${d} L ${W} ${d} L ${W} ${f} L ${b} ${f}`;case"left-u":const ne=B,le=Math.min(p,b)-ne;if(_&&L>0){const M=Math.min(L,ne/2,Math.abs(G)/4);return`M ${p} ${d}
56
+ L ${le+M} ${d}
57
+ Q ${le} ${d} ${le} ${d+(G>0?M:-M)}
58
+ L ${le} ${f-(G>0?M:-M)}
59
+ Q ${le} ${f} ${le+M} ${f}
60
+ L ${b} ${f}`}return`M ${p} ${d} L ${le} ${d} L ${le} ${f} L ${b} ${f}`;case"right-u":const re=B,Te=Math.max(p,b)+re;if(_&&L>0){const M=Math.min(L,re/2,Math.abs(G)/4);return`M ${p} ${d}
61
+ L ${Te-M} ${d}
62
+ Q ${Te} ${d} ${Te} ${d+(G>0?M:-M)}
63
+ L ${Te} ${f-(G>0?M:-M)}
64
+ Q ${Te} ${f} ${Te-M} ${f}
65
+ L ${b} ${f}`}return`M ${p} ${d} L ${Te} ${d} L ${Te} ${f} L ${b} ${f}`;case"cross":if(Z>20&&Math.abs(G)<10)return`M ${p} ${d} L ${b} ${f}`;const E=p+Z/2;if(_&&L>0){const M=Math.min(L,Math.abs(Z)/4,Math.abs(G)/2);return G>0?`M ${p} ${d}
66
+ L ${E-M} ${d}
67
+ Q ${E} ${d} ${E} ${d+M}
68
+ L ${E} ${f-M}
69
+ Q ${E} ${f} ${E+M} ${f}
70
+ L ${b} ${f}`:`M ${p} ${d}
71
+ L ${E-M} ${d}
72
+ Q ${E} ${d} ${E} ${d-M}
73
+ L ${E} ${f+M}
74
+ Q ${E} ${f} ${E+M} ${f}
75
+ L ${b} ${f}`}return`M ${p} ${d} L ${E} ${d} L ${E} ${f} L ${b} ${f}`;default:return`M ${p} ${d} L ${b} ${f}`}},K=(p,d,b=de.FINISH_TO_START)=>{if(!p)return console.warn("子任务位置无效"),"";try{const f=p.leftX,$=p.centerY,B=f-d,_=$-d/2,L=$+d/2;return`${f},${$} ${B},${_} ${B},${L}`}catch(f){return console.error("箭头生成失败:",f),""}},q=(p,d,b,f)=>{if(!p||!d)return"";try{let $,B,_="right";switch(b){case de.FINISH_TO_START:$=d.leftX,B=d.centerY,_="right";break;case de.START_TO_START:$=d.leftX,B=d.centerY,_="right";break;case de.FINISH_TO_FINISH:$=d.rightX,B=d.centerY,_="left";break;case de.START_TO_FINISH:$=d.rightX,B=d.centerY,_="left";break;default:$=d.leftX,B=d.centerY,_="right"}let L,Z,G,W;return _==="right"?(L=$-f,Z=B-f/2,G=$-f,W=B+f/2):(L=$+f,Z=B-f/2,G=$+f,W=B+f/2),`${$},${B} ${L},${Z} ${G},${W}`}catch($){return console.error("依赖箭头生成失败:",$),""}},j=p=>{const d=new Set,b=f=>{v.tasks.filter(B=>B[v.mapFields.parentId]===f).forEach(B=>{const _=B[v.mapFields.id];d.add(_),b(_)})};return b(p),d},X=p=>{for(const d of v.collapsedTasks)if(j(d).has(p))return!0;return!1},A=()=>{const p=[],d=t.linkConfig.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0};d.parentChild&&v.tasks.forEach($=>{const B=$[v.mapFields.parentId],_=$[v.mapFields.id];if(B&&B!=="0"){if(X(_))return;const L=o(B),Z=o(_);if(L&&Z){const G=`parent-child-${B}-${_}`,W={...L,id:B,taskId:B},ne={...Z,id:_,taskId:_},le=m(W,ne,de.PARENT_CHILD,G),re=t.linkConfig.showArrow?K(Z,t.linkConfig.arrowSize,de.PARENT_CHILD):"";p.push({id:G,sourceId:B,targetId:_,type:de.PARENT_CHILD,path:le,arrowPoints:re,labelX:Z.centerX,labelY:Z.centerY-10})}}});const b=Kt.getDependencies(),f=$=>{if(typeof $=="number")switch($){case 0:return d.finishToStart;case 1:return d.startToStart;case 2:return d.finishToFinish;case 3:return d.startToFinish;default:return!0}switch($){case de.FINISH_TO_START:return d.finishToStart;case de.START_TO_START:return d.startToStart;case de.FINISH_TO_FINISH:return d.finishToFinish;case de.START_TO_FINISH:return d.startToFinish;case de.PARENT_CHILD:return d.parentChild;default:return!0}};b.forEach($=>{if(!f($.type))return;const B=o($.sourceTaskId),_=o($.targetTaskId);if(B&&_){const L=`dependency-${$.id}`,Z={...B,id:$.sourceTaskId,taskId:$.sourceTaskId},G={..._,id:$.targetTaskId,taskId:$.targetTaskId},W=m(Z,G,$.type,L),ne=t.linkConfig.showArrow?q(Z,G,$.type,t.linkConfig.arrowSize):"",le={[de.FINISH_TO_START]:"FS",[de.START_TO_START]:"SS",[de.FINISH_TO_FINISH]:"FF",[de.START_TO_FINISH]:"SF",[de.PARENT_CHILD]:""};p.push({id:L,sourceId:$.sourceTaskId,targetId:$.targetTaskId,type:$.type,path:W,arrowPoints:ne,label:le[$.type]||"",labelX:(B.centerX+_.centerX)/2,labelY:(B.centerY+_.centerY)/2-10})}}),n.value=p};e.watch(()=>v.tasks,()=>{setTimeout(A,50)},{deep:!0}),e.watch(()=>v.scale,()=>{setTimeout(A,50)}),e.watch(()=>v.mode,()=>{setTimeout(A,200)}),e.watch(()=>v.timelineCellCount,()=>{setTimeout(A,100)}),e.watch(()=>[v.startGanttDate,v.endGanttDate],()=>{setTimeout(A,100)}),e.watch(()=>v.barDate,()=>{requestAnimationFrame(A)},{deep:!0}),e.watch(()=>t.linkConfig.linkTypeVisibility,()=>{setTimeout(A,50)},{deep:!0}),e.watch(()=>v.collapsedTasks,()=>{setTimeout(A,50)},{deep:!0});let P=null,H=null;e.onMounted(()=>{setTimeout(A,100);const p=document.querySelector(".gantt");p&&(P=new ResizeObserver(A),P.observe(p),H=new MutationObserver(d=>{let b=!1;d.forEach(f=>{var B,_;const $=f.target;if(f.type==="attributes"){const L=f.attributeName;(L==="data-x"||L==="width"||L==="style"||L==="transform")&&((B=$.classList)!=null&&B.contains("bar")||(_=$.classList)!=null&&_.contains("barRow")||$.tagName==="svg")&&(b=!0)}}),b&&requestAnimationFrame(A)}),H.observe(p,{attributes:!0,subtree:!0,attributeFilter:["style","data-x","transform","width"]}))}),e.onUnmounted(()=>{P&&P.disconnect(),H&&H.disconnect()});const ee=p=>{const d=c(p);return!!(d.dashArray&&d.dashArray.length>0)};return{links:n,updateLinks:A,getLinkStyle:c,isDashedLine:ee,getDashAnimationStyle:p=>{if(!ee(p.type)||!t.linkConfig.enableDashAnimation)return{};const d=c(p.type),b=t.linkConfig.dashAnimationSpeed||.8,f=p.type===de.PARENT_CHILD?b*.6:b,_=(d.dashArray||"5,5").split(",").map(Number).reduce((L,Z)=>L+Z,0);return{"--animation-duration":`${f}s`,"--dash-length":`${_}px`}}}}}),Sr=["width","height"],Tr=["d","stroke","stroke-width","stroke-dasharray"],vr=["points","fill","stroke"],$r=["x","y","fill","font-size"];function Dr(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("svg",{class:"task-links-layer",width:t.containerWidth,height:t.containerHeight,style:{position:"absolute",top:"0px",left:"0px",pointerEvents:"none",zIndex:50,overflow:"visible"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,a=>(e.openBlock(),e.createElementBlock("g",{key:a.id},[e.createElementVNode("path",{d:a.path,stroke:t.getLinkStyle(a.type).color,"stroke-width":t.getLinkStyle(a.type).width,"stroke-dasharray":t.getLinkStyle(a.type).dashArray,fill:"none",class:e.normalizeClass(["task-link",a.type,{"dash-animated":t.isDashedLine(a.type)&&t.linkConfig.enableDashAnimation}]),style:e.normalizeStyle(t.getDashAnimationStyle(a))},null,14,Tr),t.linkConfig.showArrow&&a.arrowPoints&&a.arrowPoints.length>0?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:a.arrowPoints,fill:t.getLinkStyle(a.type).color,stroke:t.getLinkStyle(a.type).color,"stroke-width":.5,class:"task-link-arrow"},null,8,vr)):e.createCommentVNode("",!0),a.label&&t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock("text",{key:1,x:a.labelX,y:a.labelY,fill:t.linkConfig.labelColor,"font-size":t.linkConfig.labelFontSize,"text-anchor":"middle",class:"task-link-label"},e.toDisplayString(a.label),9,$r)):e.createCommentVNode("",!0)]))),128))],8,Sr)}const Er=Se(Cr,[["render",Dr],["__scopeId","data-v-dc9db723"]]),Mr=e.defineComponent({props:{rowHeight:{type:Number,required:!0},headers:{type:Array,default:()=>[]}},components:{BarRecursionRow:wr,TaskLinks:Er},setup(t){const n=e.ref(null),{scrollTop:o,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=Hn(),{config:a}=Ct(),l=e.computed(()=>v.tasks),u=e.computed(()=>v.timelineCellCount),c=e.computed(()=>v.scale),m=e.computed(()=>v.mode),y=e.computed(()=>v.startGanttDate),w=e.computed(()=>v.endGanttDate),I=e.computed(()=>v.mapFields),g=e.computed(()=>u.value*c.value),F=e.computed(()=>l.value.length*t.rowHeight);e.watch(o,j=>{r.value&&n.value&&(n.value.scrollTop=j)}),e.onMounted(()=>{n.value&&(n.value.scrollTop=o.value)});const h=()=>l.value.filter(j=>j[I.value.parentId]==="0");let O=null;const S=()=>{O&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{n.value&&(i(!1),s(n.value.scrollTop)),O=null})},D=()=>{},V=e.ref(!1),C=e.ref(0);return{barContent:n,scrollFlag:r,tasks:l,timelineCellCount:u,scale:c,mode:m,startGanttDate:y,endGanttDate:w,mapFields:I,getRootNode:h,scroll:S,mouseover:D,setScrollFlag:i,containerWidth:g,containerHeight:F,linkConfig:a,showGuideLine:V,guideLineX:C,handleMouseMove:j=>{if(!n.value)return;const X=n.value.getBoundingClientRect(),A=j.clientX-X.left+n.value.scrollLeft,P=c.value,ee=Math.floor(A/P)*P+P/2;C.value=ee,V.value=!0},handleMouseLeave:()=>{V.value=!1}}}});function Vr(t,n,o,r,s,i){const a=e.resolveComponent("BarRecursionRow"),l=e.resolveComponent("TaskLinks");return t.tasks?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"barContent",onScroll:n[0]||(n[0]=u=>t.scroll()),onMousemove:n[1]||(n[1]=(...u)=>t.handleMouseMove&&t.handleMouseMove(...u)),onMouseleave:n[2]||(n[2]=(...u)=>t.handleMouseLeave&&t.handleMouseLeave(...u)),class:"content"},[e.createElementVNode("div",{class:"content-inner",style:e.normalizeStyle({minHeight:t.containerHeight+"px",position:"relative"})},[t.showGuideLine?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column-guide-line",style:e.normalizeStyle({left:t.guideLineX+"px",height:t.containerHeight+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(a,{key:`${t.mode}-${t.scale}-${t.timelineCellCount}`,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["rowHeight","tasks"])),e.createVNode(l,{containerWidth:t.containerWidth,containerHeight:t.containerHeight,linkConfig:t.linkConfig},null,8,["containerWidth","containerHeight","linkConfig"])],4)],544)):e.createCommentVNode("",!0)}const Nr=Se(Mr,[["render",Vr],["__scopeId","data-v-51968539"]]),_r=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:50}},components:{TimelineHeader:ar,TableContent:Nr},setup(t){const n=e.ref(null),o=e.computed(()=>v.dayHeaders),r=e.computed(()=>v.weekHeaders),s=e.computed(()=>v.monthHeaders),i=e.computed(()=>v.hourHeaders),a=e.computed(()=>v.startGanttDate),l=e.computed(()=>v.mode),u=e.computed(()=>v.scale);v.timelineCellCount*u.value+100,v.tasks.length*t.rowHeight+100;const c=()=>{if(n.value)switch(l.value){case"月":case"日":n.value.scrollLeft=Number(T().diff(T(a.value),"day"))*Number(u.value);break;case"周":const m=T().startOf("isoWeek"),y=T(a.value).startOf("isoWeek");n.value.scrollLeft=Number(m.diff(y,"week"))*Number(u.value);break;case"时":n.value.scrollLeft=Number(T().diff(T(a.value),"hour"))*Number(u.value);break}};return e.watch(()=>Ye.shouldScrollToToday,m=>{m&&(c(),Ye.shouldScrollToToday=!1)}),e.onMounted(()=>{}),{tableBar:n,dayHeaders:o,weekHeaders:r,monthHeaders:s,hourHeaders:i,startGanttDate:a,mode:l,scale:u,scrollToToday:c}}}),Ar={ref:"tableBar",class:"table"};function Br(t,n,o,r,s,i){const a=e.resolveComponent("TimelineHeader"),l=e.resolveComponent("TableContent");return e.openBlock(),e.createElementBlock("div",Ar,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`,width:"fit-content"})},[e.createVNode(a,{weekHeaders:t.weekHeaders,hourHeaders:t.hourHeaders,dayHeaders:t.dayHeaders,monthHeaders:t.monthHeaders},null,8,["weekHeaders","hourHeaders","dayHeaders","monthHeaders"])],4),e.createElementVNode("div",{class:"content",style:e.normalizeStyle({height:`calc(100% - ${t.headersHeight}px)`,width:"fit-content",position:"relative"})},[e.createVNode(l,{rowHeight:t.rowHeight},null,8,["rowHeight"])],4)],512)}const Lr=Se(_r,[["render",Br],["__scopeId","data-v-7529d6fb"]]),Fr=e.defineComponent({name:"SliderInput",props:{modelValue:{type:Number,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0},step:{type:Number,default:1},labelStep:{type:Number,default:void 0},showLabels:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=s=>{const i=parseFloat(s.target.value);n("update:modelValue",i)},r=e.computed(()=>{const s=[],i=t.labelStep||t.step;for(let a=t.min;a<=t.max;a=Math.round((a+t.step)*100)/100){const l=Math.abs(a-t.min)<.001||Math.abs(a-t.max)<.001||Math.abs((a-t.min)%i)<.001;s.push({value:a,isMajor:l,showLabel:t.showLabels&&l})}return s});return{handleInput:o,ticks:r}}}),Ir=["value","min","max","step"],Hr={class:"slider-ticks"},Rr={key:0,class:"tick-label"};function zr(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",{class:"slider-wrapper",onMousedown:n[2]||(n[2]=e.withModifiers(()=>{},["stop"])),onPointerdown:n[3]||(n[3]=e.withModifiers(()=>{},["stop"])),onTouchstart:n[4]||(n[4]=e.withModifiers(()=>{},["stop"])),onClick:n[5]||(n[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("input",{type:"range",value:t.modelValue,onInput:n[0]||(n[0]=(...a)=>t.handleInput&&t.handleInput(...a)),onChange:n[1]||(n[1]=a=>t.$emit("change")),min:t.min,max:t.max,step:t.step,class:"range-input"},null,40,Ir),e.createElementVNode("div",Hr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ticks,a=>(e.openBlock(),e.createElementBlock("span",{key:a.value,class:e.normalizeClass(["tick",{major:a.isMajor}])},[n[6]||(n[6]=e.createElementVNode("span",{class:"tick-mark"},null,-1)),a.showLabel?(e.openBlock(),e.createElementBlock("span",Rr,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)],2))),128))])],32)}const Yr=Se(Fr,[["render",zr],["__scopeId","data-v-9731dbaf"]]),Or=e.defineComponent({name:"ConfigSection",props:{title:{type:String,required:!0},icon:{type:String,default:""}}}),Pr={class:"config-section"},xr={class:"section-title"},Zr={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},Gr={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},Wr={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"};function jr(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Pr,[e.createElementVNode("h4",xr,[e.renderSlot(t.$slots,"icon",{},()=>[t.icon==="language"?(e.openBlock(),e.createElementBlock("svg",Zr,n[0]||(n[0]=[e.createElementVNode("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"},null,-1)]))):t.icon==="theme"?(e.openBlock(),e.createElementBlock("svg",Gr,n[1]||(n[1]=[e.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"},null,-1)]))):t.icon==="link"?(e.openBlock(),e.createElementBlock("svg",Wr,n[2]||(n[2]=[e.createElementVNode("path",{d:"M6 9l6 6 6-6"},null,-1),e.createElementVNode("circle",{cx:"4",cy:"9",r:"2"},null,-1),e.createElementVNode("circle",{cx:"20",cy:"9",r:"2"},null,-1),e.createElementVNode("path",{d:"M10 9h4"},null,-1)]))):e.createCommentVNode("",!0)],!0),e.createTextVNode(" "+e.toDisplayString(t.title),1)]),e.renderSlot(t.$slots,"default",{},void 0,!0)])}const Ur=Se(Or,[["render",jr],["__scopeId","data-v-b5157353"]]),qr=e.defineComponent({name:"PathTypeSelector",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(){const{t}=ze();return{pathTypes:e.computed(()=>[{value:Ve.STRAIGHT,name:t("configPanel.linkConfig.straight"),preview:"M 10 20 L 50 20"},{value:Ve.BEZIER,name:t("configPanel.linkConfig.bezier"),preview:"M 10 25 Q 30 5 50 25"},{value:Ve.RIGHT_ANGLE,name:t("configPanel.linkConfig.rightAngle"),preview:"M 10 15 L 25 15 L 25 25 L 50 25"}])}}}),Jr={class:"path-type-grid"},Kr=["onClick"],Qr={width:"60",height:"35",viewBox:"0 0 60 40"},Xr={key:0,cx:"10",cy:"20",r:"2.5",fill:"currentColor"},es={key:1,cx:"10",cy:"25",r:"2.5",fill:"currentColor"},ts={key:2,cx:"10",cy:"15",r:"2.5",fill:"currentColor"},ns=["d"],os={key:3,d:"M 50 20 L 46 17 M 50 20 L 46 23",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},as={key:4,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},rs={key:5,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},ss={class:"path-name"};function is(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["path-type-card",{active:t.modelValue===a.value}]),onClick:l=>t.$emit("update:modelValue",a.value)},[(e.openBlock(),e.createElementBlock("svg",Qr,[a.value==="straight"?(e.openBlock(),e.createElementBlock("circle",Xr)):e.createCommentVNode("",!0),a.value==="bezier"?(e.openBlock(),e.createElementBlock("circle",es)):e.createCommentVNode("",!0),a.value==="right-angle"?(e.openBlock(),e.createElementBlock("circle",ts)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:a.preview,stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},null,8,ns),a.value==="straight"?(e.openBlock(),e.createElementBlock("path",os)):e.createCommentVNode("",!0),a.value==="bezier"?(e.openBlock(),e.createElementBlock("path",as)):e.createCommentVNode("",!0),a.value==="right-angle"?(e.openBlock(),e.createElementBlock("path",rs)):e.createCommentVNode("",!0)])),e.createElementVNode("span",ss,e.toDisplayString(a.name),1)],10,Kr))),128))])}const ls=Se(qr,[["render",is],["__scopeId","data-v-34d8d0fd"]]),ds=e.defineComponent({name:"LinkTypeColorConfig",props:{colors:{type:Object,required:!0}},emits:["update:colors","change"],setup(t,{emit:n}){const{t:o}=ze();return{t:o,updateColor:(s,i)=>{const a=i.target,l={...t.colors,[s]:a.value};n("update:colors",l),n("change")}}}}),cs={class:"link-type-colors"},us={class:"color-item"},fs={class:"color-preview"},hs={width:"20",height:"10",viewBox:"0 0 20 10"},ms=["stroke"],ps=["fill"],gs={class:"color-label"},ys={class:"color-desc"},ks=["value"],bs={class:"color-item"},ws={class:"color-preview"},Cs={width:"20",height:"10",viewBox:"0 0 20 10"},Ss=["stroke"],Ts=["fill"],vs={class:"color-label"},$s={class:"color-desc"},Ds=["value"],Es={class:"color-item"},Ms={class:"color-preview"},Vs={width:"20",height:"10",viewBox:"0 0 20 10"},Ns=["stroke"],_s=["fill"],As={class:"color-label"},Bs={class:"color-desc"},Ls=["value"],Fs={class:"color-item"},Is={class:"color-preview"},Hs={width:"20",height:"10",viewBox:"0 0 20 10"},Rs=["stroke"],zs=["fill"],Ys={class:"color-label"},Os={class:"color-desc"},Ps=["value"];function xs(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",cs,[e.createElementVNode("div",us,[e.createElementVNode("div",fs,[(e.openBlock(),e.createElementBlock("svg",hs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.finishToStart,"stroke-width":"2"},null,8,ms),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.finishToStart},null,8,ps)]))]),e.createElementVNode("span",gs,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",ys,e.toDisplayString(t.t("link.finishToStart")),1),e.createElementVNode("input",{type:"color",value:t.colors.finishToStart,onInput:n[0]||(n[0]=a=>t.updateColor("finishToStart",a)),class:"color-input-small"},null,40,ks)]),e.createElementVNode("div",bs,[e.createElementVNode("div",ws,[(e.openBlock(),e.createElementBlock("svg",Cs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.startToStart,"stroke-width":"2"},null,8,Ss),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.startToStart},null,8,Ts)]))]),e.createElementVNode("span",vs,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",$s,e.toDisplayString(t.t("link.startToStart")),1),e.createElementVNode("input",{type:"color",value:t.colors.startToStart,onInput:n[1]||(n[1]=a=>t.updateColor("startToStart",a)),class:"color-input-small"},null,40,Ds)]),e.createElementVNode("div",Es,[e.createElementVNode("div",Ms,[(e.openBlock(),e.createElementBlock("svg",Vs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.finishToFinish,"stroke-width":"2"},null,8,Ns),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.finishToFinish},null,8,_s)]))]),e.createElementVNode("span",As,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",Bs,e.toDisplayString(t.t("link.finishToFinish")),1),e.createElementVNode("input",{type:"color",value:t.colors.finishToFinish,onInput:n[2]||(n[2]=a=>t.updateColor("finishToFinish",a)),class:"color-input-small"},null,40,Ls)]),e.createElementVNode("div",Fs,[e.createElementVNode("div",Is,[(e.openBlock(),e.createElementBlock("svg",Hs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.startToFinish,"stroke-width":"2"},null,8,Rs),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.startToFinish},null,8,zs)]))]),e.createElementVNode("span",Ys,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",Os,e.toDisplayString(t.t("link.startToFinish")),1),e.createElementVNode("input",{type:"color",value:t.colors.startToFinish,onInput:n[3]||(n[3]=a=>t.updateColor("startToFinish",a)),class:"color-input-small"},null,40,Ps)])])}const Zs=Se(ds,[["render",xs],["__scopeId","data-v-53d6a965"]]),Gs=e.defineComponent({name:"ThemeSelector",props:{modelValue:{type:String,required:!0},themes:{type:Array,required:!0}},emits:["update:modelValue"],setup(){const{t}=ze();return{t}}}),Ws={class:"theme-grid"},js=["onClick"],Us={class:"theme-info"},qs={class:"theme-name"},Js={class:"theme-desc"},Ks={key:0,class:"theme-check"};function Qs(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Ws,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["theme-card",{active:t.modelValue===a.id}]),onClick:l=>t.$emit("update:modelValue",a.id)},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({background:a.preview})},null,4),e.createElementVNode("div",Us,[e.createElementVNode("div",qs,e.toDisplayString(t.t(a.nameKey)),1),e.createElementVNode("div",Js,e.toDisplayString(t.t(a.descKey)),1)]),t.modelValue===a.id?(e.openBlock(),e.createElementBlock("div",Ks,n[0]||(n[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,js))),128))])}const Xs=Se(Gs,[["render",Qs],["__scopeId","data-v-a2723aed"]]),ei=e.defineComponent({name:"LanguageSelector",props:{modelValue:{type:String,required:!0},locales:{type:Array,required:!0}},emits:["update:modelValue"]}),ti={class:"language-selector-inline"},ni=["onClick"],oi={class:"lang-label"},ai={key:0,class:"lang-check"};function ri(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locales,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["language-option",{active:t.modelValue===a.value}]),onClick:l=>t.$emit("update:modelValue",a.value)},[e.createElementVNode("span",oi,e.toDisplayString(a.label),1),t.modelValue===a.value?(e.openBlock(),e.createElementBlock("div",ai,n[0]||(n[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,ni))),128))])}const On=Se(ei,[["render",ri],["__scopeId","data-v-359f5b41"]]),si=e.defineComponent({name:"ColorInput",props:{modelValue:{type:String,required:!0},showSync:{type:Boolean,default:!1},syncLabel:{type:String,default:""},syncTitle:{type:String,default:""},inputClass:{type:String,default:""}},emits:["update:modelValue","change","sync"]}),ii=["value"],li=["title"];function di(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["color-input-wrapper",{"with-sync":t.showSync}])},[e.createElementVNode("input",{type:"color",value:t.modelValue,onInput:n[0]||(n[0]=a=>t.$emit("update:modelValue",a.target.value)),onChange:n[1]||(n[1]=a=>t.$emit("change")),class:e.normalizeClass(["color-input",t.inputClass])},null,42,ii),t.showSync?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[2]||(n[2]=a=>t.$emit("sync")),class:"sync-btn",title:t.syncTitle},e.toDisplayString(t.syncLabel),9,li)):e.createCommentVNode("",!0)],2)}const ci=Se(si,[["render",di],["__scopeId","data-v-6e05149c"]]),ui=e.defineComponent({name:"CheckboxConfig",props:{modelValue:{type:Boolean,required:!0},label:{type:String,required:!0}},emits:["update:modelValue","change"]}),fi={class:"config-group"},hi={class:"config-label checkbox-label"},mi=["checked"];function pi(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",fi,[e.createElementVNode("label",hi,[e.createElementVNode("input",{type:"checkbox",checked:t.modelValue,onChange:n[0]||(n[0]=a=>{t.$emit("update:modelValue",a.target.checked),t.$emit("change")})},null,40,mi),e.createTextVNode(" "+e.toDisplayString(t.label),1)])])}const gi=Se(ui,[["render",pi],["__scopeId","data-v-c58f997e"]]),yi=e.defineComponent({name:"GanttConfigPanel",components:{SliderInput:Yr,ConfigSection:Ur,PathTypeSelector:ls,LinkTypeColorConfig:Zs,ThemeSelector:Xs,LanguageSelector:On,ColorInput:ci,CheckboxConfig:gi},setup(){var V,C,K,q,j,X,A,P,H,ee,ke,p;const{t,locale:n,setLocale:o,getLocales:r}=ze(),s=e.ref(!1),i=e.ref(He),a=e.ref("metro"),l=e.ref(null),u=e.computed(()=>n.value),c=e.computed(()=>r()),m=d=>{o(d)},y=e.inject("ganttContainer"),{config:w,updateConfig:I}=Ct(),g=e.ref({pathType:w.pathType||Ve.BEZIER,color:w.color||"#3498db",width:w.width||2,dashArray:w.dashArray,bezierCurvature:w.bezierCurvature||.5,rightAngleOffset:w.rightAngleOffset||40,smoothCorners:w.smoothCorners||!1,cornerRadius:w.cornerRadius||5,showArrow:w.showArrow!==void 0?w.showArrow:!0,arrowSize:w.arrowSize||8,arrowColor:w.arrowColor||"#3498db",enableDashAnimation:w.enableDashAnimation||!1,dashAnimationSpeed:w.dashAnimationSpeed||1,showLabels:w.showLabels||!1,labelColor:w.labelColor||"#333333",labelFontSize:w.labelFontSize||12,parentChildStyle:{color:((V=w.parentChildStyle)==null?void 0:V.color)||"#999999",width:((C=w.parentChildStyle)==null?void 0:C.width)||1.5,dashArray:((K=w.parentChildStyle)==null?void 0:K.dashArray)||"3,3"},linkTypeColors:{finishToStart:((q=w.linkTypeColors)==null?void 0:q.finishToStart)||"#3498db",startToStart:((j=w.linkTypeColors)==null?void 0:j.startToStart)||"#2ecc71",finishToFinish:((X=w.linkTypeColors)==null?void 0:X.finishToFinish)||"#e74c3c",startToFinish:((A=w.linkTypeColors)==null?void 0:A.startToFinish)||"#f39c12"},linkTypeVisibility:{finishToStart:((P=w.linkTypeVisibility)==null?void 0:P.finishToStart)??!0,startToStart:((H=w.linkTypeVisibility)==null?void 0:H.startToStart)??!0,finishToFinish:((ee=w.linkTypeVisibility)==null?void 0:ee.finishToFinish)??!0,startToFinish:((ke=w.linkTypeVisibility)==null?void 0:ke.startToFinish)??!0,parentChild:((p=w.linkTypeVisibility)==null?void 0:p.parentChild)??!0}}),F=()=>{s.value=!s.value,s.value&&setTimeout(()=>{O(a.value)},0)},h=()=>{s.value=!1},O=d=>{if(!l.value)return;const b=Le.getThemeInfo(d);b&&(l.value.setAttribute("data-gantt-theme",d),Object.entries(b.cssVariables).forEach(([f,$])=>{l.value.style.setProperty(f,$)}))},S=d=>{a.value=d,Le.setTheme(d),O(d)},D=()=>{I(g.value)};return e.onMounted(()=>{y!=null&&y.value?Le.setGanttContainer(y.value):console.warn("GanttConfigPanel: ganttContainer not available"),a.value=Le.getCurrentTheme()}),{t,isOpen:s,themes:i,currentTheme:a,linkConfig:g,currentLocale:u,locales:c,togglePanel:F,closePanel:h,selectTheme:S,selectLocale:m,updateLinkConfig:D,configPanelRef:l}}}),ki={class:"config-panel-wrapper"},bi=["title"],wi={class:"btn-content"},Ci={class:"btn-text"},Si=["data-gantt-theme"],Ti=["data-gantt-theme"],vi={class:"panel-header"},$i=["title"],Di={class:"panel-content"},Ei={class:"link-config-content"},Mi={class:"config-info-box"},Vi={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"flex-shrink":"0"}},Ni={class:"config-group"},_i={class:"config-label"},Ai={class:"config-group"},Bi={class:"config-label"},Li={class:"config-group"},Fi={class:"config-label"},Ii={class:"config-group"},Hi={class:"config-label"},Ri={value:void 0},zi={value:"3,3"},Yi={value:"5,5"},Oi={value:"8,4"},Pi={value:"2,2,8,2"},xi={key:0,class:"config-group"},Zi={class:"config-label"},Gi={class:"config-group"},Wi={class:"config-label"},ji={key:0,class:"config-group"},Ui={class:"config-label"},qi={class:"config-group"},Ji={class:"config-label"},Ki={class:"config-group"},Qi={class:"config-label"},Xi={key:3,class:"config-group"},el={class:"config-label"},tl={class:"config-group"},nl={class:"config-label"},ol={class:"config-group"},al={class:"config-label"},rl={class:"config-subsection"},sl={class:"subsection-title"},il={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},ll={class:"config-subsection"},dl={class:"subsection-title"},cl={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},ul={class:"config-info-box",style:{"margin-bottom":"12px"}},fl={style:{"font-size":"11px"}},hl={class:"config-group"},ml={class:"config-label"},pl={class:"config-group"},gl={class:"config-label"},yl={class:"config-group"},kl={class:"config-label"},bl={value:void 0},wl={value:"3,3"},Cl={value:"5,5"},Sl={value:"8,4"};function Tl(t,n,o,r,s,i){const a=e.resolveComponent("LanguageSelector"),l=e.resolveComponent("ConfigSection"),u=e.resolveComponent("ThemeSelector"),c=e.resolveComponent("PathTypeSelector"),m=e.resolveComponent("ColorInput"),y=e.resolveComponent("SliderInput"),w=e.resolveComponent("CheckboxConfig"),I=e.resolveComponent("LinkTypeColorConfig");return e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("button",{class:e.normalizeClass(["config-btn",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...g)=>t.togglePanel&&t.togglePanel(...g)),title:t.t("configPanel.title")},[e.createElementVNode("div",wi,[n[27]||(n[27]=e.createElementVNode("div",{class:"btn-icon"},[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"})])],-1)),e.createElementVNode("span",Ci,e.toDisplayString(t.t("common.config")),1)])],10,bi),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-overlay","data-gantt-theme":t.currentTheme},null,8,Si)):e.createCommentVNode("",!0),t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:1,class:"config-panel",ref:"configPanelRef","data-gantt-theme":t.currentTheme},[e.createElementVNode("div",vi,[e.createElementVNode("h3",null,e.toDisplayString(t.t("configPanel.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...g)=>t.closePanel&&t.closePanel(...g)),title:t.t("common.close")},n[28]||(n[28]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]),8,$i)]),e.createElementVNode("div",Di,[e.createVNode(l,{title:t.t("configPanel.languageSettings"),icon:"language"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:t.currentLocale,"onUpdate:modelValue":[n[2]||(n[2]=g=>t.currentLocale=g),t.selectLocale],locales:t.locales},null,8,["modelValue","locales","onUpdate:modelValue"])]),_:1},8,["title"]),e.createVNode(l,{title:t.t("configPanel.themeSettings"),icon:"theme"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.currentTheme,"onUpdate:modelValue":[n[3]||(n[3]=g=>t.currentTheme=g),t.selectTheme],themes:t.themes},null,8,["modelValue","themes","onUpdate:modelValue"])]),_:1},8,["title"]),e.createVNode(l,{title:t.t("configPanel.linkSettings"),icon:"link"},{default:e.withCtx(()=>[e.createElementVNode("div",Ei,[e.createElementVNode("div",Mi,[(e.openBlock(),e.createElementBlock("svg",Vi,n[29]||(n[29]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),e.createElementVNode("span",null,e.toDisplayString(t.t("configPanel.linkConfig.info")),1)]),e.createElementVNode("div",Ni,[e.createElementVNode("label",_i,e.toDisplayString(t.t("configPanel.linkConfig.pathType")),1),e.createVNode(c,{modelValue:t.linkConfig.pathType,"onUpdate:modelValue":[n[4]||(n[4]=g=>t.linkConfig.pathType=g),t.updateLinkConfig]},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",Ai,[e.createElementVNode("label",Bi,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.createVNode(m,{modelValue:t.linkConfig.color,"onUpdate:modelValue":n[5]||(n[5]=g=>t.linkConfig.color=g),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Li,[e.createElementVNode("label",Fi,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.width)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.width,"onUpdate:modelValue":n[6]||(n[6]=g=>t.linkConfig.width=g),min:1,max:5,step:.5,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Ii,[e.createElementVNode("label",Hi,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[7]||(n[7]=g=>t.linkConfig.dashArray=g),onChange:n[8]||(n[8]=(...g)=>t.updateLinkConfig&&t.updateLinkConfig(...g)),class:"select-input"},[e.createElementVNode("option",Ri,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",zi,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Yi,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Oi,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1),e.createElementVNode("option",Pi,e.toDisplayString(t.t("configPanel.linkConfig.dotDash")),1)],544),[[e.vModelSelect,t.linkConfig.dashArray]])]),t.linkConfig.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",xi,[e.createElementVNode("label",Zi,e.toDisplayString(t.t("configPanel.linkConfig.curvature"))+": "+e.toDisplayString(t.linkConfig.bezierCurvature),1),e.createVNode(y,{modelValue:t.linkConfig.bezierCurvature,"onUpdate:modelValue":n[9]||(n[9]=g=>t.linkConfig.bezierCurvature=g),min:.1,max:1,step:.1,"label-step":.3,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),t.linkConfig.pathType==="right-angle"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Gi,[e.createElementVNode("label",Wi,e.toDisplayString(t.t("configPanel.linkConfig.offset"))+": "+e.toDisplayString(t.linkConfig.rightAngleOffset)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.rightAngleOffset,"onUpdate:modelValue":n[10]||(n[10]=g=>t.linkConfig.rightAngleOffset=g),min:10,max:80,step:5,"label-step":20,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createVNode(w,{modelValue:t.linkConfig.smoothCorners,"onUpdate:modelValue":n[11]||(n[11]=g=>t.linkConfig.smoothCorners=g),label:t.t("configPanel.linkConfig.smoothCorners"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.smoothCorners?(e.openBlock(),e.createElementBlock("div",ji,[e.createElementVNode("label",Ui,e.toDisplayString(t.t("configPanel.linkConfig.cornerRadius"))+": "+e.toDisplayString(t.linkConfig.cornerRadius)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.cornerRadius,"onUpdate:modelValue":n[12]||(n[12]=g=>t.linkConfig.cornerRadius=g),min:0,max:15,step:1,"label-step":5,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(w,{modelValue:t.linkConfig.showArrow,"onUpdate:modelValue":n[13]||(n[13]=g=>t.linkConfig.showArrow=g),label:t.t("configPanel.linkConfig.showArrow"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.showArrow?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",qi,[e.createElementVNode("label",Ji,e.toDisplayString(t.t("configPanel.linkConfig.arrowSize"))+": "+e.toDisplayString(t.linkConfig.arrowSize)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.arrowSize,"onUpdate:modelValue":n[14]||(n[14]=g=>t.linkConfig.arrowSize=g),min:4,max:16,step:1,"label-step":4,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Ki,[e.createElementVNode("label",Qi,e.toDisplayString(t.t("configPanel.linkConfig.arrowColor")),1),e.createVNode(m,{modelValue:t.linkConfig.arrowColor,"onUpdate:modelValue":n[15]||(n[15]=g=>t.linkConfig.arrowColor=g),"show-sync":!0,"sync-label":t.t("configPanel.linkConfig.syncColor"),"sync-title":t.t("tooltip.syncArrowColor"),onChange:t.updateLinkConfig,onSync:n[16]||(n[16]=g=>{t.linkConfig.arrowColor=t.linkConfig.color,t.updateLinkConfig()})},null,8,["modelValue","sync-label","sync-title","onChange"])])],64)):e.createCommentVNode("",!0),e.createVNode(w,{modelValue:t.linkConfig.enableDashAnimation,"onUpdate:modelValue":n[17]||(n[17]=g=>t.linkConfig.enableDashAnimation=g),label:t.t("configPanel.linkConfig.dashAnimation"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("label",el,e.toDisplayString(t.t("configPanel.linkConfig.animationSpeed"))+": "+e.toDisplayString(t.linkConfig.dashAnimationSpeed)+"s",1),e.createVNode(y,{modelValue:t.linkConfig.dashAnimationSpeed,"onUpdate:modelValue":n[18]||(n[18]=g=>t.linkConfig.dashAnimationSpeed=g),min:.2,max:3,step:.2,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),e.createVNode(w,{modelValue:t.linkConfig.showLabels,"onUpdate:modelValue":n[19]||(n[19]=g=>t.linkConfig.showLabels=g),label:t.t("configPanel.linkConfig.showLabels"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",tl,[e.createElementVNode("label",nl,e.toDisplayString(t.t("configPanel.linkConfig.labelColor")),1),e.createVNode(m,{modelValue:t.linkConfig.labelColor,"onUpdate:modelValue":n[20]||(n[20]=g=>t.linkConfig.labelColor=g),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",ol,[e.createElementVNode("label",al,e.toDisplayString(t.t("configPanel.linkConfig.fontSize"))+": "+e.toDisplayString(t.linkConfig.labelFontSize)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.labelFontSize,"onUpdate:modelValue":n[21]||(n[21]=g=>t.linkConfig.labelFontSize=g),min:8,max:16,step:1,"label-step":2,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",rl,[e.createElementVNode("h5",sl,[(e.openBlock(),e.createElementBlock("svg",il,n[30]||(n[30]=[e.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.typeColors")),1)]),e.createVNode(I,{colors:t.linkConfig.linkTypeColors,"onUpdate:colors":n[22]||(n[22]=g=>t.linkConfig.linkTypeColors=g),onChange:t.updateLinkConfig},null,8,["colors","onChange"])]),e.createElementVNode("div",ll,[e.createElementVNode("h5",dl,[(e.openBlock(),e.createElementBlock("svg",cl,n[31]||(n[31]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.parentChildStyle")),1)]),e.createElementVNode("div",ul,[e.createElementVNode("span",fl,e.toDisplayString(t.t("configPanel.linkConfig.parentChildInfo")),1)]),e.createElementVNode("div",hl,[e.createElementVNode("label",ml,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.createVNode(m,{modelValue:t.linkConfig.parentChildStyle.color,"onUpdate:modelValue":n[23]||(n[23]=g=>t.linkConfig.parentChildStyle.color=g),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",pl,[e.createElementVNode("label",gl,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.parentChildStyle.width)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.parentChildStyle.width,"onUpdate:modelValue":n[24]||(n[24]=g=>t.linkConfig.parentChildStyle.width=g),min:1,max:3,step:.5,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",yl,[e.createElementVNode("label",kl,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[25]||(n[25]=g=>t.linkConfig.parentChildStyle.dashArray=g),onChange:n[26]||(n[26]=(...g)=>t.updateLinkConfig&&t.updateLinkConfig(...g)),class:"select-input"},[e.createElementVNode("option",bl,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",wl,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Cl,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Sl,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1)],544),[[e.vModelSelect,t.linkConfig.parentChildStyle.dashArray]])])])])]),_:1},8,["title"])])],8,Ti)):e.createCommentVNode("",!0)]))])}const Pn=Se(yi,[["render",Tl],["__scopeId","data-v-13485142"]]);var ye;(function(t){t.assertEqual=s=>s;function n(s){}t.assertIs=n;function o(s){throw new Error}t.assertNever=o,t.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),a={};for(const l of i)a[l]=s[l];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(const a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ye||(ye={}));var gn;(function(t){t.mergeShapes=(n,o)=>({...n,...o})})(gn||(gn={}));const x=ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ke=t=>{switch(typeof t){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(t)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(t)?x.array:t===null?x.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?x.promise:typeof Map<"u"&&t instanceof Map?x.map:typeof Set<"u"&&t instanceof Set?x.set:typeof Date<"u"&&t instanceof Date?x.date:x.object;default:return x.unknown}},N=ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vl=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Re extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=n}format(n){const o=n||function(i){return i.message},r={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(o(a));else{let l=r,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(l[c]=l[c]||{_errors:[]},l[c]._errors.push(o(a))):l[c]=l[c]||{_errors:[]},l=l[c],u++}}};return s(this),r}static assert(n){if(!(n instanceof Re))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=o=>o.message){const o={},r=[];for(const s of this.issues)s.path.length>0?(o[s.path[0]]=o[s.path[0]]||[],o[s.path[0]].push(n(s))):r.push(n(s));return{formErrors:r,fieldErrors:o}}get formErrors(){return this.flatten()}}Re.create=t=>new Re(t);const mt=(t,n)=>{let o;switch(t.code){case N.invalid_type:t.received===x.undefined?o="Required":o=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(t.expected,ye.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:o=`Unrecognized key(s) in object: ${ye.joinValues(t.keys,", ")}`;break;case N.invalid_union:o="Invalid input";break;case N.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${ye.joinValues(t.options)}`;break;case N.invalid_enum_value:o=`Invalid enum value. Expected ${ye.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:o="Invalid function arguments";break;case N.invalid_return_type:o="Invalid function return type";break;case N.invalid_date:o="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(o=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?o=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?o=`Invalid input: must end with "${t.validation.endsWith}"`:ye.assertNever(t.validation):t.validation!=="regex"?o=`Invalid ${t.validation}`:o="Invalid";break;case N.too_small:t.type==="array"?o=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?o=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?o=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:o="Invalid input";break;case N.too_big:t.type==="array"?o=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?o=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?o=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?o=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?o=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:o="Invalid input";break;case N.custom:o="Invalid input";break;case N.invalid_intersection_types:o="Intersection results could not be merged";break;case N.not_multiple_of:o=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:o="Number must be finite";break;default:o=n.defaultError,ye.assertNever(t)}return{message:o}};let xn=mt;function $l(t){xn=t}function en(){return xn}const tn=t=>{const{data:n,path:o,errorMaps:r,issueData:s}=t,i=[...o,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)l=c(a,{data:n,defaultError:l}).message;return{...s,path:i,message:l}},Dl=[];function z(t,n){const o=en(),r=tn({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,o,o===mt?void 0:mt].filter(s=>!!s)});t.common.issues.push(r)}class Ae{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,o){const r=[];for(const s of o){if(s.status==="aborted")return ie;s.status==="dirty"&&n.dirty(),r.push(s.value)}return{status:n.value,value:r}}static async mergeObjectAsync(n,o){const r=[];for(const s of o){const i=await s.key,a=await s.value;r.push({key:i,value:a})}return Ae.mergeObjectSync(n,r)}static mergeObjectSync(n,o){const r={};for(const s of o){const{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return ie;i.status==="dirty"&&n.dirty(),a.status==="dirty"&&n.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:n.value,value:r}}}const ie=Object.freeze({status:"aborted"}),pt=t=>({status:"dirty",value:t}),Fe=t=>({status:"valid",value:t}),yn=t=>t.status==="aborted",kn=t=>t.status==="dirty",it=t=>t.status==="valid",St=t=>typeof Promise<"u"&&t instanceof Promise;function nn(t,n,o,r){if(typeof n=="function"?t!==n||!0:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(t)}function Zn(t,n,o,r,s){if(typeof n=="function"?t!==n||!0:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(t,o),o}typeof SuppressedError=="function"&&SuppressedError;var Q;(function(t){t.errToObj=n=>typeof n=="string"?{message:n}:n||{},t.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(Q||(Q={}));var Tt,vt;class Ge{constructor(n,o,r,s){this._cachedPath=[],this.parent=n,this.data=o,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Gn=(t,n)=>{if(it(n))return{success:!0,data:n.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new Re(t.common.issues);return this._error=o,this._error}}};function ue(t){if(!t)return{};const{errorMap:n,invalid_type_error:o,required_error:r,description:s}=t;if(n&&(o||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:s}:{errorMap:(a,l)=>{var u,c;const{message:m}=t;return a.code==="invalid_enum_value"?{message:m??l.defaultError}:typeof l.data>"u"?{message:(u=m??r)!==null&&u!==void 0?u:l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:(c=m??o)!==null&&c!==void 0?c:l.defaultError}},description:s}}class fe{get description(){return this._def.description}_getType(n){return Ke(n.data)}_getOrReturnCtx(n,o){return o||{common:n.parent.common,data:n.data,parsedType:Ke(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new Ae,ctx:{common:n.parent.common,data:n.data,parsedType:Ke(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const o=this._parse(n);if(St(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(n){const o=this._parse(n);return Promise.resolve(o)}parse(n,o){const r=this.safeParse(n,o);if(r.success)return r.data;throw r.error}safeParse(n,o){var r;const s={common:{issues:[],async:(r=o==null?void 0:o.async)!==null&&r!==void 0?r:!1,contextualErrorMap:o==null?void 0:o.errorMap},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Ke(n)},i=this._parseSync({data:n,path:s.path,parent:s});return Gn(s,i)}"~validate"(n){var o,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Ke(n)};if(!this["~standard"].async)try{const i=this._parseSync({data:n,path:[],parent:s});return it(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((r=(o=i==null?void 0:i.message)===null||o===void 0?void 0:o.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:s}).then(i=>it(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(n,o){const r=await this.safeParseAsync(n,o);if(r.success)return r.data;throw r.error}async safeParseAsync(n,o){const r={common:{issues:[],contextualErrorMap:o==null?void 0:o.errorMap,async:!0},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Ke(n)},s=this._parse({data:n,path:r.path,parent:r}),i=await(St(s)?s:Promise.resolve(s));return Gn(r,i)}refine(n,o){const r=s=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(s):o;return this._refinement((s,i)=>{const a=n(s),l=()=>i.addIssue({code:N.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(n,o){return this._refinement((r,s)=>n(r)?!0:(s.addIssue(typeof o=="function"?o(r,s):o),!1))}_refinement(n){return new Ze({schema:this,typeName:se.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return je.create(this,this._def)}nullable(){return rt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xe.create(this)}promise(){return bt.create(this,this._def)}or(n){return Mt.create([this,n],this._def)}and(n){return Vt.create(this,n,this._def)}transform(n){return new Ze({...ue(this._def),schema:this,typeName:se.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const o=typeof n=="function"?n:()=>n;return new Lt({...ue(this._def),innerType:this,defaultValue:o,typeName:se.ZodDefault})}brand(){return new Cn({typeName:se.ZodBranded,type:this,...ue(this._def)})}catch(n){const o=typeof n=="function"?n:()=>n;return new Ft({...ue(this._def),innerType:this,catchValue:o,typeName:se.ZodCatch})}describe(n){const o=this.constructor;return new o({...this._def,description:n})}pipe(n){return It.create(this,n)}readonly(){return Ht.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const El=/^c[^\s-]{8,}$/i,Ml=/^[0-9a-z]+$/,Vl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Nl=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_l=/^[a-z0-9_-]{21}$/i,Al=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bl=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ll=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let bn;const Il=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hl=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Rl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ol=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Wn="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Pl=new RegExp(`^${Wn}$`);function jn(t){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?n=`${n}\\.\\d{${t.precision}}`:t.precision==null&&(n=`${n}(\\.\\d+)?`),n}function xl(t){return new RegExp(`^${jn(t)}$`)}function Un(t){let n=`${Wn}T${jn(t)}`;const o=[];return o.push(t.local?"Z?":"Z"),t.offset&&o.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${o.join("|")})`,new RegExp(`^${n}$`)}function Zl(t,n){return!!((n==="v4"||!n)&&Il.test(t)||(n==="v6"||!n)&&Rl.test(t))}function Gl(t,n){if(!Al.test(t))return!1;try{const[o]=t.split("."),r=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||n&&s.alg!==n)}catch{return!1}}function Wl(t,n){return!!((n==="v4"||!n)&&Hl.test(t)||(n==="v6"||!n)&&zl.test(t))}class Pe extends fe{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==x.string){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_type,expected:x.string,received:i.parsedType}),ie}const r=new Ae;let s;for(const i of this._def.checks)if(i.kind==="min")n.data.length<i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")n.data.length>i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=n.data.length>i.value,l=n.data.length<i.value;(a||l)&&(s=this._getOrReturnCtx(n,s),a?z(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&z(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Ll.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"email",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")bn||(bn=new RegExp(Fl,"u")),bn.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"emoji",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Nl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"uuid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")_l.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"nanoid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")El.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"cuid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Ml.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"cuid2",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Vl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"ulid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(n.data)}catch{s=this._getOrReturnCtx(n,s),z(s,{validation:"url",code:N.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"regex",code:N.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?n.data=n.data.trim():i.kind==="includes"?n.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?n.data=n.data.toLowerCase():i.kind==="toUpperCase"?n.data=n.data.toUpperCase():i.kind==="startsWith"?n.data.startsWith(i.value)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?n.data.endsWith(i.value)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Un(i).test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Pl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?xl(i).test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Bl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"duration",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Zl(n.data,i.version)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"ip",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Gl(n.data,i.alg)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"jwt",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Wl(n.data,i.version)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"cidr",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Yl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"base64",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Ol.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"base64url",code:N.invalid_string,message:i.message}),r.dirty()):ye.assertNever(i);return{status:r.value,value:n.data}}_regex(n,o,r){return this.refinement(s=>n.test(s),{validation:o,code:N.invalid_string,...Q.errToObj(r)})}_addCheck(n){return new Pe({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...Q.errToObj(n)})}url(n){return this._addCheck({kind:"url",...Q.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...Q.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...Q.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...Q.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...Q.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...Q.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...Q.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...Q.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...Q.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...Q.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...Q.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...Q.errToObj(n)})}datetime(n){var o,r;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(o=n==null?void 0:n.offset)!==null&&o!==void 0?o:!1,local:(r=n==null?void 0:n.local)!==null&&r!==void 0?r:!1,...Q.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...Q.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...Q.errToObj(n)})}regex(n,o){return this._addCheck({kind:"regex",regex:n,...Q.errToObj(o)})}includes(n,o){return this._addCheck({kind:"includes",value:n,position:o==null?void 0:o.position,...Q.errToObj(o==null?void 0:o.message)})}startsWith(n,o){return this._addCheck({kind:"startsWith",value:n,...Q.errToObj(o)})}endsWith(n,o){return this._addCheck({kind:"endsWith",value:n,...Q.errToObj(o)})}min(n,o){return this._addCheck({kind:"min",value:n,...Q.errToObj(o)})}max(n,o){return this._addCheck({kind:"max",value:n,...Q.errToObj(o)})}length(n,o){return this._addCheck({kind:"length",value:n,...Q.errToObj(o)})}nonempty(n){return this.min(1,Q.errToObj(n))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxLength(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}}Pe.create=t=>{var n;return new Pe({checks:[],typeName:se.ZodString,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ue(t)})};function jl(t,n){const o=(t.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,s=o>r?o:r,i=parseInt(t.toFixed(s).replace(".","")),a=parseInt(n.toFixed(s).replace(".",""));return i%a/Math.pow(10,s)}class nt extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==x.number){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_type,expected:x.number,received:i.parsedType}),ie}let r;const s=new Ae;for(const i of this._def.checks)i.kind==="int"?ye.isInteger(n.data)||(r=this._getOrReturnCtx(n,r),z(r,{code:N.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?n.data<i.value:n.data<=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?n.data>i.value:n.data>=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?jl(n.data,i.value)!==0&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(n.data)||(r=this._getOrReturnCtx(n,r),z(r,{code:N.not_finite,message:i.message}),s.dirty()):ye.assertNever(i);return{status:s.value,value:n.data}}gte(n,o){return this.setLimit("min",n,!0,Q.toString(o))}gt(n,o){return this.setLimit("min",n,!1,Q.toString(o))}lte(n,o){return this.setLimit("max",n,!0,Q.toString(o))}lt(n,o){return this.setLimit("max",n,!1,Q.toString(o))}setLimit(n,o,r,s){return new nt({...this._def,checks:[...this._def.checks,{kind:n,value:o,inclusive:r,message:Q.toString(s)}]})}_addCheck(n){return new nt({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:Q.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(n)})}multipleOf(n,o){return this._addCheck({kind:"multipleOf",value:n,message:Q.toString(o)})}finite(n){return this._addCheck({kind:"finite",message:Q.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(n)})}get minValue(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxValue(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&ye.isInteger(n.value))}get isFinite(){let n=null,o=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(o===null||r.value>o)&&(o=r.value):r.kind==="max"&&(n===null||r.value<n)&&(n=r.value)}return Number.isFinite(o)&&Number.isFinite(n)}}nt.create=t=>new nt({checks:[],typeName:se.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ue(t)});class ot extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==x.bigint)return this._getInvalidInput(n);let r;const s=new Ae;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?n.data<i.value:n.data<=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?n.data>i.value:n.data>=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?n.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ye.assertNever(i);return{status:s.value,value:n.data}}_getInvalidInput(n){const o=this._getOrReturnCtx(n);return z(o,{code:N.invalid_type,expected:x.bigint,received:o.parsedType}),ie}gte(n,o){return this.setLimit("min",n,!0,Q.toString(o))}gt(n,o){return this.setLimit("min",n,!1,Q.toString(o))}lte(n,o){return this.setLimit("max",n,!0,Q.toString(o))}lt(n,o){return this.setLimit("max",n,!1,Q.toString(o))}setLimit(n,o,r,s){return new ot({...this._def,checks:[...this._def.checks,{kind:n,value:o,inclusive:r,message:Q.toString(s)}]})}_addCheck(n){return new ot({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(n)})}multipleOf(n,o){return this._addCheck({kind:"multipleOf",value:n,message:Q.toString(o)})}get minValue(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxValue(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}}ot.create=t=>{var n;return new ot({checks:[],typeName:se.ZodBigInt,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ue(t)})};class $t extends fe{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==x.boolean){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.boolean,received:r.parsedType}),ie}return Fe(n.data)}}$t.create=t=>new $t({typeName:se.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ue(t)});class lt extends fe{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==x.date){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_type,expected:x.date,received:i.parsedType}),ie}if(isNaN(n.data.getTime())){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_date}),ie}const r=new Ae;let s;for(const i of this._def.checks)i.kind==="min"?n.data.getTime()<i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?n.data.getTime()>i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ye.assertNever(i);return{status:r.value,value:new Date(n.data.getTime())}}_addCheck(n){return new lt({...this._def,checks:[...this._def.checks,n]})}min(n,o){return this._addCheck({kind:"min",value:n.getTime(),message:Q.toString(o)})}max(n,o){return this._addCheck({kind:"max",value:n.getTime(),message:Q.toString(o)})}get minDate(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n!=null?new Date(n):null}}lt.create=t=>new lt({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:se.ZodDate,...ue(t)});class on extends fe{_parse(n){if(this._getType(n)!==x.symbol){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.symbol,received:r.parsedType}),ie}return Fe(n.data)}}on.create=t=>new on({typeName:se.ZodSymbol,...ue(t)});class Dt extends fe{_parse(n){if(this._getType(n)!==x.undefined){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.undefined,received:r.parsedType}),ie}return Fe(n.data)}}Dt.create=t=>new Dt({typeName:se.ZodUndefined,...ue(t)});class Et extends fe{_parse(n){if(this._getType(n)!==x.null){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.null,received:r.parsedType}),ie}return Fe(n.data)}}Et.create=t=>new Et({typeName:se.ZodNull,...ue(t)});class gt extends fe{constructor(){super(...arguments),this._any=!0}_parse(n){return Fe(n.data)}}gt.create=t=>new gt({typeName:se.ZodAny,...ue(t)});class dt extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Fe(n.data)}}dt.create=t=>new dt({typeName:se.ZodUnknown,...ue(t)});class Qe extends fe{_parse(n){const o=this._getOrReturnCtx(n);return z(o,{code:N.invalid_type,expected:x.never,received:o.parsedType}),ie}}Qe.create=t=>new Qe({typeName:se.ZodNever,...ue(t)});class an extends fe{_parse(n){if(this._getType(n)!==x.undefined){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.void,received:r.parsedType}),ie}return Fe(n.data)}}an.create=t=>new an({typeName:se.ZodVoid,...ue(t)});class xe extends fe{_parse(n){const{ctx:o,status:r}=this._processInputParams(n),s=this._def;if(o.parsedType!==x.array)return z(o,{code:N.invalid_type,expected:x.array,received:o.parsedType}),ie;if(s.exactLength!==null){const a=o.data.length>s.exactLength.value,l=o.data.length<s.exactLength.value;(a||l)&&(z(o,{code:a?N.too_big:N.too_small,minimum:l?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&o.data.length<s.minLength.value&&(z(o,{code:N.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&o.data.length>s.maxLength.value&&(z(o,{code:N.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),o.common.async)return Promise.all([...o.data].map((a,l)=>s.type._parseAsync(new Ge(o,a,o.path,l)))).then(a=>Ae.mergeArray(r,a));const i=[...o.data].map((a,l)=>s.type._parseSync(new Ge(o,a,o.path,l)));return Ae.mergeArray(r,i)}get element(){return this._def.type}min(n,o){return new xe({...this._def,minLength:{value:n,message:Q.toString(o)}})}max(n,o){return new xe({...this._def,maxLength:{value:n,message:Q.toString(o)}})}length(n,o){return new xe({...this._def,exactLength:{value:n,message:Q.toString(o)}})}nonempty(n){return this.min(1,n)}}xe.create=(t,n)=>new xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:se.ZodArray,...ue(n)});function yt(t){if(t instanceof Ee){const n={};for(const o in t.shape){const r=t.shape[o];n[o]=je.create(yt(r))}return new Ee({...t._def,shape:()=>n})}else return t instanceof xe?new xe({...t._def,type:yt(t.element)}):t instanceof je?je.create(yt(t.unwrap())):t instanceof rt?rt.create(yt(t.unwrap())):t instanceof We?We.create(t.items.map(n=>yt(n))):t}class Ee extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),o=ye.objectKeys(n);return this._cached={shape:n,keys:o}}_parse(n){if(this._getType(n)!==x.object){const c=this._getOrReturnCtx(n);return z(c,{code:N.invalid_type,expected:x.object,received:c.parsedType}),ie}const{status:r,ctx:s}=this._processInputParams(n),{shape:i,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof Qe&&this._def.unknownKeys==="strip"))for(const c in s.data)a.includes(c)||l.push(c);const u=[];for(const c of a){const m=i[c],y=s.data[c];u.push({key:{status:"valid",value:c},value:m._parse(new Ge(s,y,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Qe){const c=this._def.unknownKeys;if(c==="passthrough")for(const m of l)u.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(c==="strict")l.length>0&&(z(s,{code:N.unrecognized_keys,keys:l}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const m of l){const y=s.data[m];u.push({key:{status:"valid",value:m},value:c._parse(new Ge(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const m of u){const y=await m.key,w=await m.value;c.push({key:y,value:w,alwaysSet:m.alwaysSet})}return c}).then(c=>Ae.mergeObjectSync(r,c)):Ae.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(n){return Q.errToObj,new Ee({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(o,r)=>{var s,i,a,l;const u=(a=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,o,r).message)!==null&&a!==void 0?a:r.defaultError;return o.code==="unrecognized_keys"?{message:(l=Q.errToObj(n).message)!==null&&l!==void 0?l:u}:{message:u}}}:{}})}strip(){return new Ee({...this._def,unknownKeys:"strip"})}passthrough(){return new Ee({...this._def,unknownKeys:"passthrough"})}extend(n){return new Ee({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new Ee({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:se.ZodObject})}setKey(n,o){return this.augment({[n]:o})}catchall(n){return new Ee({...this._def,catchall:n})}pick(n){const o={};return ye.objectKeys(n).forEach(r=>{n[r]&&this.shape[r]&&(o[r]=this.shape[r])}),new Ee({...this._def,shape:()=>o})}omit(n){const o={};return ye.objectKeys(this.shape).forEach(r=>{n[r]||(o[r]=this.shape[r])}),new Ee({...this._def,shape:()=>o})}deepPartial(){return yt(this)}partial(n){const o={};return ye.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];n&&!n[r]?o[r]=s:o[r]=s.optional()}),new Ee({...this._def,shape:()=>o})}required(n){const o={};return ye.objectKeys(this.shape).forEach(r=>{if(n&&!n[r])o[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof je;)i=i._def.innerType;o[r]=i}}),new Ee({...this._def,shape:()=>o})}keyof(){return qn(ye.objectKeys(this.shape))}}Ee.create=(t,n)=>new Ee({shape:()=>t,unknownKeys:"strip",catchall:Qe.create(),typeName:se.ZodObject,...ue(n)}),Ee.strictCreate=(t,n)=>new Ee({shape:()=>t,unknownKeys:"strict",catchall:Qe.create(),typeName:se.ZodObject,...ue(n)}),Ee.lazycreate=(t,n)=>new Ee({shape:t,unknownKeys:"strip",catchall:Qe.create(),typeName:se.ZodObject,...ue(n)});class Mt extends fe{_parse(n){const{ctx:o}=this._processInputParams(n),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return o.common.issues.push(...l.ctx.common.issues),l.result;const a=i.map(l=>new Re(l.ctx.common.issues));return z(o,{code:N.invalid_union,unionErrors:a}),ie}if(o.common.async)return Promise.all(r.map(async i=>{const a={...o,common:{...o.common,issues:[]},parent:null};return{result:await i._parseAsync({data:o.data,path:o.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const u of r){const c={...o,common:{...o.common,issues:[]},parent:null},m=u._parseSync({data:o.data,path:o.path,parent:c});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return o.common.issues.push(...i.ctx.common.issues),i.result;const l=a.map(u=>new Re(u));return z(o,{code:N.invalid_union,unionErrors:l}),ie}}get options(){return this._def.options}}Mt.create=(t,n)=>new Mt({options:t,typeName:se.ZodUnion,...ue(n)});const Xe=t=>t instanceof _t?Xe(t.schema):t instanceof Ze?Xe(t.innerType()):t instanceof At?[t.value]:t instanceof at?t.options:t instanceof Bt?ye.objectValues(t.enum):t instanceof Lt?Xe(t._def.innerType):t instanceof Dt?[void 0]:t instanceof Et?[null]:t instanceof je?[void 0,...Xe(t.unwrap())]:t instanceof rt?[null,...Xe(t.unwrap())]:t instanceof Cn||t instanceof Ht?Xe(t.unwrap()):t instanceof Ft?Xe(t._def.innerType):[];class rn extends fe{_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==x.object)return z(o,{code:N.invalid_type,expected:x.object,received:o.parsedType}),ie;const r=this.discriminator,s=o.data[r],i=this.optionsMap.get(s);return i?o.common.async?i._parseAsync({data:o.data,path:o.path,parent:o}):i._parseSync({data:o.data,path:o.path,parent:o}):(z(o,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,o,r){const s=new Map;for(const i of o){const a=Xe(i.shape[n]);if(!a.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const l of a){if(s.has(l))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(l)}`);s.set(l,i)}}return new rn({typeName:se.ZodDiscriminatedUnion,discriminator:n,options:o,optionsMap:s,...ue(r)})}}function wn(t,n){const o=Ke(t),r=Ke(n);if(t===n)return{valid:!0,data:t};if(o===x.object&&r===x.object){const s=ye.objectKeys(n),i=ye.objectKeys(t).filter(l=>s.indexOf(l)!==-1),a={...t,...n};for(const l of i){const u=wn(t[l],n[l]);if(!u.valid)return{valid:!1};a[l]=u.data}return{valid:!0,data:a}}else if(o===x.array&&r===x.array){if(t.length!==n.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const a=t[i],l=n[i],u=wn(a,l);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return o===x.date&&r===x.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}class Vt extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n),s=(i,a)=>{if(yn(i)||yn(a))return ie;const l=wn(i.value,a.value);return l.valid?((kn(i)||kn(a))&&o.dirty(),{status:o.value,value:l.data}):(z(r,{code:N.invalid_intersection_types}),ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Vt.create=(t,n,o)=>new Vt({left:t,right:n,typeName:se.ZodIntersection,...ue(o)});class We extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.array)return z(r,{code:N.invalid_type,expected:x.array,received:r.parsedType}),ie;if(r.data.length<this._def.items.length)return z(r,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&r.data.length>this._def.items.length&&(z(r,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const i=[...r.data].map((a,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Ge(r,a,r.path,l)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ae.mergeArray(o,a)):Ae.mergeArray(o,i)}get items(){return this._def.items}rest(n){return new We({...this._def,rest:n})}}We.create=(t,n)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new We({items:t,typeName:se.ZodTuple,rest:null,...ue(n)})};class Nt extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.object)return z(r,{code:N.invalid_type,expected:x.object,received:r.parsedType}),ie;const s=[],i=this._def.keyType,a=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new Ge(r,l,r.path,l)),value:a._parse(new Ge(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?Ae.mergeObjectAsync(o,s):Ae.mergeObjectSync(o,s)}get element(){return this._def.valueType}static create(n,o,r){return o instanceof fe?new Nt({keyType:n,valueType:o,typeName:se.ZodRecord,...ue(r)}):new Nt({keyType:Pe.create(),valueType:n,typeName:se.ZodRecord,...ue(o)})}}class sn extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.map)return z(r,{code:N.invalid_type,expected:x.map,received:r.parsedType}),ie;const s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([l,u],c)=>({key:s._parse(new Ge(r,l,r.path,[c,"key"])),value:i._parse(new Ge(r,u,r.path,[c,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,m=await u.value;if(c.status==="aborted"||m.status==="aborted")return ie;(c.status==="dirty"||m.status==="dirty")&&o.dirty(),l.set(c.value,m.value)}return{status:o.value,value:l}})}else{const l=new Map;for(const u of a){const c=u.key,m=u.value;if(c.status==="aborted"||m.status==="aborted")return ie;(c.status==="dirty"||m.status==="dirty")&&o.dirty(),l.set(c.value,m.value)}return{status:o.value,value:l}}}}sn.create=(t,n,o)=>new sn({valueType:n,keyType:t,typeName:se.ZodMap,...ue(o)});class ct extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.set)return z(r,{code:N.invalid_type,expected:x.set,received:r.parsedType}),ie;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(z(r,{code:N.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),o.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(z(r,{code:N.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),o.dirty());const i=this._def.valueType;function a(u){const c=new Set;for(const m of u){if(m.status==="aborted")return ie;m.status==="dirty"&&o.dirty(),c.add(m.value)}return{status:o.value,value:c}}const l=[...r.data.values()].map((u,c)=>i._parse(new Ge(r,u,r.path,c)));return r.common.async?Promise.all(l).then(u=>a(u)):a(l)}min(n,o){return new ct({...this._def,minSize:{value:n,message:Q.toString(o)}})}max(n,o){return new ct({...this._def,maxSize:{value:n,message:Q.toString(o)}})}size(n,o){return this.min(n,o).max(n,o)}nonempty(n){return this.min(1,n)}}ct.create=(t,n)=>new ct({valueType:t,minSize:null,maxSize:null,typeName:se.ZodSet,...ue(n)});class kt extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==x.function)return z(o,{code:N.invalid_type,expected:x.function,received:o.parsedType}),ie;function r(l,u){return tn({data:l,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,en(),mt].filter(c=>!!c),issueData:{code:N.invalid_arguments,argumentsError:u}})}function s(l,u){return tn({data:l,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,en(),mt].filter(c=>!!c),issueData:{code:N.invalid_return_type,returnTypeError:u}})}const i={errorMap:o.common.contextualErrorMap},a=o.data;if(this._def.returns instanceof bt){const l=this;return Fe(async function(...u){const c=new Re([]),m=await l._def.args.parseAsync(u,i).catch(I=>{throw c.addIssue(r(u,I)),c}),y=await Reflect.apply(a,this,m);return await l._def.returns._def.type.parseAsync(y,i).catch(I=>{throw c.addIssue(s(y,I)),c})})}else{const l=this;return Fe(function(...u){const c=l._def.args.safeParse(u,i);if(!c.success)throw new Re([r(u,c.error)]);const m=Reflect.apply(a,this,c.data),y=l._def.returns.safeParse(m,i);if(!y.success)throw new Re([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new kt({...this._def,args:We.create(n).rest(dt.create())})}returns(n){return new kt({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,o,r){return new kt({args:n||We.create([]).rest(dt.create()),returns:o||dt.create(),typeName:se.ZodFunction,...ue(r)})}}class _t extends fe{get schema(){return this._def.getter()}_parse(n){const{ctx:o}=this._processInputParams(n);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}_t.create=(t,n)=>new _t({getter:t,typeName:se.ZodLazy,...ue(n)});class At extends fe{_parse(n){if(n.data!==this._def.value){const o=this._getOrReturnCtx(n);return z(o,{received:o.data,code:N.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:n.data}}get value(){return this._def.value}}At.create=(t,n)=>new At({value:t,typeName:se.ZodLiteral,...ue(n)});function qn(t,n){return new at({values:t,typeName:se.ZodEnum,...ue(n)})}class at extends fe{constructor(){super(...arguments),Tt.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const o=this._getOrReturnCtx(n),r=this._def.values;return z(o,{expected:ye.joinValues(r),received:o.parsedType,code:N.invalid_type}),ie}if(nn(this,Tt)||Zn(this,Tt,new Set(this._def.values)),!nn(this,Tt).has(n.data)){const o=this._getOrReturnCtx(n),r=this._def.values;return z(o,{received:o.data,code:N.invalid_enum_value,options:r}),ie}return Fe(n.data)}get options(){return this._def.values}get enum(){const n={};for(const o of this._def.values)n[o]=o;return n}get Values(){const n={};for(const o of this._def.values)n[o]=o;return n}get Enum(){const n={};for(const o of this._def.values)n[o]=o;return n}extract(n,o=this._def){return at.create(n,{...this._def,...o})}exclude(n,o=this._def){return at.create(this.options.filter(r=>!n.includes(r)),{...this._def,...o})}}Tt=new WeakMap,at.create=qn;class Bt extends fe{constructor(){super(...arguments),vt.set(this,void 0)}_parse(n){const o=ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(n);if(r.parsedType!==x.string&&r.parsedType!==x.number){const s=ye.objectValues(o);return z(r,{expected:ye.joinValues(s),received:r.parsedType,code:N.invalid_type}),ie}if(nn(this,vt)||Zn(this,vt,new Set(ye.getValidEnumValues(this._def.values))),!nn(this,vt).has(n.data)){const s=ye.objectValues(o);return z(r,{received:r.data,code:N.invalid_enum_value,options:s}),ie}return Fe(n.data)}get enum(){return this._def.values}}vt=new WeakMap,Bt.create=(t,n)=>new Bt({values:t,typeName:se.ZodNativeEnum,...ue(n)});class bt extends fe{unwrap(){return this._def.type}_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==x.promise&&o.common.async===!1)return z(o,{code:N.invalid_type,expected:x.promise,received:o.parsedType}),ie;const r=o.parsedType===x.promise?o.data:Promise.resolve(o.data);return Fe(r.then(s=>this._def.type.parseAsync(s,{path:o.path,errorMap:o.common.contextualErrorMap})))}}bt.create=(t,n)=>new bt({type:t,typeName:se.ZodPromise,...ue(n)});class Ze extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:o,ctx:r}=this._processInputParams(n),s=this._def.effect||null,i={addIssue:a=>{z(r,a),a.fatal?o.abort():o.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async l=>{if(o.value==="aborted")return ie;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?ie:u.status==="dirty"||o.value==="dirty"?pt(u.value):u});{if(o.value==="aborted")return ie;const l=this._def.schema._parseSync({data:a,path:r.path,parent:r});return l.status==="aborted"?ie:l.status==="dirty"||o.value==="dirty"?pt(l.value):l}}if(s.type==="refinement"){const a=l=>{const u=s.refinement(l,i);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?ie:(l.status==="dirty"&&o.dirty(),a(l.value),{status:o.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?ie:(l.status==="dirty"&&o.dirty(),a(l.value).then(()=>({status:o.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!it(a))return a;const l=s.transform(a.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>it(a)?Promise.resolve(s.transform(a.value,i)).then(l=>({status:o.value,value:l})):a);ye.assertNever(s)}}Ze.create=(t,n,o)=>new Ze({schema:t,typeName:se.ZodEffects,effect:n,...ue(o)}),Ze.createWithPreprocess=(t,n,o)=>new Ze({schema:n,effect:{type:"preprocess",transform:t},typeName:se.ZodEffects,...ue(o)});class je extends fe{_parse(n){return this._getType(n)===x.undefined?Fe(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}je.create=(t,n)=>new je({innerType:t,typeName:se.ZodOptional,...ue(n)});class rt extends fe{_parse(n){return this._getType(n)===x.null?Fe(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}rt.create=(t,n)=>new rt({innerType:t,typeName:se.ZodNullable,...ue(n)});class Lt extends fe{_parse(n){const{ctx:o}=this._processInputParams(n);let r=o.data;return o.parsedType===x.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Lt.create=(t,n)=>new Lt({innerType:t,typeName:se.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...ue(n)});class Ft extends fe{_parse(n){const{ctx:o}=this._processInputParams(n),r={...o,common:{...o.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return St(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Re(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Re(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ft.create=(t,n)=>new Ft({innerType:t,typeName:se.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...ue(n)});class ln extends fe{_parse(n){if(this._getType(n)!==x.nan){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.nan,received:r.parsedType}),ie}return{status:"valid",value:n.data}}}ln.create=t=>new ln({typeName:se.ZodNaN,...ue(t)});const Ul=Symbol("zod_brand");class Cn extends fe{_parse(n){const{ctx:o}=this._processInputParams(n),r=o.data;return this._def.type._parse({data:r,path:o.path,parent:o})}unwrap(){return this._def.type}}class It extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ie:i.status==="dirty"?(o.dirty(),pt(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ie:s.status==="dirty"?(o.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(n,o){return new It({in:n,out:o,typeName:se.ZodPipeline})}}class Ht extends fe{_parse(n){const o=this._def.innerType._parse(n),r=s=>(it(s)&&(s.value=Object.freeze(s.value)),s);return St(o)?o.then(s=>r(s)):r(o)}unwrap(){return this._def.innerType}}Ht.create=(t,n)=>new Ht({innerType:t,typeName:se.ZodReadonly,...ue(n)});function Jn(t,n){const o=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t;return typeof o=="string"?{message:o}:o}function Kn(t,n={},o){return t?gt.create().superRefine((r,s)=>{var i,a;const l=t(r);if(l instanceof Promise)return l.then(u=>{var c,m;if(!u){const y=Jn(n,r),w=(m=(c=y.fatal)!==null&&c!==void 0?c:o)!==null&&m!==void 0?m:!0;s.addIssue({code:"custom",...y,fatal:w})}});if(!l){const u=Jn(n,r),c=(a=(i=u.fatal)!==null&&i!==void 0?i:o)!==null&&a!==void 0?a:!0;s.addIssue({code:"custom",...u,fatal:c})}}):gt.create()}const ql={object:Ee.lazycreate};var se;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(se||(se={}));const Jl=(t,n={message:`Input not instance of ${t.name}`})=>Kn(o=>o instanceof t,n),Qn=Pe.create,Xn=nt.create,Kl=ln.create,Ql=ot.create,eo=$t.create,Xl=lt.create,ed=on.create,td=Dt.create,nd=Et.create,od=gt.create,ad=dt.create,rd=Qe.create,sd=an.create,id=xe.create,ld=Ee.create,dd=Ee.strictCreate,cd=Mt.create,ud=rn.create,fd=Vt.create,hd=We.create,md=Nt.create,pd=sn.create,gd=ct.create,yd=kt.create,kd=_t.create,bd=At.create,wd=at.create,Cd=Bt.create,Sd=bt.create,to=Ze.create,Td=je.create,vd=rt.create,$d=Ze.createWithPreprocess,Dd=It.create;var st=Object.freeze({__proto__:null,defaultErrorMap:mt,setErrorMap:$l,getErrorMap:en,makeIssue:tn,EMPTY_PATH:Dl,addIssueToContext:z,ParseStatus:Ae,INVALID:ie,DIRTY:pt,OK:Fe,isAborted:yn,isDirty:kn,isValid:it,isAsync:St,get util(){return ye},get objectUtil(){return gn},ZodParsedType:x,getParsedType:Ke,ZodType:fe,datetimeRegex:Un,ZodString:Pe,ZodNumber:nt,ZodBigInt:ot,ZodBoolean:$t,ZodDate:lt,ZodSymbol:on,ZodUndefined:Dt,ZodNull:Et,ZodAny:gt,ZodUnknown:dt,ZodNever:Qe,ZodVoid:an,ZodArray:xe,ZodObject:Ee,ZodUnion:Mt,ZodDiscriminatedUnion:rn,ZodIntersection:Vt,ZodTuple:We,ZodRecord:Nt,ZodMap:sn,ZodSet:ct,ZodFunction:kt,ZodLazy:_t,ZodLiteral:At,ZodEnum:at,ZodNativeEnum:Bt,ZodPromise:bt,ZodEffects:Ze,ZodTransformer:Ze,ZodOptional:je,ZodNullable:rt,ZodDefault:Lt,ZodCatch:Ft,ZodNaN:ln,BRAND:Ul,ZodBranded:Cn,ZodPipeline:It,ZodReadonly:Ht,custom:Kn,Schema:fe,ZodSchema:fe,late:ql,get ZodFirstPartyTypeKind(){return se},coerce:{string:t=>Pe.create({...t,coerce:!0}),number:t=>nt.create({...t,coerce:!0}),boolean:t=>$t.create({...t,coerce:!0}),bigint:t=>ot.create({...t,coerce:!0}),date:t=>lt.create({...t,coerce:!0})},any:od,array:id,bigint:Ql,boolean:eo,date:Xl,discriminatedUnion:ud,effect:to,enum:wd,function:yd,instanceof:Jl,intersection:fd,lazy:kd,literal:bd,map:pd,nan:Kl,nativeEnum:Cd,never:rd,null:nd,nullable:vd,number:Xn,object:ld,oboolean:()=>eo().optional(),onumber:()=>Xn().optional(),optional:Td,ostring:()=>Qn().optional(),pipeline:Dd,preprocess:$d,promise:Sd,record:md,set:gd,strictObject:dd,string:Qn,symbol:ed,transformer:to,tuple:hd,undefined:td,union:cd,unknown:ad,void:sd,NEVER:ie,ZodIssueCode:N,quotelessJson:vl,ZodError:Re});st.object({date:st.string().regex(/^\d{4}-\d{2}-\d{2}$/),year:st.number().int(),month:st.number().int().min(1).max(12),week:st.number().int().min(1).max(7),monthStr:st.string(),weekStr:st.string(),day:st.number().int().min(1).max(31)}),T.extend(so);const Ed=e.defineComponent({name:"Gantt",props:{styleConfig:{type:Object,required:!0,default:()=>({headersHeight:100,rowHeight:60}),validator:t=>t.headersHeight>0&&t.rowHeight>0},dataConfig:{type:Object,required:!0,default:()=>({dataSource:[],taskHeaders:[],mapFields:{}}),validator:t=>Array.isArray(t.dataSource)&&Array.isArray(t.taskHeaders)&&typeof t.mapFields=="object"&&t.mapFields!==null},eventConfig:{type:Object,required:!0}},components:{DatePicker:Ln,SplitPane:ta,TaskTable:qa,RightTable:Lr,GanttConfigPanel:Pn},setup(t){const{t:n,locale:o}=ze(),r=()=>({"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[o.value]||"en",s=e.computed(()=>t.dataConfig.mapFields),i=e.computed(()=>t.dataConfig.dataSource),{config:a,updateConfig:l}=Ct(),u=e.computed(()=>a.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}),c=(k,R)=>{l({linkTypeVisibility:{[k]:R}})},m=e.ref([]),y=e.ref(35),w=e.ref(["button is-active","button","button","button"]),I=e.ref("月"),g=e.ref(t.dataConfig.queryStartDate||T().locale(r()).startOf("month").format("YYYY-MM-DD")),F=e.ref(T().locale(r()).add(-5,"y").format("YYYY-MM-DD")),h=e.ref(T().locale(r()).add(5,"y").format("YYYY-MM-DD")),O=e.ref(!1),S=e.ref(g.value),D=e.ref(t.dataConfig.queryEndDate||T().locale(r()).endOf("month").format("YYYY-MM-DD")),V=e.ref(T().locale(r()).add(-5,"y").format("YYYY-MM-DD")),C=e.ref(T(g.value).locale(r()).add(5,"y").format("YYYY-MM-DD")),K=e.ref(!1),q=e.ref(D.value),j=e.ref([]),X=e.ref([]),A=e.ref([]),P=e.ref([]),H=e.ref(0),ee=e.ref(0),ke=e.ref(g.value+" 00:00:00"),p=e.ref(D.value+" 23:59:59"),d=e.ref(""),b=e.ref(),f=e.computed(()=>v.subTask),$=e.computed(()=>v.editTask),B=e.computed(()=>v.removeTask),_=e.computed(()=>v.rootTask),L=e.computed(()=>v.allowChangeTaskDate),Z=k=>{const R=T(S.value),te=T(q.value);if(!(!R.isValid()||!te.isValid()||te.diff(R,"day")<0)){switch(ke.value=S.value+" 00:00:00",p.value=q.value+" 23:59:59",A.value=[],X.value=[],j.value=[],P.value=[],k){case"月":{H.value=80;const Y=[];let me=R.startOf("month");for(;me.isBefore(te)||me.isSame(te,"month");)Y.push(me.format("YYYY-MM-DD")),me=me.add(1,"month");if(Y.some(ve=>T(ve).format("YYYY-MM")===te.format("YYYY-MM"))||Y.push(te.format("YYYY-MM-DD")),Y.length===1){const ve=te.diff(R,"day")+1;j.value.push({title:R.locale(r()).format("MMMM"),width:ve*H.value})}else Y.forEach((ve,be)=>{if(be===0){const $e=R.endOf("month").format("YYYY-MM-DD"),Ce=T($e).diff(R,"day")+1;j.value.push({title:T(ve).locale(r()).format("MMMM"),width:Ce*H.value})}else if(be===Y.length-1){const $e=te.startOf("month").format("YYYY-MM-DD"),Ce=te.diff(T($e),"day")+1;j.value.push({title:T(ve).locale(r()).format("MMMM"),width:Ce*H.value})}else{const $e=T(ve,"YYYY-MM").daysInMonth();j.value.push({title:T(ve).locale(r()).format("MMMM"),width:$e*H.value})}});let De=R;for(;De.isBefore(te)||De.isSame(te,"day");){const be=["zh-CN","ja-JP","ko-KR"].includes(o.value)?De.format("DD")+"日":De.format("DD"),$e=De.format("YYYY-MM-DD"),Ce=De.locale(r()).format("dddd");A.value.push({title:Ce,width:H.value,fulldate:$e}),X.value.push({title:be,width:H.value,fulldate:$e}),De=De.add(1,"day")}ee.value=X.value.length;break}case"周":{H.value=120;let Y=R.startOf("isoWeek");const me=te.endOf("isoWeek"),De=[];let ve=Y.startOf("month");for(;ve.isBefore(me)||ve.isSame(me,"month");)De.push(ve.format("YYYY-MM-DD")),ve=ve.add(1,"month");for(De.forEach((be,$e)=>{const Ce=T(be),he=Ce.endOf("month");let Me=0,we=Y.clone();for(;we.isBefore(me)||we.isSame(me,"week");){const _e=we.startOf("isoWeek"),Ue=we.endOf("isoWeek");(_e.isSame(Ce,"month")||Ue.isSame(Ce,"month")||_e.isBefore(he)&&Ue.isAfter(Ce))&&Me++,we=we.add(1,"week")}if(Me>0){const Ue=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Ce.format("YYYY年MM月"):Ce.locale(r()).format("MMMM YYYY");j.value.push({title:Ue,width:Me*H.value})}});Y.isBefore(me)||Y.isSame(me,"week");){const be=Y.startOf("isoWeek"),$e=Y.endOf("isoWeek"),he=["zh-CN","ja-JP","ko-KR"].includes(o.value)?`第${Y.isoWeek()}周 (${be.format("MM/DD")}-${$e.format("MM/DD")})`:`Week ${Y.isoWeek()} (${be.format("MM/DD")}-${$e.format("MM/DD")})`;A.value.push({title:he,width:H.value,fulldate:be.format("YYYY-MM-DD")}),Y=Y.add(1,"week")}ee.value=A.value.length;break}case"日":{H.value=80;let Y=R;for(;Y.isBefore(te)||Y.isSame(te,"day");){const De=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Y.locale(r()).format("MMMM DD")+"日":Y.locale(r()).format("MMMM DD"),ve=Y.format("YYYY-MM-DD"),be=Y.locale(r()).format("dddd");A.value.push({title:be,width:H.value,fulldate:ve}),X.value.push({title:De,width:H.value,fulldate:ve}),Y=Y.add(1,"day")}ee.value=X.value.length;break}case"时":{H.value=30;let Y=R;const me=te.endOf("day");for(;Y.isBefore(me);){const ve=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Y.locale(r()).format("MMMM DD")+"日":Y.locale(r()).format("MMMM DD"),be=Y.format("YYYY-MM-DD"),$e=Y.locale(r()).format("dddd");A.value.push({title:$e,width:24*H.value,fulldate:be}),X.value.push({title:ve,width:24*H.value,fulldate:be});for(let Ce=0;Ce<=23;Ce++){const he=["zh-CN","ja-JP","ko-KR"].includes(o.value);P.value.push({title:he?Ce+"点":`${Ce}:00`,width:H.value})}Y=Y.add(1,"day")}ee.value=P.value.length;break}}t.eventConfig.queryTask(S.value,q.value,I.value)}},G=(k,R)=>{let te=k.filter(oe=>oe[s.value.id]===R);te&&te.length>0&&(d.value=te[0].index+"."+d.value,G(k,te[0][s.value.parentId]))},W=(k,R,te)=>{let oe=R.filter(Y=>Y[s.value.parentId]===k);if(oe&&oe.length>0){te++;for(let Y=0;Y<oe.length;Y++){oe[Y].treeLevel=te,oe[Y].index=Y+1;let me=m.value.filter(De=>De[s.value.id]===oe[Y][s.value.parentId]);d.value="",me&&me.length>0?(d.value=me[0].index+"."+oe[Y].index,G(m.value,me[0][s.value.parentId]),oe[Y].no=d.value):oe[Y].no=Y+1+"",m.value.push(oe[Y]),W(oe[Y][s.value.id],R,te)}}},ne=k=>{for(let R=0;R<w.value.length;R++)w.value[R]="button";switch(k){case"月":{w.value[0]="button is-active";break}case"周":{w.value[1]="button is-active";break}case"日":{w.value[2]="button is-active";break}case"时":{w.value[3]="button is-active";break}}I.value=k,e.nextTick(()=>{const R=document.querySelector(".table .content");R&&(R.scrollLeft=0)})},le=k=>{T(D.value).diff(T(k.date),"days")<0&&(q.value=k.date,D.value=k.date,ce.setEndGanttDate(T(k.date).toDate())),O.value=!1,S.value=k.date,g.value=k.date,ce.setStartGanttDate(T(k.date).toDate()),V.value=k.date},re=k=>{T(k.date).diff(T(g.value),"days")<0&&(S.value=T(k.date).format("YYYY-MM-DD"),g.value=T(k.date).format("YYYY-MM-DD"),ce.setStartGanttDate(T(k.date).toDate())),K.value=!1,q.value=k.date,D.value=k.date,ce.setEndGanttDate(T(k.date).toDate())};e.watch([I,S,q],([k,R,te],[oe,Y,me])=>{(k!==oe||R!==Y||te!==me)&&Z(k)}),e.watch(o,()=>{Z(I.value)}),e.watch(_,k=>{t.eventConfig.addRootTask(k)}),e.watch(f,k=>{t.eventConfig.addSubTask(k)}),e.watch(B,k=>{t.eventConfig.removeTask(k)}),e.watch($,k=>{t.eventConfig.editTask(k)}),e.watch(L,k=>{t.eventConfig.allowChangeTaskDate(k)}),e.watch(()=>v.barDate,k=>{if(k){const{id:R,startDate:te,endDate:oe}=k;R&&te&&oe&&t.eventConfig.barDate(R,te,oe)}}),e.watch(H,k=>{ce.setScale(k)}),e.watch(()=>t.dataConfig.taskHeaders,k=>{ce.setTaskHeaders(k)}),e.watch([j,X,A,P],([k,R,te,oe])=>{ce.setMonthHeaders(k),ce.setDayHeaders(R),ce.setWeekHeaders(te),ce.setHourHeaders(oe)}),e.watch(I,k=>{ce.setMode(k)}),e.watch(s,k=>{k&&ce.setMapFields(k)}),e.watch(()=>t.dataConfig.queryStartDate,k=>{k&&(ce.setStartGanttDate(T(k).toDate()),ke.value=k,S.value=k,g.value=k)}),e.watch(()=>t.dataConfig.queryEndDate,k=>{k&&(ce.setEndGanttDate(T(k).toDate()),p.value=k,q.value=k,D.value=k)}),e.watch(ee,k=>{k&&ce.setTimelineCellCount(k)}),e.onBeforeMount(()=>{ce.setStartGanttDate(T(g.value).toDate()),ce.setEndGanttDate(T(D.value).toDate()),ce.setMonthHeaders(j.value),ce.setWeekHeaders(A.value),ce.setDayHeaders(X.value),ce.setHourHeaders(P.value),ce.setTaskHeaders(t.dataConfig.taskHeaders),ce.setMapFields(s.value),ce.setTimelineCellCount(ee.value),i.value&&i.value.length>0&&ce.setTasks(i.value)});const Te=k=>{const R=k;t.eventConfig.updateProgress&&t.eventConfig.updateProgress(R.detail)};e.onMounted(()=>{j.value=[],A.value=[],X.value=[],P.value=[],W("0",i.value,0),ce.setTasks(m.value),e.nextTick(()=>{I.value="月",ce.setMode(I.value),Z(I.value)}),window.addEventListener("taskProgressUpdate",Te)});let E=null;e.watch(i,k=>{k&&k.length>0?(E&&clearTimeout(E),E=setTimeout(()=>{m.value=[],W("0",k,0),ce.setTasks(m.value),E=null},100)):k&&k.length===0&&ce.setTasks([])},{immediate:!1}),e.onBeforeUnmount(()=>{window.removeEventListener("taskProgressUpdate",Te)}),e.provide(ft.AddRootTaskSymbol,k=>t.eventConfig.addRootTask(k)),e.provide(ft.SetBarColorSymbol,k=>t.styleConfig.setBarColor(k)),t.styleConfig.setTaskType&&e.provide(ft.SetTaskTypeSymbol,t.styleConfig.setTaskType),e.provide("ganttContainer",b);const M=e.ref("metro");try{const k=localStorage.getItem("gantt-theme");k&&(M.value=k)}catch(k){console.warn("Failed to load theme from localStorage:",k)}e.provide("currentTheme",M),e.watch(()=>t.dataConfig.dependencies,k=>{k&&k.length>0&&(Kt.clear(),k.forEach(R=>{Kt.addDependency(R)}))},{immediate:!0});const ae=k=>{},J=e.computed(()=>{var k,R,te,oe;return{finishToStart:((k=a.linkTypeColors)==null?void 0:k.finishToStart)||"#3498db",startToStart:((R=a.linkTypeColors)==null?void 0:R.startToStart)||"#2ecc71",finishToFinish:((te=a.linkTypeColors)==null?void 0:te.finishToFinish)||"#e74c3c",startToFinish:((oe=a.linkTypeColors)==null?void 0:oe.startToFinish)||"#f39c12"}});return{t:n,subTask:f,editTask:$,removeTask:B,rootTask:_,allowChangeTaskDate:L,paneLengthPercent:y,startDate:g,endDate:D,minStartDate:F,maxStartDate:h,confirmStart:le,minEndDate:V,maxEndDate:C,confirmEnd:re,buttonClass:w,timeMode:ne,onLinkConfigChange:ae,ganttContainer:b,linkTypeColors:J,linkTypeVisibility:u,updateLinkVisibility:c}}}),Md={class:"page gantt-container",ref:"ganttContainer"},Vd={class:"toolbar"},Nd={class:"dateInput"},_d={style:{"margin-right":"20px","margin-left":"20px",color:"#606266"}},Ad={class:"buttonGroup"},Bd={class:"metro-content"},Ld={class:"metro-text"},Fd={class:"metro-content"},Id={class:"metro-text"},Hd={class:"metro-content"},Rd={class:"metro-text"},zd={class:"metro-content"},Yd={class:"metro-text"},Od={class:"link-legend"},Pd={class:"legend-title"},xd={class:"legend-items"},Zd=["checked"],Gd={class:"legend-label"},Wd={class:"legend-desc"},jd=["checked"],Ud={width:"24",height:"12",viewBox:"0 0 24 12"},qd=["stroke"],Jd=["fill"],Kd={class:"legend-label"},Qd={class:"legend-desc"},Xd=["checked"],ec={width:"24",height:"12",viewBox:"0 0 24 12"},tc=["stroke"],nc=["fill"],oc={class:"legend-label"},ac={class:"legend-desc"},rc=["checked"],sc={width:"24",height:"12",viewBox:"0 0 24 12"},ic=["stroke"],lc=["fill"],dc={class:"legend-label"},cc={class:"legend-desc"},uc=["checked"],fc={width:"24",height:"12",viewBox:"0 0 24 12"},hc=["stroke"],mc=["fill"],pc={class:"legend-label"},gc={class:"legend-desc"},yc={class:"config-buttons"},kc={class:"gantt"};function bc(t,n,o,r,s,i){const a=e.resolveComponent("DatePicker"),l=e.resolveComponent("GanttConfigPanel"),u=e.resolveComponent("TaskTable"),c=e.resolveComponent("RightTable"),m=e.resolveComponent("SplitPane");return e.openBlock(),e.createElementBlock("div",Md,[e.createElementVNode("div",Vd,[e.createElementVNode("div",Nd,[e.createVNode(a,{date:t.startDate,"min-date":t.minStartDate,"max-date":t.maxStartDate,onConfirm:t.confirmStart},null,8,["date","min-date","max-date","onConfirm"]),e.createElementVNode("span",_d,e.toDisplayString(t.t("common.to")),1),e.createVNode(a,{date:t.endDate,"min-date":t.minEndDate,"max-date":t.maxEndDate,onConfirm:t.confirmEnd},null,8,["date","min-date","max-date","onConfirm"])]),e.createElementVNode("div",Ad,[e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[0],"metro-btn"]),onClick:n[0]||(n[0]=y=>t.timeMode("月"))},[e.createElementVNode("div",Bd,[n[10]||(n[10]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"})])],-1)),e.createElementVNode("div",Ld,e.toDisplayString(t.t("viewMode.month")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[1],"metro-btn"]),onClick:n[1]||(n[1]=y=>t.timeMode("周"))},[e.createElementVNode("div",Fd,[n[11]||(n[11]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"})])],-1)),e.createElementVNode("div",Id,e.toDisplayString(t.t("viewMode.week")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[2],"metro-btn"]),onClick:n[2]||(n[2]=y=>t.timeMode("日"))},[e.createElementVNode("div",Hd,[n[12]||(n[12]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 2 2h8c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H6V4h8v16z"})])],-1)),e.createElementVNode("div",Rd,e.toDisplayString(t.t("viewMode.day")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[3],"metro-btn"]),onClick:n[3]||(n[3]=y=>t.timeMode("时"))},[e.createElementVNode("div",zd,[n[13]||(n[13]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})])],-1)),e.createElementVNode("div",Yd,e.toDisplayString(t.t("viewMode.hour")),1)])],2)]),e.createElementVNode("div",Od,[e.createElementVNode("div",Pd,[n[14]||(n[14]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("link.legend")),1)]),e.createElementVNode("div",xd,[e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.parentChild}]),title:"父子关系:显示任务的层级结构"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.parentChild,onChange:n[4]||(n[4]=y=>t.updateLinkVisibility("parentChild",y.target.checked))},null,40,Zd),n[15]||(n[15]=e.createElementVNode("svg",{width:"24",height:"12",viewBox:"0 0 24 12"},[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:"#95a5a6","stroke-width":"1.5","stroke-dasharray":"3,3"}),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:"#95a5a6"})],-1)),e.createElementVNode("span",Gd,e.toDisplayString(t.t("link.pc")),1),e.createElementVNode("span",Wd,e.toDisplayString(t.t("link.parentChild")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.finishToStart}]),title:"完成-开始:前置任务完成后,后续任务才能开始"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.finishToStart,onChange:n[5]||(n[5]=y=>t.updateLinkVisibility("finishToStart",y.target.checked))},null,40,jd),(e.openBlock(),e.createElementBlock("svg",Ud,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToStart,"stroke-width":"2"},null,8,qd),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToStart},null,8,Jd)])),e.createElementVNode("span",Kd,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",Qd,e.toDisplayString(t.t("link.finishToStart")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.startToStart}]),title:"开始-开始:两个任务同时开始"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.startToStart,onChange:n[6]||(n[6]=y=>t.updateLinkVisibility("startToStart",y.target.checked))},null,40,Xd),(e.openBlock(),e.createElementBlock("svg",ec,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToStart,"stroke-width":"2"},null,8,tc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToStart},null,8,nc)])),e.createElementVNode("span",oc,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",ac,e.toDisplayString(t.t("link.startToStart")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.finishToFinish}]),title:"完成-完成:两个任务同时完成"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.finishToFinish,onChange:n[7]||(n[7]=y=>t.updateLinkVisibility("finishToFinish",y.target.checked))},null,40,rc),(e.openBlock(),e.createElementBlock("svg",sc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToFinish,"stroke-width":"2"},null,8,ic),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToFinish},null,8,lc)])),e.createElementVNode("span",dc,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",cc,e.toDisplayString(t.t("link.finishToFinish")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.startToFinish}]),title:"开始-完成:前置任务开始后,后续任务才能完成"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.startToFinish,onChange:n[8]||(n[8]=y=>t.updateLinkVisibility("startToFinish",y.target.checked))},null,40,uc),(e.openBlock(),e.createElementBlock("svg",fc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToFinish,"stroke-width":"2"},null,8,hc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToFinish},null,8,mc)])),e.createElementVNode("span",pc,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",gc,e.toDisplayString(t.t("link.startToFinish")),1)],2)])]),e.createElementVNode("div",yc,[e.createVNode(l)])]),e.createElementVNode("div",kc,[e.createVNode(m,{direction:"row",min:0,max:100,triggerLength:10,paneLengthPercent:t.paneLengthPercent,"onUpdate:paneLengthPercent":n[9]||(n[9]=y=>t.paneLengthPercent=y)},{one:e.withCtx(()=>[e.createVNode(u,{headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),two:e.withCtx(()=>[e.createVNode(c,{ref:"barContent",headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),_:1},8,["paneLengthPercent"])])],512)}const dn=Se(Ed,[["render",bc],["__scopeId","data-v-9753c43c"]]),wc=e.defineComponent({name:"GanttThemeSelector",setup(){const{t}=ze(),n=e.ref(!1),o=e.inject("currentTheme",e.ref("metro")),r=e.ref(""),s=e.ref(),i=e.ref(He),a=e.inject("ganttContainer"),l=()=>{n.value=!n.value},u=()=>{n.value=!1,y()},c=S=>{o.value=S,r.value="",h(S);let D=null;if(a&&a.value?D=a.value:D=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),D){D.setAttribute("data-gantt-theme",S);const V=document.querySelector(".page");V&&V.setAttribute("data-gantt-theme",S);try{localStorage.setItem("gantt-theme",S)}catch(C){console.warn("Failed to save theme:",C)}setTimeout(()=>{D&&(D.style.display="none",D.offsetHeight,D.style.display="")},50)}u()},m=S=>{S!==o.value&&a&&a.value&&(r.value=S,h(S))},y=()=>{r.value&&a&&a.value&&(r.value="",h(o.value))},w=()=>{const S=Le.exportThemeConfig(),D=new Blob([S],{type:"application/json"}),V=URL.createObjectURL(D),C=document.createElement("a");C.href=V,C.download=`gantt-theme-config-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(V)},I=()=>{var S;(S=s.value)==null||S.click()},g=S=>{var V;const D=(V=S.target.files)==null?void 0:V[0];if(D){const C=new FileReader;C.onload=K=>{var q;try{const j=(q=K.target)==null?void 0:q.result;Le.importThemeConfig(j)?(o.value=Le.getCurrentTheme(),alert("主题配置导入成功!")):alert("主题配置文件格式错误!")}catch{alert("主题配置文件格式错误!")}},C.readAsText(D)}},F=S=>{S.target.closest(".gantt-theme-selector")||u()},h=S=>{const D=document.getElementById("gantt-theme-styles");D&&D.remove();const V=He.find(j=>j.id===S);if(!V)return;const C=document.createElement("style");C.id="gantt-theme-styles";const K=Object.entries(V.cssVariables).map(([j,X])=>`${j}: ${X};`).join(`
76
+ `);C.textContent=`
77
+ /* 甘特图主题样式 - ${S} */
78
78
  .page.gantt-container,
79
79
  .page.gantt-container *,
80
80
  .gantt-container,
81
81
  .gantt-container *,
82
- [data-gantt-theme="${b}"],
83
- [data-gantt-theme="${b}"] *,
82
+ [data-gantt-theme="${S}"],
83
+ [data-gantt-theme="${S}"] *,
84
84
  .toolbar,
85
85
  .toolbar *,
86
86
  .buttonGroup,
@@ -89,35 +89,35 @@
89
89
  .metro-btn *,
90
90
  .gantt,
91
91
  .gantt * {
92
- ${J}
92
+ ${K}
93
93
  }
94
94
 
95
95
  /* 根级别变量 */
96
96
  :root {
97
- ${J}
97
+ ${K}
98
98
  }
99
99
 
100
100
  /* 强制应用到特定元素 */
101
- .page[data-gantt-theme="${b}"] .toolbar {
101
+ .page[data-gantt-theme="${S}"] .toolbar {
102
102
  background: var(--bg-metal-normal) !important;
103
103
  border-bottom: 1px solid var(--border) !important;
104
104
  }
105
105
 
106
- .page[data-gantt-theme="${b}"] .buttonGroup {
106
+ .page[data-gantt-theme="${S}"] .buttonGroup {
107
107
  background: var(--bg-metal-normal) !important;
108
108
  border: 1px solid var(--border) !important;
109
109
  }
110
110
 
111
- .page[data-gantt-theme="${b}"] .metro-btn {
111
+ .page[data-gantt-theme="${S}"] .metro-btn {
112
112
  background: var(--bg-metal-normal) !important;
113
113
  color: var(--text-secondary) !important;
114
114
  border-right: 1px solid var(--border) !important;
115
115
  }
116
116
 
117
- .page[data-gantt-theme="${b}"] .metro-btn.is-active,
118
- .page[data-gantt-theme="${b}"] .metro-btn.button.is-active {
117
+ .page[data-gantt-theme="${S}"] .metro-btn.is-active,
118
+ .page[data-gantt-theme="${S}"] .metro-btn.button.is-active {
119
119
  background: var(--bg-active) !important;
120
120
  color: var(--text-white) !important;
121
121
  }
122
- `,document.head.appendChild(k),console.log("✅ Theme styles injected successfully"),console.log("📊 Injected CSS length:",k.textContent.length,"characters"),document.getElementById("gantt-theme-styles")?console.log("✅ Style element found in DOM"):console.error("❌ Style element not found in DOM")},R=()=>{console.log("🚀 initTheme called"),console.log("📦 ganttContainer:",a),console.log("📦 ganttContainer.value:",a==null?void 0:a.value);try{const v=localStorage.getItem("gantt-theme");v&&He.find(V=>V.id===v)&&(o.value=v,console.log("💾 Loaded theme from localStorage:",v))}catch(v){console.warn("Failed to load theme from localStorage:",v)}console.log("🎨 Current theme:",o.value),m(o.value);let b=null;if(a&&a.value?(b=a.value,console.log("✅ Using injected container reference")):(b=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),console.log("🔍 Using DOM query fallback, found:",b)),b){b.setAttribute("data-gantt-theme",o.value),console.log("✅ Container attribute set to:",o.value);const v=document.querySelector(".page");v&&(v.setAttribute("data-gantt-theme",o.value),console.log("✅ Page element attribute set"))}else console.warn("⚠️ No container found during initialization"),setTimeout(()=>{console.log("🔄 Retrying theme initialization..."),R()},500);console.log("✅ Theme initialization completed")};return e.watchEffect(()=>{a&&a.value&&e.nextTick(()=>{R()})}),e.onMounted(()=>{document.addEventListener("click",F),(!a||!a.value)&&setTimeout(()=>{R()},200)}),e.onUnmounted(()=>{document.removeEventListener("click",F),g()}),{t,availableThemes:s,isOpen:n,currentTheme:o,previewTheme:r,fileInput:i,toggleSelector:l,closeSelector:u,selectTheme:d,onPreviewTheme:p,onCancelPreview:g,exportConfig:C,importConfig:G,handleFileImport:E}}}),_d={class:"gantt-theme-selector"},Ad={class:"theme-dropdown-header"},Ld={class:"theme-grid"},Bd=["onClick","onMouseenter"],Fd={class:"theme-preview-content"},Hd={class:"theme-info"},Id={class:"theme-name"},Rd={class:"theme-description"},Yd={class:"theme-status"},zd={key:0,class:"status-badge current"},Od={key:1,class:"status-badge preview"},xd={class:"theme-actions"};function Pd(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",{class:e.normalizeClass(["theme-selector-trigger",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...a)=>t.toggleSelector&&t.toggleSelector(...a))},[n[8]||(n[8]=e.createElementVNode("div",{class:"theme-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"})])],-1)),n[9]||(n[9]=e.createElementVNode("span",{class:"theme-text"},"主题",-1)),e.createElementVNode("div",{class:e.normalizeClass(["theme-arrow",{rotated:t.isOpen}])},n[7]||(n[7]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M7 10l5 5 5-5z"})],-1)]),2)],2),e.withDirectives(e.createElementVNode("div",{class:"theme-dropdown",onClick:n[5]||(n[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Ad,[n[11]||(n[11]=e.createElementVNode("h3",null,"选择主题",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...a)=>t.closeSelector&&t.closeSelector(...a))},n[10]||(n[10]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))]),e.createElementVNode("div",Ld,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableThemes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["theme-card",{active:t.currentTheme===a.id,preview:t.previewTheme===a.id}]),onClick:l=>t.selectTheme(a.id),onMouseenter:l=>t.onPreviewTheme(a.id),onMouseleave:n[2]||(n[2]=(...l)=>t.onCancelPreview&&t.onCancelPreview(...l))},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({backgroundColor:a.preview})},[e.createElementVNode("div",Fd,[e.createElementVNode("div",{class:"preview-header",style:e.normalizeStyle({backgroundColor:a.preview})},null,4),n[12]||(n[12]=e.createElementVNode("div",{class:"preview-body"},[e.createElementVNode("div",{class:"preview-bar"}),e.createElementVNode("div",{class:"preview-bar short"}),e.createElementVNode("div",{class:"preview-bar medium"})],-1))])],4),e.createElementVNode("div",Hd,[e.createElementVNode("h4",Id,e.toDisplayString(t.t(a.nameKey)),1),e.createElementVNode("p",Rd,e.toDisplayString(t.t(a.descKey)),1)]),e.createElementVNode("div",Yd,[t.currentTheme===a.id?(e.openBlock(),e.createElementBlock("div",zd,"当前")):t.previewTheme===a.id?(e.openBlock(),e.createElementBlock("div",Od,"预览")):e.createCommentVNode("",!0)])],42,Bd))),128))]),e.createElementVNode("div",xd,[e.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...a)=>t.exportConfig&&t.exportConfig(...a))},n[13]||(n[13]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),e.createTextVNode(" 导出配置 ")])),e.createElementVNode("button",{class:"action-btn",onClick:n[4]||(n[4]=(...a)=>t.importConfig&&t.importConfig(...a))},n[14]||(n[14]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),e.createTextVNode(" 导入配置 ")]))])],512),[[e.vShow,t.isOpen]]),e.createElementVNode("input",{ref:"fileInput",type:"file",accept:".json",style:{display:"none"},onChange:n[6]||(n[6]=(...a)=>t.handleFileImport&&t.handleFileImport(...a))},null,544)])}const Zd=Ve(Vd,[["render",Pd],["__scopeId","data-v-47ec3216"]]),Gd=e.defineComponent({name:"LanguageSelector",setup(){const{locale:t,t:n,setLocale:o,getLocales:r}=tt(),i=e.ref(!1),s=e.computed(()=>t.value),a=e.computed(()=>r()),l=e.computed(()=>{const C=a.value.find(G=>G.value===s.value);return(C==null?void 0:C.label)||"Language"}),u=()=>{i.value=!i.value},d=()=>{i.value=!1},p=C=>{o(C),d()},g=C=>{C.target.closest(".language-selector")||d()};return e.onMounted(()=>{document.addEventListener("click",g)}),e.onUnmounted(()=>{document.removeEventListener("click",g)}),{isOpen:i,currentLocale:s,currentLocaleLabel:l,locales:a,t:n,toggleDropdown:u,closeDropdown:d,selectLocale:p}}}),Wd={class:"language-selector"},Ud=["title"],jd={class:"btn-content"},qd={class:"btn-text"},Jd={key:0,class:"lang-dropdown"},Kd=["onClick"],Qd={class:"lang-label"},Xd={key:0,class:"lang-check"};function ec(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("button",{class:e.normalizeClass(["lang-btn",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...a)=>t.toggleDropdown&&t.toggleDropdown(...a)),title:t.t("configPanel.languageSettings")},[e.createElementVNode("div",jd,[n[3]||(n[3]=e.createElementVNode("div",{class:"btn-icon"},[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})])],-1)),e.createElementVNode("span",qd,e.toDisplayString(t.currentLocaleLabel),1),e.createElementVNode("div",{class:e.normalizeClass(["btn-arrow",{rotated:t.isOpen}])},n[2]||(n[2]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M7 10l5 5 5-5z"})],-1)]),2)])],10,Ud),e.createVNode(e.Transition,{name:"dropdown-fade"},{default:e.withCtx(()=>[t.isOpen?(e.openBlock(),e.createElementBlock("div",Jd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locales,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["lang-option",{active:t.currentLocale===a.value}]),onClick:l=>t.selectLocale(a.value)},[e.createElementVNode("span",Qd,e.toDisplayString(a.label),1),t.currentLocale===a.value?(e.openBlock(),e.createElementBlock("div",Xd,n[4]||(n[4]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,Kd))),128))])):e.createCommentVNode("",!0)]),_:1}),t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dropdown-overlay",onClick:n[1]||(n[1]=(...a)=>t.closeDropdown&&t.closeDropdown(...a))})):e.createCommentVNode("",!0)])}const tc=Ve(Gd,[["render",ec],["__scopeId","data-v-244711d6"]]),nc=e.defineComponent({name:"LinkConfigPanel",emits:["close","configChange"],setup(t,{emit:n}){const{config:o,setTheme:r,updateConfig:i,reset:s,exportConfig:a,importConfig:l,themes:u}=Tt(),d=e.ref(!1),p=e.ref(""),g=[{value:Ne.STRAIGHT,name:"直线",preview:"M 10 20 L 50 20"},{value:Ne.BEZIER,name:"贝塞尔曲线",preview:"M 10 20 C 25 20 35 20 50 20"},{value:Ne.RIGHT_ANGLE,name:"直角连线",preview:"M 10 20 L 30 20 L 30 30 L 50 30"}],C={default:"默认",business:"商务",modern:"现代",minimal:"简约",colorful:"彩色"};return{config:o,pathTypes:g,themes:u,showImportDialog:d,importText:p,getThemeName:V=>C[V]||V,isCurrentTheme:V=>{const k=u[V];return k?Object.keys(k).every(J=>{const j=k[J],U=o[J];return typeof j=="object"&&typeof U=="object"?JSON.stringify(j)===JSON.stringify(U):j===U}):!1},updateConfig:()=>{i(o),n("configChange",o)},applyTheme:V=>{r(V),n("configChange",o)},resetConfig:()=>{s(),n("configChange",o)},exportConfig:()=>{const V=a();navigator.clipboard.writeText(V).then(()=>{alert("配置已复制到剪贴板")}).catch(()=>{const k=document.createElement("textarea");k.value=V,document.body.appendChild(k),k.select(),document.execCommand("copy"),document.body.removeChild(k),alert("配置已复制到剪贴板")})},importConfig:()=>{try{l(p.value)?(d.value=!1,p.value="",n("configChange",o),alert("配置导入成功")):alert("配置格式错误,请检查JSON格式")}catch(V){alert("配置导入失败:"+V)}}}}}),ac={class:"link-config-panel"},oc={class:"panel-header"},rc={class:"panel-content"},ic={class:"config-section"},sc={class:"path-type-selector"},lc=["value","onUpdate:modelValue"],dc={class:"path-preview"},cc={width:"60",height:"40",viewBox:"0 0 60 40"},uc=["d"],fc={class:"config-section"},mc={class:"config-row"},hc={class:"config-row"},pc={class:"value"},gc={class:"config-row"},yc={key:0,class:"config-section"},kc={class:"config-row"},bc={class:"value"},wc={key:1,class:"config-section"},Cc={class:"config-row"},Tc={class:"value"},Sc={class:"config-row"},vc={key:0,class:"config-row"},Dc={class:"value"},Ec={class:"config-section"},Mc={class:"config-row"},$c={key:0},Nc={class:"config-row"},Vc={class:"value"},_c={class:"config-row"},Ac=["placeholder"],Lc={class:"config-section"},Bc={class:"config-row"},Fc={key:0},Hc={class:"config-row"},Ic={class:"value"},Rc={class:"config-section"},Yc={class:"config-row"},zc={key:0},Oc={class:"config-row"},xc={class:"config-row"},Pc={class:"value"},Zc={class:"config-section"},Gc={class:"config-row"},Wc={class:"config-row"},Uc={class:"value"},jc={class:"config-row"},qc={class:"config-section"},Jc={class:"theme-selector"},Kc=["onClick"],Qc={class:"config-section"},Xc={class:"action-buttons"},eu={class:"import-actions"};function tu(t,n,o,r,i,s){return e.openBlock(),e.createElementBlock("div",ac,[e.createElementVNode("div",oc,[n[47]||(n[47]=e.createElementVNode("h3",null,"连线配置",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=a=>t.$emit("close")),title:"关闭"},"×")]),e.createElementVNode("div",rc,[e.createElementVNode("div",ic,[n[48]||(n[48]=e.createElementVNode("h4",null,"路径类型",-1)),e.createElementVNode("div",sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,a=>(e.openBlock(),e.createElementBlock("label",{key:a.value,class:e.normalizeClass(["path-type-option",{active:t.config.pathType===a.value}])},[e.withDirectives(e.createElementVNode("input",{type:"radio",value:a.value,"onUpdate:modelValue":l=>t.config.pathType=l,onChange:n[1]||(n[1]=(...l)=>t.updateConfig&&t.updateConfig(...l))},null,40,lc),[[e.vModelRadio,t.config.pathType]]),e.createElementVNode("div",dc,[(e.openBlock(),e.createElementBlock("svg",cc,[e.createElementVNode("path",{d:a.preview,stroke:"#3498db","stroke-width":"2",fill:"none"},null,8,uc)]))]),e.createElementVNode("span",null,e.toDisplayString(a.name),1)],2))),128))])]),e.createElementVNode("div",fc,[n[53]||(n[53]=e.createElementVNode("h4",null,"基础样式",-1)),e.createElementVNode("div",mc,[n[49]||(n[49]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[2]||(n[2]=a=>t.config.color=a),onChange:n[3]||(n[3]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.color]])]),e.createElementVNode("div",hc,[n[50]||(n[50]=e.createElementVNode("label",null,"线宽:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":n[4]||(n[4]=a=>t.config.width=a),onInput:n[5]||(n[5]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.width,void 0,{number:!0}]]),e.createElementVNode("span",pc,e.toDisplayString(t.config.width)+"px",1)]),e.createElementVNode("div",gc,[n[52]||(n[52]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[6]||(n[6]=a=>t.config.dashArray=a),onChange:n[7]||(n[7]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"select-input"},n[51]||(n[51]=[e.createElementVNode("option",{value:void 0},"实线",-1),e.createElementVNode("option",{value:"3,3"},"短虚线",-1),e.createElementVNode("option",{value:"5,5"},"中虚线",-1),e.createElementVNode("option",{value:"8,4"},"长虚线",-1),e.createElementVNode("option",{value:"2,2,8,2"},"点划线",-1)]),544),[[e.vModelSelect,t.config.dashArray]])])]),t.config.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",yc,[n[55]||(n[55]=e.createElementVNode("h4",null,"贝塞尔曲线配置",-1)),e.createElementVNode("div",kc,[n[54]||(n[54]=e.createElementVNode("label",null,"弯曲度:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0.1",max:"1",step:"0.1","onUpdate:modelValue":n[8]||(n[8]=a=>t.config.bezierCurvature=a),onInput:n[9]||(n[9]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.bezierCurvature,void 0,{number:!0}]]),e.createElementVNode("span",bc,e.toDisplayString(t.config.bezierCurvature),1)])])):e.createCommentVNode("",!0),t.config.pathType==="right-angle"?(e.openBlock(),e.createElementBlock("div",wc,[n[59]||(n[59]=e.createElementVNode("h4",null,"直角连线配置",-1)),e.createElementVNode("div",Cc,[n[56]||(n[56]=e.createElementVNode("label",null,"偏移距离:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"10",max:"80",step:"5","onUpdate:modelValue":n[10]||(n[10]=a=>t.config.rightAngleOffset=a),onInput:n[11]||(n[11]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.rightAngleOffset,void 0,{number:!0}]]),e.createElementVNode("span",Tc,e.toDisplayString(t.config.rightAngleOffset)+"px",1)]),e.createElementVNode("div",Sc,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=a=>t.config.smoothCorners=a),onChange:n[13]||(n[13]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.smoothCorners]]),n[57]||(n[57]=e.createTextVNode(" 平滑转角 "))])]),t.config.smoothCorners?(e.openBlock(),e.createElementBlock("div",vc,[n[58]||(n[58]=e.createElementVNode("label",null,"转角半径:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0",max:"15",step:"1","onUpdate:modelValue":n[14]||(n[14]=a=>t.config.cornerRadius=a),onInput:n[15]||(n[15]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.cornerRadius,void 0,{number:!0}]]),e.createElementVNode("span",Dc,e.toDisplayString(t.config.cornerRadius)+"px",1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ec,[n[63]||(n[63]=e.createElementVNode("h4",null,"箭头配置",-1)),e.createElementVNode("div",Mc,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[16]||(n[16]=a=>t.config.showArrow=a),onChange:n[17]||(n[17]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.showArrow]]),n[60]||(n[60]=e.createTextVNode(" 显示箭头 "))])]),t.config.showArrow?(e.openBlock(),e.createElementBlock("div",$c,[e.createElementVNode("div",Nc,[n[61]||(n[61]=e.createElementVNode("label",null,"箭头大小:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"4",max:"16",step:"1","onUpdate:modelValue":n[18]||(n[18]=a=>t.config.arrowSize=a),onInput:n[19]||(n[19]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.arrowSize,void 0,{number:!0}]]),e.createElementVNode("span",Vc,e.toDisplayString(t.config.arrowSize)+"px",1)]),e.createElementVNode("div",_c,[n[62]||(n[62]=e.createElementVNode("label",null,"箭头颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[20]||(n[20]=a=>t.config.arrowColor=a),onChange:n[21]||(n[21]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input",placeholder:t.config.color},null,40,Ac),[[e.vModelText,t.config.arrowColor]]),e.createElementVNode("button",{onClick:n[22]||(n[22]=a=>{t.config.arrowColor=t.config.color,t.updateConfig()}),class:"sync-btn",title:"与线条颜色同步"}," 同步 ")])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Lc,[n[67]||(n[67]=e.createElementVNode("h4",null,"虚线动画",-1)),e.createElementVNode("div",Bc,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=a=>t.config.enableDashAnimation=a),onChange:n[24]||(n[24]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.enableDashAnimation]]),n[64]||(n[64]=e.createTextVNode(" 启用虚线流动动画 "))])]),t.config.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",Fc,[e.createElementVNode("div",Hc,[n[65]||(n[65]=e.createElementVNode("label",null,"动画速度:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0.2",max:"3",step:"0.2","onUpdate:modelValue":n[25]||(n[25]=a=>t.config.dashAnimationSpeed=a),onInput:n[26]||(n[26]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.dashAnimationSpeed,void 0,{number:!0}]]),e.createElementVNode("span",Ic,e.toDisplayString(t.config.dashAnimationSpeed)+"s",1)]),n[66]||(n[66]=e.createElementVNode("div",{class:"config-info"},[e.createElementVNode("small",null,"💡 虚线动画只在连线设置为虚线样式时显示")],-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Rc,[n[71]||(n[71]=e.createElementVNode("h4",null,"标签配置",-1)),e.createElementVNode("div",Yc,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=a=>t.config.showLabels=a),onChange:n[28]||(n[28]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.showLabels]]),n[68]||(n[68]=e.createTextVNode(" 显示标签 "))])]),t.config.showLabels?(e.openBlock(),e.createElementBlock("div",zc,[e.createElementVNode("div",Oc,[n[69]||(n[69]=e.createElementVNode("label",null,"标签颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[29]||(n[29]=a=>t.config.labelColor=a),onChange:n[30]||(n[30]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.labelColor]])]),e.createElementVNode("div",xc,[n[70]||(n[70]=e.createElementVNode("label",null,"字体大小:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"8",max:"16",step:"1","onUpdate:modelValue":n[31]||(n[31]=a=>t.config.labelFontSize=a),onInput:n[32]||(n[32]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.labelFontSize,void 0,{number:!0}]]),e.createElementVNode("span",Pc,e.toDisplayString(t.config.labelFontSize)+"px",1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Zc,[n[76]||(n[76]=e.createElementVNode("h4",null,"父子关系样式",-1)),e.createElementVNode("div",Gc,[n[72]||(n[72]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[33]||(n[33]=a=>t.config.parentChildStyle.color=a),onChange:n[34]||(n[34]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.parentChildStyle.color]])]),e.createElementVNode("div",Wc,[n[73]||(n[73]=e.createElementVNode("label",null,"线宽:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"1",max:"3",step:"0.5","onUpdate:modelValue":n[35]||(n[35]=a=>t.config.parentChildStyle.width=a),onInput:n[36]||(n[36]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.parentChildStyle.width,void 0,{number:!0}]]),e.createElementVNode("span",Uc,e.toDisplayString(t.config.parentChildStyle.width)+"px",1)]),e.createElementVNode("div",jc,[n[75]||(n[75]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[37]||(n[37]=a=>t.config.parentChildStyle.dashArray=a),onChange:n[38]||(n[38]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"select-input"},n[74]||(n[74]=[e.createElementVNode("option",{value:void 0},"实线",-1),e.createElementVNode("option",{value:"3,3"},"短虚线",-1),e.createElementVNode("option",{value:"5,5"},"中虚线",-1),e.createElementVNode("option",{value:"8,4"},"长虚线",-1)]),544),[[e.vModelSelect,t.config.parentChildStyle.dashArray]])])]),e.createElementVNode("div",qc,[n[77]||(n[77]=e.createElementVNode("h4",null,"预设主题",-1)),e.createElementVNode("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,(a,l)=>(e.openBlock(),e.createElementBlock("button",{key:l,onClick:u=>t.applyTheme(l),class:e.normalizeClass(["theme-btn",{active:t.isCurrentTheme(l)}])},e.toDisplayString(t.getThemeName(l)),11,Kc))),128))])]),e.createElementVNode("div",Qc,[e.createElementVNode("div",Xc,[e.createElementVNode("button",{onClick:n[39]||(n[39]=(...a)=>t.resetConfig&&t.resetConfig(...a)),class:"reset-btn"},"重置为默认"),e.createElementVNode("button",{onClick:n[40]||(n[40]=(...a)=>t.exportConfig&&t.exportConfig(...a)),class:"export-btn"},"导出配置"),e.createElementVNode("button",{onClick:n[41]||(n[41]=a=>t.showImportDialog=!0),class:"import-btn"},"导入配置")])])]),t.showImportDialog?(e.openBlock(),e.createElementBlock("div",{key:0,class:"import-dialog-overlay",onClick:n[46]||(n[46]=a=>t.showImportDialog=!1)},[e.createElementVNode("div",{class:"import-dialog",onClick:n[45]||(n[45]=e.withModifiers(()=>{},["stop"]))},[n[78]||(n[78]=e.createElementVNode("h4",null,"导入配置",-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[42]||(n[42]=a=>t.importText=a),placeholder:"粘贴配置JSON...",class:"import-textarea"},null,512),[[e.vModelText,t.importText]]),e.createElementVNode("div",eu,[e.createElementVNode("button",{onClick:n[43]||(n[43]=(...a)=>t.importConfig&&t.importConfig(...a)),class:"confirm-btn"},"导入"),e.createElementVNode("button",{onClick:n[44]||(n[44]=a=>t.showImportDialog=!1),class:"cancel-btn"},"取消")])])])):e.createCommentVNode("",!0)])}const nu=Ve(nc,[["render",tu],["__scopeId","data-v-4beccbb2"]]),au=t=>{t.component("Gantt",cn),t.component("Vue3Gantt",cn)},ou="1.0.0";ye.DatePicker=Bn,ye.Gantt=cn,ye.GanttConfigPanel=On,ye.GanttThemeSelector=Zd,ye.LanguageSelector=tc,ye.LinkConfigPanel=nu,ye.LinkPathType=Ne,ye.LinkThemes=Ct,ye.LinkType=de,ye.TaskType=wt,ye.default=cn,ye.ganttThemes=He,ye.install=au,ye.linkDataManager=Qt,ye.mutations=ce,ye.setLocale=Ln,ye.store=T,ye.useI18n=tt,ye.useLinkConfig=Tt,ye.version=ou,Object.defineProperties(ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
122
+ `,document.head.appendChild(C),console.log("✅ Theme styles injected successfully"),console.log("📊 Injected CSS length:",C.textContent.length,"characters"),document.getElementById("gantt-theme-styles")?console.log("✅ Style element found in DOM"):console.error("❌ Style element not found in DOM")},O=()=>{console.log("🚀 initTheme called"),console.log("📦 ganttContainer:",a),console.log("📦 ganttContainer.value:",a==null?void 0:a.value);try{const D=localStorage.getItem("gantt-theme");D&&He.find(V=>V.id===D)&&(o.value=D,console.log("💾 Loaded theme from localStorage:",D))}catch(D){console.warn("Failed to load theme from localStorage:",D)}console.log("🎨 Current theme:",o.value),h(o.value);let S=null;if(a&&a.value?(S=a.value,console.log("✅ Using injected container reference")):(S=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),console.log("🔍 Using DOM query fallback, found:",S)),S){S.setAttribute("data-gantt-theme",o.value),console.log("✅ Container attribute set to:",o.value);const D=document.querySelector(".page");D&&(D.setAttribute("data-gantt-theme",o.value),console.log("✅ Page element attribute set"))}else console.warn("⚠️ No container found during initialization"),setTimeout(()=>{console.log("🔄 Retrying theme initialization..."),O()},500);console.log("✅ Theme initialization completed")};return e.watchEffect(()=>{a&&a.value&&e.nextTick(()=>{O()})}),e.onMounted(()=>{document.addEventListener("click",F),(!a||!a.value)&&setTimeout(()=>{O()},200)}),e.onUnmounted(()=>{document.removeEventListener("click",F),y()}),{t,availableThemes:i,isOpen:n,currentTheme:o,previewTheme:r,fileInput:s,toggleSelector:l,closeSelector:u,selectTheme:c,onPreviewTheme:m,onCancelPreview:y,exportConfig:w,importConfig:I,handleFileImport:g}}}),Cc={class:"gantt-theme-selector"},Sc={class:"theme-dropdown-header"},Tc={class:"theme-grid"},vc=["onClick","onMouseenter"],$c={class:"theme-preview-content"},Dc={class:"theme-info"},Ec={class:"theme-name"},Mc={class:"theme-description"},Vc={class:"theme-status"},Nc={key:0,class:"status-badge current"},_c={key:1,class:"status-badge preview"},Ac={class:"theme-actions"};function Bc(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Cc,[e.createElementVNode("div",{class:e.normalizeClass(["theme-selector-trigger",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...a)=>t.toggleSelector&&t.toggleSelector(...a))},[n[8]||(n[8]=e.createElementVNode("div",{class:"theme-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"})])],-1)),n[9]||(n[9]=e.createElementVNode("span",{class:"theme-text"},"主题",-1)),e.createElementVNode("div",{class:e.normalizeClass(["theme-arrow",{rotated:t.isOpen}])},n[7]||(n[7]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M7 10l5 5 5-5z"})],-1)]),2)],2),e.withDirectives(e.createElementVNode("div",{class:"theme-dropdown",onClick:n[5]||(n[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Sc,[n[11]||(n[11]=e.createElementVNode("h3",null,"选择主题",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...a)=>t.closeSelector&&t.closeSelector(...a))},n[10]||(n[10]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))]),e.createElementVNode("div",Tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableThemes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["theme-card",{active:t.currentTheme===a.id,preview:t.previewTheme===a.id}]),onClick:l=>t.selectTheme(a.id),onMouseenter:l=>t.onPreviewTheme(a.id),onMouseleave:n[2]||(n[2]=(...l)=>t.onCancelPreview&&t.onCancelPreview(...l))},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({backgroundColor:a.preview})},[e.createElementVNode("div",$c,[e.createElementVNode("div",{class:"preview-header",style:e.normalizeStyle({backgroundColor:a.preview})},null,4),n[12]||(n[12]=e.createElementVNode("div",{class:"preview-body"},[e.createElementVNode("div",{class:"preview-bar"}),e.createElementVNode("div",{class:"preview-bar short"}),e.createElementVNode("div",{class:"preview-bar medium"})],-1))])],4),e.createElementVNode("div",Dc,[e.createElementVNode("h4",Ec,e.toDisplayString(t.t(a.nameKey)),1),e.createElementVNode("p",Mc,e.toDisplayString(t.t(a.descKey)),1)]),e.createElementVNode("div",Vc,[t.currentTheme===a.id?(e.openBlock(),e.createElementBlock("div",Nc,"当前")):t.previewTheme===a.id?(e.openBlock(),e.createElementBlock("div",_c,"预览")):e.createCommentVNode("",!0)])],42,vc))),128))]),e.createElementVNode("div",Ac,[e.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...a)=>t.exportConfig&&t.exportConfig(...a))},n[13]||(n[13]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),e.createTextVNode(" 导出配置 ")])),e.createElementVNode("button",{class:"action-btn",onClick:n[4]||(n[4]=(...a)=>t.importConfig&&t.importConfig(...a))},n[14]||(n[14]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),e.createTextVNode(" 导入配置 ")]))])],512),[[e.vShow,t.isOpen]]),e.createElementVNode("input",{ref:"fileInput",type:"file",accept:".json",style:{display:"none"},onChange:n[6]||(n[6]=(...a)=>t.handleFileImport&&t.handleFileImport(...a))},null,544)])}const Lc=Se(wc,[["render",Bc],["__scopeId","data-v-4b6192d6"]]),Fc=e.defineComponent({name:"LinkConfigPanel",emits:["close","configChange"],setup(t,{emit:n}){const{config:o,setTheme:r,updateConfig:s,reset:i,exportConfig:a,importConfig:l,themes:u}=Ct(),c=e.ref(!1),m=e.ref(""),y=[{value:Ve.STRAIGHT,name:"直线",preview:"M 10 20 L 50 20"},{value:Ve.BEZIER,name:"贝塞尔曲线",preview:"M 10 20 C 25 20 35 20 50 20"},{value:Ve.RIGHT_ANGLE,name:"直角连线",preview:"M 10 20 L 30 20 L 30 30 L 50 30"}],w={default:"默认",business:"商务",modern:"现代",minimal:"简约",colorful:"彩色"};return{config:o,pathTypes:y,themes:u,showImportDialog:c,importText:m,getThemeName:V=>w[V]||V,isCurrentTheme:V=>{const C=u[V];return C?Object.keys(C).every(K=>{const q=C[K],j=o[K];return typeof q=="object"&&typeof j=="object"?JSON.stringify(q)===JSON.stringify(j):q===j}):!1},updateConfig:()=>{s(o),n("configChange",o)},applyTheme:V=>{r(V),n("configChange",o)},resetConfig:()=>{i(),n("configChange",o)},exportConfig:()=>{const V=a();navigator.clipboard.writeText(V).then(()=>{alert("配置已复制到剪贴板")}).catch(()=>{const C=document.createElement("textarea");C.value=V,document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C),alert("配置已复制到剪贴板")})},importConfig:()=>{try{l(m.value)?(c.value=!1,m.value="",n("configChange",o),alert("配置导入成功")):alert("配置格式错误,请检查JSON格式")}catch(V){alert("配置导入失败:"+V)}}}}}),Ic={class:"link-config-panel"},Hc={class:"panel-header"},Rc={class:"panel-content"},zc={class:"config-section"},Yc={class:"path-type-selector"},Oc=["value","onUpdate:modelValue"],Pc={class:"path-preview"},xc={width:"60",height:"40",viewBox:"0 0 60 40"},Zc=["d"],Gc={class:"config-section"},Wc={class:"config-row"},jc={class:"config-row"},Uc={class:"value"},qc={class:"config-row"},Jc={key:0,class:"config-section"},Kc={class:"config-row"},Qc={class:"value"},Xc={key:1,class:"config-section"},eu={class:"config-row"},tu={class:"value"},nu={class:"config-row"},ou={key:0,class:"config-row"},au={class:"value"},ru={class:"config-section"},su={class:"config-row"},iu={key:0},lu={class:"config-row"},du={class:"value"},cu={class:"config-row"},uu=["placeholder"],fu={class:"config-section"},hu={class:"config-row"},mu={key:0},pu={class:"config-row"},gu={class:"value"},yu={class:"config-section"},ku={class:"config-row"},bu={key:0},wu={class:"config-row"},Cu={class:"config-row"},Su={class:"value"},Tu={class:"config-section"},vu={class:"config-row"},$u={class:"config-row"},Du={class:"value"},Eu={class:"config-row"},Mu={class:"config-section"},Vu={class:"theme-selector"},Nu=["onClick"],_u={class:"config-section"},Au={class:"action-buttons"},Bu={class:"import-actions"};function Lu(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("div",Hc,[n[47]||(n[47]=e.createElementVNode("h3",null,"连线配置",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=a=>t.$emit("close")),title:"关闭"},"×")]),e.createElementVNode("div",Rc,[e.createElementVNode("div",zc,[n[48]||(n[48]=e.createElementVNode("h4",null,"路径类型",-1)),e.createElementVNode("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,a=>(e.openBlock(),e.createElementBlock("label",{key:a.value,class:e.normalizeClass(["path-type-option",{active:t.config.pathType===a.value}])},[e.withDirectives(e.createElementVNode("input",{type:"radio",value:a.value,"onUpdate:modelValue":l=>t.config.pathType=l,onChange:n[1]||(n[1]=(...l)=>t.updateConfig&&t.updateConfig(...l))},null,40,Oc),[[e.vModelRadio,t.config.pathType]]),e.createElementVNode("div",Pc,[(e.openBlock(),e.createElementBlock("svg",xc,[e.createElementVNode("path",{d:a.preview,stroke:"#3498db","stroke-width":"2",fill:"none"},null,8,Zc)]))]),e.createElementVNode("span",null,e.toDisplayString(a.name),1)],2))),128))])]),e.createElementVNode("div",Gc,[n[53]||(n[53]=e.createElementVNode("h4",null,"基础样式",-1)),e.createElementVNode("div",Wc,[n[49]||(n[49]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[2]||(n[2]=a=>t.config.color=a),onChange:n[3]||(n[3]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.color]])]),e.createElementVNode("div",jc,[n[50]||(n[50]=e.createElementVNode("label",null,"线宽:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":n[4]||(n[4]=a=>t.config.width=a),onInput:n[5]||(n[5]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.width,void 0,{number:!0}]]),e.createElementVNode("span",Uc,e.toDisplayString(t.config.width)+"px",1)]),e.createElementVNode("div",qc,[n[52]||(n[52]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[6]||(n[6]=a=>t.config.dashArray=a),onChange:n[7]||(n[7]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"select-input"},n[51]||(n[51]=[e.createElementVNode("option",{value:void 0},"实线",-1),e.createElementVNode("option",{value:"3,3"},"短虚线",-1),e.createElementVNode("option",{value:"5,5"},"中虚线",-1),e.createElementVNode("option",{value:"8,4"},"长虚线",-1),e.createElementVNode("option",{value:"2,2,8,2"},"点划线",-1)]),544),[[e.vModelSelect,t.config.dashArray]])])]),t.config.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",Jc,[n[55]||(n[55]=e.createElementVNode("h4",null,"贝塞尔曲线配置",-1)),e.createElementVNode("div",Kc,[n[54]||(n[54]=e.createElementVNode("label",null,"弯曲度:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0.1",max:"1",step:"0.1","onUpdate:modelValue":n[8]||(n[8]=a=>t.config.bezierCurvature=a),onInput:n[9]||(n[9]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.bezierCurvature,void 0,{number:!0}]]),e.createElementVNode("span",Qc,e.toDisplayString(t.config.bezierCurvature),1)])])):e.createCommentVNode("",!0),t.config.pathType==="right-angle"?(e.openBlock(),e.createElementBlock("div",Xc,[n[59]||(n[59]=e.createElementVNode("h4",null,"直角连线配置",-1)),e.createElementVNode("div",eu,[n[56]||(n[56]=e.createElementVNode("label",null,"偏移距离:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"10",max:"80",step:"5","onUpdate:modelValue":n[10]||(n[10]=a=>t.config.rightAngleOffset=a),onInput:n[11]||(n[11]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.rightAngleOffset,void 0,{number:!0}]]),e.createElementVNode("span",tu,e.toDisplayString(t.config.rightAngleOffset)+"px",1)]),e.createElementVNode("div",nu,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=a=>t.config.smoothCorners=a),onChange:n[13]||(n[13]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.smoothCorners]]),n[57]||(n[57]=e.createTextVNode(" 平滑转角 "))])]),t.config.smoothCorners?(e.openBlock(),e.createElementBlock("div",ou,[n[58]||(n[58]=e.createElementVNode("label",null,"转角半径:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0",max:"15",step:"1","onUpdate:modelValue":n[14]||(n[14]=a=>t.config.cornerRadius=a),onInput:n[15]||(n[15]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.cornerRadius,void 0,{number:!0}]]),e.createElementVNode("span",au,e.toDisplayString(t.config.cornerRadius)+"px",1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ru,[n[63]||(n[63]=e.createElementVNode("h4",null,"箭头配置",-1)),e.createElementVNode("div",su,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[16]||(n[16]=a=>t.config.showArrow=a),onChange:n[17]||(n[17]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.showArrow]]),n[60]||(n[60]=e.createTextVNode(" 显示箭头 "))])]),t.config.showArrow?(e.openBlock(),e.createElementBlock("div",iu,[e.createElementVNode("div",lu,[n[61]||(n[61]=e.createElementVNode("label",null,"箭头大小:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"4",max:"16",step:"1","onUpdate:modelValue":n[18]||(n[18]=a=>t.config.arrowSize=a),onInput:n[19]||(n[19]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.arrowSize,void 0,{number:!0}]]),e.createElementVNode("span",du,e.toDisplayString(t.config.arrowSize)+"px",1)]),e.createElementVNode("div",cu,[n[62]||(n[62]=e.createElementVNode("label",null,"箭头颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[20]||(n[20]=a=>t.config.arrowColor=a),onChange:n[21]||(n[21]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input",placeholder:t.config.color},null,40,uu),[[e.vModelText,t.config.arrowColor]]),e.createElementVNode("button",{onClick:n[22]||(n[22]=a=>{t.config.arrowColor=t.config.color,t.updateConfig()}),class:"sync-btn",title:"与线条颜色同步"}," 同步 ")])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",fu,[n[67]||(n[67]=e.createElementVNode("h4",null,"虚线动画",-1)),e.createElementVNode("div",hu,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=a=>t.config.enableDashAnimation=a),onChange:n[24]||(n[24]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.enableDashAnimation]]),n[64]||(n[64]=e.createTextVNode(" 启用虚线流动动画 "))])]),t.config.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",mu,[e.createElementVNode("div",pu,[n[65]||(n[65]=e.createElementVNode("label",null,"动画速度:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0.2",max:"3",step:"0.2","onUpdate:modelValue":n[25]||(n[25]=a=>t.config.dashAnimationSpeed=a),onInput:n[26]||(n[26]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.dashAnimationSpeed,void 0,{number:!0}]]),e.createElementVNode("span",gu,e.toDisplayString(t.config.dashAnimationSpeed)+"s",1)]),n[66]||(n[66]=e.createElementVNode("div",{class:"config-info"},[e.createElementVNode("small",null,"💡 虚线动画只在连线设置为虚线样式时显示")],-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",yu,[n[71]||(n[71]=e.createElementVNode("h4",null,"标签配置",-1)),e.createElementVNode("div",ku,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=a=>t.config.showLabels=a),onChange:n[28]||(n[28]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.showLabels]]),n[68]||(n[68]=e.createTextVNode(" 显示标签 "))])]),t.config.showLabels?(e.openBlock(),e.createElementBlock("div",bu,[e.createElementVNode("div",wu,[n[69]||(n[69]=e.createElementVNode("label",null,"标签颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[29]||(n[29]=a=>t.config.labelColor=a),onChange:n[30]||(n[30]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.labelColor]])]),e.createElementVNode("div",Cu,[n[70]||(n[70]=e.createElementVNode("label",null,"字体大小:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"8",max:"16",step:"1","onUpdate:modelValue":n[31]||(n[31]=a=>t.config.labelFontSize=a),onInput:n[32]||(n[32]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.labelFontSize,void 0,{number:!0}]]),e.createElementVNode("span",Su,e.toDisplayString(t.config.labelFontSize)+"px",1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Tu,[n[76]||(n[76]=e.createElementVNode("h4",null,"父子关系样式",-1)),e.createElementVNode("div",vu,[n[72]||(n[72]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[33]||(n[33]=a=>t.config.parentChildStyle.color=a),onChange:n[34]||(n[34]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.parentChildStyle.color]])]),e.createElementVNode("div",$u,[n[73]||(n[73]=e.createElementVNode("label",null,"线宽:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"1",max:"3",step:"0.5","onUpdate:modelValue":n[35]||(n[35]=a=>t.config.parentChildStyle.width=a),onInput:n[36]||(n[36]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.parentChildStyle.width,void 0,{number:!0}]]),e.createElementVNode("span",Du,e.toDisplayString(t.config.parentChildStyle.width)+"px",1)]),e.createElementVNode("div",Eu,[n[75]||(n[75]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[37]||(n[37]=a=>t.config.parentChildStyle.dashArray=a),onChange:n[38]||(n[38]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"select-input"},n[74]||(n[74]=[e.createElementVNode("option",{value:void 0},"实线",-1),e.createElementVNode("option",{value:"3,3"},"短虚线",-1),e.createElementVNode("option",{value:"5,5"},"中虚线",-1),e.createElementVNode("option",{value:"8,4"},"长虚线",-1)]),544),[[e.vModelSelect,t.config.parentChildStyle.dashArray]])])]),e.createElementVNode("div",Mu,[n[77]||(n[77]=e.createElementVNode("h4",null,"预设主题",-1)),e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,(a,l)=>(e.openBlock(),e.createElementBlock("button",{key:l,onClick:u=>t.applyTheme(l),class:e.normalizeClass(["theme-btn",{active:t.isCurrentTheme(l)}])},e.toDisplayString(t.getThemeName(l)),11,Nu))),128))])]),e.createElementVNode("div",_u,[e.createElementVNode("div",Au,[e.createElementVNode("button",{onClick:n[39]||(n[39]=(...a)=>t.resetConfig&&t.resetConfig(...a)),class:"reset-btn"},"重置为默认"),e.createElementVNode("button",{onClick:n[40]||(n[40]=(...a)=>t.exportConfig&&t.exportConfig(...a)),class:"export-btn"},"导出配置"),e.createElementVNode("button",{onClick:n[41]||(n[41]=a=>t.showImportDialog=!0),class:"import-btn"},"导入配置")])])]),t.showImportDialog?(e.openBlock(),e.createElementBlock("div",{key:0,class:"import-dialog-overlay",onClick:n[46]||(n[46]=a=>t.showImportDialog=!1)},[e.createElementVNode("div",{class:"import-dialog",onClick:n[45]||(n[45]=e.withModifiers(()=>{},["stop"]))},[n[78]||(n[78]=e.createElementVNode("h4",null,"导入配置",-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[42]||(n[42]=a=>t.importText=a),placeholder:"粘贴配置JSON...",class:"import-textarea"},null,512),[[e.vModelText,t.importText]]),e.createElementVNode("div",Bu,[e.createElementVNode("button",{onClick:n[43]||(n[43]=(...a)=>t.importConfig&&t.importConfig(...a)),class:"confirm-btn"},"导入"),e.createElementVNode("button",{onClick:n[44]||(n[44]=a=>t.showImportDialog=!1),class:"cancel-btn"},"取消")])])])):e.createCommentVNode("",!0)])}const Fu=Se(Fc,[["render",Lu],["__scopeId","data-v-f8062a27"]]),Iu=t=>{t.component("Gantt",dn),t.component("Vue3Gantt",dn)},Hu="1.0.0";ge.DatePicker=Ln,ge.Gantt=dn,ge.GanttConfigPanel=Pn,ge.GanttThemeSelector=Lc,ge.LanguageSelector=On,ge.LinkConfigPanel=Fu,ge.LinkPathType=Ve,ge.LinkThemes=tt,ge.LinkType=de,ge.TaskType=wt,ge.default=dn,ge.detectBrowserLocale=hn,ge.ganttThemes=He,ge.install=Iu,ge.linkDataManager=Kt,ge.mutations=ce,ge.setLocale=Bn,ge.store=v,ge.useI18n=ze,ge.useLinkConfig=Ct,ge.version=Hu,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
123
123
  //# sourceMappingURL=vue3-gantt.umd.js.map