Files
Splavarji_Wiki/.obsidian/plugins/tasknotes/main.js
T
2026-09-25 17:45:32 +02:00

3683 lines
4.3 MiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var vFe=Object.create;var Fg=Object.defineProperty;var oK=Object.getOwnPropertyDescriptor;var kFe=Object.getOwnPropertyNames;var TFe=Object.getPrototypeOf,bFe=Object.prototype.hasOwnProperty;var lK=n=>{throw TypeError(n)};var wFe=(n,e,t)=>e in n?Fg(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var y=(n,e)=>()=>(n&&(e=n(n=0)),e);var te=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Xe=(n,e)=>{for(var t in e)Fg(n,t,{get:e[t],enumerable:!0})},cK=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of kFe(e))!bFe.call(n,a)&&a!==t&&Fg(n,a,{get:()=>e[a],enumerable:!(r=oK(e,a))||r.enumerable});return n};var tt=(n,e,t)=>(t=n!=null?vFe(TFe(n)):{},cK(e||!n||!n.__esModule?Fg(t,"default",{value:n,enumerable:!0}):t,n)),BP=n=>cK(Fg({},"__esModule",{value:!0}),n),Qe=(n,e,t,r)=>{for(var a=r>1?void 0:r?oK(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(a=(r?s(e,t,a):s(a))||a);return r&&a&&Fg(e,t,a),a};var z=(n,e,t)=>wFe(n,typeof e!="symbol"?e+"":e,t),dK=(n,e,t)=>e.has(n)||lK("Cannot "+t);var un=(n,e,t)=>(dK(n,e,"read from private field"),t?t.call(n):e.get(n)),Al=(n,e,t)=>e.has(n)?lK("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),Us=(n,e,t,r)=>(dK(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var SFe,Aut,jP,uK,g1,y1,CFe,pK,Mut,xFe,EFe,Iut,v1,Lg=y(()=>{SFe=Math.pow(10,8)*24*60*60*1e3,Aut=-SFe,jP=6048e5,uK=864e5,g1=6e4,y1=36e5,CFe=3600,pK=CFe*24,Mut=pK*7,xFe=pK*365.2425,EFe=xFe/12,Iut=EFe*3,v1=Symbol.for("constructDateFrom")});function Tn(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&v1 in n?n[v1](e):n instanceof Date?new n.constructor(e):new Date(e)}var Ho=y(()=>{Lg()});function ct(n,e){return Tn(e||n,n)}var pn=y(()=>{Ho()});function Jm(n,e,t){let r=ct(n,t==null?void 0:t.in);return isNaN(e)?Tn((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}var $P=y(()=>{Ho();pn()});function UP(n,e,t){let r=ct(n,t==null?void 0:t.in);if(isNaN(e))return Tn((t==null?void 0:t.in)||n,NaN);if(!e)return r;let a=r.getDate(),i=Tn((t==null?void 0:t.in)||n,r.getTime());i.setMonth(r.getMonth()+e+1,0);let s=i.getDate();return a>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}var k1=y(()=>{Ho();pn()});var mK=y(()=>{});var fK=y(()=>{});var hK=y(()=>{});var gK=y(()=>{});var yK=y(()=>{});var vK=y(()=>{});var kK=y(()=>{});function Ml(){return DFe}var DFe,Og=y(()=>{DFe={}});function ni(n,e){var o,l,c,d,u,p,m,f;let t=Ml(),r=(f=(m=(d=(c=e==null?void 0:e.weekStartsOn)!=null?c:(l=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:t.weekStartsOn)!=null?m:(p=(u=t.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?f:0,a=ct(n,e==null?void 0:e.in),i=a.getDay(),s=(i<r?7:0)+i-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}var zg=y(()=>{Og();pn()});function Xm(n,e){return ni(n,{...e,weekStartsOn:1})}var ib=y(()=>{zg()});function HP(n,e){let t=ct(n,e==null?void 0:e.in),r=t.getFullYear(),a=Tn(t,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=Xm(a),s=Tn(t,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let o=Xm(s);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}var VP=y(()=>{Ho();ib();pn()});function T1(n){let e=ct(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}var TK=y(()=>{pn()});function WP(n,...e){let t=Tn.bind(null,n||e.find(r=>typeof r=="object"));return e.map(t)}var b1=y(()=>{Ho()});function Vo(n,e){let t=ct(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}var qP=y(()=>{pn()});function bK(n,e,t){let[r,a]=WP(t==null?void 0:t.in,n,e),i=Vo(r),s=Vo(a),o=+i-T1(i),l=+s-T1(s);return Math.round((o-l)/uK)}var w1=y(()=>{TK();b1();Lg();qP()});function wK(n,e){let t=HP(n,e),r=Tn((e==null?void 0:e.in)||n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Xm(r)}var S1=y(()=>{Ho();VP();ib()});var SK=y(()=>{});var CK=y(()=>{});var xK=y(()=>{});var EK=y(()=>{});var DK=y(()=>{});function PK(n,e,t){return Jm(n,e*7,t)}var AK=y(()=>{$P()});function MK(n,e,t){return UP(n,e*12,t)}var IK=y(()=>{k1()});var NK=y(()=>{});var RK=y(()=>{});var _K=y(()=>{});var FK=y(()=>{});var LK=y(()=>{});var OK=y(()=>{});var zK=y(()=>{});var BK=y(()=>{});var jK=y(()=>{});var $K=y(()=>{});function C1(n,e,t){let[r,a]=WP(t==null?void 0:t.in,n,e);return+Vo(r)==+Vo(a)}var UK=y(()=>{b1();qP()});function HK(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}var x1=y(()=>{});function ta(n){return!(!HK(n)&&typeof n!="number"||isNaN(+ct(n)))}var E1=y(()=>{x1();pn()});var VK=y(()=>{});var WK=y(()=>{});var qK=y(()=>{});var GK=y(()=>{});var YK=y(()=>{});var KK=y(()=>{});var ZK=y(()=>{});var QK=y(()=>{});var JK=y(()=>{});var XK=y(()=>{});var e7=y(()=>{});var t7=y(()=>{});var r7=y(()=>{});var n7=y(()=>{});function sb(n,e){let t=ct(n,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}var a7=y(()=>{pn()});function GP(n,e){let t=ct(n,e==null?void 0:e.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}var i7=y(()=>{pn()});var s7=y(()=>{});var o7=y(()=>{});var l7=y(()=>{});var c7=y(()=>{});var d7=y(()=>{});var u7=y(()=>{});var p7=y(()=>{});var m7=y(()=>{});var f7=y(()=>{});var h7=y(()=>{});var g7=y(()=>{});var y7=y(()=>{});var v7=y(()=>{});var k7=y(()=>{});function YP(n,e){let t=ct(n,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}var T7=y(()=>{pn()});var b7=y(()=>{});function w7(n,e){let t=ct(n,e==null?void 0:e.in),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}var S7=y(()=>{pn()});function KP(n,e){let t=ct(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}var D1=y(()=>{pn()});var C7=y(()=>{});var x7=y(()=>{});var E7=y(()=>{});var D7=y(()=>{});function Bg(n,e){var o,l,c,d,u,p,m,f;let t=Ml(),r=(f=(m=(d=(c=e==null?void 0:e.weekStartsOn)!=null?c:(l=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:t.weekStartsOn)!=null?m:(p=(u=t.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)!=null?f:0,a=ct(n,e==null?void 0:e.in),i=a.getDay(),s=(i<r?-7:0)+6-(i-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}var P7=y(()=>{Og();pn()});var A7=y(()=>{});var M7=y(()=>{});var I7=y(()=>{});var N7=y(()=>{});var R7=y(()=>{});var _7=y(()=>{});var F7=y(()=>{});var L7=y(()=>{});var PFe,O7,z7=y(()=>{PFe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},O7=(n,e,t)=>{let r,a=PFe[n];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r}});function ZP(n){return(e={})=>{let t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}var B7=y(()=>{});var AFe,MFe,IFe,j7,$7=y(()=>{B7();AFe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},MFe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},IFe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},j7={date:ZP({formats:AFe,defaultWidth:"full"}),time:ZP({formats:MFe,defaultWidth:"full"}),dateTime:ZP({formats:IFe,defaultWidth:"full"})}});var NFe,U7,H7=y(()=>{NFe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},U7=(n,e,t,r)=>NFe[n]});function jg(n){return(e,t)=>{let r=t!=null&&t.context?String(t.context):"standalone",a;if(r==="formatting"&&n.formattingValues){let s=n.defaultFormattingWidth||n.defaultWidth,o=t!=null&&t.width?String(t.width):s;a=n.formattingValues[o]||n.formattingValues[s]}else{let s=n.defaultWidth,o=t!=null&&t.width?String(t.width):n.defaultWidth;a=n.values[o]||n.values[s]}let i=n.argumentCallback?n.argumentCallback(e):e;return a[i]}}var V7=y(()=>{});var RFe,_Fe,FFe,LFe,OFe,zFe,BFe,W7,q7=y(()=>{V7();RFe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_Fe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},FFe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},LFe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},OFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zFe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},BFe=(n,e)=>{let t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},W7={ordinalNumber:BFe,era:jg({values:RFe,defaultWidth:"wide"}),quarter:jg({values:_Fe,defaultWidth:"wide",argumentCallback:n=>n-1}),month:jg({values:FFe,defaultWidth:"wide"}),day:jg({values:LFe,defaultWidth:"wide"}),dayPeriod:jg({values:OFe,defaultWidth:"wide",formattingValues:zFe,defaultFormattingWidth:"wide"})}});function $g(n){return(e,t={})=>{let r=t.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],i=e.match(a);if(!i)return null;let s=i[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?$Fe(o,u=>u.test(s)):jFe(o,u=>u.test(s)),c;c=n.valueCallback?n.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;let d=e.slice(s.length);return{value:c,rest:d}}}function jFe(n,e){for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function $Fe(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}var G7=y(()=>{});function Y7(n){return(e,t={})=>{let r=e.match(n.matchPattern);if(!r)return null;let a=r[0],i=e.match(n.parsePattern);if(!i)return null;let s=n.valueCallback?n.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;let o=e.slice(a.length);return{value:s,rest:o}}}var K7=y(()=>{});var UFe,HFe,VFe,WFe,qFe,GFe,YFe,KFe,ZFe,QFe,JFe,XFe,Z7,Q7=y(()=>{G7();K7();UFe=/^(\d+)(th|st|nd|rd)?/i,HFe=/\d+/i,VFe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},WFe={any:[/^b/i,/^(a|c)/i]},qFe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GFe={any:[/1/i,/2/i,/3/i,/4/i]},YFe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KFe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ZFe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},QFe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},JFe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},XFe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Z7={ordinalNumber:Y7({matchPattern:UFe,parsePattern:HFe,valueCallback:n=>parseInt(n,10)}),era:$g({matchPatterns:VFe,defaultMatchWidth:"wide",parsePatterns:WFe,defaultParseWidth:"any"}),quarter:$g({matchPatterns:qFe,defaultMatchWidth:"wide",parsePatterns:GFe,defaultParseWidth:"any",valueCallback:n=>n+1}),month:$g({matchPatterns:YFe,defaultMatchWidth:"wide",parsePatterns:KFe,defaultParseWidth:"any"}),day:$g({matchPatterns:ZFe,defaultMatchWidth:"wide",parsePatterns:QFe,defaultParseWidth:"any"}),dayPeriod:$g({matchPatterns:JFe,defaultMatchWidth:"any",parsePatterns:XFe,defaultParseWidth:"any"})}});var P1,J7=y(()=>{z7();$7();H7();q7();Q7();P1={code:"en-US",formatDistance:O7,formatLong:j7,formatRelative:U7,localize:W7,match:Z7,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var X7=y(()=>{J7()});function eZ(n,e){let t=ct(n,e==null?void 0:e.in);return bK(t,KP(t))+1}var A1=y(()=>{w1();D1();pn()});function tZ(n,e){let t=ct(n,e==null?void 0:e.in),r=+Xm(t)-+wK(t);return Math.round(r/jP)+1}var M1=y(()=>{Lg();ib();S1();pn()});function QP(n,e){var d,u,p,m,f,h,g,v;let t=ct(n,e==null?void 0:e.in),r=t.getFullYear(),a=Ml(),i=(v=(g=(m=(p=e==null?void 0:e.firstWeekContainsDate)!=null?p:(u=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)!=null?m:a.firstWeekContainsDate)!=null?g:(h=(f=a.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)!=null?v:1,s=Tn((e==null?void 0:e.in)||n,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let o=ni(s,e),l=Tn((e==null?void 0:e.in)||n,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);let c=ni(l,e);return+t>=+o?r+1:+t>=+c?r:r-1}var JP=y(()=>{Og();Ho();zg();pn()});function rZ(n,e){var o,l,c,d,u,p,m,f;let t=Ml(),r=(f=(m=(d=(c=e==null?void 0:e.firstWeekContainsDate)!=null?c:(l=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)!=null?d:t.firstWeekContainsDate)!=null?m:(p=(u=t.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)!=null?f:1,a=QP(n,e),i=Tn((e==null?void 0:e.in)||n,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),ni(i,e)}var I1=y(()=>{Og();Ho();JP();zg()});function nZ(n,e){let t=ct(n,e==null?void 0:e.in),r=+ni(t,e)-+rZ(t,e);return Math.round(r/jP)+1}var N1=y(()=>{Lg();zg();I1();pn()});function ar(n,e){let t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}var R1=y(()=>{});var sd,aZ=y(()=>{R1();sd={y(n,e){let t=n.getFullYear(),r=t>0?t:1-t;return ar(e==="yy"?r%100:r,e.length)},M(n,e){let t=n.getMonth();return e==="M"?String(t+1):ar(t+1,2)},d(n,e){return ar(n.getDate(),e.length)},a(n,e){let t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return ar(n.getHours()%12||12,e.length)},H(n,e){return ar(n.getHours(),e.length)},m(n,e){return ar(n.getMinutes(),e.length)},s(n,e){return ar(n.getSeconds(),e.length)},S(n,e){let t=e.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,t-3));return ar(a,e.length)}}});function iZ(n,e=""){let t=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),i=r%60;return i===0?t+String(a):t+String(a)+e+ar(i,2)}function sZ(n,e){return n%60===0?(n>0?"-":"+")+ar(Math.abs(n)/60,2):ef(n,e)}function ef(n,e=""){let t=n>0?"-":"+",r=Math.abs(n),a=ar(Math.trunc(r/60),2),i=ar(r%60,2);return t+a+e+i}var Ug,_1,oZ=y(()=>{A1();M1();VP();N1();JP();R1();aZ();Ug={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_1={G:function(n,e,t){let r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){let r=n.getFullYear(),a=r>0?r:1-r;return t.ordinalNumber(a,{unit:"year"})}return sd.y(n,e)},Y:function(n,e,t,r){let a=QP(n,r),i=a>0?a:1-a;if(e==="YY"){let s=i%100;return ar(s,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):ar(i,e.length)},R:function(n,e){let t=HP(n);return ar(t,e.length)},u:function(n,e){let t=n.getFullYear();return ar(t,e.length)},Q:function(n,e,t){let r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return ar(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){let r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return ar(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){let r=n.getMonth();switch(e){case"M":case"MM":return sd.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){let r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return ar(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){let a=nZ(n,r);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):ar(a,e.length)},I:function(n,e,t){let r=tZ(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):ar(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):sd.d(n,e)},D:function(n,e,t){let r=eZ(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):ar(r,e.length)},E:function(n,e,t){let r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return ar(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){let a=n.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return ar(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(n,e,t){let r=n.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return ar(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){let a=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,e,t){let r=n.getHours(),a;switch(r===12?a=Ug.noon:r===0?a=Ug.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,e,t){let r=n.getHours(),a;switch(r>=17?a=Ug.evening:r>=12?a=Ug.afternoon:r>=4?a=Ug.morning:a=Ug.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return sd.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):sd.H(n,e)},K:function(n,e,t){let r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):ar(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):ar(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):sd.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):sd.s(n,e)},S:function(n,e){return sd.S(n,e)},X:function(n,e,t){let r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return sZ(r);case"XXXX":case"XX":return ef(r);case"XXXXX":case"XXX":default:return ef(r,":")}},x:function(n,e,t){let r=n.getTimezoneOffset();switch(e){case"x":return sZ(r);case"xxxx":case"xx":return ef(r);case"xxxxx":case"xxx":default:return ef(r,":")}},O:function(n,e,t){let r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+iZ(r,":");case"OOOO":default:return"GMT"+ef(r,":")}},z:function(n,e,t){let r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+iZ(r,":");case"zzzz":default:return"GMT"+ef(r,":")}},t:function(n,e,t){let r=Math.trunc(+n/1e3);return ar(r,e.length)},T:function(n,e,t){return ar(+n,e.length)}}});var lZ,cZ,eLe,dZ,uZ=y(()=>{lZ=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},cZ=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},eLe=(n,e)=>{let t=n.match(/(P+)(p+)?/)||[],r=t[1],a=t[2];if(!a)return lZ(n,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",lZ(r,e)).replace("{{time}}",cZ(a,e))},dZ={p:cZ,P:eLe}});function pZ(n){return tLe.test(n)}function mZ(n){return rLe.test(n)}function fZ(n,e,t){let r=aLe(n,e,t);if(console.warn(r),nLe.includes(n))throw new RangeError(r)}function aLe(n,e,t){let r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var tLe,rLe,nLe,hZ=y(()=>{tLe=/^D+$/,rLe=/^Y+$/,nLe=["D","DD","YY","YYYY"]});function D(n,e,t){var d,u,p,m,f,h,g,v,k,T,b,w,S,C,x,E,_,F;let r=Ml(),a=(u=(d=t==null?void 0:t.locale)!=null?d:r.locale)!=null?u:P1,i=(T=(k=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(m=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?h:r.firstWeekContainsDate)!=null?k:(v=(g=r.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)!=null?T:1,s=(F=(_=(C=(S=t==null?void 0:t.weekStartsOn)!=null?S:(w=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)!=null?C:r.weekStartsOn)!=null?_:(E=(x=r.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)!=null?F:0,o=ct(n,t==null?void 0:t.in);if(!ta(o))throw new RangeError("Invalid time value");let l=e.match(sLe).map(I=>{let A=I[0];if(A==="p"||A==="P"){let R=dZ[A];return R(I,a.formatLong)}return I}).join("").match(iLe).map(I=>{if(I==="''")return{isToken:!1,value:"'"};let A=I[0];if(A==="'")return{isToken:!1,value:dLe(I)};if(_1[A])return{isToken:!0,value:I};if(A.match(cLe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:I}});a.localize.preprocessor&&(l=a.localize.preprocessor(o,l));let c={firstWeekContainsDate:i,weekStartsOn:s,locale:a};return l.map(I=>{if(!I.isToken)return I.value;let A=I.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&mZ(A)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&pZ(A))&&fZ(A,e,String(n));let R=_1[A[0]];return R(o,A,a.localize,c)}).join("")}function dLe(n){let e=n.match(oLe);return e?e[1].replace(lLe,"'"):n}var iLe,sLe,oLe,lLe,cLe,gZ=y(()=>{X7();Og();oZ();uZ();hZ();E1();pn();iLe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sLe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oLe=/^'([^]*?)'?$/,lLe=/''/g,cLe=/[a-zA-Z]/});var yZ=y(()=>{});var vZ=y(()=>{});var kZ=y(()=>{});var TZ=y(()=>{});var bZ=y(()=>{});var wZ=y(()=>{});var SZ=y(()=>{});var CZ=y(()=>{});var xZ=y(()=>{});var EZ=y(()=>{});var DZ=y(()=>{});var PZ=y(()=>{});var AZ=y(()=>{});var MZ=y(()=>{});var IZ=y(()=>{});var NZ=y(()=>{});var RZ=y(()=>{});var _Z=y(()=>{});var FZ=y(()=>{});var LZ=y(()=>{});var OZ=y(()=>{});var zZ=y(()=>{});var BZ=y(()=>{});var jZ=y(()=>{});var $Z=y(()=>{});var UZ=y(()=>{});var HZ=y(()=>{});var VZ=y(()=>{});var WZ=y(()=>{});var qZ=y(()=>{});var GZ=y(()=>{});var YZ=y(()=>{});var KZ=y(()=>{});var ZZ=y(()=>{});var QZ=y(()=>{});var JZ=y(()=>{});var XZ=y(()=>{});var eQ=y(()=>{});var tQ=y(()=>{});var rQ=y(()=>{});var nQ=y(()=>{});function F1(n,e){return+ct(n)<+ct(e)}var aQ=y(()=>{pn()});var iQ=y(()=>{});var sQ=y(()=>{});var oQ=y(()=>{});var lQ=y(()=>{});var cQ=y(()=>{});var dQ=y(()=>{});var uQ=y(()=>{});var pQ=y(()=>{});var mQ=y(()=>{});var fQ=y(()=>{});var hQ=y(()=>{});var gQ=y(()=>{});var yQ=y(()=>{});var vQ=y(()=>{});var kQ=y(()=>{});var TQ=y(()=>{});var bQ=y(()=>{});var wQ=y(()=>{});var SQ=y(()=>{});var CQ=y(()=>{});var xQ=y(()=>{});var EQ=y(()=>{});var DQ=y(()=>{});var PQ=y(()=>{});var AQ=y(()=>{});var MQ=y(()=>{});var IQ=y(()=>{});var NQ=y(()=>{});var RQ=y(()=>{});var _Q=y(()=>{});var FQ=y(()=>{});var LQ=y(()=>{});var OQ=y(()=>{});var zQ=y(()=>{});var BQ=y(()=>{});var jQ=y(()=>{});var $Q=y(()=>{});var UQ=y(()=>{});var HQ=y(()=>{});var VQ=y(()=>{});function Hg(n,e,t){return Jm(n,-e,t)}var WQ=y(()=>{$P()});var qQ=y(()=>{});var GQ=y(()=>{});var YQ=y(()=>{});var KQ=y(()=>{});var ZQ=y(()=>{});var QQ=y(()=>{});var JQ=y(()=>{});var XQ=y(()=>{});var eJ=y(()=>{});var tJ=y(()=>{});var rJ=y(()=>{});var nJ=y(()=>{});var aJ=y(()=>{});var iJ=y(()=>{});var sJ=y(()=>{});var oJ=y(()=>{});var lJ=y(()=>{});var cJ=y(()=>{});var dJ=y(()=>{});var uJ=y(()=>{});var pJ=y(()=>{});var mJ=y(()=>{});var fJ=y(()=>{});var hJ=y(()=>{});var gJ=y(()=>{});function Na(n,e){var c;let t=()=>Tn(e==null?void 0:e.in,NaN),r=(c=e==null?void 0:e.additionalDigits)!=null?c:2,a=fLe(n),i;if(a.date){let d=hLe(a.date,r);i=gLe(d.restDateString,d.year)}if(!i||isNaN(+i))return t();let s=+i,o=0,l;if(a.time&&(o=yLe(a.time),isNaN(o)))return t();if(a.timezone){if(l=vLe(a.timezone),isNaN(l))return t()}else{let d=new Date(s+o),u=ct(0,e==null?void 0:e.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return ct(s+o+l,e==null?void 0:e.in)}function fLe(n){let e={},t=n.split(XP.dateTimeDelimiter),r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],XP.timeZoneDelimiter.test(e.date)&&(e.date=n.split(XP.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){let a=XP.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function hLe(n,e){let t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=n.match(t);if(!r)return{year:NaN,restDateString:""};let a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:n.slice((r[1]||r[2]).length)}}function gLe(n,e){if(e===null)return new Date(NaN);let t=n.match(uLe);if(!t)return new Date(NaN);let r=!!t[4],a=ob(t[1]),i=ob(t[2])-1,s=ob(t[3]),o=ob(t[4]),l=ob(t[5])-1;if(r)return SLe(e,o,l)?kLe(e,o,l):new Date(NaN);{let c=new Date(0);return!bLe(e,i,s)||!wLe(e,a)?new Date(NaN):(c.setUTCFullYear(e,i,Math.max(a,s)),c)}}function ob(n){return n?parseInt(n):1}function yLe(n){let e=n.match(pLe);if(!e)return NaN;let t=L1(e[1]),r=L1(e[2]),a=L1(e[3]);return CLe(t,r,a)?t*y1+r*g1+a*1e3:NaN}function L1(n){return n&&parseFloat(n.replace(",","."))||0}function vLe(n){if(n==="Z")return 0;let e=n.match(mLe);if(!e)return 0;let t=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return xLe(r,a)?t*(r*y1+a*g1):NaN}function kLe(n,e,t){let r=new Date(0);r.setUTCFullYear(n,0,4);let a=r.getUTCDay()||7,i=(e-1)*7+t+1-a;return r.setUTCDate(r.getUTCDate()+i),r}function yJ(n){return n%400===0||n%4===0&&n%100!==0}function bLe(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(TLe[e]||(yJ(n)?29:28))}function wLe(n,e){return e>=1&&e<=(yJ(n)?366:365)}function SLe(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function CLe(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function xLe(n,e){return e>=0&&e<=59}var XP,uLe,pLe,mLe,TLe,vJ=y(()=>{Lg();Ho();pn();XP={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},uLe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,pLe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,mLe=/^([+-])(\d{2})(?::?(\d{2}))?$/;TLe=[31,null,31,30,31,30,31,31,30,31,30,31]});var kJ=y(()=>{});var TJ=y(()=>{});var bJ=y(()=>{});var wJ=y(()=>{});var SJ=y(()=>{});var CJ=y(()=>{});var xJ=y(()=>{});var EJ=y(()=>{});var DJ=y(()=>{});var PJ=y(()=>{});var AJ=y(()=>{});var MJ=y(()=>{});var IJ=y(()=>{});var NJ=y(()=>{});var RJ=y(()=>{});var _J=y(()=>{});var FJ=y(()=>{});var LJ=y(()=>{});var OJ=y(()=>{});var zJ=y(()=>{});var BJ=y(()=>{});var jJ=y(()=>{});var $J=y(()=>{});var UJ=y(()=>{});var HJ=y(()=>{});var VJ=y(()=>{});var WJ=y(()=>{});var qJ=y(()=>{});var GJ=y(()=>{});var YJ=y(()=>{});var KJ=y(()=>{});var ZJ=y(()=>{});var QJ=y(()=>{});var JJ=y(()=>{});var XJ=y(()=>{});var eX=y(()=>{});var tX=y(()=>{});var rX=y(()=>{});var nX=y(()=>{});var aX=y(()=>{});var iX=y(()=>{});var sX=y(()=>{});var oX=y(()=>{});var lX=y(()=>{});var cX=y(()=>{});var dX=y(()=>{});var Cr=y(()=>{mK();yK();$P();kK();CK();vK();xK();k1();EK();DK();AK();IK();NK();FK();LK();OK();zK();BK();Ho();jK();$K();VK();w1();WK();qK();GK();KK();ZK();QK();JK();XK();t7();r7();n7();o7();l7();c7();d7();u7();p7();m7();f7();h7();y7();v7();k7();b7();C7();x7();a7();E7();D7();A7();M7();I7();i7();N7();R7();_7();F7();P7();S7();L7();gZ();yZ();vZ();kZ();TZ();bZ();wZ();SZ();CZ();xZ();EZ();DZ();PZ();AZ();MZ();A1();IZ();RZ();_Z();FZ();LZ();OZ();M1();VP();zZ();BZ();jZ();$Z();UZ();YK();HZ();VZ();WZ();N1();qZ();JP();YZ();KZ();ZZ();QZ();JZ();XZ();eQ();tQ();rQ();nQ();aQ();x1();iQ();sQ();oQ();lQ();cQ();s7();NZ();gQ();yQ();vQ();UK();TQ();wQ();SQ();xQ();EQ();DQ();AQ();bQ();MQ();fK();hK();IQ();NQ();RQ();_Q();FQ();LQ();OQ();zQ();BQ();jQ();$Q();UQ();E1();HQ();gK();VQ();qQ();GQ();KQ();ZQ();GZ();QQ();YQ();JQ();XQ();RK();eJ();tJ();rJ();nJ();_K();aJ();iJ();sJ();oJ();lJ();cJ();dJ();uJ();pJ();mJ();fJ();hJ();gJ();hQ();vJ();kJ();TJ();bJ();wJ();SJ();CJ();xJ();EJ();DJ();PJ();AJ();MJ();IJ();NJ();RJ();_J();LJ();OJ();mQ();zJ();BJ();jJ();fQ();pQ();SK();$J();UJ();FJ();HJ();VJ();uQ();WJ();qJ();qP();GJ();kQ();ib();S1();CQ();T7();g7();PQ();YJ();KJ();zg();I1();D1();ZJ();JJ();XJ();WQ();eX();e7();tX();rX();QJ();nX();aX();iX();sX();pn();dQ();oX();lX();cX();dX()});var od=te(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});var tn=require("obsidian"),O1="YYYY-MM-DD",z1="gggg-[W]ww",uX="YYYY-MM",pX="YYYY-[Q]Q",mX="YYYY";function lb(n){var t,r;let e=window.app.plugins.getPlugin("periodic-notes");return e&&((r=(t=e.settings)==null?void 0:t[n])==null?void 0:r.enabled)}function cb(){var n,e,t,r;try{let{internalPlugins:a,plugins:i}=window.app;if(lb("daily")){let{format:c,folder:d,template:u}=((e=(n=i.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.daily)||{};return{format:c||O1,folder:(d==null?void 0:d.trim())||"",template:(u==null?void 0:u.trim())||""}}let{folder:s,format:o,template:l}=((r=(t=a.getPluginById("daily-notes"))==null?void 0:t.instance)==null?void 0:r.options)||{};return{format:o||O1,folder:(s==null?void 0:s.trim())||"",template:(l==null?void 0:l.trim())||""}}catch(a){console.info("No custom daily note settings found!",a)}}function db(){var n,e,t,r,a,i,s;try{let o=window.app.plugins,l=(n=o.getPlugin("calendar"))==null?void 0:n.options,c=(t=(e=o.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.weekly;if(lb("weekly"))return{format:c.format||z1,folder:((r=c.folder)==null?void 0:r.trim())||"",template:((a=c.template)==null?void 0:a.trim())||""};let d=l||{};return{format:d.weeklyNoteFormat||z1,folder:((i=d.weeklyNoteFolder)==null?void 0:i.trim())||"",template:((s=d.weeklyNoteTemplate)==null?void 0:s.trim())||""}}catch(o){console.info("No custom weekly note settings found!",o)}}function ub(){var e,t,r,a;let n=window.app.plugins;try{let i=lb("monthly")&&((t=(e=n.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.monthly)||{};return{format:i.format||uX,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((a=i.template)==null?void 0:a.trim())||""}}catch(i){console.info("No custom monthly note settings found!",i)}}function pb(){var e,t,r,a;let n=window.app.plugins;try{let i=lb("quarterly")&&((t=(e=n.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.quarterly)||{};return{format:i.format||pX,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((a=i.template)==null?void 0:a.trim())||""}}catch(i){console.info("No custom quarterly note settings found!",i)}}function mb(){var e,t,r,a;let n=window.app.plugins;try{let i=lb("yearly")&&((t=(e=n.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.yearly)||{};return{format:i.format||mX,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((a=i.template)==null?void 0:a.trim())||""}}catch(i){console.info("No custom yearly note settings found!",i)}}function fX(...n){let e=[];for(let r=0,a=n.length;r<a;r++)e=e.concat(n[r].split("/"));let t=[];for(let r=0,a=e.length;r<a;r++){let i=e[r];!i||i==="."||t.push(i)}return e[0]===""&&t.unshift(""),t.join("/")}function ELe(n){let e=n.substring(n.lastIndexOf("/")+1);return e.lastIndexOf(".")!=-1&&(e=e.substring(0,e.lastIndexOf("."))),e}async function DLe(n){let e=n.replace(/\\/g,"/").split("/");if(e.pop(),e.length){let t=fX(...e);window.app.vault.getAbstractFileByPath(t)||await window.app.vault.createFolder(t)}}async function fb(n,e){e.endsWith(".md")||(e+=".md");let t=tn.normalizePath(fX(n,e));return await DLe(t),t}async function Vg(n){let{metadataCache:e,vault:t}=window.app,r=tn.normalizePath(n);if(r==="/")return Promise.resolve(["",null]);try{let a=e.getFirstLinkpathDest(r,""),i=await t.cachedRead(a),s=window.app.foldManager.load(a);return[i,s]}catch(a){return console.error(`Failed to read the daily note template '${r}'`,a),new tn.Notice("Failed to read the daily note template"),["",null]}}function Wo(n,e="day"){let t=n.clone().startOf(e).format();return`${e}-${t}`}function hX(n){return n.replace(/\[[^\]]*\]/g,"")}function PLe(n,e){if(e==="week"){let t=hX(n);return/w{1,2}/i.test(t)&&(/M{1,4}/.test(t)||/D{1,4}/.test(t))}return!1}function Wg(n,e){return gX(n.basename,e)}function ALe(n,e){return gX(ELe(n),e)}function gX(n,e){let r={day:cb,week:db,month:ub,quarter:pb,year:mb}[e]().format.split("/").pop(),a=window.moment(n,r,!0);if(!a.isValid())return null;if(PLe(r,e)&&e==="week"){let i=hX(r);if(/w{1,2}/i.test(i))return window.moment(n,r.replace(/M{1,4}/g,"").replace(/D{1,4}/g,""),!1)}return a}var B1=class extends Error{};async function yX(n){let e=window.app,{vault:t}=e,r=window.moment,{template:a,format:i,folder:s}=cb(),[o,l]=await Vg(a),c=n.format(i),d=await fb(s,c);try{let u=await t.create(d,o.replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,r().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,m,f,h,g,v)=>{let k=r(),T=n.clone().set({hour:k.get("hour"),minute:k.get("minute"),second:k.get("second")});return f&&T.add(parseInt(h,10),g),v?T.format(v.substring(1).trim()):T.format(i)}).replace(/{{\s*yesterday\s*}}/gi,n.clone().subtract(1,"day").format(i)).replace(/{{\s*tomorrow\s*}}/gi,n.clone().add(1,"d").format(i)));return e.foldManager.save(u,l),u}catch(u){console.error(`Failed to create file: '${d}'`,u),new tn.Notice("Unable to create new file.")}}function MLe(n,e){var t;return(t=e[Wo(n,"day")])!=null?t:null}function ILe(){let{vault:n}=window.app,{folder:e}=cb(),t=n.getAbstractFileByPath(tn.normalizePath(e));if(!t)throw new B1("Failed to find daily notes folder");let r={};return tn.Vault.recurseChildren(t,a=>{if(a instanceof tn.TFile){let i=Wg(a,"day");if(i){let s=Wo(i,"day");r[s]=a}}}),r}var j1=class extends Error{};function NLe(){let{moment:n}=window,e=n.localeData()._week.dow,t=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;e;)t.push(t.shift()),e--;return t}function RLe(n){return NLe().indexOf(n.toLowerCase())}async function vX(n){let{vault:e}=window.app,{template:t,format:r,folder:a}=db(),[i,s]=await Vg(t),o=n.format(r),l=await fb(a,o);try{let c=await e.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,f,h)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),f),h?v.format(h.substring(1).trim()):v.format(r)}).replace(/{{\s*title\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,u,p)=>{let m=RLe(u);return n.weekday(m).format(p.trim())}));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new tn.Notice("Unable to create new file.")}}function _Le(n,e){var t;return(t=e[Wo(n,"week")])!=null?t:null}function FLe(){let n={};if(!TX())return n;let{vault:e}=window.app,{folder:t}=db(),r=e.getAbstractFileByPath(tn.normalizePath(t));if(!r)throw new j1("Failed to find weekly notes folder");return tn.Vault.recurseChildren(r,a=>{if(a instanceof tn.TFile){let i=Wg(a,"week");if(i){let s=Wo(i,"week");n[s]=a}}}),n}var $1=class extends Error{};async function kX(n){let{vault:e}=window.app,{template:t,format:r,folder:a}=ub(),[i,s]=await Vg(t),o=n.format(r),l=await fb(a,o);try{let c=await e.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,f,h)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),f),h?v.format(h.substring(1).trim()):v.format(r)}).replace(/{{\s*date\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,o));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new tn.Notice("Unable to create new file.")}}function LLe(n,e){var t;return(t=e[Wo(n,"month")])!=null?t:null}function OLe(){let n={};if(!bX())return n;let{vault:e}=window.app,{folder:t}=ub(),r=e.getAbstractFileByPath(tn.normalizePath(t));if(!r)throw new $1("Failed to find monthly notes folder");return tn.Vault.recurseChildren(r,a=>{if(a instanceof tn.TFile){let i=Wg(a,"month");if(i){let s=Wo(i,"month");n[s]=a}}}),n}var U1=class extends Error{};async function zLe(n){let{vault:e}=window.app,{template:t,format:r,folder:a}=pb(),[i,s]=await Vg(t),o=n.format(r),l=await fb(a,o);try{let c=await e.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,f,h)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),f),h?v.format(h.substring(1).trim()):v.format(r)}).replace(/{{\s*date\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,o));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new tn.Notice("Unable to create new file.")}}function BLe(n,e){var t;return(t=e[Wo(n,"quarter")])!=null?t:null}function jLe(){let n={};if(!wX())return n;let{vault:e}=window.app,{folder:t}=pb(),r=e.getAbstractFileByPath(tn.normalizePath(t));if(!r)throw new U1("Failed to find quarterly notes folder");return tn.Vault.recurseChildren(r,a=>{if(a instanceof tn.TFile){let i=Wg(a,"quarter");if(i){let s=Wo(i,"quarter");n[s]=a}}}),n}var H1=class extends Error{};async function $Le(n){let{vault:e}=window.app,{template:t,format:r,folder:a}=mb(),[i,s]=await Vg(t),o=n.format(r),l=await fb(a,o);try{let c=await e.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,u,p,m,f,h)=>{let g=window.moment(),v=n.clone().set({hour:g.get("hour"),minute:g.get("minute"),second:g.get("second")});return p&&v.add(parseInt(m,10),f),h?v.format(h.substring(1).trim()):v.format(r)}).replace(/{{\s*date\s*}}/gi,o).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,o));return window.app.foldManager.save(c,s),c}catch(c){console.error(`Failed to create file: '${l}'`,c),new tn.Notice("Unable to create new file.")}}function ULe(n,e){var t;return(t=e[Wo(n,"year")])!=null?t:null}function HLe(){let n={};if(!SX())return n;let{vault:e}=window.app,{folder:t}=mb(),r=e.getAbstractFileByPath(tn.normalizePath(t));if(!r)throw new H1("Failed to find yearly notes folder");return tn.Vault.recurseChildren(r,a=>{if(a instanceof tn.TFile){let i=Wg(a,"year");if(i){let s=Wo(i,"year");n[s]=a}}}),n}function VLe(){var r,a;let{app:n}=window,e=n.internalPlugins.plugins["daily-notes"];if(e&&e.enabled)return!0;let t=n.plugins.getPlugin("periodic-notes");return t&&((a=(r=t.settings)==null?void 0:r.daily)==null?void 0:a.enabled)}function TX(){var t,r;let{app:n}=window;if(n.plugins.getPlugin("calendar"))return!0;let e=n.plugins.getPlugin("periodic-notes");return e&&((r=(t=e.settings)==null?void 0:t.weekly)==null?void 0:r.enabled)}function bX(){var t,r;let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&((r=(t=e.settings)==null?void 0:t.monthly)==null?void 0:r.enabled)}function wX(){var t,r;let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&((r=(t=e.settings)==null?void 0:t.quarterly)==null?void 0:r.enabled)}function SX(){var t,r;let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&((r=(t=e.settings)==null?void 0:t.yearly)==null?void 0:r.enabled)}function WLe(n){let e={day:cb,week:db,month:ub,quarter:pb,year:mb}[n];return e()}function qLe(n,e){return{day:yX,month:kX,week:vX}[n](e)}wt.DEFAULT_DAILY_NOTE_FORMAT=O1;wt.DEFAULT_MONTHLY_NOTE_FORMAT=uX;wt.DEFAULT_QUARTERLY_NOTE_FORMAT=pX;wt.DEFAULT_WEEKLY_NOTE_FORMAT=z1;wt.DEFAULT_YEARLY_NOTE_FORMAT=mX;wt.appHasDailyNotesPluginLoaded=VLe;wt.appHasMonthlyNotesPluginLoaded=bX;wt.appHasQuarterlyNotesPluginLoaded=wX;wt.appHasWeeklyNotesPluginLoaded=TX;wt.appHasYearlyNotesPluginLoaded=SX;wt.createDailyNote=yX;wt.createMonthlyNote=kX;wt.createPeriodicNote=qLe;wt.createQuarterlyNote=zLe;wt.createWeeklyNote=vX;wt.createYearlyNote=$Le;wt.getAllDailyNotes=ILe;wt.getAllMonthlyNotes=OLe;wt.getAllQuarterlyNotes=jLe;wt.getAllWeeklyNotes=FLe;wt.getAllYearlyNotes=HLe;wt.getDailyNote=MLe;wt.getDailyNoteSettings=cb;wt.getDateFromFile=Wg;wt.getDateFromPath=ALe;wt.getDateUID=Wo;wt.getMonthlyNote=LLe;wt.getMonthlyNoteSettings=ub;wt.getPeriodicNoteSettings=WLe;wt.getQuarterlyNote=BLe;wt.getQuarterlyNoteSettings=pb;wt.getTemplateInfo=Vg;wt.getWeeklyNote=_Le;wt.getWeeklyNoteSettings=db;wt.getYearlyNote=ULe;wt.getYearlyNoteSettings=mb});function CX(n){return n.replace(/\\/g,"/").replace(/^\/+/,"").replace(/\/+$/,"")}function Il(n){let e=Array.isArray(n)?n:typeof n=="string"?n.split(","):[];return Array.from(new Set(e.map(t=>CX(t.trim())).filter(t=>t.length>0)))}function qg(n,e){let t=CX(n);return e.some(r=>t===r||t.startsWith(`${r}/`))}var hb=y(()=>{});function GLe(n){let e=n.toLowerCase();return e==="true"||e==="false"?e==="true":n}function gb(n){let e=n.trim();return(e.startsWith("#")?e.slice(1).trim():e).replace(/\s+/g,"-")}function V1(n){return n.trim().toLowerCase()==="tags"}function YLe(n){return typeof n=="string"&&n.trim().length===0}function xX(n,e){return n===e}function qo(n){let e=[],t=new Set,r=a=>{let i=gb(String(a));!i||t.has(i)||(t.add(i),e.push(i))};return Array.isArray(n)?(n.forEach(r),e):typeof n=="string"&&n.trim().length>0?(r(n),e):[]}function Gg(n,e,t){if(!e||!t)return;if(V1(e)){let i=qo(n.tags),s=gb(t);i.some(l=>gb(l)===s)||i.push(s),n.tags=i;return}let r=GLe(t),a=n[e];if(Array.isArray(a)){a.some(i=>xX(i,r))||a.push(r),n[e]=a;return}if(a==null||YLe(a)){n[e]=r;return}if(xX(a,r)){n[e]=a;return}n[e]=[a,r]}var Yg=y(()=>{});function Tb(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function q1(n){return`note["${Tb(n)}"]`}function DX(n){return`file(if(${n}.isType("object"), ${n}.uid, ${n}))`}function EX(n){return`${DX(n)}.asLink()`}function vb(n){return`file(${n}.replace(/^\\[[^\\]]+\\]\\((.*)\\)$/, "$1").replace(/%20/g, " ")).asLink()`}function KLe(n){if(n.taskIdentificationMethod==="tag")return`file.hasTag("${n.taskTag||"task"}")`;{let e=n.taskPropertyName,t=n.taskPropertyValue;if(!e)return`file.hasTag("${n.taskTag||"task"}")`;if(t){if(V1(e))return`file.hasTag("${Tb(t)}")`;let r=q1(e),a=t.toLowerCase();return a==="true"||a==="false"?`list(${r}).contains(${a})`:`list(${r}).contains("${Tb(t)}")`}else{let r=q1(e);return`${r} && ${r} != "" && ${r} != null`}}}function PX(n){return Il(n.excludedFolders).map(e=>`file.inFolder("${Tb(e)}") != true`)}function ZLe(n){return[KLe(n),...PX(n)]}function yb(n){return`filters:
and:
${(Array.isArray(n)?n:[n]).map(r=>` - ${r}`).join(`
`)}`}function Ei(n){return n.replace(/^(note\.|file\.|task\.|formula\.)/,"")}function kb(n){return`date(${n}).format("YYYY-MM-DD")`}function AX(){return'today().format("YYYY-MM-DD")'}function MX(){return'(today() + "7 days").format("YYYY-MM-DD")'}function Ut(n,e){var a;let t=e.fieldMapper;if(n.startsWith("user:")){let i=n.substring(5),s=(a=e.settings.userFields)==null?void 0:a.find(o=>o.id===i);return s?s.key:n}switch(n){case"tags":return"file.tags";case"dateCreated":return"file.ctime";case"dateModified":return"file.mtime";case"title":return"file.name";case"blocked":case"blocking":return t.toUserField("blockedBy");case"complete_instances":return t.toUserField("completeInstances");case"totalTrackedTime":return t.toUserField("timeEntries");case"checklistProgress":return"file.tasks"}let r=t.getMapping();return n in r?t.toUserField(n):n}function QLe(n){let r=(n.settings.defaultVisibleProperties||["status","priority","due","scheduled","projects","contexts","tags"]).map(o=>Ut(o,n)).filter(o=>!!o),a=["file.name",Ut("recurrence",n),Ut("complete_instances",n),Ut("checklistProgress",n)].filter(o=>!!o),i=[],s=new Set;for(let o of r)o&&!s.has(o)&&(i.push(o),s.add(o));for(let o of a)o&&!s.has(o)&&(i.push(o),s.add(o));return i}function W1(n){return n.map(e=>` - ${e}`).join(`
`)}function JLe(n,e,t){if(!e)return n;let r=n.filter(i=>i!==e),a=r.indexOf(t);return a===-1?r.push(e):r.splice(a+1,0,e),r}function XLe(n){let e=n.settings,t=Ei(Ut("priority",n)),r=[...e.customPriorities].sort((i,s)=>i.weight-s.weight);if(r.length===0)return"999";let a="999";for(let i=r.length-1;i>=0;i--){let s=r[i];a=`if(${t}=="${s.value}",${i},${a})`}return a}function eOe(n){let e=Ei(Ut("priority",n)),t=n.settings.customPriorities;if(t.length===0)return'"No priority"';let r='"No priority"';for(let a=t.length-1;a>=0;a--){let i=t[a];r=`if(${e}=="${i.value}","${i.label}",${r})`}return r}function tOe(n){let e=Ei(Ut("due",n)),t=Ei(Ut("status",n)),r=Ei(Ut("timeEstimate",n)),a=Ei(Ut("timeEntries",n)),i=Ei(Ut("projects",n)),s=Ei(Ut("contexts",n)),l=n.settings.customStatuses.filter(x=>x.isCompleted).map(x=>x.value).map(x=>`${t} != "${x}"`).join(" && "),c=Ei(Ut("scheduled",n)),d=Ei(Ut("recurrence",n)),u=`${e}.isEmpty()`,p=`${c}.isEmpty()`,m=`(${u} == false)`,f=`(${p} == false)`,h="if(formula.daysUntilNext, formula.daysUntilNext, 0)",g=AX(),v=MX(),k='(today() + "1 day").format("YYYY-MM-DD")',T='(today() - "1 day").format("YYYY-MM-DD")',b=kb(e),w=kb(c),S=kb("value.startTime");return{priorityWeight:XLe(n),daysUntilDue:`if(${m}, ((number(date(${e})) - number(today())) / 86400000).floor(), null)`,dueIn:`if(${u}, "", if(formula.daysUntilDue == 0, "Today", if(formula.daysUntilDue == 1, "1 day", if(formula.daysUntilDue > 1, formula.daysUntilDue + " days", if(formula.daysUntilDue == -1, "1 day overdue", formula.daysUntilDue * -1 + " days overdue")))))`,daysUntilScheduled:`if(${f}, ((number(date(${c})) - number(today())) / 86400000).floor(), null)`,daysSinceCreated:"((number(now()) - number(file.ctime)) / 86400000).floor()",daysSinceModified:"((number(now()) - number(file.mtime)) / 86400000).floor()",isOverdue:`${m} && date(${e}) < today() && ${l}`,isDueToday:`${m} && ${b} == ${g}`,isDueThisWeek:`${m} && ${b} >= ${g} && ${b} <= ${v}`,isScheduledToday:`${f} && ${w} == ${g}`,isRecurring:`${d} && !${d}.isEmpty()`,hasTimeEstimate:`${r} && ${r} > 0`,timeRemaining:`if(${r} && ${r} > 0, ${r} - if(${a}, list(${a}).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0), 0), null)`,efficiencyRatio:`if(${r} && ${r} > 0 && ${a}, (list(${a}).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) / ${r} * 100).round(), null)`,timeTrackedThisWeek:`if(${a}, list(${a}).filter(value.endTime && date(value.startTime) >= today() - "7d").map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0).round(), 0)`,timeTrackedToday:`if(${a}, list(${a}).filter(value.endTime && ${S} == ${g}).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0).round(), 0)`,dueMonth:`if(${m}, date(${e}).format("YYYY-MM"), "No due date")`,dueWeek:`if(${m}, date(${e}).format("YYYY-[W]WW"), "No due date")`,scheduledMonth:`if(${f}, date(${c}).format("YYYY-MM"), "Not scheduled")`,scheduledWeek:`if(${f}, date(${c}).format("YYYY-[W]WW"), "Not scheduled")`,dueDateCategory:`if(${u}, "No due date", if(date(${e}) < today(), "Overdue", if(${b} == ${g}, "Today", if(${b} == ${k}, "Tomorrow", if(${b} <= ${v}, "This week", "Later")))))`,timeEstimateCategory:`if(!${r} || ${r} == 0 || ${r} == null, "No estimate", if(${r} < 30, "Quick (<30m)", if(${r} <= 120, "Medium (30m-2h)", "Long (>2h)")))`,ageCategory:'if(((number(now()) - number(file.ctime)) / 86400000) < 1, "Today", if(((number(now()) - number(file.ctime)) / 86400000) < 7, "This week", if(((number(now()) - number(file.ctime)) / 86400000) < 30, "This month", "Older")))',createdMonth:'file.ctime.format("YYYY-MM")',modifiedMonth:'file.mtime.format("YYYY-MM")',priorityCategory:eOe(n),projectCount:`if(!${i} || list(${i}).length == 0, "No projects", if(list(${i}).length == 1, "Single project", "Multiple projects"))`,contextCount:`if(!${s} || list(${s}).length == 0, "No contexts", if(list(${s}).length == 1, "Single context", "Multiple contexts"))`,trackingStatus:`if(!${r} || ${r} == 0 || ${r} == null, "No estimate", if(!${a} || list(${a}).length == 0, "Not started", if(formula.efficiencyRatio < 100, "Under estimate", "Over estimate")))`,nextDate:`if(${m} && ${f}, if(date(${e}) < date(${c}), ${e}, ${c}), if(${m}, ${e}, ${c}))`,daysUntilNext:`if(${m} && ${f}, min(formula.daysUntilDue, formula.daysUntilScheduled), if(${m}, formula.daysUntilDue, formula.daysUntilScheduled))`,hasDate:`${m} || ${f}`,isToday:`(${m} && ${b} == ${g}) || (${f} && ${w} == ${g})`,isThisWeek:`(${m} && ${b} >= ${g} && ${b} <= ${v}) || (${f} && ${w} >= ${g} && ${w} <= ${v})`,nextDateCategory:`if(${u} && ${p}, "No date", if((${m} && date(${e}) < today()) || (${f} && date(${c}) < today()), "Overdue/Past", if((${m} && ${b} == ${g}) || (${f} && ${w} == ${g}), "Today", if((${m} && ${b} == ${k}) || (${f} && ${w} == ${k}), "Tomorrow", if((${m} && ${b} <= ${v}) || (${f} && ${w} <= ${v}), "This week", "Later")))))`,nextDateMonth:`if(${m} && ${f}, if(date(${e}) < date(${c}), date(${e}).format("YYYY-MM"), date(${c}).format("YYYY-MM")), if(${m}, date(${e}).format("YYYY-MM"), if(${f}, date(${c}).format("YYYY-MM"), "No date")))`,nextDateWeek:`if(${m} && ${f}, if(date(${e}) < date(${c}), date(${e}).format("YYYY-[W]WW"), date(${c}).format("YYYY-[W]WW")), if(${m}, date(${e}).format("YYYY-[W]WW"), if(${f}, date(${c}).format("YYYY-[W]WW"), "No date")))`,urgencyScore:`if(${u} && ${p}, formula.priorityWeight, formula.priorityWeight + max(0, 10 - ${h}) + (1 - ((number(date(formula.nextDate)) - number(date(date(formula.nextDate).format("YYYY-MM-DD")))) / 86400000)))`,timeTrackedFormatted:`if(${a}, if(list(${a}).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) >= 60, (list(${a}).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) / 60).floor() + "h " + (list(${a}).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0) % 60).round() + "m", list(${a}).filter(value.endTime).map((number(date(value.endTime)) - number(date(value.startTime))) / 60000).reduce(acc + value, 0).round() + "m"), "0m")`,dueDateDisplay:`if(${u}, "", if(${b} == ${g}, "Today", if(${b} == ${k}, "Tomorrow", if(${b} == ${T}, "Yesterday", if(date(${e}) < today(), formula.daysUntilDue * -1 + "d ago", if(${b} <= ${v}, date(${e}).format("ddd"), date(${e}).format("MMM D")))))))`}}function rOe(n){let e=tOe(n);return`formulas:
${Object.entries(e).map(([r,a])=>` ${r}: '${a}'`).join(`
`)}`}function nOe(n,e,t){if(n.includes(t)||!e||!n.includes(e))return n;let r=[],a=!1;for(let i of n)r.push(i),!a&&e&&i===e&&(r.push(t),a=!0);return r}function aOe(n){let e=Ut("pomodoros",n),t=q1(e),r=`list(${t}).filter(value.type == "work")`,a=`list(${t}).filter(value.type == "work" && value.completed == true)`,i=`${a}.map(if(value.plannedDuration && value.plannedDuration > 0, value.plannedDuration, if(value.startTime && value.endTime, ((number(date(value.endTime)) - number(date(value.startTime))) / 60000).round(), 0)))`;return`# Pomodoro statistics
# Generated with your TaskNotes settings
# Requires Pomodoro data storage to be set to Daily notes.
filters:
and:
- file.hasProperty("${Tb(e)}")
- list(${t}).filter(value.startTime).isEmpty() == false
formulas:
pomodoroDate: 'if(${t}, list(${t}).filter(value.startTime).map(date(value.startTime).format("YYYY-MM-DD")).unique().join(", "), file.basename)'
pomodoroMonth: 'if(${t}, list(${t}).filter(value.startTime).map(date(value.startTime).format("YYYY-MM")).unique().join(", "), "")'
completedPomos: 'if(${t}, ${a}.length, 0)'
attemptedPomos: 'if(${t}, ${r}.length, 0)'
interruptedPomos: 'if(${t}, list(${t}).filter(value.type == "work" && value.completed == false).length, 0)'
focusMinutes: 'if(${t}, ${i}.reduce(acc + value, 0).round(), 0)'
focusTime: 'if(formula.focusMinutes >= 60, (formula.focusMinutes / 60).floor() + "h " + (formula.focusMinutes % 60).round() + "m", formula.focusMinutes + "m")'
completionRate: 'if(formula.attemptedPomos > 0, (formula.completedPomos / formula.attemptedPomos * 100).round() + "%", "0%")'
shortBreaks: 'if(${t}, list(${t}).filter(value.type == "short-break").length, 0)'
longBreaks: 'if(${t}, list(${t}).filter(value.type == "long-break").length, 0)'
properties:
formula.pomodoroDate:
displayName: Date
formula.pomodoroMonth:
displayName: Month
formula.completedPomos:
displayName: Completed
formula.attemptedPomos:
displayName: Attempted
formula.interruptedPomos:
displayName: Interrupted
formula.focusMinutes:
displayName: Focus minutes
formula.focusTime:
displayName: Focus time
formula.completionRate:
displayName: Completion
formula.shortBreaks:
displayName: Short breaks
formula.longBreaks:
displayName: Long breaks
views:
- type: table
name: "Daily"
order:
- formula.pomodoroDate
- formula.completedPomos
- formula.focusTime
- formula.attemptedPomos
- formula.completionRate
- formula.interruptedPomos
- formula.shortBreaks
- formula.longBreaks
- file.name
sort:
- column: formula.pomodoroDate
direction: DESC
- type: table
name: "Monthly"
groupBy:
property: formula.pomodoroMonth
direction: DESC
order:
- formula.pomodoroDate
- formula.completedPomos
- formula.focusMinutes
- formula.focusTime
- formula.attemptedPomos
- formula.completionRate
- formula.interruptedPomos
- formula.shortBreaks
- formula.longBreaks
- file.name
summaries:
formula.completedPomos: Sum
formula.focusMinutes: Sum
formula.attemptedPomos: Sum
formula.interruptedPomos: Sum
formula.shortBreaks: Sum
formula.longBreaks: Sum
sort:
- column: formula.pomodoroDate
direction: DESC
`}function IX(n,e){let t=e.settings,r=ZLe(t),a=PX(t),i=QLe(e),s=W1(i),o=rOe(e);switch(n){case"open-calendar-view":{let l=Ut("due",e),c=Ut("scheduled",e);return`# Mini Calendar
# Generated with your TaskNotes settings
${yb(r)}
${o}
views:
- type: tasknotesMiniCalendar
name: "Due"
order:
${s}
sort:
- property: ${l}
direction: ASC
dateProperty: ${l}
- type: tasknotesMiniCalendar
name: "Scheduled"
order: []
dateProperty: ${c}
- type: tasknotesMiniCalendar
name: "Created"
dateProperty: file.ctime
- type: tasknotesMiniCalendar
name: "Modified"
dateProperty: file.mtime
`}case"open-kanban-view":{let l=Ut("status",e),c=Ut("sortOrder",e);return`# Kanban Board
${yb(r)}
${o}
views:
- type: tasknotesKanban
name: "Kanban Board"
order:
${s}
sort:
- column: ${c}
direction: DESC
groupBy:
property: ${l}
direction: ASC
config:
columnWidth: 280
hideEmptyColumns: false
`}case"open-tasks-view":{let l=Ut("status",e),c=Ut("due",e),d=Ut("scheduled",e),u=Ut("recurrence",e),p=Ut("completeInstances",e),m=Ut("blockedBy",e),f=Ut("sortOrder",e),h=`${c}.isEmpty() == false`,g=`${d}.isEmpty() == false`,v=AX(),k=MX(),T=kb(c),b=kb(d),w=t.customStatuses.filter(E=>E.isCompleted).map(E=>E.value),S=w.map(E=>`${l} != "${E}"`).join(`
- `),C=`${p}.map(date(value).format("YYYY-MM-DD")).contains(${v}) != true`,x=w.map(E=>`${DX("value")}.properties.${Ei(l)} != "${E}"`).join(" && ");return`# All Tasks
${yb(r)}
${o}
views:
- type: tasknotesTaskList
name: "Manual Order"
order:
${s}
sort:
- column: ${f}
direction: DESC
groupBy:
property: ${l}
direction: ASC
- type: tasknotesTaskList
name: "All Tasks"
order:
${s}
sort:
- column: due
direction: ASC
- type: tasknotesTaskList
name: "Not Blocked"
filters:
and:
# Incomplete tasks
- or:
# Non-recurring task that's not in any completed status
- and:
- ${u}.isEmpty()
- ${S}
# Recurring task where today is not in complete_instances
- and:
- ${u}.isEmpty() == false
- ${C}
# Not blocked by any incomplete tasks
- or:
# No blocking dependencies at all
- ${m}.isEmpty()
# All blocking tasks are completed (filter returns only incomplete, then check if empty)
- 'list(${m}).filter(${x}).isEmpty()'
order:
${s}
sort:
- column: formula.urgencyScore
direction: DESC
- type: tasknotesTaskList
name: "Today"
filters:
and:
# Incomplete tasks (handles both recurring and non-recurring)
- or:
# Non-recurring task that's not in any completed status
- and:
- ${u}.isEmpty()
- ${S}
# Recurring task where today is not in complete_instances
- and:
- ${u}.isEmpty() == false
- ${C}
# Due or scheduled today
- or:
- and:
- ${h}
- ${T} == ${v}
- and:
- ${g}
- ${b} == ${v}
order:
${s}
sort:
- column: formula.urgencyScore
direction: DESC
- type: tasknotesTaskList
name: "Overdue"
filters:
and:
# Incomplete tasks
- or:
# Non-recurring task that's not in any completed status
- and:
- ${u}.isEmpty()
- ${S}
# Recurring task where today is not in complete_instances
- and:
- ${u}.isEmpty() == false
- ${C}
# Due or scheduled in the past
- or:
- and:
- ${h}
- date(${c}) < today()
- and:
- ${g}
- date(${d}) < today()
order:
${s}
sort:
- column: formula.urgencyScore
direction: DESC
- type: tasknotesTaskList
name: "This Week"
filters:
and:
# Incomplete tasks
- or:
# Non-recurring task that's not in any completed status
- and:
- ${u}.isEmpty()
- ${S}
# Recurring task where today is not in complete_instances
- and:
- ${u}.isEmpty() == false
- ${C}
# Due or scheduled this week
- or:
- and:
- ${h}
- ${T} >= ${v}
- ${T} <= ${k}
- and:
- ${g}
- ${b} >= ${v}
- ${b} <= ${k}
order:
${s}
sort:
- column: formula.urgencyScore
direction: DESC
- type: tasknotesTaskList
name: "Unscheduled"
filters:
and:
# Incomplete tasks
- or:
# Non-recurring task that's not in any completed status
- and:
- ${u}.isEmpty()
- ${S}
# Recurring task where today is not in complete_instances
- and:
- ${u}.isEmpty() == false
- ${C}
# No due date and no scheduled date
- date(${c}).isEmpty()
- date(${d}).isEmpty()
order:
${s}
sort:
- column: ${l}
direction: ASC
`}case"open-advanced-calendar-view":return`# Calendar
${yb(r)}
${o}
views:
- type: tasknotesCalendar
name: "Calendar"
order:
${s}
options:
showScheduled: true
showDue: true
showRecurring: true
showTimeEntries: true
showTimeblocks: true
showPropertyBasedEvents: true
createDailyNotesFromDateLinks: true
calendarView: "timeGridWeek"
customDayCount: 3
firstDay: ${e.settings.calendarViewSettings.firstDay}
`;case"open-agenda-view":{let l=Ut("due",e),c=nOe(i,l,"formula.dueIn"),d=W1(c),u=c.includes("formula.dueIn")?`
properties:
formula.dueIn:
displayName: Due in
`:"";return`# Agenda
${yb(r)}
${o}
${u}
views:
- type: tasknotesCalendar
name: "Agenda"
order:
${d}
options:
showPropertyBasedEvents: false
showOverdueOnToday: true
createDailyNotesFromDateLinks: true
calendarView: "listWeek"
startDateProperty: file.ctime
listDayCount: 7
titleProperty: file.basename
`}case"pomodoro-stats-base":return aOe(e);case"relationships":{let l=Ei(Ut("projects",e)),c=Ei(Ut("blockedBy",e)),d=Ei(Ut("recurrenceParent",e)),u=Ut("occurrenceDate",e),p=Ut("scheduled",e),m=Ut("status",e),f=Ut("sortOrder",e),h=W1(JLe(i,u,p)),g=r.map(T=>` - ${T}`).join(`
`),v=a.map(T=>` - ${T}`).join(`
`),k=v?`${v}
`:"";return`# Relationships
# This view shows all relationships for the current file
# Dynamically shows/hides tabs based on available data
${o}
views:
- type: tasknotesKanban
name: "Subtasks"
filters:
and:
${g}
- file.hasLink(this.file) && list(note.${l}).map(${vb("value")}).contains(this.file.asLink())
order:
${s}
sort:
- column: ${f}
direction: DESC
groupBy:
property: ${m}
direction: ASC
- type: tasknotesTaskList
name: "Occurrences"
filters:
and:
${g}
- file.hasLink(this.file) && note.${d} && ${vb(`note.${d}`)} == this.file.asLink()
order:
${h}
sort:
- column: ${u}
direction: ASC
- type: tasknotesTaskList
name: "Projects"
filters:
and:
${k} - list(this.${l}).map(${vb("value")}).contains(file.asLink())
order:
${s}
- type: tasknotesTaskList
name: "Blocked By"
filters:
and:
${g}
- list(this.note.${c}).map(${EX("value")}).contains(file.asLink())
order:
${s}
sort:
- column: ${f}
direction: DESC
- type: tasknotesKanban
name: "Blocking"
filters:
and:
${g}
- list(note.${c}).map(${EX("value")}).contains(this.file.asLink())
order:
${s}
sort:
- column: ${f}
direction: DESC
groupBy:
property: ${m}
direction: ASC
`}default:return""}}var G1=y(()=>{hb();Yg()});var NX,RX,ld,Kg,Zg,Ra,rt,Di,cd,dd,ud,ai,Ou,_X,FX,Pr=y(()=>{NX="tasknotes-mini-calendar-view",RX="tasknotes-agenda-view",ld="tasknotes-pomodoro-view",Kg="tasknotes-pomodoro-stats-view",Zg="tasknotes-stats-view",Ra="data-changed",rt="task-updated",Di="task-deleted",cd="pomodoro-start",dd="pomodoro-complete",ud="pomodoro-interrupt",ai="pomodoro-tick",Ou="date-changed",_X=[{id:"title",label:"Title",category:"text",supportedOperators:["is","is-not","contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"text"},{id:"path",label:"Path",category:"select",supportedOperators:["contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"select"},{id:"status",label:"Status",category:"select",supportedOperators:["is","is-not","is-empty","is-not-empty"],valueInputType:"select"},{id:"priority",label:"Priority",category:"select",supportedOperators:["is","is-not","is-empty","is-not-empty"],valueInputType:"select"},{id:"tags",label:"Tags",category:"select",supportedOperators:["contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"select"},{id:"contexts",label:"Contexts",category:"select",supportedOperators:["contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"select"},{id:"projects",label:"Projects",category:"select",supportedOperators:["contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"select"},{id:"blockedBy",label:"Blocked By",category:"select",supportedOperators:["contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"text"},{id:"blocking",label:"Blocking",category:"select",supportedOperators:["contains","does-not-contain","is-empty","is-not-empty"],valueInputType:"text"},{id:"due",label:"Due Date",category:"date",supportedOperators:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],valueInputType:"date"},{id:"scheduled",label:"Scheduled Date",category:"date",supportedOperators:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],valueInputType:"date"},{id:"completedDate",label:"Completed Date",category:"date",supportedOperators:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],valueInputType:"date"},{id:"dateCreated",label:"Created Date",category:"date",supportedOperators:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],valueInputType:"date"},{id:"dateModified",label:"Modified Date",category:"date",supportedOperators:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],valueInputType:"date"},{id:"archived",label:"Archived",category:"boolean",supportedOperators:["is-checked","is-not-checked"],valueInputType:"none"},{id:"hasSubtasks",label:"Has Subtasks",category:"boolean",supportedOperators:["is-checked","is-not-checked"],valueInputType:"none"},{id:"timeEstimate",label:"Time Estimate",category:"numeric",supportedOperators:["is","is-not","is-greater-than","is-less-than","is-greater-than-or-equal","is-less-than-or-equal"],valueInputType:"number"},{id:"recurrence",label:"Recurrence",category:"special",supportedOperators:["is-empty","is-not-empty"],valueInputType:"none"},{id:"status.isCompleted",label:"Completed",category:"boolean",supportedOperators:["is-checked","is-not-checked"],valueInputType:"none"},{id:"dependencies.isBlocked",label:"Blocked",category:"boolean",supportedOperators:["is-checked","is-not-checked"],valueInputType:"none"},{id:"dependencies.isBlocking",label:"Blocking Others",category:"boolean",supportedOperators:["is-checked","is-not-checked"],valueInputType:"none"}],FX=[{id:"is",label:"is",requiresValue:!0},{id:"is-not",label:"is not",requiresValue:!0},{id:"contains",label:"contains",requiresValue:!0},{id:"does-not-contain",label:"does not contain",requiresValue:!0},{id:"is-before",label:"is before",requiresValue:!0},{id:"is-after",label:"is after",requiresValue:!0},{id:"is-on-or-before",label:"is on or before",requiresValue:!0},{id:"is-on-or-after",label:"is on or after",requiresValue:!0},{id:"is-empty",label:"is empty",requiresValue:!1},{id:"is-not-empty",label:"is not empty",requiresValue:!1},{id:"is-checked",label:"is checked",requiresValue:!1},{id:"is-not-checked",label:"is not checked",requiresValue:!1},{id:"is-greater-than",label:"is greater than",requiresValue:!0},{id:"is-less-than",label:"is less than",requiresValue:!0},{id:"is-greater-than-or-equal",label:"is equal or greater than",requiresValue:!0},{id:"is-less-than-or-equal",label:"is equal or less than",requiresValue:!0}]});var $X={};Xe($X,{DEFAULT_CORE_FIELDS:()=>OX,DEFAULT_FIELD_GROUPS:()=>LX,createDefaultFieldConfig:()=>zX,getFieldsByGroup:()=>iOe,getFieldsForModal:()=>BX,initializeFieldConfig:()=>Nl,migrateUserFieldsToFieldConfig:()=>jX});function zX(){return{version:1,fields:[...OX],groups:[...LX]}}function BX(n,e){return n.fields.filter(t=>t.enabled).filter(t=>e?t.visibleInCreation:t.visibleInEdit).sort((t,r)=>{var o,l;let a=n.groups.find(c=>c.id===t.group),i=n.groups.find(c=>c.id===r.group),s=((o=a==null?void 0:a.order)!=null?o:0)-((l=i==null?void 0:i.order)!=null?l:0);return s!==0?s:t.order-r.order})}function iOe(n,e){let t=BX(n,e),r=new Map;for(let a of t){let i=r.get(a.group)||[];i.push(a),r.set(a.group,i)}return r}function jX(n){return!n||n.length===0?[]:n.map((e,t)=>({id:e.id||`user-${t}`,fieldType:"user",group:"custom",displayName:e.displayName||`Field ${t+1}`,visibleInCreation:!0,visibleInEdit:!0,order:t,enabled:!0}))}function Nl(n,e){if(n)return n;let t=zX();if(e&&e.length>0){let r=jX(e);t.fields.push(...r)}return t}var LX,OX,bb=y(()=>{LX=[{id:"basic",displayName:"Basic Information",order:0,collapsible:!1,defaultCollapsed:!1},{id:"metadata",displayName:"Metadata",order:1,collapsible:!0,defaultCollapsed:!1},{id:"organization",displayName:"Organization",order:2,collapsible:!0,defaultCollapsed:!1},{id:"dependencies",displayName:"Dependencies",order:3,collapsible:!0,defaultCollapsed:!1},{id:"custom",displayName:"Custom Fields",order:4,collapsible:!0,defaultCollapsed:!1}],OX=[{id:"title",fieldType:"core",group:"basic",displayName:"Title",visibleInCreation:!0,visibleInEdit:!0,order:0,enabled:!0,required:!0},{id:"details",fieldType:"core",group:"basic",displayName:"Details",visibleInCreation:!0,visibleInEdit:!0,order:1,enabled:!0},{id:"contexts",fieldType:"core",group:"metadata",displayName:"Contexts",visibleInCreation:!0,visibleInEdit:!0,order:0,enabled:!0},{id:"tags",fieldType:"core",group:"metadata",displayName:"Tags",visibleInCreation:!0,visibleInEdit:!0,order:1,enabled:!0},{id:"time-estimate",fieldType:"core",group:"metadata",displayName:"Time Estimate",visibleInCreation:!0,visibleInEdit:!0,order:2,enabled:!0},{id:"projects",fieldType:"organization",group:"organization",displayName:"Projects",visibleInCreation:!0,visibleInEdit:!0,order:0,enabled:!0},{id:"subtasks",fieldType:"organization",group:"organization",displayName:"Subtasks",visibleInCreation:!0,visibleInEdit:!0,order:1,enabled:!0},{id:"blocked-by",fieldType:"dependency",group:"dependencies",displayName:"Blocked By",visibleInCreation:!0,visibleInEdit:!0,order:0,enabled:!0},{id:"blocking",fieldType:"dependency",group:"dependencies",displayName:"Blocking",visibleInCreation:!0,visibleInEdit:!0,order:1,enabled:!0}]});function UX(n,e,t){if(!(e!=null&&e.fields))return!0;let r=e.fields.find(i=>i.id===n);if(!r)return!0;let a=t?r.visibleInCreation:r.visibleInEdit;return!!r.enabled&&!!a}function HX(n,e){let{getFieldsByGroup:t}=(bb(),BP($X)),r=t(n,e);return[...n.groups||[]].sort((i,s)=>i.order-s.order).map(i=>({id:i.id,fields:r.get(i.id)||[]})).filter(i=>i.fields.length>0)}var Y1=y(()=>{});function K1(n){let{container:e,fieldConfig:t,fieldRenderers:r,renderUserField:a}=n,i=r[t.id];return i?(i(e,t),!0):t.fieldType==="user"?(a(e,t),!0):!1}function VX(n){let e=HX(n.config,n.isCreationMode),t={groupsRendered:0,fieldsRendered:0,ignoredFieldIds:[]};for(let r of e){let a=r.id==="basic"?r.fields.filter(s=>!sOe.has(s.id)):r.fields;if(a.length===0)continue;let i=n.container.createDiv({cls:"task-modal__field-group"});t.groupsRendered+=1;for(let s of a)K1({container:i,fieldConfig:s,fieldRenderers:n.fieldRenderers,renderUserField:n.renderUserField})?t.fieldsRendered+=1:t.ignoredFieldIds.push(s.id)}return t}var sOe,WX=y(()=>{Y1();sOe=new Set(["title","details"])});function Z1(n){let e=typeof n=="function"?n():n,t=e==null?void 0:e.trim();return t||null}function oOe(n,e,t={}){let r=["TaskNotes"],a=Z1(n);return a&&r.push(a),t.category&&r.push(t.category),t.operation&&r.push(t.operation),`${r.map(i=>`[${i}]`).join("")} ${e}`}function e0(n,e,t,r,a){let i=[oOe(t,r,a)];a!=null&&a.details&&i.push(a.details),(a==null?void 0:a.error)!==void 0&&i.push(a.error),n[e](...i)}function M(n={}){var r,a;let e=(r=n.sink)!=null?r:console,t=(a=n.isDebugEnabled)!=null?a:(()=>!1);return{debug(i,s){t()&&e0(e,"debug",n.tag,i,s)},info(i,s){e0(e,"info",n.tag,i,s)},warn(i,s){e0(e,"warn",n.tag,i,s)},error(i,s){e0(e,"error",n.tag,i,s)},child(i){let s=n.tag;return M({...n,tag:()=>{let o=Z1(s),l=Z1(i);return[o,l].filter(Boolean).join("/")}})}}}var q=y(()=>{});function qX(n,e){let t=Object.keys(e).map(r=>lOe(n,r,e[r]));return t.length===1?t[0]:function(){t.forEach(r=>r())}}function lOe(n,e,t){let r=n[e],a=n.hasOwnProperty(e),i=a?r:function(){return Object.getPrototypeOf(n)[e].apply(this,arguments)},s=t(i);return r&&Object.setPrototypeOf(s,r),Object.setPrototypeOf(o,s),n[e]=o,l;function o(...c){return s===i&&n[e]===o&&l(),s.apply(this,c)}function l(){n[e]===o&&(a?n[e]=i:delete n[e]),s!==i&&(s=i,Object.setPrototypeOf(o,r||Function))}}var GX=y(()=>{});function YX(n){var i;let e=n.workspace.getActiveFile(),t=e instanceof Q1.TFile&&e.extension==="md"?e:n.vault.getMarkdownFiles()[0];if(!t){let s=Q1.TFile;t=new s(n.vault,"__tasknotes_editor_probe__.md")}let r=activeWindow.createDiv(),a=n.embedRegistry.embedByExtension.md({app:n,containerEl:r},t,"");try{a.editable=!0,a.showEditor();let s=a.editMode;if(!s)throw new Error("Markdown editor edit mode was not initialized");return Object.getPrototypeOf(Object.getPrototypeOf(s)).constructor}finally{try{(i=a.editMode)==null||i.destroy()}finally{a.unload(),r.remove()}}}var Q1,KX=y(()=>{Q1=require("obsidian")});var ez={};Xe(ez,{EmbeddableMarkdownEditor:()=>X1,getMarkdownEditorTooltipParent:()=>JX});function cOe(){return typeof app=="undefined"?class{constructor(e,t,r){this.containerEl=activeWindow.createDiv();this.editor={cm:new pd.EditorView};this.editorEl=activeWindow.createDiv();this.owner={editMode:null,editor:null};this._loaded=!1;this.app=e,this.containerEl=t}set(e){let t=this.editor.cm;t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}})}onUpdate(e,t){}buildLocalExtensions(){return[]}destroy(){}unload(){}}:YX(app)}function JX(n){var e,t;return(t=(e=n.ownerDocument)==null?void 0:e.body)!=null?t:activeDocument.body}var QX,Rl,pd,ZX,J1,X1,tz=y(()=>{QX=require("obsidian"),Rl=require("@codemirror/state"),pd=require("@codemirror/view");GX();KX();ZX={cursorLocation:void 0,value:"",cls:"",placeholder:"",onEnter:()=>!1,onEscape:()=>{},onTab:()=>!1,onSubmit:()=>{},onBlur:()=>{},onPaste:()=>{},onChange:()=>{},extensions:[],enterVimInsertMode:!1,file:void 0};J1=class{constructor(e){this.view=e}getDoc(){return this}getValue(){return this.view.state.doc.toString()}setValue(e){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:e}})}getLine(e){return this.view.state.doc.line(e+1).text}lineCount(){return this.view.state.doc.lines}lastLine(){return this.lineCount()-1}getSelection(){let e=this.view.state.selection.main;return this.view.state.doc.sliceString(e.from,e.to)}somethingSelected(){return!this.view.state.selection.main.empty}setHeading(e){let t=Math.max(0,Math.min(6,Number(e)||0)),r=t>0?`${"#".repeat(t)} `:"";this.updateSelectedLines(a=>{let i=a.replace(/^ {0,3}#{1,6}\s+/,"");return`${r}${i}`})}toggleBulletList(){let t=this.getSelectedLines().some(r=>/^\s*[-*+]\s+/.test(r.text));this.updateSelectedLines(r=>{var s;if(t)return r.replace(/^(\s*)[-*+]\s+/,"$1");let[,a="",i=""]=(s=r.match(/^(\s*)(.*)$/))!=null?s:[];return`${a}- ${i}`})}toggleNumberedList(){let t=this.getSelectedLines().some(r=>/^\s*\d+[.)]\s+/.test(r.text));this.updateSelectedLines((r,a)=>{var o;if(t)return r.replace(/^(\s*)\d+[.)]\s+/,"$1");let[,i="",s=""]=(o=r.match(/^(\s*)(.*)$/))!=null?o:[];return`${i}${a+1}. ${s}`})}toggleNumberList(){this.toggleNumberedList()}toggleCheckListStatus(){this.updateSelectedLines(e=>{var a;if(/^(\s*[-*+]\s+\[[ xX]\]\s*)/.test(e))return e.replace(/^(\s*[-*+]\s+\[)([ xX])(\]\s*)/,(i,s,o,l)=>`${s}${o.toLowerCase()==="x"?" ":"x"}${l}`);if(/^\s*[-*+]\s+/.test(e))return e.replace(/^(\s*[-*+]\s+)/,"$1[ ] ");let[,t="",r=""]=(a=e.match(/^(\s*)(.*)$/))!=null?a:[];return`${t}- [ ] ${r}`})}toggleCheckList(){this.toggleCheckListStatus()}getRange(e,t){return this.view.state.doc.sliceString(this.posToOffset(e),this.posToOffset(t))}replaceSelection(e){let t=this.view.state.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:e},range:Rl.EditorSelection.cursor(r.from+e.length)}));this.view.dispatch(t)}replaceRange(e,t,r){this.view.dispatch({changes:{from:this.posToOffset(t),to:this.posToOffset(r!=null?r:t),insert:e}})}getCursor(e="head"){let t=this.view.state.selection.main;switch(e){case"from":return this.offsetToPos(t.from);case"to":return this.offsetToPos(t.to);case"anchor":return this.offsetToPos(t.anchor);case"head":default:return this.offsetToPos(t.head)}}listSelections(){return this.view.state.selection.ranges.map(e=>({anchor:this.offsetToPos(e.anchor),head:this.offsetToPos(e.head)}))}setCursor(e,t){if(typeof e=="number"){this.setSelection({line:e,ch:t!=null?t:0});return}this.setSelection(e)}setSelection(e,t){this.view.dispatch({selection:Rl.EditorSelection.range(this.posToOffset(e),this.posToOffset(t!=null?t:e))})}setSelections(e,t=0){e.length!==0&&this.view.dispatch({selection:Rl.EditorSelection.create(e.map(r=>{var a;return Rl.EditorSelection.range(this.posToOffset(r.anchor),this.posToOffset((a=r.head)!=null?a:r.anchor))}),t)})}focus(){this.view.focus()}blur(){this.view.contentDOM.blur()}hasFocus(){return this.view.hasFocus}transaction(e){var a,i;if(e.replaceSelection!==void 0){this.replaceSelection(e.replaceSelection);return}let t=(a=e.changes)==null?void 0:a.map(s=>{var o;return{from:this.posToOffset(s.from),to:this.posToOffset((o=s.to)!=null?o:s.from),insert:s.text}}),r=(i=e.selections)!=null?i:e.selection?[e.selection]:void 0;this.view.dispatch({...t?{changes:t}:{},...r&&r.length>0?{selection:Rl.EditorSelection.create(r.map(s=>{var o;return Rl.EditorSelection.range(this.posToOffset(s.from),this.posToOffset((o=s.to)!=null?o:s.from))}))}:{}})}posToOffset(e){let t=Math.max(1,Math.min(e.line+1,this.view.state.doc.lines)),r=this.view.state.doc.line(t);return Math.max(r.from,Math.min(r.from+e.ch,r.to))}offsetToPos(e){let t=Math.max(0,Math.min(e,this.view.state.doc.length)),r=this.view.state.doc.lineAt(t);return{line:r.number-1,ch:t-r.from}}getSelectedLines(){let e=this.view.state.doc,t=new Set;for(let r of this.view.state.selection.ranges){let a=Math.min(r.from,r.to),i=Math.max(r.from,r.to),s=e.lineAt(a).number,o=e.lineAt(i).number;o>s&&i===e.line(o).from&&(o-=1);for(let l=s;l<=o;l+=1)t.add(l)}return Array.from(t).sort((r,a)=>r-a).map(r=>{let a=e.line(r);return{number:r,text:a.text}})}updateSelectedLines(e){let t=this.view.state.doc,r=this.getSelectedLines().map((a,i)=>{let s=t.line(a.number);return{from:s.from,to:s.to,insert:e(a.text,i)}});r.length!==0&&this.view.dispatch({changes:r})}},X1=class extends cOe(){constructor(t,r,a={}){super(t,r,{app:t,onMarkdownScroll:()=>{},getMode:()=>"source"});this.hasEnteredVimInsertMode=!1;this.options={...ZX,...a},this.initial_value=this.options.value,this.scope=new QX.Scope(this.app.scope),this.scope.register(["Mod"],"Enter",(i,s)=>!0),this.scope.register(["Mod","Shift"],"Enter",(i,s)=>!0),this.owner.editMode=this,this.owner.editor=this.editor,this.activeEditorOwner={editMode:this,editor:new J1(this.editor.cm),file:this.getActiveEditorFile(),getMode:()=>"source"},this.set(a.value||""),this.uninstaller=qX(this.app.workspace,{setActiveLeaf:i=>function(...s){var o;(o=this.activeCM)!=null&&o.hasFocus||i.call(this,...s)}}),this.options.onBlur!==ZX.onBlur&&this.editor.cm.contentDOM.addEventListener("blur",()=>{this.app.keymap.popScope(this.scope),this._loaded&&this.options.onBlur(this)}),this.editor.cm.contentDOM.addEventListener("focusin",()=>{this.app.keymap.pushScope(this.scope),this.activeEditorOwner.file=this.getActiveEditorFile(),this.app.workspace.activeEditor=this.activeEditorOwner,this.options.enterVimInsertMode&&!this.hasEnteredVimInsertMode&&(this.hasEnteredVimInsertMode=!0,this.enterVimInsertMode())}),a.cls&&this.editorEl.classList.add(a.cls),a.cursorLocation&&this.editor.cm.dispatch({selection:Rl.EditorSelection.range(a.cursorLocation.anchor,a.cursorLocation.head)})}getActiveEditorFile(){var t;return this.options.file!==void 0?(t=this.options.file)!=null?t:null:this.app.workspace.getActiveFile()}get value(){return this.editor.cm.state.doc.toString()}setValue(t){this.set(t)}enterVimInsertMode(){window.setTimeout(()=>{var t,r;try{if(!this.app.vault.getConfig("vimMode"))return;let i=(t=window.CodeMirrorAdapter)==null?void 0:t.Vim;if(!i)return;let s=(r=this.editor.cm.cm)!=null?r:this.activeCM;if(!s)return;i.handleKey(s,"i","api")}catch(a){}},50)}onUpdate(t,r){super.onUpdate(t,r),r&&this.options.onChange(this.value,t)}buildLocalExtensions(){let t=super.buildLocalExtensions();return t.push((0,pd.tooltips)({parent:JX(this.containerEl)})),this.options.placeholder&&t.push((0,pd.placeholder)(this.options.placeholder)),t.push(pd.EditorView.domEventHandlers({paste:r=>{this.options.onPaste(r,this)}})),t.push(Rl.Prec.highest(pd.keymap.of([{key:"Enter",run:r=>this.options.onEnter(this,!1,!1),shift:r=>this.options.onEnter(this,!1,!0)},{key:"Shift-Mod-Enter",run:r=>(this.options.onSubmit(this,!0),!0)},{key:"Mod-Enter",run:r=>(this.options.onSubmit(this,!1),!0)},{key:"Escape",run:r=>(this.options.onEscape(this),!0)},{key:"Tab",run:r=>this.options.onTab(this,!1)},{key:"Shift-Tab",run:r=>this.options.onTab(this,!0)}]))),this.options.extensions&&this.options.extensions.length>0&&t.push(...this.options.extensions),t}destroy(){this._loaded&&this.unload(),this.app.keymap.popScope(this.scope);let t=this.app.workspace;t.activeEditor===this.activeEditorOwner&&(t.activeEditor=null),this.uninstaller&&(this.uninstaller(),this.uninstaller=void 0),this.containerEl.empty(),super.destroy()}onunload(){this.destroy()}}});function uOe(){return(tz(),BP(ez)).EmbeddableMarkdownEditor}function t0(n,e,t){try{let r=uOe();return new r(n,e,{...t,onSubmit:(a,i)=>t.onSubmit(i),onTab:(a,i)=>t.onTab(i)})}catch(r){dOe.error("Failed to create markdown editor:",{category:"persistence",operation:"create-markdown-editor",error:r});let a=e.createEl("textarea",{cls:t.cls+"-fallback",placeholder:t.placeholder});return a.value=t.value,a.addEventListener("input",i=>{t.onChange(i.target.value)}),a.addEventListener("keydown",i=>{i.key==="Enter"&&(i.ctrlKey||i.metaKey)?(i.preventDefault(),t.onSubmit(i.shiftKey)):i.key==="Escape"?(i.preventDefault(),t.onEscape()):i.key==="Tab"&&t.onTab(i.shiftKey)&&i.preventDefault()}),null}}var dOe,rz=y(()=>{q();dOe=M({tag:"Modals/TaskModalEditorAdapter"})});function XX(n){var r;let e=n.parent.createDiv("detail-label");e.textContent=n.label;let t=n.parent.createDiv("tn-task-modal__markdown-editor tn-task-modal__markdown-editor--details");return n.attachMobileKeyboardScrollGuard(t),t0(n.app,t,{value:n.value,placeholder:n.placeholder,cls:"details-editor",onChange:n.onChange,onSubmit:n.onSubmit,onEscape:n.onEscape,onTab:a=>n.tabMovesFocus?a?n.focusPreviousField():n.focusNextField():!1,file:(r=n.file)!=null?r:null})}function eee(n,e){n==null||n.setValue(e)}function tee(n){n==null||n.destroy()}var nz=y(()=>{rz()});function pOe(n){if(n==null)return;let t=(Array.isArray(n)?n:[n]).filter(r=>typeof r=="string").map(r=>r.trim()).filter(r=>r.length>0);return t.length>0?t:void 0}function oee(n){let e=yOe(n),t=e.match(iz);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s);if(!lee(o,l,c))throw new Error(`Invalid date "${n}".`);return new Date(Date.UTC(o,l-1,c,0,0,0,0))}if(!vOe(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!cee(r))throw new Error(`Invalid date "${n}".`);return r}function fOe(n){if(!cee(n))return"";let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}function hOe(n){if(!/^\d{4}-\d{2}-\d{2}$/.test(n))throw new Error(`Invalid date "${n}". Expected YYYY-MM-DD.`);return oee(n),n}function gOe(n){if(!n)return"";let e=n.trim();if(iz.test(e))return e;let t=e.indexOf("T");if(t>-1)return e.slice(0,t);let r=e.indexOf(" ");return r>-1&&iz.test(e.slice(0,r))?e.slice(0,r):fOe(oee(e))}function ree(n){let e=[],t=new Set;for(let r of n)if(typeof r=="string")try{let a=hOe(gOe(r.trim()));t.has(a)||(t.add(a),e.push(a))}catch(a){}return e}function yOe(n,e="Date string cannot be empty"){if(!n||n.trim().length===0)throw new Error(e);return n.trim()}function vOe(n){let e=n.match(mOe);if(!e)return!1;let[,t,r,a,i,s,o,,l,c,d]=e;return lee(Number(t),Number(r),Number(a))&&kOe(Number(i),Number(s),Number(o))&&TOe(l,c,d)}function lee(n,e,t){let r=new Date(Date.UTC(n,e-1,t,0,0,0,0));return r.getUTCFullYear()===n&&r.getUTCMonth()===e-1&&r.getUTCDate()===t}function kOe(n,e,t){return n>=0&&n<=23&&e>=0&&e<=59&&t>=0&&t<=59}function TOe(n,e,t){if(!n)return!0;let r=Number(e),a=Number(t);return!(r>14||a>59||r===14&&a!==0)}function cee(n){return n instanceof Date&&!Number.isNaN(n.getTime())}function lz(n,e){return n[e]}function uee(n){if(typeof n=="string")return n;if(Array.isArray(n))return n.map(e=>String(e)).join(", ");if(n!=null){if(typeof n=="object")return"";if(typeof n=="number"||typeof n=="boolean")return String(n)}}function zu(n,e=iee){return yee(An(n),e)}function Bu(n,e=see){return yee(An(n),e)}function a0(n){let e=[],t=new Set,r=a=>{let i=pee(String(a));!i||t.has(i)||(t.add(i),e.push(i))};return Array.isArray(n)?(n.forEach(r),e):(typeof n=="string"&&n.trim().length>0&&r(n),e)}function pee(n){let e=n.trim();return(e.startsWith("#")?e.slice(1).trim():e).replace(/\s+/g,"-")}function cz(n,e,t,r=!1,a=[],i=iee,s=see){if(!e)return{};let o={path:t};if(typeof e.id=="string"&&e.id.trim().length>0&&(o.id=e.id),e[n.title]!==void 0){let l=uee(e[n.title]);l!==void 0&&l.trim().length>0?o.title=l:o.title=nee(t)}else(r||t)&&(o.title=nee(t));if(e[n.status]!==void 0&&(o.status=zu(e[n.status],i)),e[n.priority]!==void 0&&(o.priority=Bu(e[n.priority],s)),e[n.due]!==void 0&&(o.due=An(e[n.due])),e[n.scheduled]!==void 0&&(o.scheduled=An(e[n.scheduled])),e[n.contexts]!==void 0&&(o.contexts=r0(e[n.contexts])),e[n.projects]!==void 0&&(o.projects=r0(e[n.projects])),e[n.attachments]!==void 0&&(o.attachments=pOe(e[n.attachments])),e[n.timeEstimate]!==void 0&&(o.timeEstimate=bOe(e[n.timeEstimate])),e[n.completedDate]!==void 0&&(o.completedDate=An(e[n.completedDate])),e[n.recurrence]!==void 0&&(o.recurrence=An(e[n.recurrence])),e[n.recurrenceAnchor]!==void 0){let l=e[n.recurrenceAnchor];l==="scheduled"||l==="completion"?o.recurrence_anchor=l:l!=null&&!vee(l)&&(o.recurrence_anchor="scheduled")}if(e[n.dateCreated]!==void 0&&(o.dateCreated=An(e[n.dateCreated])),e[n.dateModified]!==void 0&&(o.dateModified=An(e[n.dateModified])),e[n.timeEntries]!==void 0&&(o.timeEntries=Array.isArray(e[n.timeEntries])?e[n.timeEntries]:[]),e[n.completeInstances]!==void 0){let l=e[n.completeInstances];o.complete_instances=ree(Array.isArray(l)?l:[l])}if(e[n.skippedInstances]!==void 0){let l=e[n.skippedInstances];o.skipped_instances=ree(Array.isArray(l)?l:[l])}if(e[n.recurrenceParent]!==void 0&&(o.recurrence_parent=An(e[n.recurrenceParent])),e[n.occurrenceDate]!==void 0&&(o.occurrence_date=An(e[n.occurrenceDate])),e[n.occurrenceMaterialization]!==void 0){let l=An(e[n.occurrenceMaterialization]);(l==="manual"||l==="on_completion"||l==="rolling")&&(o.occurrence_materialization=l)}if(e[n.occurrenceNextTrigger]!==void 0){let l=An(e[n.occurrenceNextTrigger]);(l==="completion"||l==="completion_or_skip")&&(o.occurrence_next_trigger=l)}if(e[n.occurrenceTemplate]!==void 0&&(o.occurrence_template=An(e[n.occurrenceTemplate])),e[n.occurrencePastHorizon]!==void 0&&(o.occurrence_past_horizon=An(e[n.occurrencePastHorizon])),e[n.occurrenceFutureHorizon]!==void 0&&(o.occurrence_future_horizon=An(e[n.occurrenceFutureHorizon])),n.blockedBy&&e[n.blockedBy]!==void 0&&(o.blockedBy=hee(e[n.blockedBy])),e[n.icsEventId]!==void 0&&(o.icsEventId=r0(e[n.icsEventId])),e[n.googleCalendarEventId]!==void 0&&(o.googleCalendarEventId=An(e[n.googleCalendarEventId])),e[n.googleCalendarExceptionEventId]!==void 0&&(o.googleCalendarExceptionEventId=An(e[n.googleCalendarExceptionEventId])),e[n.googleCalendarExceptionOriginalScheduled]!==void 0&&(o.googleCalendarExceptionOriginalScheduled=An(e[n.googleCalendarExceptionOriginalScheduled])),e[n.googleCalendarMovedOriginalDates]!==void 0&&(o.googleCalendarMovedOriginalDates=r0(e[n.googleCalendarMovedOriginalDates])),e[n.reminders]!==void 0&&(o.reminders=wOe(e[n.reminders])),e[n.sortOrder]!==void 0&&(o.sortOrder=An(e[n.sortOrder])),e.tags!==void 0){let l=a0(e.tags);o.tags=l,o.archived=l.includes(oz(n.archiveTag))}if(a.length>0){let l={},c=o;for(let d of a)e[d.key]!==void 0&&(c[d.key]=e[d.key],l[d.key]=e[d.key]);Object.keys(l).length>0&&(o.customProperties={...o.customProperties,...l})}return o}function dz(n,e,t,r=!1,a=[]){let i={};if(e.title!==void 0&&!r&&(i[n.title]=e.title),e.status!==void 0&&(i[n.status]=mee(e.status)),e.priority!==void 0&&(i[n.priority]=e.priority),e.due!==void 0&&(i[n.due]=e.due),e.scheduled!==void 0&&(i[n.scheduled]=e.scheduled),e.contexts!==void 0&&(!Array.isArray(e.contexts)||e.contexts.length>0)&&(i[n.contexts]=e.contexts),e.projects!==void 0&&(!Array.isArray(e.projects)||e.projects.length>0)&&(i[n.projects]=e.projects),e.attachments!==void 0&&e.attachments.length>0&&(i[n.attachments]=e.attachments),e.timeEstimate!==void 0&&(i[n.timeEstimate]=e.timeEstimate),e.completedDate!==void 0&&(i[n.completedDate]=e.completedDate),e.recurrence!==void 0&&(i[n.recurrence]=e.recurrence),e.recurrence_anchor!==void 0&&(i[n.recurrenceAnchor]=e.recurrence_anchor),e.recurrence_parent!==void 0&&(i[n.recurrenceParent]=e.recurrence_parent),e.occurrence_date!==void 0&&(i[n.occurrenceDate]=e.occurrence_date),e.occurrence_materialization!==void 0&&(i[n.occurrenceMaterialization]=e.occurrence_materialization),e.occurrence_next_trigger!==void 0&&(i[n.occurrenceNextTrigger]=e.occurrence_next_trigger),e.occurrence_template!==void 0&&(i[n.occurrenceTemplate]=e.occurrence_template),e.occurrence_past_horizon!==void 0&&(i[n.occurrencePastHorizon]=e.occurrence_past_horizon),e.occurrence_future_horizon!==void 0&&(i[n.occurrenceFutureHorizon]=e.occurrence_future_horizon),e.dateCreated!==void 0&&(i[n.dateCreated]=e.dateCreated),e.dateModified!==void 0&&(i[n.dateModified]=e.dateModified),e.sortOrder!==void 0&&(i[n.sortOrder]=e.sortOrder),e.timeEntries!==void 0&&(i[n.timeEntries]=e.timeEntries),e.complete_instances!==void 0&&(i[n.completeInstances]=e.complete_instances),e.skipped_instances!==void 0&&e.skipped_instances.length>0&&(i[n.skippedInstances]=e.skipped_instances),e.blockedBy!==void 0){let u=Array.isArray(e.blockedBy)?e.blockedBy.map(hz).filter(p=>!!p):[];u.length>0&&(i[n.blockedBy]=gee(u))}e.icsEventId!==void 0&&e.icsEventId.length>0&&(i[n.icsEventId]=e.icsEventId),e.googleCalendarEventId!==void 0&&(i[n.googleCalendarEventId]=e.googleCalendarEventId),e.googleCalendarExceptionEventId!==void 0&&(i[n.googleCalendarExceptionEventId]=e.googleCalendarExceptionEventId),e.googleCalendarExceptionOriginalScheduled!==void 0&&(i[n.googleCalendarExceptionOriginalScheduled]=e.googleCalendarExceptionOriginalScheduled),e.googleCalendarMovedOriginalDates!==void 0&&e.googleCalendarMovedOriginalDates.length>0&&(i[n.googleCalendarMovedOriginalDates]=e.googleCalendarMovedOriginalDates),e.reminders!==void 0&&e.reminders.length>0&&(i[n.reminders]=e.reminders);let s=a0(e.tags),o=t?oz(t):"",l=oz(n.archiveTag);o&&!s.includes(o)&&s.push(o),e.archived===!0&&!s.includes(l)?s.push(l):e.archived===!1&&(s=s.filter(u=>u!==l)),s.length>0&&(i.tags=s);let c=e.customProperties,d=e;for(let u of a)Object.prototype.hasOwnProperty.call(d,u.key)&&d[u.key]!==void 0?i[u.key]=d[u.key]:c&&Object.prototype.hasOwnProperty.call(c,u.key)&&c[u.key]!==void 0&&(i[u.key]=c[u.key]);return i}function mee(n){let e=n.toLowerCase();return e==="true"||e==="false"?e==="true":n}function i0(n,e){for(let[t,r]of Object.entries(n))if(r===e)return t;return null}function uz(n,e){return i0(n,e)!==null}function pz(n,e,t){return n[t]===e}function mz(n,e){return e.map(t=>n[t])}function fz(n){let e=[],t=Object.keys(n);for(let a of t)(!n[a]||n[a].trim()==="")&&e.push(`Field "${a}" cannot be empty`);let r=Object.values(n);return r.length!==new Set(r).size&&e.push("Field mappings must have unique property names"),{valid:e.length===0,errors:e}}function fee(n){return dee.includes(n)}function hz(n){if(typeof n=="string"){let s=n0(n.trim());return s?{uid:s,reltype:sz}:null}if(!n||typeof n!="object")return null;let e=n,t=typeof e.uid=="string"?e.uid.trim():"";if(!t)return null;let r=typeof e.reltype=="string"?e.reltype.trim().toUpperCase():"",a=fee(r)?r:sz,i=typeof e.gap=="string"&&e.gap.trim().length>0?e.gap.trim():void 0;return i?{uid:n0(t),reltype:a,gap:i}:{uid:n0(t),reltype:a}}function hee(n){if(n==null)return;let e=(Array.isArray(n)?n:[n]).map(hz).filter(t=>!!t);return e.length>0?e:void 0}function gee(n){return n.map(e=>{let r={uid:e.uid.startsWith("[[")?e.uid:`[[${e.uid}]]`,reltype:e.reltype};return e.gap&&e.gap.trim().length>0&&(r.gap=e.gap),r})}function n0(n){let e=n.trim(),t=e.match(/^\[\[([^|\]#]+)(?:#[^\]|]+)?(?:\|[^\]]+)?\]\]$/);if(t)return t[1].trim();let r=e.match(/^\[[^\]]+\]\(([^)#]+)(?:#[^)]+)?\)$/);return r?decodeURI(r[1].trim()):e}function yee(n,e=[]){if(n===void 0||e.length===0)return n;let t=e.find(o=>o.value===n);if(t)return t.value;let r=az(e,o=>o.label===n);if(r)return r.value;let a=n.trim().toLocaleLowerCase();if(a.length===0)return n;let i=az(e,o=>o.value.trim().toLocaleLowerCase()===a);if(i)return i.value;let s=az(e,o=>o.label.trim().toLocaleLowerCase()===a);return s?s.value:n}function az(n,e){let t=n.filter(e);return t.length===1?t[0]:void 0}function An(n){if(n!=null){if(typeof n=="string")return vee(n)?void 0:n;if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return n.length===1?An(n[0]):void 0}}function r0(n){return Array.isArray(n)?n.map(String):[String(n)]}function bOe(n){if(typeof n=="number")return n;if(typeof n=="string"&&n.trim()!==""){let e=Number(n);return Number.isNaN(e)?void 0:e}}function wOe(n){if(Array.isArray(n)){let e=n.filter(t=>t!=null);return e.length>0?e:void 0}return n!=null?[n]:void 0}function oz(n){var e;return(e=a0(n)[0])!=null?e:""}function nee(n){var e;return((e=n.split("/").pop())==null?void 0:e.replace(/\.md$/i,"").trim())||void 0}function vee(n){return typeof n=="string"&&n.trim().length===0}var aee,iee,see,iz,mOe,sz,dee,gz=y(()=>{aee={title:"title",status:"status",priority:"priority",due:"due",scheduled:"scheduled",contexts:"contexts",projects:"projects",attachments:"attachments",timeEstimate:"timeEstimate",completedDate:"completedDate",dateCreated:"dateCreated",dateModified:"dateModified",recurrence:"recurrence",recurrenceAnchor:"recurrence_anchor",recurrenceParent:"recurrence_parent",occurrenceDate:"occurrence_date",occurrenceMaterialization:"occurrence_materialization",occurrenceNextTrigger:"occurrence_next_trigger",occurrenceTemplate:"occurrence_template",occurrencePastHorizon:"occurrence_past_horizon",occurrenceFutureHorizon:"occurrence_future_horizon",archiveTag:"archived",timeEntries:"timeEntries",completeInstances:"complete_instances",skippedInstances:"skipped_instances",blockedBy:"blockedBy",pomodoros:"pomodoros",icsEventId:"icsEventId",icsEventTag:"ics_event",googleCalendarEventId:"googleCalendarEventId",googleCalendarExceptionEventId:"googleCalendarExceptionEventId",googleCalendarExceptionOriginalScheduled:"googleCalendarExceptionOriginalScheduled",googleCalendarMovedOriginalDates:"googleCalendarMovedOriginalDates",reminders:"reminders",sortOrder:"tasknotes_manual_order"},iee=[{id:"none",value:"none",label:"None",color:"#cccccc",isCompleted:!1,excludeFromCycle:!1,order:0,autoArchive:!1,autoArchiveDelay:5},{id:"open",value:"open",label:"Open",color:"#808080",isCompleted:!1,excludeFromCycle:!1,order:1,autoArchive:!1,autoArchiveDelay:5},{id:"in-progress",value:"in-progress",label:"In progress",color:"#0066cc",isCompleted:!1,excludeFromCycle:!1,order:2,autoArchive:!1,autoArchiveDelay:5},{id:"done",value:"done",label:"Done",color:"#00aa00",isCompleted:!0,excludeFromCycle:!1,order:3,autoArchive:!1,autoArchiveDelay:5}],see=[{id:"none",value:"none",label:"None",color:"#cccccc",weight:0},{id:"low",value:"low",label:"Low",color:"#00aa00",weight:1},{id:"normal",value:"normal",label:"Normal",color:"#ffaa00",weight:2},{id:"high",value:"high",label:"High",color:"#ff0000",weight:3}];iz=/^(\d{4})-(\d{2})-(\d{2})$/,mOe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,3})?(?:Z|([+-])(\d{2}):(\d{2}))?$/;sz="FINISHTOSTART",dee=["FINISHTOSTART","FINISHTOFINISH","STARTTOSTART","STARTTOFINISH"]});var wb=y(()=>{gz()});var tf,yz=y(()=>{wb();tf=class{constructor(e,t=[],r=[],a=[]){this.mapping=e;this.userFields=t;this.statuses=r;this.priorities=a}updateUserFields(e){this.userFields=e}updateConfiguredValues(e,t){this.statuses=e,this.priorities=t}getUserFields(){return[...this.userFields]}toUserField(e){return lz(this.mapping,e)}mapFromFrontmatter(e,t,r){let a=e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0;return cz(this.mapping,a,t,r,this.userFields,this.statuses,this.priorities)}mapToFrontmatter(e,t,r){return dz(this.mapping,e,t,r,this.userFields)}updateMapping(e){this.mapping=e}getMapping(){return{...this.mapping}}lookupMappingKey(e){return i0(this.mapping,e)}isRecognizedProperty(e){return uz(this.mapping,e)}isPropertyForField(e,t){return pz(this.mapping,e,t)}toUserFields(e){return mz(this.mapping,e)}fromUserField(e){return this.lookupMappingKey(e)}static validateMapping(e){return fz(e)}}});var Sb,s0=y(()=>{gz();Sb=aee});var Qg,bn,rf=y(()=>{Qg=["MO","TU","WE","TH","FR","SA","SU"],bn=(function(){function n(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return n.fromStr=function(e){return new n(Qg.indexOf(e))},n.prototype.nth=function(e){return this.n===e?this:new n(this.weekday,e)},n.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},n.prototype.toString=function(){var e=Qg[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n})()});function nf(n,e,t){t===void 0&&(t=" ");var r=String(n);return e=e>>0,r.length>e?String(r):(e=e-r.length,e>t.length&&(t+=It(t,e/t.length)),t.slice(0,e)+String(r))}var Ar,ds,vz,ua,Hs,It,kee,Tee,_a,o0,us,wn,Ft,ii=y(()=>{rf();Ar=function(n){return n!=null},ds=function(n){return typeof n=="number"},vz=function(n){return typeof n=="string"&&Qg.includes(n)},ua=Array.isArray,Hs=function(n,e){e===void 0&&(e=n),arguments.length===1&&(e=n,n=0);for(var t=[],r=n;r<e;r++)t.push(r);return t},It=function(n,e){var t=0,r=[];if(ua(n))for(;t<e;t++)r[t]=[].concat(n);else for(;t<e;t++)r[t]=n;return r},kee=function(n){return ua(n)?n:[n]};Tee=function(n,e,t){var r=n.split(e);return t?r.slice(0,t).concat([r.slice(t).join(e)]):r},_a=function(n,e){var t=n%e;return t*e<0?t+e:t},o0=function(n,e){return{div:Math.floor(n/e),mod:_a(n,e)}},us=function(n){return!Ar(n)||n.length===0},wn=function(n){return!us(n)},Ft=function(n,e){return wn(n)&&n.indexOf(e)!==-1}});var Go,SOe,wee,l0,See,COe,Jg,kz,af,xOe,Cb,c0,EOe,md,Tz,d0,u0,bz,fd,Xg,xb,bee,Cee,Fa=y(()=>{ii();Go=function(n,e,t,r,a,i){return r===void 0&&(r=0),a===void 0&&(a=0),i===void 0&&(i=0),new Date(Date.UTC(n,e-1,t,r,a,i))},SOe=[31,28,31,30,31,30,31,31,30,31,30,31],wee=1e3*60*60*24,l0=9999,See=Go(1970,1,1),COe=[6,0,1,2,3,4,5],Jg=function(n){return n%4===0&&n%100!==0||n%400===0},kz=function(n){return n instanceof Date},af=function(n){return kz(n)&&!isNaN(n.getTime())},xOe=function(n,e){var t=n.getTime(),r=e.getTime(),a=t-r;return Math.round(a/wee)},Cb=function(n){return xOe(n,See)},c0=function(n){return new Date(See.getTime()+n*wee)},EOe=function(n){var e=n.getUTCMonth();return e===1&&Jg(n.getUTCFullYear())?29:SOe[e]},md=function(n){return COe[n.getUTCDay()]},Tz=function(n,e){var t=Go(n,e+1,1);return[md(t),EOe(t)]},d0=function(n,e){return e=e||n,new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},u0=function(n){var e=new Date(n.getTime());return e},bz=function(n){for(var e=[],t=0;t<n.length;t++)e.push(u0(n[t]));return e},fd=function(n){n.sort(function(e,t){return e.getTime()-t.getTime()})},Xg=function(n,e){e===void 0&&(e=!0);var t=new Date(n);return[nf(t.getUTCFullYear().toString(),4,"0"),nf(t.getUTCMonth()+1,2,"0"),nf(t.getUTCDate(),2,"0"),"T",nf(t.getUTCHours(),2,"0"),nf(t.getUTCMinutes(),2,"0"),nf(t.getUTCSeconds(),2,"0"),e?"Z":""].join("")},xb=function(n){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,t=e.exec(n);if(!t)throw new Error("Invalid UNTIL value: ".concat(n));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},bee=function(n,e){var t=n.toLocaleString("sv-SE",{timeZone:e});return t.replace(" ","T")+"Z"},Cee=function(n,e){var t=Intl.DateTimeFormat().resolvedOptions().timeZone,r=new Date(bee(n,t)),a=new Date(bee(n,e!=null?e:"UTC")),i=a.getTime()-r.getTime();return new Date(n.getTime()-i)}});var DOe,hd,p0=y(()=>{DOe=(function(){function n(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e==="between"?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e==="before"?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e==="after"&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return n.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,r=this.maxDate&&e>this.maxDate;if(this.method==="between"){if(t)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},n.prototype.add=function(e){return this._result.push(e),!0},n.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},n.prototype.clone=function(){return new n(this.method,this.args)},n})(),hd=DOe});function ey(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wz(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function ce(n,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,i;r<a;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return n.concat(i||Array.prototype.slice.call(e))}var wz,pa,gd=y(()=>{wz=function(n,e){return wz=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},wz(n,e)};pa=function(){return pa=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pa.apply(this,arguments)}});var POe,Sz,xee=y(()=>{gd();p0();POe=(function(n){ey(e,n);function e(t,r,a){var i=n.call(this,t,r)||this;return i.iterator=a,i}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e})(hd),Sz=POe});var AOe,sf,m0=y(()=>{AOe={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},sf=AOe});var Eee,MOe,IOe,NOe,_l,Dee=y(()=>{m0();Vs();ii();Eee=function(n,e){return n.indexOf(e)!==-1},MOe=function(n){return n.toString()},IOe=function(n,e,t){return"".concat(e," ").concat(t,", ").concat(n)},NOe=(function(){function n(e,t,r,a){if(t===void 0&&(t=MOe),r===void 0&&(r=sf),a===void 0&&(a=IOe),this.text=[],this.language=r||sf,this.gettext=t,this.dateFormatter=a,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);i.sort(function(d,u){return d-u}),s.sort(function(d,u){return u-d}),this.bymonthday=i.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(Ar(this.origOptions.byweekday)){var o=ua(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],l=String(o);this.byweekday={allWeeks:o.filter(function(d){return!d.n}),someWeeks:o.filter(function(d){return!!d.n}),isWeekdays:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")===-1&&l.indexOf("SU")===-1,isEveryDay:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")!==-1&&l.indexOf("SU")!==-1};var c=function(d,u){return d.weekday-u.weekday};this.byweekday.allWeeks.sort(c),this.byweekday.someWeeks.sort(c),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in n.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var r in e.origOptions){if(Eee(["dtstart","tzid","wkst","freq"],r))return!0;if(!Eee(n.IMPLEMENTED[e.options.freq],r))return!1}return t},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[ye.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},n.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},n.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},n.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},n.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},n.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},n.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},n.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},n.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},n.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,r=this.gettext;if(e===-1)return r("last");var a=Math.abs(e);switch(a){case 1:case 21:case 31:t=a+r("st");break;case 2:case 22:t=a+r("nd");break;case 3:case 23:t=a+r("rd");break;default:t=a+r("th")}return e<0?t+" "+r("last"):t},n.prototype.monthtext=function(e){return this.language.monthNames[e-1]},n.prototype.weekdaytext=function(e){var t=ds(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},n.prototype.plural=function(e){return e%100!==1},n.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},n.prototype.list=function(e,t,r,a){var i=this;a===void 0&&(a=","),ua(e)||(e=[e]);var s=function(l,c,d){for(var u="",p=0;p<l.length;p++)p!==0&&(p===l.length-1?u+=" "+d+" ":u+=c+" "),u+=l[p];return u};t=t||function(l){return l.toString()};var o=function(l){return t&&t.call(i,l)};return r?s(e.map(o),a,r):e.map(o).join(a+" ")},n})(),_l=NOe});function Eb(n,e){e===void 0&&(e=sf);var t={},r=new ROe(e.tokens);if(!r.start(n))return null;return a(),t;function a(){r.expect("every");var p=r.acceptNumber();if(p&&(t.interval=parseInt(p[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":t.freq=ye.DAILY,r.nextSymbol()&&(s(),u());break;case"weekday(s)":t.freq=ye.WEEKLY,t.byweekday=[ye.MO,ye.TU,ye.WE,ye.TH,ye.FR],r.nextSymbol(),s(),u();break;case"week(s)":t.freq=ye.WEEKLY,r.nextSymbol()&&(i(),s(),u());break;case"hour(s)":t.freq=ye.HOURLY,r.nextSymbol()&&(i(),u());break;case"minute(s)":t.freq=ye.MINUTELY,r.nextSymbol()&&(i(),u());break;case"month(s)":t.freq=ye.MONTHLY,r.nextSymbol()&&(i(),u());break;case"year(s)":t.freq=ye.YEARLY,r.nextSymbol()&&(i(),u());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=ye.WEEKLY;var m=r.symbol.substr(0,2).toUpperCase();if(t.byweekday=[ye[m]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var f=l();if(!f)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");t.byweekday.push(ye[f]),r.nextSymbol()}s(),d(),u();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=ye.YEARLY,t.bymonth=[o()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var h=o();if(!h)throw new Error("Unexpected symbol "+r.symbol+", expected month");t.bymonth.push(h),r.nextSymbol()}i(),u();break;default:throw new Error("Unknown symbol")}}function i(){var p=r.accept("on"),m=r.accept("the");if(p||m)do{var f=c(),h=l(),g=o();if(f)h?(r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(ye[h].nth(f))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(f),r.accept("day(s)"));else if(h)r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(ye[h]);else if(r.symbol==="weekday(s)")r.nextSymbol(),t.byweekday||(t.byweekday=[ye.MO,ye.TU,ye.WE,ye.TH,ye.FR]);else if(r.symbol==="week(s)"){r.nextSymbol();var v=r.acceptNumber();if(!v)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(t.byweekno=[parseInt(v[0],10)];r.accept("comma");){if(v=r.acceptNumber(),!v)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.byweekno.push(parseInt(v[0],10))}}else if(g)r.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(g);else return}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function s(){var p=r.accept("at");if(p)do{var m=r.acceptNumber();if(!m)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(t.byhour=[parseInt(m[0],10)];r.accept("comma");){if(m=r.acceptNumber(),!m)throw new Error("Unexpected symbol "+r.symbol+"; expected hour");t.byhour.push(parseInt(m[0],10))}}while(r.accept("comma")||r.accept("at"))}function o(){switch(r.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function l(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function c(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var p=parseInt(r.value[1],10);if(p<-366||p>366)throw new Error("Nth out of range: "+p);return r.nextSymbol(),r.accept("last")?-p:p;default:return!1}}function d(){r.accept("on"),r.accept("the");var p=c();if(p)for(t.bymonthday=[p],r.nextSymbol();r.accept("comma");){if(p=c(),!p)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.bymonthday.push(p),r.nextSymbol()}}function u(){if(r.symbol==="until"){var p=Date.parse(r.text);if(!p)throw new Error("Cannot parse until date:"+r.text);t.until=new Date(p)}else r.accept("for")&&(t.count=parseInt(r.value[0],10),r.expect("number"))}}var ROe,Pee=y(()=>{m0();Vs();ROe=(function(){function n(e){this.done=!0,this.rules=e}return n.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},n.prototype.isDone=function(){return this.done&&this.symbol===null},n.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var r=void 0;e=null;for(var a in this.rules){r=this.rules[a];var i=r.exec(this.text);i&&(e===null||i[0].length>e[0].length)&&(e=i,t=a)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},n.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},n})()});function Db(n){return n<gt.HOURLY}var gt,yd=y(()=>{(function(n){n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY"})(gt||(gt={}))});var Aee,ty,Mee,Iee,Nee=y(()=>{Dee();Pee();Vs();yd();m0();Aee=function(n,e){return e===void 0&&(e=sf),new ye(Eb(n,e)||void 0)},ty=["count","until","interval","byweekday","bymonthday","bymonth"];_l.IMPLEMENTED=[];_l.IMPLEMENTED[gt.HOURLY]=ty;_l.IMPLEMENTED[gt.MINUTELY]=ty;_l.IMPLEMENTED[gt.DAILY]=["byhour"].concat(ty);_l.IMPLEMENTED[gt.WEEKLY]=ty;_l.IMPLEMENTED[gt.MONTHLY]=ty;_l.IMPLEMENTED[gt.YEARLY]=["byweekno","byyearday"].concat(ty);Mee=function(n,e,t,r){return new _l(n,e,t,r).toString()},Iee=_l.isFullyConvertible});var ry,Ree,f0=y(()=>{gd();yd();ii();Fa();ry=(function(){function n(e,t,r,a){this.hour=e,this.minute=t,this.second=r,this.millisecond=a||0}return n.prototype.getHours=function(){return this.hour},n.prototype.getMinutes=function(){return this.minute},n.prototype.getSeconds=function(){return this.second},n.prototype.getMilliseconds=function(){return this.millisecond},n.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},n})(),Ree=(function(n){ey(e,n);function e(t,r,a,i,s,o,l){var c=n.call(this,i,s,o,l)||this;return c.year=t,c.month=r,c.day=a,c}return e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return md(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var r=Math.floor(this.month/12),a=_a(this.month,12);this.month=a,this.year+=r,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+t*7:this.day+=-(this.getWeekday()-r)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,r,a){for(r&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var i=o0(this.hour,24),s=i.div,o=i.mod;if(s&&(this.hour=o,this.addDaily(s)),us(a)||Ft(a,this.hour))break}},e.prototype.addMinutes=function(t,r,a,i){for(r&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var s=o0(this.minute,60),o=s.div,l=s.mod;if(o&&(this.minute=l,this.addHours(o,!1,a)),(us(a)||Ft(a,this.hour))&&(us(i)||Ft(i,this.minute)))break}},e.prototype.addSeconds=function(t,r,a,i,s){for(r&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=o0(this.second,60),l=o.div,c=o.mod;if(l&&(this.second=c,this.addMinutes(l,!1,a,i)),(us(a)||Ft(a,this.hour))&&(us(i)||Ft(i,this.minute))&&(us(s)||Ft(s,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Tz(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>l0))return;t=Tz(this.year,this.month-1)[1]}}},e.prototype.add=function(t,r){var a=t.freq,i=t.interval,s=t.wkst,o=t.byhour,l=t.byminute,c=t.bysecond;switch(a){case gt.YEARLY:return this.addYears(i);case gt.MONTHLY:return this.addMonths(i);case gt.WEEKLY:return this.addWeekly(i,s);case gt.DAILY:return this.addDaily(i);case gt.HOURLY:return this.addHours(i,r,o);case gt.MINUTELY:return this.addMinutes(i,r,o,l);case gt.SECONDLY:return this.addSeconds(i,r,o,l,c)}},e})(ry)});function Cz(n){for(var e=[],t=Object.keys(n),r=0,a=t;r<a.length;r++){var i=a[r];Ft(Lee,i)||e.push(i),kz(n[i])&&!af(n[i])&&e.push(i)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return pa({},n)}function _ee(n){var e=pa(pa({},Pb),Cz(n));if(Ar(e.byeaster)&&(e.freq=ye.YEARLY),!(Ar(e.freq)&&ye.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(n.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),Ar(e.wkst)?ds(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=ye.MO.weekday,Ar(e.bysetpos)){ds(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++){var r=e.bysetpos[t];if(r===0||!(r>=-366&&r<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||wn(e.byweekno)||wn(e.byyearday)||e.bymonthday||wn(e.bymonthday)||Ar(e.byweekday)||Ar(e.byeaster)))switch(e.freq){case ye.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case ye.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case ye.WEEKLY:e.byweekday=[md(e.dtstart)];break}if(Ar(e.bymonth)&&!ua(e.bymonth)&&(e.bymonth=[e.bymonth]),Ar(e.byyearday)&&!ua(e.byyearday)&&ds(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ar(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ua(e.bymonthday)){for(var a=[],i=[],t=0;t<e.bymonthday.length;t++){var r=e.bymonthday[t];r>0?a.push(r):r<0&&i.push(r)}e.bymonthday=a,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ar(e.byweekno)&&!ua(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ar(e.byweekday))e.bynweekday=null;else if(ds(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(vz(e.byweekday))e.byweekday=[bn.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof bn)!e.byweekday.n||e.freq>ye.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var s=[],o=[],t=0;t<e.byweekday.length;t++){var l=e.byweekday[t];if(ds(l)){s.push(l);continue}else if(vz(l)){s.push(bn.fromStr(l).weekday);continue}!l.n||e.freq>ye.MONTHLY?s.push(l.weekday):o.push([l.weekday,l.n])}e.byweekday=wn(s)?s:null,e.bynweekday=wn(o)?o:null}return Ar(e.byhour)?ds(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<ye.HOURLY?[e.dtstart.getUTCHours()]:null,Ar(e.byminute)?ds(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<ye.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Ar(e.bysecond)?ds(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<ye.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function Fee(n){var e=n.dtstart.getTime()%1e3;if(!Db(n.freq))return[];var t=[];return n.byhour.forEach(function(r){n.byminute.forEach(function(a){n.bysecond.forEach(function(i){t.push(new ry(r,a,i,e))})})}),t}var xz=y(()=>{gd();yd();ii();Vs();Fa();rf();f0()});function Mb(n){var e=n.split(`
`).map(_Oe).filter(function(t){return t!==null});return pa(pa({},e[0]),e[1])}function Ab(n){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!t)return e;var r=t[1],a=t[2];return r&&(e.tzid=r),e.dtstart=xb(a),e}function _Oe(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var e=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!e)return Oee(n);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return Oee(n);case"DTSTART":return Ab(n);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(n))}}function Oee(n){var e=n.replace(/^RRULE:/i,""),t=Ab(e),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(a){var i=a.split("="),s=i[0],o=i[1];switch(s.toUpperCase()){case"FREQ":t.freq=gt[o.toUpperCase()];break;case"WKST":t.wkst=Ws[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var l=FOe(o),c=s.toLowerCase();t[c]=l;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=LOe(o);break;case"DTSTART":case"TZID":var d=Ab(n);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=xb(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+s+"'")}}),t}function FOe(n){if(n.indexOf(",")!==-1){var e=n.split(",");return e.map(zee)}return zee(n)}function zee(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function LOe(n){var e=n.split(",");return e.map(function(t){if(t.length===2)return Ws[t];var r=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!r||r.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var a=Number(r[1]),i=r[2],s=Ws[i].weekday;return new bn(s,a)})}var Ez=y(()=>{gd();yd();rf();Fa();Vs()});var of,h0=y(()=>{Fa();of=(function(){function n(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var e=Xg(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:Cee(this.date,this.tzid)},n})()});function Ib(n){for(var e=[],t="",r=Object.keys(n),a=Object.keys(Pb),i=0;i<r.length;i++)if(r[i]!=="tzid"&&Ft(a,r[i])){var s=r[i].toUpperCase(),o=n[r[i]],l="";if(!(!Ar(o)||ua(o)&&!o.length)){switch(s){case"FREQ":l=ye.FREQUENCIES[n.freq];break;case"WKST":ds(o)?l=new bn(o).toString():l=o.toString();break;case"BYWEEKDAY":s="BYDAY",l=kee(o).map(function(m){return m instanceof bn?m:ua(m)?new bn(m[0],m[1]):new bn(m)}).toString();break;case"DTSTART":t=OOe(o,n.tzid);break;case"UNTIL":l=Xg(o,!n.tzid);break;default:if(ua(o)){for(var c=[],d=0;d<o.length;d++)c[d]=String(o[d]);l=c.toString()}else l=String(o)}l&&e.push([s,l])}}var u=e.map(function(m){var f=m[0],h=m[1];return"".concat(f,"=").concat(h.toString())}).join(";"),p="";return u!==""&&(p="RRULE:".concat(u)),[t,p].filter(function(m){return!!m}).join(`
`)}function OOe(n,e){return n?"DTSTART"+new of(new Date(n),e).toString():""}var Dz=y(()=>{Vs();ii();rf();Fa();h0()});function zOe(n,e){return Array.isArray(n)?!Array.isArray(e)||n.length!==e.length?!1:n.every(function(t,r){return t.getTime()===e[r].getTime()}):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():n===e}var Bee,jee=y(()=>{p0();Fa();ii();Bee=(function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(e,t,r){t&&(t=t instanceof Date?u0(t):bz(t)),e==="all"?this.all=t:(r._value=t,this[e].push(r))},n.prototype._cacheGet=function(e,t){var r=!1,a=t?Object.keys(t):[],i=function(d){for(var u=0;u<a.length;u++){var p=a[u];if(!zOe(t[p],d[p]))return!0}return!1},s=this[e];if(e==="all")r=this.all;else if(ua(s))for(var o=0;o<s.length;o++){var l=s[o];if(!(a.length&&i(l))){r=l._value;break}}if(!r&&this.all){for(var c=new hd(e,t),o=0;o<this.all.length&&c.accept(this.all[o]);o++);r=c.getValue(),this._cacheAdd(e,r,t)}return ua(r)?bz(r):r instanceof Date?u0(r):r},n})()});var $ee,Uee,BOe,jOe,ju,La,Hee,Vee,$Oe,UOe,$u,Oa,Wee,qee,Gee,Yee,Pz,Kee=y(()=>{gd();ii();$ee=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce([],It(1,31),!0),It(2,28),!0),It(3,31),!0),It(4,30),!0),It(5,31),!0),It(6,30),!0),It(7,31),!0),It(8,31),!0),It(9,30),!0),It(10,31),!0),It(11,30),!0),It(12,31),!0),It(1,7),!0),Uee=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce([],It(1,31),!0),It(2,29),!0),It(3,31),!0),It(4,30),!0),It(5,31),!0),It(6,30),!0),It(7,31),!0),It(8,31),!0),It(9,30),!0),It(10,31),!0),It(11,30),!0),It(12,31),!0),It(1,7),!0),BOe=Hs(1,29),jOe=Hs(1,30),ju=Hs(1,31),La=Hs(1,32),Hee=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce([],La,!0),jOe,!0),La,!0),ju,!0),La,!0),ju,!0),La,!0),La,!0),ju,!0),La,!0),ju,!0),La,!0),La.slice(0,7),!0),Vee=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce([],La,!0),BOe,!0),La,!0),ju,!0),La,!0),ju,!0),La,!0),La,!0),ju,!0),La,!0),ju,!0),La,!0),La.slice(0,7),!0),$Oe=Hs(-28,0),UOe=Hs(-29,0),$u=Hs(-30,0),Oa=Hs(-31,0),Wee=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce([],Oa,!0),UOe,!0),Oa,!0),$u,!0),Oa,!0),$u,!0),Oa,!0),Oa,!0),$u,!0),Oa,!0),$u,!0),Oa,!0),Oa.slice(0,7),!0),qee=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce([],Oa,!0),$Oe,!0),Oa,!0),$u,!0),Oa,!0),$u,!0),Oa,!0),Oa,!0),$u,!0),Oa,!0),$u,!0),Oa,!0),Oa.slice(0,7),!0),Gee=[0,31,60,91,121,152,182,213,244,274,305,335,366],Yee=[0,31,59,90,120,151,181,212,243,273,304,334,365],Pz=(function(){for(var n=[],e=0;e<55;e++)n=n.concat(Hs(7));return n})()});function Zee(n,e){var t=Go(n,1,1),r=Jg(n)?366:365,a=Jg(n+1)?366:365,i=Cb(t),s=md(t),o=pa(pa({yearlen:r,nextyearlen:a,yearordinal:i,yearweekday:s},HOe(n)),{wnomask:null});if(us(e.byweekno))return o;o.wnomask=It(0,r+7);var l,c,d=l=_a(7-s+e.wkst,7);d>=4?(d=0,c=o.yearlen+_a(s-e.wkst,7)):c=r-d;for(var u=Math.floor(c/7),p=_a(c,7),m=Math.floor(u+p/4),f=0;f<e.byweekno.length;f++){var h=e.byweekno[f];if(h<0&&(h+=m+1),h>0&&h<=m){var g=void 0;h>1?(g=d+(h-1)*7,d!==l&&(g-=7-l)):g=d;for(var v=0;v<7&&(o.wnomask[g]=1,g++,o.wdaymask[g]!==e.wkst);v++);}}if(Ft(e.byweekno,1)){var g=d+m*7;if(d!==l&&(g-=7-l),g<r)for(var f=0;f<7&&(o.wnomask[g]=1,g+=1,o.wdaymask[g]!==e.wkst);f++);}if(d){var k=void 0;if(Ft(e.byweekno,-1))k=-1;else{var T=md(Go(n-1,1,1)),b=_a(7-T.valueOf()+e.wkst,7),w=Jg(n-1)?366:365,S=void 0;b>=4?(b=0,S=w+_a(T-e.wkst,7)):S=r-d,k=Math.floor(52+_a(S,7)/4)}if(Ft(e.byweekno,k))for(var g=0;g<d;g++)o.wnomask[g]=1}return o}function HOe(n){var e=Jg(n)?366:365,t=Go(n,1,1),r=md(t);return e===365?{mmask:$ee,mdaymask:Vee,nmdaymask:qee,wdaymask:Pz.slice(r),mrange:Yee}:{mmask:Uee,mdaymask:Hee,nmdaymask:Wee,wdaymask:Pz.slice(r),mrange:Gee}}var Qee=y(()=>{gd();Fa();ii();Kee()});function Jee(n,e,t,r,a,i){var s={lastyear:n,lastmonth:e,nwdaymask:[]},o=[];if(i.freq===ye.YEARLY)if(us(i.bymonth))o=[[0,t]];else for(var l=0;l<i.bymonth.length;l++)e=i.bymonth[l],o.push(r.slice(e-1,e+1));else i.freq===ye.MONTHLY&&(o=[r.slice(e-1,e+1)]);if(us(o))return s;s.nwdaymask=It(0,t);for(var l=0;l<o.length;l++)for(var c=o[l],d=c[0],u=c[1]-1,p=0;p<i.bynweekday.length;p++){var m=void 0,f=i.bynweekday[p],h=f[0],g=f[1];g<0?(m=u+(g+1)*7,m-=_a(a[m]-h,7)):(m=d+(g-1)*7,m+=_a(7-a[m]+h,7)),d<=m&&m<=u&&(s.nwdaymask[m]=1)}return s}var Xee=y(()=>{Vs();ii()});function ete(n,e){e===void 0&&(e=0);var t=n%19,r=Math.floor(n/100),a=n%100,i=Math.floor(r/4),s=r%4,o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),c=Math.floor(19*t+r-i-l+15)%30,d=Math.floor(a/4),u=a%4,p=Math.floor(32+2*s+2*d-c-u)%7,m=Math.floor((t+11*c+22*p)/451),f=Math.floor((c+p-7*m+114)/31),h=(c+p-7*m+114)%31+1,g=Date.UTC(n,f-1,h+e),v=Date.UTC(n,0,1);return[Math.ceil((g-v)/(1e3*60*60*24))]}var tte=y(()=>{});var VOe,rte,nte=y(()=>{ii();yd();Qee();Xee();tte();f0();Fa();VOe=(function(){function n(e){this.options=e}return n.prototype.rebuild=function(e,t){var r=this.options;if(e!==this.lastyear&&(this.yearinfo=Zee(e,r)),wn(r.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var a=this.yearinfo,i=a.yearlen,s=a.mrange,o=a.wdaymask;this.monthinfo=Jee(e,t,i,s,o,r)}Ar(r.byeaster)&&(this.eastermask=ete(e,r.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),n.prototype.ydayset=function(){return[Hs(this.yearlen),0,this.yearlen]},n.prototype.mdayset=function(e,t){for(var r=this.mrange[t-1],a=this.mrange[t],i=It(null,this.yearlen),s=r;s<a;s++)i[s]=s;return[i,r,a]},n.prototype.wdayset=function(e,t,r){for(var a=It(null,this.yearlen+7),i=Cb(Go(e,t,r))-this.yearordinal,s=i,o=0;o<7&&(a[i]=i,++i,this.wdaymask[i]!==this.options.wkst);o++);return[a,s,i]},n.prototype.ddayset=function(e,t,r){var a=It(null,this.yearlen),i=Cb(Go(e,t,r))-this.yearordinal;return a[i]=i,[a,i,i+1]},n.prototype.htimeset=function(e,t,r,a){var i=this,s=[];return this.options.byminute.forEach(function(o){s=s.concat(i.mtimeset(e,o,r,a))}),fd(s),s},n.prototype.mtimeset=function(e,t,r,a){var i=this.options.bysecond.map(function(s){return new ry(e,t,s,a)});return fd(i),i},n.prototype.stimeset=function(e,t,r,a){return[new ry(e,t,r,a)]},n.prototype.getdayset=function(e){switch(e){case gt.YEARLY:return this.ydayset.bind(this);case gt.MONTHLY:return this.mdayset.bind(this);case gt.WEEKLY:return this.wdayset.bind(this);case gt.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},n.prototype.gettimeset=function(e){switch(e){case gt.HOURLY:return this.htimeset.bind(this);case gt.MINUTELY:return this.mtimeset.bind(this);case gt.SECONDLY:return this.stimeset.bind(this)}},n})(),rte=VOe});function ate(n,e,t,r,a,i){for(var s=[],o=0;o<n.length;o++){var l=void 0,c=void 0,d=n[o];d<0?(l=Math.floor(d/e.length),c=_a(d,e.length)):(l=Math.floor((d-1)/e.length),c=_a(d-1,e.length));for(var u=[],p=t;p<r;p++){var m=i[p];Ar(m)&&u.push(m)}var f=void 0;l<0?f=u.slice(l)[0]:f=u[l];var h=e[c],g=c0(a.yearordinal+f),v=d0(g,h);Ft(s,v)||s.push(v)}return fd(s),s}var ite=y(()=>{Fa();ii()});function g0(n,e){var t=e.dtstart,r=e.freq,a=e.interval,i=e.until,s=e.bysetpos,o=e.count;if(o===0||a===0)return vd(n);var l=Ree.fromDate(t),c=new rte(e);c.rebuild(l.year,l.month);for(var d=GOe(c,l,e);;){var u=c.getdayset(r)(l.year,l.month,l.day),p=u[0],m=u[1],f=u[2],h=qOe(p,m,f,c,e);if(wn(s))for(var g=ate(s,d,m,f,c,p),v=0;v<g.length;v++){var k=g[v];if(i&&k>i)return vd(n);if(k>=t){var T=ste(k,e);if(!n.accept(T)||o&&(--o,!o))return vd(n)}}else for(var v=m;v<f;v++){var b=p[v];if(Ar(b))for(var w=c0(c.yearordinal+b),S=0;S<d.length;S++){var C=d[S],k=d0(w,C);if(i&&k>i)return vd(n);if(k>=t){var T=ste(k,e);if(!n.accept(T)||o&&(--o,!o))return vd(n)}}}if(e.interval===0||(l.add(e,h),l.year>l0))return vd(n);Db(r)||(d=c.gettimeset(r)(l.hour,l.minute,l.second,0)),c.rebuild(l.year,l.month)}}function WOe(n,e,t){var r=t.bymonth,a=t.byweekno,i=t.byweekday,s=t.byeaster,o=t.bymonthday,l=t.bynmonthday,c=t.byyearday;return wn(r)&&!Ft(r,n.mmask[e])||wn(a)&&!n.wnomask[e]||wn(i)&&!Ft(i,n.wdaymask[e])||wn(n.nwdaymask)&&!n.nwdaymask[e]||s!==null&&!Ft(n.eastermask,e)||(wn(o)||wn(l))&&!Ft(o,n.mdaymask[e])&&!Ft(l,n.nmdaymask[e])||wn(c)&&(e<n.yearlen&&!Ft(c,e+1)&&!Ft(c,-n.yearlen+e)||e>=n.yearlen&&!Ft(c,e+1-n.yearlen)&&!Ft(c,-n.nextyearlen+e-n.yearlen))}function ste(n,e){return new of(n,e.tzid).rezonedDate()}function vd(n){return n.getValue()}function qOe(n,e,t,r,a){for(var i=!1,s=e;s<t;s++){var o=n[s];i=WOe(r,o,a),i&&(n[o]=null)}return i}function GOe(n,e,t){var r=t.freq,a=t.byhour,i=t.byminute,s=t.bysecond;return Db(r)?Fee(t):r>=ye.HOURLY&&wn(a)&&!Ft(a,e.hour)||r>=ye.MINUTELY&&wn(i)&&!Ft(i,e.minute)||r>=ye.SECONDLY&&wn(s)&&!Ft(s,e.second)?[]:n.gettimeset(r)(e.hour,e.minute,e.second,e.millisecond)}var Az=y(()=>{yd();Fa();nte();Vs();xz();ii();h0();ite();f0()});var Ws,Pb,Lee,ye,Vs=y(()=>{Fa();p0();xee();Nee();yd();xz();Ez();Dz();jee();rf();Az();Ws={MO:new bn(0),TU:new bn(1),WE:new bn(2),TH:new bn(3),FR:new bn(4),SA:new bn(5),SU:new bn(6)},Pb={freq:gt.YEARLY,dtstart:null,interval:1,wkst:Ws.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Lee=Object.keys(Pb),ye=(function(){function n(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Bee,this.origOptions=Cz(e);var r=_ee(e).parsedOptions;this.options=r}return n.parseText=function(e,t){return Eb(e,t)},n.fromText=function(e,t){return Aee(e,t)},n.fromString=function(e){return new n(n.parseString(e)||void 0)},n.prototype._iter=function(e){return g0(e,this.options)},n.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},n.prototype._cacheAdd=function(e,t,r){if(this._cache)return this._cache._cacheAdd(e,t,r)},n.prototype.all=function(e){if(e)return this._iter(new Sz("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new hd("all",{})),this._cacheAdd("all",t)),t},n.prototype.between=function(e,t,r,a){if(r===void 0&&(r=!1),!af(e)||!af(t))throw new Error("Invalid date passed in to RRule.between");var i={before:t,after:e,inc:r};if(a)return this._iter(new Sz("between",i,a));var s=this._cacheGet("between",i);return s===!1&&(s=this._iter(new hd("between",i)),this._cacheAdd("between",s,i)),s},n.prototype.before=function(e,t){if(t===void 0&&(t=!1),!af(e))throw new Error("Invalid date passed in to RRule.before");var r={dt:e,inc:t},a=this._cacheGet("before",r);return a===!1&&(a=this._iter(new hd("before",r)),this._cacheAdd("before",a,r)),a},n.prototype.after=function(e,t){if(t===void 0&&(t=!1),!af(e))throw new Error("Invalid date passed in to RRule.after");var r={dt:e,inc:t},a=this._cacheGet("after",r);return a===!1&&(a=this._iter(new hd("after",r)),this._cacheAdd("after",a,r)),a},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return Ib(this.origOptions)},n.prototype.toText=function(e,t,r){return Mee(this,e,t,r)},n.prototype.isFullyConvertibleToText=function(){return Iee(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=gt.YEARLY,n.MONTHLY=gt.MONTHLY,n.WEEKLY=gt.WEEKLY,n.DAILY=gt.DAILY,n.HOURLY=gt.HOURLY,n.MINUTELY=gt.MINUTELY,n.SECONDLY=gt.SECONDLY,n.MO=Ws.MO,n.TU=Ws.TU,n.WE=Ws.WE,n.TH=Ws.TH,n.FR=Ws.FR,n.SA=Ws.SA,n.SU=Ws.SU,n.parseString=Mb,n.optionsToString=Ib,n})()});function ote(n,e,t,r,a,i){var s={},o=n.accept;function l(p,m){t.forEach(function(f){f.between(p,m,!0).forEach(function(h){s[Number(h)]=!0})})}a.forEach(function(p){var m=new of(p,i).rezonedDate();s[Number(m)]=!0}),n.accept=function(p){var m=Number(p);return isNaN(m)?o.call(this,p):!s[m]&&(l(new Date(m-1),new Date(m+1)),!s[m])?(s[m]=!0,o.call(this,p)):!0},n.method==="between"&&(l(n.args.after,n.args.before),n.accept=function(p){var m=Number(p);return s[m]?!0:(s[m]=!0,o.call(this,p))});for(var c=0;c<r.length;c++){var d=new of(r[c],i).rezonedDate();if(!n.accept(new Date(d.getTime())))break}e.forEach(function(p){g0(n,p.options)});var u=n._result;switch(fd(u),n.method){case"all":case"between":return u;case"before":return u.length&&u[u.length-1]||null;case"after":default:return u.length&&u[0]||null}}var lte=y(()=>{h0();Az();Fa()});function YOe(n,e){var t=[],r=[],a=[],i=[],s=Ab(n),o=s.dtstart,l=s.tzid,c=XOe(n,e.unfold);return c.forEach(function(d){var u;if(d){var p=JOe(d),m=p.name,f=p.parms,h=p.value;switch(m.toUpperCase()){case"RRULE":if(f.length)throw new Error("unsupported RRULE parm: ".concat(f.join(",")));t.push(Mb(d));break;case"RDATE":var g=(u=/RDATE(?:;TZID=([^:=]+))?/i.exec(d))!==null&&u!==void 0?u:[],v=g[1];v&&!l&&(l=v),r=r.concat(dte(h,f));break;case"EXRULE":if(f.length)throw new Error("unsupported EXRULE parm: ".concat(f.join(",")));a.push(Mb(h));break;case"EXDATE":i=i.concat(dte(h,f));break;case"DTSTART":break;default:throw new Error("unsupported property: "+m)}}}),{dtstart:o,tzid:l,rrulevals:t,rdatevals:r,exrulevals:a,exdatevals:i}}function KOe(n,e){var t=YOe(n,e),r=t.rrulevals,a=t.rdatevals,i=t.exrulevals,s=t.exdatevals,o=t.dtstart,l=t.tzid,c=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||r.length>1||a.length||i.length||s.length){var d=new y0(c);return d.dtstart(o),d.tzid(l||void 0),r.forEach(function(p){d.rrule(new ye(Mz(p,o,l),c))}),a.forEach(function(p){d.rdate(p)}),i.forEach(function(p){d.exrule(new ye(Mz(p,o,l),c))}),s.forEach(function(p){d.exdate(p)}),e.compatible&&e.dtstart&&d.rdate(o),d}var u=r[0]||{};return new ye(Mz(u,u.dtstart||e.dtstart||o,u.tzid||e.tzid||l),c)}function Nb(n,e){return e===void 0&&(e={}),KOe(n,ZOe(e))}function Mz(n,e,t){return pa(pa({},n),{dtstart:e,tzid:t})}function ZOe(n){var e=[],t=Object.keys(n),r=Object.keys(cte);if(t.forEach(function(a){Ft(r,a)||e.push(a)}),e.length)throw new Error("Invalid options: "+e.join(", "));return pa(pa({},cte),n)}function QOe(n){if(n.indexOf(":")===-1)return{name:"RRULE",value:n};var e=Tee(n,":",1),t=e[0],r=e[1];return{name:t,value:r}}function JOe(n){var e=QOe(n),t=e.name,r=e.value,a=t.split(";");if(!a)throw new Error("empty property name");return{name:a[0].toUpperCase(),parms:a.slice(1),value:r}}function XOe(n,e){if(e===void 0&&(e=!1),n=n&&n.trim(),!n)throw new Error("Invalid empty string");if(!e)return n.split(/\s/);for(var t=n.split(`
`),r=0;r<t.length;){var a=t[r]=t[r].replace(/\s+$/g,"");a?r>0&&a[0]===" "?(t[r-1]+=a.slice(1),t.splice(r,1)):r+=1:t.splice(r,1)}return t}function e1e(n){n.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function dte(n,e){return e1e(e),n.split(",").map(function(t){return xb(t)})}var cte,Iz=y(()=>{gd();Vs();Nz();Fa();ii();Ez();cte={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function ute(n){var e=this;return function(t){if(t!==void 0&&(e["_".concat(n)]=t),e["_".concat(n)]!==void 0)return e["_".concat(n)];for(var r=0;r<e._rrule.length;r++){var a=e._rrule[r].origOptions[n];if(a)return a}}}function pte(n,e){if(!(n instanceof ye))throw new TypeError(String(n)+" is not RRule instance");Ft(e.map(String),String(n))||e.push(n)}function mte(n,e){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Ft(e.map(Number),Number(n))||(e.push(n),fd(e))}function fte(n,e,t){var r=!t||t.toUpperCase()==="UTC",a=r?"".concat(n,":"):"".concat(n,";TZID=").concat(t,":"),i=e.map(function(s){return Xg(s.valueOf(),r)}).join(",");return"".concat(a).concat(i)}var y0,Nz=y(()=>{gd();Vs();Fa();ii();lte();Iz();Dz();y0=(function(n){ey(e,n);function e(t){t===void 0&&(t=!1);var r=n.call(this,{},t)||this;return r.dtstart=ute.apply(r,["dtstart"]),r.tzid=ute.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return e.prototype._iter=function(t){return ote(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){pte(t,this._rrule)},e.prototype.exrule=function(t){pte(t,this._exrule)},e.prototype.rdate=function(t){mte(t,this._rdate)},e.prototype.exdate=function(t){mte(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Nb(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Nb(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(Ib({dtstart:this._dtstart}))),this._rrule.forEach(function(r){t=t.concat(r.toString().split(`
`))}),this._exrule.forEach(function(r){t=t.concat(r.toString().split(`
`).map(function(a){return a.replace(/^RRULE:/,"EXRULE:")}).filter(function(a){return!/^DTSTART/.test(a)}))}),this._rdate.length&&t.push(fte("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(fte("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(r){return t.rrule(r.clone())}),this._exrule.forEach(function(r){return t.exrule(r.clone())}),this._rdate.forEach(function(r){return t.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return t.exdate(new Date(r.getTime()))}),t},e})(ye)});var Uu={};Xe(Uu,{ALL_WEEKDAYS:()=>Qg,Frequency:()=>gt,RRule:()=>ye,RRuleSet:()=>y0,Weekday:()=>bn,datetime:()=>Go,rrulestr:()=>Nb});var ny=y(()=>{Vs();Nz();Iz();yd();rf();Fa()});function Td(n){let e=yte(n),t=e.match(v0);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s);if(!kte(o,l,c))throw new Error(`Invalid date "${n}".`);return new Date(Date.UTC(o,l-1,c,0,0,0,0))}if(!vte(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!k0(r))throw new Error(`Invalid date "${n}".`);return r}function r1e(n){let e=yte(n),t=e.match(v0);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s),d=new Date(o,l-1,c,0,0,0,0);if(!k0(d)||d.getFullYear()!==o||d.getMonth()!==l-1||d.getDate()!==c)throw new Error(`Invalid date "${n}".`);return d}if(!vte(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!k0(r))throw new Error(`Invalid date "${n}".`);return r}function kd(n){if(!k0(n))return"";let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}function n1e(n){return kd(n)}function a1e(){let n=new Date,e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function _z(n){return Td(Fz(n))}function i1e(n){return n?/T\d{2}:\d{2}/.test(n):!1}function Fz(n){if(!n)return"";let e=n.trim();if(v0.test(e))return e;let t=e.indexOf("T");if(t>-1)return e.slice(0,t);let r=e.indexOf(" ");return r>-1&&v0.test(e.slice(0,r))?e.slice(0,r):kd(Td(e))}function yte(n,e="Date string cannot be empty"){if(!n||n.trim().length===0)throw new Error(e);return n.trim()}function vte(n){let e=n.match(t1e);if(!e)return!1;let[,t,r,a,i,s,o,,l,c,d]=e;return kte(Number(t),Number(r),Number(a))&&s1e(Number(i),Number(s),Number(o))&&o1e(l,c,d)}function kte(n,e,t){let r=new Date(Date.UTC(n,e-1,t,0,0,0,0));return r.getUTCFullYear()===n&&r.getUTCMonth()===e-1&&r.getUTCDate()===t}function s1e(n,e,t){return n>=0&&n<=23&&e>=0&&e<=59&&t>=0&&t<=59}function o1e(n,e,t){if(!n)return!0;let r=Number(e),a=Number(t);return!(r>14||a>59||r===14&&a!==0)}function k0(n){return n instanceof Date&&!Number.isNaN(n.getTime())}function Oz(n,e){if(!n.recurrence||typeof n.recurrence!="string")return!0;try{let t=xte(n);if(!t)return!1;let r=_z(n1e(e));return t.between(r,new Date(r.getTime()+1440*60*1e3-1),!0).length>0}catch(t){return!0}}function T0(n,e,t="done"){if(!n.recurrence)return n.status||"open";let r=kd(e);return(Array.isArray(n.complete_instances)?n.complete_instances:[]).includes(r)?t:n.status||"open"}function Hu(n,e,t){if(!n.recurrence||typeof n.recurrence!="string")return[];try{let r=xte(n);if(!r)return[];let a=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0)),i=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),23,59,59,999));return r.between(a,i,!0)}catch(r){let a=[],i=new Date(e);for(;i<=t;)Oz(n,i)&&a.push(new Date(i)),i.setUTCDate(i.getUTCDate()+1);return a}}function Tte(n){if(!n.recurrence||typeof n.recurrence!="string")return null;let e=n.recurrence.match(/(?:^|;)COUNT=(\d+)(?:;|$)/);if(e){let t=Number.parseInt(e[1],10);return Number.isFinite(t)&&t>0?t:null}if(!/(?:^|;)UNTIL=/.test(n.recurrence))return null;try{let t=Ete(n),r=c1e(n.recurrence);if(!t||!r||r<t)return null;let a=Hu(n,t,r);return a.length>=l1e?null:a.length>0?a.length:null}catch(t){return null}}function zz(n,e={}){return n.recurrence?(n.recurrence_anchor||"scheduled")==="completion"?p1e(n,e):u1e(n,e):null}function bte(n,e=!0,t={}){let r=zz(n,t),a=null,i=null,s=null;if(r){try{let o=n.scheduled?Td(Fz(n.scheduled)):null,l=n.due?Td(Fz(n.due)):null;if(o&&l){let c=!e&&l.getTime()<r.getTime();if(e||c){let d=l.getTime()-o.getTime();s=new Date(r.getTime()+d)}}}catch(o){s=null}n.scheduled&&n.scheduled.includes("T")?a=`${kd(r)}T${n.scheduled.split("T")[1]}`:a=kd(r),s&&n.due&&n.due.includes("T")?i=`${kd(s)}T${n.due.split("T")[1]}`:s&&(i=kd(s))}return{scheduled:a,due:i}}function wte(n){if(!n)return"";try{if(!n.includes("FREQ="))return"rrule";let e=n.replace(/DTSTART:[^;]+;?/,"");return Lz.fromString(e).toText()}catch(e){return"rrule"}}function Ste(n){if(!n.recurrence||typeof n.recurrence!="string")return null;if(n.recurrence.includes("DTSTART:"))return n.recurrence;let e=n.scheduled||n.dateCreated;return e?`DTSTART:${Ate(e)};${n.recurrence}`:null}function b0(n,e){if(!n||typeof n!="string")return null;let t=Ate(e);return n.includes("DTSTART:")?n.replace(/DTSTART:[^;]+;?/,`DTSTART:${t};`):`DTSTART:${t};${n}`}function Cte(n,e,t){if(!n.recurrence||typeof n.recurrence!="string")return null;if(n.recurrence.includes("DTSTART:"))return n.recurrence;let r=n.scheduled||n.dateCreated;if(!r)return null;if(t){let d=Td(r);return`DTSTART:${Mte(d)};${n.recurrence}`}let a=Td(r),i=a.getUTCFullYear(),s=String(a.getUTCMonth()+1).padStart(2,"0"),o=String(a.getUTCDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),c=String(e.getMinutes()).padStart(2,"0");return`DTSTART:${i}${s}${o}T${l}${c}00Z;${n.recurrence}`}function xte(n){if(!n.recurrence||typeof n.recurrence!="string")return null;let e=Ete(n);if(!e)return null;let t=n.recurrence.replace(/DTSTART:[^;]+;?/,"").replace(/^;/,"").trim(),r=Lz.parseString(t);return r.dtstart=e,new Lz(r)}function Ete(n){return n.recurrence?Bz(n.recurrence)||(n.scheduled?_z(n.scheduled):null)||(n.dateCreated?_z(n.dateCreated):null):null}function Bz(n){let e=n.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);return e?Dte(e[1],!1):null}function c1e(n){let e=n.match(/(?:^|;)UNTIL=(\d{8}(?:T\d{6}Z?)?)(?:;|$)/);return e?Dte(e[1],!0):null}function Dte(n,e){let t=Number(n.slice(0,4)),r=Number(n.slice(4,6))-1,a=Number(n.slice(6,8));if(n.length===8)return e?new Date(Date.UTC(t,r,a,23,59,59,999)):new Date(Date.UTC(t,r,a,0,0,0,0));let i=Number(n.slice(9,11))||0,s=Number(n.slice(11,13))||0,o=Number(n.slice(13,15))||0;return new Date(Date.UTC(t,r,a,i,s,o,0))}function d1e(n){let e=n.match(/INTERVAL=(\d+)/);return e?Number.parseInt(e[1],10):1}function Pte(n){let e=d1e(n);return n.includes("FREQ=DAILY")?Math.max(30,e*2):n.includes("FREQ=WEEKLY")?Math.max(90,e*7*2):n.includes("FREQ=MONTHLY")?Math.max(400,e*31*2):n.includes("FREQ=YEARLY")?Math.max(800,e*366*2):365}function Ate(n){if(i1e(n)){let e=r1e(n),t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return`${t}${r}${a}T${i}${s}${o}Z`}return Mte(Td(n))}function Mte(n){let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}${t}${r}`}function u1e(n,e){if(!n.recurrence)return null;let t=Td(e.today||gte()),r=Pte(n.recurrence),a=t,i=Bz(n.recurrence);i&&i<t&&(a=i);let s=new Date(t.getTime()+r*24*60*60*1e3),o=Hu(n,a,s),l=new Set([...n.complete_instances||[],...n.skipped_instances||[]]);for(let c of o){let d=kd(c);if(!l.has(d)&&c>=t)return c}return null}function p1e(n,e){if(!n.recurrence||typeof n.recurrence!="string")return null;let t=Td(e.today||gte()),r=Pte(n.recurrence),a=Bz(n.recurrence),i=a||t,s=new Date(i.getTime()+r*24*60*60*1e3),o=Hu(n,i,s),l=new Set(n.skipped_instances||[]),c=a?a.getTime():0;for(let d of o){let u=kd(d);if(d.getTime()>c&&d>=t&&!l.has(u))return d}return null}var v0,t1e,gte,Rz,hte,Lz,l1e,jz=y(()=>{ny();v0=/^(\d{4})-(\d{2})-(\d{2})$/,t1e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,3})?(?:Z|([+-])(\d{2}):(\d{2}))?$/;gte=a1e;Rz=Reflect.get(Uu,"default"),Lz=(hte=ye)!=null?hte:Rz==null?void 0:Rz.RRule,l1e=1e4});var Gz={};Xe(Gz,{NATURAL_LANGUAGE_DATE_PATTERNS:()=>Rb,addDaysToDateString:()=>lf,addDaysToDateTime:()=>ay,addMonthsToDateString:()=>g1e,addWeeksToDateString:()=>Uz,addYearsToDateString:()=>y1e,combineDateAndTime:()=>fa,convertUTCToLocalCalendarDate:()=>bd,createSafeDate:()=>h1e,createSafeUTCDate:()=>w0,createTimeFormatHelper:()=>x1e,createUTCDateForRRule:()=>Vu,createUTCDateFromLocalCalendarDate:()=>Br,formatDateAsUTCString:()=>M1e,formatDateForDisplay:()=>wd,formatDateForStorage:()=>ae,formatDateStringTime:()=>Rte,formatDateTime:()=>Nte,formatDateTimeForDisplay:()=>Sn,formatTime:()=>Wu,formatTimestampForDisplay:()=>S0,generateUTCCalendarDates:()=>Wz,getCurrentDateString:()=>Yo,getCurrentDateTimeString:()=>P1e,getCurrentTimestamp:()=>qe,getDatePart:()=>re,getEndOfMonthString:()=>b1e,getEndOfWeekString:()=>k1e,getEndOfYearString:()=>S1e,getNaturalLanguageDateSuggestions:()=>N1e,getStartOfMonthString:()=>T1e,getStartOfWeekString:()=>v1e,getStartOfYearString:()=>w1e,getTimePart:()=>si,getTodayLocal:()=>Xt,getTodayString:()=>zr,getUTCEndOfMonth:()=>D0,getUTCEndOfWeek:()=>qz,getUTCStartOfMonth:()=>E0,getUTCStartOfWeek:()=>x0,hasTimeComponent:()=>Jt,isBeforeDateSafe:()=>cf,isBeforeDateTimeAware:()=>Sd,isNaturalLanguageDate:()=>P0,isOverdueTimeAware:()=>ps,isPastDate:()=>Hz,isSameDateSafe:()=>qs,isToday:()=>_b,isTodayTimeAware:()=>C0,isTodayUTC:()=>Vz,isValidDateInput:()=>I1e,normalizeCalendarBoundariesToUTC:()=>A1e,normalizeDateString:()=>f1e,parseDate:()=>m1e,parseDateAsLocal:()=>df,parseDateToLocal:()=>et,parseDateToUTC:()=>st,parseTimestamp:()=>Ite,resolveNaturalLanguageDate:()=>Fl,startOfDayForDateString:()=>C1e,validateCompleteInstances:()=>D1e,validateDateInput:()=>$z,validateDateTimeInput:()=>E1e});function ma(n){if(!n){let t=new Error("Date string cannot be empty");throw Ve.error("Date parsing error:",{category:"validation",operation:"date-parsing",details:{dateString:n},error:t.message}),t}let e=n.trim();try{let t=e.match(/^(\d{4}-\d{2}-\d{2})\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$/i);if(t){let r=t[1];return ma(r)}if(e.startsWith("T")&&/^T\d{2}:\d{2}(:\d{2})?/.test(e)){let r=new Error(`Invalid date format - time without date: ${n}`);throw Ve.warn("Date parsing error - incomplete time format:",{category:"validation",operation:"date-parsing-incomplete-time-format",details:{original:n,trimmed:e},error:r.message}),r}if(/^\d{4}-W\d{2}$/.test(e)){let[r,a]=e.split("-W"),i=parseInt(r,10),s=parseInt(a,10);if(isNaN(i)||isNaN(s)){let u=new Error(`Invalid numeric values in ISO week format: ${n}`);throw Ve.warn("Date parsing error - invalid ISO week numbers:",{category:"validation",operation:"date-parsing-invalid-iso-week-numbers",details:{original:n,year:r,week:a,yearNum:i,weekNum:s}}),u}if(s<1||s>53){let u=new Error(`Invalid week number in ISO week format: ${n} (week must be 1-53)`);throw Ve.warn("Date parsing error - week number out of range:",{category:"validation",operation:"date-parsing-week-number-out-of-range",details:{original:n,weekNum:s},error:u.message}),u}let o=new Date(i,0,4),l=o.getDay(),c=new Date(o);c.setDate(o.getDate()-(l===0?6:l-1));let d=new Date(c);if(d.setDate(c.getDate()+(s-1)*7),!ta(d)){let u=new Error(`Failed to calculate date from ISO week format: ${n}`);throw Ve.error("Date parsing error - ISO week calculation failed:",{category:"validation",operation:"date-parsing-iso-week-calculation",details:{original:n,yearNum:i,weekNum:s,jan4:o.toISOString(),targetWeekMonday:d.toString()}}),u}return d}if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(:\d{2})?/.test(e)){let r=e.replace(" ","T"),a=Na(r);if(!ta(a)){let i=new Error(`Invalid space-separated datetime: ${n}`);throw Ve.warn("Date parsing error - space-separated datetime invalid:",{category:"validation",operation:"date-parsing-space-separated-datetime-invalid",details:{original:n,converted:r},error:i.message}),i}return a}if(e.includes("T")||e.includes("Z")||e.match(/[+-]\d{2}:\d{2}$/)){let r=Na(e);if(!ta(r)){let a=new Error(`Invalid timezone-aware date: ${n}`);throw Ve.warn("Date parsing error - timezone-aware format invalid:",{category:"validation",operation:"date-parsing-timezone-aware-format-invalid",details:{original:n,trimmed:e},error:a.message}),a}return r}else{let r=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!r){let l=new Error(`Invalid date-only string: ${n} (expected format: yyyy-MM-dd)`);throw Ve.warn("Date parsing error - date-only format invalid:",{category:"validation",operation:"date-parsing-date-only-format-invalid",details:{original:n,trimmed:e,expectedFormat:"yyyy-MM-dd"},error:l.message}),l}let[,a,i,s]=r,o=new Date(parseInt(a,10),parseInt(i,10)-1,parseInt(s,10));if(!ta(o)||o.getFullYear()!==parseInt(a,10)||o.getMonth()!==parseInt(i,10)-1||o.getDate()!==parseInt(s,10)){let l=new Error(`Invalid date values: ${n}`);throw Ve.warn("Date parsing error - invalid date values:",{category:"validation",operation:"date-parsing-invalid-date-values",details:{original:n,year:a,month:i,day:s},error:l.message}),l}return o}}catch(t){if(t instanceof Error&&t.message.includes("Invalid date"))throw t;let r=new Error(`Unexpected error parsing date "${n}": ${t instanceof Error?t.message:String(t)}`);throw Ve.error("Unexpected date parsing error:",{category:"validation",operation:"unexpected-date-parsing",details:{original:n,trimmed:e,stack:t instanceof Error?t.stack:void 0},error:t instanceof Error?t.message:String(t)}),r}}function st(n){if(!n){let t=new Error("Date string cannot be empty");throw Ve.error("Date parsing error:",{category:"validation",operation:"date-parsing",details:{dateString:n},error:t.message}),t}let e=n.trim();try{let t=e.match(/^(\d{4}-\d{2}-\d{2})\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$/i);if(t){let a=t[1];return st(a)}let r=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(r){let[,a,i,s]=r,o=parseInt(a,10),l=parseInt(i,10),c=parseInt(s,10);if(l<1||l>12)throw new Error(`Invalid month in date: ${n}`);if(c<1||c>31)throw new Error(`Invalid day in date: ${n}`);let d=new Date(Date.UTC(o,l-1,c));if(d.getUTCFullYear()!==o||d.getUTCMonth()!==l-1||d.getUTCDate()!==c)throw new Error(`Invalid date values: ${n}`);return d}return ma(e)}catch(t){let r=new Error(`Failed to parse date to UTC: ${e}`);throw Ve.error("Date parsing error:",{category:"validation",operation:"date-parsing",details:{dateString:n,trimmed:e,stack:t instanceof Error?t.stack:void 0},error:t instanceof Error?t.message:String(t)}),r}}function et(n){return ma(n)}function m1e(n){return ma(n)}function qs(n,e){try{let t=re(n),r=re(e),a=st(t),i=st(r);return a.getTime()===i.getTime()}catch(t){return Ve.error("Error comparing dates:",{category:"validation",operation:"comparing-dates",details:{date1:n,date2:e},error:t}),!1}}function cf(n,e){try{let t=re(n),r=re(e),a=st(t),i=st(r);return a.getTime()<i.getTime()}catch(t){return Ve.error("Error comparing dates for before:",{category:"validation",operation:"comparing-dates",details:{date1:n,date2:e},error:t}),!1}}function zr(){return D(new Date,"yyyy-MM-dd")}function Xt(){let n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate())}function df(n){if(!n)throw new Error("Date string cannot be empty");let t=n.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){let[,r,a,i]=t,s=new Date(parseInt(r,10),parseInt(a,10)-1,parseInt(i,10));if(!ta(s)||s.getFullYear()!==parseInt(r,10)||s.getMonth()!==parseInt(a,10)-1||s.getDate()!==parseInt(i,10))throw new Error(`Invalid date values: ${n}`);return s}return ma(n)}function f1e(n){if(!n)return n;try{if(n.includes("T")||n.includes("Z")||n.match(/[+-]\d{2}:\d{2}$/)){let t=n.split("T")[0];if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t}let e=st(n);return ta(e)?ae(e):n}catch(e){return Ve.error("Error normalizing date string:",{category:"validation",operation:"normalizing-date-string",details:{dateString:n},error:e}),n}}function h1e(n,e,t){return new Date(n,e,t)}function w0(n,e,t){return new Date(Date.UTC(n,e,t))}function bd(n){let e=n.getUTCFullYear(),t=n.getUTCMonth(),r=n.getUTCDate();return new Date(e,t,r)}function $z(n){if(!n||n.trim()==="")return!0;try{return ma(n),!0}catch(e){return!1}}function lf(n,e){try{let t=ma(n),r=Jm(t,e);return D(r,"yyyy-MM-dd")}catch(t){throw Ve.error("Error adding days to date string:",{category:"validation",operation:"adding-days-date-string",details:{dateString:n,days:e},error:t}),t}}function Uz(n,e){try{let t=ma(n),r=PK(t,e);return D(r,"yyyy-MM-dd")}catch(t){throw Ve.error("Error adding weeks to date string:",{category:"validation",operation:"adding-weeks-date-string",details:{dateString:n,weeks:e},error:t}),t}}function g1e(n,e){try{let t=ma(n),r=UP(t,e);return D(r,"yyyy-MM-dd")}catch(t){throw Ve.error("Error adding months to date string:",{category:"validation",operation:"adding-months-date-string",details:{dateString:n,months:e},error:t}),t}}function y1e(n,e){try{let t=ma(n),r=MK(t,e);return D(r,"yyyy-MM-dd")}catch(t){throw Ve.error("Error adding years to date string:",{category:"validation",operation:"adding-years-date-string",details:{dateString:n,years:e},error:t}),t}}function v1e(n=1){try{let e=ni(new Date,{weekStartsOn:n});return D(e,"yyyy-MM-dd")}catch(e){throw Ve.error("Error getting start of week:",{category:"validation",operation:"getting-start-of-week",error:e}),e}}function k1e(n=1){try{let e=Bg(new Date,{weekStartsOn:n});return D(e,"yyyy-MM-dd")}catch(e){throw Ve.error("Error getting end of week:",{category:"validation",operation:"getting-end-of-week",error:e}),e}}function T1e(){try{let n=YP(new Date);return D(n,"yyyy-MM-dd")}catch(n){throw Ve.error("Error getting start of month:",{category:"validation",operation:"getting-start-of-month",error:n}),n}}function b1e(){try{let n=GP(new Date);return D(n,"yyyy-MM-dd")}catch(n){throw Ve.error("Error getting end of month:",{category:"validation",operation:"getting-end-of-month",error:n}),n}}function w1e(){try{let n=KP(new Date);return D(n,"yyyy-MM-dd")}catch(n){throw Ve.error("Error getting start of year:",{category:"validation",operation:"getting-start-of-year",error:n}),n}}function S1e(){try{let n=w7(new Date);return D(n,"yyyy-MM-dd")}catch(n){throw Ve.error("Error getting end of year:",{category:"validation",operation:"getting-end-of-year",error:n}),n}}function C1e(n){try{return st(n)}catch(e){throw Ve.error("Error getting start of day for date string:",{category:"validation",operation:"getting-start-of-day-date-string",details:{dateString:n},error:e}),e}}function _b(n){if(!n)return!1;try{let e=df(n),t=Xt();return C1(e,t)}catch(e){return Ve.error("Error checking if date is today:",{category:"validation",operation:"checking-if-date-today",details:{dateString:n},error:e}),!1}}function Hz(n){return cf(n,zr())}function wd(n,e="MMM d, yyyy"){try{let t=ma(n);return D(t,e)}catch(t){return Ve.error("Error formatting date for display:",{category:"validation",operation:"formatting-date-display",details:{dateString:n},error:t}),n}}function qe(){let n=new Date,e=-n.getTimezoneOffset(),t=e>=0?"+":"-",r=m=>String(Math.abs(m)).padStart(2,"0"),a=r(Math.floor(Math.abs(e)/60)),i=r(Math.abs(e)%60),s=n.getFullYear(),o=r(n.getMonth()+1),l=r(n.getDate()),c=r(n.getHours()),d=r(n.getMinutes()),u=r(n.getSeconds()),p=String(n.getMilliseconds()).padStart(3,"0");return`${s}-${o}-${l}T${c}:${d}:${u}.${p}${t}${a}:${i}`}function Yo(){let n=new Date,e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function Ite(n){try{if(!n)throw new Error("Timestamp string cannot be empty");let e=Na(n);if(!ta(e))throw new Error(`Invalid timestamp: ${n}`);return e}catch(e){throw Ve.error("Error parsing timestamp:",{category:"validation",operation:"parsing-timestamp",details:{timestampString:n},error:e}),e}}function S0(n,e,t="24"){if(!n)return n;try{let r=Ite(n);return ta(r)?D(r,e||(t==="12"?"MMM d, yyyy h:mm a":"MMM d, yyyy HH:mm")):n}catch(r){return Ve.error("Error formatting timestamp for display:",{category:"validation",operation:"formatting-timestamp-display",details:{timestampString:n},error:r}),n}}function Jt(n){return n?/T\d{2}:\d{2}/.test(n):!1}function re(n){if(!n)return"";try{if(/^\d{4}-\d{2}-\d{2}$/.test(n))return n;let e=n.indexOf("T");if(e>-1)return n.substring(0,e);let t=st(n);return ae(t)}catch(e){return Ve.error("Error extracting date part:",{category:"validation",operation:"extracting-date-part",details:{dateString:n},error:e}),n}}function si(n){if(!n||!Jt(n))return null;try{let e=ma(n);return D(e,"HH:mm")}catch(e){return Ve.error("Error extracting time part:",{category:"validation",operation:"extracting-time-part",details:{dateString:n},error:e}),null}}function Wu(n,e="24"){return ta(n)?D(n,e==="12"?"h:mm a":"HH:mm"):(Ve.warn("Invalid date provided to formatTime:",{category:"validation",operation:"invalid-date-provided-formattime",details:{value:n}}),"")}function Nte(n,e="24"){return ta(n)?D(n,e==="12"?"MMM d, yyyy h:mm a":"MMM d, yyyy HH:mm"):(Ve.warn("Invalid date provided to formatDateTime:",{category:"validation",operation:"invalid-date-provided-formatdatetime",details:{value:n}}),"")}function Rte(n,e="24"){if(!n||!Jt(n))return n;try{let t=et(n);return Wu(t,e)}catch(t){return Ve.error("Error formatting date string time:",{category:"validation",operation:"formatting-date-string-time",details:{dateString:n},error:t}),n}}function x1e(n){return{formatDateTimeForDisplay:(e,t={})=>Sn(e,{...t,userTimeFormat:n}),formatTime:e=>Wu(e,n),formatDateTime:e=>Nte(e,n),formatDateStringTime:e=>Rte(e,n)}}function fa(n,e){if(!n)return"";if(!e)return n;try{let t=n.match(/^(\d{4}-\d{2}-\d{2})$/);if(t)return/^\d{2}:\d{2}$/.test(e)?`${t[1]}T${e}`:(Ve.warn("Invalid time format, expected HH:mm:",{category:"validation",operation:"invalid-time-format-expected-hh-mm",details:{value:e}}),n);let r=re(n);return!r||!/^\d{4}-\d{2}-\d{2}$/.test(r)?(Ve.warn("Invalid date part from dateString:",{category:"validation",operation:"invalid-date-part-datestring",details:{dateString:n,datePart:r}}),n):/^\d{2}:\d{2}$/.test(e)?`${r}T${e}`:(Ve.warn("Invalid time format, expected HH:mm:",{category:"validation",operation:"invalid-time-format-expected-hh-mm",details:{value:e}}),n)}catch(t){return Ve.error("Error combining date and time:",{category:"validation",operation:"combining-date-and-time",details:{dateString:n,timeString:e},error:t}),n}}function Sn(n,e={}){if(!n)return"";let{dateFormat:t="MMM d, yyyy",timeFormat:r,showTime:a=!0,userTimeFormat:i="24"}=e,s=r||(i==="12"?"h:mm a":"HH:mm");try{let o=ma(n);return Jt(n)&&a?!t||t.trim()===""?D(o,s):D(o,`${t} ${s}`):!t||t.trim()===""?"":D(o,t)}catch(o){return Ve.error("Error formatting datetime for display:",{category:"validation",operation:"formatting-datetime-display",details:{dateString:n},error:o}),n}}function Sd(n,e){try{let t=st(n),r=st(e),a=t,i=r;if(Jt(n)){let s=si(n);if(s){let[o,l]=s.split(":").map(Number);a=new Date(t),a.setUTCHours(o,l,0,0)}}if(Jt(e)){let s=si(e);if(s){let[o,l]=s.split(":").map(Number);i=new Date(r),i.setUTCHours(o,l,0,0)}}return Jt(n)&&!Jt(e)?(i=new Date(r),i.setUTCHours(23,59,59,999)):!Jt(n)&&Jt(e)&&(a=new Date(t),a.setUTCHours(23,59,59,999)),a.getTime()<i.getTime()}catch(t){return Ve.error("Error comparing dates time-aware:",{category:"validation",operation:"comparing-dates-time-aware",details:{date1:n,date2:e},error:t}),!1}}function ps(n,e,t){if(!n||t&&e)return!1;try{let r=new Date,a=st(n);if(Jt(n))return F1(a,r);{let i=st(zr());return F1(a,i)}}catch(r){return Ve.error("Error checking overdue status:",{category:"validation",operation:"checking-overdue-status",details:{dateString:n},error:r}),!1}}function C0(n){if(!n)return!1;try{let e=Jt(n)?ma(n):df(n);return C1(e,new Date)}catch(e){return Ve.error("Error checking if today:",{category:"validation",operation:"checking-if-today",details:{dateString:n},error:e}),!1}}function E1e(n,e){if(!n||n.trim()==="")return!0;try{if(!$z(n))return!1;if(e&&e.trim()!==""){if(!/^\d{2}:\d{2}$/.test(e))return!1;let t=fa(n,e);return $z(t)}return!0}catch(t){return!1}}function D1e(n){return Array.isArray(n)?n.filter(e=>{if(typeof e!="string"||!e.trim())return!1;let t=e.trim();if(t.startsWith("T")&&/^T\d{2}:\d{2}(:\d{2})?/.test(t)||!/^\d{4}-\d{2}-\d{2}$/.test(t))return!1;try{return ma(t),!0}catch(r){return Ve.warn("Invalid complete_instances entry (date parsing failed):",{category:"validation",operation:"invalid-complete-instances-entry-date-parsing",details:{value:e},error:r}),!1}}).map(e=>e.trim()):[]}function P1e(){return D(new Date,"yyyy-MM-dd'T'HH:mm")}function ay(n,e){try{let t=ma(n),r=Jm(t,e);return Jt(n)?D(r,"yyyy-MM-dd'T'HH:mm"):D(r,"yyyy-MM-dd")}catch(t){throw Ve.error("Error adding days to datetime:",{category:"validation",operation:"adding-days-datetime",details:{dateString:n,days:e},error:t}),t}}function Vu(n){try{let e=n.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!e)throw new Error(`Invalid date format for RRULE: ${n}`);let[,t,r,a]=e,i=parseInt(t,10),s=parseInt(r,10),o=parseInt(a,10);if(s<1||s>12)throw new Error(`Invalid month in date: ${n}`);if(o<1||o>31)throw new Error(`Invalid day in date: ${n}`);let l=new Date(Date.UTC(i,s-1,o));if(l.getUTCFullYear()!==i||l.getUTCMonth()!==s-1||l.getUTCDate()!==o)throw new Error(`Invalid date values: ${n}`);return l}catch(e){throw Ve.error("Error creating UTC date for RRULE:",{category:"validation",operation:"creating-utc-date-rrule",details:{dateString:n},error:e}),e}}function Br(n){let e=n.getFullYear(),t=n.getMonth(),r=n.getDate();return new Date(Date.UTC(e,t,r,0,0,0,0))}function Vz(n){try{let e=Xt(),t=Br(e);return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}catch(e){return Ve.error("Error in isTodayUTC:",{category:"validation",operation:"istodayutc",error:e}),!1}}function A1e(n,e){try{let t=D(n,"yyyy-MM-dd"),r=D(e,"yyyy-MM-dd"),a=Vu(t),i=Vu(r);return{utcStart:a,utcEnd:i}}catch(t){throw Ve.error("Error normalizing calendar boundaries to UTC:",{category:"provider",operation:"normalizing-calendar-boundaries-utc",details:{startDate:n,endDate:e},error:t}),t}}function M1e(n){try{let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}catch(e){return Ve.error("Error formatting date as UTC string:",{category:"validation",operation:"formatting-date-as-utc-string",details:{date:n},error:e}),n.toISOString().split("T")[0]}}function ae(n){try{if(!n||!(n instanceof Date)||isNaN(n.getTime()))return Ve.warn("formatDateForStorage received invalid date:",{category:"validation",operation:"formatdateforstorage-received-invalid-date",details:{value:n}}),"";let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}catch(e){return Ve.error("Error formatting date for storage:",{category:"validation",operation:"formatting-date-storage",details:{date:n},error:e}),""}}function Wz(n,e){let t=[],r=ae(n),a=ae(e),i=Vu(r),s=Vu(a);for(;i<=s;)t.push(new Date(i)),i.setUTCDate(i.getUTCDate()+1);return t}function x0(n,e=1){let t=Vu(ae(n)),a=(t.getUTCDay()-e+7)%7,i=new Date(t);return i.setUTCDate(i.getUTCDate()-a),i}function qz(n,e=1){let t=x0(n,e),r=new Date(t);return r.setUTCDate(r.getUTCDate()+6),r}function E0(n){let e=Vu(ae(n));return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1))}function D0(n){let e=Vu(ae(n));return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+1,0))}function P0(n){if(!n||typeof n!="string")return!1;let e=n.toLowerCase().trim().replace(/\s+/g," ");return e in Rb?!0:[/^in\s+(\d+)\s+(days?)$/,/^(\d+)\s+(days?)\s+ago$/,/^in\s+(\d+)\s+(weeks?)$/,/^(\d+)\s+(weeks?)\s+ago$/].some(r=>r.test(e))}function I1e(n){if(typeof n!="string")return!1;let e=n.trim();if(e===""||P0(e))return!0;try{let t=ma(e);return ta(t)}catch(t){return!1}}function Fl(n){if(!n||typeof n!="string")return n;let e=n.toLowerCase().trim().replace(/\s+/g," ");if(e in Rb)try{return Rb[e]()}catch(t){return Ve.error("Error resolving natural language date:",{category:"validation",operation:"resolving-natural-language-date",details:{value:n},error:t}),n}try{let t=e.match(/^in\s+(\d+)\s+(days?)$/);if(t){let r=parseInt(t[1],10);return lf(zr(),r)}if(t=e.match(/^(\d+)\s+(days?)\s+ago$/),t){let r=parseInt(t[1],10);return lf(zr(),-r)}if(t=e.match(/^in\s+(\d+)\s+(weeks?)$/),t){let r=parseInt(t[1],10);return Uz(zr(),r)}if(t=e.match(/^(\d+)\s+(weeks?)\s+ago$/),t){let r=parseInt(t[1],10);return Uz(zr(),-r)}}catch(t){Ve.error("Error parsing relative natural language date:",{category:"validation",operation:"parsing-relative-natural-language-date",details:{value:n},error:t})}return n}function N1e(){let n=Object.keys(Rb),e=["in 3 days","2 days ago","in 1 week","2 weeks ago"];return[...n,...e].sort()}var Ve,Rb,xe=y(()=>{Cr();q();Ve=M({tag:"Utils/DateUtils"});Rb={today:()=>zr(),tomorrow:()=>lf(zr(),1),yesterday:()=>lf(zr(),-1),"next week":()=>lf(zr(),7),"last week":()=>lf(zr(),-7)}});function uf(n){return Ste(Lte(n))}function Fte(n,e,t){return Cte(Lte(n),e,t)}function Fb(n,e){var t;return zz(n,{today:(t=e==null?void 0:e.minOccurrenceDate)!=null?t:zr()})}function Cd(n,e=!0,t){var r;return bte(n,e,{today:(r=t==null?void 0:t.minOccurrenceDate)!=null?r:zr()})}function Lte(n){let e=_te(n.scheduled),t=_te(n.dateCreated);return e===n.scheduled&&t===n.dateCreated?n:{...n,scheduled:e,dateCreated:t}}function _te(n){if(!n)return n;let e=n.trim().match(/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(Z|[+-]\d{2}:\d{2})?$/);if(!e)return n;let[,t,r,a=""]=e;return`${t}T${r}:00${a}`}var pf=y(()=>{jz();jz();xe()});function hr(n,e=""){var a;let t=(a=n==null?void 0:n.trim())!=null?a:"";if(!t)return e;let r=t.toLowerCase();if(Yz.has(r))return`var(--color-${r})`;if(r==="accent")return"var(--color-accent)";if(r.startsWith("color-")){let i=r.slice(6);if(Yz.has(i)||i==="accent")return`var(--${r})`}return r.startsWith("--")?`var(${t})`:t}function xd(n){var i;let e=(i=n==null?void 0:n.trim())!=null?i:"",t=e.match(R1e);if(!t)return e;let r=t[1].toLowerCase();if(r==="--color-accent")return"accent";let a=r.replace(/^--color-/,"");return Yz.has(a)?a:e}function Ed(n){return hr(n).startsWith("var(")}function M0(n){let e=hr(n);return e?!!(_1e.test(e)||Ed(e)||zte.test(e)):!1}function iy(n,e){let t=hr(n);if(!t)return`rgba(128, 128, 128, ${e})`;if(Ed(t)||zte.test(t))return`color-mix(in srgb, ${t} ${Math.round(e*100)}%, transparent)`;let r=t.replace("#","");if(/^[0-9a-f]{3}$/i.test(r)){let o=parseInt(r[0]+r[0],16),l=parseInt(r[1]+r[1],16),c=parseInt(r[2]+r[2],16);return`rgba(${o}, ${l}, ${c}, ${e})`}if(!/^[0-9a-f]{6}$/i.test(r))return`rgba(128, 128, 128, ${e})`;let a=parseInt(r.substring(0,2),16),i=parseInt(r.substring(2,4),16),s=parseInt(r.substring(4,6),16);return`rgba(${a}, ${i}, ${s}, ${e})`}var Ote,Yz,R1e,_1e,zte,A0,Bte,Ll=y(()=>{Ote=["red","orange","yellow","green","cyan","blue","purple","pink"],Yz=new Set(Ote),R1e=/^var\(\s*(--[a-z0-9_-]+)\s*\)$/i,_1e=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i,zte=/^(?:rgb|rgba|hsl|hsla|oklch|lab|color|color-mix)\(/i,A0="#6366f1, red, blue, cyan",Bte=[...Ote,"accent","var(--color-accent)"]});async function sy(n,e){var a;let r=((a=I0.get(n))!=null?a:Promise.resolve()).catch(()=>{}).then(e);I0.set(n,r);try{return await r}finally{I0.get(n)===r&&I0.delete(n)}}async function yr(n,e,t){await sy(e,()=>Lb(n,e,t))}async function Lb(n,e,t){await n.fileManager.processFrontMatter(e,t)}async function Ob(n,e,t){return sy(e,()=>zb(n,e,t))}async function zb(n,e,t){return n.vault.process(e,t)}async function mf(n,e,t){return n.vault.create(e,t)}async function Bb(n,e){await n.vault.createFolder(e)}async function Gs(n,e,t){await sy(e,()=>n.vault.modify(e,t))}async function Kz(n,e,t){await n.vault.rename(e,t)}var I0,Zz=y(()=>{I0=new WeakMap});function Ute(n){return window.moment(n)}function N0(n){if(!n.startsWith("---"))return{};let e=n.indexOf("---",3);if(e===-1)return{};let t=n.substring(3,e);try{return(0,hf.parseYaml)(t)||{}}catch(r){return ff.error("Error parsing frontmatter:",{category:"validation",operation:"parsing-frontmatter",error:r}),{}}}async function qu(n,e){try{let r=(0,hf.normalizePath)(e).split("/").filter(i=>i.length>0),a="";for(let i of r)if(a=a?`${a}/${i}`:i,!await n.adapter.exists(a))try{await n.createFolder(a)}catch(s){if(!await n.adapter.exists(a))throw new Error(`Failed to create folder "${a}"`)}}catch(t){let r=t instanceof Error?t.message:String(t),a=t instanceof Error?t.stack:void 0;ff.error("Error creating folder structure:",{category:"internal",operation:"creating-folder-structure",details:{stack:a,folderPath:e,normalizedPath:(0,hf.normalizePath)(e)},error:r});let i=new Error(`Failed to create folder "${e}": ${r}`);throw a&&(i.stack=a),i}}function F1e(n,e){try{let t=new Date(n),r=new Date(e);if(isNaN(t.getTime())||isNaN(r.getTime()))return ff.error("Invalid timestamps for duration calculation:",{category:"validation",operation:"invalid-timestamps-duration-calculation",details:{startTime:n,endTime:e}}),0;if(r<=t)return ff.error("End time is not after start time:",{category:"internal",operation:"end-time-not-start-time",details:{startTime:n,endTime:e}}),0;let a=r.getTime()-t.getTime(),i=Math.round(a/(1e3*60));return Math.max(0,i)}catch(t){return ff.error("Error calculating duration:",{category:"internal",operation:"calculating-duration",details:{startTime:n,endTime:e},error:t}),0}}function oi(n){return!n||!Array.isArray(n)?0:n.reduce((e,t)=>{if(!t.startTime||!t.endTime)return e;let r=F1e(t.startTime,t.endTime);return e+r},0)}function R0(n){return!n||!Array.isArray(n)?null:n.find(e=>e.startTime&&!e.endTime)||null}function _0(n){if(!n||n===0||isNaN(n))return"0m";let e=Math.floor(n/60),t=n%60;return e===0?`${t}m`:t===0?`${e}h`:`${e}h ${t}m`}function jb(n){if(n==="none")return"";let e=new Date,t;switch(n){case"today":t=e;break;case"tomorrow":t=new Date(e),t.setDate(e.getDate()+1);break;case"next-week":t=new Date(e),t.setDate(e.getDate()+7);break;default:return""}return D(t,"yyyy-MM-dd")}function L1e(n){return typeof n=="string"&&/^([01]\d|2[0-3]):[0-5]\d$/.test(n)}function Ol(n,e){let t=jb(n);return!t||!L1e(e)?t:fa(t,e)}function Qz(n,e){return n.getUTCFullYear()===e.getUTCFullYear()&&n.getUTCMonth()===e.getUTCMonth()&&n.getUTCDate()===e.getUTCDate()}function Hte(n,e,t,r,a,i,s){var d;let o=n.metadataCache.getFileCache(r),l=o==null?void 0:o.frontmatter;if(l)if(a){let u=a.mapFromFrontmatter(l,t,i);return{title:u.title||"Untitled task",status:u.status||s||"open",priority:u.priority||"normal",due:u.due,scheduled:u.scheduled,path:t,archived:u.archived||!1,tags:u.tags||[],contexts:u.contexts||[],projects:u.projects||[],attachments:u.attachments||[],recurrence:u.recurrence,complete_instances:u.complete_instances,completedDate:u.completedDate,timeEstimate:u.timeEstimate,timeEntries:u.timeEntries,dateCreated:u.dateCreated,dateModified:u.dateModified,reminders:u.reminders}}else{let p=new tf(Sb).mapFromFrontmatter(l,t,i);return{title:p.title||"Untitled task",status:p.status||s||"open",priority:p.priority||"normal",due:p.due,scheduled:p.scheduled,path:t,archived:p.archived||!1,tags:p.tags||[],contexts:p.contexts||[],projects:p.projects||[],attachments:p.attachments||[],recurrence:p.recurrence,complete_instances:p.complete_instances,completedDate:p.completedDate,timeEstimate:p.timeEstimate,timeEntries:p.timeEntries,dateCreated:p.dateCreated,dateModified:p.dateModified,reminders:p.reminders}}return{title:((d=t.split("/").pop())==null?void 0:d.replace(".md",""))||"Untitled",status:s||"open",priority:"normal",path:t,archived:!1,reminders:[]}}function Gu(n){if(n.startsWith("---")){let e=n.match(/^---\s*\r?\n([\s\S]*?)\r?\n---\s*\r?\n?([\s\S]*)$/);if(e)return{frontmatter:e[1],body:e[2]||""}}return{frontmatter:null,body:n}}function Vte(n){let e=/^(\s*)([-*+]|\d+\.)(\s+\[)[xX](\].*)/gm,t=!1;return{content:n.replace(e,(a,i,s,o,l)=>(t=!0,`${i}${s}${o} ${l}`)),changed:t}}function F0(n,e){return Oz(n,e)}function oy(n,e,t){return T0(n,e,t)}function ly(n,e,t){return Hu(n,e,t)}function Wte(n){return Tte(n)}function qte(n,e=!0){return Cd(n,e)}function Gte(n){return wte(n)}function jte(n,e=!1){if(e&&n==="24:00")return $te;let t=/^([0-1]?[0-9]|2[0-3]):([0-5][0-9])$/.exec(n);return t?Number(t[1])*60+Number(t[2]):null}function O1e(n){if(!n||typeof n!="object")return!1;let e=n;if(!e.id||typeof e.id!="string"||!e.title||typeof e.title!="string"||!e.startTime||typeof e.startTime!="string"||!e.endTime||typeof e.endTime!="string")return!1;let t=jte(e.startTime),r=jte(e.endTime,!0);if(t===null||r===null||(e.endTime==="00:00"&&t>0?$te:r)<=t||e.attachments&&!Array.isArray(e.attachments))return!1;if(e.attachments){for(let i of e.attachments)if(typeof i!="string"||!i.trim())return!1}return!(e.color&&typeof e.color!="string"||e.description&&typeof e.description!="string")}function z1e(n,e){try{let t=N0(n);if(!t||!t.timeblocks||!Array.isArray(t.timeblocks))return[];let r=[];for(let a of t.timeblocks)O1e(a)?r.push(a):ff.warn(`Invalid timeblock in ${e}:`,{category:"validation",operation:"invalid-timeblock",details:{value:a}});return r}catch(t){return ff.error(`Error extracting timeblocks from ${e}:`,{category:"internal",operation:"extracting-timeblocks",error:t}),[]}}function Jz(){return`tb-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}function B1e(n,e,t){return{...n,id:Jz(),startTime:e,endTime:t,attachments:n.attachments?[...n.attachments]:void 0}}async function Xz(n,e,t,r,a,i){let{getDailyNote:s,getAllDailyNotes:o,appHasDailyNotesPluginLoaded:l}=await Promise.resolve().then(()=>tt(od()));if(!l())throw new Error("Daily Notes plugin is not enabled");let c=o(),d=Ute(t),u=s(d,c);if(!u)throw new Error(`Daily note for ${t} not found`);let p=await n.vault.read(u),m=z1e(p,u.path),f=m.findIndex(v=>v.id===e);if(f===-1)throw new Error(`Timeblock ${e} not found`);let h=m[f];if(t===r){await j1e(n,u,e,a,i);return}await $1e(n,u,e);let g={...h,startTime:a,endTime:i};await Kte(n,r,g)}async function Yte(n,e,t,r,a){let i=B1e(t,r,a);return await Kte(n,e,i),i}async function j1e(n,e,t,r,a){let i=await n.vault.read(e),s=N0(i)||{};if(!s.timeblocks||!Array.isArray(s.timeblocks))throw new Error("No timeblocks found in frontmatter");let o=s.timeblocks.findIndex(l=>l.id===t);if(o===-1)throw new Error(`Timeblock ${t} not found`);s.timeblocks[o].startTime=r,s.timeblocks[o].endTime=a,await eB(n,e,s,i)}async function $1e(n,e,t){let r=await n.vault.read(e),a=N0(r)||{};!a.timeblocks||!Array.isArray(a.timeblocks)||(a.timeblocks=a.timeblocks.filter(i=>i.id!==t),await eB(n,e,a,r))}async function Kte(n,e,t){let{createDailyNote:r,getDailyNote:a,getAllDailyNotes:i}=await Promise.resolve().then(()=>tt(od())),s=Ute(e),o=i(),l=a(s,o);if(!l){try{l=await r(s)}catch(u){let p=u instanceof Error?u.message:String(u);throw new Error(`Failed to create daily note: ${p}. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.`)}if(!l)throw new Error("Failed to create daily note. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.")}let c=await n.vault.read(l),d=N0(c)||{};d.timeblocks||(d.timeblocks=[]),d.timeblocks.push(t),await eB(n,l,d,c)}async function eB(n,e,t,r){let a=r;if(r.startsWith("---")){let o=r.indexOf("---",3);o!==-1&&(a=r.substring(o+3))}let s=`---
${(0,hf.stringifyYaml)(t)}---${a}`;await Gs(n,e,s)}function Ko(n){return!n||!Array.isArray(n)?[]:n.filter(e=>{if(typeof e!="string")return!1;let t=e.trim();return!(t.length===0||t==='""'||t==="''")})}function Zte(n,e){return b0(n,e)}function Qte(n,e,t){return Fte(n,e,t)}function ha(n){return!n||typeof n!="string"?"":n.split(",").map(e=>gb(e)).filter(e=>e.length>0).join(", ")}function Dd(n){return!n||typeof n!="string"?"":n.replace(/[^a-zA-Z0-9-]/g,"-").toLowerCase()}var hf,ff,$te,yt=y(()=>{hf=require("obsidian");Cr();yz();s0();pf();xe();Yg();Ll();q();Zz();ff=M({tag:"Utils/Helpers"}),$te=1440});function Y(n){var e;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number")return Number.prototype.toString.call(n);if(typeof n=="bigint")return BigInt.prototype.toString.call(n);if(typeof n=="boolean")return n?"true":"false";if(typeof n=="symbol")return(e=n.description)!=null?e:"";if(n instanceof Date)return n.toISOString();if(Array.isArray(n))return n.map(t=>Y(t)).filter(t=>t.length>0).join(", ");try{let t=JSON.stringify(n);return typeof t=="string"?t:""}catch(t){return""}}function L0(n){return Array.isArray(n)?n.map(e=>Y(e)):[Y(n)]}var dr=y(()=>{});var aEt,Yu,O0=y(()=>{dr();q();aEt=M({tag:"Utils/ProjectMetadataResolver"}),Yu=class{constructor(e){this.deps=e}buildMetadataRows(e,t,r){var s;let a=[],i=Math.min(e.length,3);for(let o=0;o<i;o++){let l=e[o];if(l)try{let c=r(l),d=[];for(let u of c){if(u.property.startsWith("literal:")){let m=u.property.slice(8);m&&d.push(m);continue}let p=this.resolve(u.property,t);p&&(u.showName?d.push(`${(s=u.displayName)!=null?s:u.property}: ${p}`):d.push(p))}d.length>0&&a.push(d.join(" "))}catch(c){}}return a}stringifyFmValue(e){if(e==null)return"";if(Array.isArray(e))return e.map(a=>this.stringifyFmValue(a)).filter(Boolean).join(", ");let t=typeof e;if(t==="string"){let a=e.trim(),i=a.match(/^\[\[([^\]]+)\]\]$/);if(i){let l=i[1].split("|");if(l.length>1&&l[1].trim())return l[1].trim();let c=l[0].split("#")[0].trim();return(c.split("/").pop()||c).replace(/\.md$/i,"")}let s=a.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return s?s[1].trim():a}if(t==="number"||t==="boolean")return Y(e);if(t==="object"){let r=e;if(typeof r.path=="string"){let a=r.path;return(a.split("/").pop()||a).replace(/\.md$/i,"")}return""}return""}resolve(e,t){if(!e)return"";if(e.startsWith("file."))switch(e){case"file.basename":return t.basename||"";case"file.name":return t.name||"";case"file.path":return t.path||"";case"file.parent":return t.parent||"";default:return""}if(e==="title")return t.title||"";if(e==="aliases"){let i=t.aliases||[];return i.length?i.join(", "):""}let r=e;e.startsWith("frontmatter:")&&(r=e.slice(12));let a=this.deps.getFrontmatter(t)||{};return this.stringifyFmValue(a[r])}}});function U1e(n){let e=[],t="",r=0;for(;r<n.length;){let a=n[r];if(a==="\\"&&r+1<n.length){t+=n[r+1],r+=2;continue}if(a==="|"){e.push(t.trim()),t="",r++;continue}t+=a,r++}return e.push(t.trim()),e.filter(a=>a.length>0)}function H1e(n){return n.replace(/\\\|/g,"|").replace(/\\\)/g,")")}function zl(n){let e=[];if(!n)return e;let t=/\{([^}]*)\}/g,r,a=0;for(;(r=t.exec(n))!==null;){let s=n.slice(a,r.index);s.length>0&&e.push({property:`literal:${s}`,showName:!1}),a=t.lastIndex;let o=r[1].trim();if(!o)continue;let l=U1e(o);if(l.length===0)continue;let c=l[0];if(!c)throw new Error("Missing property name in token");let d={property:c,showName:!1};for(let u=1;u<l.length;u++){let p=l[u];p==="n"?d.showName=!0:p.startsWith("n(")&&p.endsWith(")")?(d.showName=!0,d.displayName=H1e(p.slice(2,-1))):p==="s"&&(d.searchable=!0)}e.push(d)}let i=n.slice(a);return i.length>0&&e.push({property:`literal:${i}`,showName:!1}),e}var $b=y(()=>{});function Jte(n){return n!=null?n.trim():""}function V1e(n){let e=Jte(n);return e.length>0?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function W1e(n){return n?n.trim():""}function cy(n){let e=W1e(n==null?void 0:n.propertyKey),t=Jte(n==null?void 0:n.propertyValue);return{key:e,value:t,enabled:e.length>0}}function dy(n,e){if(!e.enabled)return!0;if(!n||typeof n!="object"||!(e.key in n))return!1;let t=n[e.key],r=V1e(e.value);if(r.length===0)return t!=null;let a=new Set(r.map(s=>s.toLowerCase())),i=s=>{if(s==null)return!1;if(Array.isArray(s))return s.some(o=>i(o));if(typeof s=="string")return a.has(s.trim().toLowerCase());if(typeof s=="number"||typeof s=="boolean")return a.has(String(s).toLowerCase());if(typeof s=="object")try{return a.has(JSON.stringify(s).toLowerCase())}catch(o){return!1}return a.has(Y(s).toLowerCase())};return i(t)}var z0=y(()=>{dr()});var ga,Pd,gf,ir,Ad=y(()=>{xe();ga=class extends Error{constructor(t,r,a){super(t);this.field=r;this.nodeId=a;this.name="FilterValidationError"}},Pd=class extends Error{constructor(t,r){super(t);this.nodeId=r;this.name="FilterEvaluationError"}},gf=class gf{static generateId(){return`filter_${Date.now()}_${++this.idCounter}`}static deepCloneFilterQuery(e){return JSON.parse(JSON.stringify(e))}static validateFilterNode(e,t=!0){if(!e||typeof e!="object")throw new ga("Filter node must be an object");if(!("id"in e)||!e.id||typeof e.id!="string")throw new ga("Filter node must have a valid string ID",void 0,"id"in e?String(e.id):"unknown");if(e.type==="condition")this.validateCondition(e,t);else if(e.type==="group")this.validateGroup(e,t);else{let r=e;throw new ga(`Unknown filter node type: ${String(r.type)}`,void 0,typeof r.id=="string"?r.id:void 0)}}static validateCondition(e,t=!0){if(typeof e.property!="string")throw new ga("Condition must have a valid property","property",e.id);if(t&&e.property==="")throw new ga("Property must be selected","property",e.id);if(e.property==="")return;if(!e.operator||typeof e.operator!="string")throw new ga("Condition must have a valid operator","operator",e.id);if(!this.getValidOperatorsForProperty(e.property).includes(e.operator))throw new ga(`Operator '${e.operator}' is not valid for property '${e.property}'`,"operator",e.id);if(t&&this.operatorRequiresValue(e.operator)&&(e.value===null||e.value===void 0||e.value===""))throw new ga(`Operator '${e.operator}' requires a value`,"value",e.id)}static validateGroup(e,t=!0){if(!e.conjunction||!["and","or"].includes(e.conjunction))throw new ga("Group must have a valid conjunction (and/or)","conjunction",e.id);if(!Array.isArray(e.children))throw new ga("Group must have a children array","children",e.id);e.children.forEach((r,a)=>{try{this.validateFilterNode(r,t)}catch(i){throw i instanceof ga?new ga(`Child ${a}: ${i.message}`,i.field,e.id):i}})}static getValidOperatorsForProperty(e){return typeof e=="string"&&e.startsWith("user:")?["is","is-not","contains","does-not-contain","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty","is-checked","is-not-checked","is-greater-than","is-less-than","is-greater-than-or-equal","is-less-than-or-equal"]:{"":[],title:["is","is-not","contains","does-not-contain","is-empty","is-not-empty"],path:["contains","does-not-contain","is-empty","is-not-empty"],status:["is","is-not","is-empty","is-not-empty"],priority:["is","is-not","is-empty","is-not-empty"],tags:["contains","does-not-contain","is-empty","is-not-empty"],contexts:["contains","does-not-contain","is-empty","is-not-empty"],projects:["contains","does-not-contain","is-empty","is-not-empty"],blockedBy:["contains","does-not-contain","is-empty","is-not-empty"],blocking:["contains","does-not-contain","is-empty","is-not-empty"],due:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],scheduled:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],completedDate:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],dateCreated:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],dateModified:["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"],archived:["is-checked","is-not-checked"],hasSubtasks:["is-checked","is-not-checked"],"dependencies.isBlocked":["is-checked","is-not-checked"],"dependencies.isBlocking":["is-checked","is-not-checked"],timeEstimate:["is","is-not","is-greater-than","is-less-than","is-greater-than-or-equal","is-less-than-or-equal"],recurrence:["is-empty","is-not-empty"],"status.isCompleted":["is-checked","is-not-checked"]}[e]||[]}static isFilterNodeComplete(e){try{return this.validateFilterNode(e,!0),!0}catch(t){return!1}}static operatorRequiresValue(e){return!["is-empty","is-not-empty","is-checked","is-not-checked"].includes(e)}static getTaskPropertyValue(e,t){var r;switch(t){case"title":return e.title;case"path":return e.path;case"status":return e.status;case"priority":return e.priority;case"tags":return e.tags||[];case"contexts":return e.contexts||[];case"projects":return e.projects||[];case"blockedBy":return((r=e.blockedBy)==null?void 0:r.map(a=>a.uid))||[];case"blocking":return e.blocking||[];case"due":return e.due;case"scheduled":return e.scheduled;case"completedDate":return e.completedDate;case"dateCreated":return e.dateCreated;case"dateModified":return e.dateModified;case"archived":return e.archived;case"hasSubtasks":return e.hasSubtasks===!0;case"timeEstimate":return e.timeEstimate;case"recurrence":return e.recurrence;case"status.isCompleted":return;case"dependencies.isBlocked":return e.isBlocked===!0;case"dependencies.isBlocking":return e.isBlocking===!0;default:throw new Pd(`Unknown property: ${t}`)}}static applyOperator(e,t,r,a,i){try{switch(t){case"is":return this.isEqual(e,r,i);case"is-not":return!this.isEqual(e,r,i);case"contains":return this.contains(e,r,i);case"does-not-contain":return!this.contains(e,r,i);case"is-before":return this.isBefore(e,r);case"is-after":return this.isAfter(e,r);case"is-on-or-before":return this.isOnOrBefore(e,r);case"is-on-or-after":return this.isOnOrAfter(e,r);case"is-empty":return this.isEmpty(e);case"is-not-empty":return!this.isEmpty(e);case"is-checked":return e===!0;case"is-not-checked":return e!==!0;case"is-greater-than":return this.isGreaterThan(e,r);case"is-less-than":return this.isLessThan(e,r);case"is-greater-than-or-equal":return this.isGreaterThanOrEqual(e,r);case"is-less-than-or-equal":return this.isLessThanOrEqual(e,r);default:throw new Pd("Unknown operator",a)}}catch(s){throw s instanceof Pd?s:new Pd(`Error applying operator '${t}': ${s.message}`,a)}}static isEqual(e,t,r){if(r&&this.isDateProperty(r)&&typeof e=="string"&&typeof t=="string"&&(e||P0(t)))return this.isEqualDate(e,t);let a=(i,s)=>this.hasNumericComparison(i,s)?this.toFiniteNumber(i)===this.toFiniteNumber(s):i===s;return Array.isArray(e)?Array.isArray(t)?e.some(i=>t.some(s=>a(i,s))):e.some(i=>a(i,t)):Array.isArray(t)?t.some(i=>a(e,i)):a(e,t)}static hasNumericComparison(e,t){return!(typeof e=="number")&&!(typeof t=="number")?!1:this.toFiniteNumber(e)!==void 0&&this.toFiniteNumber(t)!==void 0}static toFiniteNumber(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(typeof e!="string")return;let t=e.trim();if(!t)return;let r=Number(t);return Number.isFinite(r)?r:void 0}static matchesHierarchicalTag(e,t){if(!e||!t)return!1;let r=e.toLowerCase(),a=t.toLowerCase();return!!(r===a||r.startsWith(a+"/")||r.includes(a))}static matchesHierarchicalTagExact(e,t){if(!e||!t)return!1;let r=e.toLowerCase(),a=t.toLowerCase();return!!(r===a||r.startsWith(a+"/"))}static matchesTagConditions(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(t.length===0)return!0;let r=[],a=[];for(let i of t)if(typeof i=="string"&&i.startsWith("-")){let s=i.slice(1);s&&a.push(s)}else typeof i=="string"&&r.push(i);for(let i of a)if(e.some(o=>this.matchesHierarchicalTag(o,i)))return!1;return r.length>0?r.some(i=>e.some(s=>this.matchesHierarchicalTag(s,i))):!0}static contains(e,t,r){if(Array.isArray(e))if(Array.isArray(t))if(r==="tags"){let a=e.filter(s=>typeof s=="string"),i=t.filter(s=>typeof s=="string");return gf.matchesTagConditions(a,i)}else return t.some(a=>e.some(i=>typeof i=="string"&&typeof a=="string"&&i.toLowerCase().includes(a.toLowerCase())));else{let a=typeof t=="string"?t:String(t!=null?t:"");if(r==="tags"){let i=e.filter(s=>typeof s=="string");return gf.matchesTagConditions(i,[a])}else{let i=a.toLowerCase();return e.some(s=>typeof s=="string"&&s.toLowerCase().includes(i))}}else if(typeof e=="string")if(Array.isArray(t))if(r==="tags"){let a=t.filter(i=>typeof i=="string");return gf.matchesTagConditions([e],a)}else return t.some(a=>typeof a=="string"&&e.toLowerCase().includes(a.toLowerCase()));else return r==="tags"&&typeof t=="string"?gf.matchesTagConditions([e],[t]):typeof t=="string"&&e.toLowerCase().includes(t.toLowerCase());return!1}static isBefore(e,t){if(!e||!t)return!1;try{let r=Fl(t);return Sd(e,r)}catch(r){return!1}}static isAfter(e,t){if(!e||!t)return!1;try{let r=Fl(t);return Sd(r,e)}catch(r){return!1}}static isOnOrBefore(e,t){if(!e||!t)return!1;try{let r=Fl(t);return Sd(e,r)||qs(re(e),re(r))}catch(r){return!1}}static isOnOrAfter(e,t){if(!e||!t)return!1;try{let r=Fl(t);return Sd(r,e)||qs(re(e),re(r))}catch(r){return!1}}static isDateProperty(e){return["due","scheduled","completedDate","dateCreated","dateModified"].includes(e)}static isEqualDate(e,t){try{let r=Fl(t);return qs(re(e),re(r))}catch(r){return!1}}static isEmpty(e){return e==null?!0:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0?!0:e.every(t=>{if(typeof t!="string")return!1;let r=t.trim();return r.length===0||r==='""'||r==="''"}):!1}static isGreaterThan(e,t){let r=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(r)||isNaN(a)?!1:r>a}static isLessThan(e,t){let r=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(r)||isNaN(a)?!1:r<a}static isGreaterThanOrEqual(e,t){let r=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(r)||isNaN(a)?!1:r>=a}static isLessThanOrEqual(e,t){let r=typeof e=="number"?e:parseFloat(e),a=typeof t=="number"?t:parseFloat(t);return isNaN(r)||isNaN(a)?!1:r<=a}};gf.idCounter=0;ir=gf});function uy(n){var r,a,i;let e=new Set;for(let s of(r=n==null?void 0:n.tags)!=null?r:[])rB(e,s.tag);let t=(a=n==null?void 0:n.frontmatter)!=null?a:null;for(let s of(i=(0,Xte.parseFrontMatterTags)(t))!=null?i:[])rB(e,s);return tB(e,t==null?void 0:t.tags),tB(e,t==null?void 0:t.tag),Array.from(e)}function tB(n,e){if(Array.isArray(e)){for(let t of e)tB(n,t);return}if(typeof e=="string")for(let t of e.split(/[,\s]+/))rB(n,t)}function rB(n,e){if(typeof e!="string")return;let t=e.trim().replace(/^#/,"");t&&n.add(t)}var Xte,B0=y(()=>{Xte=require("obsidian")});function Ub(n,e){if(!n||!e)return 0;let t=n.toLowerCase().split(" ").filter(Boolean),r=e.toLowerCase(),a=0,i=0;for(let s=0;s<t.length;s++){let o=t[s],l=r.indexOf(o,a);if(l===-1)return 0;i+=Math.max(0,100-l),r.startsWith(o,l)&&(i+=10),s>0&&l===a&&(i+=5),a=l+o.length}return i}var ere=y(()=>{});var aB={};Xe(aB,{FileSuggestHelper:()=>nB,getActiveFolderPath:()=>j0,isPathInIncludedFolders:()=>$0,resolveIncludeFolders:()=>nre});function q1e(n){var t;let e=(t=n==null?void 0:n.app)==null?void 0:t.vault;return typeof(e==null?void 0:e.getFiles)=="function"?e.getFiles():typeof(e==null?void 0:e.getMarkdownFiles)=="function"?e.getMarkdownFiles():[]}function G1e(n,e){var t,r;if(e.extension==="md"){let a=(r=(t=n.app.metadataCache).fileToLinktext)==null?void 0:r.call(t,e,"",!0);return typeof a=="string"&&a.trim()?a:e.basename}return e.name||e.path.split("/").pop()||e.basename}function rre(n){return n.trim().replace(/\\/g,"/").replace(/^\/+/,"").replace(/\/+$/,"")}function Y1e(n,e=""){let t=rre(e).split("/").filter(Boolean);for(let r of n.replace(/\\/g,"/").split("/"))!r||r==="."||(r===".."?t.pop():t.push(r));return t.join("/")}function K1e(n,e){let t=rre(n);return t==="."||t===".."||t.startsWith("./")||t.startsWith("../")?Y1e(t,e):t}function j0(n){var t,r,a,i;let e=(a=(r=(t=n==null?void 0:n.app)==null?void 0:t.workspace)==null?void 0:r.getActiveFile)==null?void 0:a.call(r);if(((i=e==null?void 0:e.parent)==null?void 0:i.path)!==void 0)return e.parent.path;if(typeof(e==null?void 0:e.path)=="string")return e.path.split("/").slice(0,-1).join("/")}function nre(n,e){return n.filter(t=>t.trim().length>0).map(t=>K1e(t,e))}function $0(n,e,t){return nre(e,t).some(a=>a===""||n===a||n.startsWith(`${a}/`))}var tre,nB,Hb=y(()=>{tre=require("obsidian");ere();$b();z0();Ad();hb();B0();nB={async suggest(n,e,t=20,r,a=j0(n)){var o,l;let i=async()=>{var b,w,S,C,x,E,_;let c=q1e(n),d=[],u=Il((b=n.settings)==null?void 0:b.excludedFolders),p=((C=(S=(w=n.settings)==null?void 0:w.projectAutosuggest)==null?void 0:S.rows)!=null?C:[]).slice(0,3),m=new Set;for(let F of p)try{let I=zl(F);for(let A of I)A.searchable&&!A.property.startsWith("literal:")&&m.add(A.property)}catch(I){}let f=(e||"").toLowerCase(),h=(x=r==null?void 0:r.requiredTags)!=null?x:[],g=(E=r==null?void 0:r.includeFolders)!=null?E:[],v=cy(r);for(let F of c){if(qg(F.path,u))continue;let I=n.app.metadataCache.getFileCache(F);if(h.length>0&&!ir.matchesTagConditions(uy(I),h)||g.length>0&&!$0(F.path,g,a))continue;if(v.enabled){let X=I==null?void 0:I.frontmatter;if(!dy(X,v))continue}let A=F.basename,R="";if(I!=null&&I.frontmatter){let X=n.fieldMapper.mapFromFrontmatter(I.frontmatter,F.path,n.settings.storeTitleInFilename);R=typeof X.title=="string"?X.title:""}let O=I!=null&&I.frontmatter?(0,tre.parseFrontMatterAliases)(I.frontmatter)||[]:[],U=0,oe=f.length>0?Ub(e,A):1;if(oe>0&&(U=Math.max(U,oe+15)),R){let X=Ub(e,R);X>0&&(U=Math.max(U,X+5))}if(Array.isArray(O)){for(let X of O)if(typeof X=="string"){let de=Ub(e,X);de>0&&(U=Math.max(U,de))}}if(m.size>0){let X=(I==null?void 0:I.frontmatter)||{};for(let de of m){let Oe="";if(de==="file.path")Oe=F.path;else if(de==="file.parent")Oe=((_=F.parent)==null?void 0:_.path)||"";else if(de==="file.basename")Oe=A;else if(de==="title")Oe=R;else if(de==="aliases")Oe=(Array.isArray(O)?O.filter(Z=>typeof Z=="string"):[]).join(" ");else{let Q=X[de];Q!=null&&(Array.isArray(Q)?Oe=Q.filter(Z=>typeof Z=="string").join(" "):typeof Q=="object"?Oe=JSON.stringify(Q):(typeof Q=="string"||typeof Q=="number"||typeof Q=="boolean")&&(Oe=String(Q)))}if(Oe){let Q=Ub(e,Oe),Z=Q>0?Q:Oe.toLowerCase().includes(f)?30:0;Z>0&&(U=Math.max(U,Z))}}}if(U>0){let X=[];R&&R!==A&&X.push(`title: ${R}`);let de=Array.isArray(O)?O.filter(Q=>typeof Q=="string"):[];de.length&&X.push(`aliases: ${de.join(", ")}`);let Oe=X.length?`${A} [${X.join(" | ")}]`:A;d.push({insertText:G1e(n,F),displayText:Oe,path:F.path,score:U})}}d.sort((F,I)=>I.score-F.score);let k=[],T=new Set;for(let F of d)if(!T.has(F.insertText)&&(k.push(F),T.add(F.insertText),k.length>=t))break;return k},s=(l=(o=n.settings)==null?void 0:o.suggestionDebounceMs)!=null?l:0;return s?new Promise(c=>{let d=n;d.__fileSuggestTimer&&window.clearTimeout(d.__fileSuggestTimer),d.__fileSuggestTimer=window.setTimeout(()=>{(async()=>{let u=await i();c(u)})()},s)}):i()}}});var Bl,Z1e,Ys,py=y(()=>{Bl=require("obsidian");O0();$b();z0();Ad();B0();Hb();q();Z1e=M({tag:"Modals/ProjectSelectModal"}),Ys=class extends Bl.FuzzySuggestModal{constructor(e,t,r){super(e),this.plugin=t,this.onChoose=r,this.setPlaceholder("Type to search for project notes..."),this.setInstructions([{command:"↑↓",purpose:"to navigate"},{command:"↵",purpose:"to select"},{command:"esc",purpose:"to cancel"}])}getItems(){var s,o,l,c,d,u,p;let e=this.app.vault.getAllLoadedFiles().filter(m=>m instanceof Bl.TFile&&m.extension==="md"&&!m.path.includes(".trash")),t=(l=(o=(s=this.plugin.settings)==null?void 0:s.projectAutosuggest)==null?void 0:o.requiredTags)!=null?l:[],r=(u=(d=(c=this.plugin.settings)==null?void 0:c.projectAutosuggest)==null?void 0:d.includeFolders)!=null?u:[],a=cy((p=this.plugin.settings)==null?void 0:p.projectAutosuggest),i=j0(this.plugin);return t.length===0&&r.length===0&&!a.enabled?e:e.filter(m=>{if(!(m instanceof Bl.TFile))return!1;let f=this.app.metadataCache.getFileCache(m);if(t.length>0&&!ir.matchesTagConditions(uy(f),t)||r.length>0&&!$0(m.path,r,i))return!1;if(a.enabled){let h=f==null?void 0:f.frontmatter;if(!dy(h,a))return!1}return!0})}getItemText(e){var s,o,l,c;if(!(e instanceof Bl.TFile))return e.name;let t=`${e.name} ${e.path}`,r=(l=(o=(s=this.plugin.settings)==null?void 0:s.projectAutosuggest)==null?void 0:o.rows)!=null?l:[],a=new Set;for(let d of r)try{let u=zl(d);for(let p of u)p.searchable&&!p.property.startsWith("literal:")&&a.add(p.property)}catch(u){}let i=this.app.metadataCache.getFileCache(e);if(i!=null&&i.frontmatter){let d=this.plugin.fieldMapper.mapFromFrontmatter(i.frontmatter,e.path,this.plugin.settings.storeTitleInFilename),u=typeof d.title=="string"?d.title:"";u&&(t+=` ${u}`);let p=(0,Bl.parseFrontMatterAliases)(i.frontmatter)||[];Array.isArray(p)&&p.length>0&&(t+=` ${p.join(" ")}`);for(let m of a){let f="";switch(m){case"file.path":f=e.path;break;case"file.parent":f=((c=e.parent)==null?void 0:c.name)||"";break;case"file.basename":f=e.basename;break;case"title":case"aliases":break;default:{let h=i.frontmatter[m];h!=null&&(f=Array.isArray(h)?h.join(" "):String(h));break}}f&&(t+=` ${f}`)}}return t}renderSuggestion(e,t){var s,o,l,c;let r=e.item;if(t.empty(),!(r instanceof Bl.TFile)){t.textContent=r.name;return}let a=t.createDiv({cls:"project-suggestion"}),i=((l=(o=(s=this.plugin.settings)==null?void 0:s.projectAutosuggest)==null?void 0:o.rows)!=null?l:[]).slice(0,3);if(i.length===0){a.createSpan({cls:"project-name",text:r.basename});return}try{let d=this.app.metadataCache.getFileCache(r),u=(d==null?void 0:d.frontmatter)||{},p=this.plugin.fieldMapper.mapFromFrontmatter(u,r.path,this.plugin.settings.storeTitleInFilename),m=typeof p.title=="string"?p.title:"",f=(0,Bl.parseFrontMatterAliases)(u)||[],h=Array.isArray(f)?f.filter(T=>typeof T=="string"):[],g={basename:r.basename,name:r.name,path:r.path,parent:((c=r.parent)==null?void 0:c.path)||"",title:m,aliases:h,frontmatter:u},v=new Yu({getFrontmatter:()=>u});a.createDiv({cls:"project-name",text:r.basename});let k=v.buildMetadataRows(i,g,zl);for(let T of k){let b=a.createDiv({cls:"project-meta"});b.textContent=T}}catch(d){Z1e.error("Error rendering project suggestion:",{category:"internal",operation:"rendering-project-suggestion",error:d}),a.createSpan({cls:"project-name",text:r.basename})}}onChooseItem(e,t){this.onChoose(e)}}});function ms(n){if(n==null)return[];let e=[],t="",r=0,a=null;for(let s=0;s<n.length;s++){let o=n[s],l=n[s+1];if(!a&&o==="["&&l==="["){r++,t+="[[",s++;continue}if(!a&&o==="]"&&l==="]"&&r>0){r--,t+="]]",s++;continue}if(!r&&(o==='"'||o==="'")){a===null?a=o:a===o&&(a=null),t+=o;continue}if(o===","&&r===0&&a===null){let c=t.trim();c&&e.push(c),t="";continue}t+=o}let i=t.trim();return i&&e.push(i),e}var Ku=y(()=>{});function U0(n){let e=n.search(/[#^]/);return(e===-1?n:n.slice(0,e)).trim()}function vt(n){if(!n)return n;let e=n.trim();if(e.startsWith("<")&&e.endsWith(">")){let r=e.slice(1,-1).trim(),a=/\.md$/i.test(r);try{r=decodeURIComponent(r)}catch(s){are.debug("Failed to decode URI component:",{category:"internal",operation:"decode-uri-component",details:{value:r},error:s})}let i=U0(r);return a?r:i||r}if(e.startsWith("[[")&&e.endsWith("]]")){let r=e.slice(2,-2).trim(),a=r.indexOf("|"),i=a!==-1?r.substring(0,a):r;return U0(i)}let t=e.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(t){let r=t[2].trim();r.startsWith("<")&&r.endsWith(">")&&(r=r.slice(1,-1).trim());let a=/\.md$/i.test(r);try{r=decodeURIComponent(r)}catch(s){are.debug("Failed to decode URI component:",{category:"internal",operation:"decode-uri-component",details:{value:r},error:s})}let i=U0(r);return a?r:i}return e}function Zo(n,e){if(!n)return"";let t=n.trim(),r=t.match(/^\[([^\]]+)\]\(([^)]+)\)$/);if(r){let a=r[1].trim(),i=r[2].trim(),s=vt(i),o=ire(s,e,a);if(o)return o;if(a)return a;let l=s.replace(/\.md$/i,""),c=l.split("/");return c[c.length-1]||l}if(t.startsWith("[[")&&t.endsWith("]]")){let a=t.slice(2,-2).trim(),i=a.indexOf("|");if(i!==-1){let d=a.slice(i+1).trim();if(d)return d}let s=U0(a.split("|")[0]||a)||vt(t),o=ire(s,e);if(o)return o;let l=s.replace(/\.md$/i,""),c=l.split("/");return c[c.length-1]||l}return t}function ire(n,e,t){let r=e==null?void 0:e.metadataCache.getFirstLinkpathDest(n,"");if(!r)return null;let a=Q1e(r,e);return a&&J1e(t,r,n)?a:(t==null?void 0:t.trim())||r.basename}function Q1e(n,e){var a,i,s,o;let t=(s=e==null?void 0:e.metadataCache.getFileCache(n))!=null?s:(i=(a=e==null?void 0:e.metadataCache)==null?void 0:a.getCache)==null?void 0:i.call(a,n.path),r=(o=t==null?void 0:t.frontmatter)==null?void 0:o.title;return typeof r=="string"&&r.trim().length>0?r.trim():null}function J1e(n,e,t){let r=(n==null?void 0:n.trim())||"";if(!r)return!0;let a=e.path.replace(/\.md$/i,""),i=t.replace(/\.md$/i,"");return new Set([e.name,e.basename,e.path,a,t,i]).has(r)}function Qo(n,e,t,r,a,i){if(i)return n.fileManager.generateMarkdownLink(e,t,r||"",a||"");let o=`[[${n.metadataCache.fileToLinktext(e,t,!0)}`;return r&&(o+=r),a&&(o+=`|${a}`),o+="]]",o}function H0(n,e,t,r,a){return Qo(n,e,t,"",r,a)}var are,Cn=y(()=>{q();are=M({tag:"Utils/LinkUtils"})});function eze(n){return X1e.includes(n)}function iB(n){if(typeof n=="string")return n;if(typeof n=="object"&&n!==null){let e=n.uid;return typeof e=="string"?e:""}return""}function Ai(n){if(typeof n=="string"){let e=n.trim();return e?{uid:vt(e),reltype:Pi}:null}if(typeof n=="object"&&n!==null){let e=n,t=typeof e.uid=="string"?e.uid.trim():"";if(!t)return null;let r=vt(t),a=typeof e.reltype=="string"?e.reltype.trim().toUpperCase():"",i=eze(a)?a:Pi,s=typeof e.gap=="string"&&e.gap.trim().length>0?e.gap.trim():void 0;return s?{uid:r,reltype:i,gap:s}:{uid:r,reltype:i}}return null}function yf(n){if(n==null)return;let e=Array.isArray(n)?n:[n],t=[];for(let r of e){let a=Ai(r);a&&t.push(a)}return t.length>0?t:void 0}function sre(n){return n.map(e=>{let r={uid:e.uid.startsWith("[[")?e.uid:`[[${e.uid}]]`,reltype:e.reltype};return e.gap&&e.gap.trim().length>0&&(r.gap=e.gap),r})}function Jo(n,e,t){let r=iB(t);if(!r)return null;let a=vt(r);if(!a)return null;let i=new Set;i.add(a),a.endsWith(".md")&&i.add(a.replace(/\.md$/i,""));let s=(0,my.parseLinktext)(a);s.path&&s.path!==a&&i.add(s.path);for(let o of i){let l=n.metadataCache.getFirstLinkpathDest(o,e);if(l instanceof my.TFile)return{path:l.path,file:l};let c=n.vault.getAbstractFileByPath(o);if(c instanceof my.TFile)return{path:c.path,file:c}}return null}function Ks(n,e,t,r){let a=n.vault.getAbstractFileByPath(t);return a instanceof my.TFile?Qo(n,a,e,"","",r):`[[${(t.split("/").pop()||t).replace(/\.md$/i,"")}]]`}var my,Pi,X1e,Zs=y(()=>{my=require("obsidian");Ku();Cn();Pi="FINISHTOSTART",X1e=["FINISHTOSTART","FINISHTOFINISH","STARTTOSTART","STARTTOFINISH"]});function V0(n,e){var t;return new ore.Setting(n).setName(e.label).addButton(r=>{r.setButtonText(e.buttonText).setTooltip(e.buttonTooltip).onClick(e.onButtonClick),r.buttonEl.addClasses(["tn-btn","tn-btn--ghost"])}),(t=e.listElement)!=null?t:n.createDiv({cls:"task-projects-list"})}function lre(n,e){return V0(e.container,{label:n.translate("modals.task.organization.projects"),buttonText:n.translate("modals.task.organization.addToProjectButton"),buttonTooltip:n.translate("modals.task.projectsTooltip"),onButtonClick:e.onButtonClick,listElement:e.listElement})}function cre(n,e){return V0(e.container,{label:n.translate("modals.task.organization.subtasks"),buttonText:n.translate("modals.task.organization.addSubtasksButton"),buttonTooltip:n.translate("modals.task.organization.addSubtasksTooltip"),onButtonClick:e.onButtonClick,listElement:e.listElement})}function dre(n,e){return V0(e.container,{label:n.translate("modals.task.dependencies.blockedBy"),buttonText:n.translate("modals.task.dependencies.addTaskButton"),buttonTooltip:n.translate("modals.task.dependencies.selectTaskTooltip"),onButtonClick:e.onButtonClick,listElement:e.listElement})}function ure(n,e){return V0(e.container,{label:n.translate("modals.task.dependencies.blocking"),buttonText:n.translate("modals.task.dependencies.addTaskButton"),buttonTooltip:n.translate("modals.task.dependencies.selectTaskTooltip"),onButtonClick:e.onButtonClick,listElement:e.listElement})}var ore,pre=y(()=>{ore=require("obsidian")});function fre(n){let{task:e,plugin:t,excludeSelector:r,onSingleClick:a,onDoubleClick:i,contextMenuHandler:s,createBatchContextMenu:o,navigationSubpath:l}=n,c=r?`${mre}, ${r}`:mre,d=null,u=(S=!1)=>{let C=t.app.vault.getAbstractFileByPath(e.path);C instanceof sB.TFile&&(l?t.app.workspace.openLinkText(e.path+l,"",S):S?t.app.workspace.openLinkText(e.path,"",!0):t.app.workspace.getLeaf(!1).openFile(C))},p=async()=>{await t.openTaskEditModal(e)},m=async S=>{if(a){await a(S);return}if(S.ctrlKey||S.metaKey){u(!0);return}let C=t.settings.singleClickAction;C==="edit"?await p():C==="openNote"&&u(!1)},f=async S=>{if(i){await i(S);return}let C=t.settings.doubleClickAction;C==="edit"?await p():C==="openNote"&&u()},h=async S=>{if(S.target.closest(c))return;let x=t.taskSelectionService;if(x){if(S.shiftKey){S.stopPropagation(),x.isSelectionModeActive()||x.enterSelectionMode(),x.toggleSelection(e.path);return}x.isSelectionModeActive()&&(x.clearSelection(),x.exitSelectionMode())}if(S.stopPropagation(),t.settings.doubleClickAction==="none"){await m(S);return}d?(window.clearTimeout(d),d=null,await f(S)):d=window.setTimeout(()=>{d=null,m(S)},250)},g=S=>{h(S)},v=S=>{S.button!==1||S.target.closest(c)||(S.preventDefault(),S.stopPropagation(),d&&(window.clearTimeout(d),d=null),u(!0))},k=S=>{v(S)},T=S=>{},b=async S=>{S.preventDefault(),S.stopPropagation();let C=t.taskSelectionService;if(S.shiftKey&&C){if(C.isSelectionModeActive()||C.enterSelectionMode(),C.isSelected(e.path)||C.addToSelection(e.path),C.getSelectionCount()>0){let x=o==null?void 0:o(C.getSelectedPaths(),()=>{});x==null||x.show(S)}return}if(C&&C.getSelectionCount()>1){C.isSelected(e.path)||C.addToSelection(e.path);let x=o==null?void 0:o(C.getSelectedPaths(),()=>{});x==null||x.show(S);return}C!=null&&C.isSelectionModeActive()&&(C.clearSelection(),C.exitSelectionMode()),s&&await s(S)};return{clickHandler:g,auxclickHandler:k,dblclickHandler:T,contextmenuHandler:S=>{b(S)},cleanup:()=>{d&&(window.clearTimeout(d),d=null)}}}function hre(n,e){return t=>{e.app.vault.getAbstractFileByPath(n.path)&&e.app.workspace.trigger("hover-link",{event:t,source:"tasknotes-task-card",hoverParent:t.currentTarget,targetEl:t.currentTarget,linktext:n.path,sourcePath:n.path})}}async function gre(n,e,t,r,a){let i=(d=!1)=>{let u=e.app.vault.getAbstractFileByPath(n.path);u instanceof sB.TFile&&(d?e.app.workspace.openLinkText(n.path,"",!0):e.app.workspace.getLeaf(!1).openFile(u))},s=async()=>{await e.openTaskEditModal(n,a?()=>a():void 0)},o=async d=>{if(d.ctrlKey||d.metaKey){i(!0);return}let u=e.settings.singleClickAction;u==="edit"?await s():u==="openNote"&&i(!1)},l=async d=>{let u=e.settings.doubleClickAction;u==="edit"?await s():u==="openNote"&&i()};if(e.settings.doubleClickAction==="none"){await o(t);return}let c=W0.get(r);if(c)window.clearTimeout(c),W0.delete(r),await l(t);else{let d=window.setTimeout(()=>{W0.delete(r),o(t)},250);W0.set(r,d)}}var sB,mre,W0,oB=y(()=>{sB=require("obsidian"),mre=["a","button","input","textarea","select",'[role="button"]','[data-tn-no-drag="true"]','[data-tn-click-exclude="true"]',".tag"].join(", ");W0=new Map});var yre,ra,Md=y(()=>{yre=require("obsidian"),ra=class extends yre.Menu{show(e){var t;if(e.instanceOf(MouseEvent))this.showAtMouseEvent(e);else if(e.instanceOf(KeyboardEvent)){let r=e.currentTarget;if(!r||!((t=r.instanceOf)!=null&&t.call(r,HTMLElement)))return;this.showAtPosition({x:r.getBoundingClientRect().left,y:r.getBoundingClientRect().bottom+4})}}}});function vre(n){if(!n||typeof n!="object")return null;let e=n;return e.nodeType!==1||typeof e.closest!="function"?null:e}function tze(n){let e=n.instanceOf;return typeof e=="function"?e.call(n,MouseEvent)===!0:n instanceof MouseEvent}function G0(){let n=fy;fy=null,q0=null,n==null||n.hide()}function nze(n){var t;let e=vre(n.target);return(t=e==null?void 0:e.closest(rze))!=null?t:e}function kre(n,e,t){if(e&&fy&&q0===e){G0();return}G0(),fy=n,q0=e,n.onHide(()=>{fy===n&&(fy=null,q0=null)}),t()}function za(n,e){kre(n,nze(e),()=>{var r;if(tze(e)){n.showAtMouseEvent(e);return}let t=vre(e.currentTarget);((r=t==null?void 0:t.instanceOf)!=null&&r.call(t,HTMLElement)||t instanceof HTMLElement)&&n.showAtPosition({x:t.getBoundingClientRect().left,y:t.getBoundingClientRect().bottom+4},t.ownerDocument)})}function jl(n,e){kre(n,e,()=>{n.showAtPosition({x:e.getBoundingClientRect().left,y:e.getBoundingClientRect().bottom+4},e.ownerDocument)})}var rze,fy,q0,Id=y(()=>{rze='[data-tn-action], [data-type], [role="button"], button, .clickable-icon',fy=null,q0=null});var Tre=y(()=>{});var bre,lB=y(()=>{bre={triggers:[{propertyId:"tags",trigger:"#",enabled:!0},{propertyId:"contexts",trigger:"@",enabled:!0},{propertyId:"projects",trigger:"+",enabled:!0},{propertyId:"status",trigger:"*",enabled:!0},{propertyId:"priority",trigger:"!",enabled:!1}]}});var wre,Sre=y(()=>{wre={code:"en",name:"English",chronoLocale:"en",dateTriggers:{due:["due","deadline","must be done by","by"],scheduled:["scheduled for","start on","begin on","work on","on","scheduled","start"]},recurrence:{frequencies:{daily:["daily","every day"],weekly:["weekly","every week"],monthly:["monthly","every month"],yearly:["yearly","annually","every year"]},every:["every"],other:["other"],weekdays:{monday:["monday"],tuesday:["tuesday"],wednesday:["wednesday"],thursday:["thursday"],friday:["friday"],saturday:["saturday"],sunday:["sunday"]},pluralWeekdays:{monday:["mondays"],tuesday:["tuesdays"],wednesday:["wednesdays"],thursday:["thursdays"],friday:["fridays"],saturday:["saturdays"],sunday:["sundays"]},ordinals:{first:["first"],second:["second"],third:["third"],fourth:["fourth"],last:["last"]},periods:{day:["day","days"],week:["week","weeks"],month:["month","months"],year:["year","years"]}},timeEstimate:{hours:["h","hr","hrs","hour","hours"],minutes:["m","min","mins","minute","minutes"]},fallbackStatus:{open:["todo","to do","open"],inProgress:["in progress","in-progress","doing"],done:["done","completed","finished"],cancelled:["cancelled","canceled"],waiting:["waiting","blocked","on hold"]},fallbackPriority:{urgent:["urgent","critical","highest"],high:["high","important"],normal:["medium","normal"],low:["low","minor"]}}});var Cre,xre=y(()=>{Cre={code:"es",name:"Español",chronoLocale:"es",dateTriggers:{due:["vence","fecha límite","debe terminarse","para el","antes del"],scheduled:["programado para","programado el","comenzar el","empezar el","trabajar en","el"]},recurrence:{frequencies:{daily:["diario","diaria","diariamente","cada día","todos los días","a diario"],weekly:["semanal","semanalmente","cada semana","todas las semanas","por semana"],monthly:["mensual","mensualmente","cada mes","todos los meses","por mes"],yearly:["anual","anualmente","cada año","todos los años","por año"]},every:["cada","todos los","todas las"],other:["otro","otra"],weekdays:{monday:["lunes"],tuesday:["martes"],wednesday:["miércoles"],thursday:["jueves"],friday:["viernes"],saturday:["sábado"],sunday:["domingo"]},pluralWeekdays:{monday:["lunes"],tuesday:["martes"],wednesday:["miércoles"],thursday:["jueves"],friday:["viernes"],saturday:["sábados"],sunday:["domingos"]},ordinals:{first:["primer","primera","primero"],second:["segundo","segunda"],third:["tercer","tercera","tercero"],fourth:["cuarto","cuarta"],last:["último","última"]},periods:{day:["día","días"],week:["semana","semanas"],month:["mes","meses"],year:["año","años"]}},timeEstimate:{hours:["h","hr","hrs","hora","horas"],minutes:["m","min","mins","minuto","minutos"]},fallbackStatus:{open:["pendiente","por hacer","abierto","todo"],inProgress:["en progreso","en curso","haciendo","trabajando"],done:["hecho","terminado","completado","finalizado"],cancelled:["cancelado","anulado"],waiting:["esperando","bloqueado","en espera"]},fallbackPriority:{urgent:["urgente","crítico","crítica","máximo","máxima","prioritario","prioritaria"],high:["alto","alta","importante","elevado","elevada"],normal:["medio","media","normal","regular","estándar"],low:["bajo","baja","menor","mínimo","mínima"]}}});var Ere,Dre=y(()=>{Ere={code:"fr",name:"Français",chronoLocale:"fr",dateTriggers:{due:["échéance","date limite","doit être terminé","pour le","avant le"],scheduled:["programmé pour","programmé le","commencer le","débuter le","travailler sur","le"]},recurrence:{frequencies:{daily:["quotidien","quotidienne","quotidiennement","chaque jour","tous les jours","journalier","journalière"],weekly:["hebdomadaire","chaque semaine","toutes les semaines","par semaine"],monthly:["mensuel","mensuelle","mensuellement","chaque mois","tous les mois","par mois"],yearly:["annuel","annuelle","annuellement","chaque année","tous les ans","par an","par année"]},every:["chaque","tous les","toutes les"],other:["autre"],weekdays:{monday:["lundi"],tuesday:["mardi"],wednesday:["mercredi"],thursday:["jeudi"],friday:["vendredi"],saturday:["samedi"],sunday:["dimanche"]},pluralWeekdays:{monday:["lundis"],tuesday:["mardis"],wednesday:["mercredis"],thursday:["jeudis"],friday:["vendredis"],saturday:["samedis"],sunday:["dimanches"]},ordinals:{first:["premier","première"],second:["deuxième","second","seconde"],third:["troisième"],fourth:["quatrième"],last:["dernier","dernière"]},periods:{day:["jour","jours"],week:["semaine","semaines"],month:["mois"],year:["an","ans","année","années"]}},timeEstimate:{hours:["h","hr","hrs","heure","heures"],minutes:["m","min","mins","minute","minutes"]},fallbackStatus:{open:["à faire","ouvert","en attente","todo"],inProgress:["en cours","en progression","en train de faire"],done:["terminé","fini","accompli","fait"],cancelled:["annulé","abandonné"],waiting:["en attente","bloqué","suspendu"]},fallbackPriority:{urgent:["urgent","urgente","critique","maximum","prioritaire"],high:["élevé","élevée","haut","haute","important","importante","supérieur","supérieure"],normal:["moyen","moyenne","normal","normale","standard","régulier","régulière"],low:["faible","bas","basse","mineur","mineure","minimum"]}}});var Pre,Are=y(()=>{Pre={code:"de",name:"Deutsch",chronoLocale:"de",dateTriggers:{due:["fällig","termin","abgabe","deadline","bis zum","bis"],scheduled:["geplant für","geplant am","beginnen am","anfangen am","arbeiten an","am","geplant","starten"]},recurrence:{frequencies:{daily:["täglich","jeden Tag","alle Tage","tagaus tagein"],weekly:["wöchentlich","jede Woche","alle Wochen"],monthly:["monatlich","jeden Monat","alle Monate"],yearly:["jährlich","jedes Jahr","alle Jahre"]},every:["jede","jeden","jedes","alle"],other:["andere","anderen","anderes"],weekdays:{monday:["montag"],tuesday:["dienstag"],wednesday:["mittwoch"],thursday:["donnerstag"],friday:["freitag"],saturday:["samstag"],sunday:["sonntag"]},pluralWeekdays:{monday:["montags"],tuesday:["dienstags"],wednesday:["mittwochs"],thursday:["donnerstags"],friday:["freitags"],saturday:["samstags"],sunday:["sonntags"]},ordinals:{first:["erste","ersten","erster"],second:["zweite","zweiten","zweiter"],third:["dritte","dritten","dritter"],fourth:["vierte","vierten","vierter"],last:["letzte","letzten","letzter"]},periods:{day:["tag","tage"],week:["woche","wochen"],month:["monat","monate"],year:["jahr","jahre"]}},timeEstimate:{hours:["h","std","stunde","stunden"],minutes:["m","min","minute","minuten"]},fallbackStatus:{open:["offen","zu erledigen","ausstehend","todo"],inProgress:["in bearbeitung","wird bearbeitet","läuft","in arbeit"],done:["erledigt","fertig","abgeschlossen","gemacht"],cancelled:["abgebrochen","storniert","abgesagt"],waiting:["wartend","warten","blockiert","pausiert"]},fallbackPriority:{urgent:["dringend","eilig","kritisch","sofort","höchste"],high:["hoch","hohe","wichtig","prioritär"],normal:["normal","mittel","mittlere","standard"],low:["niedrig","niedrige","gering","geringe"]}}});var Mre,Ire=y(()=>{Mre={code:"ru",name:"Русский",chronoLocale:"ru",dateTriggers:{due:["срок","дедлайн","до","к","сдать до"],scheduled:["запланировано на","начать","работать над","на"]},recurrence:{frequencies:{daily:["ежедневно","каждый день","ежедневный","каждодневный"],weekly:["еженедельно","каждую неделю","еженедельный"],monthly:["ежемесячно","каждый месяц","ежемесячный"],yearly:["ежегодно","каждый год","ежегодный"]},every:["каждый","каждую","каждое","все"],other:["другой","другую","другое"],weekdays:{monday:["понедельник"],tuesday:["вторник"],wednesday:["среда"],thursday:["четверг"],friday:["пятница"],saturday:["суббота"],sunday:["воскресенье"]},pluralWeekdays:{monday:["по понедельникам"],tuesday:["по вторникам"],wednesday:["по средам"],thursday:["по четвергам"],friday:["по пятницам"],saturday:["по субботам"],sunday:["по воскресеньям"]},ordinals:{first:["первый","первая","первое"],second:["второй","вторая","второе"],third:["третий","третья","третье"],fourth:["четвертый","четвертая","четвертое"],last:["последний","последняя","последнее"]},periods:{day:["день","дни"],week:["неделя","недели"],month:["месяц","месяцы"],year:["год","годы"]}},timeEstimate:{hours:["ч","час","часа","часов"],minutes:["м","мин","минута","минуты","минут"]},fallbackStatus:{open:["открыто","к выполнению","новое","todo"],inProgress:["в работе","выполняется","в процессе"],done:["выполнено","готово","завершено","сделано"],cancelled:["отменено","отменён","отменена"],waiting:["ожидание","заблокировано","на паузе"]},fallbackPriority:{urgent:["срочно","критично","экстренно","немедленно"],high:["высокий","высокая","важно","приоритетно"],normal:["нормальный","нормальная","средний","средняя"],low:["низкий","низкая","неважно","можно позже"]}}});var Nre,Rre=y(()=>{Nre={code:"zh",name:"中文",chronoLocale:"zh",dateTriggers:{due:["截止","到期","期限","在","之前"],scheduled:["安排在","计划在","开始在","在"]},recurrence:{frequencies:{daily:["每天","每日","天天","日常"],weekly:["每周","每星期","周周"],monthly:["每月","每个月","月月"],yearly:["每年","年年","每一年"]},every:["每","每个","每一个"],other:["其他","另一个"],weekdays:{monday:["周一","星期一","礼拜一"],tuesday:["周二","星期二","礼拜二"],wednesday:["周三","星期三","礼拜三"],thursday:["周四","星期四","礼拜四"],friday:["周五","星期五","礼拜五"],saturday:["周六","星期六","礼拜六"],sunday:["周日","星期日","礼拜日"]},pluralWeekdays:{monday:["周一","星期一","礼拜一"],tuesday:["周二","星期二","礼拜二"],wednesday:["周三","星期三","礼拜三"],thursday:["周四","星期四","礼拜四"],friday:["周五","星期五","礼拜五"],saturday:["周六","星期六","礼拜六"],sunday:["周日","星期日","礼拜日"]},ordinals:{first:["第一个","第一","首个"],second:["第二个","第二"],third:["第三个","第三"],fourth:["第四个","第四"],last:["最后一个","最后","末尾"]},periods:{day:["天","日"],week:["周","星期"],month:["月","个月"],year:["年"]}},timeEstimate:{hours:["小时","时","个小时"],minutes:["分钟","分","个分钟"]},fallbackStatus:{open:["待办","未完成","开放","新建"],inProgress:["进行中","正在处理","处理中","工作中"],done:["完成","已完成","结束","搞定"],cancelled:["取消","已取消","废弃"],waiting:["等待","暂停","阻塞","待定"]},fallbackPriority:{urgent:["紧急","急迫","立即","马上"],high:["高","重要","高优先级"],normal:["正常","普通","中等","标准"],low:["低","不重要","低优先级","次要"]}}});var _re,Fre=y(()=>{_re={code:"ja",name:"日本語",chronoLocale:"ja",dateTriggers:{due:["期限","締切","〆切","まで","までに","に"],scheduled:["予定","計画","開始","から","に開始","を開始"]},recurrence:{frequencies:{daily:["毎日","日々","毎日毎日","連日"],weekly:["毎週","週毎","週一","毎週毎週"],monthly:["毎月","月毎","月一","毎月毎月"],yearly:["毎年","年毎","年一","毎年毎年","年次"]},every:["毎","各","全て"],other:["他の","別の","異なる"],weekdays:{monday:["月曜日","月曜","月","げつようび"],tuesday:["火曜日","火曜","火","かようび"],wednesday:["水曜日","水曜","水","すいようび"],thursday:["木曜日","木曜","木","もくようび"],friday:["金曜日","金曜","金","きんようび"],saturday:["土曜日","土曜","土","どようび"],sunday:["日曜日","日曜","日","にちようび"]},pluralWeekdays:{monday:["月曜日","月曜","月","げつようび"],tuesday:["火曜日","火曜","火","かようび"],wednesday:["水曜日","水曜","水","すいようび"],thursday:["木曜日","木曜","木","もくようび"],friday:["金曜日","金曜","金","きんようび"],saturday:["土曜日","土曜","土","どようび"],sunday:["日曜日","日曜","日","にちようび"]},ordinals:{first:["最初の","第一の","一番目の","初回"],second:["二番目の","第二の","次の"],third:["三番目の","第三の"],fourth:["四番目の","第四の"],last:["最後の","最終の","終わりの"]},periods:{day:["日","日間"],week:["週","週間"],month:["月","月間","ヶ月"],year:["年","年間"]}},timeEstimate:{hours:["時間","時","じかん"],minutes:["分","分間","ふん","ぷん"]},fallbackStatus:{open:["未着手","新規","オープン","開始前","待機"],inProgress:["進行中","作業中","実行中","処理中","進行"],done:["完了","終了","済み","終わり","達成"],cancelled:["キャンセル","中止","取消","廃止","停止"],waiting:["待機","保留","ブロック","一時停止","待ち"]},fallbackPriority:{urgent:["緊急","至急","急務","最優先","すぐに"],high:["高","重要","高優先度","重点"],normal:["普通","通常","標準","一般","ノーマル"],low:["低","軽微","後回し","低優先度","余裕"]}}});var Lre,Ore=y(()=>{Lre={code:"it",name:"Italiano",chronoLocale:"it",dateTriggers:{due:["scadenza","entro","entro il","deve essere fatto entro","per il","termine"],scheduled:["programmato per","programmato il","iniziare il","lavorare su","il","per"]},recurrence:{frequencies:{daily:["giornaliero","giornaliera","quotidiano","quotidiana","ogni giorno","tutti i giorni","giornalmente"],weekly:["settimanale","ogni settimana","tutte le settimane","settimanalmente","alla settimana"],monthly:["mensile","ogni mese","tutti i mesi","mensilmente","al mese"],yearly:["annuale","ogni anno","tutti gli anni","annualmente","all'anno"]},every:["ogni","tutti i","tutte le"],other:["altro","altra","altri","altre"],weekdays:{monday:["lunedì"],tuesday:["martedì"],wednesday:["mercoledì"],thursday:["giovedì"],friday:["venerdì"],saturday:["sabato"],sunday:["domenica"]},pluralWeekdays:{monday:["lunedì"],tuesday:["martedì"],wednesday:["mercoledì"],thursday:["giovedì"],friday:["venerdì"],saturday:["sabati"],sunday:["domeniche"]},ordinals:{first:["primo","prima"],second:["secondo","seconda"],third:["terzo","terza"],fourth:["quarto","quarta"],last:["ultimo","ultima"]},periods:{day:["giorno","giorni"],week:["settimana","settimane"],month:["mese","mesi"],year:["anno","anni"]}},timeEstimate:{hours:["h","hr","ore","ora","o"],minutes:["m","min","minuto","minuti"]},fallbackStatus:{open:["da fare","aperto","pendente","todo","in sospeso"],inProgress:["in corso","in progresso","facendo","lavorando"],done:["fatto","completato","finito","terminato","chiuso"],cancelled:["cancellato","annullato","rimosso"],waiting:["in attesa","aspettando","bloccato","fermo"]},fallbackPriority:{urgent:["urgente","critico","critica","massimo","massima","prioritario","prioritaria"],high:["alto","alta","importante","elevato","elevata"],normal:["medio","media","normale","regolare","standard"],low:["basso","bassa","minore","minimo","minima"]}}});var zre,Bre=y(()=>{zre={code:"nl",name:"Nederlands",chronoLocale:"nl",dateTriggers:{due:["vervalt op","deadline","moet klaar zijn op","tegen","uiterlijk","voor"],scheduled:["gepland voor","gepland op","beginnen op","werken aan","op","voor"]},recurrence:{frequencies:{daily:["dagelijks","elke dag","alle dagen","per dag"],weekly:["wekelijks","elke week","alle weken","per week"],monthly:["maandelijks","elke maand","alle maanden","per maand"],yearly:["jaarlijks","elk jaar","alle jaren","per jaar"]},every:["elke","alle","iedere"],other:["andere","ander"],weekdays:{monday:["maandag"],tuesday:["dinsdag"],wednesday:["woensdag"],thursday:["donderdag"],friday:["vrijdag"],saturday:["zaterdag"],sunday:["zondag"]},pluralWeekdays:{monday:["maandagen"],tuesday:["dinsdagen"],wednesday:["woensdagen"],thursday:["donderdagen"],friday:["vrijdagen"],saturday:["zaterdagen"],sunday:["zondagen"]},ordinals:{first:["eerste"],second:["tweede"],third:["derde"],fourth:["vierde"],last:["laatste"]},periods:{day:["dag","dagen"],week:["week","weken"],month:["maand","maanden"],year:["jaar","jaren"]}},timeEstimate:{hours:["u","uur","uren","h"],minutes:["m","min","minuut","minuten"]},fallbackStatus:{open:["te doen","open","nog te doen","todo","openstaand"],inProgress:["bezig","in behandeling","aan het werk","lopend","in uitvoering"],done:["klaar","voltooid","gedaan","afgerond","gesloten"],cancelled:["geannuleerd","afgezegd","ingetrokken"],waiting:["wachtend","in de wacht","geblokkeerd","uitgesteld"]},fallbackPriority:{urgent:["urgent","kritiek","hoogste","spoed","direct"],high:["hoog","hoge","belangrijk","belangrijke"],normal:["normaal","normale","gemiddeld","standaard"],low:["laag","lage","klein","kleine","onbelangrijk"]}}});var jre,$re=y(()=>{jre={code:"pt",name:"Português",chronoLocale:"pt",dateTriggers:{due:["vencimento","prazo","deve estar pronto até","até","para","limite"],scheduled:["programado para","agendado para","começar em","trabalhar em","em","no"]},recurrence:{frequencies:{daily:["diário","diária","diariamente","todos os dias","cada dia","por dia"],weekly:["semanal","semanalmente","toda semana","todas as semanas","por semana"],monthly:["mensal","mensalmente","todo mês","todos os meses","por mês"],yearly:["anual","anualmente","todo ano","todos os anos","por ano"]},every:["todo","toda","todos","todas","cada"],other:["outro","outra","outros","outras"],weekdays:{monday:["segunda","segunda-feira"],tuesday:["terça","terça-feira"],wednesday:["quarta","quarta-feira"],thursday:["quinta","quinta-feira"],friday:["sexta","sexta-feira"],saturday:["sábado"],sunday:["domingo"]},pluralWeekdays:{monday:["segundas","segundas-feiras"],tuesday:["terças","terças-feiras"],wednesday:["quartas","quartas-feiras"],thursday:["quintas","quintas-feiras"],friday:["sextas","sextas-feiras"],saturday:["sábados"],sunday:["domingos"]},ordinals:{first:["primeiro","primeira"],second:["segundo","segunda"],third:["terceiro","terceira"],fourth:["quarto","quarta"],last:["último","última"]},periods:{day:["dia","dias"],week:["semana","semanas"],month:["mês","meses"],year:["ano","anos"]}},timeEstimate:{hours:["h","hr","hora","horas"],minutes:["m","min","minuto","minutos"]},fallbackStatus:{open:["a fazer","pendente","aberto","todo","por fazer"],inProgress:["em andamento","em progresso","fazendo","trabalhando","executando"],done:["feito","concluído","terminado","finalizado","completo"],cancelled:["cancelado","anulado","suspenso"],waiting:["aguardando","esperando","bloqueado","em espera"]},fallbackPriority:{urgent:["urgente","crítico","crítica","máximo","máxima","prioritário","prioritária"],high:["alto","alta","importante","elevado","elevada"],normal:["médio","média","normal","regular","padrão"],low:["baixo","baixa","menor","mínimo","mínima"]}}});var Ure,Hre=y(()=>{Ure={code:"sv",name:"Svenska",chronoLocale:"sv",dateTriggers:{due:["förfaller","deadline","måste vara klar","senast","till","innan"],scheduled:["schemalagd","planerad för","börja","arbeta med","den","på"]},recurrence:{frequencies:{daily:["dagligen","varje dag","alla dagar","per dag"],weekly:["veckovis","varje vecka","alla veckor","per vecka"],monthly:["månadsvis","varje månad","alla månader","per månad"],yearly:["årligen","varje år","alla år","per år"]},every:["varje","alla","var"],other:["annan","annat","andra"],weekdays:{monday:["måndag"],tuesday:["tisdag"],wednesday:["onsdag"],thursday:["torsdag"],friday:["fredag"],saturday:["lördag"],sunday:["söndag"]},pluralWeekdays:{monday:["måndagar"],tuesday:["tisdagar"],wednesday:["onsdagar"],thursday:["torsdagar"],friday:["fredagar"],saturday:["lördagar"],sunday:["söndagar"]},ordinals:{first:["första"],second:["andra"],third:["tredje"],fourth:["fjärde"],last:["sista"]},periods:{day:["dag","dagar"],week:["vecka","veckor"],month:["månad","månader"],year:["år"]}},timeEstimate:{hours:["t","tim","timme","timmar","h"],minutes:["m","min","minut","minuter"]},fallbackStatus:{open:["att göra","öppen","kvar","todo","väntande"],inProgress:["pågående","arbetar","gör","i process","under arbete"],done:["klar","färdig","slutförd","avslutad","gjord"],cancelled:["avbruten","inställd","avbokad"],waiting:["väntar","blockerad","pausad","vilande"]},fallbackPriority:{urgent:["brådskande","kritisk","högsta","akut","omedelbar"],high:["hög","viktig","förhöjd","prioriterad"],normal:["normal","medel","standard","vanlig"],low:["låg","mindre","minimal","obetydlig"]}}});var Vre,Wre=y(()=>{Vre={code:"uk",name:"Українська",chronoLocale:"uk",dateTriggers:{due:["термін","дедлайн","має бути готово до","до","не пізніше","крайній термін"],scheduled:["заплановано на","запланований","почати","працювати над","на","в"]},recurrence:{frequencies:{daily:["щодня","щоденно","кожен день","всі дні","на день"],weekly:["щотижня","щотижнево","кожен тиждень","всі тижні","на тиждень"],monthly:["щомісяця","щомісячно","кожен місяць","всі місяці","на місяць"],yearly:["щороку","щорічно","кожен рік","всі роки","на рік"]},every:["кожен","кожна","кожне","всі"],other:["інший","інша","інше","інші"],weekdays:{monday:["понеділок"],tuesday:["вівторок"],wednesday:["середа"],thursday:["четвер"],friday:["п'ятниця"],saturday:["субота"],sunday:["неділя"]},pluralWeekdays:{monday:["понеділки"],tuesday:["вівторки"],wednesday:["середи"],thursday:["четверги"],friday:["п'ятниці"],saturday:["суботи"],sunday:["неділі"]},ordinals:{first:["перший","перша","перше"],second:["другий","друга","друге"],third:["третій","третя","третє"],fourth:["четвертий","четверта","четверте"],last:["останній","остання","останнє"]},periods:{day:["день","дні","днів"],week:["тиждень","тижні","тижнів"],month:["місяць","місяці","місяців"],year:["рік","роки","років"]}},timeEstimate:{hours:["г","год","година","години","годин"],minutes:["хв","мін","хвилина","хвилини","хвилин"]},fallbackStatus:{open:["зробити","відкритий","очікує","todo","в очікуванні"],inProgress:["в роботі","виконується","роблю","працюю","в процесі"],done:["готово","виконано","завершено","закінчено","зроблено"],cancelled:["скасовано","відмінено","припинено"],waiting:["чекаю","очікую","заблоковано","призупинено"]},fallbackPriority:{urgent:["терміново","критично","найвищий","невідкладно","пріоритетно"],high:["високий","висока","важливо","підвищений"],normal:["середній","середня","нормально","звичайно","стандартно"],low:["низький","низька","менший","мінімальний","незначний"]}}});var qre=y(()=>{});function Yre(n){return Gre[n]||Gre.en}var Gre,cB=y(()=>{Sre();xre();Dre();Are();Ire();Rre();Fre();Ore();Bre();$re();Hre();Wre();qre();Gre={en:wre,es:Cre,fr:Ere,de:Pre,ru:Mre,zh:Nre,ja:_re,it:Lre,nl:zre,pt:jre,sv:Ure,uk:Vre}});var Y0,dB=y(()=>{Y0=class{constructor(e,t=[]){this.config=e,this.userFields=t,this.triggerMap=new Map,this.propertyMap=new Map,this.buildMaps()}buildMaps(){this.triggerMap.clear(),this.propertyMap.clear();for(let e of this.config.triggers)e.enabled&&(this.triggerMap.set(e.trigger,e),this.propertyMap.set(e.propertyId,e))}getTriggerForProperty(e){return this.propertyMap.get(e)}getPropertyForTrigger(e){var t;return(t=this.triggerMap.get(e))==null?void 0:t.propertyId}getAllEnabledTriggers(){return this.config.triggers.filter(e=>e.enabled)}getTriggersOrderedByLength(){return this.getAllEnabledTriggers().sort((e,t)=>t.trigger.length-e.trigger.length)}usesNativeTagSuggester(){let e=this.getTriggerForProperty("tags");return(e==null?void 0:e.trigger)==="#"&&(e==null?void 0:e.enabled)}getTagTrigger(){let e=this.getTriggerForProperty("tags");return e!=null&&e.enabled?e.trigger:void 0}getContextTrigger(){let e=this.getTriggerForProperty("contexts");return e!=null&&e.enabled?e.trigger:void 0}getProjectTrigger(){let e=this.getTriggerForProperty("projects");return e!=null&&e.enabled?e.trigger:void 0}getStatusTrigger(){let e=this.getTriggerForProperty("status");return e!=null&&e.enabled?e.trigger:void 0}getPriorityTrigger(){let e=this.getTriggerForProperty("priority");return e!=null&&e.enabled?e.trigger:void 0}getUserField(e){return this.userFields.find(t=>t.id===e)}isUserField(e){return this.userFields.some(t=>t.id===e)}getSuggesterType(e){if(e==="tags")return this.usesNativeTagSuggester()?"native-tag":"list";if(e==="contexts")return"list";if(e==="projects")return"file";if(e==="status")return"status";if(e==="priority")return"priority";let t=this.getUserField(e);if(t)switch(t.type){case"text":return t.autosuggestFilter?"file":"list";case"list":return"list";case"boolean":return"boolean";default:return"none"}return"none"}updateConfig(e){this.config=e,this.buildMaps()}updateUserFields(e){this.userFields=e}}});var Kre=te((uB,pB)=>{(function(n,e){typeof uB=="object"&&typeof pB!="undefined"?pB.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs_plugin_quarterOfYear=e()})(uB,(function(){"use strict";var n="month",e="quarter";return function(t,r){var a=r.prototype;a.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var i=a.add;a.add=function(o,l){return o=Number(o),this.$utils().p(l)===e?this.add(3*o,n):i.bind(this)(o,l)};var s=a.startOf;a.startOf=function(o,l){var c=this.$utils(),d=!!c.u(l)||l;if(c.p(o)===e){var u=this.quarter()-1;return d?this.month(3*u).startOf(n).startOf("day"):this.month(3*u+2).endOf(n).endOf("day")}return s.bind(this)(o,l)}}}))});var Ht=te((mB,fB)=>{(function(n,e){typeof mB=="object"&&typeof fB!="undefined"?fB.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs=e()})(mB,(function(){"use strict";var n=1e3,e=6e4,t=36e5,r="millisecond",a="second",i="minute",s="hour",o="day",l="week",c="month",d="quarter",u="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={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(I){var A=["th","st","nd","rd"],R=I%100;return"["+I+(A[(R-20)%10]||A[R]||A[0])+"]"}},v=function(I,A,R){var O=String(I);return!O||O.length>=A?I:""+Array(A+1-O.length).join(R)+I},k={s:v,z:function(I){var A=-I.utcOffset(),R=Math.abs(A),O=Math.floor(R/60),U=R%60;return(A<=0?"+":"-")+v(O,2,"0")+":"+v(U,2,"0")},m:function I(A,R){if(A.date()<R.date())return-I(R,A);var O=12*(R.year()-A.year())+(R.month()-A.month()),U=A.clone().add(O,c),pe=R-U<0,oe=A.clone().add(O+(pe?-1:1),c);return+(-(O+(R-U)/(pe?U-oe:oe-U))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:c,y:u,w:l,d:o,D:p,h:s,m:i,s:a,ms:r,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},T="en",b={};b[T]=g;var w="$isDayjsObject",S=function(I){return I instanceof _||!(!I||!I[w])},C=function I(A,R,O){var U;if(!A)return T;if(typeof A=="string"){var pe=A.toLowerCase();b[pe]&&(U=pe),R&&(b[pe]=R,U=pe);var oe=A.split("-");if(!U&&oe.length>1)return I(oe[0])}else{var X=A.name;b[X]=A,U=X}return!O&&U&&(T=U),U||!O&&T},x=function(I,A){if(S(I))return I.clone();var R=typeof A=="object"?A:{};return R.date=I,R.args=arguments,new _(R)},E=k;E.l=C,E.i=S,E.w=function(I,A){return x(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var _=(function(){function I(R){this.$L=C(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[w]=!0}var A=I.prototype;return A.parse=function(R){this.$d=(function(O){var U=O.date,pe=O.utc;if(U===null)return new Date(NaN);if(E.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var oe=U.match(f);if(oe){var X=oe[2]-1||0,de=(oe[7]||"0").substring(0,3);return pe?new Date(Date.UTC(oe[1],X,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,de)):new Date(oe[1],X,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,de)}}return new Date(U)})(R),this.init()},A.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},A.$utils=function(){return E},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(R,O){var U=x(R);return this.startOf(O)<=U&&U<=this.endOf(O)},A.isAfter=function(R,O){return x(R)<this.startOf(O)},A.isBefore=function(R,O){return this.endOf(O)<x(R)},A.$g=function(R,O,U){return E.u(R)?this[O]:this.set(U,R)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(R,O){var U=this,pe=!!E.u(O)||O,oe=E.p(R),X=function(He,qr){var jn=E.w(U.$u?Date.UTC(U.$y,qr,He):new Date(U.$y,qr,He),U);return pe?jn:jn.endOf(o)},de=function(He,qr){return E.w(U.toDate()[He].apply(U.toDate("s"),(pe?[0,0,0,0]:[23,59,59,999]).slice(qr)),U)},Oe=this.$W,Q=this.$M,Z=this.$D,Ue="set"+(this.$u?"UTC":"");switch(oe){case u:return pe?X(1,0):X(31,11);case c:return pe?X(1,Q):X(0,Q+1);case l:var le=this.$locale().weekStart||0,at=(Oe<le?Oe+7:Oe)-le;return X(pe?Z-at:Z+(6-at),Q);case o:case p:return de(Ue+"Hours",0);case s:return de(Ue+"Minutes",1);case i:return de(Ue+"Seconds",2);case a:return de(Ue+"Milliseconds",3);default:return this.clone()}},A.endOf=function(R){return this.startOf(R,!1)},A.$set=function(R,O){var U,pe=E.p(R),oe="set"+(this.$u?"UTC":""),X=(U={},U[o]=oe+"Date",U[p]=oe+"Date",U[c]=oe+"Month",U[u]=oe+"FullYear",U[s]=oe+"Hours",U[i]=oe+"Minutes",U[a]=oe+"Seconds",U[r]=oe+"Milliseconds",U)[pe],de=pe===o?this.$D+(O-this.$W):O;if(pe===c||pe===u){var Oe=this.clone().set(p,1);Oe.$d[X](de),Oe.init(),this.$d=Oe.set(p,Math.min(this.$D,Oe.daysInMonth())).$d}else X&&this.$d[X](de);return this.init(),this},A.set=function(R,O){return this.clone().$set(R,O)},A.get=function(R){return this[E.p(R)]()},A.add=function(R,O){var U,pe=this;R=Number(R);var oe=E.p(O),X=function(Q){var Z=x(pe);return E.w(Z.date(Z.date()+Math.round(Q*R)),pe)};if(oe===c)return this.set(c,this.$M+R);if(oe===u)return this.set(u,this.$y+R);if(oe===o)return X(1);if(oe===l)return X(7);var de=(U={},U[i]=e,U[s]=t,U[a]=n,U)[oe]||1,Oe=this.$d.getTime()+R*de;return E.w(Oe,this)},A.subtract=function(R,O){return this.add(-1*R,O)},A.format=function(R){var O=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var pe=R||"YYYY-MM-DDTHH:mm:ssZ",oe=E.z(this),X=this.$H,de=this.$m,Oe=this.$M,Q=U.weekdays,Z=U.months,Ue=U.meridiem,le=function(qr,jn,Dr,cs){return qr&&(qr[jn]||qr(O,pe))||Dr[jn].slice(0,cs)},at=function(qr){return E.s(X%12||12,qr,"0")},He=Ue||function(qr,jn,Dr){var cs=qr<12?"AM":"PM";return Dr?cs.toLowerCase():cs};return pe.replace(h,(function(qr,jn){return jn||(function(Dr){switch(Dr){case"YY":return String(O.$y).slice(-2);case"YYYY":return E.s(O.$y,4,"0");case"M":return Oe+1;case"MM":return E.s(Oe+1,2,"0");case"MMM":return le(U.monthsShort,Oe,Z,3);case"MMMM":return le(Z,Oe);case"D":return O.$D;case"DD":return E.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return le(U.weekdaysMin,O.$W,Q,2);case"ddd":return le(U.weekdaysShort,O.$W,Q,3);case"dddd":return Q[O.$W];case"H":return String(X);case"HH":return E.s(X,2,"0");case"h":return at(1);case"hh":return at(2);case"a":return He(X,de,!0);case"A":return He(X,de,!1);case"m":return String(de);case"mm":return E.s(de,2,"0");case"s":return String(O.$s);case"ss":return E.s(O.$s,2,"0");case"SSS":return E.s(O.$ms,3,"0");case"Z":return oe}return null})(qr)||oe.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(R,O,U){var pe,oe=this,X=E.p(O),de=x(R),Oe=(de.utcOffset()-this.utcOffset())*e,Q=this-de,Z=function(){return E.m(oe,de)};switch(X){case u:pe=Z()/12;break;case c:pe=Z();break;case d:pe=Z()/3;break;case l:pe=(Q-Oe)/6048e5;break;case o:pe=(Q-Oe)/864e5;break;case s:pe=Q/t;break;case i:pe=Q/e;break;case a:pe=Q/n;break;default:pe=Q}return U?pe:E.a(pe)},A.daysInMonth=function(){return this.endOf(c).$D},A.$locale=function(){return b[this.$L]},A.locale=function(R,O){if(!R)return this.$L;var U=this.clone(),pe=C(R,O,!0);return pe&&(U.$L=pe),U},A.clone=function(){return E.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I})(),F=_.prototype;return x.prototype=F,[["$ms",r],["$s",a],["$m",i],["$H",s],["$W",o],["$M",c],["$y",u],["$D",p]].forEach((function(I){F[I[1]]=function(A){return this.$g(A,I[0],I[1])}})),x.extend=function(I,A){return I.$i||(I(A,_,x),I.$i=!0),x},x.locale=C,x.isDayjs=S,x.unix=function(I){return x(1e3*I)},x.en=b[T],x.Ls=b,x.p={},x}))});var j,We,fs,Nt=y(()=>{(function(n){n[n.AM=0]="AM",n[n.PM=1]="PM"})(j||(j={}));(function(n){n[n.SUNDAY=0]="SUNDAY",n[n.MONDAY=1]="MONDAY",n[n.TUESDAY=2]="TUESDAY",n[n.WEDNESDAY=3]="WEDNESDAY",n[n.THURSDAY=4]="THURSDAY",n[n.FRIDAY=5]="FRIDAY",n[n.SATURDAY=6]="SATURDAY"})(We||(We={}));(function(n){n[n.JANUARY=1]="JANUARY",n[n.FEBRUARY=2]="FEBRUARY",n[n.MARCH=3]="MARCH",n[n.APRIL=4]="APRIL",n[n.MAY=5]="MAY",n[n.JUNE=6]="JUNE",n[n.JULY=7]="JULY",n[n.AUGUST=8]="AUGUST",n[n.SEPTEMBER=9]="SEPTEMBER",n[n.OCTOBER=10]="OCTOBER",n[n.NOVEMBER=11]="NOVEMBER",n[n.DECEMBER=12]="DECEMBER"})(fs||(fs={}))});function Zre(n,e){n.assign("day",e.getDate()),n.assign("month",e.getMonth()+1),n.assign("year",e.getFullYear())}function Qre(n,e){n.assign("hour",e.getHours()),n.assign("minute",e.getMinutes()),n.assign("second",e.getSeconds()),n.assign("millisecond",e.getMilliseconds()),n.assign("meridiem",e.getHours()<12?j.AM:j.PM)}function K0(n,e){n.imply("day",e.getDate()),n.imply("month",e.getMonth()+1),n.imply("year",e.getFullYear())}function Jre(n,e){n.imply("hour",e.getHours()),n.imply("minute",e.getMinutes()),n.imply("second",e.getSeconds()),n.imply("millisecond",e.getMilliseconds()),n.imply("meridiem",e.getHours()<12?j.AM:j.PM)}var hB=y(()=>{Nt()});function Zu(n,e,t,r,a=0){let i=0,s=0;for(;s<r;)i++,new Date(n,e-1,i).getDay()===t&&s++;return new Date(n,e-1,i,a)}function Xre(n,e,t,r=0){let a=t===0?7:t,i=new Date(n,e-1+1,1,12),s=i.getDay()===0?7:i.getDay(),o;return s===a?o=7:s<a?o=7+s-a:o=s-a,i.setDate(i.getDate()-o),new Date(n,e-1,i.getDate(),r)}function Z0(n,e,t={}){var a;if(n==null)return null;if(typeof n=="number")return n;let r=(a=t[n])!=null?a:ize[n];return r==null?null:typeof r=="number"?r:e==null?null:(0,gB.default)(e).isAfter(r.dstStart(e.getFullYear()))&&!(0,gB.default)(e).isAfter(r.dstEnd(e.getFullYear()))?r.timezoneOffsetDuringDst:r.timezoneOffsetNonDst}var gB,ize,yB=y(()=>{gB=tt(Ht(),1);Nt();ize={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:120,timezoneOffsetNonDst:60,dstStart:n=>Xre(n,fs.MARCH,We.SUNDAY,2),dstEnd:n=>Xre(n,fs.OCTOBER,We.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-300,timezoneOffsetNonDst:-360,dstStart:n=>Zu(n,fs.MARCH,We.SUNDAY,2,2),dstEnd:n=>Zu(n,fs.NOVEMBER,We.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-240,timezoneOffsetNonDst:-300,dstStart:n=>Zu(n,fs.MARCH,We.SUNDAY,2,2),dstEnd:n=>Zu(n,fs.NOVEMBER,We.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-360,timezoneOffsetNonDst:-420,dstStart:n=>Zu(n,fs.MARCH,We.SUNDAY,2,2),dstEnd:n=>Zu(n,fs.NOVEMBER,We.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-420,timezoneOffsetNonDst:-480,dstStart:n=>Zu(n,fs.MARCH,We.SUNDAY,2,2),dstEnd:n=>Zu(n,fs.NOVEMBER,We.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360}});function ene(n,e){var r,a,i,s,o,l,c;let t=new Date(n);if(e.y&&(e.year=e.y,delete e.y),e.mo&&(e.month=e.mo,delete e.mo),e.M&&(e.month=e.M,delete e.M),e.w&&(e.week=e.w,delete e.w),e.d&&(e.day=e.d,delete e.d),e.h&&(e.hour=e.h,delete e.h),e.m&&(e.minute=e.m,delete e.m),e.s&&(e.second=e.s,delete e.s),e.ms&&(e.millisecond=e.ms,delete e.ms),"year"in e){let d=Math.floor(e.year);t.setFullYear(t.getFullYear()+d);let u=e.year-d;u>0&&(e.month=(r=e==null?void 0:e.month)!=null?r:0,e.month+=u*12)}if("quarter"in e){let d=Math.floor(e.quarter);t.setMonth(t.getMonth()+d*3)}if("month"in e){let d=Math.floor(e.month);t.setMonth(t.getMonth()+d);let u=e.month-d;u>0&&(e.week=(a=e==null?void 0:e.week)!=null?a:0,e.week+=u*4)}if("week"in e){let d=Math.floor(e.week);t.setDate(t.getDate()+d*7);let u=e.week-d;u>0&&(e.day=(i=e==null?void 0:e.day)!=null?i:0,e.day+=Math.round(u*7))}if("day"in e){let d=Math.floor(e.day);t.setDate(t.getDate()+d);let u=e.day-d;u>0&&(e.hour=(s=e==null?void 0:e.hour)!=null?s:0,e.hour+=Math.round(u*24))}if("hour"in e){let d=Math.floor(e.hour);t.setHours(t.getHours()+d);let u=e.hour-d;u>0&&(e.minute=(o=e==null?void 0:e.minute)!=null?o:0,e.minute+=Math.round(u*60))}if("minute"in e){let d=Math.floor(e.minute);t.setMinutes(t.getMinutes()+d);let u=e.minute-d;u>0&&(e.second=(l=e==null?void 0:e.second)!=null?l:0,e.second+=Math.round(u*60))}if("second"in e){let d=Math.floor(e.second);t.setSeconds(t.getSeconds()+d);let u=e.second-d;u>0&&(e.millisecond=(c=e==null?void 0:e.millisecond)!=null?c:0,e.millisecond+=Math.round(u*1e3))}if("millisecond"in e){let d=Math.floor(e.millisecond);t.setMilliseconds(t.getMilliseconds()+d)}return t}function hy(n){let e={};for(let t in n)e[t]=-n[t];return e}var Vb=y(()=>{});var tne,vB,Vt,K,Lt,ot=y(()=>{tne=tt(Kre(),1),vB=tt(Ht(),1);hB();yB();Vb();vB.default.extend(tne.default);Vt=class n{constructor(e,t){z(this,"instant");z(this,"timezoneOffset");this.instant=e!=null?e:new Date,this.timezoneOffset=t!=null?t:null}static fromDate(e){return new n(e)}static fromInput(e,t){var i;if(e instanceof Date)return n.fromDate(e);let r=(i=e==null?void 0:e.instant)!=null?i:new Date,a=Z0(e==null?void 0:e.timezone,r,t);return new n(r,a)}getDateWithAdjustedTimezone(){let e=new Date(this.instant);return this.timezoneOffset!==null&&e.setMinutes(e.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),e}getSystemTimezoneAdjustmentMinute(e,t){var i;(!e||e.getTime()<0)&&(e=new Date);let r=-e.getTimezoneOffset(),a=(i=t!=null?t:this.timezoneOffset)!=null?i:r;return r-a}getTimezoneOffset(){var e;return(e=this.timezoneOffset)!=null?e:-this.instant.getTimezoneOffset()}},K=class n{constructor(e,t){z(this,"knownValues");z(this,"impliedValues");z(this,"reference");z(this,"_tags",new Set);if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let a in t)this.knownValues[a]=t[a];let r=e.getDateWithAdjustedTimezone();this.imply("day",r.getDate()),this.imply("month",r.getMonth()+1),this.imply("year",r.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new n(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {
tags: ${JSON.stringify(Array.from(this._tags).sort())},
knownValues: ${JSON.stringify(this.knownValues)},
impliedValues: ${JSON.stringify(this.impliedValues)}},
reference: ${JSON.stringify(this.reference)}]`}dayjs(){return(0,vB.default)(this.dateWithoutTimezoneAdjustment())}date(){let e=this.dateWithoutTimezoneAdjustment(),t=this.reference.getSystemTimezoneAdjustmentMinute(e,this.get("timezoneOffset"));return new Date(e.getTime()+t*6e4)}addTag(e){return this._tags.add(e),this}addTags(e){for(let t of e)this._tags.add(t);return this}tags(){return new Set(this._tags)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}static createRelativeFromReference(e,t){let r=ene(e.getDateWithAdjustedTimezone(),t),a=new n(e);return a.addTag("result/relativeDate"),t.hour||t.minute||t.second?(a.addTag("result/relativeDateAndTime"),Qre(a,r),Zre(a,r),a.assign("timezoneOffset",e.getTimezoneOffset())):(Jre(a,r),a.imply("timezoneOffset",e.getTimezoneOffset()),t.day?(a.assign("day",r.getDate()),a.assign("month",r.getMonth()+1),a.assign("year",r.getFullYear()),a.assign("weekday",r.getDay())):t.week?(a.assign("day",r.getDate()),a.assign("month",r.getMonth()+1),a.assign("year",r.getFullYear()),a.imply("weekday",r.getDay())):(a.imply("day",r.getDate()),t.month?(a.assign("month",r.getMonth()+1),a.assign("year",r.getFullYear())):(a.imply("month",r.getMonth()+1),t.year?a.assign("year",r.getFullYear()):a.imply("year",r.getFullYear())))),a}},Lt=class n{constructor(e,t,r,a,i){z(this,"refDate");z(this,"index");z(this,"text");z(this,"reference");z(this,"start");z(this,"end");this.reference=e,this.refDate=e.instant,this.index=t,this.text=r,this.start=a||new K(e),this.end=i}clone(){let e=new n(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}addTag(e){return this.start.addTag(e),this.end&&this.end.addTag(e),this}addTags(e){return this.start.addTags(e),this.end&&this.end.addTags(e),this}tags(){let e=new Set(this.start.tags());if(this.end)for(let t of this.end.tags())e.add(t);return e}toString(){let e=Array.from(this.tags()).sort();return`[ParsingResult {index: ${this.index}, text: '${this.text}', tags: ${JSON.stringify(e)} ...}]`}}});function li(n,e,t="\\s{0,5},?\\s{0,5}"){let r=e.replace(/\((?!\?)/g,"(?:");return`${n}${r}(?:${t}${r}){0,10}`}function sze(n){let e;return n instanceof Array?e=[...n]:n instanceof Map?e=Array.from(n.keys()):e=Object.keys(n),e}function ie(n){return`(?:${sze(n).sort((t,r)=>r.length-t.length).join("|").replace(/\./g,"\\.")})`}var xt=y(()=>{});function Mi(n){return n<100&&(n>50?n=n+1900:n=n+2e3),n}function er(n,e,t){let r=(0,rne.default)(n),a=r;a=a.month(t-1),a=a.date(e),a=a.year(r.year());let i=a.add(1,"y"),s=a.add(-1,"y");return Math.abs(i.diff(r))<Math.abs(a.diff(r))?a=i:Math.abs(s.diff(r))<Math.abs(a.diff(r))&&(a=s),a.year()}var rne,mn=y(()=>{rne=tt(Ht(),1)});function oze(n){let e=n.toLowerCase();return kB[e]!==void 0?kB[e]:e==="a"||e==="an"||e=="the"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}function yy(n){let e=n.toLowerCase();return TB[e]!==void 0?TB[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}function Ju(n){if(/BE/i.test(n))return n=n.replace(/BE/i,""),parseInt(n)-543;if(/BCE?/i.test(n))return n=n.replace(/BCE?/i,""),-parseInt(n);if(/(AD|CE)/i.test(n))return n=n.replace(/(AD|CE)/i,""),parseInt(n);let e=parseInt(n);return Mi(e)}function Js(n){let e={},t=n,r=nne.exec(t);for(;r;)cze(e,r),t=t.substring(r[0].length).trim(),r=nne.exec(t);return Object.keys(e).length==0?null:e}function cze(n,e){if(e[0].match(/^[a-zA-Z]+$/))return;let t=oze(e[1]),r=Wb[e[2].toLowerCase()];n[r]=t}var Q0,bB,Qs,kB,TB,ane,Wb,ine,gy,Qu,sne,nne,lze,one,Nd,Xu,Un=y(()=>{xt();mn();Q0={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6},bB={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},Qs={...bB,jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12},kB={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12},TB={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31},ane={second:"second",seconds:"second",minute:"minute",minutes:"minute",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",quarter:"quarter",quarters:"quarter",year:"year",years:"year"},Wb={s:"second",sec:"second",second:"second",seconds:"second",m:"minute",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",d:"d",day:"d",days:"d",w:"w",week:"week",weeks:"week",mo:"month",mon:"month",mos:"month",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year",...ane},ine=`(?:${ie(kB)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|the|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;gy=`(?:${ie(TB)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;Qu="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9]|2[0-5])";sne=`(${ine})\\s{0,3}(${ie(Wb)})`,nne=new RegExp(sne,"i"),lze=`(${ine})\\s{0,3}(${ie(ane)})`,one="\\s{0,5},?(?:\\s*and)?\\s{0,5}",Nd=li("(?:(?:about|around)\\s{0,3})?",sne,one),Xu=li("(?:(?:about|around)\\s{0,3})?",lze,one)});var H,we=y(()=>{H=class{constructor(){z(this,"cachedInnerPattern",null);z(this,"cachedPattern",null)}innerPatternHasChange(e,t){return this.innerPattern(e)!==t}patternLeftBoundary(){return"(\\W|^)"}pattern(e){return this.cachedInnerPattern&&!this.innerPatternHasChange(e,this.cachedInnerPattern)?this.cachedPattern:(this.cachedInnerPattern=this.innerPattern(e),this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${this.cachedInnerPattern.source}`,this.cachedInnerPattern.flags),this.cachedPattern)}extract(e,t){var a;let r=(a=t[1])!=null?a:"";t.index=t.index+r.length,t[0]=t[0].substring(r.length);for(let i=2;i<t.length;i++)t[i-1]=t[i];return this.innerExtract(e,t)}}});var dze,uze,pze,qb,lne=y(()=>{Un();ot();we();dze=new RegExp(`(?:(?:within|in|for)\\s*)?(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Nd})(?=\\W|$)`,"i"),uze=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Nd})(?=\\W|$)`,"i"),pze=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Xu})(?=\\W|$)`,"i"),qb=class extends H{constructor(t){super();z(this,"strictMode");this.strictMode=t}innerPattern(t){return this.strictMode?pze:t.option.forwardDate?dze:uze}innerExtract(t,r){if(r[0].match(/^for\s*the\s*\w+/))return null;let a=Js(r[1]);return a?(t.debug(()=>{console.log(a),console.log(K.createRelativeFromReference(t.reference,a))}),K.createRelativeFromReference(t.reference,a)):null}}});var mze,cne,dne,fze,une,Gb,pne=y(()=>{mn();Un();Un();Un();xt();we();mze=new RegExp(`(?:on\\s{0,3})?(${gy})(?:\\s{0,3}(?:to|\\-|\\–|until|through|till)?\\s{0,3}(${gy}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${ie(Qs)})(?:(?:-|/|,?\\s{0,3})(${Qu}(?!\\w)))?(?=\\W|$)`,"i"),cne=1,dne=2,fze=3,une=4,Gb=class extends H{innerPattern(){return mze}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=Qs[t[fze].toLowerCase()],i=yy(t[cne]);if(i>31)return t.index=t.index+t[cne].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[une]){let s=Ju(t[une]);r.start.assign("year",s)}else{let s=er(e.refDate,i,a);r.start.imply("year",s)}if(t[dne]){let s=yy(t[dne]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var hze,gze,mne,wB,SB,Yb,fne=y(()=>{mn();Un();Un();Un();xt();we();hze=new RegExp(`(${ie(Qs)})(?:-|/|\\s*,?\\s*)(${gy})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${gy})\\s*)?(?:(?:-|/|\\s*,\\s*|\\s+)(${Qu}))?(?=\\W|$)(?!\\:\\d)`,"i"),gze=1,mne=2,wB=3,SB=4,Yb=class extends H{constructor(t){super();z(this,"shouldSkipYearLikeDate");this.shouldSkipYearLikeDate=t}innerPattern(){return hze}innerExtract(t,r){let a=Qs[r[gze].toLowerCase()],i=yy(r[mne]);if(i>31||this.shouldSkipYearLikeDate&&!r[wB]&&!r[SB]&&r[mne].match(/^2[0-5]$/))return null;let s=t.createParsingComponents({day:i,month:a}).addTag("parser/ENMonthNameMiddleEndianParser");if(r[SB]){let c=Ju(r[SB]);s.assign("year",c)}else{let c=er(t.refDate,i,a);s.imply("year",c)}if(!r[wB])return s;let o=yy(r[wB]),l=t.createParsingResult(r.index,r[0]);return l.start=s,l.end=s.clone(),l.end.assign("day",o),l}}});var yze,vze,kze,hne,Kb,gne=y(()=>{Un();mn();xt();Un();we();yze=new RegExp(`((?:in)\\s*)?(${ie(Qs)})\\s*(?:(?:,|-|of)?\\s*(${Qu})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),vze=1,kze=2,hne=3,Kb=class extends H{innerPattern(){return yze}innerExtract(e,t){let r=t[kze].toLowerCase();if(t[0].length<=3&&!bB[r])return null;let a=e.createParsingResult(t.index+(t[vze]||"").length,t.index+t[0].length);a.start.imply("day",1),a.start.addTag("parser/ENMonthNameParser");let i=Qs[r];if(a.start.assign("month",i),t[hne]){let s=Ju(t[hne]);a.start.assign("year",s)}else{let s=er(e.refDate,1,i);a.start.imply("year",s)}return a}}});var Tze,bze,wze,yne,Sze,Zb,vne=y(()=>{Un();xt();we();Tze=new RegExp(`([0-9]{4})[-\\.\\/\\s](?:(${ie(Qs)})|([0-9]{1,2}))[-\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),bze=1,wze=2,yne=3,Sze=4,Zb=class extends H{constructor(t){super();z(this,"strictMonthDateOrder");this.strictMonthDateOrder=t}innerPattern(){return Tze}innerExtract(t,r){let a=parseInt(r[bze]),i=parseInt(r[Sze]),s=r[yne]?parseInt(r[yne]):Qs[r[wze].toLowerCase()];if(s<1||s>12){if(this.strictMonthDateOrder)return null;i>=1&&i<=12&&([s,i]=[i,s])}return i<1||i>31?null:{day:i,month:s,year:a}}}});var Cze,xze,Eze,Qb,kne=y(()=>{we();Cze=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),xze=1,Eze=2,Qb=class extends H{innerPattern(){return Cze}innerExtract(e,t){let r=parseInt(t[Eze]),a=parseInt(t[xze]);return e.createParsingComponents().imply("day",1).assign("month",a).assign("year",r)}}});function Dze(n,e,t,r){return new RegExp(`${n}${e}(\\d{1,4})(?:(?:\\.|:|:)(\\d{1,2})(?:(?::|:)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,r)}function Pze(n,e){return new RegExp(`^(${n})(\\d{1,4})(?:(?:\\.|\\:|\\:)(\\d{1,2})(?:(?:\\.|\\:|\\:)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Tne,vy,J0,X0,Jb,na,Rd=y(()=>{Nt();Tne=2,vy=3,J0=4,X0=5,Jb=6,na=class{constructor(e=!1){z(this,"strictMode");z(this,"cachedPrimaryPrefix",null);z(this,"cachedPrimarySuffix",null);z(this,"cachedPrimaryTimePattern",null);z(this,"cachedFollowingPhase",null);z(this,"cachedFollowingSuffix",null);z(this,"cachedFollowingTimePatten",null);this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?!/)(?=\\W|$)"}followingSuffix(){return"(?!/)(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let r=this.extractPrimaryTimeComponents(e,t);if(!r)return t[0].match(/^\d{4}/)?(t.index+=4,null):(t.index+=t[0].length,null);let a=t.index+t[1].length,i=t[0].substring(t[1].length),s=e.createParsingResult(a,i,r);t.index+=t[0].length;let o=e.text.substring(t.index),c=this.getFollowingTimePatternThroughCache().exec(o);return i.match(/^\d{3,4}/)&&c&&(c[0].match(/^\s*([+-])\s*\d{2,4}$/)||c[0].match(/^\s*([+-])\s*\d{2}\W\d{2}/))?null:!c||c[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(s):(s.end=this.extractFollowingTimeComponents(e,c,s),s.end&&(s.text+=c[0]),this.checkAndReturnWithFollowingPattern(s))}extractPrimaryTimeComponents(e,t,r=!1){let a=e.createParsingComponents(),i=0,s=null,o=parseInt(t[Tne]);if(o>100){if(this.strictMode||t[vy]!=null)return null;i=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[vy]!=null){if(t[vy].length==1&&!t[Jb])return null;i=parseInt(t[vy])}if(i>=60)return null;if(o>12&&(s=j.PM),t[Jb]!=null){if(o>12)return null;let l=t[Jb][0].toLowerCase();l=="a"&&(s=j.AM,o==12&&(o=0)),l=="p"&&(s=j.PM,o!=12&&(o+=12))}if(a.assign("hour",o),a.assign("minute",i),s!==null?a.assign("meridiem",s):o<12?a.imply("meridiem",j.AM):a.imply("meridiem",j.PM),t[X0]!=null){let l=parseInt(t[X0].substring(0,3));if(l>=1e3)return null;a.assign("millisecond",l)}if(t[J0]!=null){let l=parseInt(t[J0]);if(l>=60)return null;a.assign("second",l)}return a}extractFollowingTimeComponents(e,t,r){let a=e.createParsingComponents();if(t[X0]!=null){let l=parseInt(t[X0].substring(0,3));if(l>=1e3)return null;a.assign("millisecond",l)}if(t[J0]!=null){let l=parseInt(t[J0]);if(l>=60)return null;a.assign("second",l)}let i=parseInt(t[Tne]),s=0,o=-1;if(t[vy]!=null?s=parseInt(t[vy]):i>100&&(s=i%100,i=Math.floor(i/100)),s>=60||i>24)return null;if(i>=12&&(o=j.PM),t[Jb]!=null){if(i>12)return null;let l=t[Jb][0].toLowerCase();l=="a"&&(o=j.AM,i==12&&(i=0,a.isCertain("day")||a.imply("day",a.get("day")+1))),l=="p"&&(o=j.PM,i!=12&&(i+=12)),r.start.isCertain("meridiem")||(o==j.AM?(r.start.imply("meridiem",j.AM),r.start.get("hour")==12&&r.start.assign("hour",0)):(r.start.imply("meridiem",j.PM),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}return a.assign("hour",i),a.assign("minute",s),o>=0?a.assign("meridiem",o):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>i?a.imply("meridiem",j.AM):i<=12&&(a.assign("hour",i+12),a.assign("meridiem",j.PM)):i>12?a.imply("meridiem",j.PM):i<=12&&a.imply("meridiem",j.AM),a.date().getTime()<r.start.date().getTime()&&a.imply("day",a.get("day")+1),a}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/)||e.text.match(/^\d\d\d+$/)||e.text.match(/\d[apAP]$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)$/);if(t){let r=t[1];if(this.strictMode||r.includes(".")&&!r.match(/\d(\.\d{2})+$/)||parseInt(r)>24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let r=t[1],a=t[2];if(a.includes(".")&&!a.match(/\d(\.\d{2})+$/))return null;let i=parseInt(a),s=parseInt(r);if(i>24||s>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Dze(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=Pze(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}}});var Xb,bne=y(()=>{Nt();Rd();Xb=class extends na{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|to|until|through|till|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let r=super.extractPrimaryTimeComponents(e,t);if(!r)return r;if(t[0].endsWith("night")){let a=r.get("hour");a>=6&&a<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",j.PM)):a<6&&r.assign("meridiem",j.AM)}if(t[0].endsWith("afternoon")){r.assign("meridiem",j.PM);let a=r.get("hour");a>=0&&a<=6&&r.assign("hour",r.get("hour")+12)}return t[0].endsWith("morning")&&(r.assign("meridiem",j.AM),r.get("hour")<12&&r.assign("hour",r.get("hour"))),r.addTag("parser/ENTimeExpressionParser")}extractFollowingTimeComponents(e,t,r){let a=super.extractFollowingTimeComponents(e,t,r);return a&&a.addTag("parser/ENTimeExpressionParser"),a}}});var Aze,Mze,ew,wne=y(()=>{Un();ot();we();Vb();Aze=new RegExp(`(${Nd})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),Mze=new RegExp(`(${Xu})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,"i"),ew=class extends H{constructor(t){super();z(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?Mze:Aze}innerExtract(t,r){let a=Js(r[1]);return a?K.createRelativeFromReference(t.reference,hy(a)):null}}});var Ize,Nze,Rze,tw,Sne=y(()=>{Un();ot();we();Ize=new RegExp(`(${Nd})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Nze=new RegExp(`(${Xu})\\s{0,5}(later|after|from now)(?=\\W|$)`,"i"),Rze=1,tw=class extends H{constructor(t){super();z(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?Nze:Ize}innerExtract(t,r){let a=Js(r[Rze]);return a?K.createRelativeFromReference(t.reference,a):null}}});var ky,Ii,_d=y(()=>{ky=class{refine(e,t){return t.filter(r=>this.isValid(e,r))}},Ii=class{refine(e,t){if(t.length<2)return t;let r=[],a=t[0],i=null;for(let s=1;s<t.length;s++){i=t[s];let o=e.text.substring(a.index+a.text.length,i.index);if(!this.shouldMergeResults(o,a,i,e))r.push(a),a=i;else{let l=a,c=i,d=this.mergeResults(o,l,c,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${l} and ${c} into ${d}`)}),a=d}}return a!=null&&r.push(a),r}}});var jr,Xs=y(()=>{_d();jr=class extends Ii{shouldMergeResults(e,t,r){return!t.end&&!r.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,r){if(!t.start.isOnlyWeekdayComponent()&&!r.start.isOnlyWeekdayComponent()&&(r.start.getCertainComponents().forEach(i=>{t.start.isCertain(i)||t.start.imply(i,r.start.get(i))}),t.start.getCertainComponents().forEach(i=>{r.start.isCertain(i)||r.start.imply(i,t.start.get(i))})),t.start.date().getTime()>r.start.date().getTime()){let i=t.start.dayjs(),s=r.start.dayjs();r.start.isOnlyWeekdayComponent()&&s.add(7,"days").isAfter(i)?(s=s.add(7,"days"),r.start.imply("day",s.date()),r.start.imply("month",s.month()+1),r.start.imply("year",s.year())):t.start.isOnlyWeekdayComponent()&&i.add(-7,"days").isBefore(s)?(i=i.add(-7,"days"),t.start.imply("day",i.date()),t.start.imply("month",i.month()+1),t.start.imply("year",i.year())):r.start.isDateWithUnknownYear()&&s.add(1,"years").isAfter(i)?(s=s.add(1,"years"),r.start.imply("year",s.year())):t.start.isDateWithUnknownYear()&&i.add(-1,"years").isBefore(s)?(i=i.add(-1,"years"),t.start.imply("year",i.year())):[r,t]=[t,r]}let a=t.clone();return a.start=t.start,a.end=r.start,a.index=Math.min(t.index,r.index),t.index<r.index?a.text=t.text+e+r.text:a.text=r.text+e+t.text,a}}});var rw,Cne=y(()=>{Xs();rw=class extends jr{patternBetween(){return/^\s*(to|-|–|until|through|till)\s*$/i}}});function Xo(n,e){e=e.add(1,"day"),Mr(n,e),$l(n,e)}function xne(n,e){e=e.add(1,"day"),CB(n,e),$l(n,e)}function Mr(n,e){n.assign("day",e.date()),n.assign("month",e.month()+1),n.assign("year",e.year())}function Ene(n,e){n.assign("hour",e.hour()),n.assign("minute",e.minute()),n.assign("second",e.second()),n.assign("millisecond",e.millisecond()),n.get("hour")<12?n.assign("meridiem",j.AM):n.assign("meridiem",j.PM)}function CB(n,e){n.imply("day",e.date()),n.imply("month",e.month()+1),n.imply("year",e.year())}function $l(n,e){n.imply("hour",e.hour()),n.imply("minute",e.minute()),n.imply("second",e.second()),n.imply("millisecond",e.millisecond())}var hs=y(()=>{Nt()});function xB(n,e){let t=n.clone(),r=n.start,a=e.start;if(t.start=Dne(r,a),n.end!=null||e.end!=null){let i=n.end==null?n.start:n.end,s=e.end==null?e.start:e.end,o=Dne(i,s);if(n.end==null&&o.date().getTime()<t.start.date().getTime()){let l=o.dayjs().add(1,"day");o.isCertain("day")?Mr(o,l):CB(o,l)}t.end=o}return t}function Dne(n,e){let t=n.clone();return e.isCertain("hour")?(t.assign("hour",e.get("hour")),t.assign("minute",e.get("minute")),e.isCertain("second")?(t.assign("second",e.get("second")),e.isCertain("millisecond")?t.assign("millisecond",e.get("millisecond")):t.imply("millisecond",e.get("millisecond"))):(t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond")))):(t.imply("hour",e.get("hour")),t.imply("minute",e.get("minute")),t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond"))),e.isCertain("timezoneOffset")&&t.assign("timezoneOffset",e.get("timezoneOffset")),e.isCertain("meridiem")?t.assign("meridiem",e.get("meridiem")):e.get("meridiem")!=null&&t.get("meridiem")==null&&t.imply("meridiem",e.get("meridiem")),t.get("meridiem")==j.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t.addTags(n.tags()),t.addTags(e.tags()),t}var Pne=y(()=>{Nt();hs()});var $r,eo=y(()=>{_d();Pne();$r=class extends Ii{shouldMergeResults(e,t,r){return(t.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,r){let a=t.start.isOnlyDate()?xB(t,r):xB(r,t);return a.index=t.index,a.text=t.text+e+r.text,a}}});var Ty,Ane=y(()=>{eo();Ty=class extends $r{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-|\\.|∙|:)?\\s*$")}}});var _ze,nw,Mne=y(()=>{yB();_ze=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),nw=class{constructor(e){z(this,"timezoneOverrides");this.timezoneOverrides=e}refine(e,t){var a;let r=(a=e.option.timezones)!=null?a:{};return t.forEach(i=>{var m,f;let s=e.text.substring(i.index+i.text.length),o=_ze.exec(s);if(!o)return;let l=o[1].toUpperCase(),c=(f=(m=i.start.date())!=null?m:i.refDate)!=null?f:new Date,d={...this.timezoneOverrides,...r},u=Z0(l,c,d);if(u==null)return;e.debug(()=>{console.log(`Extracting timezone: '${l}' into: ${u} for: ${i.start}`)});let p=i.start.get("timezoneOffset");p!==null&&u!=p&&(i.start.isCertain("timezoneOffset")||l!=o[1])||i.start.isOnlyDate()&&l!=o[1]||(i.text+=o[0],i.start.isCertain("timezoneOffset")||i.start.assign("timezoneOffset",u),i.end!=null&&!i.end.isCertain("timezoneOffset")&&i.end.assign("timezoneOffset",u))}),t}}});var Fze,Lze,Oze,zze,el,aw=y(()=>{Fze=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Lze=1,Oze=2,zze=3,el=class{refine(e,t){return t.forEach(function(r){if(r.start.isCertain("timezoneOffset"))return;let a=e.text.substring(r.index+r.text.length),i=Fze.exec(a);if(!i)return;e.debug(()=>{console.log(`Extracting timezone: '${i[0]}' into : ${r}`)});let s=parseInt(i[Oze]),o=parseInt(i[zze]||"0"),l=s*60+o;l>840||(i[Lze]==="-"&&(l=-l),r.end!=null&&r.end.assign("timezoneOffset",l),r.start.assign("timezoneOffset",l),r.text+=i[0])}),t}}});var ep,EB=y(()=>{ep=class{refine(e,t){if(t.length<2)return t;let r=[],a=t[0];for(let i=1;i<t.length;i++){let s=t[i];if(s.index>=a.index+a.text.length){r.push(a),a=s;continue}let o=null,l=null;s.text.length>a.text.length?(o=s,l=a):(o=a,l=s),e.debug(()=>{console.log(`${this.constructor.name} remove ${l} by ${o}`)}),a=o}return a!=null&&r.push(a),r}}});var Ine,iw,Nne=y(()=>{Ine=tt(Ht(),1);hB();iw=class{refine(e,t){return e.option.forwardDate&&t.forEach(r=>{let a=(0,Ine.default)(e.reference.getDateWithAdjustedTimezone());if(r.start.isOnlyTime()&&e.reference.instant>r.start.date()){let i=e.reference.getDateWithAdjustedTimezone(),s=new Date(i);s.setDate(s.getDate()+1),K0(r.start,s),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} time from the ref date (${i}) to the following day (${s})`)}),r.end&&r.end.isOnlyTime()&&(K0(r.end,s),r.start.date()>r.end.date()&&(s.setDate(s.getDate()+1),K0(r.end,s)))}if(r.start.isOnlyWeekdayComponent()&&a.isAfter(r.start.dayjs())&&(a.day()>=r.start.get("weekday")?a=a.day(r.start.get("weekday")+7):a=a.day(r.start.get("weekday")),r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year()),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} weekday (${r.start})`)}),r.end&&r.end.isOnlyWeekdayComponent()&&(a.day()>r.end.get("weekday")?a=a.day(r.end.get("weekday")+7):a=a.day(r.end.get("weekday")),r.end.imply("day",a.date()),r.end.imply("month",a.month()+1),r.end.imply("year",a.year()),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} weekday (${r.end})`)}))),r.start.isDateWithUnknownYear()&&a.isAfter(r.start.dayjs()))for(let i=0;i<3&&a.isAfter(r.start.dayjs());i++)r.start.imply("year",r.start.get("year")+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} year (${r.start})`)}),r.end&&!r.end.isCertain("year")&&(r.end.imply("year",r.end.get("year")+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${r} month (${r.start})`)}))}),t}}});var sw,Rne=y(()=>{_d();sw=class extends ky{constructor(t){super();z(this,"strictMode");this.strictMode=t}isValid(t,r){return r.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(t.debug(()=>{console.log(`Removing unlikely result '${r.text}'`)}),!1):r.start.isValidDate()?r.end&&!r.end.isValidDate()?(t.debug(()=>{console.log(`Removing invalid result: ${r} (${r.end})`)}),!1):this.strictMode?this.isStrictModeValid(t,r):!0:(t.debug(()=>{console.log(`Removing invalid result: ${r} (${r.start})`)}),!1)}isStrictModeValid(t,r){return r.start.isOnlyWeekdayComponent()?(t.debug(()=>{console.log(`(Strict) Removing weekday only component: ${r} (${r.end})`)}),!1):!0}}});var Bze,jze,$ze,Uze,_ne,Hze,Fne,Lne,Vze,One,zne,Fd,eA=y(()=>{we();Bze=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),jze=1,$ze=2,Uze=3,_ne=4,Hze=5,Fne=6,Lne=7,Vze=8,One=9,zne=10,Fd=class extends H{innerPattern(){return Bze}innerExtract(e,t){let r=e.createParsingComponents({year:parseInt(t[jze]),month:parseInt(t[$ze]),day:parseInt(t[Uze])});if(t[_ne]!=null&&(r.assign("hour",parseInt(t[_ne])),r.assign("minute",parseInt(t[Hze])),t[Fne]!=null&&r.assign("second",parseInt(t[Fne])),t[Lne]!=null&&r.assign("millisecond",parseInt(t[Lne])),t[Vze]!=null)){let a=0;if(t[One]){let i=parseInt(t[One]),s=0;t[zne]!=null&&(s=parseInt(t[zne])),a=i*60,a<0?a-=s:a+=s}r.assign("timezoneOffset",a)}return r.addTag("parser/ISOFormatParser")}}});var vf,DB=y(()=>{_d();vf=class extends Ii{mergeResults(e,t,r){let a=r.clone();return a.index=t.index,a.text=t.text+e+a.text,a.start.assign("weekday",t.start.get("weekday")),a.end&&a.end.assign("weekday",t.start.get("weekday")),a}shouldMergeResults(e,t,r){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&r.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}}});function Gr(n,e=!1){return n.parsers.unshift(new Fd),n.refiners.unshift(new vf),n.refiners.unshift(new el),n.refiners.unshift(new ep),n.refiners.push(new nw),n.refiners.push(new ep),n.refiners.push(new iw),n.refiners.push(new sw(e)),n}var gs=y(()=>{Mne();aw();EB();Nne();Rne();eA();DB()});function Ba(n){let e=(0,tp.default)(n.getDateWithAdjustedTimezone()),t=new K(n,{});return Mr(t,e),Ene(t,e),t.assign("timezoneOffset",n.getTimezoneOffset()),t.addTag("casualReference/now"),t}function aa(n){let e=(0,tp.default)(n.getDateWithAdjustedTimezone()),t=new K(n,{});return Mr(t,e),$l(t,e),t.addTag("casualReference/today"),t}function ja(n){return kf(n,1).addTag("casualReference/yesterday")}function kf(n,e){return Ul(n,-e)}function $a(n){return Ul(n,1).addTag("casualReference/tomorrow")}function Ul(n,e){let t=(0,tp.default)(n.getDateWithAdjustedTimezone()),r=new K(n,{});return t=t.add(e,"day"),Mr(r,t),$l(r,t),r}function Bne(n,e=22){let t=(0,tp.default)(n.getDateWithAdjustedTimezone()),r=new K(n,{});return Mr(r,t),r.imply("hour",e),r.imply("meridiem",j.PM),r.addTag("casualReference/tonight"),r}function tA(n,e=0){let t=(0,tp.default)(n.getDateWithAdjustedTimezone()),r=new K(n,{});return t.hour()<6&&(t=t.add(-1,"day")),Mr(r,t),r.imply("hour",e),r}function by(n,e=20){let t=new K(n,{});return t.imply("meridiem",j.PM),t.imply("hour",e),t.addTag("casualReference/evening"),t}function rA(n,e=20){let t=(0,tp.default)(n.getDateWithAdjustedTimezone()),r=new K(n,{});return t=t.add(-1,"day"),Mr(r,t),r.imply("hour",e),r.imply("meridiem",j.PM),r.addTag("casualReference/yesterday"),r.addTag("casualReference/evening"),r}function Tf(n){let e=new K(n,{}),t=(0,tp.default)(n.getDateWithAdjustedTimezone());return t.hour()>2&&xne(e,t),e.assign("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("millisecond",0),e.addTag("casualReference/midnight"),e}function wy(n,e=6){let t=new K(n,{});return t.imply("meridiem",j.AM),t.imply("hour",e),t.imply("minute",0),t.imply("second",0),t.imply("millisecond",0),t.addTag("casualReference/morning"),t}function jne(n,e=15){let t=new K(n,{});return t.imply("meridiem",j.PM),t.imply("hour",e),t.imply("minute",0),t.imply("second",0),t.imply("millisecond",0),t.addTag("casualReference/afternoon"),t}function Sy(n){let e=new K(n,{});return e.imply("meridiem",j.AM),e.assign("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("millisecond",0),e.addTag("casualReference/noon"),e}var tp,ys=y(()=>{ot();tp=tt(Ht(),1);hs();Nt()});var $ne,Wze,ow,Une=y(()=>{$ne=tt(Ht(),1);we();hs();ys();Wze=/(now|today|tonight|tomorrow|overmorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,ow=class extends H{innerPattern(e){return Wze}innerExtract(e,t){let r=(0,$ne.default)(e.refDate),a=t[0].toLowerCase(),i=e.createParsingComponents();switch(a){case"now":i=Ba(e.reference);break;case"today":i=aa(e.reference);break;case"yesterday":i=ja(e.reference);break;case"tomorrow":case"tmr":case"tmrw":i=$a(e.reference);break;case"tonight":i=Bne(e.reference);break;case"overmorrow":i=Ul(e.reference,2);break;default:a.match(/last\s*night/)&&(r.hour()>6&&(r=r.add(-1,"day")),Mr(i,r),i.imply("hour",0));break}return i.addTag("parser/ENCasualDateParser"),i}}});var qze,lw,Hne=y(()=>{we();ys();qze=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|midday|noon)(?=\W|$)/i,lw=class extends H{innerPattern(){return qze}innerExtract(e,t){let r=null;switch(t[1].toLowerCase()){case"afternoon":r=jne(e.reference);break;case"evening":case"night":r=by(e.reference);break;case"midnight":r=Tf(e.reference);break;case"morning":r=wy(e.reference);break;case"noon":case"midday":r=Sy(e.reference);break}return r&&r.addTag("parser/ENCasualTimeParser"),r}}});function Mn(n){let e={};for(let t in n)e[t]=-n[t];return e}function nA(n,e){let t=n.clone(),r=n.dayjs();for(let a in e)r=r.add(e[a],a);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",r.date()),t.imply("month",r.month()+1),t.imply("year",r.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",r.second()),t.imply("minute",r.minute()),t.imply("hour",r.hour())),t}var vs=y(()=>{});function In(n,e,t){let r=n.getDateWithAdjustedTimezone(),a=Gze(r,e,t),i=new K(n);return i=nA(i,{day:a}),i.assign("weekday",e),i}function Gze(n,e,t){let r=n.getDay();switch(t){case"this":return aA(n,e);case"last":return Vne(n,e);case"next":return r==We.SUNDAY?e==We.SUNDAY?7:e:r==We.SATURDAY?e==We.SATURDAY?7:e==We.SUNDAY?8:1+e:e<r&&e!=We.SUNDAY?aA(n,e):aA(n,e)+7}return Yze(n,e)}function Yze(n,e){let t=Vne(n,e),r=aA(n,e);return r<-t?r:t}function aA(n,e){let t=n.getDay(),r=e-t;return r<0&&(r+=7),r}function Vne(n,e){let t=n.getDay(),r=e-t;return r>=0&&(r-=7),r}var tl=y(()=>{Nt();ot();vs()});var Kze,Zze,Qze,Jze,cw,Wne=y(()=>{Un();xt();we();tl();Nt();Kze=new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${ie(Q0)}|weekend|weekday)(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),Zze=1,Qze=2,Jze=3,cw=class extends H{innerPattern(){return Kze}innerExtract(e,t){let r=t[Zze],a=t[Jze],i=r||a;i=i||"",i=i.toLowerCase();let s=null;i=="last"||i=="past"?s="last":i=="next"?s="next":i=="this"&&(s="this");let o=t[Qze].toLowerCase(),l;if(Q0[o]!==void 0)l=Q0[o];else if(o=="weekend")l=s=="last"?We.SUNDAY:We.SATURDAY;else if(o=="weekday"){let c=e.reference.getDateWithAdjustedTimezone().getDay();c==We.SUNDAY||c==We.SATURDAY?l=s=="last"?We.FRIDAY:We.MONDAY:(l=c-1,l=s=="last"?l-1:l+1,l=l%5+1)}else return null;return In(e.reference,l,s)}}});var qne,Xze,eBe,tBe,dw,Gne=y(()=>{Un();ot();qne=tt(Ht(),1);we();xt();Xze=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${ie(Wb)})(?=\\s*)(?=\\W|$)`,"i"),eBe=1,tBe=2,dw=class extends H{innerPattern(){return Xze}innerExtract(e,t){let r=t[eBe].toLowerCase(),a=t[tBe].toLowerCase(),i=Wb[a];if(r=="next"||r.startsWith("after")){let l={};return l[i]=1,K.createRelativeFromReference(e.reference,l)}if(r=="last"||r=="past"){let l={};return l[i]=-1,K.createRelativeFromReference(e.reference,l)}let s=e.createParsingComponents(),o=(0,qne.default)(e.reference.instant);return a.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):a.match(/month/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):a.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var rBe,nBe,aBe,Yne,Kne,PB,Hn,Ld=y(()=>{mn();rBe=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),nBe=1,aBe=5,Yne=2,Kne=3,PB=4,Hn=class{constructor(e){z(this,"groupNumberMonth");z(this,"groupNumberDay");this.groupNumberMonth=e?Kne:Yne,this.groupNumberDay=e?Yne:Kne}pattern(){return rBe}extract(e,t){let r=t.index+t[nBe].length,a=t.index+t[0].length-t[aBe].length;if(r>0&&e.text.substring(0,r).match("\\d/?$")||a<e.text.length&&e.text.substring(a).match("^/?\\d"))return;let i=e.text.substring(r,a);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[PB]&&i.indexOf("/")<0)return;let s=e.createParsingResult(r,i),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(s.start.assign("day",l),s.start.assign("month",o),t[PB]){let c=parseInt(t[PB]),d=Mi(c);s.start.assign("year",d)}else{let c=er(e.refDate,l,o);s.start.imply("year",c)}return s.addTag("parser/SlashDateFormatParser")}}});var iBe,sBe,uw,Zne=y(()=>{Un();ot();we();Vb();iBe=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Nd})(?=\\W|$)`,"i"),sBe=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${Xu})(?=\\W|$)`,"i"),uw=class extends H{constructor(t=!0){super();z(this,"allowAbbreviations");this.allowAbbreviations=t}innerPattern(){return this.allowAbbreviations?iBe:sBe}innerExtract(t,r){let a=r[1].toLowerCase(),i=Js(r[2]);if(!i)return null;switch(a){case"last":case"past":case"-":i=hy(i);break}return K.createRelativeFromReference(t.reference,i)}}});function oBe(n){return n.text.match(/^[+-]/i)!=null}function Qne(n){return n.text.match(/^-/i)!=null}var pw,Jne=y(()=>{_d();ot();Un();vs();pw=class extends Ii{shouldMergeResults(e,t,r){return e.match(/^\s*$/i)?oBe(r)||Qne(r):!1}mergeResults(e,t,r,a){let i=Js(r.text);Qne(r)&&(i=Mn(i));let s=K.createRelativeFromReference(Vt.fromDate(t.start.date()),i);return new Lt(t.reference,t.index,`${t.text}${e}${r.text}`,s)}}});function Xne(n){return n.text.match(/\s+(before|from)$/i)!=null}function lBe(n){return n.text.match(/\s+(after|since)$/i)!=null}var mw,eae=y(()=>{_d();ot();Un();Vb();mw=class extends Ii{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,r){return!e.match(this.patternBetween())||!Xne(t)&&!lBe(t)?!1:!!r.start.get("day")&&!!r.start.get("month")&&!!r.start.get("year")}mergeResults(e,t,r){let a=Js(t.text);Xne(t)&&(a=hy(a));let i=K.createRelativeFromReference(Vt.fromDate(r.start.date()),a);return new Lt(r.reference,t.index,`${t.text}${e}${r.text}`,i)}}});var cBe,dBe,fw,tae=y(()=>{Un();cBe=new RegExp(`^\\s*(${Qu})`,"i"),dBe=1,fw=class{refine(e,t){return t.forEach(function(r){if(!r.start.isDateWithUnknownYear())return;let a=e.text.substring(r.index+r.text.length),i=cBe.exec(a);if(!i||i[0].trim().length<=3)return;e.debug(()=>{console.log(`Extracting year: '${i[0]}' into : ${r}`)});let s=Ju(i[dBe]);r.end!=null&&r.end.assign("year",s),r.start.assign("year",s),r.text+=i[0]}),t}}});var hw,rae=y(()=>{_d();hw=class extends ky{constructor(){super()}isValid(e,t){let r=t.text.trim();return r===e.text.trim()?!0:r.toLowerCase()==="may"&&!e.text.substring(0,t.index).trim().match(/\b(in)$/i)?(e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1):r.toLowerCase().endsWith("the second")?(e.text.substring(t.index+t.text.length).trim().length>0&&e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1):!0}}});var bf,AB=y(()=>{lne();pne();fne();gne();vne();kne();bne();wne();Sne();Cne();Ane();gs();Une();Hne();Wne();Gne();Ld();Zne();Jne();eae();EB();tae();rae();bf=class{createCasualConfiguration(e=!1){let t=this.createConfiguration(!1,e);return t.parsers.push(new ow),t.parsers.push(new lw),t.parsers.push(new Kb),t.parsers.push(new dw),t.parsers.push(new uw),t.refiners.push(new hw),t}createConfiguration(e=!0,t=!1){let r=Gr({parsers:[new Hn(t),new qb(e),new Gb,new Yb(t),new cw,new Qb,new Xb(e),new ew(e),new tw(e)],refiners:[new Ty]},e);return r.parsers.unshift(new Zb(e)),r.refiners.unshift(new mw),r.refiners.unshift(new pw),r.refiners.unshift(new ep),r.refiners.push(new Ty),r.refiners.push(new fw),r.refiners.push(new rw),r}}});var ze,gw,Ni=y(()=>{ot();AB();ze=class n{constructor(e){z(this,"parsers");z(this,"refiners");z(this,"defaultConfig",new bf);e=e||this.defaultConfig.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new n({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,r){let a=this.parse(e,t,r);return a.length>0?a[0].start.date():null}parse(e,t,r){let a=new gw(e,t,r),i=[];return this.parsers.forEach(s=>{let o=n.executeParser(a,s);i=i.concat(o)}),i.sort((s,o)=>s.index-o.index),this.refiners.forEach(function(s){i=s.refine(a,i)}),i}static executeParser(e,t){let r=[],a=t.pattern(e),i=e.text,s=e.text,o=a.exec(s);for(;o;){let l=o.index+i.length-s.length;o.index=l;let c=t.extract(e,o);if(!c){s=i.substring(o.index+1),o=a.exec(s);continue}let d=null;c instanceof Lt?d=c:c instanceof K?(d=e.createParsingResult(o.index,o[0]),d.start=c):d=e.createParsingResult(o.index,o[0],c);let u=d.index,p=d.text;e.debug(()=>console.log(`${t.constructor.name} extracted (at index=${u}) '${p}'`)),r.push(d),s=i.substring(u+p.length),o=a.exec(s)}return r}},gw=class{constructor(e,t,r){z(this,"text");z(this,"option");z(this,"reference");z(this,"refDate");this.text=e,this.option=r!=null?r:{},this.reference=Vt.fromInput(t,this.option.timezones),this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof K?e:new K(this.reference,e)}createParsingResult(e,t,r,a){let i=typeof t=="string"?t:this.text.substring(e,t),s=r?this.createParsingComponents(r):null,o=a?this.createParsingComponents(a):null;return new Lt(this.reference,e,i,s,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}}});var IB={};Xe(IB,{Chrono:()=>ze,GB:()=>uBe,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>yw,configuration:()=>iA,parse:()=>pBe,parseDate:()=>mBe,strict:()=>MB});function pBe(n,e,t){return yw.parse(n,e,t)}function mBe(n,e,t){return yw.parseDate(n,e,t)}var iA,yw,MB,uBe,nae=y(()=>{Ni();ot();Nt();AB();iA=new bf,yw=new ze(iA.createCasualConfiguration(!1)),MB=new ze(iA.createConfiguration(!0,!1)),uBe=new ze(iA.createCasualConfiguration(!0))});var vw,aae=y(()=>{Rd();vw=class extends na{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}}});function LB(n){let e=n.toLowerCase();return NB[e]!==void 0?NB[e]:e==="ein"||e==="einer"||e==="einem"||e==="einen"||e==="eine"?1:e.match(/wenigen/)?2:e.match(/halb/)||e.match(/halben/)?.5:e.match(/einigen/)?3:e.match(/mehreren/)?7:parseFloat(e)}function oae(n){if(/v/i.test(n))return-parseInt(n.replace(/[^0-9]+/gi,""));if(/n/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));if(/z/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));let e=parseInt(n);return Mi(e)}function dae(n){let e={},t=n,r=iae.exec(t);for(;r;)fBe(e,r),t=t.substring(r[0].length),r=iae.exec(t);return e}function fBe(n,e){let t=LB(e[1]),r=kw[e[2].toLowerCase()];n[r]=t}var RB,_B,NB,kw,FB,sae,lae,iae,cae,Cy=y(()=>{xt();mn();RB={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6},_B={januar:1,jänner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,märz:3,maerz:3,mär:3,"mär.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12},NB={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,fünf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zwölf:12,zwoelf:12},kw={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"},FB=`(?:${ie(NB)}|[0-9]+|[0-9]+\\.[0-9]+|halb?|halbe?|einigen?|wenigen?|mehreren?)`;sae="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";lae=`(${FB})\\s{0,5}(${ie(kw)})\\s{0,5}`,iae=new RegExp(lae,"i"),cae=li("",lae)});var hBe,gBe,yBe,vBe,Tw,uae=y(()=>{Cy();xt();we();tl();hBe=new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:ä|ae)chste[mn])\\s*)?(${ie(RB)})(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(diese|letzte|n(?:ä|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),gBe=1,yBe=3,vBe=2,Tw=class extends H{innerPattern(){return hBe}innerExtract(e,t){let r=t[vBe].toLowerCase(),a=RB[r],i=t[gBe],s=t[yBe],o=i||s;o=o||"",o=o.toLowerCase();let l=null;return o.match(/letzte/)?l="last":o.match(/chste/)?l="next":o.match(/diese/)&&(l="this"),In(e.reference,a,l)}}});var kBe,TBe,bBe,pae,mae,fae,bw,hae=y(()=>{Nt();kBe=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),TBe=new RegExp("^\\s*(\\-|\\–|\\~|\\〜|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),bBe=2,pae=3,mae=4,fae=5,bw=class n{pattern(e){return kBe}extract(e,t){let r=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(r.text.match(/^\d{4}$/)||(r.start=n.extractTimeComponent(r.start.clone(),t),!r.start))return t.index+=t[0].length,null;let a=e.text.substring(t.index+t[0].length),i=TBe.exec(a);return i&&(r.end=n.extractTimeComponent(r.start.clone(),i),r.end&&(r.text+=i[0])),r}static extractTimeComponent(e,t){let r=0,a=0,i=null;if(r=parseInt(t[bBe]),t[pae]!=null&&(a=parseInt(t[pae])),a>=60||r>24)return null;if(r>=12&&(i=j.PM),t[fae]!=null){if(r>12)return null;let s=t[fae].toLowerCase();s.match(/morgen|vormittag/)&&(i=j.AM,r==12&&(r=0)),s.match(/nachmittag|abend/)&&(i=j.PM,r!=12&&(r+=12)),s.match(/nacht/)&&(r==12?(i=j.AM,r=0):r<6?i=j.AM:(i=j.PM,r+=12))}if(e.assign("hour",r),e.assign("minute",a),i!==null?e.assign("meridiem",i):r<12?e.imply("meridiem",j.AM):e.imply("meridiem",j.PM),t[mae]!=null){let s=parseInt(t[mae]);if(s>=60)return null;e.assign("second",s)}return e}}});var ww,gae=y(()=>{Xs();ww=class extends jr{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}}});var Sw,yae=y(()=>{eo();Sw=class extends $r{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}}});var vae,wf,OB=y(()=>{vae=tt(Ht(),1);Nt();we();hs();vs();wf=class n extends H{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let r=(0,vae.default)(e.refDate),a=t[2].toLowerCase(),i=e.createParsingComponents();return $l(i,r),n.extractTimeComponents(i,a)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.PM);break;case"mitternacht":e.get("hour")>1&&(e=nA(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",j.AM);break}return e}}});var kae,wBe,SBe,CBe,Cw,Tae=y(()=>{kae=tt(Ht(),1);we();hs();OB();ys();wBe=new RegExp("(jetzt|heute|morgen|übermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),SBe=1,CBe=2,Cw=class extends H{innerPattern(e){return wBe}innerExtract(e,t){let r=(0,kae.default)(e.refDate),a=(t[SBe]||"").toLowerCase(),i=(t[CBe]||"").toLowerCase(),s=e.createParsingComponents();switch(a){case"jetzt":s=Ba(e.reference);break;case"heute":s=aa(e.reference);break;case"morgen":Xo(s,r);break;case"übermorgen":case"uebermorgen":r=r.add(1,"day"),Xo(s,r);break;case"gestern":r=r.add(-1,"day"),Mr(s,r),$l(s,r);break;case"vorgestern":r=r.add(-2,"day"),Mr(s,r),$l(s,r);break;default:a.match(/letzte\s*nacht/)&&(r.hour()>6&&(r=r.add(-1,"day")),Mr(s,r),s.imply("hour",0));break}return i&&(s=wf.extractTimeComponents(s,i)),s}}});var xBe,bae,wae,EBe,Sae,xw,Cae=y(()=>{mn();Cy();Cy();xt();we();xBe=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\–|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${ie(_B)})(?:(?:-|/|,?\\s*)(${sae}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),bae=1,wae=2,EBe=3,Sae=4,xw=class extends H{innerPattern(){return xBe}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=_B[t[EBe].toLowerCase()],i=parseInt(t[bae]);if(i>31)return t.index=t.index+t[bae].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[Sae]){let s=oae(t[Sae]);r.start.assign("year",s)}else{let s=er(e.refDate,i,a);r.start.imply("year",s)}if(t[wae]){let s=parseInt(t[wae]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var Ew,xae=y(()=>{Cy();ot();we();vs();xt();Ew=class extends H{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:nächste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${FB})?(?:\\s*(nächste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${ie(kw)})`,"i")}innerExtract(e,t){let r=t[2]?LB(t[2]):1,a=kw[t[4].toLowerCase()],i={};i[a]=r;let s=t[1]||t[3]||"";if(s=s.toLowerCase(),!!s)return(/vor/.test(s)||/letzte/.test(s)||/vergangen/.test(s))&&(i=Mn(i)),K.createRelativeFromReference(e.reference,i)}}});var Dw,Eae=y(()=>{Cy();ot();we();Dw=class extends H{innerPattern(){return new RegExp(`(?:in|für|während)\\s*(${cae})(?=\\W|$)`,"i")}innerExtract(e,t){let r=dae(t[1]);return K.createRelativeFromReference(e.reference,r)}}});var jB={};Xe(jB,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>zB,createCasualConfiguration:()=>Dae,createConfiguration:()=>BB,parse:()=>PBe,parseDate:()=>ABe,strict:()=>DBe});function PBe(n,e,t){return zB.parse(n,e,t)}function ABe(n,e,t){return zB.parseDate(n,e,t)}function Dae(n=!0){let e=BB(!1,n);return e.parsers.unshift(new wf),e.parsers.unshift(new Cw),e.parsers.unshift(new Ew),e}function BB(n=!0,e=!0){return Gr({parsers:[new Fd,new Hn(e),new vw,new bw,new xw,new Tw,new Dw],refiners:[new ww,new Sw]},n)}var zB,DBe,Pae=y(()=>{gs();Ni();ot();Nt();Ld();eA();aae();uae();hae();gae();yae();Tae();OB();Cae();xae();Eae();zB=new ze(Dae()),DBe=new ze(BB(!0))});var Aae,Pw,Mae=y(()=>{Aae=tt(Ht(),1);Nt();we();hs();ys();Pw=class extends H{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let r=(0,Aae.default)(e.refDate),a=t[0].toLowerCase(),i=e.createParsingComponents();switch(a){case"maintenant":return Ba(e.reference);case"aujourd'hui":return aa(e.reference);case"hier":return ja(e.reference);case"demain":return $a(e.reference);default:a.match(/cette\s*nuit/)?(Mr(i,r),i.imply("hour",22),i.imply("meridiem",j.PM)):a.match(/la\s*veille/)&&(r=r.add(-1,"day"),Mr(i,r),i.imply("hour",0))}return i}}});var Aw,Iae=y(()=>{Nt();we();Aw=class extends H{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let r=t[2].toLowerCase(),a=e.createParsingComponents();switch(r){case"après-midi":case"aprem":a.imply("hour",14),a.imply("minute",0),a.imply("meridiem",j.PM);break;case"soir":a.imply("hour",18),a.imply("minute",0),a.imply("meridiem",j.PM);break;case"matin":a.imply("hour",8),a.imply("minute",0),a.imply("meridiem",j.AM);break;case"a midi":a.imply("hour",12),a.imply("minute",0),a.imply("meridiem",j.AM);break;case"à minuit":a.imply("hour",0),a.imply("meridiem",j.AM);break}return a}}});var Mw,Nae=y(()=>{Rd();Mw=class extends na{primaryPrefix(){return"(?:(?:[àa])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|[àa]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}}});var Iw,Rae=y(()=>{eo();Iw=class extends $r{patternBetween(){return new RegExp("^\\s*(T|à|a|au|vers|de|,|-)?\\s*$")}}});var Nw,_ae=y(()=>{Xs();Nw=class extends jr{patternBetween(){return/^\s*(à|a|au|-)\s*$/i}}});function WB(n){let e=n.toLowerCase();return $B[e]!==void 0?$B[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}function GB(n){let e=n.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}function Oae(n){if(/AC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n)||/C/i.test(n))return n=n.replace(/[^\d]+/i,""),parseInt(n);let e=parseInt(n);return e<100&&(e>50?e=e+1900:e=e+2e3),e}function oA(n){let e={},t=n,r=Fae.exec(t);for(;r;)MBe(e,r),t=t.substring(r[0].length),r=Fae.exec(t);return e}function MBe(n,e){let t=WB(e[1]),r=Rw[e[2].toLowerCase()];n[r]=t}var UB,HB,$B,Rw,VB,qB,Lae,zae,Fae,sA,rp=y(()=>{xt();UB={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6},HB={janvier:1,jan:1,"jan.":1,février:2,fév:2,"fév.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,août:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,décembre:12,decembre:12,dec:12,"dec.":12},$B={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13},Rw={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",année:"year",années:"year"},VB=`(?:${ie($B)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;qB="(?:[0-9]{1,2}(?:er)?)";Lae="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";zae=`(${VB})\\s{0,5}(${ie(Rw)})\\s{0,5}`,Fae=new RegExp(zae,"i"),sA=li("",zae)});var IBe,NBe,RBe,_w,Bae=y(()=>{rp();xt();we();tl();IBe=new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:(?:ce)\\s*)?(${ie(UB)})(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),NBe=1,RBe=2,_w=class extends H{innerPattern(){return IBe}innerExtract(e,t){let r=t[NBe].toLowerCase(),a=UB[r];if(a===void 0)return null;let i=t[RBe];i=i||"",i=i.toLowerCase();let s=null;return i=="dernier"?s="last":i=="prochain"&&(s="next"),In(e.reference,a,s)}}});var _Be,FBe,LBe,jae,$ae,Uae,Fw,Hae=y(()=>{Nt();_Be=new RegExp("(^|\\s|T)(?:(?:[àa])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),FBe=new RegExp("^\\s*(\\-|\\–|\\~|\\〜|[àa]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),LBe=2,jae=3,$ae=4,Uae=5,Fw=class n{pattern(e){return _Be}extract(e,t){let r=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(r.text.match(/^\d{4}$/)||(r.start=n.extractTimeComponent(r.start.clone(),t),!r.start))return t.index+=t[0].length,null;let a=e.text.substring(t.index+t[0].length),i=FBe.exec(a);return i&&(r.end=n.extractTimeComponent(r.start.clone(),i),r.end&&(r.text+=i[0])),r}static extractTimeComponent(e,t){let r=0,a=0,i=null;if(r=parseInt(t[LBe]),t[jae]!=null&&(a=parseInt(t[jae])),a>=60||r>24)return null;if(r>=12&&(i=j.PM),t[Uae]!=null){if(r>12)return null;let s=t[Uae][0].toLowerCase();s=="a"&&(i=j.AM,r==12&&(r=0)),s=="p"&&(i=j.PM,r!=12&&(r+=12))}if(e.assign("hour",r),e.assign("minute",a),i!==null?e.assign("meridiem",i):r<12?e.imply("meridiem",j.AM):e.imply("meridiem",j.PM),t[$ae]!=null){let s=parseInt(t[$ae]);if(s>=60)return null;e.assign("second",s)}return e}}});var OBe,Vae,Wae,zBe,qae,Lw,Gae=y(()=>{mn();rp();rp();rp();xt();we();OBe=new RegExp(`(?:on\\s*?)?(${qB})(?:\\s*(?:au|\\-|\\–|jusqu'au?|\\s)\\s*(${qB}))?(?:-|/|\\s*(?:de)?\\s*)(${ie(HB)})(?:(?:-|/|,?\\s*)(${Lae}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Vae=1,Wae=2,zBe=3,qae=4,Lw=class extends H{innerPattern(){return OBe}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=HB[t[zBe].toLowerCase()],i=GB(t[Vae]);if(i>31)return t.index=t.index+t[Vae].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[qae]){let s=Oae(t[qae]);r.start.assign("year",s)}else{let s=er(e.refDate,i,a);r.start.imply("year",s)}if(t[Wae]){let s=GB(t[Wae]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var Ow,Yae=y(()=>{rp();ot();we();vs();Ow=class extends H{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${sA})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let r=oA(t[1]),a=Mn(r);return K.createRelativeFromReference(e.reference,a)}}});var zw,Kae=y(()=>{rp();ot();we();zw=class extends H{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${sA})(?=\\W|$)`,"i")}innerExtract(e,t){let r=oA(t[1]);return K.createRelativeFromReference(e.reference,r)}}});var Bw,Zae=y(()=>{rp();ot();we();vs();xt();Bw=class extends H{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${VB})?(?:\\s*(prochaine?s?|derni[eè]re?s?|pass[ée]e?s?|pr[ée]c[ée]dents?|suivante?s?))?\\s*(${ie(Rw)})(?:\\s*(prochaine?s?|derni[eè]re?s?|pass[ée]e?s?|pr[ée]c[ée]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let r=t[1]?WB(t[1]):1,a=Rw[t[3].toLowerCase()],i={};i[a]=r;let s=t[2]||t[4]||"";if(s=s.toLowerCase(),!!s)return(/derni[eè]re?s?/.test(s)||/pass[ée]e?s?/.test(s)||/pr[ée]c[ée]dents?/.test(s))&&(i=Mn(i)),K.createRelativeFromReference(e.reference,i)}}});var ZB={};Xe(ZB,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>YB,createCasualConfiguration:()=>Qae,createConfiguration:()=>KB,parse:()=>jBe,parseDate:()=>$Be,strict:()=>BBe});function jBe(n,e,t){return YB.parse(n,e,t)}function $Be(n,e,t){return YB.parseDate(n,e,t)}function Qae(n=!0){let e=KB(!1,n);return e.parsers.unshift(new Pw),e.parsers.unshift(new Aw),e.parsers.unshift(new Bw),e}function KB(n=!0,e=!0){return Gr({parsers:[new Hn(e),new Lw,new Mw,new Fw,new Ow,new zw,new _w],refiners:[new Iw,new Nw]},n)}var YB,BBe,Jae=y(()=>{gs();Ni();ot();Nt();Mae();Iae();Ld();Nae();Rae();_ae();Bae();Hae();Gae();Yae();Kae();Zae();YB=new ze(Qae()),BBe=new ze(KB(!0))});function ci(n){return String(n).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"¥").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,UBe)}function UBe(n){return String.fromCharCode(n.charCodeAt(0)-65248)}function Sf(n){let e=0;for(let t=0;t<n.length;t++){let r=n[t];r==="十"?e=e===0?Hl[r]:e*Hl[r]:e+=Hl[r]}return e}var Hl,xy,Ey=y(()=>{Hl={零:0,"〇":0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9,十:10},xy={日:0,月:1,火:2,水:3,木:4,金:5,土:6}});var eie,HBe,Xae,VBe,QB,WBe,qBe,GBe,jw,tie=y(()=>{Ey();mn();eie=tt(Ht(),1),HBe=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Xae=1,VBe=2,QB=3,WBe=4,qBe=5,GBe=6,jw=class{pattern(){return HBe}extract(e,t){let r=parseInt(ci(t[qBe])),a=parseInt(ci(t[GBe])),i=e.createParsingComponents({day:a,month:r});if(t[Xae]&&t[Xae].match("同|今|本")){let s=(0,eie.default)(e.refDate);i.assign("year",s.year())}if(t[VBe]){let s=t[WBe],o=s=="元"?1:parseInt(ci(s));t[QB]=="令和"?o+=2018:t[QB]=="平成"?o+=1988:t[QB]=="昭和"&&(o+=1925),i.assign("year",o)}else{let s=er(e.refDate,a,r);i.imply("year",s)}return i}}});var $w,rie=y(()=>{Xs();$w=class extends jr{patternBetween(){return/^\s*(から|-|ー|-|~|~)\s*$/i}}});function KBe(n){switch(n){case"きょう":return"今日";case"ほんじつ":return"本日";case"きのう":return"昨日";case"あした":return"明日";case"こんや":return"今夜";case"こんゆう":return"今夕";case"こんばん":return"今晩";case"けさ":return"今朝";default:return n}}var nie,YBe,Uw,aie=y(()=>{nie=tt(Ht(),1);Nt();ys();YBe=/今日|きょう|本日|ほんじつ|昨日|きのう|明日|あした|今夜|こんや|今夕|こんゆう|今晩|こんばん|今朝|けさ/i;Uw=class{pattern(){return YBe}extract(e,t){let r=KBe(t[0]),a=(0,nie.default)(e.refDate),i=e.createParsingComponents();switch(r){case"昨日":return ja(e.reference);case"明日":return $a(e.reference);case"本日":case"今日":return aa(e.reference)}return r=="今夜"||r=="今夕"||r=="今晩"?(i.imply("hour",22),i.assign("meridiem",j.PM)):r.match("今朝")&&(i.imply("hour",6),i.assign("meridiem",j.AM)),i.assign("day",a.date()),i.assign("month",a.month()+1),i.assign("year",a.year()),i}}});var ZBe,Hw,iie=y(()=>{Ey();tl();ZBe=new RegExp("((?<prefix>前の|次の|今週))?(?<weekday>"+Object.keys(xy).join("|")+")(?:曜日|曜)","i"),Hw=class{pattern(){return ZBe}extract(e,t){let r=t.groups.weekday,a=xy[r];if(a===void 0)return null;let i=t.groups.prefix||"",s=null;return i.match(/前の/)?s="last":i.match(/次の/)?s="next":i.match(/今週/)&&(s="this"),In(e.reference,a,s)}}});var QBe,sie,JBe,XBe,Vw,oie=y(()=>{mn();Ey();QBe=new RegExp("([0-90-9]{4}[\\/|\\/])?([0-10-1]{0,1}[0-90-9]{1})(?:[\\/|\\/]([0-30-3]{0,1}[0-90-9]{1}))","i"),sie=1,JBe=2,XBe=3,Vw=class{pattern(){return QBe}extract(e,t){let r=e.createParsingComponents(),a=parseInt(ci(t[JBe])),i=parseInt(ci(t[XBe]));if(a<1||a>12||i<1||i>31)return null;if(r.assign("day",i),r.assign("month",a),t[sie]){let s=parseInt(ci(t[sie])),o=Mi(s);r.assign("year",o)}else{let s=er(e.reference.instant,i,a);r.imply("year",s)}return r}}});var eje,tje,lA,cA,np,Dy,dA,Ww,lie=y(()=>{we();Nt();Ey();eje=new RegExp("(?:(午前|午後|A.M.|P.M.|AM|PM))?(?:[\\s,,、]*)(?:([0-90-9]+|["+Object.keys(Hl).join("")+"]+)(?:\\s*)(?:時|:|:)(?:\\s*)([0-90-9]+|半|["+Object.keys(Hl).join("")+"]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)([0-90-9]+|["+Object.keys(Hl).join("")+"]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),tje=new RegExp("(?:^\\s*(?:から|\\-|\\–|\\-|\\~|\\〜)\\s*)(?:(午前|午後|A.M.|P.M.|AM|PM))?(?:[\\s,,、]*)(?:([0-90-9]+|["+Object.keys(Hl).join("")+"]+)(?:\\s*)(?:時|:|:)(?:\\s*)([0-90-9]+|半|["+Object.keys(Hl).join("")+"]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)([0-90-9]+|["+Object.keys(Hl).join("")+"]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),lA=1,cA=2,np=3,Dy=4,dA=5,Ww=class extends H{innerPattern(){return eje}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let r=e.createParsingResult(t.index,t[0]),a=0,i=0,s=-1;if(t[Dy]){let o=parseInt(ci(t[Dy]));if(isNaN(o)&&(o=Sf(t[Dy])),o>=60)return null;r.start.assign("second",o)}if(a=parseInt(ci(t[cA])),isNaN(a)&&(a=Sf(t[cA])),t[np]?t[np]==="半"?i=30:(i=parseInt(ci(t[np])),isNaN(i)&&(i=Sf(t[np]))):a>100&&(i=a%100,a=Math.floor(a/100)),i>=60||a>24)return null;if(a>=12&&(s=j.PM),t[lA]){if(a>12)return null;let o=t[lA],l=o[0].toLowerCase();o==="午前"||l==="a"?(s=j.AM,a===12&&(a=0)):(o==="午後"||l==="p")&&(s=j.PM,a!=12&&(a+=12))}else if(t[dA]){if(a>12)return null;let o=t[dA][0].toLowerCase();o==="a"&&(s=j.AM,a===12&&(a=0)),o==="p"&&(s=j.PM,a!=12&&(a+=12))}if(r.start.assign("hour",a),r.start.assign("minute",i),s>=0?r.start.assign("meridiem",s):a<12?r.start.imply("meridiem",0):r.start.imply("meridiem",1),t=tje.exec(e.text.substring(r.index+r.text.length)),!t)return r.text.match(/^\d+$/)?null:r;if(r.end=e.createParsingComponents(),a=0,i=0,s=-1,t[Dy]){let o=parseInt(ci(t[Dy]));if(isNaN(o)&&(o=Sf(t[Dy])),o>=60)return null;r.end.assign("second",o)}if(a=parseInt(ci(t[cA])),isNaN(a)&&(a=Sf(t[cA])),t[np]?t[np]==="半"?i=30:(i=parseInt(ci(t[np])),isNaN(i)&&(i=Sf(t[np]))):a>100&&(i=a%100,a=Math.floor(a/100)),i>=60||a>24)return null;if(a>=12&&(s=j.PM),t[lA]){if(a>12)return null;let o=t[lA],l=o[0].toLowerCase();o==="午前"||l==="a"?(s=j.AM,a===12&&(a=0)):(o==="午後"||l==="p")&&(s=j.PM,a!=12&&(a+=12)),r.start.isCertain("meridiem")||(s===j.AM?(r.start.imply("meridiem",j.AM),r.start.get("hour")===12&&r.start.assign("hour",0)):(r.start.imply("meridiem",1),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}else if(t[dA]){if(a>12)return null;let o=t[dA][0].toLowerCase();o==="a"&&(s=j.AM,a===12&&(a=0)),o==="p"&&(s=j.PM,a!=12&&(a+=12))}return r.text=r.text+t[0],r.end.assign("hour",a),r.end.assign("minute",i),s>=0?r.end.assign("meridiem",s):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>a?r.end.imply("meridiem",j.AM):a<=12&&(r.end.assign("hour",a+12),r.end.assign("meridiem",j.PM)):a>12?r.end.imply("meridiem",j.PM):a<=12&&r.end.imply("meridiem",j.AM),r.end.date().getTime()<r.start.date().getTime()&&r.end.imply("day",r.end.get("day")+1),r}}});var qw,cie=y(()=>{eo();qw=class extends $r{patternBetween(){return/^\s*(の)?\s*$/i}}});var Gw,die=y(()=>{_d();Gw=class extends Ii{mergeResults(e,t,r){let a=t.clone();return a.text=t.text+e+r.text,a.start.assign("weekday",r.start.get("weekday")),a.end&&a.end.assign("weekday",r.start.get("weekday")),a}shouldMergeResults(e,t,r){return t.start.isCertain("day")&&r.start.isOnlyWeekdayComponent()&&!r.start.isCertain("hour")&&e.match(/^[,、の]?\s*$/)!==null}}});var rje,Yw,uie=y(()=>{Ey();tl();rje=new RegExp("(?:\\(|\\()(?<weekday>"+Object.keys(xy).join("|")+")(?:\\)|\\))","i"),Yw=class{pattern(){return rje}extract(e,t){let r=t.groups.weekday,a=xy[r];return a===void 0?null:In(e.reference,a)}}});var ej={};Xe(ej,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>JB,createCasualConfiguration:()=>pie,createConfiguration:()=>XB,parse:()=>aje,parseDate:()=>ije,strict:()=>nje});function aje(n,e,t){return JB.parse(n,e,t)}function ije(n,e,t){return JB.parseDate(n,e,t)}function pie(){let n=XB(!1);return n.parsers.unshift(new Uw),n}function XB(n=!0){let e=Gr({parsers:[new jw,new Hw,new Yw,new Vw,new Ww],refiners:[new Gw,new qw,new $w]},n);return e.refiners=e.refiners.filter(t=>!(t instanceof vf)),e}var JB,nje,mie=y(()=>{tie();rie();aie();iie();oie();lie();cie();Ni();ot();Nt();die();uie();gs();DB();JB=new ze(pie()),nje=new ze(XB(!0))});function hie(n){if(n.match(/^[0-9]{1,4}$/)){let e=parseInt(n);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}var tj,rj,fie,uA=y(()=>{tj={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,terça:2,"terça-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,sábado:6,sabado:6,sab:6},rj={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,março:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12},fie="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?"});var sje,oje,lje,cje,Kw,gie=y(()=>{uA();xt();we();tl();sje=new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:(este|esta|passado|pr[oó]ximo)\\s*)?(${ie(tj)})(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(este|esta|passado|pr[óo]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),oje=1,lje=2,cje=3,Kw=class extends H{innerPattern(){return sje}innerExtract(e,t){let r=t[lje].toLowerCase(),a=tj[r];if(a===void 0)return null;let i=t[oje],s=t[cje],o=i||s||"";o=o.toLowerCase();let l=null;return o=="passado"?l="this":o=="próximo"||o=="proximo"?l="next":o=="este"&&(l="this"),In(e.reference,a,l)}}});var Zw,yie=y(()=>{Rd();Zw=class extends na{primaryPrefix(){return"(?:(?:ao?|às?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|a(?:o)?|\\?)\\s*"}}});var Qw,vie=y(()=>{eo();Qw=class extends $r{patternBetween(){return new RegExp("^\\s*(?:,|à)?\\s*$")}}});var Jw,kie=y(()=>{Xs();Jw=class extends jr{patternBetween(){return/^\s*(?:-)\s*$/i}}});var dje,Tie,bie,uje,wie,Xw,Sie=y(()=>{mn();uA();uA();xt();we();dje=new RegExp(`([0-9]{1,2})(?:º|ª|°)?(?:\\s*(?:desde|de|\\-|\\–|ao?|\\s)\\s*([0-9]{1,2})(?:º|ª|°)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${ie(rj)})(?:\\s*(?:de|,)?\\s*(${fie}))?(?=\\W|$)`,"i"),Tie=1,bie=2,uje=3,wie=4,Xw=class extends H{innerPattern(){return dje}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=rj[t[uje].toLowerCase()],i=parseInt(t[Tie]);if(i>31)return t.index=t.index+t[Tie].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[wie]){let s=hie(t[wie]);r.start.assign("year",s)}else{let s=er(e.refDate,i,a);r.start.imply("year",s)}if(t[bie]){let s=parseInt(t[bie]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var eS,Cie=y(()=>{we();ys();eS=class extends H{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let r=t[0].toLowerCase(),a=e.createParsingComponents();switch(r){case"agora":return Ba(e.reference);case"hoje":return aa(e.reference);case"amanha":case"amanhã":return $a(e.reference);case"ontem":return ja(e.reference)}return a}}});var xie,tS,Eie=y(()=>{Nt();we();hs();xie=tt(Ht(),1),tS=class extends H{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let r=(0,xie.default)(e.refDate),a=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":a.imply("meridiem",j.PM),a.imply("hour",15);break;case"noite":a.imply("meridiem",j.PM),a.imply("hour",22);break;case"manha":case"manhã":a.imply("meridiem",j.AM),a.imply("hour",6);break;case"meia-noite":Xo(a,r),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"meio-dia":a.imply("meridiem",j.AM),a.imply("hour",12);break}return a}}});var ij={};Xe(ij,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>nj,createCasualConfiguration:()=>Die,createConfiguration:()=>aj,parse:()=>mje,parseDate:()=>fje,strict:()=>pje});function mje(n,e,t){return nj.parse(n,e,t)}function fje(n,e,t){return nj.parseDate(n,e,t)}function Die(n=!0){let e=aj(!1,n);return e.parsers.push(new eS),e.parsers.push(new tS),e}function aj(n=!0,e=!0){return Gr({parsers:[new Hn(e),new Kw,new Zw,new Xw],refiners:[new Qw,new Jw]},n)}var nj,pje,Pie=y(()=>{gs();Ni();ot();Nt();Ld();gie();yie();vie();kie();Sie();Cie();Eie();nj=new ze(Die()),pje=new ze(aj(!0))});var rS,Aie=y(()=>{Xs();rS=class extends jr{patternBetween(){return/^\s*(tot|-)\s*$/i}}});var nS,Mie=y(()=>{eo();nS=class extends $r{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}}});var aS,Iie=y(()=>{we();ys();aS=class extends H{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let r=t[0].toLowerCase(),a=e.createParsingComponents();switch(r){case"nu":return Ba(e.reference);case"vandaag":return aa(e.reference);case"morgen":case"morgend":return $a(e.reference);case"gisteren":return ja(e.reference)}return a}}});var Nie,hje,gje,iS,Rie=y(()=>{Nt();we();Nie=tt(Ht(),1);hs();hje=1,gje=2,iS=class extends H{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let r=(0,Nie.default)(e.refDate),a=e.createParsingComponents();switch(t[hje]==="deze"&&(a.assign("day",e.refDate.getDate()),a.assign("month",e.refDate.getMonth()+1),a.assign("year",e.refDate.getFullYear())),t[gje].toLowerCase()){case"namiddag":case"'s namiddags":a.imply("meridiem",j.PM),a.imply("hour",15);break;case"avond":case"'s avonds'":a.imply("meridiem",j.PM),a.imply("hour",20);break;case"middernacht":Xo(a,r),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"ochtend":case"'s ochtends":a.imply("meridiem",j.AM),a.imply("hour",6);break;case"middag":case"'s middags":a.imply("meridiem",j.AM),a.imply("hour",12);break}return a}}});function vje(n){let e=n.toLowerCase();return sj[e]!==void 0?sj[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}function dj(n){let e=n.toLowerCase();return oj[e]!==void 0?oj[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}function mA(n){if(/voor Christus/i.test(n))return n=n.replace(/voor Christus/i,""),-parseInt(n);if(/na Christus/i.test(n))return n=n.replace(/na Christus/i,""),parseInt(n);let e=parseInt(n);return Mi(e)}function ap(n){let e={},t=n,r=_ie.exec(t);for(;r;)kje(e,r),t=t.substring(r[0].length),r=_ie.exec(t);return e}function kje(n,e){let t=vje(e[1]),r=sS[e[2].toLowerCase()];n[r]=t}var lj,Od,sj,oj,sS,yje,cj,pA,Fie,_ie,Vl,ks=y(()=>{xt();mn();lj={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6},Od={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,mrt:3,"mrt.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12},sj={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12},oj={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,tweeëntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31},sS={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"},yje=`(?:${ie(sj)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;cj=`(?:${ie(oj)}|[0-9]{1,2}(?:ste|de)?)`;pA="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";Fie=`(${yje})\\s{0,5}(${ie(sS)})\\s{0,5}`,_ie=new RegExp(Fie,"i"),Vl=li("(?:(?:binnen|in)\\s*)?",Fie)});var oS,Lie=y(()=>{ks();ot();we();oS=class extends H{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Vl+")(?=\\W|$)","i")}innerExtract(e,t){let r=ap(t[1]);return K.createRelativeFromReference(e.reference,r)}}});var Tje,bje,wje,Sje,lS,Oie=y(()=>{ks();xt();we();tl();Tje=new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${ie(lj)})(?=\\W|$)`,"i"),bje=1,wje=2,Sje=3,lS=class extends H{innerPattern(){return Tje}innerExtract(e,t){let r=t[wje].toLowerCase(),a=lj[r],i=t[bje],s=t[Sje],o=i||s;o=o||"",o=o.toLowerCase();let l=null;return o=="vorige"?l="last":o=="volgende"?l="next":o=="deze"&&(l="this"),In(e.reference,a,l)}}});var Cje,xje,zie,Bie,jie,cS,$ie=y(()=>{mn();ks();ks();ks();xt();we();Cje=new RegExp(`(?:on\\s*?)?(${cj})(?:\\s*(?:tot|\\-|\\–|until|through|till|\\s)\\s*(${cj}))?(?:-|/|\\s*(?:of)?\\s*)(`+ie(Od)+`)(?:(?:-|/|,?\\s*)(${pA}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),xje=3,zie=1,Bie=2,jie=4,cS=class extends H{innerPattern(){return Cje}innerExtract(e,t){let r=Od[t[xje].toLowerCase()],a=dj(t[zie]);if(a>31)return t.index=t.index+t[zie].length,null;let i=e.createParsingComponents({day:a,month:r});if(t[jie]){let l=mA(t[jie]);i.assign("year",l)}else{let l=er(e.refDate,a,r);i.imply("year",l)}if(!t[Bie])return i;let s=dj(t[Bie]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign("day",s),o}}});var Eje,Dje,Uie,Py,Hie=y(()=>{ks();mn();xt();ks();we();Eje=new RegExp(`(${ie(Od)})\\s*(?:[,-]?\\s*(${pA})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Dje=1,Uie=2,Py=class extends H{innerPattern(){return Eje}innerExtract(e,t){let r=e.createParsingComponents();r.imply("day",1);let a=t[Dje],i=Od[a.toLowerCase()];if(r.assign("month",i),t[Uie]){let s=mA(t[Uie]);r.assign("year",s)}else{let s=er(e.refDate,1,i);r.imply("year",s)}return r}}});var Pje,Aje,Mje,dS,Vie=y(()=>{we();Pje=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Aje=1,Mje=2,dS=class extends H{innerPattern(){return Pje}innerExtract(e,t){let r=parseInt(t[Mje]),a=parseInt(t[Aje]);return e.createParsingComponents().imply("day",1).assign("month",a).assign("year",r)}}});var uS,Wie=y(()=>{Rd();uS=class extends na{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}}});var Ije,Nje,Rje,qie,_je,pS,Gie=y(()=>{ks();xt();we();Ije=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${ie(Od)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Nje=1,Rje=2,qie=3,_je=4,pS=class extends H{innerPattern(){return Ije}innerExtract(e,t){let r=t[qie]?parseInt(t[qie]):Od[t[Rje].toLowerCase()];if(r<1||r>12)return null;let a=parseInt(t[Nje]);return{day:parseInt(t[_je]),month:r,year:a}}}});var Yie,Fje,Lje,mS,Kie=y(()=>{we();Nt();hs();Yie=tt(Ht(),1),Fje=1,Lje=2,mS=class extends H{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let r=t[Fje].toLowerCase(),a=t[Lje].toLowerCase(),i=e.createParsingComponents(),s=(0,Yie.default)(e.refDate);switch(r){case"gisteren":Mr(i,s.add(-1,"day"));break;case"van":Mr(i,s);break;case"morgen":Xo(i,s);break}switch(a){case"ochtend":i.imply("meridiem",j.AM),i.imply("hour",6);break;case"middag":i.imply("meridiem",j.AM),i.imply("hour",12);break;case"namiddag":i.imply("meridiem",j.PM),i.imply("hour",15);break;case"avond":i.imply("meridiem",j.PM),i.imply("hour",20);break}return i}}});var Oje,zje,Bje,fS,Zie=y(()=>{ks();ot();we();vs();Oje=new RegExp(`(dit|deze|vorig|afgelopen|(?:aan)?komend|over|\\+|-)e?\\s*(${Vl})(?=\\W|$)`,"i"),zje=1,Bje=2,fS=class extends H{innerPattern(){return Oje}innerExtract(e,t){let r=t[zje].toLowerCase(),a=ap(t[Bje]);switch(r){case"vorig":case"afgelopen":case"-":a=Mn(a);break}return K.createRelativeFromReference(e.reference,a)}}});var Qie,jje,$je,Uje,hS,Jie=y(()=>{ks();ot();Qie=tt(Ht(),1);we();xt();jje=new RegExp(`(dit|deze|(?:aan)?komend|volgend|afgelopen|vorig)e?\\s*(${ie(sS)})(?=\\s*)(?=\\W|$)`,"i"),$je=1,Uje=2,hS=class extends H{innerPattern(){return jje}innerExtract(e,t){let r=t[$je].toLowerCase(),a=t[Uje].toLowerCase(),i=sS[a];if(r=="volgend"||r=="komend"||r=="aankomend"){let l={};return l[i]=1,K.createRelativeFromReference(e.reference,l)}if(r=="afgelopen"||r=="vorig"){let l={};return l[i]=-1,K.createRelativeFromReference(e.reference,l)}let s=e.createParsingComponents(),o=(0,Qie.default)(e.reference.instant);return a.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):a.match(/maand/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):a.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var Hje,Vje,gS,Xie=y(()=>{ks();ot();we();vs();Hje=new RegExp("("+Vl+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),Vje=new RegExp("("+Vl+")geleden(?=(?:\\W|$))","i"),gS=class extends H{constructor(t){super();z(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?Vje:Hje}innerExtract(t,r){let a=ap(r[1]),i=Mn(a);return K.createRelativeFromReference(t.reference,i)}}});var Wje,qje,Gje,yS,ese=y(()=>{ks();ot();we();Wje=new RegExp("("+Vl+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),qje=new RegExp("("+Vl+")(later|vanaf nu)(?=(?:\\W|$))","i"),Gje=1,yS=class extends H{constructor(t){super();z(this,"strictMode");this.strictMode=t}innerPattern(){return this.strictMode?qje:Wje}innerExtract(t,r){let a=ap(r[Gje]);return K.createRelativeFromReference(t.reference,a)}}});var mj={};Xe(mj,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>uj,createCasualConfiguration:()=>tse,createConfiguration:()=>pj,parse:()=>Kje,parseDate:()=>Zje,strict:()=>Yje});function Kje(n,e,t){return uj.parse(n,e,t)}function Zje(n,e,t){return uj.parseDate(n,e,t)}function tse(n=!0){let e=pj(!1,n);return e.parsers.unshift(new aS),e.parsers.unshift(new iS),e.parsers.unshift(new mS),e.parsers.unshift(new Py),e.parsers.unshift(new hS),e.parsers.unshift(new fS),e}function pj(n=!0,e=!0){return Gr({parsers:[new Hn(e),new oS,new cS,new Py,new lS,new pS,new dS,new uS(n),new gS(n),new yS(n)],refiners:[new nS,new rS]},n)}var uj,Yje,rse=y(()=>{gs();Ni();ot();Nt();Aie();Mie();Iie();Rie();Ld();Lie();Oie();$ie();Hie();Vie();Wie();Gie();Kie();Zie();Jie();Xie();ese();uj=new ze(tse()),Yje=new ze(pj(!0))});function ro(n){let e=0;for(let t=0;t<n.length;t++){let r=n[t];r==="十"?e=e===0?ia[r]:e*ia[r]:e+=ia[r]}return e}function nse(n){let e="";for(let t=0;t<n.length;t++){let r=n[t];e=e+ia[r]}return parseInt(e)}var ia,Ay,My=y(()=>{ia={零:0,"〇":0,一:1,二:2,两:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9,十:10},Ay={天:0,日:0,一:1,二:2,三:3,四:4,五:5,六:6}});var ise,fj,ase,hj,Cf,gj=y(()=>{ise=tt(Ht(),1);we();My();fj=1,ase=2,hj=3,Cf=class extends H{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ia).join("")+"]{4}|["+Object.keys(ia).join("")+"]{2})?(?:\\s*)(?:年)?(?:[\\s|,|,]*)(\\d{1,2}|["+Object.keys(ia).join("")+"]{1,3})(?:\\s*)(?:月)(?:\\s*)(\\d{1,2}|["+Object.keys(ia).join("")+"]{1,3})?(?:\\s*)(?:日|号)?")}innerExtract(e,t){let r=(0,ise.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),i=parseInt(t[ase]);if(isNaN(i)&&(i=ro(t[ase])),a.start.assign("month",i),t[hj]){let s=parseInt(t[hj]);isNaN(s)&&(s=ro(t[hj])),a.start.assign("day",s)}else a.start.imply("day",r.date());if(t[fj]){let s=parseInt(t[fj]);isNaN(s)&&(s=nse(t[fj])),a.start.assign("year",s)}else a.start.imply("year",r.year());return a}}});var sse,Qje,yj,Jje,xf,vj=y(()=>{sse=tt(Ht(),1);we();My();Qje=new RegExp("(\\d+|["+Object.keys(ia).join("")+"]+|半|几)(?:\\s*)(?:个)?(秒(?:钟)?|分钟|小时|钟|日|天|星期|礼拜|月|年)(?:(?:之|过)?后|(?:之)?内)","i"),yj=1,Jje=2,xf=class extends H{innerPattern(){return Qje}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=parseInt(t[yj]);if(isNaN(a)&&(a=ro(t[yj])),isNaN(a)){let l=t[yj];if(l==="几")a=3;else if(l==="半")a=.5;else return null}let i=(0,sse.default)(e.refDate),o=t[Jje][0];return o.match(/[日天星礼月年]/)?(o=="日"||o=="天"?i=i.add(a,"d"):o=="星"||o=="礼"?i=i.add(a*7,"d"):o=="月"?i=i.add(a,"month"):o=="年"&&(i=i.add(a,"year")),r.start.assign("year",i.year()),r.start.assign("month",i.month()+1),r.start.assign("day",i.date()),r):(o=="秒"?i=i.add(a,"second"):o=="分"?i=i.add(a,"minute"):(o=="小"||o=="钟")&&(i=i.add(a,"hour")),r.start.imply("year",i.year()),r.start.imply("month",i.month()+1),r.start.imply("day",i.date()),r.start.assign("hour",i.hour()),r.start.assign("minute",i.minute()),r.start.assign("second",i.second()),r)}}});var ose,Xje,Ef,kj=y(()=>{ose=tt(Ht(),1);we();My();Xje=new RegExp("(?<prefix>上|下|这)(?:个)?(?:星期|礼拜|周)(?<weekday>"+Object.keys(Ay).join("|")+")"),Ef=class extends H{innerPattern(){return Xje}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,i=Ay[a];if(i===void 0)return null;let s=null,o=t.groups.prefix;o=="上"?s="last":o=="下"?s="next":o=="这"&&(s="this");let l=(0,ose.default)(e.refDate),c=!1,d=l.day();return s=="last"||s=="past"?(l=l.day(i-7),c=!0):s=="next"?(l=l.day(i+7),c=!0):s=="this"?l=l.day(i):Math.abs(i-7-d)<Math.abs(i-d)?l=l.day(i-7):Math.abs(i+7-d)<Math.abs(i-d)?l=l.day(i+7):l=l.day(i),r.start.assign("weekday",i),c?(r.start.assign("day",l.date()),r.start.assign("month",l.month()+1),r.start.assign("year",l.year())):(r.start.imply("day",l.date()),r.start.imply("month",l.month()+1),r.start.imply("year",l.year())),r}}});var lse,e$e,t$e,fA,hA,gA,yA,vA,kA,no,Iy,TA,Df,Tj=y(()=>{lse=tt(Ht(),1);we();My();e$e=new RegExp("(?:从|自)?(?:(今|明|前|大前|后|大后|昨)(早|朝|晚)|(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|后|大后|昨)(?:日|天)(?:[\\s,,]*)(?:(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|["+Object.keys(ia).join("")+"]+)(?:\\s*)(?:点|时|:|:)(?:\\s*)(\\d+|半|正|整|["+Object.keys(ia).join("")+"]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|["+Object.keys(ia).join("")+"]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),t$e=new RegExp("(?:^\\s*(?:到|至|\\-|\\–|\\~|\\〜)\\s*)(?:(今|明|前|大前|后|大后|昨)(早|朝|晚)|(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|后|大后|昨)(?:日|天)(?:[\\s,,]*)(?:(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|["+Object.keys(ia).join("")+"]+)(?:\\s*)(?:点|时|:|:)(?:\\s*)(\\d+|半|正|整|["+Object.keys(ia).join("")+"]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|["+Object.keys(ia).join("")+"]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),fA=1,hA=2,gA=3,yA=4,vA=5,kA=6,no=7,Iy=8,TA=9,Df=class extends H{innerPattern(){return e$e}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let r=(0,lse.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),i=r.clone();if(t[fA]){let d=t[fA];d=="明"?r.hour()>1&&(i=i.add(1,"day")):d=="昨"?i=i.add(-1,"day"):d=="前"?i=i.add(-2,"day"):d=="大前"?i=i.add(-3,"day"):d=="后"?i=i.add(2,"day"):d=="大后"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else if(t[yA]){let d=t[yA];d=="明"?i=i.add(1,"day"):d=="昨"?i=i.add(-1,"day"):d=="前"?i=i.add(-2,"day"):d=="大前"?i=i.add(-3,"day"):d=="后"?i=i.add(2,"day"):d=="大后"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else a.start.imply("day",i.date()),a.start.imply("month",i.month()+1),a.start.imply("year",i.year());let s=0,o=0,l=-1;if(t[Iy]){let d=parseInt(t[Iy]);if(isNaN(d)&&(d=ro(t[Iy])),d>=60)return null;a.start.assign("second",d)}if(s=parseInt(t[kA]),isNaN(s)&&(s=ro(t[kA])),t[no]?t[no]=="半"?o=30:t[no]=="正"||t[no]=="整"?o=0:(o=parseInt(t[no]),isNaN(o)&&(o=ro(t[no]))):s>100&&(o=s%100,s=Math.floor(s/100)),o>=60||s>24)return null;if(s>=12&&(l=1),t[TA]){if(s>12)return null;let d=t[TA][0].toLowerCase();d=="a"&&(l=0,s==12&&(s=0)),d=="p"&&(l=1,s!=12&&(s+=12))}else if(t[hA]){let u=t[hA][0];u=="早"?(l=0,s==12&&(s=0)):u=="晚"&&(l=1,s!=12&&(s+=12))}else if(t[gA]){let u=t[gA][0];u=="上"||u=="早"||u=="凌"?(l=0,s==12&&(s=0)):(u=="下"||u=="晚")&&(l=1,s!=12&&(s+=12))}else if(t[vA]){let u=t[vA][0];u=="上"||u=="早"||u=="凌"?(l=0,s==12&&(s=0)):(u=="下"||u=="晚")&&(l=1,s!=12&&(s+=12))}if(a.start.assign("hour",s),a.start.assign("minute",o),l>=0?a.start.assign("meridiem",l):s<12?a.start.imply("meridiem",0):a.start.imply("meridiem",1),t=t$e.exec(e.text.substring(a.index+a.text.length)),!t)return a.text.match(/^\d+$/)?null:a;let c=i.clone();if(a.end=e.createParsingComponents(),t[fA]){let d=t[fA];d=="明"?r.hour()>1&&(c=c.add(1,"day")):d=="昨"?c=c.add(-1,"day"):d=="前"?c=c.add(-2,"day"):d=="大前"?c=c.add(-3,"day"):d=="后"?c=c.add(2,"day"):d=="大后"&&(c=c.add(3,"day")),a.end.assign("day",c.date()),a.end.assign("month",c.month()+1),a.end.assign("year",c.year())}else if(t[yA]){let d=t[yA];d=="明"?c=c.add(1,"day"):d=="昨"?c=c.add(-1,"day"):d=="前"?c=c.add(-2,"day"):d=="大前"?c=c.add(-3,"day"):d=="后"?c=c.add(2,"day"):d=="大后"&&(c=c.add(3,"day")),a.end.assign("day",c.date()),a.end.assign("month",c.month()+1),a.end.assign("year",c.year())}else a.end.imply("day",c.date()),a.end.imply("month",c.month()+1),a.end.imply("year",c.year());if(s=0,o=0,l=-1,t[Iy]){let d=parseInt(t[Iy]);if(isNaN(d)&&(d=ro(t[Iy])),d>=60)return null;a.end.assign("second",d)}if(s=parseInt(t[kA]),isNaN(s)&&(s=ro(t[kA])),t[no]?t[no]=="半"?o=30:t[no]=="正"||t[no]=="整"?o=0:(o=parseInt(t[no]),isNaN(o)&&(o=ro(t[no]))):s>100&&(o=s%100,s=Math.floor(s/100)),o>=60||s>24)return null;if(s>=12&&(l=1),t[TA]){if(s>12)return null;let d=t[TA][0].toLowerCase();d=="a"&&(l=0,s==12&&(s=0)),d=="p"&&(l=1,s!=12&&(s+=12)),a.start.isCertain("meridiem")||(l==0?(a.start.imply("meridiem",0),a.start.get("hour")==12&&a.start.assign("hour",0)):(a.start.imply("meridiem",1),a.start.get("hour")!=12&&a.start.assign("hour",a.start.get("hour")+12)))}else if(t[hA]){let u=t[hA][0];u=="早"?(l=0,s==12&&(s=0)):u=="晚"&&(l=1,s!=12&&(s+=12))}else if(t[gA]){let u=t[gA][0];u=="上"||u=="早"||u=="凌"?(l=0,s==12&&(s=0)):(u=="下"||u=="晚")&&(l=1,s!=12&&(s+=12))}else if(t[vA]){let u=t[vA][0];u=="上"||u=="早"||u=="凌"?(l=0,s==12&&(s=0)):(u=="下"||u=="晚")&&(l=1,s!=12&&(s+=12))}return a.text=a.text+t[0],a.end.assign("hour",s),a.end.assign("minute",o),l>=0?a.end.assign("meridiem",l):a.start.isCertain("meridiem")&&a.start.get("meridiem")==1&&a.start.get("hour")>s?a.end.imply("meridiem",0):s>12&&a.end.imply("meridiem",1),a.end.date().getTime()<a.start.date().getTime()&&a.end.imply("day",a.end.get("day")+1),a}}});var cse,r$e,Pf,bj=y(()=>{cse=tt(Ht(),1);we();My();r$e=new RegExp("(?:星期|礼拜|周)(?<weekday>"+Object.keys(Ay).join("|")+")"),Pf=class extends H{innerPattern(){return r$e}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,i=Ay[a];if(i===void 0)return null;let s=(0,cse.default)(e.refDate),o=!1,l=s.day();return Math.abs(i-7-l)<Math.abs(i-l)?s=s.day(i-7):Math.abs(i+7-l)<Math.abs(i-l)?s=s.day(i+7):s=s.day(i),r.start.assign("weekday",i),o?(r.start.assign("day",s.date()),r.start.assign("month",s.month()+1),r.start.assign("year",s.year())):(r.start.imply("day",s.date()),r.start.imply("month",s.month()+1),r.start.imply("year",s.year())),r}}});var mse,n$e,dse,a$e,use,pse,i$e,Af,wj=y(()=>{mse=tt(Ht(),1);we();n$e=1,dse=2,a$e=3,use=4,pse=5,i$e=6,Af=class extends H{innerPattern(e){return new RegExp("(而家|立(?:刻|即)|即刻)|(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)(?:[\\s|,|,]*)(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?","i")}innerExtract(e,t){let r=t.index,a=e.createParsingResult(r,t[0]),i=(0,mse.default)(e.refDate),s=i;if(t[n$e])a.start.imply("hour",i.hour()),a.start.imply("minute",i.minute()),a.start.imply("second",i.second()),a.start.imply("millisecond",i.millisecond());else if(t[dse]){let o=t[dse],l=t[a$e];o=="明"||o=="聽"?i.hour()>1&&(s=s.add(1,"day")):o=="昨"||o=="尋"||o=="琴"?s=s.add(-1,"day"):o=="前"?s=s.add(-2,"day"):o=="大前"?s=s.add(-3,"day"):o=="後"?s=s.add(2,"day"):o=="大後"&&(s=s.add(3,"day")),l=="早"||l=="朝"?a.start.imply("hour",6):l=="晚"&&(a.start.imply("hour",22),a.start.imply("meridiem",1))}else if(t[use]){let l=t[use][0];l=="早"||l=="朝"||l=="上"?a.start.imply("hour",6):l=="下"||l=="晏"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):l=="中"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):l=="夜"||l=="晚"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):l=="凌"&&a.start.imply("hour",0)}else if(t[pse]){let o=t[pse];o=="明"||o=="聽"?i.hour()>1&&(s=s.add(1,"day")):o=="昨"||o=="尋"||o=="琴"?s=s.add(-1,"day"):o=="前"?s=s.add(-2,"day"):o=="大前"?s=s.add(-3,"day"):o=="後"?s=s.add(2,"day"):o=="大後"&&(s=s.add(3,"day"));let l=t[i$e];if(l){let c=l[0];c=="早"||c=="朝"||c=="上"?a.start.imply("hour",6):c=="下"||c=="晏"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):c=="中"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):c=="夜"||c=="晚"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):c=="凌"&&a.start.imply("hour",0)}}return a.start.assign("day",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year()),a}}});function ao(n){let e=0;for(let t=0;t<n.length;t++){let r=n[t];r==="十"?e=e===0?sa[r]:e*sa[r]:e+=sa[r]}return e}function fse(n){let e="";for(let t=0;t<n.length;t++){let r=n[t];e=e+sa[r]}return parseInt(e)}var sa,Ny,Ry=y(()=>{sa={零:0,一:1,二:2,兩:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9,十:10,廿:20,卅:30},Ny={天:0,日:0,一:1,二:2,三:3,四:4,五:5,六:6}});var gse,Sj,hse,Cj,Mf,xj=y(()=>{gse=tt(Ht(),1);we();Ry();Sj=1,hse=2,Cj=3,Mf=class extends H{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(sa).join("")+"]{4}|["+Object.keys(sa).join("")+"]{2})?(?:\\s*)(?:年)?(?:[\\s|,|,]*)(\\d{1,2}|["+Object.keys(sa).join("")+"]{1,2})(?:\\s*)(?:月)(?:\\s*)(\\d{1,2}|["+Object.keys(sa).join("")+"]{1,2})?(?:\\s*)(?:日|號)?")}innerExtract(e,t){let r=(0,gse.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),i=parseInt(t[hse]);if(isNaN(i)&&(i=ao(t[hse])),a.start.assign("month",i),t[Cj]){let s=parseInt(t[Cj]);isNaN(s)&&(s=ao(t[Cj])),a.start.assign("day",s)}else a.start.imply("day",r.date());if(t[Sj]){let s=parseInt(t[Sj]);isNaN(s)&&(s=fse(t[Sj])),a.start.assign("year",s)}else a.start.imply("year",r.year());return a}}});var yse,s$e,Ej,o$e,If,Dj=y(()=>{yse=tt(Ht(),1);we();Ry();s$e=new RegExp("(\\d+|["+Object.keys(sa).join("")+"]+|半|幾)(?:\\s*)(?:個)?(秒(?:鐘)?|分鐘|小時|鐘|日|天|星期|禮拜|月|年)(?:(?:之|過)?後|(?:之)?內)","i"),Ej=1,o$e=2,If=class extends H{innerPattern(){return s$e}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=parseInt(t[Ej]);if(isNaN(a)&&(a=ao(t[Ej])),isNaN(a)){let l=t[Ej];if(l==="幾")a=3;else if(l==="半")a=.5;else return null}let i=(0,yse.default)(e.refDate),o=t[o$e][0];return o.match(/[日天星禮月年]/)?(o=="日"||o=="天"?i=i.add(a,"d"):o=="星"||o=="禮"?i=i.add(a*7,"d"):o=="月"?i=i.add(a,"month"):o=="年"&&(i=i.add(a,"year")),r.start.assign("year",i.year()),r.start.assign("month",i.month()+1),r.start.assign("day",i.date()),r):(o=="秒"?i=i.add(a,"second"):o=="分"?i=i.add(a,"minute"):(o=="小"||o=="鐘")&&(i=i.add(a,"hour")),r.start.imply("year",i.year()),r.start.imply("month",i.month()+1),r.start.imply("day",i.date()),r.start.assign("hour",i.hour()),r.start.assign("minute",i.minute()),r.start.assign("second",i.second()),r)}}});var vse,l$e,Nf,Pj=y(()=>{vse=tt(Ht(),1);we();Ry();l$e=new RegExp("(?<prefix>上|今|下|這|呢)(?:個)?(?:星期|禮拜|週)(?<weekday>"+Object.keys(Ny).join("|")+")"),Nf=class extends H{innerPattern(){return l$e}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,i=Ny[a];if(i===void 0)return null;let s=null,o=t.groups.prefix;o=="上"?s="last":o=="下"?s="next":(o=="今"||o=="這"||o=="呢")&&(s="this");let l=(0,vse.default)(e.refDate),c=!1,d=l.day();return s=="last"||s=="past"?(l=l.day(i-7),c=!0):s=="next"?(l=l.day(i+7),c=!0):s=="this"?l=l.day(i):Math.abs(i-7-d)<Math.abs(i-d)?l=l.day(i-7):Math.abs(i+7-d)<Math.abs(i-d)?l=l.day(i+7):l=l.day(i),r.start.assign("weekday",i),c?(r.start.assign("day",l.date()),r.start.assign("month",l.month()+1),r.start.assign("year",l.year())):(r.start.imply("day",l.date()),r.start.imply("month",l.month()+1),r.start.imply("year",l.year())),r}}});var kse,c$e,d$e,bA,wA,SA,CA,xA,EA,io,_y,DA,Rf,Aj=y(()=>{kse=tt(Ht(),1);we();Ry();c$e=new RegExp("(?:由|從|自)?(?:(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)(?:[\\s,,]*)(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|["+Object.keys(sa).join("")+"]+)(?:\\s*)(?:點|時|:|:)(?:\\s*)(\\d+|半|正|整|["+Object.keys(sa).join("")+"]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|["+Object.keys(sa).join("")+"]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),d$e=new RegExp("(?:^\\s*(?:到|至|\\-|\\–|\\~|\\〜)\\s*)(?:(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)(?:[\\s,,]*)(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?)?(?:[\\s,,]*)(?:(\\d+|["+Object.keys(sa).join("")+"]+)(?:\\s*)(?:點|時|:|:)(?:\\s*)(\\d+|半|正|整|["+Object.keys(sa).join("")+"]+)?(?:\\s*)(?:分|:|:)?(?:\\s*)(\\d+|["+Object.keys(sa).join("")+"]+)?(?:\\s*)(?:秒)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),bA=1,wA=2,SA=3,CA=4,xA=5,EA=6,io=7,_y=8,DA=9,Rf=class extends H{innerPattern(){return c$e}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let r=(0,kse.default)(e.refDate),a=e.createParsingResult(t.index,t[0]),i=r.clone();if(t[bA]){var s=t[bA];s=="明"||s=="聽"?r.hour()>1&&(i=i.add(1,"day")):s=="昨"||s=="尋"||s=="琴"?i=i.add(-1,"day"):s=="前"?i=i.add(-2,"day"):s=="大前"?i=i.add(-3,"day"):s=="後"?i=i.add(2,"day"):s=="大後"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else if(t[CA]){var o=t[CA];o=="明"||o=="聽"?i=i.add(1,"day"):o=="昨"||o=="尋"||o=="琴"?i=i.add(-1,"day"):o=="前"?i=i.add(-2,"day"):o=="大前"?i=i.add(-3,"day"):o=="後"?i=i.add(2,"day"):o=="大後"&&(i=i.add(3,"day")),a.start.assign("day",i.date()),a.start.assign("month",i.month()+1),a.start.assign("year",i.year())}else a.start.imply("day",i.date()),a.start.imply("month",i.month()+1),a.start.imply("year",i.year());let l=0,c=0,d=-1;if(t[_y]){var u=parseInt(t[_y]);if(isNaN(u)&&(u=ao(t[_y])),u>=60)return null;a.start.assign("second",u)}if(l=parseInt(t[EA]),isNaN(l)&&(l=ao(t[EA])),t[io]?t[io]=="半"?c=30:t[io]=="正"||t[io]=="整"?c=0:(c=parseInt(t[io]),isNaN(c)&&(c=ao(t[io]))):l>100&&(c=l%100,l=Math.floor(l/100)),c>=60||l>24)return null;if(l>=12&&(d=1),t[DA]){if(l>12)return null;var p=t[DA][0].toLowerCase();p=="a"&&(d=0,l==12&&(l=0)),p=="p"&&(d=1,l!=12&&(l+=12))}else if(t[wA]){var m=t[wA],f=m[0];f=="朝"||f=="早"?(d=0,l==12&&(l=0)):f=="晚"&&(d=1,l!=12&&(l+=12))}else if(t[SA]){var h=t[SA],g=h[0];g=="上"||g=="朝"||g=="早"||g=="凌"?(d=0,l==12&&(l=0)):(g=="下"||g=="晏"||g=="晚")&&(d=1,l!=12&&(l+=12))}else if(t[xA]){var v=t[xA],k=v[0];k=="上"||k=="朝"||k=="早"||k=="凌"?(d=0,l==12&&(l=0)):(k=="下"||k=="晏"||k=="晚")&&(d=1,l!=12&&(l+=12))}if(a.start.assign("hour",l),a.start.assign("minute",c),d>=0?a.start.assign("meridiem",d):l<12?a.start.imply("meridiem",0):a.start.imply("meridiem",1),t=d$e.exec(e.text.substring(a.index+a.text.length)),!t)return a.text.match(/^\d+$/)?null:a;let T=i.clone();if(a.end=e.createParsingComponents(),t[bA]){var s=t[bA];s=="明"||s=="聽"?r.hour()>1&&(T=T.add(1,"day")):s=="昨"||s=="尋"||s=="琴"?T=T.add(-1,"day"):s=="前"?T=T.add(-2,"day"):s=="大前"?T=T.add(-3,"day"):s=="後"?T=T.add(2,"day"):s=="大後"&&(T=T.add(3,"day")),a.end.assign("day",T.date()),a.end.assign("month",T.month()+1),a.end.assign("year",T.year())}else if(t[CA]){var o=t[CA];o=="明"||o=="聽"?T=T.add(1,"day"):o=="昨"||o=="尋"||o=="琴"?T=T.add(-1,"day"):o=="前"?T=T.add(-2,"day"):o=="大前"?T=T.add(-3,"day"):o=="後"?T=T.add(2,"day"):o=="大後"&&(T=T.add(3,"day")),a.end.assign("day",T.date()),a.end.assign("month",T.month()+1),a.end.assign("year",T.year())}else a.end.imply("day",T.date()),a.end.imply("month",T.month()+1),a.end.imply("year",T.year());if(l=0,c=0,d=-1,t[_y]){var u=parseInt(t[_y]);if(isNaN(u)&&(u=ao(t[_y])),u>=60)return null;a.end.assign("second",u)}if(l=parseInt(t[EA]),isNaN(l)&&(l=ao(t[EA])),t[io]?t[io]=="半"?c=30:t[io]=="正"||t[io]=="整"?c=0:(c=parseInt(t[io]),isNaN(c)&&(c=ao(t[io]))):l>100&&(c=l%100,l=Math.floor(l/100)),c>=60||l>24)return null;if(l>=12&&(d=1),t[DA]){if(l>12)return null;var p=t[DA][0].toLowerCase();p=="a"&&(d=0,l==12&&(l=0)),p=="p"&&(d=1,l!=12&&(l+=12)),a.start.isCertain("meridiem")||(d==0?(a.start.imply("meridiem",0),a.start.get("hour")==12&&a.start.assign("hour",0)):(a.start.imply("meridiem",1),a.start.get("hour")!=12&&a.start.assign("hour",a.start.get("hour")+12)))}else if(t[wA]){var m=t[wA],f=m[0];f=="朝"||f=="早"?(d=0,l==12&&(l=0)):f=="晚"&&(d=1,l!=12&&(l+=12))}else if(t[SA]){var h=t[SA],g=h[0];g=="上"||g=="朝"||g=="早"||g=="凌"?(d=0,l==12&&(l=0)):(g=="下"||g=="晏"||g=="晚")&&(d=1,l!=12&&(l+=12))}else if(t[xA]){var v=t[xA],k=v[0];k=="上"||k=="朝"||k=="早"||k=="凌"?(d=0,l==12&&(l=0)):(k=="下"||k=="晏"||k=="晚")&&(d=1,l!=12&&(l+=12))}return a.text=a.text+t[0],a.end.assign("hour",l),a.end.assign("minute",c),d>=0?a.end.assign("meridiem",d):a.start.isCertain("meridiem")&&a.start.get("meridiem")==1&&a.start.get("hour")>l?a.end.imply("meridiem",0):l>12&&a.end.imply("meridiem",1),a.end.date().getTime()<a.start.date().getTime()&&a.end.imply("day",a.end.get("day")+1),a}}});var Tse,u$e,_f,Mj=y(()=>{Tse=tt(Ht(),1);we();Ry();u$e=new RegExp("(?:星期|禮拜|週)(?<weekday>"+Object.keys(Ny).join("|")+")"),_f=class extends H{innerPattern(){return u$e}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=t.groups.weekday,i=Ny[a];if(i===void 0)return null;let s=(0,Tse.default)(e.refDate),o=!1,l=s.day();return Math.abs(i-7-l)<Math.abs(i-l)?s=s.day(i-7):Math.abs(i+7-l)<Math.abs(i-l)?s=s.day(i+7):s=s.day(i),r.start.assign("weekday",i),o?(r.start.assign("day",s.date()),r.start.assign("month",s.month()+1),r.start.assign("year",s.year())):(r.start.imply("day",s.date()),r.start.imply("month",s.month()+1),r.start.imply("year",s.year())),r}}});var Ff,Ij=y(()=>{Xs();Ff=class extends jr{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}}});var Lf,Nj=y(()=>{eo();Lf=class extends $r{patternBetween(){return/^\s*$/i}}});var PA={};Xe(PA,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>Rj,createCasualConfiguration:()=>_j,createConfiguration:()=>Fj,hant:()=>p$e,parse:()=>f$e,parseDate:()=>h$e,strict:()=>m$e});function f$e(n,e,t){return Rj.parse(n,e,t)}function h$e(n,e,t){return Rj.parseDate(n,e,t)}function _j(){let n=Fj();return n.parsers.unshift(new Af),n}function Fj(){let n=Gr({parsers:[new Mf,new Nf,new _f,new Rf,new If],refiners:[new Ff,new Lf]});return n.refiners=n.refiners.filter(e=>!(e instanceof el)),n}var p$e,Rj,m$e,bse=y(()=>{aw();gs();Ni();ot();Nt();wj();xj();Dj();Pj();Aj();Mj();Ij();Nj();p$e=new ze(_j()),Rj=new ze(_j()),m$e=new ze(Fj())});var xse,g$e,wse,y$e,Sse,Cse,v$e,vS,Ese=y(()=>{xse=tt(Ht(),1);we();g$e=1,wse=2,y$e=3,Sse=4,Cse=5,v$e=6,vS=class extends H{innerPattern(e){return new RegExp("(现在|立(?:刻|即)|即刻)|(今|明|前|大前|后|大后|昨)(早|晚)|(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|(今|明|前|大前|后|大后|昨)(?:日|天)(?:[\\s|,|,]*)(?:(上(?:午)|早(?:上)|下(?:午)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?","i")}innerExtract(e,t){let r=t.index,a=e.createParsingResult(r,t[0]),i=(0,xse.default)(e.refDate),s=i;if(t[g$e])a.start.imply("hour",i.hour()),a.start.imply("minute",i.minute()),a.start.imply("second",i.second()),a.start.imply("millisecond",i.millisecond());else if(t[wse]){let o=t[wse],l=t[y$e];o=="明"?i.hour()>1&&(s=s.add(1,"day")):o=="昨"?s=s.add(-1,"day"):o=="前"?s=s.add(-2,"day"):o=="大前"?s=s.add(-3,"day"):o=="后"?s=s.add(2,"day"):o=="大后"&&(s=s.add(3,"day")),l=="早"?a.start.imply("hour",6):l=="晚"&&(a.start.imply("hour",22),a.start.imply("meridiem",1))}else if(t[Sse]){let l=t[Sse][0];l=="早"||l=="上"?a.start.imply("hour",6):l=="下"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):l=="中"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):l=="夜"||l=="晚"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):l=="凌"&&a.start.imply("hour",0)}else if(t[Cse]){let o=t[Cse];o=="明"?i.hour()>1&&(s=s.add(1,"day")):o=="昨"?s=s.add(-1,"day"):o=="前"?s=s.add(-2,"day"):o=="大前"?s=s.add(-3,"day"):o=="后"?s=s.add(2,"day"):o=="大后"&&(s=s.add(3,"day"));let l=t[v$e];if(l){let c=l[0];c=="早"||c=="上"?a.start.imply("hour",6):c=="下"?(a.start.imply("hour",15),a.start.imply("meridiem",1)):c=="中"?(a.start.imply("hour",12),a.start.imply("meridiem",1)):c=="夜"||c=="晚"?(a.start.imply("hour",22),a.start.imply("meridiem",1)):c=="凌"&&a.start.imply("hour",0)}}return a.start.assign("day",s.date()),a.start.assign("month",s.month()+1),a.start.assign("year",s.year()),a}}});var kS,Dse=y(()=>{Xs();kS=class extends jr{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}}});var TS,Pse=y(()=>{eo();TS=class extends $r{patternBetween(){return/^\s*$/i}}});var AA={};Xe(AA,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>Lj,createCasualConfiguration:()=>Oj,createConfiguration:()=>zj,hans:()=>k$e,parse:()=>b$e,parseDate:()=>w$e,strict:()=>T$e});function b$e(n,e,t){return Lj.parse(n,e,t)}function w$e(n,e,t){return Lj.parseDate(n,e,t)}function Oj(){let n=zj();return n.parsers.unshift(new vS),n}function zj(){let n=Gr({parsers:[new Cf,new Ef,new Pf,new Df,new xf],refiners:[new kS,new TS]});return n.refiners=n.refiners.filter(e=>!(e instanceof el)),n}var k$e,Lj,T$e,Ase=y(()=>{aw();gs();Ni();ot();Nt();Ese();gj();vj();kj();Tj();bj();Dse();Pse();k$e=new ze(Oj()),Lj=new ze(Oj()),T$e=new ze(zj())});var $j={};Xe($j,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>Bj,createCasualConfiguration:()=>Mse,createConfiguration:()=>jj,hans:()=>AA,hant:()=>PA,parse:()=>C$e,parseDate:()=>x$e,strict:()=>S$e});function C$e(n,e,t){return Bj.parse(n,e,t)}function x$e(n,e,t){return Bj.parseDate(n,e,t)}function Mse(){let n=jj();return n.parsers.unshift(new Af),n}function jj(){let n=Gr({parsers:[new Mf,new Cf,new Nf,new Ef,new _f,new Pf,new Rf,new Df,new If,new xf],refiners:[new Ff,new Lf]});return n.refiners=n.refiners.filter(e=>!(e instanceof el)),n}var Bj,S$e,Ise=y(()=>{gs();Ni();ot();Nt();aw();gj();vj();kj();Tj();bj();wj();xj();Dj();Pj();Aj();Mj();Ij();Nj();bse();Ase();Bj=new ze(Mse()),S$e=new ze(jj())});function D$e(n){let e=n.toLowerCase();return Hj[e]!==void 0?Hj[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}function Yj(n){let e=n.toLowerCase();return Vj[e]!==void 0?Vj[e]:parseInt(e)}function IA(n){if(/(год|года|г|г.)/i.test(n)&&(n=n.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(n))return n=n.replace(/(до н.э.|до н. э.)/i,""),-parseInt(n);if(/(н. э.|н.э.)/i.test(n))return n=n.replace(/(н. э.|н.э.)/i,""),parseInt(n);let e=parseInt(n);return Mi(e)}function Oy(n){let e={},t=n,r=Nse.exec(t);for(;r;)P$e(e,r),t=t.substring(r[0].length).trim(),r=Nse.exec(t);return e}function P$e(n,e){let t=D$e(e[1]),r=bS[e[2].toLowerCase()];n[r]=t}var Ts,Wj,qj,Fy,Hj,Vj,bS,E$e,Gj,Uj,MA,Rse,Nse,Ly,bs=y(()=>{xt();mn();Ts={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"},Wj={воскресенье:0,воскресенья:0,вск:0,"вск.":0,понедельник:1,понедельника:1,пн:1,"пн.":1,вторник:2,вторника:2,вт:2,"вт.":2,среда:3,среды:3,среду:3,ср:3,"ср.":3,четверг:4,четверга:4,чт:4,"чт.":4,пятница:5,пятницу:5,пятницы:5,пт:5,"пт.":5,суббота:6,субботу:6,субботы:6,сб:6,"сб.":6},qj={январь:1,января:1,январе:1,февраль:2,февраля:2,феврале:2,март:3,марта:3,марте:3,апрель:4,апреля:4,апреле:4,май:5,мая:5,мае:5,июнь:6,июня:6,июне:6,июль:7,июля:7,июле:7,август:8,августа:8,августе:8,сентябрь:9,сентября:9,сентябре:9,октябрь:10,октября:10,октябре:10,ноябрь:11,ноября:11,ноябре:11,декабрь:12,декабря:12,декабре:12},Fy={...qj,янв:1,"янв.":1,фев:2,"фев.":2,мар:3,"мар.":3,апр:4,"апр.":4,авг:8,"авг.":8,сен:9,"сен.":9,окт:10,"окт.":10,ноя:11,"ноя.":11,дек:12,"дек.":12},Hj={один:1,одна:1,одной:1,одну:1,две:2,два:2,двух:2,три:3,трех:3,трёх:3,четыре:4,четырех:4,четырёх:4,пять:5,пяти:5,шесть:6,шести:6,семь:7,семи:7,восемь:8,восьми:8,девять:9,девяти:9,десять:10,десяти:10,одиннадцать:11,одиннадцати:11,двенадцать:12,двенадцати:12},Vj={первое:1,первого:1,второе:2,второго:2,третье:3,третьего:3,четвертое:4,четвертого:4,пятое:5,пятого:5,шестое:6,шестого:6,седьмое:7,седьмого:7,восьмое:8,восьмого:8,девятое:9,девятого:9,десятое:10,десятого:10,одиннадцатое:11,одиннадцатого:11,двенадцатое:12,двенадцатого:12,тринадцатое:13,тринадцатого:13,четырнадцатое:14,четырнадцатого:14,пятнадцатое:15,пятнадцатого:15,шестнадцатое:16,шестнадцатого:16,семнадцатое:17,семнадцатого:17,восемнадцатое:18,восемнадцатого:18,девятнадцатое:19,девятнадцатого:19,двадцатое:20,двадцатого:20,"двадцать первое":21,"двадцать первого":21,"двадцать второе":22,"двадцать второго":22,"двадцать третье":23,"двадцать третьего":23,"двадцать четвертое":24,"двадцать четвертого":24,"двадцать пятое":25,"двадцать пятого":25,"двадцать шестое":26,"двадцать шестого":26,"двадцать седьмое":27,"двадцать седьмого":27,"двадцать восьмое":28,"двадцать восьмого":28,"двадцать девятое":29,"двадцать девятого":29,тридцатое:30,тридцатого:30,"тридцать первое":31,"тридцать первого":31},bS={сек:"second",секунда:"second",секунд:"second",секунды:"second",секунду:"second",секундочка:"second",секундочки:"second",секундочек:"second",секундочку:"second",мин:"minute",минута:"minute",минут:"minute",минуты:"minute",минуту:"minute",минуток:"minute",минутки:"minute",минутку:"minute",минуточек:"minute",минуточки:"minute",минуточку:"minute",час:"hour",часов:"hour",часа:"hour",часу:"hour",часиков:"hour",часика:"hour",часике:"hour",часик:"hour",день:"d",дня:"d",дней:"d",суток:"d",сутки:"d",неделя:"week",неделе:"week",недели:"week",неделю:"week",недель:"week",недельке:"week",недельки:"week",неделек:"week",месяц:"month",месяце:"month",месяцев:"month",месяца:"month",квартал:"quarter",квартале:"quarter",кварталов:"quarter",год:"year",года:"year",году:"year",годов:"year",лет:"year",годик:"year",годика:"year",годиков:"year"},E$e=`(?:${ie(Hj)}|[0-9]+|[0-9]+\\.[0-9]+|пол|несколько|пар(?:ы|у)|\\s{0,3})`;Gj=`(?:${ie(Vj)}|[0-9]{1,2}(?:го|ого|е|ое)?)`;Uj="(?:\\s+(?:году|года|год|г|г.))?",MA=`(?:[1-9][0-9]{0,3}${Uj}\\s*(?:н.э.|до н.э.|н. э.|до н. э.)|[1-2][0-9]{3}${Uj}|[5-9][0-9]${Uj})`;Rse=`(${E$e})\\s{0,3}(${ie(bS)})`,Nse=new RegExp(Rse,"i"),Ly=li("(?:(?:около|примерно)\\s{0,3})?",Rse)});var _se,wS,Fse=y(()=>{bs();ot();we();_se=`(?:(?:около|примерно)\\s*(?:~\\s*)?)?(${Ly})${Ts.rightBoundary}`,wS=class extends H{patternLeftBoundary(){return Ts.leftBoundary}innerPattern(e){return e.option.forwardDate?new RegExp(_se,Ts.flags):new RegExp(`(?:в течение|в течении)\\s*${_se}`,Ts.flags)}innerExtract(e,t){let r=Oy(t[1]);return K.createRelativeFromReference(e.reference,r)}}});var Of,Ri,zd=y(()=>{we();bs();Of=class extends H{patternLeftBoundary(){return Ts.leftBoundary}innerPattern(e){return new RegExp(this.innerPatternString(e),Ts.flags)}innerPatternHasChange(e,t){return!1}},Ri=class extends Of{innerPattern(e){return new RegExp(`${this.innerPatternString(e)}${Ts.rightBoundary}`,Ts.flags)}}});var Lse,Ose,A$e,zse,SS,Bse=y(()=>{mn();bs();bs();bs();xt();zd();Lse=1,Ose=2,A$e=3,zse=4,SS=class extends Ri{innerPatternString(e){return`(?:с)?\\s*(${Gj})(?:\\s{0,3}(?:по|-|–|до)?\\s{0,3}(${Gj}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${ie(Fy)})(?:(?:-|\\/|,?\\s{0,3})(${MA}(?![^\\s]\\d)))?`}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=Fy[t[A$e].toLowerCase()],i=Yj(t[Lse]);if(i>31)return t.index=t.index+t[Lse].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[zse]){let s=IA(t[zse]);r.start.assign("year",s)}else{let s=er(e.refDate,i,a);r.start.imply("year",s)}if(t[Ose]){let s=Yj(t[Ose]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var M$e,jse,CS,$se=y(()=>{bs();mn();xt();bs();zd();M$e=2,jse=3,CS=class extends Of{innerPatternString(e){return`((?:в)\\s*)?(${ie(Fy)})\\s*(?:[,-]?\\s*(${MA})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`}innerExtract(e,t){let r=t[M$e].toLowerCase();if(t[0].length<=3&&!qj[r])return null;let a=e.createParsingResult(t.index,t.index+t[0].length);a.start.imply("day",1);let i=Fy[r];if(a.start.assign("month",i),t[jse]){let s=IA(t[jse]);a.start.assign("year",s)}else{let s=er(e.refDate,1,i);a.start.imply("year",s)}return a}}});var xS,Use=y(()=>{Nt();Rd();bs();xS=class extends na{constructor(e){super(e)}patternFlags(){return Ts.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|до|и|по|\\?)\\s*"}primaryPrefix(){return"(?:(?:в|с)\\s*)??"}primarySuffix(){return`(?:\\s*(?:утра|вечера|после полудня))?(?!\\/)${Ts.rightBoundary}`}extractPrimaryTimeComponents(e,t){let r=super.extractPrimaryTimeComponents(e,t);if(r){if(t[0].endsWith("вечера")){let a=r.get("hour");a>=6&&a<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",j.PM)):a<6&&r.assign("meridiem",j.AM)}if(t[0].endsWith("после полудня")){r.assign("meridiem",j.PM);let a=r.get("hour");a>=0&&a<=6&&r.assign("hour",r.get("hour")+12)}t[0].endsWith("утра")&&(r.assign("meridiem",j.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}}});var ES,Hse=y(()=>{bs();ot();vs();zd();ES=class extends Of{innerPatternString(e){return`(${Ly})\\s{0,5}назад(?=(?:\\W|$))`}innerExtract(e,t){let r=Oy(t[1]),a=Mn(r);return K.createRelativeFromReference(e.reference,a)}}});var DS,Vse=y(()=>{Xs();DS=class extends jr{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}}});var PS,Wse=y(()=>{eo();PS=class extends $r{patternBetween(){return new RegExp("^\\s*(T|в|,|-)?\\s*$")}}});var AS,qse=y(()=>{ys();zd();AS=class extends Ri{innerPatternString(e){return"(?:с|со)?\\s*(сегодня|вчера|завтра|послезавтра|послепослезавтра|позапозавчера|позавчера)"}innerExtract(e,t){let r=t[1].toLowerCase(),a=e.createParsingComponents();switch(r){case"сегодня":return aa(e.reference);case"вчера":return ja(e.reference);case"завтра":return $a(e.reference);case"послезавтра":return Ul(e.reference,2);case"послепослезавтра":return Ul(e.reference,3);case"позавчера":return kf(e.reference,2);case"позапозавчера":return kf(e.reference,3)}return a}}});var Gse,MS,Yse=y(()=>{ys();hs();Gse=tt(Ht(),1);zd();MS=class extends Ri{innerPatternString(e){return"(сейчас|прошлым\\s*вечером|прошлой\\s*ночью|следующей\\s*ночью|сегодня\\s*ночью|этой\\s*ночью|ночью|этим утром|утром|утра|в\\s*полдень|вечером|вечера|в\\s*полночь)"}innerExtract(e,t){let r=(0,Gse.default)(e.refDate),a=t[0].toLowerCase(),i=e.createParsingComponents();if(a==="сейчас")return Ba(e.reference);if(a==="вечером"||a==="вечера")return by(e.reference);if(a.endsWith("утром")||a.endsWith("утра"))return wy(e.reference);if(a.match(/в\s*полдень/))return Sy(e.reference);if(a.match(/прошлой\s*ночью/))return tA(e.reference);if(a.match(/прошлым\s*вечером/))return rA(e.reference);if(a.match(/следующей\s*ночью/)){let s=r.hour()<22?1:2;r=r.add(s,"day"),Mr(i,r),i.imply("hour",0)}return a.match(/в\s*полночь/)||a.endsWith("ночью")?Tf(e.reference):i}}});var I$e,N$e,R$e,IS,Kse=y(()=>{bs();xt();tl();zd();I$e=1,N$e=2,R$e=3,IS=class extends Ri{innerPatternString(e){return`(?:(?:,|\\(|()\\s*)?(?:в\\s*?)?(?:(эту|этот|прошлый|прошлую|следующий|следующую|следующего)\\s*)?(${ie(Wj)})(?:\\s*(?:,|\\)|)))?(?:\\s*на\\s*(этой|прошлой|следующей)\\s*неделе)?`}innerExtract(e,t){let r=t[N$e].toLowerCase(),a=Wj[r],i=t[I$e],s=t[R$e],o=i||s;o=o||"",o=o.toLowerCase();let l=null;return o=="прошлый"||o=="прошлую"||o=="прошлой"?l="last":o=="следующий"||o=="следующую"||o=="следующей"||o=="следующего"?l="next":(o=="этот"||o=="эту"||o=="этой")&&(l="this"),In(e.reference,a,l)}}});var Zse,_$e,F$e,NS,Qse=y(()=>{bs();ot();Zse=tt(Ht(),1);xt();zd();_$e=1,F$e=2,NS=class extends Ri{innerPatternString(e){return`(в прошлом|на прошлой|на следующей|в следующем|на этой|в этом)\\s*(${ie(bS)})`}innerExtract(e,t){let r=t[_$e].toLowerCase(),a=t[F$e].toLowerCase(),i=bS[a];if(r=="на следующей"||r=="в следующем"){let l={};return l[i]=1,K.createRelativeFromReference(e.reference,l)}if(r=="в прошлом"||r=="на прошлой"){let l={};return l[i]=-1,K.createRelativeFromReference(e.reference,l)}let s=e.createParsingComponents(),o=(0,Zse.default)(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var RS,Jse=y(()=>{bs();ot();vs();zd();RS=class extends Ri{innerPatternString(e){return`(эти|последние|прошлые|следующие|после|спустя|через|\\+|-)\\s*(${Ly})`}innerExtract(e,t){let r=t[1].toLowerCase(),a=Oy(t[2]);switch(r){case"последние":case"прошлые":case"-":a=Mn(a);break}return K.createRelativeFromReference(e.reference,a)}}});var Qj={};Xe(Qj,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>Kj,createCasualConfiguration:()=>Xse,createConfiguration:()=>Zj,parse:()=>O$e,parseDate:()=>z$e,strict:()=>L$e});function O$e(n,e,t){return Kj.parse(n,e,t)}function z$e(n,e,t){return Kj.parseDate(n,e,t)}function Xse(){let n=Zj(!1);return n.parsers.unshift(new AS),n.parsers.unshift(new MS),n.parsers.unshift(new CS),n.parsers.unshift(new NS),n.parsers.unshift(new RS),n}function Zj(n=!0){return Gr({parsers:[new Hn(!0),new wS,new SS,new IS,new xS(n),new ES],refiners:[new PS,new DS]},n)}var Kj,L$e,eoe=y(()=>{Fse();Bse();$se();Use();Hse();Vse();Wse();gs();qse();Yse();Kse();Qse();Ni();ot();Nt();Ld();Jse();Kj=new ze(Xse()),L$e=new ze(Zj(!0))});function j$e(n){let e=n.toLowerCase();return Jj[e]!==void 0?Jj[e]:e==="un"||e==="una"||e==="uno"?1:e.match(/algunos?/)||e.match(/unos?/)?3:e.match(/media?/)?.5:parseFloat(e)}function aoe(n){if(n.match(/^[0-9]{1,4}$/)){let e=parseInt(n);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}function ooe(n){let e={},t=n,r=toe.exec(t);for(;r;)$$e(e,r),t=t.substring(r[0].length),r=toe.exec(t);return e}function $$e(n,e){let t=j$e(e[1]),r=roe[e[2].toLowerCase()];n[r]=t}var Xj,e$,Jj,roe,B$e,noe,ioe,toe,soe,_S=y(()=>{xt();Xj={domingo:0,dom:0,lunes:1,lun:1,martes:2,mar:2,miércoles:3,miercoles:3,mié:3,mie:3,jueves:4,jue:4,viernes:5,vie:5,sábado:6,sabado:6,sáb:6,sab:6},e$={enero:1,ene:1,"ene.":1,febrero:2,feb:2,"feb.":2,marzo:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,mayo:5,may:5,"may.":5,junio:6,jun:6,"jun.":6,julio:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,septiembre:9,setiembre:9,sep:9,"sep.":9,octubre:10,oct:10,"oct.":10,noviembre:11,nov:11,"nov.":11,diciembre:12,dic:12,"dic.":12},Jj={uno:1,dos:2,tres:3,cuatro:4,cinco:5,seis:6,siete:7,ocho:8,nueve:9,diez:10,once:11,doce:12,trece:13},roe={sec:"second",segundo:"second",segundos:"second",min:"minute",mins:"minute",minuto:"minute",minutos:"minute",h:"hour",hr:"hour",hrs:"hour",hora:"hour",horas:"hour",día:"d",días:"d",semana:"week",semanas:"week",mes:"month",meses:"month",cuarto:"quarter",cuartos:"quarter",año:"year",años:"year"},B$e=`(?:${ie(Jj)}|[0-9]+|[0-9]+\\.[0-9]+|un?|uno?|una?|algunos?|unos?|demi-?)`;noe="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";ioe=`(${B$e})\\s{0,5}(${ie(roe)})\\s{0,5}`,toe=new RegExp(ioe,"i"),soe=li("",ioe)});var U$e,H$e,V$e,W$e,FS,loe=y(()=>{_S();xt();we();tl();U$e=new RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:(este|esta|pasado|pr[oó]ximo)\\s*)?(${ie(Xj)})(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(este|esta|pasado|pr[óo]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),H$e=1,V$e=2,W$e=3,FS=class extends H{innerPattern(){return U$e}innerExtract(e,t){let r=t[V$e].toLowerCase(),a=Xj[r];if(a===void 0)return null;let i=t[H$e],s=t[W$e],o=i||s||"";o=o.toLowerCase();let l=null;return o=="pasado"?l="this":o=="próximo"||o=="proximo"?l="next":o=="este"&&(l="this"),In(e.reference,a,l)}}});var LS,coe=y(()=>{Rd();LS=class extends na{primaryPrefix(){return"(?:(?:aslas|deslas|las?|al?|de|del)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|a(?:l)?|\\?)\\s*"}}});var OS,doe=y(()=>{eo();OS=class extends $r{patternBetween(){return new RegExp("^\\s*(?:,|de|aslas|a)?\\s*$")}}});var zS,uoe=y(()=>{Xs();zS=class extends jr{patternBetween(){return/^\s*(?:-)\s*$/i}}});var q$e,poe,moe,G$e,foe,BS,hoe=y(()=>{mn();_S();_S();xt();we();q$e=new RegExp(`([0-9]{1,2})(?:º|ª|°)?(?:\\s*(?:desde|de|\\-|\\–|ao?|\\s)\\s*([0-9]{1,2})(?:º|ª|°)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${ie(e$)})(?:\\s*(?:de|,)?\\s*(${noe}))?(?=\\W|$)`,"i"),poe=1,moe=2,G$e=3,foe=4,BS=class extends H{innerPattern(){return q$e}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=e$[t[G$e].toLowerCase()],i=parseInt(t[poe]);if(i>31)return t.index=t.index+t[poe].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[foe]){let s=aoe(t[foe]);r.start.assign("year",s)}else{let s=er(e.refDate,i,a);r.start.imply("year",s)}if(t[moe]){let s=parseInt(t[moe]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var jS,goe=y(()=>{we();ys();jS=class extends H{innerPattern(e){return/(ahora|hoy|mañana|ayer)(?=\W|$)/i}innerExtract(e,t){let r=t[0].toLowerCase(),a=e.createParsingComponents();switch(r){case"ahora":return Ba(e.reference);case"hoy":return aa(e.reference);case"mañana":return $a(e.reference);case"ayer":return ja(e.reference)}return a}}});var yoe,$S,voe=y(()=>{Nt();we();hs();yoe=tt(Ht(),1),$S=class extends H{innerPattern(){return/(?:esta\s*)?(mañana|tarde|medianoche|mediodia|mediodía|noche)(?=\W|$)/i}innerExtract(e,t){let r=(0,yoe.default)(e.refDate),a=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":a.imply("meridiem",j.PM),a.imply("hour",15);break;case"noche":a.imply("meridiem",j.PM),a.imply("hour",22);break;case"mañana":a.imply("meridiem",j.AM),a.imply("hour",6);break;case"medianoche":Xo(a,r),a.imply("hour",0),a.imply("minute",0),a.imply("second",0);break;case"mediodia":case"mediodía":a.imply("meridiem",j.AM),a.imply("hour",12);break}return a}}});var US,koe=y(()=>{_S();ot();we();US=class extends H{innerPattern(){return new RegExp(`(?:en|por|durante|de|dentro de)\\s*(${soe})(?=\\W|$)`,"i")}innerExtract(e,t){let r=ooe(t[1]);return K.createRelativeFromReference(e.reference,r)}}});var n$={};Xe(n$,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>t$,createCasualConfiguration:()=>Toe,createConfiguration:()=>r$,parse:()=>K$e,parseDate:()=>Z$e,strict:()=>Y$e});function K$e(n,e,t){return t$.parse(n,e,t)}function Z$e(n,e,t){return t$.parseDate(n,e,t)}function Toe(n=!0){let e=r$(!1,n);return e.parsers.push(new jS),e.parsers.push(new $S),e}function r$(n=!0,e=!0){return Gr({parsers:[new Hn(e),new FS,new LS,new BS,new US],refiners:[new OS,new zS]},n)}var t$,Y$e,boe=y(()=>{gs();Ni();ot();Nt();Ld();loe();coe();doe();uoe();hoe();goe();voe();koe();t$=new ze(Toe()),Y$e=new ze(r$(!0))});function J$e(n){let e=n.toLowerCase();return i$[e]!==void 0?i$[e]:e.match(/декілька/)?2:e.match(/пів/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}function d$(n){let e=n.toLowerCase();return s$[e]!==void 0?s$[e]:parseInt(e)}function RA(n){if(/(рік|року|р|р.)/i.test(n)&&(n=n.replace(/(рік|року|р|р.)/i,"")),/(до н.е.|до н. е.)/i.test(n))return n=n.replace(/(до н.е.|до н. е.)/i,""),-parseInt(n);if(/(н. е.|н.е.)/i.test(n))return n=n.replace(/(н. е.|н.е.)/i,""),parseInt(n);let e=parseInt(n);return Mi(e)}function jy(n){let e={},t=n,r=woe.exec(t);for(;r;)X$e(e,r),t=t.substring(r[0].length).trim(),r=woe.exec(t);return e}function X$e(n,e){let t=J$e(e[1]),r=HS[e[2].toLowerCase()];n[r]=t}var so,o$,l$,zy,i$,s$,HS,Q$e,c$,a$,NA,Soe,woe,By,ws=y(()=>{xt();mn();so={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"},o$={неділя:0,неділі:0,неділю:0,нд:0,"нд.":0,понеділок:1,понеділка:1,пн:1,"пн.":1,вівторок:2,вівторка:2,вт:2,"вт.":2,середа:3,середи:3,середу:3,ср:3,"ср.":3,четвер:4,четверга:4,четвергу:4,чт:4,"чт.":4,"п'ятниця":5,"п'ятниці":5,"п'ятницю":5,пт:5,"пт.":5,субота:6,суботи:6,суботу:6,сб:6,"сб.":6},l$={січень:1,січня:1,січні:1,лютий:2,лютого:2,лютому:2,березень:3,березня:3,березні:3,квітень:4,квітня:4,квітні:4,травень:5,травня:5,травні:5,червень:6,червня:6,червні:6,липень:7,липня:7,липні:7,серпень:8,серпня:8,серпні:8,вересень:9,вересня:9,вересні:9,жовтень:10,жовтня:10,жовтні:10,листопад:11,листопада:11,листопаду:11,грудень:12,грудня:12,грудні:12},zy={...l$,січ:1,"січ.":1,лют:2,"лют.":2,бер:3,"бер.":3,квіт:4,"квіт.":4,трав:5,"трав.":5,черв:6,"черв.":6,лип:7,"лип.":7,серп:8,"серп.":8,сер:8,"cер.":8,вер:9,"вер.":9,верес:9,"верес.":9,жовт:10,"жовт.":10,листоп:11,"листоп.":11,груд:12,"груд.":12},i$={один:1,одна:1,одної:1,одну:1,дві:2,два:2,двох:2,три:3,трьох:3,чотири:4,чотирьох:4,"п'ять":5,"п'яти":5,шість:6,шести:6,сім:7,семи:7,вісім:8,восьми:8,"дев'ять":9,"дев'яти":9,десять:10,десяти:10,одинадцять:11,одинадцяти:11,дванадцять:12,дванадцяти:12},s$={перше:1,першого:1,друге:2,другого:2,третє:3,третього:3,четверте:4,четвертого:4,"п'яте":5,"п'ятого":5,шосте:6,шостого:6,сьоме:7,сьомого:7,восьме:8,восьмого:8,"дев'яте":9,"дев'ятого":9,десяте:10,десятого:10,одинадцяте:11,одинадцятого:11,дванадцяте:12,дванадцятого:12,тринадцяте:13,тринадцятого:13,чотирнадцяте:14,чотинрнадцятого:14,"п'ятнадцяте":15,"п'ятнадцятого":15,шістнадцяте:16,шістнадцятого:16,сімнадцяте:17,сімнадцятого:17,вісімнадцяте:18,вісімнадцятого:18,"дев'ятнадцяте":19,"дев'ятнадцятого":19,двадцяте:20,двадцятого:20,"двадцять перше":21,"двадцять першого":21,"двадцять друге":22,"двадцять другого":22,"двадцять третє":23,"двадцять третього":23,"двадцять четверте":24,"двадцять четвертого":24,"двадцять п'яте":25,"двадцять п'ятого":25,"двадцять шосте":26,"двадцять шостого":26,"двадцять сьоме":27,"двадцять сьомого":27,"двадцять восьме":28,"двадцять восьмого":28,"двадцять дев'яте":29,"двадцять дев'ятого":29,тридцяте:30,тридцятого:30,"тридцять перше":31,"тридцять першого":31},HS={сек:"second",секунда:"second",секунд:"second",секунди:"second",секунду:"second",секундочок:"second",секундочки:"second",секундочку:"second",хв:"minute",хвилина:"minute",хвилин:"minute",хвилини:"minute",хвилину:"minute",хвилинок:"minute",хвилинки:"minute",хвилинку:"minute",хвилиночок:"minute",хвилиночки:"minute",хвилиночку:"minute",год:"hour",година:"hour",годин:"hour",години:"hour",годину:"hour",годинка:"hour",годинок:"hour",годинки:"hour",годинку:"hour",день:"d",дня:"d",днів:"d",дні:"d",доба:"d",добу:"d",тиждень:"week",тижню:"week",тижня:"week",тижні:"week",тижнів:"week",місяць:"month",місяців:"month",місяці:"month",місяця:"month",квартал:"quarter",кварталу:"quarter",квартала:"quarter",кварталів:"quarter",кварталі:"quarter",рік:"year",року:"year",році:"year",років:"year",роки:"year"},Q$e=`(?:${ie(i$)}|[0-9]+|[0-9]+\\.[0-9]+|пів|декілька|пар(?:у)|\\s{0,3})`;c$=`(?:${ie(s$)}|[0-9]{1,2}(?:го|ого|е)?)`;a$="(?:\\s+(?:року|рік|р|р.))?",NA=`(?:[1-9][0-9]{0,3}${a$}\\s*(?:н.е.|до н.е.|н. е.|до н. е.)|[1-2][0-9]{3}${a$}|[5-9][0-9]${a$})`;Soe=`(${Q$e})\\s{0,3}(${ie(HS)})`,woe=new RegExp(Soe,"i"),By=li("(?:(?:близько|приблизно)\\s{0,3})?",Soe)});var Coe,VS,xoe=y(()=>{ws();ot();we();Coe=`(?:(?:приблизно|орієнтовно)\\s*(?:~\\s*)?)?(${By})${so.rightBoundary}`,VS=class extends H{patternLeftBoundary(){return so.leftBoundary}innerPattern(e){return e.option.forwardDate?new RegExp(Coe,"i"):new RegExp(`(?:протягом|на протязі|протягом|упродовж|впродовж)\\s*${Coe}`,so.flags)}innerExtract(e,t){let r=jy(t[1]);return K.createRelativeFromReference(e.reference,r)}}});var zf,_i,Bd=y(()=>{we();ws();zf=class extends H{patternLeftBoundary(){return so.leftBoundary}innerPattern(e){return new RegExp(this.innerPatternString(e),so.flags)}innerPatternHasChange(e,t){return!1}},_i=class extends zf{innerPattern(e){return new RegExp(`${this.innerPatternString(e)}${so.rightBoundary}`,so.flags)}}});var Eoe,Doe,e2e,Poe,WS,Aoe=y(()=>{mn();ws();ws();ws();xt();Bd();Eoe=1,Doe=2,e2e=3,Poe=4,WS=class extends _i{innerPatternString(e){return`(?:з|із)?\\s*(${c$})(?:\\s{0,3}(?:по|-|–|до)?\\s{0,3}(${c$}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${ie(zy)})(?:(?:-|\\/|,?\\s{0,3})(${NA}(?![^\\s]\\d)))?`}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),a=zy[t[e2e].toLowerCase()],i=d$(t[Eoe]);if(i>31)return t.index=t.index+t[Eoe].length,null;if(r.start.assign("month",a),r.start.assign("day",i),t[Poe]){let s=RA(t[Poe]);r.start.assign("year",s)}else{let s=er(e.reference.instant,i,a);r.start.imply("year",s)}if(t[Doe]){let s=d$(t[Doe]);r.end=r.start.clone(),r.end.assign("day",s)}return r}}});var t2e,Moe,qS,Ioe=y(()=>{ws();mn();xt();ws();Bd();t2e=2,Moe=3,qS=class extends zf{innerPatternString(e){return`((?:в|у)\\s*)?(${ie(zy)})\\s*(?:[,-]?\\s*(${NA})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`}innerExtract(e,t){let r=t[t2e].toLowerCase();if(t[0].length<=3&&!l$[r])return null;let a=e.createParsingResult(t.index,t.index+t[0].length);a.start.imply("day",1);let i=zy[r];if(a.start.assign("month",i),t[Moe]){let s=RA(t[Moe]);a.start.assign("year",s)}else{let s=er(e.reference.instant,1,i);a.start.imply("year",s)}return a}}});var GS,Noe=y(()=>{Nt();Rd();ws();GS=class extends na{constructor(e){super(e)}patternFlags(){return so.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\–|\\~|\\〜|до|і|по|\\?)\\s*"}primaryPrefix(){return"(?:(?:в|у|о|об|з|із|від)\\s*)??"}primarySuffix(){return`(?:\\s*(?:ранку|вечора|по обіді|після обіду))?(?!\\/)${so.rightBoundary}`}extractPrimaryTimeComponents(e,t){let r=super.extractPrimaryTimeComponents(e,t);if(r){if(t[0].endsWith("вечора")){let a=r.get("hour");a>=6&&a<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",j.PM)):a<6&&r.assign("meridiem",j.AM)}if(t[0].endsWith("по обіді")||t[0].endsWith("після обіду")){r.assign("meridiem",j.PM);let a=r.get("hour");a>=0&&a<=6&&r.assign("hour",r.get("hour")+12)}t[0].endsWith("ранку")&&(r.assign("meridiem",j.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}}});var YS,Roe=y(()=>{ws();ot();vs();Bd();YS=class extends zf{innerPatternString(e){return`(${By})\\s{0,5}тому(?=(?:\\W|$))`}innerExtract(e,t){let r=jy(t[1]),a=Mn(r);return K.createRelativeFromReference(e.reference,a)}}});var KS,_oe=y(()=>{Xs();KS=class extends jr{patternBetween(){return/^\s*(і до|і по|до|по|-)\s*$/i}}});var ZS,Foe=y(()=>{eo();ZS=class extends $r{patternBetween(){return new RegExp("^\\s*(T|в|у|о|,|-)?\\s*$")}}});var QS,Loe=y(()=>{ys();Bd();QS=class extends _i{innerPatternString(e){return"(?:з|із|від)?\\s*(сьогодні|вчора|завтра|післязавтра|післяпіслязавтра|позапозавчора|позавчора)"}innerExtract(e,t){let r=t[1].toLowerCase(),a=e.createParsingComponents();switch(r){case"сьогодні":return aa(e.reference);case"вчора":return ja(e.reference);case"завтра":return $a(e.reference);case"післязавтра":return Ul(e.reference,2);case"післяпіслязавтра":return Ul(e.reference,3);case"позавчора":return kf(e.reference,2);case"позапозавчора":return kf(e.reference,3)}return a}}});var Ooe,JS,zoe=y(()=>{ys();hs();Ooe=tt(Ht(),1);Bd();JS=class extends _i{innerPatternString(e){return"(зараз|минулого\\s*вечора|минулої\\s*ночі|наступної\\s*ночі|сьогодні\\s*вночі|цієї\\s*ночі|цього ранку|вранці|ранку|зранку|опівдні|ввечері|вечора|опівночі|вночі)"}innerExtract(e,t){let r=(0,Ooe.default)(e.reference.instant),a=t[0].toLowerCase(),i=e.createParsingComponents();if(a==="зараз")return Ba(e.reference);if(a==="ввечері"||a==="вечора")return by(e.reference);if(a.endsWith("вранці")||a.endsWith("ранку")||a.endsWith("зранку"))return wy(e.reference);if(a.endsWith("опівдні"))return Sy(e.reference);if(a.match(/минулої\s*ночі/))return tA(e.reference);if(a.match(/минулого\s*вечора/))return rA(e.reference);if(a.match(/наступної\s*ночі/)){let s=r.hour()<22?1:2;r=r.add(s,"day"),Mr(i,r),i.imply("hour",1)}return a.match(/цієї\s*ночі/)?Tf(e.reference):a.endsWith("опівночі")||a.endsWith("вночі")?Tf(e.reference):i}}});var r2e,n2e,a2e,XS,Boe=y(()=>{ws();xt();tl();Bd();r2e=1,n2e=2,a2e=3,XS=class extends _i{innerPatternString(e){return`(?:(?:,|\\(|()\\s*)?(?:в\\s*?)?(?:у\\s*?)?(?:(цей|минулого|минулий|попередній|попереднього|наступного|наступний|наступному)\\s*)?(${ie(o$)})(?:\\s*(?:,|\\)|)))?(?:\\s*(на|у|в)\\s*(цьому|минулому|наступному)\\s*тижні)?`}innerExtract(e,t){let r=t[n2e].toLocaleLowerCase(),a=o$[r],i=t[r2e],s=t[a2e],o=i||s;o=o||"",o=o.toLocaleLowerCase();let l=null;return o=="минулого"||o=="минулий"||o=="попередній"||o=="попереднього"?l="last":o=="наступного"||o=="наступний"?l="next":(o=="цей"||o=="цього"||o=="цьому")&&(l="this"),In(e.reference,a,l)}}});var joe,i2e,s2e,eC,$oe=y(()=>{ws();ot();joe=tt(Ht(),1);xt();Bd();i2e=1,s2e=2,eC=class extends _i{innerPatternString(e){return`(в минулому|у минулому|на минулому|минулого|на наступному|в наступному|у наступному|наступного|на цьому|в цьому|у цьому|цього)\\s*(${ie(HS)})(?=\\s*)`}innerExtract(e,t){let r=t[i2e].toLowerCase(),a=t[s2e].toLowerCase(),i=HS[a];if(r=="на наступному"||r=="в наступному"||r=="у наступному"||r=="наступного"){let l={};return l[i]=1,K.createRelativeFromReference(e.reference,l)}if(r=="на минулому"||r=="в минулому"||r=="у минулому"||r=="минулого"){let l={};return l[i]=-1,K.createRelativeFromReference(e.reference,l)}let s=e.createParsingComponents(),o=(0,joe.default)(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),s.imply("day",o.date()),s.assign("year",o.year()),s.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),s.imply("day",o.date()),s.imply("month",o.month()+1),s.assign("year",o.year())),s}}});var tC,Uoe=y(()=>{ws();ot();vs();Bd();tC=class extends _i{innerPatternString(e){return`(ці|останні|минулі|майбутні|наступні|після|через|\\+|-)\\s*(${By})`}innerExtract(e,t){let r=t[1].toLowerCase(),a=jy(t[3]);switch(r){case"останні":case"минулі":case"-":a=Mn(a);break}return K.createRelativeFromReference(e.reference,a)}}});var m$={};Xe(m$,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>u$,createCasualConfiguration:()=>Hoe,createConfiguration:()=>p$,parse:()=>l2e,parseDate:()=>c2e,strict:()=>o2e});function Hoe(){let n=p$(!1);return n.parsers.unshift(new QS),n.parsers.unshift(new JS),n.parsers.unshift(new qS),n.parsers.unshift(new eC),n.parsers.unshift(new tC),n}function p$(n){return Gr({parsers:[new Fd,new Hn(!0),new VS,new WS,new XS,new GS(n),new YS],refiners:[new ZS,new KS]},n)}function l2e(n,e,t){return u$.parse(n,e,t)}function c2e(n,e,t){return u$.parseDate(n,e,t)}var u$,o2e,Voe=y(()=>{xoe();Aoe();Ioe();Noe();Roe();_oe();Foe();gs();Loe();zoe();Boe();$oe();Ni();ot();Nt();Ld();Uoe();eA();u$=new ze(Hoe()),o2e=new ze(p$(!0))});var _A={};Xe(_A,{Chrono:()=>ze,Meridiem:()=>j,ParsingComponents:()=>K,ParsingContext:()=>gw,ParsingResult:()=>Lt,ReferenceWithTimezone:()=>Vt,Weekday:()=>We,casual:()=>f$,de:()=>jB,en:()=>IB,es:()=>n$,fr:()=>ZB,ja:()=>ej,nl:()=>mj,parse:()=>u2e,parseDate:()=>p2e,pt:()=>ij,ru:()=>Qj,strict:()=>d2e,uk:()=>m$,zh:()=>$j});function u2e(n,e,t){return f$.parse(n,e,t)}function p2e(n,e,t){return f$.parseDate(n,e,t)}var d2e,f$,Woe=y(()=>{nae();Ni();ot();Nt();Pae();Jae();mie();Pie();rse();Ise();eoe();boe();Voe();d2e=MB,f$=yw});var m2e,FA,qoe=y(()=>{Cr();Woe();ny();cB();dB();lB();m2e=ye,FA=class{constructor(e=[],t=[],r=!0,a="en",i,s,o={}){this.isValidDateString=c=>/^\d{4}-\d{2}-\d{2}$/.test(c),this.isValidTimeString=c=>/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(c),this.escapeRegex=c=>c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),this.cleanupWhitespace=c=>c.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").trim(),this.defaultToScheduled=r,this.languageConfig=Yre(a),this.options=o,this.statusConfigs=e,this.priorityConfigs=t;let l=i||bre;this.triggerConfig=new Y0(l,s||[]),this.boundaries=this.createBoundaryConfig(),this.recurrencePatterns=this.buildRecurrencePatterns(),this.processingPipeline=this.buildProcessingPipeline()}createBoundaryConfig(){let e=["ru","zh","ja","uk","fr"].includes(this.languageConfig.code);return{boundary:e?"(?:^|\\s)":"\\b",endBoundary:e?"(?=\\s|$)":"\\b",isNonAscii:e}}getChronoParser(){let e=this.languageConfig.chronoLocale;return _A[e]||_A}buildProcessingPipeline(){return[{name:"extractTags",process:(e,t)=>this.extractTags(e,t)},{name:"extractContexts",process:(e,t)=>this.extractContexts(e,t)},{name:"extractProjects",process:(e,t)=>this.extractProjects(e,t)},{name:"extractPriority",process:(e,t)=>this.extractPriority(e,t)},{name:"extractStatus",process:(e,t)=>this.extractStatus(e,t)},{name:"extractRecurrence",process:(e,t)=>this.extractRecurrence(e,t)},{name:"extractTimeEstimate",process:(e,t)=>this.extractTimeEstimate(e,t)},{name:"extractUserFields",process:(e,t)=>this.extractUserFields(e,t)},{name:"parseUnifiedDatesAndTimes",process:(e,t)=>this.parseUnifiedDatesAndTimes(e,t)}]}parseInput(e){let t={title:"",tags:[],contexts:[],projects:[]},r=this.protectNlpLiterals(e),a=this.normalizeNumericDateLiterals(r.text),[i,s]=this.extractTitleAndDetails(a);s&&(t.details=s);let o=i;for(let c of this.processingPipeline)try{o=c.process(o,t)}catch(d){console.debug(`Error in processor ${c.name}:`,d)}t.title=o.trim();let l=this.validateAndCleanupResult(t);return this.restoreProtectedLiterals(l,r.literals),l}protectNlpLiterals(e){let t=this.protectQuotedLiterals(e);return this.protectEscapedLiterals(t.text,t.literals)}protectQuotedLiterals(e){let t=[],r="",a=0;for(;a<e.length;){let i=e[a];if(!this.isQuoteDelimiter(i)||!this.isEligibleQuoteStart(e,a)){r+=i,a+=1;continue}let s=this.findClosingQuote(e,a+1,i);if(s===-1||!this.isEligibleQuoteEnd(e,s)){r+=i,a+=1;continue}let o=e.slice(a+1,s);if(o.trim().length===0){r+=i,a+=1;continue}let l=`__TASKNOTES_NLP_LITERAL_${t.length}__`;t.push(o),r+=l,a=s+1}return{text:r,literals:t}}protectEscapedLiterals(e,t){let r="",a=0;for(;a<e.length;){if(e[a]!=="\\"){r+=e[a],a+=1;continue}let i=a+1;if(i>=e.length||!this.shouldProtectEscapedLiteral(e,a,i)){r+=e[a],a+=1;continue}let s=i;for(;s<e.length&&!/\s/u.test(e[s]);)s+=1;let o=e.slice(i,s),l=`__TASKNOTES_NLP_LITERAL_${t.length}__`;t.push(o),r+=l,a=s}return{text:r,literals:t}}restoreProtectedLiterals(e,t){if(t.length!==0&&(e.title=this.restoreProtectedLiteralsInText(e.title,t).replace(/\s+/g," ").trim(),e.details&&(e.details=this.restoreProtectedLiteralsInText(e.details,t)),e.userFields))for(let[r,a]of Object.entries(e.userFields))typeof a=="string"?e.userFields[r]=this.restoreProtectedLiteralsInText(a,t):e.userFields[r]=a.map(i=>this.restoreProtectedLiteralsInText(i,t))}restoreProtectedLiteralsInText(e,t){let r=e;return t.forEach((a,i)=>{r=r.replace(`__TASKNOTES_NLP_LITERAL_${i}__`,a)}),r}isQuoteDelimiter(e){return e==='"'||e==="'"||e==="`"}isEligibleQuoteStart(e,t){if(e[t]!=="'")return!0;let a=t>0?e[t-1]:"";return!this.isWordCharacter(a)}isEligibleQuoteEnd(e,t){if(e[t]!=="'")return!0;let a=t+1<e.length?e[t+1]:"";return!this.isWordCharacter(a)}findClosingQuote(e,t,r){for(let a=t;a<e.length;a+=1)if(!(e[a]!==r||(a>0?e[a-1]:"")==="\\"))return a;return-1}shouldProtectEscapedLiteral(e,t,r){if(this.startsWithEscapableTrigger(e,r))return!0;let a=t>0?e[t-1]:"";return a&&!/\s/u.test(a)?!1:/[\p{L}\p{N}]/u.test(e[r])}startsWithEscapableTrigger(e,t){return this.getEscapableTriggers().some(r=>e.startsWith(r,t))}getEscapableTriggers(){let e=this.triggerConfig.getTriggersOrderedByLength().map(t=>t.trigger).filter(t=>t.length>0);return e.length>0?e:["#","@","+","*","!"]}normalizeNumericDateLiterals(e){let t=e.replace(/(^|[^\p{L}\p{N}_])(\d{4})[/.](\d{1,2})[/.](\d{1,2})(?=$|[^\p{L}\p{N}_])/gu,(r,a,i,s,o)=>{let l=this.toValidatedISODate(Number(i),Number(s),Number(o));return l?`${a}${l}`:r});return this.getNumericDateOrder()!=="day-first"?t:t.replace(/(^|[^\p{L}\p{N}_])(\d{1,2})[/.](\d{1,2})[/.](\d{4})(?=$|[^\p{L}\p{N}_])/gu,(r,a,i,s,o)=>{let l=this.toValidatedISODate(Number(o),Number(s),Number(i));return l?`${a}${l}`:r})}getNumericDateOrder(){if(this.options.dateOrder)return this.options.dateOrder;let e=this.options.dateLocale||this.languageConfig.code;try{let r=new Intl.DateTimeFormat(e).formatToParts(new Date(2006,10,22)).find(a=>a.type==="day"||a.type==="month"||a.type==="year");if((r==null?void 0:r.type)==="day")return"day-first"}catch(t){}return"month-first"}toValidatedISODate(e,t,r){let a=new Date(Date.UTC(e,t-1,r));return a.getUTCFullYear()!==e||a.getUTCMonth()!==t-1||a.getUTCDate()!==r?null:`${e}-${this.padDatePart(t)}-${this.padDatePart(r)}`}padDatePart(e){return String(e).padStart(2,"0")}extractTitleAndDetails(e){let t=e.trim(),r=t.indexOf(`
`);if(r!==-1){let a=t.substring(0,r).trim(),i=t.substring(r+1).trim();return[a,i]}return[t,void 0]}extractTags(e,t){let r=this.triggerConfig.getTagTrigger();if(!r)return e;let a=this.escapeRegex(r),i=new RegExp(`${a}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),s=e.match(i);return s?(t.tags.push(...s.map(o=>o.substring(r.length))),this.cleanupWhitespace(e.replace(i,""))):e}extractContexts(e,t){let r=this.triggerConfig.getContextTrigger();if(!r)return e;let a=this.escapeRegex(r),i=new RegExp(`${a}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),s=e.match(i);return s?(t.contexts.push(...s.map(o=>o.substring(r.length))),this.cleanupWhitespace(e.replace(i,""))):e}extractProjects(e,t){let r=this.triggerConfig.getProjectTrigger();if(!r)return e;let a=e,i=this.escapeRegex(r),s=new RegExp(`${i}\\[\\[.*?\\]\\]`,"g"),o=a.match(s);o&&(t.projects.push(...o.map(d=>d.slice(r.length))),a=this.cleanupWhitespace(a.replace(s,"")));let l=new RegExp(`${i}[\\p{L}\\p{N}\\p{M}_/-]+`,"gu"),c=a.match(l);return c&&(t.projects.push(...c.map(d=>d.substring(r.length))),a=this.cleanupWhitespace(a.replace(l,""))),a}extractUserFields(e,t){let r=e,a=this.triggerConfig.getAllEnabledTriggers().filter(i=>this.triggerConfig.isUserField(i.propertyId));for(let i of a){let s=this.triggerConfig.getUserField(i.propertyId);if(!s)continue;let o=this.escapeRegex(i.trigger);if(s.type==="list"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"gu"),c=[],d;for(;(d=l.exec(r))!==null;){let u=d[1]||d[2];c.push(u)}c.length>0&&(t.userFields||(t.userFields={}),t.userFields[s.id]=c,r=this.cleanupWhitespace(r.replace(l,"")))}else if(s.type==="text"||s.type==="boolean"||s.type==="number"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"u"),c=r.match(l);if(c){let d=c[1]||c[2];t.userFields||(t.userFields={}),s.type==="boolean"?t.userFields[s.id]=d.toLowerCase()==="true"?"true":"false":t.userFields[s.id]=d,r=this.cleanupWhitespace(r.replace(l,""))}}else if(s.type==="date"){let l=new RegExp(`${o}(?:"([^"]+)"|([\\p{L}\\p{N}\\p{M}_/-]+))`,"u"),c=r.match(l);if(c){let d=c[1]||c[2];t.userFields||(t.userFields={}),t.userFields[s.id]=d,r=this.cleanupWhitespace(r.replace(l,""))}}}return r}extractPriority(e,t){if(this.priorityConfigs.length>0){let i=[...this.priorityConfigs].sort((l,c)=>c.label.length-l.label.length),s=this.triggerConfig.getTriggerForProperty("priority"),o=s!=null&&s.enabled?s.trigger:"";for(let l of i){let c=[l.label,l.value];for(let d of c){if(!d||d.trim()==="")continue;if(o){let p=o+d,m=this.findTextMatch(e,p);if(m)return t.priority=l.value,this.cleanupWhitespace(e.replace(m.fullMatch,""))}let u=this.findTextMatch(e,d);if(u)return t.priority=l.value,this.cleanupWhitespace(e.replace(u.fullMatch,""))}}return e}let r=this.languageConfig.fallbackPriority,a=this.findPhraseValueMatch(e,[{value:"urgent",phrases:r.urgent},{value:"high",phrases:r.high},{value:"normal",phrases:r.normal},{value:"low",phrases:r.low}]);return a?(t.priority=a.value,this.removePhraseMatch(e,a.match)):e}extractStatus(e,t){if(this.statusConfigs.length>0){let i=[...this.statusConfigs].sort((l,c)=>c.label.length-l.label.length),s=this.triggerConfig.getTriggerForProperty("status"),o=s!=null&&s.enabled?s.trigger:"";for(let l of i){let c=[l.label,l.value];for(let d of c){if(!d||d.trim()==="")continue;if(o){let p=o+d,m=this.findTextMatch(e,p);if(m)return t.status=l.value,this.cleanupWhitespace(e.replace(m.fullMatch,""))}let u=this.findTextMatch(e,d);if(u)return t.status=l.value,this.cleanupWhitespace(e.replace(u.fullMatch,""))}}return e}let r=this.languageConfig.fallbackStatus,a=this.findPhraseValueMatch(e,[{value:"open",phrases:r.open},{value:"in-progress",phrases:r.inProgress},{value:"done",phrases:r.done},{value:"cancelled",phrases:r.cancelled},{value:"waiting",phrases:r.waiting}]);return a?(t.status=a.value,this.removePhraseMatch(e,a.match)):e}findTextMatch(e,t){let r=this.findPhraseMatch(e,[t]);if(!r)return null;let a=this.includeTrailingPhraseSeparator(e,r.endIndex);return{fullMatch:e.substring(r.startIndex,a),startIndex:r.startIndex}}findPhraseMatch(e,t){let r=t.filter(s=>s&&s.trim()!=="").sort((s,o)=>o.length-s.length);if(r.length===0)return null;let a=e.toLowerCase(),i=null;for(let s of r){let o=s.toLowerCase(),l=0;for(;l<=a.length;){let c=a.indexOf(o,l);if(c===-1)break;let d=c+s.length;if(this.hasPhraseBoundaries(e,c,d)){let u={fullMatch:e.substring(c,d),phrase:s,startIndex:c,endIndex:d};(!i||u.startIndex<i.startIndex||u.startIndex===i.startIndex&&u.phrase.length>i.phrase.length)&&(i=u)}l=c+1}}return i}findPhraseValueMatch(e,t){let r=null;for(let a of t){let i=this.findPhraseMatch(e,a.phrases);i&&(!r||i.startIndex<r.match.startIndex||i.startIndex===r.match.startIndex&&i.phrase.length>r.match.phrase.length)&&(r={value:a.value,match:i})}return r}removePhraseMatch(e,t){let r=this.includeTrailingPhraseSeparator(e,t.endIndex);return this.cleanupWhitespace(e.substring(0,t.startIndex)+e.substring(r))}hasPhraseBoundaries(e,t,r){if(["zh","ja"].includes(this.languageConfig.code))return!0;let a=this.getCodePointBefore(e,t),i=this.getCodePointAt(e,r);return!this.isWordCharacter(a)&&!this.isWordCharacter(i)}getCodePointBefore(e,t){return t<=0?"":Array.from(e.slice(0,t)).pop()||""}getCodePointAt(e,t){return t>=e.length?"":Array.from(e.slice(t))[0]||""}isWordCharacter(e){return e!==""&&/[\p{L}\p{N}\p{M}_]/u.test(e)}includeTrailingPhraseSeparator(e,t){return/[:,;]/.test(e[t]||"")?t+1:t}parseUnifiedDatesAndTimes(e,t){var a,i;let r=e;try{let s=this.getChronoParser(),o=this.languageConfig.dateTriggers,l=[{type:"due",phrases:o.due},{type:"scheduled",phrases:o.scheduled}],c=!1;for(let v of l){let k=this.findPhraseMatch(r,v.phrases);if(k){let T=r.substring(k.endIndex),b=this.parseChronoFromPosition(T);if(b.success){c=!0,v.type==="due"?(t.dueDate=b.date,b.time&&(t.dueTime=b.time)):(t.scheduledDate=b.date,b.time&&(t.scheduledTime=b.time));let w=this.getChronoMatchOffset(T,b),S=b.matchedText?k.endIndex+w+b.matchedText.length:k.endIndex;r=r.substring(0,k.startIndex)+r.substring(S),r=this.cleanupWhitespace(r)}}}if(c)return r;let d=s.parse(e,new Date,{forwardDate:!0});if(d.length===0)return e;let u=d[0],p=u.text,m=u.start.date(),f=(a=u.end)==null?void 0:a.date(),h=this.findPhraseMatch(u.text,o.due)!==null,g=this.findPhraseMatch(u.text,o.scheduled)!==null;if(f&&ta(f)&&f.getTime()!==m.getTime())t.scheduledDate=D(m,"yyyy-MM-dd"),u.start.isCertain("hour")&&(t.scheduledTime=D(m,"HH:mm")),t.dueDate=D(f,"yyyy-MM-dd"),(i=u.end)!=null&&i.isCertain("hour")&&(t.dueTime=D(f,"HH:mm"));else if(ta(m)){let v=D(m,"yyyy-MM-dd"),k=u.start.isCertain("hour")?D(m,"HH:mm"):void 0;h&&!g?(t.dueDate=v,t.dueTime=k):g&&!h||this.defaultToScheduled?(t.scheduledDate=v,t.scheduledTime=k):(t.dueDate=v,t.dueTime=k)}r=r.replace(p,"").trim(),r=this.cleanupWhitespace(r)}catch(s){console.debug("Error in unified date parsing:",s)}return r}parseChronoFromPosition(e){try{let r=this.getChronoParser().parse(e,new Date,{forwardDate:!0});if(r.length>0){let a=r[0];if(a.index<=3){let i=a.start.date();if(ta(i)){let s={success:!0,date:D(i,"yyyy-MM-dd"),matchedText:a.text,startIndex:a.index};return a.start.isCertain("hour")&&(s.time=D(i,"HH:mm")),s}}}}catch(t){console.debug("Error parsing date with chrono:",t)}return{success:!1}}getChronoMatchOffset(e,t){var i;let r=(i=t.startIndex)!=null?i:0;if(!t.matchedText)return r;let a=e.indexOf(t.matchedText);return a!==-1?a:r}buildRecurrencePatterns(){let e=this.languageConfig.recurrence,t=[],{boundary:r,endBoundary:a}=this.boundaries,i=s=>s.map(o=>this.escapeRegex(o)).join("|");return t.push(...this.buildOrdinalWeekdayPatterns(e,r,a,i)),t.push(...this.buildIntervalPatterns(e,r,a,i)),t.push(...this.buildEveryOtherPatterns(e,r,a,i)),t.push(...this.buildWeekdayPatterns(e,r,a,i)),t.push(...this.buildFrequencyPatterns(e,r,a,i)),t}buildOrdinalWeekdayPatterns(e,t,r,a){let i=a(e.every),s=a([...e.ordinals.first,...e.ordinals.second,...e.ordinals.third,...e.ordinals.fourth,...e.ordinals.last]),o=a([...e.weekdays.monday,...e.weekdays.tuesday,...e.weekdays.wednesday,...e.weekdays.thursday,...e.weekdays.friday,...e.weekdays.saturday,...e.weekdays.sunday]);return[{regex:new RegExp(`${t}(${i})\\s+(${s})\\s+(${o})${r}`,"i"),handler:l=>{let c=l[2].toLowerCase(),d=l[3].toLowerCase(),u=1;return e.ordinals.second.some(m=>m.toLowerCase()===c)?u=2:e.ordinals.third.some(m=>m.toLowerCase()===c)?u=3:e.ordinals.fourth.some(m=>m.toLowerCase()===c)?u=4:e.ordinals.last.some(m=>m.toLowerCase()===c)&&(u=-1),`FREQ=MONTHLY;BYDAY=${this.getWeekdayRRuleCode(d,e)};BYSETPOS=${u}`}}]}buildIntervalPatterns(e,t,r,a){let i=a(e.every),s=a([...e.periods.day,...e.periods.week,...e.periods.month,...e.periods.year]);return[{regex:new RegExp(`${t}(${i})\\s+(\\d+)\\s+(${s})${r}`,"i"),handler:o=>{let l=parseInt(o[2]),c=o[3].toLowerCase();return`FREQ=${this.getPeriodFrequency(c,e)};INTERVAL=${l}`}}]}buildEveryOtherPatterns(e,t,r,a){let i=a(e.every),s=a(e.other),o=a([...e.periods.day,...e.periods.week,...e.periods.month,...e.periods.year]);return[{regex:new RegExp(`${t}(${i})\\s+(${s})\\s+(${o})${r}`,"i"),handler:l=>{let c=l[3].toLowerCase();return`FREQ=${this.getPeriodFrequency(c,e)};INTERVAL=2`}}]}buildWeekdayPatterns(e,t,r,a){let i=a(e.every),s=a([...e.weekdays.monday,...e.weekdays.tuesday,...e.weekdays.wednesday,...e.weekdays.thursday,...e.weekdays.friday,...e.weekdays.saturday,...e.weekdays.sunday]),o=a([...e.pluralWeekdays.monday,...e.pluralWeekdays.tuesday,...e.pluralWeekdays.wednesday,...e.pluralWeekdays.thursday,...e.pluralWeekdays.friday,...e.pluralWeekdays.saturday,...e.pluralWeekdays.sunday]);return[{regex:new RegExp(`${t}(${i})\\s+(${s})${r}`,"i"),handler:l=>{let c=l[2].toLowerCase();return`FREQ=WEEKLY;BYDAY=${this.getWeekdayRRuleCode(c,e)}`}},{regex:new RegExp(`${t}(${o})${r}`,"i"),handler:l=>{let c=l[1].toLowerCase();return`FREQ=WEEKLY;BYDAY=${this.getPluralWeekdayRRuleCode(c,e)}`}}]}buildFrequencyPatterns(e,t,r,a){return[{regex:new RegExp(`${t}(${a(e.frequencies.daily)})${r}`,"i"),handler:()=>"FREQ=DAILY"},{regex:new RegExp(`${t}(${a(e.frequencies.weekly)})${r}`,"i"),handler:()=>"FREQ=WEEKLY"},{regex:new RegExp(`${t}(${a(e.frequencies.monthly)})${r}`,"i"),handler:()=>"FREQ=MONTHLY"},{regex:new RegExp(`${t}(${a(e.frequencies.yearly)})${r}`,"i"),handler:()=>"FREQ=YEARLY"}]}getPeriodFrequency(e,t){return t.periods.week.some(r=>r.toLowerCase()===e)?"WEEKLY":t.periods.month.some(r=>r.toLowerCase()===e)?"MONTHLY":t.periods.year.some(r=>r.toLowerCase()===e)?"YEARLY":"DAILY"}getWeekdayRRuleCode(e,t){return t.weekdays.tuesday.some(r=>r.toLowerCase()===e)?"TU":t.weekdays.wednesday.some(r=>r.toLowerCase()===e)?"WE":t.weekdays.thursday.some(r=>r.toLowerCase()===e)?"TH":t.weekdays.friday.some(r=>r.toLowerCase()===e)?"FR":t.weekdays.saturday.some(r=>r.toLowerCase()===e)?"SA":t.weekdays.sunday.some(r=>r.toLowerCase()===e)?"SU":"MO"}getPluralWeekdayRRuleCode(e,t){return t.pluralWeekdays.tuesday.some(r=>r.toLowerCase()===e)?"TU":t.pluralWeekdays.wednesday.some(r=>r.toLowerCase()===e)?"WE":t.pluralWeekdays.thursday.some(r=>r.toLowerCase()===e)?"TH":t.pluralWeekdays.friday.some(r=>r.toLowerCase()===e)?"FR":t.pluralWeekdays.saturday.some(r=>r.toLowerCase()===e)?"SA":t.pluralWeekdays.sunday.some(r=>r.toLowerCase()===e)?"SU":"MO"}extractRecurrence(e,t){for(let r of this.recurrencePatterns){let a=e.match(r.regex);if(a){let i=r.handler(a);if(this.isValidRRuleString(i))return t.recurrence=i,this.cleanupWhitespace(e.replace(r.regex,""))}}return e}isValidRRuleString(e){if(e.includes("BYDAY=undefined")||e.includes("BYDAY=;")||e.includes("BYDAY=")){let t=e.match(/BYDAY=([^;]*)/);if(t&&(!t[1]||t[1]==="undefined"||t[1].trim()===""))return!1}return!!e.includes("FREQ=")}extractTimeEstimate(e,t){let r=this.languageConfig.timeEstimate,{boundary:a,endBoundary:i}=this.boundaries,s=[{regex:new RegExp(`${a}(\\d+)(${r.hours.map(c=>this.escapeRegex(c)).join("|")})\\s*(\\d+)(${r.minutes.map(c=>this.escapeRegex(c)).join("|")})${i}`,"i"),handler:c=>parseInt(c[1])*60+parseInt(c[3])},{regex:new RegExp(`${a}(\\d+)\\s*(${r.hours.map(c=>this.escapeRegex(c)).join("|")})${i}`,"i"),handler:c=>parseInt(c[1])*60},{regex:new RegExp(`${a}(\\d+)\\s*(${r.minutes.map(c=>this.escapeRegex(c)).join("|")})${i}`,"i"),handler:c=>parseInt(c[1])}],o=e,l=0;for(let c of s){let d=o.match(c.regex);d&&(l+=c.handler(d),o=this.cleanupWhitespace(o.replace(c.regex,"")))}return l>0&&(t.estimate=l),o}validateAndCleanupResult(e){return e.title.trim()||(e.title="Untitled Task"),e.tags=[...new Set(e.tags.filter(Boolean))],e.contexts=[...new Set(e.contexts.filter(Boolean))],e.projects=[...new Set(e.projects.filter(Boolean))],e.dueDate&&!this.isValidDateString(e.dueDate)&&delete e.dueDate,e.scheduledDate&&!this.isValidDateString(e.scheduledDate)&&delete e.scheduledDate,e.dueTime&&!this.isValidTimeString(e.dueTime)&&delete e.dueTime,e.scheduledTime&&!this.isValidTimeString(e.scheduledTime)&&delete e.scheduledTime,e}getPreviewData(e){let t=[];if(e.title&&t.push({icon:"edit-3",text:`"${e.title}"`}),e.details&&t.push({icon:"file-text",text:`Details: "${e.details.substring(0,50)}${e.details.length>50?"...":""}"`}),e.dueDate){let r=e.dueTime?`${e.dueDate} at ${e.dueTime}`:e.dueDate;t.push({icon:"calendar",text:`Due: ${r}`})}if(e.scheduledDate){let r=e.scheduledTime?`${e.scheduledDate} at ${e.scheduledTime}`:e.scheduledDate;t.push({icon:"calendar-clock",text:`Scheduled: ${r}`})}if(e.priority&&t.push({icon:"alert-triangle",text:`Priority: ${e.priority}`}),e.status&&t.push({icon:"activity",text:`Status: ${e.status}`}),e.contexts&&e.contexts.length>0&&t.push({icon:"map-pin",text:`Contexts: ${e.contexts.map(r=>"@"+r).join(", ")}`}),e.projects&&e.projects.length>0){let r=e.projects.map(a=>`+${a}`).join(", ");t.push({icon:"folder",text:`Projects: ${r}`})}if(e.tags&&e.tags.length>0&&t.push({icon:"tag",text:`Tags: ${e.tags.map(r=>"#"+r).join(", ")}`}),e.recurrence){let r="Invalid recurrence";try{e.recurrence.includes("FREQ=")&&this.isValidRRuleString(e.recurrence)&&(r=m2e.fromString(e.recurrence).toText())}catch(a){console.debug("Error parsing rrule for preview:",a)}t.push({icon:"repeat",text:`Recurrence: ${r}`})}if(e.estimate&&t.push({icon:"clock",text:`Estimate: ${e.estimate} min`}),e.userFields&&Object.keys(e.userFields).length>0)for(let[r,a]of Object.entries(e.userFields)){let i=this.triggerConfig.getUserField(r),s=(i==null?void 0:i.displayName)||r,o;Array.isArray(a)?o=a.join(", "):o=a,t.push({icon:"box",text:`${s}: ${o}`})}return t}getPreviewText(e){return this.getPreviewData(e).map(t=>t.text).join(" • ")}getStatusSuggestions(e,t=10){let r=e.toLowerCase();return this.statusConfigs.filter(a=>a&&typeof a.value=="string"&&typeof a.label=="string").filter(a=>a.value.trim()!==""&&a.label.trim()!=="").filter(a=>a.value.toLowerCase().includes(r)||a.label.toLowerCase().includes(r)).slice(0,t).map(a=>({value:a.value,label:a.label,display:a.label}))}}});var Goe=y(()=>{Tre();lB();cB();dB();qoe()});function f2e(){return typeof navigator!="undefined"&&navigator.language?navigator.language:void 0}function h2e(n){var t,r;let e=(r=(t=n.settings.calendarViewSettings)==null?void 0:t.locale)==null?void 0:r.trim();return e||f2e()||n.settings.nlpLanguage||"en"}var Nn,Wl=y(()=>{Goe();Nn=class n extends FA{static fromPlugin(e){let t=e.settings;return new n(t.customStatuses,t.customPriorities,t.nlpDefaultToScheduled,t.nlpLanguage,t.nlpTriggers,t.userFields,{dateLocale:h2e(e)})}constructor(e=[],t=[],r=!0,a="en",i,s,o){super(e,t,r,a,i,s,o),this.taskNotesNlpTriggers=i,this.taskNotesStatusConfigs=e,this.taskNotesUserFields=s||[],this.taskNotesPriorityConfigs=t}parseInput(e){let t=super.parseInput(e),r=this.applyTriggeredStatusMatch(e,t),a=this.removePriorityShortcutResidue(e,r),i=this.extractLinkedUserFields(e,a);return this.normalizeUserFieldValues(i)}applyTriggeredStatusMatch(e,t){let r=this.findTriggeredStatusMatch(e);if(!r)return t;t.status=r.config.value;let a=t.title;for(let i of this.getStatusShortcutResidues(r.token))a=this.removeTokenFragment(a,i);return t.title=a||"Untitled Task",t}findTriggeredStatusMatch(e){var a;let t=this.getStatusTrigger();if(!t||this.taskNotesStatusConfigs.length===0)return null;let r=[];for(let i of this.taskNotesStatusConfigs)for(let s of this.getStatusPhrases(i))r.push({config:i,token:`${t}${s}${t}`}),r.push({config:i,token:`${t}${s}`});return r.sort((i,s)=>s.token.length-i.token.length),(a=r.find(i=>this.containsToken(e,i.token)))!=null?a:null}getStatusShortcutResidues(e){let t=new Set([e]);for(let r of this.taskNotesStatusConfigs)for(let a of this.getStatusPhrases(r)){let i=this.removeFirstCaseInsensitive(e,a);i&&i!==e&&this.addStatusShortcutResidue(t,i)}return Array.from(t).filter(r=>r.trim().length>0).sort((r,a)=>a.length-r.length)}addStatusShortcutResidue(e,t){e.add(t),e.add(t.replace(/\s+/g," ").trim())}getStatusPhrases(e){return[e.value,e.label].filter(t=>typeof t=="string"&&t.trim().length>0).map(t=>t.trim())}removePriorityShortcutResidue(e,t){if(!t.priority||this.taskNotesPriorityConfigs.length===0)return t;let r=this.taskNotesPriorityConfigs.find(c=>c.value===t.priority);if(!r)return t;let a=this.getPriorityTrigger(),i=[r.value,r.label].filter(c=>typeof c=="string"&&c.trim().length>0).flatMap(c=>a?[`${a}${c}`,c]:[c]),s=[r.label,r.value].filter(c=>typeof c=="string"&&c.trim().length>0),o=new Set;for(let c of i)if(this.containsToken(e,c))for(let d of s){let u=this.removeFirstCaseInsensitive(c,d);!u||u===c||o.add(u)}let l=t.title;for(let c of Array.from(o).sort((d,u)=>u.length-d.length))l=this.removeTokenFragment(l,c);return t.title=l||"Untitled Task",t}getPriorityTrigger(){var t;let e=(t=this.taskNotesNlpTriggers)==null?void 0:t.triggers.find(r=>r.propertyId==="priority");return(e==null?void 0:e.trigger)||""}getStatusTrigger(){var t;let e=(t=this.taskNotesNlpTriggers)==null?void 0:t.triggers.find(r=>r.propertyId==="status");return(e==null?void 0:e.enabled)===!1?"":(e==null?void 0:e.trigger)||"*"}containsToken(e,t){let r=this.escapeRegexLiteral(t);return new RegExp(`(^|\\s)${r}(?=\\s|$)`,"iu").test(e)}removeTokenFragment(e,t){let r=this.escapeRegexLiteral(t);return e.replace(new RegExp(`(^|\\s)${r}(?=\\s|$)`,"giu"),"$1").replace(/\s+/g," ").trim()}removeFirstCaseInsensitive(e,t){let r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?null:`${e.slice(0,r)}${e.slice(r+t.length)}`}normalizeUserFieldValues(e){var r;if(!e.userFields)return e;let t=e.userFields;for(let a of this.taskNotesUserFields){let i=t[a.id];if(typeof i=="string")if(a.type==="boolean"){let s=i.trim().toLowerCase();s==="true"?t[a.id]=!0:s==="false"&&(t[a.id]=!1)}else a.type==="date"&&(t[a.id]=(r=this.normalizeDateUserFieldValue(i))!=null?r:i)}return e}normalizeDateUserFieldValue(e){let t=e.trim();if(!t)return null;let r=super.parseInput(t);return r.scheduledDate||r.dueDate||null}extractLinkedUserFields(e,t){var i;let r=((i=this.taskNotesNlpTriggers)==null?void 0:i.triggers)||[];if(r.length===0||this.taskNotesUserFields.length===0)return t;let a=t.title;for(let s of r){if(!s.enabled)continue;let o=this.taskNotesUserFields.find(p=>p.id===s.propertyId);if(!o)continue;let l=this.escapeRegexLiteral(s.trigger),c=new RegExp(`${l}(\\[\\[[^\\]]+\\]\\]|\\[[^\\]]+\\]\\([^\\)]+\\))`,"gu"),d=Array.from(e.matchAll(c));if(d.length===0)continue;let u=d.map(p=>p[1]).filter(p=>typeof p=="string"&&p.length>0);if(u.length!==0){if(t.userFields||(t.userFields={}),o.type==="list"){let p=t.userFields[o.id],m=Array.isArray(p)?p:typeof p=="string"?[p]:[];t.userFields[o.id]=[...m,...u]}else t.userFields[o.id]=u[u.length-1];a=a.replace(c,"").replace(/\s+/g," ").trim()}}return t.title=a,t}escapeRegexLiteral(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}});function Yoe(n){return n.padStart(2,"0")}function Koe(n,e,t){let r=Number(n),a=Number(e),i=Number(t),s=new Date(r,a-1,i);return s.getFullYear()!==r||s.getMonth()!==a-1||s.getDate()!==i?null:`${n}-${Yoe(e)}-${Yoe(t)}`}function h$(n){let e=n.trim();if(!e)return null;let t=g2e.exec(e);if(t)return Koe(t[1],t[2],t[3]);let r=y2e.exec(e);return r?Koe(r[1],r[2],r[3]):null}function g$(n,e,t){var r;n.value=e,(r=t.onCommit)==null||r.call(t,e),n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0}))}function v2e(n){return n.key.length===1&&/\d/.test(n.key)&&!n.altKey&&!n.ctrlKey&&!n.metaKey}function ql(n,e={}){var c,d;let t="",r=0,a=(c=e.now)!=null?c:(()=>Date.now()),i=(d=e.typeBufferResetMs)!=null?d:1500,s=u=>{if(!v2e(u))return;let p=a();p-r>i&&(t=""),r=p,t=`${t}${u.key}`.slice(-8);let m=h$(t);m&&(u.preventDefault(),t="",g$(n,m,e))},o=u=>{var f,h;let p=(h=(f=u.clipboardData)==null?void 0:f.getData("text"))!=null?h:"",m=h$(p);m&&(u.preventDefault(),t="",g$(n,m,e))},l=()=>{let u=h$(n.value);!u||u===n.value||(t="",g$(n,u,e))};return n.addEventListener("keydown",s),n.addEventListener("paste",o),n.addEventListener("input",l),()=>{n.removeEventListener("keydown",s),n.removeEventListener("paste",o),n.removeEventListener("input",l)}}var g2e,y2e,rC=y(()=>{g2e=/^(\d{4})(\d{2})(\d{2})$/,y2e=/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/});var ele={};Xe(ele,{DateTimePickerModal:()=>oo,formatCalendarDate:()=>Qoe,getParsedDateTimeSelection:()=>Joe,parseNaturalLanguageDateTime:()=>Xoe});function Zoe(n){return String(n).padStart(2,"0")}function Qoe(n,e,t){return`${n}-${Zoe(e+1)}-${Zoe(t)}`}function Joe(n,e){let t=n.scheduledDate||n.dueDate,r=n.scheduledDate?n.scheduledTime:n.dueTime;if(e==="due"?(t=n.dueDate,r=n.dueTime):e==="scheduled"&&(t=n.scheduledDate,r=n.scheduledTime),t)return{date:t,time:r||null};let a=e==="due"?n.scheduledDate:n.dueDate,i=e==="due"?n.scheduledTime:n.dueTime;return a?{date:a,time:i||null}:null}function Xoe(n,e,t){let r=n.trim();return r?Joe(e.parseInput(r),t):null}function k2e(n,e){let t=new Date(n);return t.setDate(t.getDate()+e),t}function T2e(n){let e=new Date(n),t=(1-e.getDay()+7)%7||7;return e.setDate(e.getDate()+t),e}var Bf,oo,$y=y(()=>{Bf=require("obsidian");Wl();rC();oo=class extends Bf.Modal{constructor(t,r){var a;super(t);this.naturalLanguageInput=null;this.dateInput=null;this.timeInput=null;this.selectButtonEl=null;this.detachDateInputBehavior=null;this.options=r,this.selectedDate=(a=r.currentDate)!=null?a:null}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("tasknotes-plugin","date-time-picker-modal"),this.options.title&&t.createEl("h3",{text:this.options.title,cls:"date-time-picker-modal__title"}),this.renderQuickActions(t),this.renderNaturalLanguageInput(t),this.renderDateInput(t),this.shouldShowTime()&&this.renderTimeInput(t),this.renderActions(t),this.updateSelectButtonState(),window.setTimeout(()=>{var r;this.canUseNaturalLanguageInput()&&this.naturalLanguageInput?this.naturalLanguageInput.focus():(r=this.dateInput)==null||r.focus()},100)}onClose(){var t;(t=this.detachDateInputBehavior)==null||t.call(this),this.detachDateInputBehavior=null,this.contentEl.empty()}renderQuickActions(t){let r=new Date,a=[{label:"Today",date:r},{label:"Tomorrow",date:k2e(r,1)},{label:"Next week",date:T2e(r)}],i=t.createDiv({cls:"date-time-picker-modal__quick-actions"});for(let s of a)i.createEl("button",{text:s.label,cls:"date-time-picker-modal__quick-button",attr:{type:"button"}}).addEventListener("click",()=>{this.selectDate(Qoe(s.date.getFullYear(),s.date.getMonth(),s.date.getDate()))})}renderNaturalLanguageInput(t){if(!this.canUseNaturalLanguageInput())return;let r=t.createDiv({cls:"date-time-picker-modal__nlp-row"});this.naturalLanguageInput=r.createEl("input",{cls:"date-time-picker-modal__nlp-input",attr:{type:"text",placeholder:"Tomorrow at 3pm","aria-label":"Natural language date"}}),this.naturalLanguageInput.addEventListener("keydown",i=>{i.key==="Enter"&&(i.preventDefault(),this.applyNaturalLanguageInput())});let a=r.createEl("button",{cls:"clickable-icon date-time-picker-modal__nlp-button",attr:{type:"button","aria-label":"Apply natural language date",title:"Apply natural language date"}});(0,Bf.setIcon)(a,"wand"),a.addEventListener("click",()=>this.applyNaturalLanguageInput())}renderDateInput(t){var o;let r=t.createDiv({cls:"date-time-picker-modal__date-field"});r.createEl("label",{text:"Date",cls:"date-time-picker-modal__field-label",attr:{for:"tasknotes-date-time-picker-date"}});let a=r.createDiv({cls:"date-time-picker-modal__native-date-control"});this.dateInput=a.createEl("input",{cls:"date-time-picker-modal__date-input",attr:{id:"tasknotes-date-time-picker-date",type:"date",value:(o=this.selectedDate)!=null?o:"","aria-label":"Date"}});let i=()=>{var l;this.updateSelectedDate(((l=this.dateInput)==null?void 0:l.value)||null)};this.dateInput.addEventListener("input",i),this.dateInput.addEventListener("change",i),this.detachDateInputBehavior=ql(this.dateInput,{onCommit:l=>this.updateSelectedDate(l)}),this.dateInput.addEventListener("keydown",l=>{var c;l.key==="Enter"&&((c=this.dateInput)!=null&&c.value)&&(l.preventDefault(),this.updateSelectedDate(this.dateInput.value),this.confirmSelectedDate())});let s=a.createEl("button",{cls:"clickable-icon date-time-picker-modal__native-date-button",attr:{type:"button","aria-label":"Open native date picker",title:"Open native date picker"}});(0,Bf.setIcon)(s,"calendar-days"),s.addEventListener("click",()=>{var l,c,d;(c=(l=this.dateInput)==null?void 0:l.showPicker)==null||c.call(l),(d=this.dateInput)==null||d.focus()})}renderTimeInput(t){var a;let r=t.createDiv({cls:"date-time-picker-modal__time-field"});r.createEl("label",{text:"Time (optional)",cls:"date-time-picker-modal__field-label",attr:{for:"tasknotes-date-time-picker-time"}}),this.timeInput=r.createEl("input",{cls:"date-time-picker-modal__time-input",attr:{id:"tasknotes-date-time-picker-time",type:"time",value:(a=this.options.currentTime)!=null?a:""}}),this.timeInput.addEventListener("keydown",i=>{i.key==="Enter"&&this.selectedDate&&(i.preventDefault(),this.confirmSelectedDate())})}renderActions(t){let r=t.createDiv({cls:"date-time-picker-modal__actions"});this.options.currentDate&&r.createEl("button",{text:"Clear date",cls:"date-time-picker-modal__action-button",attr:{type:"button"}}).addEventListener("click",()=>{this.options.onSelect(null,null),this.close()}),r.createEl("button",{text:"Cancel",cls:"date-time-picker-modal__action-button",attr:{type:"button"}}).addEventListener("click",()=>this.close()),this.selectButtonEl=r.createEl("button",{text:"Select",cls:"mod-cta date-time-picker-modal__action-button",attr:{type:"button"}}),this.selectButtonEl.addEventListener("click",()=>this.confirmSelectedDate())}selectDate(t){this.updateSelectedDate(t),this.confirmSelectedDate()}updateSelectedDate(t){this.selectedDate=t,this.dateInput&&this.dateInput.value!==(t!=null?t:"")&&(this.dateInput.value=t!=null?t:""),this.updateSelectButtonState()}confirmSelectedDate(){var t;this.selectedDate&&(this.options.onSelect(this.selectedDate,this.shouldShowTime()&&((t=this.timeInput)==null?void 0:t.value)||null),this.close())}updateSelectButtonState(){this.selectButtonEl&&(this.selectButtonEl.disabled=!this.selectedDate)}canUseNaturalLanguageInput(){var t;return this.options.naturalLanguageParser?!0:!!((t=this.options.plugin)!=null&&t.settings.enableNaturalLanguageInput)}shouldShowTime(){return this.options.showTime!==!1}getNaturalLanguageParser(){var t;return this.options.naturalLanguageParser?this.options.naturalLanguageParser:(t=this.options.plugin)!=null&&t.settings.enableNaturalLanguageInput?Nn.fromPlugin(this.options.plugin):null}applyNaturalLanguageInput(){var i,s;let t=this.getNaturalLanguageParser(),r=(s=(i=this.naturalLanguageInput)==null?void 0:i.value)!=null?s:"",a=t?Xoe(r,t,this.options.dateRole):null;if(!a){new Bf.Notice("Could not find a date in that text.");return}this.options.onSelect(a.date,this.shouldShowTime()?a.time:null),this.close()}}});var rle={};Xe(rle,{DateContextMenu:()=>rl});function w2e(){return(0,tle.moment)()}function S2e(n){return n.setSubmenu()}var tle,b2e,rl,Uy=y(()=>{tle=require("obsidian");Md();Id();$y();xe();q();b2e=M({tag:"Components/DateContextMenu"});rl=class{constructor(e){this.menu=new ra,this.options=e,this.buildMenu()}t(e,t,r){var a;return((a=this.options.plugin)==null?void 0:a.i18n.translate(e,r))||t||e}getFirstDayOfWeek(){var t,r,a;let e=(a=(r=(t=this.options.plugin)==null?void 0:t.settings)==null?void 0:r.calendarViewSettings)==null?void 0:a.firstDay;return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=6?e:0}buildMenu(){this.options.title&&(this.menu.addItem(i=>{i.setTitle(this.options.title||""),i.setIcon("calendar"),i.setDisabled(!0)}),this.menu.addSeparator());let e=this.getDateOptions(),t=e.filter(i=>i.category==="increment");t.length>0&&(t.forEach(i=>{this.menu.addItem(s=>{i.icon&&s.setIcon(i.icon),s.setTitle(i.label),s.onClick(async()=>{this.options.onSelect(i.value,null)})})}),this.menu.addSeparator()),e.filter(i=>i.category==="basic").forEach(i=>{this.menu.addItem(s=>{i.icon&&s.setIcon(i.icon);let l=i.value&&i.value===this.options.currentValue?this.t("contextMenus.date.selected","✓ {label}",{label:i.label}):i.label;s.setTitle(l),s.onClick(async()=>{this.options.onSelect(i.value,null)})})});let a=e.filter(i=>i.category==="weekday");a.length>0&&(this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.date.weekdaysLabel","Weekdays")),i.setIcon("calendar");let s=S2e(i);a.forEach(o=>{s.addItem(l=>{let d=o.value&&o.value===this.options.currentValue?this.t("contextMenus.date.selected","✓ {label}",{label:o.label}):o.label;l.setTitle(d),l.setIcon("calendar"),l.onClick(async()=>{this.options.onSelect(o.value,null)})})})})),this.menu.addSeparator(),this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.date.pickDateTime","Pick date & time…")),i.setIcon("calendar"),i.onClick(async()=>{this.showDateTimePicker()})}),this.options.currentValue&&this.menu.addItem(i=>{i.setTitle(this.t("contextMenus.date.clearDate","Clear date")),i.setIcon("x"),i.onClick(async()=>{this.options.onSelect(null,null)})})}show(e){za(this.menu,e)}showAtElement(e){jl(this.menu,e)}getDateOptions(){let e=w2e(),t=[];this.options.currentValue&&(t.push({label:this.t("contextMenus.date.increment.plusOneDay","+1 day"),value:ay(this.options.currentValue,1),icon:"plus",category:"increment"}),t.push({label:this.t("contextMenus.date.increment.minusOneDay","-1 day"),value:ay(this.options.currentValue,-1),icon:"minus",category:"increment"}),t.push({label:this.t("contextMenus.date.increment.plusOneWeek","+1 week"),value:ay(this.options.currentValue,7),icon:"plus-circle",category:"increment"}),t.push({label:this.t("contextMenus.date.increment.minusOneWeek","-1 week"),value:ay(this.options.currentValue,-7),icon:"minus-circle",category:"increment"})),t.push({label:this.t("contextMenus.date.basic.today","Today"),value:e.format("YYYY-MM-DD"),icon:"calendar-check",isToday:!0,category:"basic"}),t.push({label:this.t("contextMenus.date.basic.tomorrow","Tomorrow"),value:e.clone().add(1,"day").format("YYYY-MM-DD"),icon:"calendar-plus",category:"basic"});let r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=this.getFirstDayOfWeek();[...r.slice(a),...r.slice(0,a)].forEach(c=>{let d=r.indexOf(c),u=e.clone().day(d);u.isSameOrBefore(e,"day")&&(u=u.add(1,"week"));let p=this.t(`common.weekdays.${c.toLowerCase()}`,c);t.push({label:p,value:u.format("YYYY-MM-DD"),icon:"calendar",category:"weekday"})});let s=e.clone().day(6);(s.isBefore(e)||s.isSame(e,"day"))&&s.add(1,"week"),t.push({label:this.t("contextMenus.date.basic.thisWeekend","This weekend"),value:s.format("YYYY-MM-DD"),icon:"calendar-days",category:"basic"});let o=e.clone().day(1).add(1,"week");t.push({label:this.t("contextMenus.date.basic.nextWeek","Next week"),value:o.format("YYYY-MM-DD"),icon:"calendar-plus",category:"basic"});let l=e.clone().add(1,"month").startOf("month");return t.push({label:this.t("contextMenus.date.basic.nextMonth","Next month"),value:l.format("YYYY-MM-DD"),icon:"calendar-range",category:"basic"}),t}showDateTimePicker(){var r;let e=this.options.app||((r=this.options.plugin)==null?void 0:r.app);if(!e){b2e.error("DateContextMenu: No app instance available for modal",{category:"validation",operation:"datecontextmenu-no-app-instance-modal"});return}new oo(e,{currentDate:this.options.currentValue||null,currentTime:this.options.currentTime||null,title:this.t("contextMenus.date.modal.title","Set date & time"),dateRole:this.options.dateRole,plugin:this.options.plugin,onSelect:(a,i)=>{this.options.onSelect(a,i)}}).open()}}});var nle={};Xe(nle,{ConfirmationModal:()=>Hy,showConfirmationModal:()=>ur});async function ur(n,e){return new Hy(n,e).show()}var LA,Hy,Fi=y(()=>{LA=require("obsidian"),Hy=class extends LA.Modal{constructor(e,t){super(e),this.options={confirmText:"Confirm",cancelText:"Cancel",isDestructive:!1,...t}}show(){return new Promise(e=>{this.resolve=e,this.open()})}onOpen(){let{contentEl:e}=this;e.empty(),new LA.Setting(e).setName(this.options.title).setHeading(),e.createEl("p",{text:this.options.message});let t=e.createDiv({cls:"modal-button-container"});t.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),t.classList.add("tn-static-display-flex-75816cae"),t.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),t.classList.add("tn-static-gap-10px-f3d7ce77"),t.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),t.classList.add("tn-static-justify-content-flex-end-455f8cca"),t.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),t.classList.add("tn-static-margin-top-20px-a26bda7d");let r=null;this.options.thirdButtonText&&(r=t.createEl("button",{text:this.options.thirdButtonText}),r.addEventListener("click",()=>{this.options.onThirdButton&&this.options.onThirdButton(),this.close()}));let a=t.createEl("button",{text:this.options.cancelText});a.addEventListener("click",()=>{this.resolve(!1),this.close()});let i=t.createEl("button",{text:this.options.confirmText,cls:this.options.isDestructive?"mod-warning":"mod-cta"});this.options.isDestructive&&(i.classList.remove("tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-text-accent-a954c70f"),i.classList.add("tn-static-background-color-var-color-red-134bc721"),i.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),i.classList.add("tn-static-color-white-0a43e56a")),i.addEventListener("click",()=>{this.resolve(!0),this.close()}),window.setTimeout(()=>{this.options.defaultToConfirm?i.focus():a.focus()},0)}onClose(){let{contentEl:e}=this;e.empty(),this.resolve&&this.resolve(!1)}}});async function Vy(n,e){return new y$(n,e).show()}var nC,y$,v$=y(()=>{nC=require("obsidian"),y$=class extends nC.Modal{constructor(e,t){super(e),this.options={confirmText:"Confirm",cancelText:"Cancel",...t}}show(){return new Promise(e=>{this.resolve=e,this.open()})}onOpen(){let{contentEl:e}=this;e.empty(),new nC.Setting(e).setName(this.options.title).setHeading(),new nC.Setting(e).addText(i=>{var s,o;this.inputEl=i.inputEl,i.setPlaceholder(this.options.placeholder||"").setValue(this.options.initialValue||"").onChange(()=>{}),window.setTimeout(()=>{this.inputEl.focus(),this.inputEl.select()},100),(o=(s=this.options).onInputReady)==null||o.call(s,this.inputEl)});let t=e.createDiv({cls:"modal-button-container"});t.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),t.classList.add("tn-static-display-flex-75816cae"),t.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),t.classList.add("tn-static-gap-10px-f3d7ce77"),t.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),t.classList.add("tn-static-justify-content-flex-end-455f8cca"),t.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),t.classList.add("tn-static-margin-top-20px-a26bda7d");let r=t.createEl("button",{text:this.options.cancelText});r.addEventListener("click",()=>{this.resolve(null),this.close()});let a=t.createEl("button",{text:this.options.confirmText,cls:"mod-cta"});a.addEventListener("click",()=>{let i=this.inputEl.value.trim();this.resolve(i||null),this.close()}),this.inputEl.addEventListener("keydown",i=>{i.key==="Enter"?(i.preventDefault(),a.click()):i.key==="Escape"&&(i.preventDefault(),r.click())})}onClose(){let{contentEl:e}=this;e.empty(),this.resolve&&this.resolve(null)}}});function Gl(n){let e=n.trim();return e.startsWith("#")?e.slice(1):e}function C2e(n,e){let t=Gl(n),r=Gl(e);return!t||!r?!1:t.toLowerCase()===r.toLowerCase()}function OA(n,e,t="all"){let r=Gl(n),a=Gl(e);return t==="exact-only"?C2e(r,a):ir.matchesHierarchicalTagExact(r,a)}function jd(n,e,t="all"){return n.filter(r=>!OA(r,e,t))}function k$(n){return n.taskIdentificationMethod==="tag"&&!!n.hideIdentifyingTagsInCards&&!!n.taskTag}function zA(n,e){return k$(e)?jd(n,e.taskTag,e.hideIdentifyingTagsMode):[...n]}function ale(n,e,t,r="all"){let a=[...n],i=e.filter(o=>OA(o,t,r)).map(Gl),s=i.length>0?i:[Gl(t)];for(let o of s)o&&(a.some(l=>Gl(l)===o)||a.push(o));return a}var ip=y(()=>{Ad()});function ile(n,e){n.addEventListener("focus",e),n.addEventListener("click",e)}var $A,x2e,BA,sp,jA,aC=y(()=>{$A=require("obsidian");ip();q();x2e=M({tag:"Modals/TaskModalSuggests"});BA=class extends $A.AbstractInputSuggest{constructor(e,t,r){super(e,t),this.plugin=r,this.input=t,ile(this.input,()=>this.open())}async getSuggestions(e){let t=this.input.value.split(",").map(s=>s.trim()),r=t[t.length-1],a=this.plugin.cacheManager.getAllContexts(),i=t.slice(0,-1);return a.filter(s=>s&&typeof s=="string").filter(s=>!i.includes(s)&&(!r||s.toLowerCase().includes(r.toLowerCase()))).slice(0,10).map(s=>({value:s,display:s,type:"context",toString(){return this.value}}))}renderSuggestion(e,t){t.textContent=e.display}selectSuggestion(e){let t=this.input.value.split(",").map(r=>r.trim());t[t.length-1]=e.value,this.input.value=t.join(", ")+", ",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}},sp=class extends $A.AbstractInputSuggest{constructor(e,t,r){super(e,t),this.plugin=r,this.input=t,ile(this.input,()=>this.open())}async getSuggestions(e){let t=this.input.value.split(",").map(s=>s.trim()),r=t[t.length-1],a=zA(this.plugin.cacheManager.getAllTags(),this.plugin.settings),i=t.slice(0,-1);return a.filter(s=>s&&typeof s=="string").filter(s=>!i.includes(s)&&(!r||s.toLowerCase().includes(r.toLowerCase()))).slice(0,10).map(s=>({value:s,display:s,type:"tag",toString(){return this.value}}))}renderSuggestion(e,t){t.textContent=e.display}selectSuggestion(e){let t=this.input.value.split(",").map(r=>r.trim());t[t.length-1]=e.value,this.input.value=t.join(", ")+", ",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}},jA=class extends $A.AbstractInputSuggest{constructor(e,t,r,a){super(e,t),this.plugin=r,this.input=t,this.fieldConfig=a}async getSuggestions(e){let t=this.fieldConfig.type==="list",r="",a=[];if(t?(a=this.input.value.split(",").map(o=>o.trim()),r=a[a.length-1]||""):r=this.input.value.trim(),!r)return[];let i=r.match(/\[\[([^\]]*)$/);if(i){let o=i[1]||"",{FileSuggestHelper:l}=await Promise.resolve().then(()=>(Hb(),aB));return(await l.suggest(this.plugin,o,20,this.fieldConfig.autosuggestFilter)).map(d=>({value:d.insertText,display:d.displayText,type:"user-field",fieldKey:this.fieldConfig.key,toString(){return this.value}}))}return(await this.getExistingUserFieldValues(this.fieldConfig.key)).filter(o=>o&&typeof o=="string").filter(o=>o.toLowerCase().includes(r.toLowerCase())&&(!t||!a.slice(0,-1).includes(o))).slice(0,10).map(o=>({value:o,display:o,type:"user-field",fieldKey:this.fieldConfig.key,toString(){return this.value}}))}async getExistingUserFieldValues(e){var a,i;let t=async()=>{try{let s=this.plugin.app.vault.getMarkdownFiles(),o=new Set;for(let l of s)try{let c=this.plugin.app.metadataCache.getFileCache(l),d=c==null?void 0:c.frontmatter;if(d&&d[e]!==void 0){let u=d[e];Array.isArray(u)?u.forEach(p=>{typeof p=="string"&&p.trim()&&o.add(p.trim())}):typeof u=="string"&&u.trim()?o.add(u.trim()):(typeof u=="number"||typeof u=="boolean")&&o.add(u.toString())}if(o.size>=200)break}catch(c){continue}return Array.from(o).sort()}catch(s){return x2e.error("Error getting user field values:",{category:"persistence",operation:"getting-user-field-values",error:s}),[]}},r=(i=(a=this.plugin.settings)==null?void 0:a.suggestionDebounceMs)!=null?i:0;return r?new Promise(s=>{let o=this.plugin;o.__userFieldSuggestTimer&&window.clearTimeout(o.__userFieldSuggestTimer),o.__userFieldSuggestTimer=window.setTimeout(()=>{(async()=>s(await t()))()},r)}):t()}renderSuggestion(e,t){t.textContent=e.display}selectSuggestion(e){var r;if(this.fieldConfig.type==="list"){let a=this.input.value.split(","),i=(r=a.pop())!=null?r:"",s=a.join(","),o=i.trim(),l=/\[\[/.test(o)?o.replace(/\[\[[^\]]*$/,`[[${e.value}]]`):e.value,c=(s?s+", ":"")+l;this.input.value=c.endsWith(",")?c+" ":c+", "}else{let a=this.input.value,i=a.replace(/\[\[[^\]]*$/,`[[${e.value}]]`);this.input.value=i===a?e.value:i}this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.focus()}}});function UA(n,e,t=r=>r.path){return n.map(r=>{switch(e){case"filenames":return sle(r.path);case"markdown-links":return`[[${t(r)}]]`;case"titles":return r.title||sle(r.path);case"paths":return r.path}}).join(`
`)}function sle(n){return(n.split("/").pop()||n).replace(/\.md$/i,"")}var T$=y(()=>{});function Wy(n){let e=new Set,t=[];for(let r of n!=null?n:[]){if(typeof r!="string")continue;let a=Gl(r);!a||e.has(a)||(e.add(a),t.push(a))}return t}function iC(n){return!n||typeof n!="string"?[]:Wy(n.split(","))}function ole(n,e){let t=Wy(n.tags);return e.taskIdentificationMethod!=="tag"?t:jd(t,e.taskTag,e.hideIdentifyingTagsMode)}function HA(n,e){let t=Wy(n),r=new Set(t);for(let a of e){let i=Gl(a);!i||r.has(i)||(r.add(i),t.push(i))}return t.length>0?t:void 0}function sC(n,e){let t=new Set(iC(e.join(",")));if(t.size===0){let a=Wy(n);return a.length>0?a:void 0}let r=Wy(n).filter(a=>!t.has(a));return r.length>0?r:void 0}function VA(n,e){let t=Wy(n);if(e.taskIdentificationMethod!=="tag")return;let r=t.filter(a=>OA(a,e.taskTag,e.hideIdentifyingTagsMode));return r.length>0?r:void 0}var b$=y(()=>{ip()});function qy(n){return n.setSubmenu()}function lle(n){var t,r;let e=n;return(r=(t=e.dom)!=null?t:e.domEl)!=null?r:null}var Rn,op,Gy,w$=y(()=>{Rn=require("obsidian");Uy();Md();Id();Fi();v$();aC();T$();b$();q();op=M({tag:"Components/BatchContextMenu"});Gy=class{constructor(e){this.menu=new ra,this.options=e,this.buildMenu()}t(e,t){return this.options.plugin.i18n.translate(e,t)}buildMenu(){let{selectedPaths:e}=this.options,t=e.length;this.menu.addItem(r=>{r.setTitle(`${t} tasks selected`),r.setIcon("check-square"),r.setDisabled(!0)}),this.menu.addSeparator(),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.status")),r.setIcon("circle");let a=qy(r);this.addStatusOptions(a)}),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.priority")),r.setIcon("star");let a=qy(r);this.addPriorityOptions(a)}),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.tags")),r.setIcon("tags");let a=qy(r);this.addTagOptions(a)}),this.menu.addSeparator(),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.dueDate")),r.setIcon("calendar");let a=qy(r);this.addDateOptions(a,"due")}),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.scheduledDate")),r.setIcon("calendar-clock");let a=qy(r);this.addDateOptions(a,"scheduled")}),this.menu.addSeparator(),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.archive")),r.setIcon("archive"),r.onClick(async()=>{await this.batchArchive(!0)})}),this.menu.addItem(r=>{r.setTitle(this.t("contextMenus.task.unarchive")),r.setIcon("archive-restore"),r.onClick(async()=>{await this.batchArchive(!1)})}),this.menu.addSeparator(),this.menu.addItem(r=>{r.setTitle("Copy selected tasks"),r.setIcon("copy");let a=qy(r);this.addCopyOptions(a)}),this.menu.addSeparator(),this.menu.addItem(r=>{r.setTitle("Clear selection"),r.setIcon("x"),r.onClick(()=>{var a,i;(a=this.options.plugin.taskSelectionService)==null||a.clearSelection(),(i=this.options.plugin.taskSelectionService)==null||i.exitSelectionMode()})}),this.menu.addSeparator(),this.menu.addItem(r=>{r.setTitle(`Delete ${t} tasks`),r.setIcon("trash"),r.onClick(async()=>{await this.batchDelete()})})}addTagOptions(e){e.addItem(t=>{t.setTitle(this.t("contextMenus.task.addTag")),t.setIcon("plus"),t.onClick(()=>{this.openBatchTagInput("add")})}),e.addItem(t=>{t.setTitle(this.t("contextMenus.task.removeTagInput")),t.setIcon("x"),t.onClick(()=>{this.openBatchTagInput("remove")})}),e.addSeparator(),e.addItem(t=>{t.setTitle(this.t("contextMenus.task.clearTags")),t.setIcon("eraser"),t.onClick(async()=>{await this.batchUpdateTags(r=>VA(r.tags,this.options.plugin.settings))})})}addCopyOptions(e){let t=[{title:"Copy filenames",icon:"file-text",format:"filenames"},{title:"Copy Markdown links",icon:"link",format:"markdown-links"},{title:"Copy titles",icon:"text",format:"titles"},{title:"Copy paths",icon:"copy",format:"paths"}];for(let r of t)e.addItem(a=>{a.setTitle(r.title),a.setIcon(r.icon),a.onClick(async()=>{await this.copySelectedTasks(r.format)})})}addStatusOptions(e){let r=[...this.options.plugin.settings.customStatuses].sort((a,i)=>a.order-i.order);for(let a of r)e.addItem(i=>{i.setTitle(a.label),i.setIcon(a.icon||"circle"),i.onClick(async()=>{await this.batchUpdateProperty("status",a.value)}),a.color&&window.setTimeout(()=>{let s=lle(i);if(s){let o=s.querySelector(".menu-item-icon");o&&(o.style.color=a.color)}},10)})}addPriorityOptions(e){let t=this.options.plugin.priorityManager.getPrioritiesByWeight();for(let r of t)e.addItem(a=>{a.setTitle(r.label),a.setIcon("star"),a.onClick(async()=>{await this.batchUpdateProperty("priority",r.value)}),r.color&&window.setTimeout(()=>{let i=lle(a);if(i){let s=i.querySelector(".menu-item-icon");s&&(s.style.color=r.color)}},10)});e.addSeparator(),e.addItem(r=>{r.setTitle(this.t("contextMenus.priority.clearPriority")),r.setIcon("x"),r.onClick(async()=>{await this.batchUpdateProperty("priority",void 0)})})}addDateOptions(e,t){let i=new rl({currentValue:void 0,onSelect:()=>{},plugin:this.options.plugin,app:this.options.plugin.app}).getDateOptions().filter(s=>s.category==="basic");for(let s of i)e.addItem(o=>{s.icon&&o.setIcon(s.icon),o.setTitle(s.label),o.onClick(async()=>{await this.batchUpdateProperty(t,s.value)})});e.addSeparator(),e.addItem(s=>{s.setTitle(this.t("contextMenus.date.clearDate")),s.setIcon("x"),s.onClick(async()=>{await this.batchUpdateProperty(t,void 0)})})}async openBatchTagInput(e){let{plugin:t}=this.options,r=await Vy(t.app,{title:e==="add"?this.t("contextMenus.task.addTag"):this.t("contextMenus.task.removeTagInput"),placeholder:this.t("contextMenus.task.tagPlaceholder"),confirmText:this.t("common.confirm"),cancelText:this.t("common.cancel"),onInputReady:i=>{new sp(t.app,i,t)}}),a=iC(r);a.length!==0&&await this.batchUpdateTags(i=>e==="add"?HA(i.tags,a):sC(i.tags,a))}async copySelectedTasks(e){let{plugin:t,selectedPaths:r}=this.options,a=[];for(let s of r){let o=await t.cacheManager.getTaskInfo(s);a.push({path:s,title:o==null?void 0:o.title})}let i=UA(a,e,s=>this.getMarkdownLinkText(s.path));await navigator.clipboard.writeText(i),new Rn.Notice(`Copied ${a.length} tasks`)}getMarkdownLinkText(e){let t=this.options.plugin.app.vault.getAbstractFileByPath(e);return t instanceof Rn.TFile?this.options.plugin.app.metadataCache.fileToLinktext(t,""):e}async batchUpdateTags(e){var s,o;let{plugin:t,selectedPaths:r,onUpdate:a}=this.options,i=r.length;try{new Rn.Notice(`Updating tags on ${i} tasks...`);let l=0,c=0;for(let d of r)try{let u=await t.cacheManager.getTaskInfo(d);u?(await t.taskService.updateProperty(u,"tags",e(u)),l++):c++}catch(u){op.error(`[BatchContextMenu] Failed to update tags for ${d}:`,{category:"validation",operation:"update-tags",error:u}),c++}c===0?new Rn.Notice(`Updated tags on ${l} tasks`):new Rn.Notice(`Updated tags on ${l} tasks, ${c} failed`),(s=t.taskSelectionService)==null||s.clearSelection(),(o=t.taskSelectionService)==null||o.exitSelectionMode(),a==null||a()}catch(l){op.error("[BatchContextMenu] Batch tag update failed:",{category:"validation",operation:"batch-tag-update",error:l}),new Rn.Notice(this.t("contextMenus.task.notices.updateTagsFailed"))}}async batchUpdateProperty(e,t){var o,l;let{plugin:r,selectedPaths:a,onUpdate:i}=this.options,s=a.length;try{new Rn.Notice(`Updating ${s} tasks...`);let c=0,d=0;for(let u of a)try{let p=await r.cacheManager.getTaskInfo(u);p?(await r.taskService.updateProperty(p,e,t),c++):d++}catch(p){op.error(`[BatchContextMenu] Failed to update task ${u}:`,{category:"validation",operation:"update-task",error:p}),d++}d===0?new Rn.Notice(`Updated ${c} tasks`):new Rn.Notice(`Updated ${c} tasks, ${d} failed`),(o=r.taskSelectionService)==null||o.clearSelection(),(l=r.taskSelectionService)==null||l.exitSelectionMode(),i==null||i()}catch(c){op.error("[BatchContextMenu] Batch update failed:",{category:"validation",operation:"batch-update",error:c}),new Rn.Notice("Failed to update tasks")}}async batchArchive(e){var s,o;let{plugin:t,selectedPaths:r,onUpdate:a}=this.options,i=r.length;try{new Rn.Notice(`${e?"Archiving":"Unarchiving"} ${i} tasks...`);let l=0,c=0;for(let d of r)try{let u=await t.cacheManager.getTaskInfo(d);u&&u.archived!==e?(await t.toggleTaskArchive(u),l++):u?l++:c++}catch(u){op.error(`[BatchContextMenu] Failed to archive task ${d}:`,{category:"persistence",operation:"archive-task",error:u}),c++}c===0?new Rn.Notice(`${e?"Archived":"Unarchived"} ${l} tasks`):new Rn.Notice(`${e?"Archived":"Unarchived"} ${l} tasks, ${c} failed`),(s=t.taskSelectionService)==null||s.clearSelection(),(o=t.taskSelectionService)==null||o.exitSelectionMode(),a==null||a()}catch(l){op.error("[BatchContextMenu] Batch archive failed:",{category:"persistence",operation:"batch-archive",error:l}),new Rn.Notice("Failed to archive tasks")}}async batchDelete(){var s,o;let{plugin:e,selectedPaths:t,onUpdate:r}=this.options,a=t.length;if(await ur(e.app,{title:"Delete tasks",message:`Are you sure you want to delete ${a} tasks? This action cannot be undone.`,confirmText:"Delete",cancelText:this.t("common.cancel"),isDestructive:!0}))try{new Rn.Notice(`Deleting ${a} tasks...`);let l=0,c=0;for(let d of t)try{let u=await e.cacheManager.getTaskInfo(d);u?(await e.taskService.deleteTask(u),l++):c++}catch(u){op.error(`[BatchContextMenu] Failed to delete task ${d}:`,{category:"persistence",operation:"delete-task",error:u}),c++}c===0?new Rn.Notice(`Deleted ${l} tasks`):new Rn.Notice(`Deleted ${l} tasks, ${c} failed`),(s=e.taskSelectionService)==null||s.clearSelection(),(o=e.taskSelectionService)==null||o.exitSelectionMode(),r==null||r()}catch(l){op.error("[BatchContextMenu] Batch delete failed:",{category:"persistence",operation:"batch-delete",error:l}),new Rn.Notice("Failed to delete tasks")}}show(e){za(this.menu,e)}showAtPosition(e,t){G0(),this.menu.showAtPosition({x:e,y:t})}}});function D2e(n){return E2e.includes(n)}function di(n,e){return n.map(t=>D2e(t)?t:t in e.fieldMapper.getMapping()?e.fieldMapper.toUserField(t):t)}function Yy(n,e,t){return t.fieldMapper.isPropertyForField(n,e)}var E2e,Yl=y(()=>{E2e=["tags","blocked","blocking"]});var oC,P2e,A2e,M2e,I2e,N2e,R2e,_2e,S$,Vn,jf=y(()=>{s0();s0();oC=["status","priority","due","scheduled","projects","contexts"],P2e=[{id:"none",value:"none",label:"None",color:"#cccccc",isCompleted:!1,excludeFromCycle:!1,order:0,autoArchive:!1,autoArchiveDelay:5},{id:"open",value:"open",label:"Open",color:"#808080",isCompleted:!1,excludeFromCycle:!1,order:1,autoArchive:!1,autoArchiveDelay:5},{id:"in-progress",value:"in-progress",label:"In progress",color:"#0066cc",isCompleted:!1,excludeFromCycle:!1,order:2,autoArchive:!1,autoArchiveDelay:5},{id:"done",value:"done",label:"Done",color:"#00aa00",isCompleted:!0,excludeFromCycle:!1,order:3,autoArchive:!1,autoArchiveDelay:5}],A2e=[{id:"none",value:"none",label:"None",color:"#cccccc",weight:0},{id:"low",value:"low",label:"Low",color:"#00aa00",weight:1},{id:"normal",value:"normal",label:"Normal",color:"#ffaa00",weight:2},{id:"high",value:"high",label:"High",color:"#ff0000",weight:3}],M2e={defaultContexts:"",defaultTags:"",defaultProjects:"",useParentNoteForTaskCreation:!1,useParentNoteAsProject:!1,useParentHeaderAsProject:!1,inheritParentTaskProperties:!1,defaultTimeEstimate:0,defaultRecurrence:"none",defaultDueDate:"none",defaultDueTime:"none",defaultScheduledDate:"today",defaultScheduledTime:"none",bodyTemplate:"",useBodyTemplate:!1,occurrenceBodyTemplate:"",useOccurrenceBodyTemplate:!1,defaultReminders:[]},I2e={defaultView:"dayGridMonth",customDayCount:3,slotDuration:"00:30:00",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",scrollTime:"08:00:00",firstDay:1,timeFormat:"24",showWeekends:!0,locale:"",defaultShowScheduled:!0,defaultShowDue:!0,defaultShowDueWhenScheduled:!0,defaultShowScheduledToDueSpan:!1,defaultShowTimeEntries:!1,defaultShowRecurring:!0,defaultShowICSEvents:!0,enableTimeblocking:!1,defaultShowTimeblocks:!0,defaultTimeblockColor:"#6366f1",timeblockAttachmentSearchOrder:"name-asc",nowIndicator:!0,selectMirror:!0,weekNumbers:!1,showTodayHighlight:!0,eventMinHeight:15,slotEventOverlap:!0,eventMaxStack:null,dayMaxEvents:!0,dayMaxEventRows:!1},N2e={defaultNoteTemplate:"",defaultNoteFolder:"",icsNoteFilenameFormat:"title",customICSNoteFilenameTemplate:"{title}",enableAutoExport:!1,autoExportPath:"tasknotes-calendar.ics",autoExportInterval:60,useDurationForExport:!1,excludeArchivedFromExport:!1,excludeCompletedFromExport:!1,requireDueDateForExport:!1,requireScheduledDateForExport:!1,useICSEndAsDue:!1,recurringEventRelatedNotesMode:"series"},R2e={enabled:!1,targetCalendarId:"",syncOnTaskCreate:!0,syncOnTaskUpdate:!0,syncOnTaskComplete:!0,syncOnTaskDelete:!0,eventTitleTemplate:"{{title}}",includeDescription:!0,eventColorId:null,syncTrigger:"scheduled",createAsAllDay:!0,defaultEventDuration:60,includeObsidianLink:!0,defaultReminderMinutes:null},_2e={enableFuzzy:!1,rows:["{title|n(Title)}","{aliases|n(Aliases)}","{file.path|n(Path)}"],showAdvanced:!1,requiredTags:[],includeFolders:[],propertyKey:"",propertyValue:""},S$={triggers:[{propertyId:"tags",trigger:"#",enabled:!0},{propertyId:"contexts",trigger:"@",enabled:!0},{propertyId:"projects",trigger:"+",enabled:!0},{propertyId:"status",trigger:"*",enabled:!0},{propertyId:"priority",trigger:"!",enabled:!1}]},Vn={tasksFolder:"TaskNotes/Tasks",moveArchivedTasks:!1,archiveFolder:"TaskNotes/Archive",taskTag:"task",taskIdentificationMethod:"tag",hideIdentifyingTagsInCards:!1,hideIdentifyingTagsMode:"all",taskPropertyName:"",taskPropertyValue:"",excludedFolders:"",defaultTaskPriority:"normal",defaultTaskStatus:"open",taskOrgFiltersCollapsed:!1,taskFilenameFormat:"zettel",storeTitleInFilename:!0,customFilenameTemplate:"{{title}}",occurrenceFilenameTemplate:"",occurrenceFilenameTemplateProperty:"occurrenceFilenameTemplate",taskCreationDefaults:M2e,openTaskAfterCreation:"none",calendarViewSettings:I2e,pomodoroWorkDuration:25,pomodoroShortBreakDuration:5,pomodoroLongBreakDuration:15,pomodoroLongBreakInterval:4,pomodoroAutoStartBreaks:!0,pomodoroAutoStartWork:!1,pomodoroNotifications:!0,pomodoroSoundEnabled:!0,pomodoroSoundVolume:50,pomodoroStorageLocation:"plugin",pomodoroMobileSidebar:"tab",showPomodoroInStatusBar:!0,enableTaskLinkOverlay:!0,disableOverlayOnAlias:!1,enableInstantTaskConvert:!0,useDefaultsOnInstantConvert:!0,preserveCheckboxOnConvert:!1,taskModalTabMovesFocus:!0,enableNaturalLanguageInput:!0,nlpDefaultToScheduled:!0,nlpLanguage:"en",uiLanguage:"system",statusSuggestionTrigger:"*",nlpTriggers:S$,singleClickAction:"edit",doubleClickAction:"openNote",projectAutosuggest:_2e,inlineTaskConvertFolder:"{{currentNotePath}}",disableNoteIndexing:!1,suggestionDebounceMs:0,fieldMapping:Sb,customStatuses:P2e,customPriorities:A2e,recurrenceMigrated:!1,lastSeenVersion:void 0,showReleaseNotesOnUpdate:!0,checkForUpdatesOnStartup:!0,lastNotifiedReleaseVersion:void 0,starterNoteCreated:!1,showTrackedTasksInStatusBar:!1,autoStopTimeTrackingOnComplete:!0,autoStopTimeTrackingNotification:!1,showRelationships:!0,relationshipsPosition:"bottom",showTaskCardInNote:!0,showCompletedTaskStrikethrough:!0,completionMenuAsSubmenu:!0,showExpandableSubtasks:!0,expandSubtasksByDefault:!1,subtaskChevronPosition:"right",viewsButtonAlignment:"right",hideCompletedFromOverdue:!0,icsIntegration:N2e,savedViews:[],enableNotifications:!0,notificationType:"system",notificationSoundEnabled:!1,notificationSoundVolume:50,enableAPI:!1,apiPort:8080,apiAuthToken:"",enableMCP:!1,webhooks:[],userFields:[],modalFieldsConfig:void 0,enableModalSplitLayout:!0,defaultVisibleProperties:["status","priority","due","scheduled","projects","contexts","tags","blocked","blocking"],inlineVisibleProperties:["status","priority","due","scheduled","recurrence"],enableBases:!0,enableMdbaseSpec:!1,autoCreateDefaultBasesFiles:!0,commandFileMapping:{"open-calendar-view":"TaskNotes/Views/mini-calendar-default.base","open-kanban-view":"TaskNotes/Views/kanban-default.base","open-tasks-view":"TaskNotes/Views/tasks-default.base","open-advanced-calendar-view":"TaskNotes/Views/calendar-default.base","open-agenda-view":"TaskNotes/Views/agenda-default.base","pomodoro-stats-base":"TaskNotes/Views/pomodoro-stats.base",relationships:"TaskNotes/Views/relationships.base"},maintainDueDateOffsetInRecurring:!1,resetCheckboxesOnRecurrence:!1,useFrontmatterMarkdownLinks:!1,enableGoogleCalendar:!1,enableMicrosoftCalendar:!1,disableCalendarOnMobile:!1,enabledGoogleCalendars:[],googleCalendarSyncTokens:{},enabledMicrosoftCalendars:[],microsoftCalendarSyncTokens:{},googleCalendarExport:R2e,enableDebugLogging:!1}});function cle(n){return L2e.has(n.trim().toLowerCase())}function qA(n){return typeof n=="object"&&n!==null&&typeof n.renderTo=="function"&&typeof n.toString=="function"}function WA(n){let e=n.toString();return e==="[object Object]"?"":e}function C$(n){var t;return n==null||((t=n.constructor)==null?void 0:t.name)==="NullValue"?!0:qA(n)&&cle(WA(n))}function lC(n){return C$(n)?!0:Array.isArray(n)?n.every(lC):typeof n=="string"?n.trim()===""||cle(n):qA(n)?WA(n).trim()==="":!1}function GA(n,e,t){if(!qA(e)||C$(e))return!1;try{e.renderTo(n,t),!n.hasChildNodes()&&!n.textContent&&(n.textContent=WA(e))}catch(r){F2e.debug("[TaskNotes] Error rendering Bases value:",{category:"persistence",operation:"rendering-bases-value",error:r}),n.textContent=WA(e)}return!0}function $d(n){if(C$(n))return"";if(qA(n))return n;if(n&&typeof n=="object"&&"icon"in n){let e=n;if(e.icon==="lucide-link"&&"data"in e&&e.data!==null&&e.data!==void 0){let t=Y(e.data);if(!t.match(/^[a-z]+:\/\//i)){let a="display"in e&&e.display?Y(e.display):null;return a&&a!==t?`[[${t}|${a}]]`:`[[${t}]]`}let r="display"in e&&e.display?Y(e.display):null;return r?`[${r}](${t})`:t}return"display"in e&&e.display!==null&&e.display!==void 0?e.display:"date"in e&&e.date!==null&&e.date!==void 0?e.date:"data"in e&&e.data!==null&&e.data!==void 0?e.data:e.icon==="lucide-file-question"||e.icon==="lucide-help-circle"?"":e.icon?Y(e.icon).replace("lucide-",""):""}return n}function YA(n,e={},t){var a;let r=(a=e.propertyLabels)==null?void 0:a[n];return r&&r.trim()!==""?r:t&&t.trim()!==""?t:n.startsWith("formula.")?n.substring(8):n.charAt(0).toUpperCase()+n.slice(1)}var F2e,L2e,cC=y(()=>{dr();q();F2e=M({tag:"Ui/TaskCardPresentation"}),L2e=new Set(["null","undefined"])});function x$(n){return n!==null&&typeof n=="object"&&typeof n.getValue=="function"?n:null}function dle(n){return Object.prototype.hasOwnProperty.call(ple,n)}function ule(n,e){return ple[e](n)}function dC(n,e,t){try{let r=t.fieldMapper.lookupMappingKey(e);if(r&&dle(r))return ule(n,r);if(dle(e))return ule(n,e);if(e.startsWith("user:"))return O2e(n,e,t);if(n.customProperties&&e in n.customProperties)return $d(n.customProperties[e]);if(n.customProperties){let i=`file.${e}`;if(i in n.customProperties)return $d(n.customProperties[i])}if(e.startsWith("file.")){let i=x$(n.basesData);if(i)try{let s=i.getValue(e);if(s!=null)return $d(s)}catch(s){}}if(e.startsWith("formula."))try{let i=x$(n.basesData);if(!i)return"";let s=i.getValue(e);if(s==null)return"";let o=$d(s);return o!==""?o:""}catch(i){return E$.debug(`[TaskNotes] Error computing formula ${e}:`,{category:"validation",operation:"computing-formula",error:i}),"[Formula Error]"}let a=x$(n.basesData);if(a)try{let i=`note.${e}`,s=a.getValue(i);if(s!=null)return $d(s)}catch(i){}if(n.path){let i=mle(n.path,e,t);if(i!==void 0)return i}return null}catch(r){return E$.warn(`TaskCard: Error getting property ${e}:`,{category:"persistence",operation:"taskcard-getting-property",error:r}),null}}function O2e(n,e,t){var s;let r=e.slice(5),a=(s=t.settings.userFields)==null?void 0:s.find(o=>o.id===r);if(!(a!=null&&a.key))return null;let i=n[a.key];return i===void 0&&(i=mle(n.path,a.key,t)),i}function mle(n,e,t){try{let r=t.app.metadataCache.getCache(n);return r!=null&&r.frontmatter?r.frontmatter[e]:void 0}catch(r){E$.warn(`TaskCard: Error accessing frontmatter for ${n}:`,{category:"validation",operation:"taskcard-accessing-frontmatter",error:r});return}}var E$,ple,D$=y(()=>{cC();q();E$=M({tag:"Ui/TaskCardPropertyAccess"});ple={due:n=>n.due,scheduled:n=>n.scheduled,projects:n=>n.projects,contexts:n=>n.contexts,tags:n=>n.tags,blocked:n=>n.isBlocked,blocking:n=>n.isBlocking,blockedBy:n=>n.blockedBy,blockingTasks:n=>n.blocking,timeEstimate:n=>n.timeEstimate,timeEntries:n=>n.timeEntries,totalTrackedTime:n=>n.totalTrackedTime,recurrence:n=>n.recurrence,recurrenceParent:n=>n.recurrence_parent,occurrenceDate:n=>n.occurrence_date,occurrenceMaterialization:n=>n.occurrence_materialization,occurrenceNextTrigger:n=>n.occurrence_next_trigger,occurrenceTemplate:n=>n.occurrence_template,occurrencePastHorizon:n=>n.occurrence_past_horizon,occurrenceFutureHorizon:n=>n.occurrence_future_horizon,completedDate:n=>n.completedDate,reminders:n=>n.reminders,icsEventId:n=>n.icsEventId,completeInstances:n=>n.complete_instances,skippedInstances:n=>n.skipped_instances,dateCreated:n=>n.dateCreated,dateModified:n=>n.dateModified,sortOrder:n=>n.sortOrder,googleCalendarSync:n=>n.path,checklistProgress:n=>n.path}});function Ss(n,e,t){return n.i18n.translate(`ui.taskCard.${e}`,t)}function Kl(n,e,t){let r=t==null?void 0:t[n];if(r&&r.trim()!=="")return r;let a=z2e(n,e,t),i={due:Ss(e,"labels.due"),scheduled:Ss(e,"labels.scheduled"),recurrence:Ss(e,"labels.recurrence"),completedDate:Ss(e,"labels.completed"),dateCreated:Ss(e,"labels.created"),dateModified:Ss(e,"labels.modified"),blocked:Ss(e,"labels.blocked"),blocking:Ss(e,"labels.blocking")};return YA(n,{propertyLabels:a?{[n]:a}:t},i[n])}function z2e(n,e,t){var r,a;if(t){for(let[i,s]of Object.entries(t))if(!(i===n||s.trim()==="")&&((a=(r=e.fieldMapper)==null?void 0:r.lookupMappingKey)==null?void 0:a.call(r,i))===n)return s}}function uC(n,e,t){return Ss(n,"recurrenceTooltip",{label:Kl("recurrence",n,t),value:Gte(e)})}function P$(n,e){return e===1?Ss(n,"reminderTooltipOne"):Ss(n,"reminderTooltipMany",{count:e})}function KA(n,e){return e?Ss(n,"collapseSubtasks"):Ss(n,"expandSubtasks")}var A$=y(()=>{yt();cC();D$()});function hle(n,e,t){n.createEl("a",{text:t,attr:{href:e,target:"_blank",rel:"noopener"}}).classList.add("external-link")}function $2e(n){return j2e.test(n)}function nl(n,e,t,r,a={}){var p;let{cssClass:i="internal-link",hoverSource:s="tasknotes-property-link",showErrorNotices:o=!1,onPrimaryNavigate:l}=a,c=(p=r.sourcePath)!=null?p:"",d=vt(e),u=n.createEl("a",{cls:i,text:t,attr:{"data-href":d,role:"link",tabindex:"0"}});u.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation(),(async()=>{try{if(m.ctrlKey||m.metaKey){r.workspace.openLinkText(d,c,!0);return}if(l&&await l(d,m)!==!1)return;let f=r.metadataCache.getFirstLinkpathDest(d,c)||r.metadataCache.getFirstLinkpathDest(d,"");f instanceof lp.TFile?await r.workspace.getLeaf(!1).openFile(f):o&&new lp.Notice(`Note "${t}" not found`)}catch(f){fle.error("[TaskNotes] Error opening internal link:",{category:"internal",operation:"opening-internal-link",details:{filePath:e},error:f}),o&&new lp.Notice(`Failed to open note "${t}"`)}})()}),u.addEventListener("auxclick",m=>{m.button===1&&(m.preventDefault(),m.stopPropagation(),(async()=>{try{(r.metadataCache.getFirstLinkpathDest(d,c)||r.metadataCache.getFirstLinkpathDest(d,""))instanceof lp.TFile&&r.workspace.openLinkText(d,c,!0)}catch(f){fle.error("[TaskNotes] Error opening internal link:",{category:"internal",operation:"opening-internal-link",details:{filePath:e},error:f})}})())}),u.addEventListener("keydown",m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),u.click())}),u.addEventListener("mouseover",m=>{let f=r.metadataCache.getFirstLinkpathDest(d,c)||r.metadataCache.getFirstLinkpathDest(d,"");if(f instanceof lp.TFile){let h={event:m,source:s,hoverParent:n,targetEl:u,linktext:d,sourcePath:c||f.path};r.workspace.trigger("hover-link",h)}})}function Zl(n,e,t,r){let a=0,i;for(;(i=B2e.exec(e))!==null;){let[o,l,c,d,u,p]=i,m=i.index;if(m>a&&n.appendChild(activeDocument.createTextNode(e.slice(a,m))),l){let f=l,h=f,g=f;if(f.includes("|")){let[v,k]=f.split("|");h=v,g=k}nl(n,h,g,t)}else if(c&&d){let f=String(d).trim(),h=String(c).trim();$2e(f)?hle(n,f,h):nl(n,f,h,t)}else if(u||p){let f=String(u||p);hle(n,f,f)}else n.appendChild(activeDocument.createTextNode(o));a=m+o.length}let s=e.slice(a);if(s&&(r!=null&&r.onTagClick)){let o=/(^|\s)(#[\p{L}\p{N}\p{M}_/-]+)/gu,l=0,c;for(;(c=o.exec(s))!==null;){let[,d,u]=c,p=c.index;p>l&&n.appendChild(activeDocument.createTextNode(s.slice(l,p))),d&&n.appendChild(activeDocument.createTextNode(d));let m=n.createEl("a",{cls:"tag",text:u,attr:{href:u,role:"button",tabindex:"0","data-tn-click-exclude":"true"}});m.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),r.onTagClick(u,f)}),m.addEventListener("keydown",f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),r.onTagClick(u,f))}),l=p+d.length+u.length}l<s.length&&n.appendChild(activeDocument.createTextNode(s.slice(l)))}else s&&n.appendChild(activeDocument.createTextNode(s))}function U2e(n){return!n||typeof n!="string"||!n.startsWith("[[")||!n.endsWith("]]")||n.startsWith("\\[[")||n.endsWith("\\]]")?!1:n.slice(2,-2).trim().length>0}function H2e(n){return!n||typeof n!="string"?!1:/^\[([^\]]*)\]\(([^)]+)\)$/.test(n)}function V2e(n){let e=n.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!e)return null;let t=e[1].trim(),r=e[2].trim(),a=vt(r);return{displayText:t,filePath:a}}function gle(n,e,t){var u,p;let r=(u=t.sourcePath)!=null?u:"",a=vt(n),i=t.metadataCache.getFirstLinkpathDest(a,r)||t.metadataCache.getFirstLinkpathDest(a,"");if(!(i instanceof lp.TFile))return e;let s=t.metadataCache.getCache(i.path),o=(p=s==null?void 0:s.frontmatter)==null?void 0:p.title;if(typeof o!="string"||o.trim().length===0)return e;let l=(e==null?void 0:e.trim())||"",c=i.name,d=i.basename;return l===""||l===c||l===d||l===i.path||l===a?o:e}function Ky(n,e,t,r={}){n.innerHTML="",e.flat(2).filter(i=>i!=null&&typeof i=="string").forEach((i,s)=>{if(s>0&&n.appendChild(activeDocument.createTextNode(", ")),n.appendChild(activeDocument.createTextNode("+")),U2e(i)){let o=i.slice(2,-2),l=o,c=o;if(o.includes("|")){let u=o.split("|");l=u[0].trim(),c=u[1].trim()}let d=gle(l,c,t);nl(n,l,d,t,{cssClass:"task-card__project-link internal-link",hoverSource:"tasknotes-project-link",showErrorNotices:!0,onPrimaryNavigate:r.onPrimaryNavigate})}else if(H2e(i)){let o=V2e(i);if(o){let l=gle(o.filePath,o.displayText,t);nl(n,o.filePath,l,t,{cssClass:"task-card__project-link internal-link",hoverSource:"tasknotes-project-link",showErrorNotices:!0,onPrimaryNavigate:r.onPrimaryNavigate})}else n.appendChild(activeDocument.createTextNode(i))}else n.appendChild(activeDocument.createTextNode(i))})}var lp,fle,B2e,j2e,cp=y(()=>{lp=require("obsidian");Cn();q();fle=M({tag:"Ui/Renderers/LinkRenderer"}),B2e=/\[\[([^[\]]+)\]\]|\[([^\]]+)\]\(([^)]+)\)|<(https?:\/\/[^\s>]+)>|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?])|\[([^\]]+)\]\s*\[([^\]]*)\]/g,j2e=/^[a-z][a-z0-9+.-]*:/i});function yle(n,e,t){if(!e||typeof e!="string")return;let r=G2e(e);if(!r)return;let a=n.createEl("a",{cls:"tag",text:r,attr:{href:r,role:"button",tabindex:"0","data-tn-click-exclude":"true"}});t!=null&&t.onTagClick&&(a.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),t.onTagClick(r,i)}),a.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopPropagation(),t.onTagClick(r,i))}))}function Tle(n,e,t){if(typeof e=="string"){yle(n,e,t);return}if(Array.isArray(e)){e.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,i)=>{i>0&&n.appendChild(activeDocument.createTextNode(" ")),yle(n,String(a),t)});return}e!=null&&n.appendChild(activeDocument.createTextNode(Y(e)))}function ble(n,e,t){if(typeof e=="string"){vle(n,e,t);return}if(Array.isArray(e)){e.flat(2).filter(a=>a!=null&&typeof a=="string").forEach((a,i)=>{i>0&&n.appendChild(activeDocument.createTextNode(", ")),vle(n,a,t)||n.appendChild(activeDocument.createTextNode(String(a)))});return}e!=null&&n.appendChild(activeDocument.createTextNode(Y(e)))}function vle(n,e,t){let r=W2e(e);if(t!=null&&t.linkServices&&q2e(r)){let o=kle(r),l=n.createSpan({cls:`context-tag context-tag--link ${o}`,attr:{"data-tn-click-exclude":"true"}});return l.appendChild(activeDocument.createTextNode("@")),Zl(l,r,t.linkServices),!0}let a=K2e(e);if(!a)return!1;let i=kle(a),s=n.createSpan({cls:`context-tag ${i}`,text:a,attr:{role:"button",tabindex:"0","data-tn-click-exclude":"true"}});return t!=null&&t.onTagClick&&(s.addEventListener("click",o=>{var l;o.preventDefault(),o.stopPropagation(),(l=t.onTagClick)==null||l.call(t,a,o)}),s.addEventListener("keydown",o=>{var l;(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),o.stopPropagation(),(l=t.onTagClick)==null||l.call(t,a,o))})),!0}function W2e(n){let e=n.trim();return e.startsWith("@")?e.slice(1).trim():e}function q2e(n){return/\[\[[^[\]]+\]\]/.test(n)||/\[[^\]]+\]\([^)]+\)/.test(n)||/<https?:\/\/[^\s>]+>/i.test(n)||/https?:\/\/[^\s<>()]+[^\s<>().,;:!?]/i.test(n)}function G2e(n){if(!n||typeof n!="string")return null;let e=n.trim();if(!e)return null;let t=e.startsWith("#"),r=e.replace(/[^\p{L}\p{N}_#/-]/gu,"");return t?r.length>1?r:null:r?`#${r}`:null}function Y2e(n){let e=5381;for(let t=0;t<n.length;t++)e=e*33^n.charCodeAt(t);return e>>>0}function kle(n){if(!n||typeof n!="string")return"context-tag--color-0";let e=n.replace(/^@/,"").toLowerCase();return e?`context-tag--color-${Y2e(e)%20}`:"context-tag--color-0"}function K2e(n){if(!n||typeof n!="string")return null;let e=n.trim();if(!e)return null;let t=e.startsWith("@"),r=e.replace(/[^\p{L}\p{N}_@/-]/gu,"");return t?r.length>1?r:null:r?`@${r}`:null}var wle=y(()=>{dr();cp()});function dp(n,e,t){return n.i18n.translate(`ui.taskCard.${e}`,t)}function Z2e(n){if(n.setAttribute("role","button"),n.tabIndex=0,n.dataset.tnNoDrag==="true"){n.setAttribute("draggable","false");return}n.dataset.tnNoDrag="true",n.setAttribute("draggable","false"),n.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),n.addEventListener("keydown",e=>{e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),n.click())})}function Q2e(n){return(Array.isArray(n)?n:n?[n]:[]).filter(t=>typeof t=="string").map(t=>t.trim()).filter(Boolean)}function J2e(n,e){let t=n.start?Sn(n.start,{userTimeFormat:e.settings.calendarViewSettings.timeFormat}):"";return t?`${n.title} (${t})`:n.title}function Sle(n){var e;return((e=n.split("/").pop())==null?void 0:e.replace(/\.md$/i,""))||n}function X2e(n,e,t){let r=Ai(n);if(r){let a=Jo(t.app,e.path,r),i=(a==null?void 0:a.path)||r.uid;return i?{path:i,displayText:(a==null?void 0:a.file.basename)||Sle(i)}:null}if(typeof n=="object"&&n!==null){let a=n.path;if(typeof a=="string"&&a.trim()!=="")return{path:a.trim(),displayText:Sle(a)}}return null}function Dle(n,e,t,r){Z2e(n),n.addEventListener("click",a=>{a.stopPropagation();let i=r==="due"?e.due:e.scheduled;new rl({currentValue:re(i||""),currentTime:si(i||""),onSelect:(o,l)=>{(async()=>{try{let c;o?l?c=`${o}T${l}`:c=o:c=void 0,await t.updateTaskProperty(e,r,c)}catch(c){let d=c instanceof Error?c.message:String(c);I$.error(`Error updating ${r} date:`,{category:"persistence",operation:"updating",details:{value:d}});let u=r==="due"?"contextMenus.task.notices.updateDueDateFailure":"contextMenus.task.notices.updateScheduledFailure";new Zy.Notice(t.i18n.translate(u,{message:d}))}})()},dateRole:r,plugin:t,app:t.app}).show(a)})}function Ple(n){let e=[...oC,"tags","blocked","blocking","googleCalendarSync"];return di(e,n)}function eUe(n){return n.trim().toLowerCase()}function tUe(n,e){let t=e.app.vault.getAbstractFileByPath(n);if(!(t instanceof Zy.TFile))return null;let r=e.app.metadataCache.getFileCache(t);return rUe(r)}function rUe(n){if(n==null)return null;let e=n.listItems;if(!Array.isArray(e)||e.length===0)return null;let t=0,r=0;for(let a of e){if(!a||typeof a.task!="string"||typeof a.parent=="number"&&a.parent>=0)continue;let s=eUe(a.task);s!=="-"&&(t+=1,s==="x"&&(r+=1))}return t===0?null:{completed:r,total:t,percent:Math.round(r/t*100)}}function Ale(n,e,t,r,a={}){let i=dC(t,e,r);if(!QA(i))return null;let s=n.createSpan({cls:`task-card__metadata-property task-card__metadata-property--${e.replace(":","-")}`});try{let l=r.fieldMapper.lookupMappingKey(e)||e;return l in Cle?Cle[l](s,i,t,r,a):e.startsWith("user:")?nUe(s,e,i,r):aUe(s,e,i,r,Kl(e,r,a.propertyLabels)),!s.textContent&&!s.hasChildNodes()?(s.remove(),null):s}catch(o){return I$.warn(`TaskCard: Error rendering property ${e}:`,{category:"persistence",operation:"taskcard-rendering-property",error:o}),s.textContent=`${e}: (error)`,s}}function QA(n){return!lC(n)}function nUe(n,e,t,r){var c;let a=e.slice(5),i=(c=r.settings.userFields)==null?void 0:c.find(d=>d.id===a);if(!i){n.textContent=`${a}: (not found)`;return}let s=i.displayName||a;n.createSpan({text:`${s}: `});let o=n.createSpan({cls:"task-card__metadata-value"}),l={metadataCache:r.app.metadataCache,workspace:r.app.workspace};if(typeof t=="string"&&t.trim()!==""){let d=t.trim();M$(d)?Zl(o,d,l):o.textContent=Ele(t,i)}else if(i.type==="list"&&Array.isArray(t))t.map(u=>$d(u)).filter(QA).forEach((u,p)=>{if(p>0&&o.appendChild(activeDocument.createTextNode(", ")),typeof u=="string"&&u.trim()!==""){let m=u.trim();if(M$(m)){let f=o.createSpan();Zl(f,m,l)}else o.appendChild(activeDocument.createTextNode(String(u)))}else o.appendChild(activeDocument.createTextNode(String(u)))});else{let d=Ele(t,i);o.textContent=d.trim()!==""?d:"(empty)"}}function aUe(n,e,t,r,a){let i=YA(e,{},a);n.createSpan({text:`${i}: `});let s=n.createSpan({cls:"task-card__metadata-value"});Array.isArray(t)?t.map(l=>$d(l)).filter(QA).forEach((l,c)=>{c>0&&s.appendChild(activeDocument.createTextNode(", ")),xle(s,l,r)}):xle(s,t,r)}function xle(n,e,t){if(!QA(e)||t&&GA(n,e,t.app.renderContext))return;if(typeof e=="string"&&t){let a={metadataCache:t.app.metadataCache,workspace:t.app.workspace};if(M$(e)){Zl(n,e,a,{onTagClick:async i=>{let s=i.startsWith("#")?i.slice(1):i;await t.openTagsPane(`#${s}`)}});return}n.appendChild(activeDocument.createTextNode(e));return}let r;if(typeof e=="object"&&e!==null)if(e instanceof Date)r=Sn(e.toISOString(),{dateFormat:"MMM d, yyyy",timeFormat:"",showTime:!1});else{let a=Object.entries(e);r=a.length<=3?a.map(([i,s])=>`${i}: ${Y(s)}`).join(", "):Y(e)}else typeof e=="boolean"?r=e?"✓":"✗":typeof e=="number"?r=Number.isInteger(e)?String(e):e.toFixed(2):r=Y(e);r.length>100&&(r=r.substring(0,97)+"..."),n.appendChild(activeDocument.createTextNode(r))}function M$(n){return n.includes("[[")||n.includes("](")||/<https?:\/\/[^\s>]+>/i.test(n)||/(^|\s)https?:\/\/[^\s<>()]+/i.test(n)||n.includes("[")&&n.includes("](")||n.includes("#")&&/\s#\w+|#\w+/.test(n)}function Ele(n,e){if(n==null)return"";try{switch(e.type){case"text":case"number":return Y(n);case"date":return Sn(Y(n),{dateFormat:"MMM d, yyyy",timeFormat:"",showTime:!1});case"boolean":return n?"✓":"✗";case"list":return Array.isArray(n)?n.flat(2).map(Y).join(", "):Y(n);default:return Y(n)}}catch(t){return I$.warn("TaskCard: Error formatting user property value:",{category:"validation",operation:"taskcard-formatting-user-property-value",error:t}),Y(n)}}function ZA(n){let e=Number(re(n).slice(0,4));return Number.isInteger(e)&&e!==new Date().getFullYear()?"MMM d, yyyy":"MMM d"}function iUe(n,e,t,r,a){var p,m;let i=C0(e),s=r.statusManager.isCompletedStatus(t.status),o=(m=(p=r.settings)==null?void 0:p.hideCompletedFromOverdue)!=null?m:!0,l=ps(e,s,o),c=r.settings.calendarViewSettings.timeFormat,d=Kl("due",r,a),u="";if(i){let f=Sn(e,{dateFormat:"",showTime:!0,userTimeFormat:c});u=f.trim()===""?dp(r,"dueToday",{label:d}):dp(r,"dueTodayAt",{label:d,time:f})}else if(l){let f=Sn(e,{dateFormat:ZA(e),showTime:!0,userTimeFormat:c});u=dp(r,"dueOverdue",{label:d,display:f})}else{let f=Sn(e,{dateFormat:ZA(e),showTime:!0,userTimeFormat:c});u=dp(r,"dueLabel",{label:d,display:f})}n.textContent=u,n.classList.add("task-card__metadata-date","task-card__metadata-date--due"),l&&n.classList.add("task-card__metadata-date--overdue"),i&&n.classList.add("task-card__metadata-date--today"),!i&&!ps(e,!1,!1)&&n.classList.add("task-card__metadata-date--future"),n.dataset.tnAction="edit-date",n.dataset.tnDateType="due",Dle(n,t,r,"due")}function sUe(n,e,t,r,a){var p,m;let i=C0(e),s=r.statusManager.isCompletedStatus(t.status),o=(m=(p=r.settings)==null?void 0:p.hideCompletedFromOverdue)!=null?m:!0,l=ps(e,s,o),c=r.settings.calendarViewSettings.timeFormat,d=Kl("scheduled",r,a),u="";if(i){let f=Sn(e,{dateFormat:"",showTime:!0,userTimeFormat:c});u=f.trim()===""?dp(r,"scheduledToday",{label:d}):dp(r,"scheduledTodayAt",{label:d,time:f})}else if(l){let f=Sn(e,{dateFormat:ZA(e),showTime:!0,userTimeFormat:c});u=dp(r,"scheduledPast",{label:d,display:f})}else{let f=Sn(e,{dateFormat:ZA(e),showTime:!0,userTimeFormat:c});u=dp(r,"scheduledLabel",{label:d,display:f})}n.textContent=u,n.classList.add("task-card__metadata-date","task-card__metadata-date--scheduled"),l&&n.classList.add("task-card__metadata-date--past"),i&&n.classList.add("task-card__metadata-date--today"),!i&&!ps(e,!1,!1)&&n.classList.add("task-card__metadata-date--future"),n.dataset.tnAction="edit-date",n.dataset.tnDateType="scheduled",Dle(n,t,r,"scheduled")}function Mle(n,e){n.style.display=e.length>0?"":"none"}var Zy,I$,Cle,Ile=y(()=>{Zy=require("obsidian");Uy();jf();yt();ip();xe();dr();Yl();cC();A$();cp();wle();Zs();q();I$=M({tag:"Ui/TaskCardProperties"});Cle={due:(n,e,t,r,a)=>{typeof e=="string"&&iUe(n,e,t,r,a==null?void 0:a.propertyLabels)},scheduled:(n,e,t,r,a)=>{typeof e=="string"&&sUe(n,e,t,r,a==null?void 0:a.propertyLabels)},projects:(n,e,t,r)=>{if(Array.isArray(e)){let a={metadataCache:r.app.metadataCache,workspace:r.app.workspace,sourcePath:t.path};Ky(n,e,a)}},contexts:(n,e,t,r)=>{if(Array.isArray(e)){let a={onTagClick:async i=>{let s=i.startsWith("@")?i.slice(1):i;await r.openTagsPane(`#${s}`)},linkServices:{metadataCache:r.app.metadataCache,workspace:r.app.workspace,sourcePath:t.path}};ble(n,e,a)}},tags:(n,e,t,r)=>{if(Array.isArray(e)){let a=e;r.settings.taskIdentificationMethod==="tag"&&r.settings.hideIdentifyingTagsInCards&&(a=jd(e,r.settings.taskTag,r.settings.hideIdentifyingTagsMode)),a.length>0&&Tle(n,a,{onTagClick:async s=>{let o=s.startsWith("#")?s.slice(1):s;await r.openTagsPane(`#${o}`)}})}},timeEstimate:(n,e,t,r)=>{typeof e=="number"&&(n.textContent=`${r.formatTime(e)} estimated`)},totalTrackedTime:(n,e,t,r)=>{typeof e=="number"&&e>0&&(n.textContent=`${r.formatTime(e)} tracked`)},recurrence:(n,e,t,r,a)=>{typeof e=="string"&&(n.textContent=uC(r,e,a==null?void 0:a.propertyLabels))},recurrenceParent:(n,e,t,r)=>{if(typeof e=="string"&&e.trim()!==""){n.createSpan({text:"Parent: "});let a={metadataCache:r.app.metadataCache,workspace:r.app.workspace,sourcePath:t.path};Zl(n,e,a)}},occurrenceDate:(n,e,t,r)=>{var a;typeof e=="string"&&(n.textContent=`Occurrence: ${Sn(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:(a=r.settings.calendarViewSettings)==null?void 0:a.timeFormat})}`,n.classList.add("task-card__metadata-pill--occurrence"))},occurrenceMaterialization:(n,e)=>{e==="manual"?n.textContent="Occurrence notes: manual":e==="on_completion"?n.textContent="Occurrence notes: after completion":e==="rolling"&&(n.textContent="Occurrence notes: rolling")},occurrenceNextTrigger:(n,e)=>{e==="completion"?n.textContent="Next note: completion":e==="completion_or_skip"&&(n.textContent="Next note: completion or skip")},occurrenceTemplate:(n,e,t,r)=>{if(typeof e=="string"&&e.trim()!==""){n.createSpan({text:"Template: "});let a={metadataCache:r.app.metadataCache,workspace:r.app.workspace,sourcePath:t.path};Zl(n,e,a)}},completeInstances:(n,e,t)=>{var r;if(Array.isArray(e)&&e.length>0){let a=e.length,i=((r=t.skipped_instances)==null?void 0:r.length)||0,s=Wte(t);if(s){let o=Math.max(s,a+i),l=Math.round(a/o*100);n.textContent=`✓ ${a}/${o} completed (${l}%)`}else n.textContent=`✓ ${a} completed`;n.classList.add("task-card__metadata-pill--completed-instances")}},skippedInstances:(n,e)=>{Array.isArray(e)&&e.length>0&&(n.textContent=`⊘ ${e.length} skipped`,n.classList.add("task-card__metadata-pill--skipped-instances"))},completedDate:(n,e,t,r,a)=>{if(typeof e=="string"){let i=Kl("completedDate",r,a==null?void 0:a.propertyLabels);n.textContent=`${i}: ${Sn(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:r.settings.calendarViewSettings.timeFormat})}`}},dateCreated:(n,e,t,r,a)=>{if(typeof e=="string"){let i=Kl("dateCreated",r,a==null?void 0:a.propertyLabels);n.textContent=`${i}: ${Sn(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:r.settings.calendarViewSettings.timeFormat})}`}},dateModified:(n,e,t,r,a)=>{if(typeof e=="string"){let i=Kl("dateModified",r,a==null?void 0:a.propertyLabels);n.textContent=`${i}: ${Sn(e,{dateFormat:"MMM d",showTime:!1,userTimeFormat:r.settings.calendarViewSettings.timeFormat})}`}},blocked:(n,e,t,r,a)=>{var i,s;if(e===!0){let o=(s=(i=t.blockedBy)==null?void 0:i.length)!=null?s:0,l=Kl("blocked",r,a==null?void 0:a.propertyLabels);n.textContent=o>0?`${l} (${o})`:l,n.classList.add("task-card__metadata-pill--blocked")}},blocking:(n,e,t,r,a)=>{var i,s;if(e===!0){let o=(s=(i=t.blocking)==null?void 0:i.length)!=null?s:0,l=Kl("blocking",r,a==null?void 0:a.propertyLabels);n.textContent=o>0?`${l} (${o})`:l,n.classList.add("task-card__metadata-pill--blocking")}},blockedBy:(n,e,t,r)=>{if(Array.isArray(e)&&e.length>0){n.createSpan({text:"Blocked by: "});let a=n.createSpan(),i={metadataCache:r.app.metadataCache,workspace:r.app.workspace,sourcePath:t.path};e.forEach((s,o)=>{o>0&&a.appendChild(activeDocument.createTextNode(", "));let l=X2e(s,t,r);l&&nl(a,l.path,l.displayText,i)})}},blockingTasks:(n,e,t,r)=>{if(Array.isArray(e)&&e.length>0){n.createSpan({text:"Blocking: "});let a=n.createSpan();e.forEach((i,s)=>{var l;s>0&&a.appendChild(activeDocument.createTextNode(", "));let o=a.createEl("a",{cls:"internal-link",attr:{href:i}});o.textContent=((l=i.split("/").pop())==null?void 0:l.replace(".md",""))||i,o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),r.app.workspace.openLinkText(i,"",!1)})})}},timeEntries:(n,e,t,r)=>{if(Array.isArray(e)&&e.length>0){let a=oi(e);a>0&&(n.textContent=`${r.formatTime(a)} tracked (${e.length} ${e.length===1?"entry":"entries"})`)}},reminders:(n,e)=>{Array.isArray(e)&&e.length>0&&(n.textContent=`${e.length} ${e.length===1?"reminder":"reminders"}`)},icsEventId:(n,e,t,r)=>{let a=Q2e(e);if(a.length===0)return;let i=a.map(s=>{var o;return(o=r.icsNoteService.findEventById(s))==null?void 0:o.event}).filter(s=>!!s).map(s=>J2e(s,r));i.length>0?n.textContent=`Calendar: ${i.join(", ")}`:n.textContent=`Linked to ${a.length} calendar ${a.length===1?"event":"events"}`},checklistProgress:(n,e,t,r)=>{let a=tUe(t.path,r);if(!a)return;let i=n.createSpan({cls:"task-card__progress"}),o=i.createSpan({cls:"task-card__progress-bar"}).createSpan({cls:"task-card__progress-fill"});o.style.width=`${a.percent}%`,a.percent>0&&a.percent<5&&(o.classList.remove("tn-static-min-width-0-3922d326"),o.classList.add("tn-static-min-width-2px-709d7da0")),i.createSpan({cls:"task-card__progress-label",text:`${a.completed}/${a.total}`}),(0,Zy.setTooltip)(i,`${a.percent}% complete (${a.completed}/${a.total})`,{placement:"top"})}}});function oUe(n){if(typeof n=="number")return n===1?"show-all":"inherit";let e=Y(n).trim().toLowerCase().replace(/^['"]|['"]$/g,"").replace(/[_\s]+/g,"-");return e==="show-all"||e==="1"?"show-all":"inherit"}function JA(n,e={}){var a,i;if(oUe((i=(a=e.resolveExpandedRelationshipFilterMode)==null?void 0:a.call(e))!=null?i:e.expandedRelationshipFilterMode)!=="inherit")return n;let r=e.expandedRelationshipTaskPaths;return r?n.filter(s=>r.has(s.path)):n}function Nle(n,e={},t){let r=e.expandedRelationshipTaskOrder;if(!r||r.size===0)return t([...n]);let a=[],i=[];for(let s of n)r.has(s.path)?a.push(s):i.push(s);return a.sort((s,o)=>{let l=r.get(s.path),c=r.get(o.path);return l===void 0||c===void 0?0:l-c}),[...a,...t([...i])]}function $f(n,e){let t=Array.isArray(n.blockedBy)?n.blockedBy:[],r=new Set;for(let a of t){let i=Ai(a);if(!i)continue;let s=Jo(e,n.path,i),o=(s==null?void 0:s.path)||i.uid;o&&r.add(o)}return Array.from(r)}var XA=y(()=>{Zs();dr()});function al(n){if(n.setAttribute("role","button"),n.tabIndex=0,n.dataset.tnNoDrag==="true"){n.setAttribute("draggable","false");return}n.dataset.tnNoDrag="true",n.setAttribute("draggable","false"),n.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),n.addEventListener("keydown",e=>{e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),n.click())})}function Ql(n){let{container:e,className:t,icon:r,tooltip:a,ariaLabel:i,onClick:s,visible:o=!0}=n;if(!o)return null;let l=e.createDiv({cls:t,attr:{"aria-label":i||a}});return(0,pC.setIcon)(l,r),(0,pC.setTooltip)(l,a,{placement:"top"}),s&&(al(l),l.addEventListener("click",c=>{c.stopPropagation(),s(c)})),l}function Uf(n,e,t){let r=n.querySelector(e);if(!t.shouldExist)return r==null||r.remove(),null;if(r)return r.setAttribute("aria-label",t.ariaLabel||t.tooltip),(0,pC.setTooltip)(r,t.tooltip,{placement:"top"}),t.onClick&&al(r),r;let i=n.querySelector(".task-card__badges")||n.querySelector(".task-card__main-row");return i?Ql({container:i,...t}):null}var pC,mC=y(()=>{pC=require("obsidian")});var Rle={};Xe(Rle,{PriorityContextMenu:()=>Ud});var Ud,fC=y(()=>{Md();Id();Ud=class{constructor(e){this.sortedPriorities=[];this.targetDoc=activeDocument;this.menu=new ra,this.options=e,this.buildMenu()}buildMenu(){this.sortedPriorities=this.options.plugin.priorityManager.getPrioritiesByWeightAsc(),this.sortedPriorities.forEach(e=>{this.menu.addItem(t=>{let r=e.label;t.setIcon("star"),e.value===this.options.currentValue&&(r=`✓ ${e.label}`),t.setTitle(r),t.onClick(async()=>{this.options.onSelect(e.value)})})})}show(e){var t,r;(r=(t=e.target)==null?void 0:t.instanceOf)!=null&&r.call(t,HTMLElement)&&(this.targetDoc=e.target.ownerDocument),za(this.menu,e),window.setTimeout(()=>{this.applyColorStyling()},10)}showAtElement(e){this.targetDoc=e.ownerDocument,jl(this.menu,e),window.setTimeout(()=>{this.applyColorStyling()},10)}applyColorStyling(){let e=this.targetDoc.querySelector(".menu");if(!e)return;let t=e.querySelectorAll(".menu-item");this.sortedPriorities.forEach((r,a)=>{let i=t[a];if(i&&r.color){let s=i.querySelector(".menu-item-icon");s&&(s.style.color=r.color)}})}}});var jle={};Xe(jle,{RecurrenceContextMenu:()=>il,buildCustomRecurrenceRule:()=>Ble,buildRecurrenceOptions:()=>zle,buildWeekdaysOnlyRecurrenceRule:()=>tM,formatDateForDTSTART:()=>Ole,formatDateForInput:()=>R$,getMonthDayOptions:()=>_$,getOrderedRecurrenceWeekdays:()=>Fle,getPluginCalendarLocale:()=>gC,getRecurrenceStartDate:()=>hC,getWeekdayOnlyRRuleCodes:()=>Lle});function _le(n){if(n)try{let e=Intl.Locale;return e?new e(n).weekInfo:void 0}catch(e){return}}function lUe(n,e){var r;if(typeof n=="number"&&Number.isInteger(n)&&n>=0&&n<=6)return n;let t=(r=_le(e))==null?void 0:r.firstDay;return typeof t=="number"?t%7:1}function gC(n){var r,a,i;let e=(i=(a=(r=n.settings)==null?void 0:r.calendarViewSettings)==null?void 0:a.locale)==null?void 0:i.trim();if(e)return e;let t=typeof navigator!="undefined"?navigator.language:"";if(t)return t;try{return Intl.DateTimeFormat().resolvedOptions().locale}catch(s){return}}function Fle(n,e){let t=lUe(n,e),r=eM.findIndex(i=>i.dateIndex===t),a=r>=0?r:1;return[...eM.slice(a),...eM.slice(0,a)]}function Lle(n){var a,i;let e=(i=(a=_le(n))==null?void 0:a.weekend)==null?void 0:i.map(s=>s%7).filter(s=>s>=0&&s<=6);if(!e||e.length===0)return["MO","TU","WE","TH","FR"];let t=new Set(e),r=eM.filter(s=>!t.has(s.dateIndex)).map(s=>s.code);return r.length>0&&r.length<7?r:["MO","TU","WE","TH","FR"]}function tM(n,e){return`DTSTART:${n};FREQ=WEEKLY;BYDAY=${Lle(e).join(",")}`}function hC(n,e=new Date){let t=n==null?void 0:n.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!t)return e;let r=parseInt(t[1],10),a=parseInt(t[2],10),i=parseInt(t[3],10),s=new Date(r,a-1,i);return s.getFullYear()!==r||s.getMonth()!==a-1||s.getDate()!==i?e:s}function Ole(n){let e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}${t}${r}`}function R$(n){let e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function cUe(n){var t;if(!(n!=null&&n.includes("T")))return;let e=n.match(/T(\d{2}):(\d{2})(?::(\d{2}))?/);if(e)return`${e[1]}${e[2]}${(t=e[3])!=null?t:"00"}Z`}function N$(n){let e=["th","st","nd","rd"],t=n%100;return n+(e[(t-20)%10]||e[t]||e[0])}function zle(n){let e=[],t=hC(n.scheduledDate),r=["SU","MO","TU","WE","TH","FR","SA"],a=["January","February","March","April","May","June","July","August","September","October","November","December"],i=r[t.getDay()],s=t.getDate(),o=t.getMonth()+1,l=a[t.getMonth()],c=t.toLocaleDateString(n.calendarLocale||void 0,{weekday:"long"}),d=Ole(t);if(n.currentValue){let u=n.currentValue.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(u&&u[1].includes("T")){let p=u[1].split("T")[1].replace(/Z$/,"")+"Z";d=`${d}T${p}`}}else{let u=cUe(n.scheduledDate);u&&(d=`${d}T${u}`)}return e.push({label:n.translate("components.recurrenceContextMenu.daily"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days"}),e.push({label:n.translate("components.recurrenceContextMenu.weeklyOn",{day:c}),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=1;BYDAY=${i}`,icon:"calendar"}),e.push({label:n.translate("components.recurrenceContextMenu.everyTwoWeeksOn",{day:c}),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=2;BYDAY=${i}`,icon:"calendar"}),e.push({label:n.translate("components.recurrenceContextMenu.monthlyOnThe",{ordinal:N$(s)}),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=${s}`,icon:"calendar-range"}),e.push({label:n.translate("components.recurrenceContextMenu.everyThreeMonthsOnThe",{ordinal:N$(s)}),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=3;BYMONTHDAY=${s}`,icon:"calendar-range"}),e.push({label:n.translate("components.recurrenceContextMenu.yearlyOn",{month:l,ordinal:N$(s)}),value:`DTSTART:${d};FREQ=YEARLY;INTERVAL=1;BYMONTH=${o};BYMONTHDAY=${s}`,icon:"calendar-clock"}),e.push({label:n.translate("components.recurrenceContextMenu.weekdaysOnly"),value:tM(d,n.calendarLocale),icon:"briefcase"}),e.push({label:"─────────",value:"",icon:void 0}),e.push({label:n.translate("components.recurrenceContextMenu.dailyAfterCompletion"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days",anchor:"completion"}),e.push({label:n.translate("components.recurrenceContextMenu.every3DaysAfterCompletion"),value:`DTSTART:${d};FREQ=DAILY;INTERVAL=3`,icon:"calendar-days",anchor:"completion"}),e.push({label:n.translate("components.recurrenceContextMenu.weeklyAfterCompletion"),value:`DTSTART:${d};FREQ=WEEKLY;INTERVAL=1`,icon:"calendar",anchor:"completion"}),e.push({label:n.translate("components.recurrenceContextMenu.monthlyAfterCompletion"),value:`DTSTART:${d};FREQ=MONTHLY;INTERVAL=1`,icon:"calendar-range",anchor:"completion"}),e}function Ble(n){var r;let e=[],t=n.recurrenceAnchor==="completion";if(n.dtstart){let a=n.dtstart.replace(/-/g,"");if(n.dtstartTime){let i=n.dtstartTime.split(":"),s=`${i[0]}${i[1]}${(r=i[2])!=null?r:"00"}`;a=`${a}T${s}Z`}e.push(`DTSTART:${a}`)}switch(e.push(`FREQ=${n.frequency}`),n.interval>1&&e.push(`INTERVAL=${n.interval}`),n.frequency){case"DAILY":!t&&n.byDay.length>0&&e.push(`BYDAY=${n.byDay.join(",")}`);break;case"WEEKLY":!t&&n.byDay.length>0&&e.push(`BYDAY=${n.byDay.join(",")}`);break;case"MONTHLY":if(t)break;if(n.monthlyType==="bydate"){let a=n.byMonthDay.length>0?n.byMonthDay[0]:new Date().getDate();e.push(`BYMONTHDAY=${a}`)}else if(n.monthlyType==="byday"&&n.byDay.length>0){let a=n.bySetPos||1;e.push(`BYDAY=${a}${n.byDay[0]}`)}break;case"YEARLY":if(t)break;if(n.yearlyType==="bydate"){let a=n.byMonth.length>0?n.byMonth[0]:new Date().getMonth()+1,i=n.byMonthDay.length>0?n.byMonthDay[0]:new Date().getDate();e.push(`BYMONTH=${a}`),e.push(`BYMONTHDAY=${i}`)}else if(n.yearlyType==="byday"){let a=n.byMonth.length>0?n.byMonth[0]:new Date().getMonth()+1;if(e.push(`BYMONTH=${a}`),n.byDay.length>0){let i=n.bySetPos||1;e.push(`BYDAY=${i}${n.byDay[0]}`)}}break}switch(n.endType){case"count":n.count&&n.count>0&&e.push(`COUNT=${n.count}`);break;case"until":n.until&&e.push(`UNTIL=${n.until.replace(/-/g,"")}`);break}return e.join(";")}function _$(){return[...Array.from({length:31},(n,e)=>{let t=e+1;return{value:t.toString(),text:t.toString()}}),{value:"-1",text:"Last day"}]}var lo,eM,il,F$,Qy=y(()=>{lo=require("obsidian");Md();Id();rC();eM=[{dateIndex:0,code:"SU",nameKey:"sunday",shortKey:"sun"},{dateIndex:1,code:"MO",nameKey:"monday",shortKey:"mon"},{dateIndex:2,code:"TU",nameKey:"tuesday",shortKey:"tue"},{dateIndex:3,code:"WE",nameKey:"wednesday",shortKey:"wed"},{dateIndex:4,code:"TH",nameKey:"thursday",shortKey:"thu"},{dateIndex:5,code:"FR",nameKey:"friday",shortKey:"fri"},{dateIndex:6,code:"SA",nameKey:"saturday",shortKey:"sat"}];il=class{constructor(e){this.menu=new ra,this.options=e,this.translate=e.plugin.i18n.translate.bind(e.plugin.i18n),this.buildMenu()}buildMenu(){this.getRecurrenceOptions().forEach(t=>{if(t.label.startsWith("─")){this.menu.addSeparator();return}this.menu.addItem(r=>{let a=t.label;t.icon&&r.setIcon(t.icon),t.value===this.options.currentValue&&(a=`✓ ${t.label}`),r.setTitle(a),r.onClick(async()=>{let i=t.anchor||"scheduled";this.options.onSelect(t.value,i)})})}),this.menu.addSeparator(),this.menu.addItem(t=>{t.setTitle(this.translate("components.recurrenceContextMenu.customRecurrence")),t.setIcon("settings"),t.onClick(async()=>{this.showCustomRecurrenceModal()})}),this.options.currentValue&&this.menu.addItem(t=>{t.setTitle(this.translate("components.recurrenceContextMenu.clearRecurrence")),t.setIcon("x"),t.onClick(async()=>{this.options.onSelect(null)})})}getRecurrenceOptions(){return zle({currentValue:this.options.currentValue,scheduledDate:this.options.scheduledDate,calendarLocale:gC(this.options.plugin),translate:this.translate})}showCustomRecurrenceModal(){new F$(this.options.app,this.options.currentValue||"",this.options.currentAnchor||"scheduled",this.options.scheduledDate,this.options.plugin,(e,t)=>{e&&this.options.onSelect(e,t)}).open()}show(e){za(this.menu,e)}},F$=class extends lo.Modal{constructor(t,r,a,i,s,o){super(t);this.frequency="DAILY";this.interval=1;this.byDay=[];this.byMonthDay=[];this.byMonth=[];this.until="";this.endType="never";this.dtstart="";this.dtstartTime="";this.recurrenceAnchor="scheduled";this.currentValue=r,this.recurrenceAnchor=a,this.scheduledDate=i,this.plugin=s,this.translate=s.i18n.translate.bind(s.i18n),this.onSubmit=o,this.parseCurrentValue()}parseCurrentValue(){var r;if(!this.currentValue){if(this.dtstart=R$(hC(this.scheduledDate)),this.scheduledDate&&this.scheduledDate.includes("T")){let a=this.scheduledDate.match(/T(\d{2}):(\d{2})(?::(\d{2}))?/);a&&(this.dtstartTime=`${a[1]}:${a[2]}:${(r=a[3])!=null?r:"00"}`)}return}let t=this.currentValue.split(";");for(let a of t){let i=a.includes(":")&&a.startsWith("DTSTART")?":":"=",[s,o]=a.split(i);switch(s){case"DTSTART":if(o.length>=8){if(this.dtstart=`${o.slice(0,4)}-${o.slice(4,6)}-${o.slice(6,8)}`,o.length>8&&o.includes("T")){let l=o.slice(9);l.length>=4&&(this.dtstartTime=`${l.slice(0,2)}:${l.slice(2,4)}:${l.slice(4,6)||"00"}`)}}else{let l=new Date(o);isNaN(l.getTime())?this.dtstart=R$(hC(this.scheduledDate)):this.dtstart=o}break;case"FREQ":this.frequency=o;break;case"INTERVAL":this.interval=parseInt(o)||1;break;case"BYDAY":{let l=o.split(","),c=[];for(let d of l){let u=d.match(/^(-?\d+)([A-Z]{2})$/);u?(this.bySetPos=parseInt(u[1]),c.push(u[2])):c.push(d)}this.byDay=c;break}case"BYMONTHDAY":this.byMonthDay=o.split(",").map(l=>parseInt(l));break;case"BYMONTH":this.byMonth=o.split(",").map(l=>parseInt(l));break;case"BYSETPOS":this.bySetPos=parseInt(o);break;case"COUNT":this.count=parseInt(o),this.endType="count";break;case"UNTIL":o.length===8?this.until=`${o.slice(0,4)}-${o.slice(4,6)}-${o.slice(6,8)}`:this.until=o,this.endType="until";break}}}onOpen(){var Dr,cs;let{contentEl:t}=this;t.empty();let r=gC(this.plugin),a=(cs=(Dr=this.plugin.settings)==null?void 0:Dr.calendarViewSettings)==null?void 0:cs.firstDay,i=Fle(a,r),s=hC(this.scheduledDate);t.createEl("h2",{text:this.translate("components.recurrenceContextMenu.customRecurrenceModal.title")}),new lo.Setting(t).setName("Start date").setDesc("The date when the recurrence pattern begins").addText(ne=>{ne.inputEl.type="date",ne.setValue(this.dtstart).onChange(Ce=>{this.dtstart=Ce}),ql(ne.inputEl,{onCommit:Ce=>{this.dtstart=Ce}})}),new lo.Setting(t).setName("Start time").setDesc("The time when recurring instances should appear (optional)").addText(ne=>{ne.inputEl.type="time",ne.inputEl.step="1",ne.setValue(this.dtstartTime).onChange(Ce=>{this.dtstartTime=Ce})}),new lo.Setting(t).setName("Recur from").setDesc("When should the next occurrence be calculated from?").addDropdown(ne=>{ne.addOption("scheduled","Scheduled date (fixed schedule)").addOption("completion","Completion date (flexible schedule)").setValue(this.recurrenceAnchor).onChange(Ce=>{this.recurrenceAnchor=Ce,this.updateFrequencySpecificVisibility()})}),new lo.Setting(t).setName("Frequency").addDropdown(ne=>{ne.addOption("DAILY","Daily").addOption("WEEKLY","Weekly").addOption("MONTHLY","Monthly").addOption("YEARLY","Yearly").setValue(this.frequency).onChange(Ce=>{this.frequency=Ce,this.updateFrequencySpecificVisibility()})}),new lo.Setting(t).setName("Interval").setDesc("Every X days/weeks/months/years").addText(ne=>{ne.setValue(this.interval.toString()).onChange(Ce=>{this.interval=parseInt(Ce)||1})});let o=new lo.Setting(t).setName("Days of week").setDesc("Select specific days (for daily or weekly recurrence)"),l=o.controlEl.createDiv("days-container");i.map(ne=>({key:ne.code,label:this.translate(`components.recurrenceContextMenu.customRecurrenceModal.weekdaysShort.${ne.shortKey}`)})).forEach(ne=>{let Ce=l.createEl("label",{cls:"day-checkbox"});Ce.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),Ce.classList.add("tn-static-display-inline-block-60e32dcb"),Ce.classList.remove("tn-static-margin-right-4px-c6b76b85"),Ce.classList.add("tn-static-margin-right-8px-539fa9a0");let en=Ce.createEl("input",{type:"checkbox"});en.checked=this.byDay.includes(ne.key),en.addEventListener("change",()=>{en.checked?this.byDay.includes(ne.key)||this.byDay.push(ne.key):this.byDay=this.byDay.filter(Qm=>Qm!==ne.key)}),Ce.createSpan({text:` ${ne.label}`})});let d=new lo.Setting(t).setName("Monthly recurrence").setDesc("Choose how to repeat monthly"),u=d.controlEl.createDiv("monthly-options"),p=u.createEl("label",{cls:"radio-option"});p.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),p.classList.add("tn-static-display-block-2a1b75c9"),p.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),p.classList.add("tn-static-margin-bottom-8px-fdf33f23");let m=p.createEl("input",{type:"radio",value:"bydate"});m.name="monthly-type",m.checked=this.byMonthDay.length>0||this.byDay.length===0&&this.bySetPos===void 0,p.createSpan({text:" On "});let f=p.createEl("select");f.classList.add("tn-static-margin-left-4px-46cec891"),f.classList.remove("tn-static-margin-right-8px-539fa9a0"),f.classList.add("tn-static-margin-right-4px-c6b76b85");for(let ne of _$()){let Ce=f.createEl("option",{value:ne.value,text:ne.text}),en=parseInt(ne.value,10);(this.byMonthDay.length>0&&this.byMonthDay[0]===en||this.byMonthDay.length===0&&en===s.getDate())&&(Ce.selected=!0)}p.createSpan({text:" of each month"});let h=u.createEl("label",{cls:"radio-option"});h.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),h.classList.add("tn-static-display-block-2a1b75c9"),h.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),h.classList.add("tn-static-margin-bottom-8px-fdf33f23");let g=h.createEl("input",{type:"radio",value:"byday"});g.name="monthly-type",g.checked=this.byDay.length>0&&this.bySetPos!==void 0,h.createSpan({text:" On the "});let v=h.createEl("select");v.classList.add("tn-static-margin-left-4px-46cec891"),v.classList.remove("tn-static-margin-right-8px-539fa9a0"),v.classList.add("tn-static-margin-right-4px-c6b76b85");let k=[{value:"1",text:"first"},{value:"2",text:"second"},{value:"3",text:"third"},{value:"4",text:"fourth"},{value:"-1",text:"last"}];k.forEach(ne=>{let Ce=v.createEl("option",{value:ne.value,text:ne.text});(this.bySetPos===parseInt(ne.value)||!this.bySetPos&&ne.value==="1")&&(Ce.selected=!0)});let T=h.createEl("select");T.classList.add("tn-static-margin-left-4px-46cec891"),T.classList.remove("tn-static-margin-right-8px-539fa9a0"),T.classList.add("tn-static-margin-right-4px-c6b76b85");let b=i.map(ne=>({value:ne.code,text:this.translate(`components.recurrenceContextMenu.customRecurrenceModal.weekdays.${ne.nameKey}`)})),w=["SU","MO","TU","WE","TH","FR","SA"][s.getDay()];b.forEach(ne=>{let Ce=T.createEl("option",{value:ne.value,text:ne.text});(this.byDay.length>0&&this.byDay[0]===ne.value||this.byDay.length===0&&ne.value===w)&&(Ce.selected=!0)}),h.createSpan({text:" of each month"});let S=new lo.Setting(t).setName("Yearly recurrence").setDesc("Choose how to repeat yearly"),C=S.controlEl.createDiv("yearly-options"),x=C.createEl("label",{cls:"radio-option"});x.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),x.classList.add("tn-static-display-block-2a1b75c9"),x.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),x.classList.add("tn-static-margin-bottom-8px-fdf33f23");let E=x.createEl("input",{type:"radio",value:"bydate"});E.name="yearly-type",E.checked=this.byMonthDay.length>0||this.byDay.length===0&&this.bySetPos===void 0,x.createSpan({text:" On "});let _=x.createEl("select");_.classList.add("tn-static-margin-left-4px-46cec891"),_.classList.remove("tn-static-margin-right-8px-539fa9a0"),_.classList.add("tn-static-margin-right-4px-c6b76b85");let F=["January","February","March","April","May","June","July","August","September","October","November","December"];F.forEach((ne,Ce)=>{let en=_.createEl("option",{value:(Ce+1).toString(),text:ne});(this.byMonth.length>0&&this.byMonth[0]===Ce+1||this.byMonth.length===0&&Ce+1===s.getMonth()+1)&&(en.selected=!0)});let I=x.createEl("select");I.classList.add("tn-static-margin-left-4px-46cec891"),I.classList.remove("tn-static-margin-right-8px-539fa9a0"),I.classList.add("tn-static-margin-right-4px-c6b76b85");for(let ne of _$()){let Ce=I.createEl("option",{value:ne.value,text:ne.text}),en=parseInt(ne.value,10);(this.byMonthDay.length>0&&this.byMonthDay[0]===en||this.byMonthDay.length===0&&en===s.getDate())&&(Ce.selected=!0)}x.createSpan({text:" each year"});let A=C.createEl("label",{cls:"radio-option"});A.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),A.classList.add("tn-static-display-block-2a1b75c9"),A.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),A.classList.add("tn-static-margin-bottom-8px-fdf33f23");let R=A.createEl("input",{type:"radio",value:"byday"});R.name="yearly-type",R.checked=this.byDay.length>0&&this.bySetPos!==void 0,A.createSpan({text:" On the "});let O=A.createEl("select");O.classList.add("tn-static-margin-left-4px-46cec891"),O.classList.remove("tn-static-margin-right-8px-539fa9a0"),O.classList.add("tn-static-margin-right-4px-c6b76b85"),k.forEach(ne=>{let Ce=O.createEl("option",{value:ne.value,text:ne.text});(this.bySetPos===parseInt(ne.value)||!this.bySetPos&&ne.value==="1")&&(Ce.selected=!0)});let U=A.createEl("select");U.classList.add("tn-static-margin-left-4px-46cec891"),U.classList.remove("tn-static-margin-right-8px-539fa9a0"),U.classList.add("tn-static-margin-right-4px-c6b76b85"),b.forEach(ne=>{let Ce=U.createEl("option",{value:ne.value,text:ne.text});(this.byDay.length>0&&this.byDay[0]===ne.value||this.byDay.length===0&&ne.value===w)&&(Ce.selected=!0)});let pe=A.createEl("select");pe.classList.add("tn-static-margin-left-4px-46cec891"),pe.classList.remove("tn-static-margin-right-8px-539fa9a0"),pe.classList.add("tn-static-margin-right-4px-c6b76b85"),F.forEach((ne,Ce)=>{let en=pe.createEl("option",{value:(Ce+1).toString(),text:ne});(this.byMonth.length>0&&this.byMonth[0]===Ce+1||this.byMonth.length===0&&Ce+1===s.getMonth()+1)&&(en.selected=!0)}),A.createSpan({text:" each year"}),new lo.Setting(t).setName("End condition").setDesc("Choose when the recurrence should end");let oe=t.createDiv("end-condition-container"),X=oe.createEl("label",{cls:"radio-option"});X.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),X.classList.add("tn-static-display-block-2a1b75c9"),X.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),X.classList.add("tn-static-margin-bottom-8px-fdf33f23");let de=X.createEl("input",{type:"radio",value:"never"});de.name="end-type",de.checked=this.endType==="never",X.createSpan({text:" Never ends"});let Oe=oe.createEl("label",{cls:"radio-option"});Oe.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),Oe.classList.add("tn-static-display-block-2a1b75c9"),Oe.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),Oe.classList.add("tn-static-margin-bottom-8px-fdf33f23");let Q=Oe.createEl("input",{type:"radio",value:"count"});Q.name="end-type",Q.checked=this.endType==="count",Oe.createSpan({text:" End after "});let Z=Oe.createEl("input",{type:"number",placeholder:"10"});Z.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-80px-8573bae3"),Z.classList.add("tn-static-width-60px-bd09c419"),Z.classList.add("tn-static-margin-left-4px-46cec891"),Z.classList.remove("tn-static-margin-right-8px-539fa9a0"),Z.classList.add("tn-static-margin-right-4px-c6b76b85"),Z.value=this.count?this.count.toString():"",Oe.createSpan({text:" occurrences"});let Ue=oe.createEl("label",{cls:"radio-option"});Ue.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),Ue.classList.add("tn-static-display-block-2a1b75c9"),Ue.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f"),Ue.classList.add("tn-static-margin-bottom-8px-fdf33f23");let le=Ue.createEl("input",{type:"radio",value:"until"});le.name="end-type",le.checked=this.endType==="until",Ue.createSpan({text:" End on "});let at=Ue.createEl("input",{type:"date"});at.classList.add("tn-static-margin-left-4px-46cec891"),at.value=this.until?this.until.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"):"",ql(at,{onCommit:ne=>{this.until=ne.replace(/-/g,""),le.checked=!0,this.endType="until"}}),de.addEventListener("change",()=>{de.checked&&(this.endType="never")}),Q.addEventListener("change",()=>{Q.checked&&(this.endType="count")}),le.addEventListener("change",()=>{le.checked&&(this.endType="until")}),Z.addEventListener("input",()=>{this.count=parseInt(Z.value)||void 0,Z.value&&(Q.checked=!0,this.endType="count")}),at.addEventListener("input",()=>{this.until=at.value?at.value.replace(/-/g,""):"",at.value&&(le.checked=!0,this.endType="until")}),this.updateFrequencySpecificVisibility=()=>{let ne=this.recurrenceAnchor==="completion";o.settingEl.style.display=(this.frequency==="DAILY"||this.frequency==="WEEKLY")&&!ne?"flex":"none",d.settingEl.style.display=this.frequency==="MONTHLY"&&!ne?"flex":"none",S.settingEl.style.display=this.frequency==="YEARLY"&&!ne?"flex":"none"},this.updateFrequencySpecificVisibility();let He=t.createDiv("button-container");He.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),He.classList.add("tn-static-display-flex-75816cae"),He.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),He.classList.add("tn-static-justify-content-flex-end-455f8cca"),He.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db"),He.classList.add("tn-static-gap-8px-33fcd4c3"),He.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),He.classList.add("tn-static-margin-top-16px-1b0f4999"),He.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),He.createEl("button",{text:"Save",cls:"mod-cta"}).addEventListener("click",()=>{let ne=m.checked?"bydate":"byday",Ce=E.checked?"bydate":"byday";this.frequency==="MONTHLY"?ne==="bydate"?(this.byMonthDay=[parseInt(f.value)],this.byDay=[],this.bySetPos=void 0):(this.byMonthDay=[],this.byDay=[T.value],this.bySetPos=parseInt(v.value)):this.frequency==="YEARLY"&&(Ce==="bydate"?(this.byMonth=[parseInt(_.value)],this.byMonthDay=[parseInt(I.value)],this.byDay=[],this.bySetPos=void 0):(this.byMonth=[parseInt(pe.value)],this.byMonthDay=[],this.byDay=[U.value],this.bySetPos=parseInt(O.value)));let en=this.buildRRule(ne,Ce);this.onSubmit(en,this.recurrenceAnchor),this.close()})}updateFrequencySpecificVisibility(){}buildRRule(t,r){return Ble({frequency:this.frequency,interval:this.interval,dtstart:this.dtstart,dtstartTime:this.dtstartTime,recurrenceAnchor:this.recurrenceAnchor,byDay:this.byDay,byMonthDay:this.byMonthDay,byMonth:this.byMonth,bySetPos:this.bySetPos,endType:this.endType,count:this.count,until:this.until,monthlyType:t,yearlyType:r})}onClose(){let{contentEl:t}=this;t.empty()}}});var $le={};Xe($le,{ReminderModal:()=>sl});var Yr,L$,O$,sl,Jy=y(()=>{Yr=require("obsidian");xe();rC();q();L$=M({tag:"Modals/ReminderModal"}),O$="reminder-modal__fields--hidden",sl=class extends Yr.Modal{constructor(t,r,a,i){super(t);this.selectedType="relative";this.relativeAnchor="due";this.relativeOffset=15;this.relativeUnit="minutes";this.relativeDirection="before";this.absoluteDate="";this.absoluteTime="";this.description="";this.plugin=r,this.task=a,this.reminders=a.reminders?[...a.reminders]:[],this.originalReminders=a.reminders?[...a.reminders]:[],this.onSave=i}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("tasknotes-plugin"),t.addClass("tasknotes-reminder-modal"),t.createDiv({cls:"reminder-modal__loading"}).createDiv({text:"Loading reminders..."}),this.initializeWithFreshData().catch(a=>{L$.error("Failed to initialize reminder modal:",{category:"internal",operation:"initialize-reminder-modal",error:a}),t.empty(),t.addClass("tasknotes-plugin"),t.addClass("tasknotes-reminder-modal"),t.createDiv({cls:"reminder-modal__error",text:"Failed to load task data. Please try again."})})}async initializeWithFreshData(){let{contentEl:t}=this;if(this.task.path&&this.task.path.trim()!==""){let s=await this.plugin.cacheManager.getTaskInfo(this.task.path);s?(this.task=s,this.reminders=s.reminders?[...s.reminders]:[],this.originalReminders=s.reminders?[...s.reminders]:[]):(this.reminders=this.task.reminders?[...this.task.reminders]:[],this.originalReminders=this.task.reminders?[...this.task.reminders]:[])}else this.reminders=this.task.reminders?[...this.task.reminders]:[],this.originalReminders=this.task.reminders?[...this.task.reminders]:[];t.empty(),t.addClass("tasknotes-plugin"),t.addClass("tasknotes-reminder-modal");let r=t.createDiv({cls:"reminder-modal__header"});r.createEl("h2",{text:"Task reminders"}),r.createDiv({cls:"reminder-modal__task-title",text:this.task.title});let a=this.getTaskContextInfo();if(a){let s=r.createDiv({cls:"reminder-modal__task-dates"});s.textContent=a}let i=t.createDiv({cls:"reminder-modal__content"});this.renderExistingReminders(i),this.renderAddReminderForm(i),this.renderActionButtons(t),this.setupKeyboardHandlers(),this.updateSaveButtonState()}renderActionButtons(t){let r=t.createDiv({cls:"reminder-modal__actions"});this.saveBtn=r.createEl("button",{text:"Save changes",cls:"mod-cta reminder-modal__save-btn"}),this.saveBtn.disabled=!0,this.saveBtn.onclick=async()=>{await this.save()};let a=r.createEl("button",{text:"Cancel",cls:"reminder-modal__cancel-btn"});a.onclick=()=>{this.cancel()}}getTaskContextInfo(){let t=[];return this.task.due&&t.push(`Due: ${wd(this.task.due)}`),this.task.scheduled&&t.push(`Scheduled: ${wd(this.task.scheduled)}`),t.length>0?t.join(" • "):null}setupKeyboardHandlers(){let t=r=>{r.key==="Enter"&&(r.ctrlKey||r.metaKey)&&!this.saveBtn.disabled?(r.preventDefault(),this.save()):r.key==="Escape"&&(r.preventDefault(),this.cancel())};this.contentEl.addEventListener("keydown",t),this.onClose=()=>{this.contentEl.removeEventListener("keydown",t);let{contentEl:r}=this;r.empty()}}updateSaveButtonState(){if(!this.saveBtn)return;let t=this.remindersHaveChanged();this.saveBtn.disabled=!t,this.saveBtn.textContent=t?"Save Changes":"No Changes"}renderExistingReminders(t){let r=t.createDiv({cls:"reminder-modal__section"}),a=r.createDiv({cls:"reminder-modal__section-header"});if(a.createEl("h3",{text:"Current reminders"}),this.reminders.length>0&&a.createSpan({cls:"reminder-modal__reminder-count",text:`(${this.reminders.length})`}),this.reminders.length===0){let s=r.createDiv({cls:"reminder-modal__empty-state"});(0,Yr.setIcon)(s.createDiv({cls:"reminder-modal__empty-icon"}),"bell-off"),s.createDiv({cls:"reminder-modal__empty-text",text:"No reminders set"});return}let i=r.createDiv({cls:"reminder-modal__reminder-list"});this.reminders.forEach((s,o)=>{let l=i.createDiv({cls:"reminder-modal__reminder-card"}),c=l.createDiv({cls:"reminder-modal__reminder-icon"}),d=s.type==="absolute"?"calendar-clock":"timer";(0,Yr.setIcon)(c,d);let u=l.createDiv({cls:"reminder-modal__reminder-content"}),p=u.createDiv({cls:"reminder-modal__reminder-primary"});if(p.textContent=this.formatReminderDisplayText(s),s.description){let h=u.createDiv({cls:"reminder-modal__reminder-description"});h.textContent=`"${s.description}"`}let f=l.createDiv({cls:"reminder-modal__reminder-actions"}).createEl("button",{cls:"reminder-modal__action-btn reminder-modal__remove-btn"});(0,Yr.setIcon)(f,"trash-2"),(0,Yr.setTooltip)(f,"Delete this reminder"),f.onclick=async h=>{h.stopPropagation(),await this.removeReminder(o)}})}formatReminderDisplayText(t){if(t.type==="absolute"){if(t.absoluteTime)try{let r=new Date(t.absoluteTime);return`${r.toLocaleDateString()} at ${r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`}catch(r){return`At ${t.absoluteTime}`}return"Absolute reminder"}else{let r=t.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(t.offset||"")} ${r}`}}renderQuickActions(t){if(!(this.task.due||this.task.scheduled))return;let i=t.createDiv({cls:"reminder-modal__quick-actions"}).createDiv({cls:"reminder-modal__quick-buttons"});[{label:"5m",fullLabel:"5 minutes before",offset:"-PT5M",icon:"clock"},{label:"15m",fullLabel:"15 minutes before",offset:"-PT15M",icon:"clock"},{label:"1h",fullLabel:"1 hour before",offset:"-PT1H",icon:"clock"},{label:"1d",fullLabel:"1 day before",offset:"-P1D",icon:"calendar"}].forEach(({label:o,fullLabel:l,offset:c,icon:d})=>{let u=this.task.due?"due":"scheduled",p=i.createEl("button",{cls:"reminder-modal__quick-btn"}),m=p.createSpan({cls:"reminder-modal__quick-btn-icon"});(0,Yr.setIcon)(m,d),p.createSpan({cls:"reminder-modal__quick-btn-label",text:o}),(0,Yr.setTooltip)(p,`Add reminder ${l} ${u} date`),p.onclick=async()=>{await this.addQuickReminder(u,c,l)}})}async addQuickReminder(t,r,a){let i={id:`rem_${Date.now()}`,type:"relative",relatedTo:t,offset:r,description:a};await this.addReminder(i),new Yr.Notice(`Added reminder: ${a}`)}renderAddReminderForm(t){let r=t.createDiv({cls:"reminder-modal__section"});r.createDiv({cls:"reminder-modal__section-header"}).createEl("h3",{text:"Add new reminder"}),this.renderQuickActions(r);let i=r.createDiv({cls:"reminder-modal__form"}),s=i.createDiv({cls:"reminder-modal__type-selector"}),o=s.createEl("button",{cls:"reminder-modal__type-tab reminder-modal__type-tab--active",text:"Relative",attr:{"data-type":"relative"}}),l=s.createEl("button",{cls:"reminder-modal__type-tab",text:"Absolute",attr:{"data-type":"absolute"}});o.classList.toggle("reminder-modal__type-tab--active",this.selectedType==="relative"),l.classList.toggle("reminder-modal__type-tab--active",this.selectedType==="absolute");let c=f=>{this.selectedType=f,o.classList.toggle("reminder-modal__type-tab--active",f==="relative"),l.classList.toggle("reminder-modal__type-tab--active",f==="absolute"),this.updateFormVisibility(i,this.selectedType)};o.onclick=()=>c("relative"),l.onclick=()=>c("absolute");let d=i.createDiv({cls:"relative-fields"});new Yr.Setting(d).setName("Time").addText(f=>{f.setPlaceholder("15").setValue(String(this.relativeOffset)).onChange(h=>{this.relativeOffset=parseInt(h)||0})}).addDropdown(f=>{f.addOption("minutes","Minutes").addOption("hours","Hours").addOption("days","Days").setValue(this.relativeUnit).onChange(h=>{this.relativeUnit=h})}),new Yr.Setting(d).setName("Direction").addDropdown(f=>{f.addOption("before","Before").addOption("after","After").setValue(this.relativeDirection).onChange(h=>{this.relativeDirection=h})}),new Yr.Setting(d).setName("Relative to").addDropdown(f=>{let h={};this.task.due&&(h.due=`Due date (${wd(this.task.due)})`),this.task.scheduled&&(h.scheduled=`Scheduled date (${wd(this.task.scheduled)})`),Object.keys(h).length===0?(h.none="No dates available",f.setDisabled(!0)):(Object.entries(h).forEach(([g,v])=>{f.addOption(g,v)}),f.setValue(this.relativeAnchor)),f.onChange(g=>{this.relativeAnchor=g})});let u=i.createDiv({cls:`absolute-fields ${O$}`});new Yr.Setting(u).setName("Date").addText(f=>{f.setPlaceholder("Yyyy-mm-dd").setValue(this.absoluteDate).onChange(h=>{this.absoluteDate=h}),f.inputEl.type="date",ql(f.inputEl,{onCommit:h=>{this.absoluteDate=h}})}),new Yr.Setting(u).setName("Time").addText(f=>{f.setPlaceholder("Hh:mm").setValue(this.absoluteTime).onChange(h=>{this.absoluteTime=h}),f.inputEl.type="time"}),new Yr.Setting(i).setName("Description (optional)").addText(f=>{f.setPlaceholder("Custom reminder message").setValue(this.description).onChange(h=>{this.description=h})});let p=i.createEl("button",{cls:"reminder-add-btn"}),m=p.createSpan({cls:"reminder-add-btn-icon"});(0,Yr.setIcon)(m,"plus"),p.createSpan({cls:"reminder-add-btn-text",text:"Add Reminder"}),p.onclick=async()=>{p.disabled=!0,p.classList.add("reminder-add-btn--loading");try{let f=this.createReminder(this.selectedType,this.relativeAnchor,this.relativeOffset,this.relativeUnit,this.relativeDirection,this.absoluteDate,this.absoluteTime,this.description);f&&(await this.addReminder(f),this.selectedType==="relative"?(this.relativeOffset=15,this.relativeUnit="minutes",this.description=""):(this.absoluteDate="",this.absoluteTime="",this.description=""),this.resetFormInputs(i))}catch(f){L$.error("Error adding reminder:",{category:"internal",operation:"adding-reminder",error:f}),new Yr.Notice("Failed to add reminder. Please check your inputs.")}finally{p.disabled=!1,p.classList.remove("reminder-add-btn--loading")}},this.updateFormVisibility(i,this.selectedType)}updateFormVisibility(t,r){let a=t.querySelector(".relative-fields"),i=t.querySelector(".absolute-fields");a.classList.toggle(O$,r!=="relative"),i.classList.toggle(O$,r!=="absolute")}createReminder(t,r,a,i,s,o,l,c){let d=`rem_${Date.now()}`;if(t==="relative"){if(!(r==="due"?this.task.due:this.task.scheduled))return new Yr.Notice(`Cannot create reminder: Task has no ${r} date`),null;let p="PT";return i==="days"?p=`P${a}D`:i==="hours"?p=`PT${a}H`:p=`PT${a}M`,s==="before"&&(p="-"+p),{id:d,type:"relative",relatedTo:r,offset:p,description:c||void 0}}else{if(!o||!l)return new Yr.Notice("Please specify both date and time for absolute reminder"),null;let u=`${o}T${l}:00`;return{id:d,type:"absolute",absoluteTime:u,description:c||void 0}}}formatReminderTiming(t){if(t.type==="absolute")return"Absolute reminder";{let r=t.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(t.offset||"")} ${r}`}}formatReminderDetails(t){if(t.type==="absolute")return`At ${wd(t.absoluteTime||"")}`;{let r=t.relatedTo==="due"?this.task.due:this.task.scheduled;return r?`When ${t.relatedTo} date is ${wd(r)}`:`Relative to ${t.relatedTo} date (not set)`}}formatReminderDescription(t){if(t.description)return t.description;if(t.type==="absolute")return`At ${wd(t.absoluteTime||"")}`;{let r=t.relatedTo==="due"?"due date":"scheduled date";return`${this.formatOffset(t.offset||"")} ${r}`}}formatOffset(t){let r=t.startsWith("-"),i=(r?t.substring(1):t).match(/P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?)?/);if(!i)return t;let[,s,o,l]=i,c=[];if(s&&c.push(`${s} day${s!=="1"?"s":""}`),o&&c.push(`${o} hour${o!=="1"?"s":""}`),l&&c.push(`${l} minute${l!=="1"?"s":""}`),c.length===0)return"At time of";let d=c.join(" ");return r?`${d} before`:`${d} after`}async addReminder(t){this.reminders.push(t),this.refreshRemindersListOnly(),this.task.path&&this.plugin.emitter.trigger("reminder-preview-changed",{taskPath:this.task.path,currentReminders:[...this.reminders],action:"added",reminder:t})}async removeReminder(t){let r=this.reminders[t];this.reminders.splice(t,1),this.refreshRemindersListOnly(),this.task.path&&r&&this.plugin.emitter.trigger("reminder-preview-changed",{taskPath:this.task.path,currentReminders:[...this.reminders],action:"removed",reminder:r})}async refresh(){await this.initializeWithFreshData()}refreshRemindersListOnly(){let t=this.contentEl.querySelector(".reminder-modal__content");if(t){let r=t.querySelector(".reminder-modal__section");r&&r.remove();let a=activeWindow.createDiv();this.renderExistingReminders(a);let i=a.firstChild;i&&t.insertBefore(i,t.firstChild)}this.updateSaveButtonState()}resetFormInputs(t){let r=t.querySelector('input[placeholder="15"]');r&&(r.value=String(this.relativeOffset));let a=t.querySelector('input[placeholder="Custom reminder message"]');a&&(a.value=this.description);let i=t.querySelector('input[type="date"]');i&&(i.value=this.absoluteDate);let s=t.querySelector('input[type="time"]');s&&(s.value=this.absoluteTime);let o=t.querySelector('.setting-item:has(input[placeholder="15"]) select');o&&(o.value=this.relativeUnit);let l=t.querySelector(".setting-item:nth-child(2) select");l&&(l.value=this.relativeDirection);let c=t.querySelector(".setting-item:nth-child(3) select");c&&(c.value=this.relativeAnchor)}async save(){var t;this.saveBtn.disabled=!0,this.saveBtn.textContent="Saving...";try{this.task.path&&this.task.path.trim()!==""&&((t=this.plugin.notificationService)==null||t.clearProcessedRemindersForTask(this.task.path));let r=this.remindersHaveChanged();this.onSave(this.reminders),r&&this.task.path&&this.plugin.emitter.trigger("reminder-changed",{taskPath:this.task.path,oldReminders:this.originalReminders,newReminders:[...this.reminders]}),this.close()}catch(r){L$.error("Failed to save reminders:",{category:"persistence",operation:"save-reminders",error:r}),new Yr.Notice("Failed to save reminders. Please try again."),this.saveBtn.disabled=!1,this.saveBtn.textContent="Save changes"}}cancel(){this.remindersHaveChanged()&&this.task.path&&this.plugin.emitter.trigger("reminder-preview-changed",{taskPath:this.task.path,currentReminders:[...this.originalReminders],action:"cancelled"}),this.close()}remindersHaveChanged(){return this.reminders.length!==this.originalReminders.length?!0:!this.reminders.every((t,r)=>{let a=this.originalReminders[r];return a?t.id===a.id&&t.type===a.type&&t.relatedTo===a.relatedTo&&t.offset===a.offset&&t.absoluteTime===a.absoluteTime&&t.description===a.description:!1})}onClose(){let{contentEl:t}=this;t.empty()}}});function rM(n){return M({tag:"TaskCard/Actions",isDebugEnabled:()=>n.settings.enableDebugLogging})}function z$(n){let{task:e,plugin:t,targetDate:r,updateStatusVisuals:a}=n;return i=>{i.stopPropagation(),(async()=>{let s=rM(t);try{if(e.recurrence){let p=await t.toggleRecurringTaskComplete(e,r),m=oy(p,r,t.statusManager.getCompletedStatuses()[0]),f=t.statusManager.isCompletedStatus(m);a(p,m,f);return}let o=await t.cacheManager.getTaskInfo(e.path);if(!o){new Xy.Notice("Task not found");return}let l=o.status||t.settings.defaultTaskStatus,c=i.shiftKey?t.statusManager.getPreviousStatus(l):t.statusManager.getNextStatus(l),d=await t.updateTaskProperty(o,"status",c),u=t.statusManager.isCompletedStatus(c);a(d,c,u)}catch(o){let l=o instanceof Error?o.message:String(o);s.error("Error cycling task status",{category:"persistence",operation:"cycle-status",details:{taskPath:e.path,errorMessage:l},error:o}),new Xy.Notice(`Failed to update task status: ${l}`)}})()}}function B$(n,e){return t=>{t.stopPropagation(),new Ud({currentValue:n.priority,onSelect:a=>{(async()=>{let i=rM(e);try{await e.updateTaskProperty(n,"priority",a)}catch(s){i.error("Error updating priority",{category:"persistence",operation:"update-priority",details:{taskPath:n.path,newPriority:a},error:s}),new Xy.Notice("Failed to update priority")}})()},plugin:e}).show(t)}}function j$(n,e){return t=>{t.stopPropagation(),new il({currentValue:typeof n.recurrence=="string"?n.recurrence:void 0,currentAnchor:n.recurrence_anchor||"scheduled",scheduledDate:n.scheduled,onSelect:(a,i)=>{(async()=>{let s=rM(e);try{await e.updateTaskProperty(n,"recurrence",a||void 0),i!==void 0&&await e.updateTaskProperty(n,"recurrence_anchor",i)}catch(o){s.error("Error updating recurrence",{category:"persistence",operation:"update-recurrence",details:{taskPath:n.path,newRecurrence:a,anchor:i},error:o}),new Xy.Notice("Failed to update recurrence")}})()},app:e.app,plugin:e}).show(t)}}function $$(n,e){return()=>{new sl(e.app,e,n,r=>{(async()=>{let a=rM(e);try{await e.updateTaskProperty(n,"reminders",r.length>0?r:void 0)}catch(i){a.error("Error updating reminders",{category:"persistence",operation:"update-reminders",details:{taskPath:n.path,reminderCount:r.length},error:i}),new Xy.Notice("Failed to update reminders")}})()}).open()}}var Xy,U$=y(()=>{Xy=require("obsidian");fC();Qy();Jy();yt();q()});function Ie(n,e){return n.createElement(e,{})}var Li=y(()=>{});function nM(n){return M({tag:"TaskCard/Relationships",isDebugEnabled:()=>{var e;return((e=n.settings)==null?void 0:e.enableDebugLogging)===!0}})}function H$(n,e){var t,r;return(r=(t=n.getRelationshipOptions)==null?void 0:t.call(n,e))!=null?r:{}}function dUe(n,e){let t=()=>e.classList.add("task-card--nested-interactive-hover"),r=()=>e.classList.remove("task-card--nested-interactive-hover");n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",r)}function uUe(n){let e=n,t=e._clickHandler;t&&(n.removeEventListener("click",t),delete e._clickHandler)}function Cs(n,e){let t=n.querySelector(e);t&&(n.classList.remove("task-card--nested-interactive-hover"),uUe(t),t.remove())}function Ule(n){Cs(n,".task-card__subtasks"),Cs(n,".task-card__blocking"),Cs(n,".task-card__blocked-by")}function V$(n,e,t,r={}){let a=n.querySelector(e);if(a)return a;let i=Ie(n.ownerDocument,"div");i.className=t;let s=o=>{o.stopPropagation()};return i.addEventListener("click",s),i._clickHandler=s,r.stopExtraPointerEvents&&(i.addEventListener("dblclick",o=>o.stopPropagation()),i.addEventListener("contextmenu",o=>o.stopPropagation())),dUe(i,n),n.appendChild(i),i}function pUe(n){var r;let e=[],t=n.closest(".task-card");for(;t;){let a=t._taskPath;typeof a=="string"&&e.unshift(a),t=(r=t.parentElement)==null?void 0:r.closest(".task-card")}return e}function W$(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Hle(n,e,t,r,a){for(let i of e){let s=t.renderTaskCard(i,r);s.classList.add(a),n.appendChild(s)}}async function q$(n,e,t,r){let{plugin:a}=n,i=nM(a);try{if(!r){Cs(e,".task-card__subtasks");return}let s=V$(e,".task-card__subtasks","task-card__subtasks");W$(s);let o=s.createDiv({cls:"task-card__subtasks-loading",text:a.i18n.translate("contextMenus.task.subtasks.loading")});try{let l=a.app.vault.getAbstractFileByPath(t.path);if(!(l instanceof yC.TFile))throw new Error("Task file not found");if(!a.projectSubtasksService)throw new Error("projectSubtasksService not initialized");let c=H$(n,e),d=JA(await a.projectSubtasksService.getTasksLinkedToProject(l),c);if(o.remove(),d.length===0){s.createDiv({cls:"task-card__subtasks-loading",text:a.i18n.translate("contextMenus.task.subtasks.noSubtasks")});return}let u=Nle(d,c,m=>a.projectSubtasksService.sortTasks(m)),p=pUe(e);for(let m of u){if(p.includes(m.path)){i.warn("Skipped circular task relationship",{category:"validation",operation:"render-subtasks",details:{taskPath:t.path,subtaskPath:m.path,parentChain:p}});continue}let f=n.renderTaskCard(m,c);f.classList.add("task-card--subtask"),s.appendChild(f)}}catch(l){i.error("Error loading subtasks",{category:"provider",operation:"load-subtasks",details:{taskPath:t.path},error:l}),o.textContent=a.i18n.translate("contextMenus.task.subtasks.loadFailed")}}catch(s){throw i.error("Error toggling subtasks",{category:"internal",operation:"toggle-subtasks",details:{taskPath:t.path,expanded:r},error:s}),s}}async function Vle(n,e,t,r){let{plugin:a}=n,i=nM(a);if(!r){Cs(e,".task-card__blocking");return}let s=V$(e,".task-card__blocking","task-card__blocking",{stopExtraPointerEvents:!0});W$(s);let o=s.createDiv({cls:"task-card__blocking-loading",text:a.i18n.translate("ui.taskCard.loadingDependencies")});try{let l=t.blocking?await Promise.all(t.blocking.map(u=>a.cacheManager.getTaskInfo(u))):[],c=H$(n,e),d=JA(l.filter(u=>!!u),c);if(o.remove(),d.length===0){s.createDiv({cls:"task-card__blocking-empty",text:a.i18n.translate("ui.taskCard.blockingEmpty")});return}Hle(s,d,n,c,"task-card--dependency")}catch(l){i.error("Error loading blocking tasks",{category:"provider",operation:"load-blocking-tasks",details:{taskPath:t.path},error:l}),o.textContent=a.i18n.translate("ui.taskCard.blockingLoadError")}}async function Wle(n,e,t,r){let{plugin:a}=n,i=nM(a);if(!r){Cs(e,".task-card__blocked-by");return}let s=V$(e,".task-card__blocked-by","task-card__blocked-by",{stopExtraPointerEvents:!0});W$(s);let o=s.createDiv({cls:"task-card__blocked-by-loading",text:a.i18n.translate("ui.taskCard.loadingDependencies")});try{let l=$f(t,a.app),c=await Promise.all(l.map(p=>a.cacheManager.getTaskInfo(p))),d=H$(n,e),u=JA(c.filter(p=>!!p),d);if(o.remove(),u.length===0){s.createDiv({cls:"task-card__blocked-by-empty",text:a.i18n.translate("ui.taskCard.blockedBadge")});return}Hle(s,u,n,d,"task-card--dependency")}catch(l){i.error("Error loading blocked-by tasks",{category:"provider",operation:"load-blocked-by-tasks",details:{taskPath:t.path},error:l}),o.textContent=a.i18n.translate("ui.taskCard.blockingLoadError")}}async function qle(n,e,t){let{plugin:r}=n,a=nM(r);if(!e.projects||e.projects.length===0)return;let i=0,s=10;for(;i<s;){try{let l=await r.cacheManager.getTaskInfo(e.path);if(l&&l.dateModified===e.dateModified)break}catch(l){}await new Promise(l=>window.setTimeout(l,10)),i++}let o=t.querySelectorAll(".task-card__chevron--expanded");for(let l of o){let c=l.closest(".task-card");if(!c)continue;let d=c.dataset.taskPath;if(!d)continue;let u=r.app.vault.getAbstractFileByPath(d);if(!(u instanceof yC.TFile))continue;let p=u.basename;if(!(!e.projects.flat(2).some(h=>{if(h&&typeof h=="string"&&h.startsWith("[[")&&h.endsWith("]]")){let g=h.slice(2,-2).trim(),v=(0,yC.parseLinktext)(g).path,k=r.app.metadataCache.getFirstLinkpathDest(v,"");return v===p||k&&k.path===d}return h===p||h===d})||!c.querySelector(".task-card__subtasks")))try{let h=await r.cacheManager.getTaskInfo(d);h&&await q$(n,c,h,!0)}catch(h){a.error("Error refreshing parent task subtasks",{category:"provider",operation:"refresh-parent-subtasks",details:{taskPath:e.path,projectTaskPath:d},error:h})}}}var yC,G$=y(()=>{yC=require("obsidian");q();Li();XA()});function ev(n){return M({tag:"TaskCard/Badges",isDebugEnabled:()=>n.settings.enableDebugLogging})}function tv(n,e,t){return n.i18n.translate(`ui.taskCard.${e}`,t)}function aM(n){var e;return((e=n.settings)==null?void 0:e.showExpandableSubtasks)===!0}function Y$(n){var e;return((e=n.settings)==null?void 0:e.expandSubtasksByDefault)===!0&&aM(n)}function Gle(n,e){var t;return aM(e)&&((t=e.expandedProjectsService)==null?void 0:t.isExpanded(n.path,Y$(e)))||!1}function fUe(n){for(let e of mUe)for(let t of n.querySelectorAll(e))t.remove();Cs(n,".task-card__subtasks"),Cs(n,".task-card__blocking"),Cs(n,".task-card__blocked-by")}function K$(n,e,t){n.classList.toggle("task-card__chevron--expanded",t);let r=KA(e,t);n.setAttribute("aria-label",r),(0,Hf.setTooltip)(n,r,{placement:"top"})}function Yle(n,e,t,r){return()=>{(async()=>{let a=ev(e);try{if(!e.expandedProjectsService){new Hf.Notice("Service not available. Please try reloading the plugin.");return}let i=t.querySelector(".task-card__chevron");if(!i)return;let s=e.expandedProjectsService.toggle(n.path,Y$(e));K$(i,e,s),await r.toggleSubtasks(t,n,s)}catch(i){a.error("Error toggling subtasks",{category:"internal",operation:"toggle-subtasks",details:{taskPath:n.path},error:i}),new Hf.Notice("Failed to toggle subtasks")}})()}}function Kle(n,e,t,r){return()=>{(async()=>{let a=ev(e);try{if(!e.expandedProjectsService){new Hf.Notice("Service not available. Please try reloading the plugin.");return}let i=e.expandedProjectsService.toggle(n.path,Y$(e)),s=t.querySelector(".task-card__chevron");s&&K$(s,e,i),await r.toggleSubtasks(t,n,i)}catch(i){a.error("Error toggling project subtasks",{category:"internal",operation:"toggle-project-subtasks",details:{taskPath:n.path},error:i}),new Hf.Notice("Failed to toggle subtasks")}})()}}function Zle(n,e,t){return()=>{(async()=>{let r=e.querySelector(".task-card__blocking-toggle");if(!r)return;let a=r.classList.toggle("task-card__blocking-toggle--expanded");await t.toggleBlockingTasks(e,n,a)})()}}function Qle(n,e,t,r){return()=>{Z$({card:t,task:n,plugin:e,handlers:r})}}function hUe(n,e){let t=n.querySelector(".task-card__blocked-toggle");t&&(t.classList.toggle("task-card__blocked-toggle--expanded",e),t.setAttribute("aria-expanded",String(e)));for(let r of n.querySelectorAll(".task-card__metadata-pill--blocked"))r.getAttribute("role")==="button"&&r.setAttribute("aria-expanded",String(e))}async function Z$(n){let{card:e,task:t,handlers:r}=n,a=!e.querySelector(".task-card__blocked-by");hUe(e,a),await r.toggleBlockedByTasks(e,t,a)}function gUe(n,e){let{card:t,task:r,plugin:a,handlers:i}=n;if(!a.projectSubtasksService.isTaskUsedAsProjectSync(r.path))return;let o=Gle(r,a),l=aM(a);Ql({container:e,className:"task-card__project-indicator",icon:"folder",tooltip:tv(a,l?"projectTooltip":"projectIndicatorTooltip"),onClick:l?Kle(r,a,t,i):void 0}),l&&Ql({container:e,className:`task-card__chevron${o?" task-card__chevron--expanded":""}`,icon:"chevron-right",tooltip:KA(a,o),onClick:Yle(r,a,t,i)}),o&&i.toggleSubtasks(t,r,!0).catch(c=>{ev(a).error("Error showing initial subtasks",{category:"internal",operation:"show-initial-subtasks",details:{taskPath:r.path},error:c})})}function yUe(n,e){let{card:t,task:r,plugin:a,handlers:i}=n;if(r.blocking&&r.blocking.length>0){let o=r.blocking.length,l=a.i18n.translate("ui.taskCard.blockingToggle",{count:o}),c=Ql({container:e,className:"task-card__blocking-toggle is-visible",icon:"git-branch",tooltip:l,onClick:Zle(r,t,i)});c&&(c.dataset.count=String(o))}let s=$f(r,a.app);if(s.length>0){let o=`${tv(a,"blockedBadge")} (${s.length})`,l=Ql({container:e,className:"task-card__blocked-toggle is-visible",icon:"git-merge",tooltip:o,onClick:Qle(r,a,t,i)});l&&(l.dataset.count=String(s.length))}}function Jle(n){let{badgesContainer:e,task:t,plugin:r,hasDetails:a,propertyOptions:i}=n;if(!(!e||i.showSecondaryBadges===!1)){if(t.recurrence&&Ql({container:e,className:"task-card__recurring-indicator",icon:"rotate-ccw",tooltip:uC(r,t.recurrence,i.propertyLabels),onClick:j$(t,r)}),t.reminders&&t.reminders.length>0){let s=t.reminders.length;Ql({container:e,className:"task-card__reminder-indicator",icon:"bell",tooltip:P$(r,s),onClick:$$(t,r)})}a&&Ql({container:e,className:"task-card__details-indicator",icon:"file-text",tooltip:tv(r,"detailsTooltip")}),gUe(n,e),yUe(n,e)}}function vUe(n){let{card:e,mainRow:t,task:r,plugin:a,handlers:i}=n,s=ev(a);a.projectSubtasksService.isTaskUsedAsProject(r.path).then(o=>{var f,h,g,v;(f=e.querySelector(".task-card__project-indicator-placeholder"))==null||f.remove(),(h=e.querySelector(".task-card__chevron-placeholder"))==null||h.remove();let l=aM(a),c=e.querySelector(".task-card__project-indicator"),d=(c==null?void 0:c.getAttribute("role"))==="button";o&&c&&d!==l&&c.remove(),Uf(e,".task-card__project-indicator",{shouldExist:o,className:"task-card__project-indicator",icon:"folder",tooltip:tv(a,l?"projectTooltip":"projectIndicatorTooltip"),onClick:l?Kle(r,a,e,i):void 0});let u=o&&l,p=e.querySelector(".task-card__chevron"),m=o&&Gle(r,a);u&&!p?Ql({container:(v=(g=e.querySelector(".task-card__badges"))!=null?g:t)!=null?v:e,className:`task-card__chevron${m?" task-card__chevron--expanded":""}`,icon:"chevron-right",tooltip:KA(a,m),onClick:Yle(r,a,e,i)}):u&&p?K$(p,a,m):!u&&p&&p.remove(),m?i.toggleSubtasks(e,r,!0).catch(k=>{s.error("Error showing subtasks in update",{category:"internal",operation:"show-subtasks-update",details:{taskPath:r.path},error:k})}):Cs(e,".task-card__subtasks")}).catch(o=>{s.error("Error checking if task is used as project in update",{category:"internal",operation:"check-project-task",details:{taskPath:r.path},error:o})})}function kUe(n){var c,d;let{card:e,task:t,plugin:r,handlers:a}=n,i=(d=(c=t.blocking)==null?void 0:c.length)!=null?d:0,s=i>0,o=r.i18n.translate("ui.taskCard.blockingToggle",{count:i}),l=Uf(e,".task-card__blocking-toggle",{shouldExist:s,className:"task-card__blocking-toggle is-visible",icon:"git-branch",tooltip:o,onClick:Zle(t,e,a)});if(!s){Cs(e,".task-card__blocking");return}l&&(l.classList.add("is-visible"),l.classList.remove("is-hidden"),l.dataset.count=String(i),l.classList.contains("task-card__blocking-toggle--expanded")&&a.toggleBlockingTasks(e,t,!0).catch(u=>{ev(r).error("Error refreshing blocking tasks",{category:"internal",operation:"refresh-blocking-tasks",details:{taskPath:t.path,blockingCount:i},error:u})}))}function TUe(n){let{card:e,task:t,plugin:r,handlers:a}=n,i=$f(t,r.app),s=i.length>0,o=`${tv(r,"blockedBadge")} (${i.length})`,l=Uf(e,".task-card__blocked-toggle",{shouldExist:s,className:"task-card__blocked-toggle is-visible",icon:"git-merge",tooltip:o,onClick:Qle(t,r,e,a)});if(!s){Cs(e,".task-card__blocked-by");return}l&&(l.classList.add("is-visible"),l.classList.remove("is-hidden"),l.dataset.count=String(i.length),l.classList.contains("task-card__blocked-toggle--expanded")&&a.toggleBlockedByTasks(e,t,!0).catch(c=>{ev(r).error("Error refreshing blocked-by tasks",{category:"internal",operation:"refresh-blocked-by-tasks",details:{taskPath:t.path,blockedByCount:i.length},error:c})}))}function Xle(n){var c,d;let{card:e,mainRow:t,task:r,plugin:a,hasDetails:i,propertyOptions:s}=n,o=e.querySelector(".task-card__badges");if(!o||s.showSecondaryBadges===!1){fUe(e);return}Uf(e,".task-card__recurring-indicator",{shouldExist:!!r.recurrence,className:"task-card__recurring-indicator",icon:"rotate-ccw",tooltip:r.recurrence?uC(a,r.recurrence,s.propertyLabels):"",onClick:j$(r,a)});let l=(d=(c=r.reminders)==null?void 0:c.length)!=null?d:0;Uf(e,".task-card__reminder-indicator",{shouldExist:l>0,className:"task-card__reminder-indicator",icon:"bell",tooltip:P$(a,l),onClick:$$(r,a)}),Uf(e,".task-card__details-indicator",{shouldExist:i,className:"task-card__details-indicator",icon:"file-text",tooltip:tv(a,"detailsTooltip")}),vUe({...n,mainRow:t!=null?t:o}),kUe(n),TUe(n)}var Hf,mUe,Q$=y(()=>{Hf=require("obsidian");q();U$();A$();mC();G$();XA();mUe=[".task-card__recurring-indicator",".task-card__reminder-indicator",".task-card__details-indicator",".task-card__project-indicator",".task-card__chevron",".task-card__blocking-toggle",".task-card__blocked-toggle"]});function bUe(n,e){return n||(e.settings.defaultVisibleProperties?di(e.settings.defaultVisibleProperties,e):Ple(e))}function wUe(n){var u,p;let{metadataLine:e,card:t,task:r,plugin:a,onBlockedByToggle:i}=n;if(!r.isBlocked)return null;let s=a.i18n.translate("ui.taskCard.blockedBadge"),o=$f(r,a.app),l=(p=(u=r.blockedBy)==null?void 0:u.length)!=null?p:0,c=l>0?`${s} (${l})`:s,d=e.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocked",text:c});if(o.length>0){let m=`${s} (${o.length})`;al(d),d.setAttribute("aria-label",m),d.setAttribute("aria-expanded",String(!!t.querySelector(".task-card__blocked-by"))),(0,Hd.setTooltip)(d,m,{placement:"top"}),d.addEventListener("click",f=>{f.stopPropagation(),i()})}else(0,Hd.setTooltip)(d,a.i18n.translate("ui.taskCard.blockedBadgeTooltip"),{placement:"top"});return d}function SUe(n){var l,c;let{metadataLine:e,task:t,plugin:r}=n;if(!t.isBlocking)return null;let a=r.i18n.translate("ui.taskCard.blockingBadge"),i=(c=(l=t.blocking)==null?void 0:l.length)!=null?c:0,s=i>0?`${a} (${i})`:a,o=e.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--blocking",text:s});return(0,Hd.setTooltip)(o,r.i18n.translate("ui.taskCard.blockingBadgeTooltip"),{placement:"top"}),o}function CUe(n){let{metadataLine:e,task:t,plugin:r}=n;if(!t.googleCalendarEventId)return null;let a=e.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--google-calendar"});return(0,Hd.setIcon)(a,"calendar"),(0,Hd.setTooltip)(a,r.i18n.translate("ui.taskCard.googleCalendarSyncTooltip"),{placement:"top"}),a}function xUe(n){var s;let{metadataLine:e,task:t,plugin:r}=n;if(!t.recurrence_parent||!t.occurrence_date)return null;let a=Sn(t.occurrence_date,{dateFormat:"MMM d",showTime:!1,userTimeFormat:(s=r.settings.calendarViewSettings)==null?void 0:s.timeFormat}),i=e.createSpan({cls:"task-card__metadata-pill task-card__metadata-pill--occurrence"});return(0,Hd.setIcon)(i,"refresh-ccw"),i.createSpan({text:`Occurrence: ${a}`}),al(i),i.setAttribute("aria-label",`Open recurring parent for occurrence on ${t.occurrence_date}`),(0,Hd.setTooltip)(i,`Occurrence of ${t.recurrence_parent} on ${t.occurrence_date}`,{placement:"top"}),i.addEventListener("click",o=>{o.stopPropagation();let l=vt(t.recurrence_parent||"");r.app.workspace.openLinkText(l,t.path,!1)}),i}function EUe(n){let{metadataLine:e,task:t,plugin:r,visibleProperties:a,propertyOptions:i={}}=n;e.empty();let s=[],o=bUe(a,r),l=xUe(n);l&&s.push(l);for(let c of o){if(Yy(c,"status",r)||Yy(c,"priority",r))continue;if(c==="blocked"){let u=wUe(n);u&&s.push(u);continue}if(c==="blocking"){let u=SUe(n);u&&s.push(u);continue}if(c==="googleCalendarSync"){let u=CUe(n);u&&s.push(u);continue}let d=Ale(e,c,t,r,i);d&&s.push(d)}return Mle(e,s),s}function J$(n){let{metadataLine:e,card:t,task:r,plugin:a,visibleProperties:i,propertyOptions:s,handlers:o}=n;return EUe({metadataLine:e,card:t,task:r,plugin:a,visibleProperties:i,propertyOptions:s,onBlockedByToggle:()=>void Z$({card:t,task:r,plugin:a,handlers:o})})}var Hd,ece=y(()=>{Hd=require("obsidian");xe();Cn();Yl();Ile();XA();mC();Q$()});function tce(n,e,t=!1){return!t&&(!n||n.some(r=>Yy(r,"status",e)))}function rce(n,e){return!n||n.some(t=>Yy(t,"priority",e))}function iM(n,e,t){let r=t.statusManager.getStatusConfig(e);r!=null&&r.color?n.style.setProperty("--current-status-color",r.color):n.style.removeProperty("--current-status-color");let a=t.statusManager.getNextStatus(e),i=t.statusManager.getStatusConfig(a);i!=null&&i.color?n.style.setProperty("--next-status-color",i.color):n.style.removeProperty("--next-status-color")}function e2(n,e,t){let r=t.priorityManager.getPriorityConfig(e.priority);return r!=null&&r.color?(n.style.setProperty("--priority-color",r.color),n.style.setProperty("--current-priority-color",r.color)):(n.style.removeProperty("--priority-color"),n.style.removeProperty("--current-priority-color")),r}function sM(n,e){e!=null&&e.color?n.style.borderColor=e.color:n.style.removeProperty("border-color"),e!=null&&e.icon?(n.addClass("task-card__status-dot--icon"),n.empty(),(0,X$.setIcon)(n,e.icon)):(n.removeClass("task-card__status-dot--icon"),n.empty(),n.removeAttribute("data-icon"),n.classList.remove("has-icon"))}function t2(n){let{mainRow:e,card:t,task:r,plugin:a,effectiveStatus:i,visibleProperties:s,hideStatusIndicator:o,onClick:l}=n;if(!tce(s,a,o)||!e)return null;let c=e.createSpan({cls:"task-card__status-dot"});return sM(c,a.statusManager.getStatusConfig(i)),al(c),c.addEventListener("click",l),c.dataset.taskPath=r.path,iM(t,i,a),c}function nce(n,e,t){let r=n.querySelector(t);if(r){r.insertAdjacentElement("afterend",e);return}let a=n.querySelector(".task-card__checkbox");if(a){a.insertAdjacentElement("afterend",e);return}n.insertBefore(e,n.firstChild)}function ace(n){let{mainRow:e,card:t,plugin:r,effectiveStatus:a,visibleProperties:i,hideStatusIndicator:s}=n,o=t.querySelector(".task-card__status-dot");if(iM(t,a,r),!tce(i,r,s))return o==null||o.remove(),null;if(o)return sM(o,r.statusManager.getStatusConfig(a)),o;if(!e)return null;let l=t2(n);return l&&nce(e,l,".task-card__checkbox"),l}function ice(n,e,t){n.style.borderColor=e.color,n.setAttribute("aria-label",t.i18n.translate("ui.taskCard.priorityAriaLabel",{label:e.label})),n.replaceChildren(),n.classList.toggle("task-card__priority-dot--icon",!!e.icon),e.icon?(0,X$.setIcon)(n,e.icon):(n.removeAttribute("data-icon"),n.classList.remove("has-icon"))}function r2(n){let{mainRow:e,task:t,plugin:r,visibleProperties:a,onClick:i}=n,s=r.priorityManager.getPriorityConfig(t.priority);if(!t.priority||!s||!rce(a,r)||!e)return null;let o=e.createSpan({cls:"task-card__priority-dot"});return ice(o,s,r),al(o),o.addEventListener("click",i),o}function sce(n){var c,d;let{mainRow:e,card:t,task:r,plugin:a,visibleProperties:i}={...n,card:(d=(c=n.mainRow)==null?void 0:c.closest(".task-card"))!=null?d:n.mainRow};if(!t)return null;let s=t.querySelector(".task-card__priority-dot"),o=a.priorityManager.getPriorityConfig(r.priority);if(!r.priority||!o||!rce(i,a))return s==null||s.remove(),null;if(!s){if(!e)return null;let u=r2(n);return u&&nce(e,u,".task-card__status-dot"),u}ice(s,o,a);let l=s.cloneNode(!0);return al(l),l.addEventListener("click",n.onClick),s.replaceWith(l),l}var X$,n2=y(()=>{X$=require("obsidian");Yl();mC()});function DUe(n){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(!e)return null;let[,t,r,a]=e;return new Date(Date.UTC(Number(t),Number(r)-1,Number(a)))}function PUe(){let n=new Date;return new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()))}function AUe(n){if(n.recurrence&&n.recurrence_anchor!=="completion"&&n.scheduled){let e=DUe(re(n.scheduled));if(e)return e}return PUe()}function a2(n,e){var r,a,i;if(typeof n.details=="string")return n.details.trim().length>0;if(!e||!n.path)return!1;let t=(i=(a=(r=e.app.metadataCache).getCache)==null?void 0:a.call(r,n.path))==null?void 0:i.sections;return t?t.some(s=>s.type!=="yaml"):!1}function i2(n){var e;return((e=n.settings)==null?void 0:e.showCompletedTaskStrikethrough)!==!1}function s2(n){let e=new Set;for(let t of Ko(n.projects||[])){let r=Dd(t);r&&e.add(`task-card--project-${r}`)}return Array.from(e)}function MUe(n,e,t){var i;let r=["task-card"];t.layout!=="default"&&r.push(`task-card--layout-${t.layout}`),t.isCompleted&&r.push("task-card--completed"),t.isCompleted&&i2(e)&&r.push("task-card--completed-strikethrough"),t.isSkipped&&r.push("task-card--skipped"),n.archived&&r.push("task-card--archived"),t.isActivelyTracked&&r.push("task-card--actively-tracked"),t.isRecurring&&r.push("task-card--recurring"),t.isMaterializedOccurrence&&r.push("task-card--materialized-occurrence"),t.hasDetails&&r.push("task-card--has-details"),n.priority&&r.push(`task-card--priority-${Dd(n.priority)}`),t.effectiveStatus&&r.push(`task-card--status-${Dd(t.effectiveStatus)}`),((i=e.settings)==null?void 0:i.subtaskChevronPosition)==="left"&&r.push("task-card--chevron-left");let a=s2(n);return a.length>0&&r.push("task-card--has-projects",...a),r}function o2(n,e,t={}){var c,d;let r=t.targetDate||AUe(n),a=n.recurrence?oy(n,r,e.statusManager.getCompletedStatuses()[0]):n.status,i=t.layout||"default",s=n.recurrence?((c=n.complete_instances)==null?void 0:c.includes(ae(r)))||!1:e.statusManager.isCompletedStatus(a),o=n.recurrence&&((d=n.skipped_instances)==null?void 0:d.includes(ae(r)))||!1,l={targetDate:r,effectiveStatus:a,layout:i,isCompleted:s,isSkipped:o,isRecurring:!!n.recurrence,isMaterializedOccurrence:!!(n.recurrence_parent&&n.occurrence_date),isActivelyTracked:e.getActiveTimeSession(n)!==null,hasDetails:a2(n,e)};return{...l,cardClasses:MUe(n,e,l)}}var l2=y(()=>{xe();yt()});function oce(n){if(!n)return null;let e=re(n);return e?st(e):null}function c2(n,e,t={}){var r;switch(e){case"today":return{available:!0,date:Br(Xt())};case"asScheduled":{let a=(r=t.occurrenceDate)!=null?r:oce(n.scheduled);return a?{available:!0,date:a}:{available:!1,reasonKey:"contextMenus.task.completion.noScheduledDate"}}case"onDue":{let a=oce(n.due);return a?{available:!0,date:a}:{available:!1,reasonKey:"contextMenus.task.completion.noDueDate"}}case"onPicked":return t.pickedDate?{available:!0,date:t.pickedDate}:{available:!1,reasonKey:"contextMenus.task.completion.noPickedDate"}}}var lce=y(()=>{xe()});function ve(n,e,t){n==null||n.trigger(d2,{message:e,timeout:t})}var d2,Oi=y(()=>{d2="user-notice"});function oM(n,e,t){return n.i18n.translate(e,t)}function IUe(n){let e=new Set,t=[];for(let r of n){let a=r.trim();!a||e.has(a)||(e.add(a),t.push(a))}return t}function dce(n,e,t){return Qo(n.app,e,t,"","",n.settings.useFrontmatterMarkdownLinks)}function NUe(n,e,t){var s,o;let r=e.trim();if(!r)return"";let a=vt(r),i=(o=(s=n.app.metadataCache).getFirstLinkpathDest)==null?void 0:o.call(s,a,t);return i instanceof cce.TFile?dce(n,i,t):r}async function rv(n,e,t){let r=Qo(n.app,t,e.path,"","",n.settings.useFrontmatterMarkdownLinks),a=`[[${t.basename}]]`,i=Array.isArray(e.projects)?e.projects:[];if(i.includes(r)||i.includes(a))return ve(n.emitter,oM(n,"contextMenus.task.organization.notices.alreadyInProject")),null;let o=[...i.filter(c=>c!==a),r],l=await n.updateTaskProperty(e,"projects",o);return ve(n.emitter,oM(n,"contextMenus.task.organization.notices.addedToProject",{project:t.basename})),l}async function lM(n,e,t){let r=Qo(n.app,e,t.path,"","",n.settings.useFrontmatterMarkdownLinks),a=`[[${e.basename}]]`,i=Array.isArray(t.projects)?t.projects:[];if(i.includes(r)||i.includes(a))return ve(n.emitter,oM(n,"contextMenus.task.organization.notices.alreadySubtask")),null;let o=[...i.filter(c=>c!==a),r],l=await n.updateTaskProperty(t,"projects",o);return ve(n.emitter,oM(n,"contextMenus.task.organization.notices.addedAsSubtask",{subtask:t.title,parent:e.basename})),l}function cM(n,e,t){var c;let r=!!((c=n.settings.taskCreationDefaults)!=null&&c.inheritParentTaskProperties),a=dce(n,t,e.path),i=Array.isArray(e.tags)?e.tags:[],s=r?Array.isArray(e.projects)?e.projects.map(d=>NUe(n,d,e.path)):[]:[],o=r?n.settings.taskIdentificationMethod==="tag"?jd(i,n.settings.taskTag,n.settings.hideIdentifyingTagsMode):[...i]:[],l={projects:IUe([...s,a])};return o.length>0&&(l.tags=o),r&&Array.isArray(e.contexts)&&e.contexts.length>0&&(l.contexts=[...e.contexts]),r&&e.priority&&(l.priority=e.priority),l}var cce,vC=y(()=>{cce=require("obsidian");Cn();ip();Oi()});var ya=y(()=>{Zz()});function u2(n){return!!(n.googleCalendarEventId||n.googleCalendarExceptionEventId||n.googleCalendarExceptionOriginalScheduled||n.googleCalendarMovedOriginalDates&&n.googleCalendarMovedOriginalDates.length>0)&&!!n.recurrence&&(n.recurrence_anchor||"scheduled")==="scheduled"}function RUe(n){let e=n.googleCalendarExceptionOriginalScheduled||n.scheduled||n.due;return re(e||"")||void 0}function dM(n,e,t){if(!u2(n)||e===n.scheduled)return;let r=RUe(n);if(!r)return;let a=typeof e=="string"?re(e):"";t.googleCalendarExceptionOriginalScheduled=a&&a!==r?r:void 0}function Vf(n){u2(n)||(n.googleCalendarExceptionOriginalScheduled=void 0,n.googleCalendarMovedOriginalDates=void 0)}function kC(n,e,t){if(!u2(n))return;let r=re(n.googleCalendarExceptionOriginalScheduled||"");if(!r)return;let a=re(n.scheduled||"");!a||e!==a||(t.googleCalendarMovedOriginalDates=Array.from(new Set([...n.googleCalendarMovedOriginalDates||[],r])).sort(),t.googleCalendarExceptionOriginalScheduled=void 0)}var uM=y(()=>{xe()});function up(n){return Array.isArray(n)?n.filter(e=>typeof e=="string"):[]}function _Ue(n){let e=n.match(/(?:^|;)INTERVAL=(\d+)(?:;|$)/),t=e?Number.parseInt(e[1],10):1;return n.includes("FREQ=DAILY")?Math.max(30,t*2):n.includes("FREQ=WEEKLY")?Math.max(90,t*7*2):n.includes("FREQ=MONTHLY")?Math.max(400,t*31*2):n.includes("FREQ=YEARLY")?Math.max(800,t*366*2):365}function FUe(n,e){if(!n.recurrence)return null;let t=Hu(n,e,e),r=ae(e);if(t.some(l=>ae(l)===r))return e;let a=new Set([...n.complete_instances||[],...n.skipped_instances||[]]),i=_Ue(n.recurrence),s=new Date(e.getTime()-i*24*60*60*1e3),o=Hu(n,s,e);for(let l=o.length-1;l>=0;l--)if(!a.has(ae(o[l])))return o[l];return Fb(n,{minOccurrenceDate:r})}function uce(n,e){return(n.recurrence_anchor||"scheduled")==="completion"||n.googleCalendarExceptionOriginalScheduled?null:FUe(n,e)}function pce(n,e){let t=ae(e);if(!n)return t;let r=re(n);return`${t}${n.slice(r.length)}`}function mce(n,e,t){if((e.recurrence_anchor||"scheduled")!=="scheduled")return n;let r=new Set;for(let d of e.googleCalendarMovedOriginalDates||[]){let u=re(d);u&&r.add(u)}let a=re(e.googleCalendarExceptionOriginalScheduled||""),i=re(e.scheduled||"");a&&a!==t&&i===t&&r.add(a);let s=new Set(up(n.complete_instances)),o=up(n.skipped_instances),l=new Set(o),c=Array.from(r).filter(d=>!s.has(d)&&!l.has(d)).sort();return c.length===0?n:{...n,skipped_instances:[...o,...c]}}function mM(n,e){if(e)return e;if(n.recurrence_anchor!=="completion"&&n.scheduled)return st(re(n.scheduled));let t=Xt();return Br(t)}function fce({freshTask:n,targetDate:e,currentTimestamp:t,maintainDueDateOffsetInRecurring:r}){var v;if(!n.recurrence)throw new Error("Task is not recurring");let a=n.recurrence_anchor||"scheduled",i=uce(n,e),s=i!=null?i:e,o=ae(s),l=up(n.complete_instances),d=!l.includes(o),u={...n,dateModified:t};if(d){l.includes(o)||(u.complete_instances=[...l,o]);let k=up(n.skipped_instances);u.skipped_instances=k.filter(T=>T!==o)}else{u.complete_instances=l.filter(T=>T!==o);let k=up(n.skipped_instances);u.skipped_instances=k.filter(T=>T!==o)}if(d&&typeof u.recurrence=="string"){if(a==="completion"){let k=b0(u.recurrence,o);if(k){let T=(v=n.recurrence.match(/DTSTART:\d{8}T(\d{6})Z?(?=;|$)/))==null?void 0:v[1];u.recurrence=T?k.replace(/DTSTART:(\d{8})(?=;|$)/,`DTSTART:$1T${T}Z`):k}}else if(!u.recurrence.includes("DTSTART:")){let k=uf(u);k&&(u.recurrence=k)}}let p=i?{...u,scheduled:pce(u.scheduled,i)}:u,m=mce(p,n,o),f=zr(),h=o>f?o:f,g=Cd(m,r,{minOccurrenceDate:h});return g.scheduled&&(u.scheduled=g.scheduled),g.due&&(u.due=g.due),kC(n,o,u),Vf(u),{updatedTask:u,targetDate:e,dateStr:o,newComplete:d,dateModified:t,originalRecurrence:n.recurrence}}function hce({frontmatter:n,completeInstancesField:e,skippedInstancesField:t,dateModifiedField:r,scheduledField:a,dueField:i,recurrenceField:s,googleCalendarExceptionOriginalScheduledField:o,googleCalendarMovedOriginalDatesField:l,plan:c}){n[e]||(n[e]=[]),n[t]||(n[t]=[]);let d=up(n[e]);c.newComplete?d.includes(c.dateStr)||(n[e]=[...d,c.dateStr]):n[e]=d.filter(u=>u!==c.dateStr),n[t]=c.updatedTask.skipped_instances||[],c.updatedTask.recurrence!==c.originalRecurrence&&(n[s]=c.updatedTask.recurrence),c.updatedTask.scheduled&&(n[a]=c.updatedTask.scheduled),c.updatedTask.due&&(n[i]=c.updatedTask.due),pM(n,o,c.updatedTask.googleCalendarExceptionOriginalScheduled),pM(n,l,c.updatedTask.googleCalendarMovedOriginalDates),n[r]=c.dateModified}function gce({freshTask:n,targetDate:e,currentTimestamp:t,maintainDueDateOffsetInRecurring:r}){if(!n.recurrence)throw new Error("Task is not recurring");let a=uce(n,e),i=a!=null?a:e,s=ae(i),o=up(n.skipped_instances),c=!o.includes(s),d={...n,dateModified:t};if(c){o.includes(s)||(d.skipped_instances=[...o,s]);let g=up(n.complete_instances);d.complete_instances=g.filter(v=>v!==s)}else d.skipped_instances=o.filter(g=>g!==s);let u=a?{...d,scheduled:pce(d.scheduled,a)}:d,p=mce(u,n,s),m=zr(),f=s>m?s:m,h=Cd(p,r,{minOccurrenceDate:f});return h.scheduled&&(d.scheduled=h.scheduled),h.due&&(d.due=h.due),kC(n,s,d),Vf(d),{updatedTask:d,targetDate:e,dateStr:s,newSkipped:c,dateModified:t}}function yce({frontmatter:n,skippedField:e,completeField:t,dateModifiedField:r,scheduledField:a,dueField:i,googleCalendarExceptionOriginalScheduledField:s,googleCalendarMovedOriginalDatesField:o,plan:l}){n[e]||(n[e]=[]),n[e]=l.updatedTask.skipped_instances||[],n[t]||(n[t]=[]),n[t]=l.updatedTask.complete_instances||[],l.updatedTask.scheduled&&(n[a]=l.updatedTask.scheduled),l.updatedTask.due&&(n[i]=l.updatedTask.due),pM(n,s,l.updatedTask.googleCalendarExceptionOriginalScheduled),pM(n,o,l.updatedTask.googleCalendarMovedOriginalDates),n[r]=l.dateModified}function pM(n,e,t){if(t==null||Array.isArray(t)&&t.length===0){delete n[e];return}n[e]=t}var p2=y(()=>{pf();xe();uM()});function Vd(n,e,t={}){let r=qe(),a={title:e.title.trim(),status:e.status||n.settings.defaultTaskStatus,priority:e.priority||n.settings.defaultTaskPriority,dateCreated:r,dateModified:r};if(t.creationContext&&(a.creationContext=t.creationContext),e.dueDate&&(a.due=e.dueTime?fa(e.dueDate,e.dueTime):e.dueDate),e.scheduledDate&&(a.scheduled=e.scheduledTime?fa(e.scheduledDate,e.scheduledTime):e.scheduledDate),e.contexts&&e.contexts.length>0&&(a.contexts=e.contexts),e.projects&&e.projects.length>0&&(a.projects=e.projects),e.tags&&e.tags.length>0&&(a.tags=e.tags.map(i=>ha(i))),e.details&&(a.details=e.details),e.recurrence&&(a.recurrence=e.recurrence),e.estimate&&e.estimate>0&&(a.timeEstimate=e.estimate),e.userFields){let i=n.settings.userFields||[],s={};for(let[o,l]of Object.entries(e.userFields)){let c=i.find(d=>d.id===o);c&&(s[c.key]=Array.isArray(l)?l.join(", "):l)}Object.keys(s).length>0&&(a.customFrontmatter=s)}return a}var TC=y(()=>{xe();yt()});function LUe(n,e){if(!n.recurrence)return!1;let t=ae(e);return(Array.isArray(n.complete_instances)?n.complete_instances:[]).includes(t)}function vce(n,e,t,r="open"){let a=t.getCompletedStatuses()[0]||"done",i=T0(n,e,a)||r;return!n.recurrence||LUe(n,e)?i:t.isCompletedStatus(i)?r:i}function Wf(n,e,t,r="open"){return t.isCompletedStatus(vce(n,e,t,r))}function fM(n,e,t,r="open"){let a=vce(n,e,t,r);return a===n.status?n:{...n,status:a}}var hM=y(()=>{pf();xe()});var av,OUe,nv,m2=y(()=>{av=require("obsidian");Wl();O0();$b();ip();q();OUe=M({tag:"Modals/TaskCreationSuggest"}),nv=class extends av.AbstractInputSuggest{constructor(t,r,a){super(t,r);this.currentTrigger=null;this.projectMetadataResolver=null;this.plugin=a,this.textarea=r,this.obsidianApp=t}getCursorPosition(){var t;return(t=this.textarea.selectionStart)!=null?t:this.textarea.value.length}isBoundary(t,r){if(r===-1)return!1;if(r===0)return!0;let a=t[r-1];return!/\w/.test(a)}findActiveTrigger(t){let r=t.lastIndexOf("@"),a=t.lastIndexOf("#"),i=t.lastIndexOf("+"),s=(this.plugin.settings.statusSuggestionTrigger||"").trim(),o=s?t.lastIndexOf(s):-1,l=[{type:"@",index:r},{type:"#",index:a},{type:"+",index:i},{type:"status",index:o}].filter(m=>this.isBoundary(t,m.index));if(l.length===0)return{trigger:null,triggerIndex:-1,queryAfterTrigger:""};l.sort((m,f)=>f.index-m.index);let c=l[0].index,d=l[0].type,u=d==="status"?(s==null?void 0:s.length)||0:1,p=t.slice(c+u);return{trigger:d,triggerIndex:c,queryAfterTrigger:p}}shouldEndSuggestionContext(t,r){return!!(t==="+"&&/^\[\[[^\]]*\]\]/.test(r)||(t==="@"||t==="#"||t==="status")&&(r.includes(" ")||r.includes(`
`)))}getContextSuggestions(t){return this.plugin.cacheManager.getAllContexts().filter(a=>a&&typeof a=="string").filter(a=>a.toLowerCase().includes(t.toLowerCase())).slice(0,10).map(a=>({value:a,display:a,type:"context",toString(){return this.value}}))}getStatusSuggestions(t){return Nn.fromPlugin(this.plugin).getStatusSuggestions(t,10).map(a=>({...a,type:"status",toString(){return this.value}}))}getTagSuggestions(t){return zA(this.plugin.cacheManager.getAllTags(),this.plugin.settings).filter(a=>a&&typeof a=="string").filter(a=>a.toLowerCase().includes(t.toLowerCase())).slice(0,10).map(a=>({value:a,display:a,type:"tag",toString(){return this.value}}))}getProjectMetadataResolver(){var t;if(!this.projectMetadataResolver){let r=(t=this.obsidianApp)!=null?t:this.plugin.app;this.projectMetadataResolver=new Yu({getFrontmatter:a=>{let i=r==null?void 0:r.vault.getAbstractFileByPath(a.path),s=i instanceof av.TFile?r==null?void 0:r.metadataCache.getFileCache(i):void 0;return(s==null?void 0:s.frontmatter)||{}}})}return this.projectMetadataResolver}async getProjectSuggestions(t){var s,o,l,c;let{FileSuggestHelper:r}=await Promise.resolve().then(()=>(Hb(),aB)),a=await r.suggest(this.plugin,t,20,this.plugin.settings.projectAutosuggest),i=(s=this.obsidianApp)!=null?s:this.plugin.app;try{let d=this.getProjectMetadataResolver(),u=((c=(l=(o=this.plugin.settings)==null?void 0:o.projectAutosuggest)==null?void 0:l.rows)!=null?c:[]).slice(0,3);return a.map(p=>{var S;let m=i==null?void 0:i.vault.getMarkdownFiles().find(C=>C.path===p.path);if(!m)return{basename:p.insertText,displayName:p.displayText,linkText:p.insertText,type:"project",toString(){return this.basename}};let f=i==null?void 0:i.metadataCache.getFileCache(m),h=(f==null?void 0:f.frontmatter)||{},g=this.plugin.fieldMapper.mapFromFrontmatter(h,m.path,this.plugin.settings.storeTitleInFilename),v=typeof g.title=="string"?g.title:"",k=(0,av.parseFrontMatterAliases)(h)||[],T=Array.isArray(k)?k.filter(C=>typeof C=="string"):[],b={basename:m.basename,name:m.name,path:m.path,parent:((S=m.parent)==null?void 0:S.path)||"",title:v,aliases:T,frontmatter:h},w=this.generateProjectDisplayName(u,b,d,m.basename);return{basename:m.basename,displayName:w,linkText:p.insertText,type:"project",entry:{basename:b.basename,name:b.name,path:b.path,parent:b.parent,title:b.title,aliases:b.aliases,frontmatter:b.frontmatter},toString(){return this.basename}}})}catch(d){return OUe.error("Enhanced project autosuggest failed, falling back to basic suggestions",{category:"persistence",operation:"enhanced-project-autosuggest-falling-back-basic-suggestions",error:d}),a.map(u=>({basename:u.insertText,displayName:u.displayText,linkText:u.insertText,type:"project",toString(){return this.basename}}))}}generateProjectDisplayName(t,r,a,i){var o;let s=[];for(let l of t)try{let c=zl(l),d=[];for(let p of c){if(p.property.startsWith("literal:")){d.push(p.property.slice(8));continue}let m=a.resolve(p.property,r)||"";if(m)if(p.showName){let f=(o=p.displayName)!=null?o:p.property;d.push(`${f}: ${m}`)}else d.push(m)}let u=d.join(" ");u.trim()&&s.push(u)}catch(c){}return s.join(" | ")||i}async getSuggestions(t){let r=this.getCursorPosition(),a=this.textarea.value.slice(0,r),{trigger:i,triggerIndex:s,queryAfterTrigger:o}=this.findActiveTrigger(a);if(!i||s===-1)return this.currentTrigger=null,[];if(this.shouldEndSuggestionContext(i,o))return this.currentTrigger=null,[];switch(this.currentTrigger=i,i){case"@":return this.getContextSuggestions(o);case"status":return this.getStatusSuggestions(o);case"#":return this.getTagSuggestions(o);case"+":return await this.getProjectSuggestions(o);default:return[]}}renderSuggestion(t,r){var c,d,u,p,m;r.setAttribute("role","option");let a=t.type==="project"?t.displayName:t.display;r.setAttribute("aria-label",`${t.type}: ${a}`);let i=r.createSpan("nlp-suggest-icon");i.textContent=this.currentTrigger==="status"?this.plugin.settings.statusSuggestionTrigger||"":this.currentTrigger||"",i.setAttribute("aria-hidden","true");let s=r.createSpan("nlp-suggest-text"),o=(f,h)=>{if(!h)return;let g=h.toLowerCase().split(/\s+/).filter(Boolean);if(!g.length)return;let v=k=>{var T;if(k.nodeType===Node.TEXT_NODE){let b=k.nodeValue||"",w=b.toLowerCase(),S=[];for(let _ of g){let F=w.indexOf(_);for(;F!==-1;)S.push({start:F,end:F+_.length}),F=w.indexOf(_,F+1)}S.sort((_,F)=>_.start-F.start);let C=[];for(let _ of S)(!C.length||_.start>=C[C.length-1].end)&&C.push(_);if(!C.length)return;let x=activeWindow.createFragment(),E=0;for(let _ of C){_.start>E&&x.appendChild(activeDocument.createTextNode(b.slice(E,_.start)));let F=activeWindow.createEl("mark");F.textContent=b.slice(_.start,_.end),x.appendChild(F),E=_.end}E<b.length&&x.appendChild(activeDocument.createTextNode(b.slice(E))),(T=k.parentNode)==null||T.replaceChild(x,k)}else if(k.nodeType===Node.ELEMENT_NODE&&k.tagName!=="MARK"){let b=Array.from(k.childNodes);for(let w of b)v(w)}};v(f)},l="";if(this.currentTrigger==="+"){let f=this.getCursorPosition(),h=this.textarea.value.slice(0,f),g=h.lastIndexOf("+");if(g!==-1){let v=h.slice(g+1);v&&!v.includes(`
`)&&(l=v.trim())}}if(t.type==="project"){let f=s.createDiv({cls:"nlp-suggest-project__filename",text:t.basename});l&&o(f,l);let h=((u=(d=(c=this.plugin.settings)==null?void 0:c.projectAutosuggest)==null?void 0:d.rows)!=null?u:[]).slice(0,3);if(Array.isArray(h)&&h.length>0&&t.entry){let g=this.getProjectMetadataResolver();for(let v=0;v<Math.min(h.length,3);v++){let k=h[v];if(k)try{let T=zl(k),b=s.createDiv({cls:"nlp-suggest-project__meta"}),w=new Set(["title","aliases","file.basename"]),S=!1;for(let C of T){if(C.property.startsWith("literal:")){let F=C.property.slice(8);F&&(b.childNodes.length&&b.appendChild(activeDocument.createTextNode(" ")),b.appendChild(activeDocument.createTextNode(F)),S=!0);continue}let x=g.resolve(C.property,t.entry);if(!x)continue;if(b.childNodes.length&&b.appendChild(activeDocument.createTextNode(" ")),C.showName){let F=activeWindow.createSpan();F.className="nlp-suggest-project__meta-label",F.textContent=`${(p=C.displayName)!=null?p:C.property}:`,b.appendChild(F),b.appendChild(activeDocument.createTextNode(" "))}let E=activeWindow.createSpan();E.className="nlp-suggest-project__meta-value",E.textContent=x,b.appendChild(E),S=!0;let _=C.searchable===!0||w.has(C.property);l&&_&&o(E,l)}(!S||((m=b.textContent)==null?void 0:m.trim().length)===0)&&b.remove()}catch(T){}}}}else t.type,s.textContent=t.display}selectSuggestion(t){if(!this.currentTrigger)return;let r=this.getCursorPosition(),a=this.textarea.value.slice(0,r),i=this.textarea.value.slice(r),s=-1,o=(this.plugin.settings.statusSuggestionTrigger||"").trim();if(this.currentTrigger==="@"?s=a.lastIndexOf("@"):this.currentTrigger==="#"?s=a.lastIndexOf("#"):this.currentTrigger==="+"?s=a.lastIndexOf("+"):this.currentTrigger==="status"&&o&&(s=a.lastIndexOf(o)),s===-1)return;let l=t.type==="project"?t.linkText:t.value,c=a.slice(0,s),d="";this.currentTrigger==="+"?d="+[["+l+"]]":this.currentTrigger==="status"?d=t.type==="status"?t.label:l:d=this.currentTrigger+l;let u=c+d+(d?" ":"")+i;this.textarea.value=u;let p=c.length+d.length+(d?1:0);this.textarea.setSelectionRange(p,p),this.textarea.dispatchEvent(new Event("input",{bubbles:!0})),this.textarea.focus()}}});var h2={};Xe(h2,{TaskSelectorWithCreateModal:()=>wC,getTaskSelectorQueryRank:()=>f2,openTaskSelector:()=>fn,openTaskSelectorWithCreate:()=>BUe,taskMatchesSelectorQuery:()=>Tce});function bC(n,e){return n==null||typeof n!="string"&&typeof n!="number"&&typeof n!="boolean"?!1:String(n).toLowerCase().includes(e)}function gM(n,e){if(n==null||typeof n!="string"&&typeof n!="number"&&typeof n!="boolean")return null;let t=String(n).toLowerCase();return t.includes(e)?t===e?0:t.startsWith(e)?1:t.split(/[^a-z0-9]+/).some(a=>a.startsWith(e))?2:3:null}function kce(n,e){let t=null;for(let r of n){let a=gM(r,e);a!==null&&(t=t===null?a:Math.min(t,a))}return t}function Tce(n,e){var r;return!!(bC(n.title,e)||bC(n.due,e)||n.priority!=="normal"&&bC(n.priority,e)||(r=n.contexts)!=null&&r.some(a=>bC(a,e))||Ko(n.projects||[]).some(a=>bC(a,e)))}function f2(n,e){let t=gM(n.title,e);if(t!==null)return t;let r=kce(n.contexts||[],e);if(r!==null)return 10+r;let a=Ko(n.projects||[]),i=kce(a,e);if(i!==null)return 20+i;if(n.priority!=="normal"){let o=gM(n.priority,e);if(o!==null)return 30+o}let s=gM(n.due,e);return s!==null?40+s:Number.MAX_SAFE_INTEGER}async function BUe(n,e){let t=await n.cacheManager.getAllTasks();return new Promise(r=>{new wC(n.app,n,t,{onResult:r,...e}).open()})}function fn(n,e,t,r){new wC(n.app,n,e,{placeholder:r==null?void 0:r.placeholder,title:r==null?void 0:r.title,targetDate:r==null?void 0:r.targetDate,creationDefaults:r==null?void 0:r.creationDefaults,onResult:i=>{i.type==="selected"||i.type==="created"?t(i.task):t(null)}}).open()}var Jl,zUe,wC,co=y(()=>{Jl=require("obsidian");yt();Wl();Ua();TC();hM();m2();q();zUe=M({tag:"Modals/TaskSelectorWithCreateModal"});wC=class extends Jl.SuggestModal{constructor(t,r,a,i){super(t);this.nlpSuggest=null;this.createFooterEl=null;this.currentQuery="";this.resultHandled=!1;this.isCreatingTask=!1;this.handleCreateFooterActivation=t=>{!this.createFooterEl||this.createFooterEl.classList.contains("tn-static-display-none-6b99de8b")||(t.preventDefault(),t.stopPropagation(),this.createNewTask())};this.handleCreateFooterKeydown=t=>{t.key!=="Enter"&&t.key!==" "||this.handleCreateFooterActivation(t)};this.handleInputChange=()=>{let t=this.inputEl.value.trim();this.currentQuery=t,this.updateCreateFooter(t)};this.plugin=r,this.tasks=a,this.options=i,this.targetDate=i.targetDate||new Date,this.translate=r.i18n.translate.bind(r.i18n),this.nlParser=Nn.fromPlugin(r),this.setPlaceholder(i.placeholder||this.translate("modals.taskSelectorWithCreate.placeholder")),this.setInstructions([{command:"↑↓",purpose:this.translate("modals.taskSelector.instructions.navigate")},{command:"↵",purpose:this.translate("modals.taskSelector.instructions.select")},{command:"⇧↵",purpose:this.translate("modals.taskSelectorWithCreate.instructions.create")},{command:"esc",purpose:this.translate("modals.taskSelector.instructions.dismiss")}]),this.titleEl.setText(i.title||this.translate("modals.taskSelectorWithCreate.title")),this.titleEl.setAttribute("id","task-selector-with-create-title"),this.containerEl.setAttribute("aria-labelledby","task-selector-with-create-title"),this.containerEl.setAttribute("role","dialog"),this.containerEl.setAttribute("aria-modal","true"),this.containerEl.addClass("task-selector-with-create-modal"),this.containerEl.addClass("tasknotes-plugin")}onOpen(){super.onOpen(),this.scope.register(["Shift"],"Enter",t=>(t.preventDefault(),t.stopPropagation(),this.createNewTask(),!1)),this.inputEl.addEventListener("input",this.handleInputChange),this.nlpSuggest=new nv(this.app,this.inputEl,this.plugin),window.setTimeout(()=>this.createFooter(),0)}createFooter(){var r;let t=((r=this.modalEl.querySelector(".prompt"))==null?void 0:r.parentElement)||this.modalEl;this.createFooterEl=t.createDiv({cls:"task-selector-create-footer"}),this.createFooterEl.setAttribute("role","button"),this.createFooterEl.setAttribute("aria-hidden","true"),this.createFooterEl.tabIndex=-1,this.createFooterEl.addEventListener("click",this.handleCreateFooterActivation),this.createFooterEl.addEventListener("keydown",this.handleCreateFooterKeydown),this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-none-6b99de8b"),this.currentQuery&&this.updateCreateFooter(this.currentQuery)}updateCreateFooter(t){if(!this.createFooterEl)return;if(!t){this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-none-6b99de8b"),this.createFooterEl.setAttribute("aria-hidden","true"),this.createFooterEl.removeAttribute("aria-label"),this.createFooterEl.tabIndex=-1,this.createFooterEl.empty();return}let r=this.nlParser.parseInput(t);if(r.title&&r.title!=="Untitled Task"){this.createFooterEl.empty(),this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-flex-75816cae"),this.createFooterEl.setAttribute("aria-hidden","false"),this.createFooterEl.setAttribute("aria-label",`${this.translate("modals.taskSelectorWithCreate.footer.createLabel").trim()} ${r.title}`.trim()),this.createFooterEl.tabIndex=0;let a=this.createFooterEl.createDiv({cls:"task-selector-create-footer__icon"});(0,Jl.setIcon)(a,"plus-circle");let i=this.createFooterEl.createDiv({cls:"task-selector-create-footer__content"});i.createDiv({cls:"task-selector-create-footer__title-line"}).createSpan({cls:"task-selector-create-footer__title",text:r.title});let o=this.buildMetadataParts(r);if(o.length>0){let c=i.createDiv({cls:"task-selector-create-footer__meta"});o.forEach(d=>{let u=c.createSpan({cls:`task-selector-create-footer__chip task-selector-create-footer__chip--${d.type}`}),p=u.createSpan({cls:"task-selector-create-footer__chip-icon"});(0,Jl.setIcon)(p,d.icon),u.createSpan({cls:"task-selector-create-footer__chip-text",text:d.text})})}let l=i.createDiv({cls:"task-selector-create-footer__hint"});l.createSpan({cls:"task-selector-create-footer__shortcut",text:"⇧↵"}),l.createSpan({cls:"task-selector-create-footer__hint-text",text:this.translate("modals.taskSelectorWithCreate.footer.createLabel")})}else this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-none-6b99de8b"),this.createFooterEl.setAttribute("aria-hidden","true"),this.createFooterEl.removeAttribute("aria-label"),this.createFooterEl.tabIndex=-1,this.createFooterEl.empty()}buildMetadataParts(t){let r=[];if(t.dueDate){let a=t.dueTime?`${t.dueDate} ${t.dueTime}`:t.dueDate;r.push({icon:"calendar",text:a,type:"due"})}if(t.scheduledDate){let a=t.scheduledTime?`${t.scheduledDate} ${t.scheduledTime}`:t.scheduledDate;r.push({icon:"calendar-clock",text:a,type:"scheduled"})}if(t.priority&&t.priority!=="normal"&&r.push({icon:"flag",text:t.priority,type:"priority"}),t.status){let a=this.plugin.statusManager.getStatusConfig(t.status);r.push({icon:"circle-dot",text:(a==null?void 0:a.label)||t.status,type:"status"})}if(t.contexts&&t.contexts.length>0&&t.contexts.forEach(a=>{r.push({icon:"at-sign",text:a,type:"context"})}),t.projects&&t.projects.length>0&&t.projects.forEach(a=>{r.push({icon:"folder",text:a.replace(/^\[\[|\]\]$/g,""),type:"project"})}),t.tags&&t.tags.length>0&&t.tags.forEach(a=>{r.push({icon:"hash",text:a,type:"tag"})}),t.recurrence&&r.push({icon:"repeat",text:t.recurrence,type:"recurrence"}),t.estimate&&t.estimate>0){let a=Math.floor(t.estimate/60),i=t.estimate%60,s=a>0?`${a}h ${i}m`:`${i}m`;r.push({icon:"timer",text:s,type:"estimate"})}if(t.details){let a=t.details.length>30?t.details.substring(0,30)+"...":t.details;r.push({icon:"file-text",text:a,type:"details"})}if(t.userFields){let a=this.plugin.settings.userFields||[];for(let[i,s]of Object.entries(t.userFields)){let o=a.find(d=>d.id===i),l=(o==null?void 0:o.displayName)||i,c=Array.isArray(s)?s.join(", "):s;r.push({icon:"sliders-horizontal",text:`${l}: ${c}`,type:"userfield"})}}return r}async createNewTask(){if(this.isCreatingTask)return;let t=this.inputEl.value.trim();if(!t){new Jl.Notice(this.translate("modals.taskSelectorWithCreate.notices.emptyQuery"));return}this.isCreatingTask=!0;try{let r=this.nlParser.parseInput(t);if(!r.title||r.title==="Untitled Task"){new Jl.Notice(this.translate("modals.taskSelectorWithCreate.notices.invalidTitle"));return}let a=this.buildTaskDataFromParsed(r),i=await this.plugin.taskService.createTask(a);new Jl.Notice(this.translate("modals.taskCreation.notices.success",{title:i.taskInfo.title})),this.resultHandled=!0,this.close(),this.options.onResult({type:"created",task:i.taskInfo})}catch(r){zUe.error("Failed to create task:",{category:"persistence",operation:"create-task",error:r});let a=r instanceof Error?r.message:String(r);new Jl.Notice(this.translate("modals.taskCreation.notices.failure",{message:a}))}finally{this.isCreatingTask=!1}}buildTaskDataFromParsed(t){let r=Vd(this.plugin,t),a=this.options.creationDefaults;return a?{...a,...r,priority:t.priority||a.priority||r.priority,projects:[...new Set([...a.projects||[],...r.projects||[]])],tags:[...new Set([...a.tags||[],...r.tags||[]])],contexts:[...new Set([...a.contexts||[],...r.contexts||[]])]}:r}getSuggestions(t){return this.currentQuery=t,this.getFilteredTasks(t)}getFilteredTasks(t){let r=t.trim().toLowerCase(),a=r.length>0;return this.tasks.filter(i=>!i.archived).filter(i=>a?Tce(i,r):!0).sort((i,s)=>{var p,m;if(a){let f=f2(i,r)-f2(s,r);if(f!==0)return f}let o=Wf(i,this.targetDate,this.plugin.statusManager,this.plugin.settings.defaultTaskStatus),l=Wf(s,this.targetDate,this.plugin.statusManager,this.plugin.settings.defaultTaskStatus);if(o!==l)return o?1:-1;if(a){let f=i.title.localeCompare(s.title);if(f!==0)return f}if(i.due&&!s.due)return-1;if(!i.due&&s.due)return 1;if(i.due&&s.due){let f=i.due.localeCompare(s.due);if(f!==0)return f}let c={high:0,normal:1,low:2},d=(p=c[i.priority])!=null?p:1,u=(m=c[s.priority])!=null?m:1;return d!==u?d-u:i.title.localeCompare(s.title)})}renderSuggestion(t,r){let a=fM(t,this.targetDate,this.plugin.statusManager,this.plugin.settings.defaultTaskStatus),i=pr(a,this.plugin,void 0,{layout:"default",targetDate:this.targetDate});i.classList.add("task-selector-modal__suggestion");let s=i.cloneNode(!0);r.appendChild(s)}onChooseSuggestion(t,r){this.resultHandled=!0,this.options.onResult({type:"selected",task:t})}onClose(){var t;this.inputEl.removeEventListener("input",this.handleInputChange),(t=this.nlpSuggest)==null||t.close(),this.nlpSuggest=null,this.createFooterEl&&(this.createFooterEl.removeEventListener("click",this.handleCreateFooterActivation),this.createFooterEl.removeEventListener("keydown",this.handleCreateFooterKeydown),this.createFooterEl.remove(),this.createFooterEl=null),window.setTimeout(()=>{this.resultHandled||this.options.onResult({type:"cancelled"})},0),super.onClose()}}});function bce(n){let e=String(n.getHours()).padStart(2,"0"),t=String(n.getMinutes()).padStart(2,"0");return`${e}:${t}`}function wce(n,e){let t=null;if(n.scheduled)try{t=et(n.scheduled)}catch(i){t=null}(!t||isNaN(t.getTime()))&&(t=new Date(e)),isNaN(t.getTime())&&(t=new Date),(!n.scheduled||!Jt(n.scheduled))&&t.setHours(9,0,0,0);let r=n.timeEstimate&&n.timeEstimate>0?n.timeEstimate:60,a=new Date(t.getTime()+r*60*1e3);return{date:ae(t),startTime:bce(t),endTime:bce(a)}}var Sce=y(()=>{xe()});function pp(n,e,t){new g2(n.app,n,{placeholder:t==null?void 0:t.placeholder,title:t==null?void 0:t.title,filter:t==null?void 0:t.filter,newFileFolder:t==null?void 0:t.newFileFolder,sortOrder:t==null?void 0:t.sortOrder,onResult:a=>{a.type==="selected"||a.type==="created"?e(a.file):e(null)}}).open()}var oa,jUe,g2,SC=y(()=>{oa=require("obsidian");q();ya();jUe=M({tag:"Modals/FileSelectorModal"}),g2=class extends oa.SuggestModal{constructor(t,r,a){super(t);this.currentQuery="";this.resultHandled=!1;this.createFooterEl=null;this.handleInputChange=()=>{this.currentQuery=this.inputEl.value.trim(),this.updateCreateFooter()};this.plugin=r,this.options=a,this.setPlaceholder(a.placeholder||"Search files or type to create new..."),this.setInstructions([{command:"↑↓",purpose:"to navigate"},{command:"↵",purpose:"to select"},{command:"⇧↵",purpose:"to create new"},{command:"esc",purpose:"to cancel"}]),a.title&&this.titleEl.setText(a.title),this.containerEl.addClass("file-selector-modal"),this.containerEl.addClass("tasknotes-plugin")}onOpen(){super.onOpen(),this.scope.register(["Shift"],"Enter",t=>(t.preventDefault(),t.stopPropagation(),this.createNewFile(),!1)),this.inputEl.addEventListener("input",this.handleInputChange),window.setTimeout(()=>this.createFooter(),0)}createFooter(){var r;let t=this.modalEl.querySelector(".prompt");t&&(this.createFooterEl=((r=t.parentElement)==null?void 0:r.createDiv({cls:"file-selector-create-footer"}))||null,this.createFooterEl&&(this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-none-6b99de8b")))}updateCreateFooter(){if(!this.createFooterEl)return;if(!this.currentQuery){this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-none-6b99de8b");return}this.createFooterEl.empty(),this.createFooterEl.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),this.createFooterEl.classList.add("tn-static-display-flex-75816cae");let r=this.createFooterEl.createDiv({cls:"file-selector-create-footer__content"}).createDiv({cls:"file-selector-create-footer__title-line"});r.createSpan({cls:"file-selector-create-footer__shortcut",text:"⇧↵"}),r.createSpan({cls:"file-selector-create-footer__hint-text",text:" to create: "}),r.createSpan({cls:"file-selector-create-footer__filename",text:this.getNewFileName()})}getNewFileName(){let t=this.currentQuery;return t.toLowerCase().endsWith(".md")&&(t=t.slice(0,-3)),t+".md"}async createNewFile(){if(!this.currentQuery){new oa.Notice("Please enter a file name");return}try{let t=this.currentQuery;t.toLowerCase().endsWith(".md")&&(t=t.slice(0,-3));let r=this.options.newFileFolder||"",a=r?`${r}/${t}.md`:`${t}.md`;if(this.app.vault.getAbstractFileByPath(a)){new oa.Notice(`File "${a}" already exists`);return}r&&!await this.app.vault.adapter.exists(r)&&await Bb(this.app,r);let s=await mf(this.app,a,"");this.resultHandled=!0,this.close(),this.options.onResult({type:"created",file:s})}catch(t){jUe.error("Error creating file:",{category:"persistence",operation:"creating-file",error:t}),new oa.Notice("Failed to create file")}}getSuggestions(t){this.currentQuery=t.trim(),this.updateCreateFooter();let r=this.app.vault.getAllLoadedFiles(),a=t.toLowerCase(),i,s=this.options.filter||"markdown";typeof s=="function"?i=r.filter(s):s==="markdown"?i=r.filter(c=>c instanceof oa.TFile&&c.extension==="md"&&!c.path.includes(".trash")):i=r.filter(c=>c instanceof oa.TFile&&!c.path.includes(".trash"));let o=this.options.sortOrder||"name-asc",l=[...i].sort((c,d)=>{let u=c instanceof oa.TFile?c.stat.ctime:0,p=d instanceof oa.TFile?d.stat.ctime:0,m=c instanceof oa.TFile?c.stat.mtime:0,f=d instanceof oa.TFile?d.stat.mtime:0;switch(o){case"name-desc":return d.name.localeCompare(c.name);case"path-asc":return c.path.localeCompare(d.path);case"path-desc":return d.path.localeCompare(c.path);case"created-recent":return p-u;case"created-oldest":return u-p;case"modified-recent":return f-m;case"modified-oldest":return m-f;case"name-asc":default:return c.name.localeCompare(d.name)}});return t?l.filter(c=>this.getSearchText(c).toLowerCase().includes(a)).slice(0,50):l.slice(0,50)}getSearchText(t){let r=`${t.name} ${t.path}`;if(t instanceof oa.TFile){let a=this.app.metadataCache.getFileCache(t);if(a!=null&&a.frontmatter){let i=this.plugin.fieldMapper.toUserField("title"),s=a.frontmatter[i];s&&(r+=` ${s}`);let o=(0,oa.parseFrontMatterAliases)(a.frontmatter);o&&o.length>0&&(r+=` ${o.join(" ")}`)}}return r}renderSuggestion(t,r){let a=r.createDiv({cls:"file-selector-suggestion"});if(a.createDiv({cls:"file-selector-suggestion__name",text:t.name}),t instanceof oa.TFile){let i=this.app.metadataCache.getFileCache(t);if(i!=null&&i.frontmatter){let s=this.plugin.fieldMapper.toUserField("title"),o=i.frontmatter[s];if(o)a.createDiv({cls:"file-selector-suggestion__title",text:o});else{let l=(0,oa.parseFrontMatterAliases)(i.frontmatter);l&&l.length>0&&a.createDiv({cls:"file-selector-suggestion__aliases",text:l.join(", ")})}}}t.parent&&t.parent.path!=="/"&&a.createDiv({cls:"file-selector-suggestion__path",text:t.parent.path})}onChooseSuggestion(t,r){this.resultHandled=!0,this.options.onResult({type:"selected",file:t})}onClose(){this.inputEl.removeEventListener("input",this.handleInputChange),this.createFooterEl&&(this.createFooterEl.remove(),this.createFooterEl=null),window.setTimeout(()=>{this.resultHandled||this.options.onResult({type:"cancelled"})},0),super.onClose()}}});function UUe(){return(0,mp.requireApiVersion)("1.11.0")}function zi(n){Promise.resolve().then(n).catch(e=>{$Ue.error("TaskNotes settings callback failed:",{category:"configuration",operation:"settings-callback",error:e})})}function kt(n,e,t){if(UUe()){let r=new mp.SettingGroup(n).setHeading(e.heading);if(e.className&&r.addClass(e.className),e.description){let a=e.description;r.addSetting(i=>{i.setDesc(a),i.settingEl.addClass("settings-view__group-description")})}return t(r),r}else{let r=new y2(n).setHeading(e.heading);if(e.className&&r.addClass(e.className),e.description){let a=e.description;r.addSetting(i=>{i.setDesc(a),i.settingEl.addClass("settings-view__group-description")})}return t(r),r}}function me(n,e){return n.setName(e.name).setDesc(e.desc).addToggle(t=>{t.setValue(e.getValue()).onChange(r=>{zi(()=>e.setValue(r))})})}function rn(n,e){return n.setName(e.name).setDesc(e.desc).addText(t=>{t.setValue(e.getValue());let r=a=>{zi(()=>e.setValue(a))};if(e.debounceMs&&e.debounceMs>0){let a=iv(r,e.debounceMs);t.onChange(a)}else t.onChange(r);return e.placeholder&&t.setPlaceholder(e.placeholder),e.ariaLabel&&t.inputEl.setAttribute("aria-label",e.ariaLabel),t.inputEl.addClass("settings-view__input"),t})}function Ur(n,e){return n.setName(e.name).setDesc(e.desc).addDropdown(t=>(e.options.forEach(r=>{t.addOption(r.value,r.label)}),t.setValue(e.getValue()).onChange(r=>{zi(()=>e.setValue(r))}),e.ariaLabel&&t.selectEl.setAttribute("aria-label",e.ariaLabel),t))}function ui(n,e){let t=e.debounceMs?iv(r=>{zi(()=>e.setValue(r))},e.debounceMs):r=>{zi(()=>e.setValue(r))};return n.setName(e.name).setDesc(e.desc).addText(r=>(r.setValue(e.getValue().toString()).onChange(a=>{let i=parseInt(a);if(!isNaN(i)){if(e.min!==void 0&&i<e.min||e.max!==void 0&&i>e.max)return;t(i)}}),r.inputEl.type="number",e.placeholder&&r.setPlaceholder(e.placeholder),e.min!==void 0&&r.inputEl.setAttribute("min",e.min.toString()),e.max!==void 0&&r.inputEl.setAttribute("max",e.max.toString()),e.ariaLabel&&r.inputEl.setAttribute("aria-label",e.ariaLabel),r.inputEl.addClass("settings-view__input"),r))}function Xl(n,e){return n.setName(e.name).setDesc(e.desc).addButton(t=>(t.setButtonText(e.buttonText).onClick(()=>{zi(e.onClick)}),e.buttonClass?t.buttonEl.addClass(e.buttonClass):t.buttonEl.addClasses(["tn-btn","tn-btn--ghost"]),t))}function fp(n,e){return new mp.Setting(n).setName(e).setHeading()}function ec(n,e){return n.createEl("p",{text:e,cls:"settings-view__help-note"})}function iv(n,e,t=!1){let r,a,i,s=function(...o){a=o,i=this;let l=()=>{r=void 0,a=void 0,t||n.apply(i,o)},c=t&&!r;window.clearTimeout(r),r=window.setTimeout(l,e),c&&n.apply(this,o)};return s.flush=()=>{r&&a&&(window.clearTimeout(r),r=void 0,n.apply(i,a),a=void 0)},s}var mp,$Ue,y2,tc=y(()=>{mp=require("obsidian");q();$Ue=M({tag:"Settings/Components/SettingHelpers"});y2=class{constructor(e){this.containerEl=e}setHeading(e){return new mp.Setting(this.containerEl).setName(e).setHeading(),this}addClass(e){return this}addSetting(e){let t=new mp.Setting(this.containerEl);return e(t),this}}});function b2(n,e){n.classList.toggle("tasknotes-settings__card--collapsed",e);let t=n.querySelector(":scope > .tasknotes-settings__card-header");t&&(t.title=e?"Expand card":"Collapse card")}function sr(n,e){let t=n.createDiv("tasknotes-settings__card");e.id&&t.setAttribute("data-card-id",e.id),e.draggable&&t.addClass("tasknotes-settings__card--draggable"),e.collapsible&&(t.addClass("tasknotes-settings__card--collapsible"),e.defaultCollapsed&&t.addClass("tasknotes-settings__card--collapsed"));let r=t.createDiv("tasknotes-settings__card-header"),a=null;e.draggable&&(r.addClass("tasknotes-settings__card-header--with-drag-handle"),a=r.createDiv("tasknotes-settings__card-drag-handle"),a.textContent="⋮⋮",a.draggable=!0,a.title="Drag to reorder");let i=r.createDiv();if(i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-flex-75816cae"),i.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),i.classList.add("tn-static-align-items-center-7c619740"),i.classList.remove("tn-static-flex-1-14e3b769","tn-static-margin-top-12px-91e0f558"),i.classList.add("tn-static-flex-1-97445a8d"),i.classList.remove("tn-static-min-width-2px-709d7da0"),i.classList.add("tn-static-min-width-0-3922d326"),e.colorIndicator){let c=i.createDiv("tasknotes-settings__card-color-indicator");c.style.backgroundColor=hr(e.colorIndicator.color),e.colorIndicator.cssVar&&c.style.setProperty("--card-color",hr(e.colorIndicator.color))}let s=i.createDiv("tasknotes-settings__card-info"),o=s.createSpan("tasknotes-settings__card-primary-text");if(o.textContent=e.header.primaryText,e.header.secondaryText){let c=s.createSpan("tasknotes-settings__card-secondary-text");c.textContent=e.header.secondaryText}let l=r.createDiv();if(l.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),l.classList.add("tn-static-display-flex-75816cae"),l.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),l.classList.add("tn-static-align-items-center-7c619740"),l.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),l.classList.add("tn-static-gap-0-5rem-ce2fca4d"),e.header.meta&&e.header.meta.length>0){let c=l.createDiv("tasknotes-settings__card-meta");e.header.meta.forEach(d=>{c.appendChild(d)})}if(e.header.actions&&e.header.actions.length>0){let c=l.querySelector(".tasknotes-settings__card-header-actions")||l.createDiv("tasknotes-settings__card-header-actions");e.header.actions.forEach(d=>{let u=c.createEl("button",{cls:"tasknotes-settings__card-header-btn"});d.variant==="delete"&&u.addClass("tasknotes-settings__card-header-btn--delete");let p=u.createSpan();(0,CC.setIcon)(p,d.icon),d.tooltip&&(u.title=d.tooltip),u.onclick=m=>{m.stopPropagation(),zi(d.onClick)}})}if(e.collapsible){let c=()=>{var p;let u=!t.hasClass("tasknotes-settings__card--collapsed");b2(t,u),t.dispatchEvent(new CustomEvent(T2,{bubbles:!0})),(p=e.onCollapseChange)==null||p.call(e,u)};r.addClass("tasknotes-settings__card-header--clickable"),r.title=e.defaultCollapsed?"Expand card":"Collapse card",r.onclick=d=>{d.target.closest(".tasknotes-settings__card-header-actions")||c()}}if(e.content&&e.content.sections.length>0){let c=t.createDiv("tasknotes-settings__card-content");e.draggable&&c.addClass("tasknotes-settings__card-content--with-drag-handle"),e.content.sections.forEach(d=>{d.rows.forEach(u=>{let p=c.createDiv("tasknotes-settings__card-config-row");u.fullWidth&&(p.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-min-height-800px-997b4c8c"),p.classList.add("tn-static-flex-direction-column-06c8b5ed"),p.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-center-7c619740"),p.classList.add("tn-static-align-items-flex-start-0486f781"),p.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),p.classList.add("tn-static-gap-0-5rem-ce2fca4d"));let m=p.createSpan("tasknotes-settings__card-config-label");m.textContent=u.label,p.appendChild(u.input)})})}if(e.actions&&e.actions.buttons.length>0){let c=t.createDiv("tasknotes-settings__card-actions");e.draggable&&c.addClass("tasknotes-settings__card-actions--with-drag-handle"),e.actions.buttons.forEach(d=>{let u=c.createEl("button",{text:d.text,cls:"tasknotes-settings__card-action-btn"});if(d.variant&&u.addClass(`tasknotes-settings__card-action-btn--${d.variant}`),d.icon){let p=u.createSpan();(0,CC.setIcon)(p,d.icon),u.insertBefore(p,u.firstChild)}d.disabled&&(u.disabled=!0),u.onclick=()=>{zi(d.onClick)}})}return t}function pi(n,e="default"){let t=activeWindow.createSpan();return t.addClass("tasknotes-settings__card-status-badge"),t.addClass(`tasknotes-settings__card-status-badge--${e}`),t.textContent=n,t}function ol(n,e){return{icon:"trash-2",variant:"delete",tooltip:e||"Delete",onClick:n}}function Ge(n="text",e,t){let r=activeWindow.createEl("input");return r.type=n,r.addClass("tasknotes-settings__card-input"),e&&(r.placeholder=e),t&&(r.value=t),r}function GUe(){if(activeDocument.getElementById(k2))return;let n=activeWindow.createEl("datalist");n.id=k2;for(let e of Bte)n.createEl("option",{value:e});activeDocument.body.appendChild(n)}function v2(n){let e=n==null?void 0:n.trim().match(qUe);if(!e)return null;let t=e[1].toLowerCase();return t.length===3?`#${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`:`#${t}`}function YUe(n){n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new Event("change",{bubbles:!0}))}function KUe(n){var i;if(!n.parentElement)return;if((i=n.tasknotesThemeColorPicker)!=null&&i.isConnected){let s=v2(n.value);s&&(n.tasknotesThemeColorPicker.value=s);return}let t=activeWindow.createEl("input");t.type="color",t.addClass(HUe),t.value=v2(n.value)||WUe,t.title="Open color picker",t.setAttribute("aria-label","Open color picker");let r=()=>{n.value!==t.value&&(n.value=t.value,YUe(n))},a=()=>{let s=v2(n.value);s&&(t.value=s)};t.addEventListener("input",r),t.addEventListener("change",r),n.addEventListener("input",a),n.addEventListener("change",a),n.insertAdjacentElement("afterend",t),n.tasknotesThemeColorPicker=t}function qf(n){let e=n;n.type="text",n.addClass(VUe),n.placeholder=A0,n.setAttribute("list",k2),n.title=A0,GUe(),KUe(e)}function sv(n){let e=Ge("text",A0,xd(n));return qf(e),e}function ov(n,e){let t=hr(n.value,e);return n.value=xd(t),t}function nn(n=!1,e){let t=activeWindow.createDiv(),r=new CC.Setting(t),a=null;if(r.addToggle(i=>{i.setValue(n),e&&i.onChange(s=>{zi(()=>e(s))}),a=i.toggleEl}),!a)throw new Error("Failed to create card toggle");return a}function Wn(n,e){let t=activeWindow.createEl("select");return t.addClass("tasknotes-settings__card-input"),n.forEach(r=>{let a=t.createEl("option",{value:r.value,text:r.label});e===r.value&&(a.selected=!0)}),t}function lv(n,e,t){let r=n.querySelector(".tasknotes-settings__card-drag-handle");if(!r)return;let a=n.getAttribute("data-card-id");a&&(r.addEventListener("dragstart",i=>{i.dataTransfer&&(i.dataTransfer.setData("text/plain",a),n.addClass("tasknotes-settings__card--dragging"))}),r.addEventListener("dragend",()=>{n.removeClass("tasknotes-settings__card--dragging")}),n.addEventListener("dragover",i=>{i.preventDefault();let s=e.querySelector(".tasknotes-settings__card--dragging");if(s&&s!==n){let o=n.getBoundingClientRect(),l=o.top+o.height/2;n.removeClass("tasknotes-settings__card--drag-over-top","tasknotes-settings__card--drag-over-bottom"),i.clientY<l?n.addClass("tasknotes-settings__card--drag-over-top"):n.addClass("tasknotes-settings__card--drag-over-bottom")}}),n.addEventListener("dragleave",()=>{n.removeClass("tasknotes-settings__card--drag-over-top","tasknotes-settings__card--drag-over-bottom")}),n.addEventListener("drop",i=>{var l;i.preventDefault(),n.removeClass("tasknotes-settings__card--drag-over-top","tasknotes-settings__card--drag-over-bottom");let s=(l=i.dataTransfer)==null?void 0:l.getData("text/plain");if(!s)return;let o=a;if(s!==o){let c=n.getBoundingClientRect(),d=c.top+c.height/2,u=i.clientY<d;t(s,o,u)}}))}function hp(n,e,t,r){let a=Ge("number");return n!==void 0&&(a.min=n.toString()),e!==void 0&&(a.max=e.toString()),t!==void 0&&(a.step=t.toString()),r!==void 0&&(a.value=r.toString()),a}function w2(n){return n&&n.replace(/^webcal:\/\//i,"http://").replace(/^webcals:\/\//i,"https://")}function yM(n,e){let t=activeWindow.createEl("input");return t.type="text",t.addClass("tasknotes-settings__card-input"),t.pattern="^(https?|webcals?)://.*",t.title="Enter an HTTP://, HTTPS://, webcal://, or webcals:// URL",n&&(t.placeholder=n),e&&(t.value=e),t}function cv(n){let e=activeWindow.createSpan();return e.addClass("tasknotes-settings__card-info-badge"),e.textContent=n,e}function rc(n,e,t,r){n.empty();let a=n.createDiv("tasknotes-settings__empty-state");if(a.createSpan("tasknotes-settings__empty-icon"),a.createSpan({text:e,cls:"tasknotes-settings__empty-text"}),t&&r){let i=a.createEl("button",{text:t,cls:"tn-btn tn-btn--primary"});i.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),i.classList.add("tn-static-margin-top-1rem-2239d6d5"),i.onclick=r}}var CC,T2,k2,HUe,VUe,WUe,qUe,va=y(()=>{CC=require("obsidian");Ll();tc();T2="tasknotes:card-collapse-changed";k2="tasknotes-theme-color-options",HUe="tasknotes-theme-color-picker",VUe="tasknotes-theme-color-text-input",WUe="#6366f1",qUe=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i});function C2(n){return n instanceof Error?n.message:typeof n=="string"?n:""}function ZUe(n=gp.getAllDailyNotes){try{return n()}catch(e){let t=C2(e),r=t?`: ${t}`:"";throw new Error(`Failed to read daily notes${r}. ${vM}`)}}function QUe(n){let e=C2(n);return e?`Failed to create timeblock: ${e}`:"Failed to create timeblock. Check console for details."}function JUe(n){return(0,or.moment)(n)}var or,gp,S2,vM,dv,x2=y(()=>{or=require("obsidian");yt();SC();co();xe();Ll();va();ya();gp=tt(od());q();S2=M({tag:"Modals/TimeblockCreationModal"}),vM="Check the Daily Notes core plugin settings and make sure the configured daily notes folder exists.";dv=class extends or.Modal{constructor(t,r,a){super(t);this.selectedAttachments=[];this.keyboardHandler=null;this.plugin=r,this.options=a,this.translate=r.i18n.translate.bind(r.i18n)}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("timeblock-creation-modal"),this.keyboardHandler=l=>{l.key==="Enter"&&(l.ctrlKey||l.metaKey)&&(l.preventDefault(),this.handleSubmit())},this.containerEl.addEventListener("keydown",this.keyboardHandler),new or.Setting(t).setName(this.translate("modals.timeblockCreation.heading")).setHeading();let r=t.createDiv({cls:"timeblock-date-display"});r.createEl("strong",{text:this.translate("modals.timeblockCreation.dateLabel")});let a=df(this.options.date);r.createSpan({text:a.toLocaleDateString()}),new or.Setting(t).setName(this.translate("modals.timeblockCreation.titleLabel")).setDesc(this.translate("modals.timeblockCreation.titleDesc")).addText(l=>{this.titleInput=l.inputEl,l.setPlaceholder(this.translate("modals.timeblockCreation.titlePlaceholder")).setValue(this.options.prefilledTitle||"").onChange(()=>this.validateForm()),window.setTimeout(()=>this.titleInput.focus(),100)}),new or.Setting(t).setName(this.translate("modals.timeblockCreation.startTimeLabel")).setDesc(this.translate("modals.timeblockCreation.startTimeDesc")).addText(l=>{this.startTimeInput=l.inputEl,l.setPlaceholder(this.translate("modals.timeblockCreation.startTimePlaceholder")).setValue(this.options.startTime||"").onChange(()=>this.validateForm()),this.startTimeInput.type="time"}),new or.Setting(t).setName(this.translate("modals.timeblockCreation.endTimeLabel")).setDesc(this.translate("modals.timeblockCreation.endTimeDesc")).addText(l=>{this.endTimeInput=l.inputEl,l.setPlaceholder(this.translate("modals.timeblockCreation.endTimePlaceholder")).setValue(this.options.endTime||"").onChange(()=>{this.validateForm()}),this.endTimeInput.type="time"}),new or.Setting(t).setName(this.translate("modals.timeblockCreation.descriptionLabel")).setDesc(this.translate("modals.timeblockCreation.descriptionDesc")).addTextArea(l=>{this.descriptionInput=l.inputEl,l.setPlaceholder(this.translate("modals.timeblockCreation.descriptionPlaceholder")).setValue(""),this.descriptionInput.rows=3}),new or.Setting(t).setName(this.translate("modals.timeblockCreation.colorLabel")).setDesc(this.translate("modals.timeblockCreation.colorDesc")).addText(l=>{this.colorInput=l.inputEl,l.setPlaceholder(this.translate("modals.timeblockCreation.colorPlaceholder")).setValue(xd(this.plugin.settings.calendarViewSettings.defaultTimeblockColor)),qf(this.colorInput)}),new or.Setting(t).setName(this.translate("modals.timeblockCreation.attachmentsLabel")).setDesc(this.translate("modals.timeblockCreation.attachmentsDesc")).addButton(l=>{l.setButtonText(this.translate("modals.timeblockCreation.addAttachmentButton")).setTooltip(this.translate("modals.timeblockCreation.addAttachmentTooltip")).onClick(()=>{pp(this.plugin,c=>{c instanceof or.TAbstractFile&&this.addAttachment(c)},{placeholder:"Search files or type to create new...",filter:"all",sortOrder:this.plugin.settings.calendarViewSettings.timeblockAttachmentSearchOrder})})}).addButton(l=>{l.setButtonText("Add task").setTooltip("Select task").onClick(()=>{this.openTaskSelectorForTitle()})}),this.attachmentsList=t.createDiv({cls:"timeblock-attachments-list"}),this.initializePrefilledAttachments(),this.renderAttachmentsList();let i=t.createDiv({cls:"timeblock-modal-buttons"});i.createEl("button",{text:this.translate("common.cancel")}).addEventListener("click",()=>this.close()),i.createEl("button",{text:this.translate("modals.timeblockCreation.createButton"),cls:"mod-cta timeblock-create-button"}).addEventListener("click",()=>{this.handleSubmit()}),this.validateForm()}validateForm(){var o,l,c;let t=this.contentEl.querySelector(".timeblock-create-button");if(!t)return;let r=(o=this.titleInput)==null?void 0:o.value.trim(),a=(l=this.startTimeInput)==null?void 0:l.value,i=(c=this.endTimeInput)==null?void 0:c.value,s=!!(r&&a&&i);if(s&&a&&i){let[d,u]=a.split(":").map(Number),[p,m]=i.split(":").map(Number),f=d*60+u,h=p*60+m;i==="00:00"&&f>0&&(h=1440),h<=f&&(s=!1)}t.disabled=!s,t.style.opacity=s?"1":"0.5"}initializePrefilledAttachments(){let t=this.options.prefilledAttachmentPaths||[];if(t.length===0)return;let r=new Set(t.filter(a=>typeof a=="string"&&a.trim().length>0));for(let a of r){let i=this.app.vault.getAbstractFileByPath(a);i&&this.selectedAttachments.push(i)}}async handleSubmit(){var t,r;try{let a=this.titleInput.value.trim(),i=this.startTimeInput.value,s=this.endTimeInput.value,o=this.descriptionInput.value.trim(),l=hr(this.colorInput.value,this.plugin.settings.calendarViewSettings.defaultTimeblockColor);if(!a||!i||!s){new or.Notice(this.translate("notices.timeblockRequiredFieldsMissing"));return}let c=this.selectedAttachments.map(p=>`[[${p.path}]]`),d={id:Jz(),title:a,startTime:i,endTime:s};o&&(d.description=o),l&&(d.color=l),c.length>0&&(d.attachments=c);let u=await this.saveTimeblockToDailyNote(d);this.plugin.emitter.trigger("data-changed"),(r=(t=this.options).onCreated)==null||r.call(t,{timeblock:d,date:this.options.date,dailyNote:u}),new or.Notice(`Timeblock "${a}" created successfully`),this.close()}catch(a){S2.error("Error creating timeblock:",{category:"internal",operation:"creating-timeblock",error:a}),new or.Notice(QUe(a))}}async saveTimeblockToDailyNote(t){if(!(0,gp.appHasDailyNotesPluginLoaded)())throw new Error(`Daily Notes core plugin is not enabled. ${vM}`);let r=JUe(this.options.date),a=ZUe(),i=(0,gp.getDailyNote)(r,a);if(!i){try{i=await(0,gp.createDailyNote)(r)}catch(u){let p=C2(u),m=p?`: ${p}`:"";throw new Error(`Failed to create daily note${m}. ${vM}`)}if(!i)throw new Error(`Failed to create daily note. ${vM}`)}let s=await this.app.vault.read(i),o={},l=s;if(s.startsWith("---")){let u=s.indexOf("---",3);if(u!==-1){let p=s.substring(3,u);l=s.substring(u+3);try{o=(0,or.parseYaml)(p)||{}}catch(m){S2.error("Error parsing existing frontmatter:",{category:"validation",operation:"parsing-existing-frontmatter",error:m}),o={}}}}o.timeblocks||(o.timeblocks=[]),o.timeblocks.push(t);let d=`---
${(0,or.stringifyYaml)(o)}---${l}`;return await Gs(this.app,i,d),i}addAttachment(t){if(this.selectedAttachments.some(r=>r.path===t.path)){new or.Notice(this.translate("notices.timeblockAttachmentExists",{fileName:t.name}));return}if(this.titleInput&&!this.titleInput.value.trim()){let r=t instanceof or.TFile?t.basename:t.name;this.titleInput.value=r,this.validateForm()}this.selectedAttachments.push(t),this.renderAttachmentsList(),new or.Notice(this.translate("notices.timeblockAttachmentAdded",{fileName:t.name}))}async openTaskSelectorForTitle(){var t,r,a;try{let s=((a=await((r=(t=this.plugin.cacheManager).getAllTasks)==null?void 0:r.call(t)))!=null?a:[]).filter(o=>!o.archived);if(s.length===0){new or.Notice("No tasks available to select");return}fn(this.plugin,s,o=>{if(!o)return;this.titleInput.value=o.title||"",this.validateForm();let l=this.app.vault.getAbstractFileByPath(o.path);l&&this.addAttachment(l)},{title:"Select task"})}catch(i){S2.error("Failed to open task selector for timeblock creation:",{category:"persistence",operation:"open-task-selector-timeblock-creation",error:i}),new or.Notice("Failed to open task selector")}}removeAttachment(t){this.selectedAttachments=this.selectedAttachments.filter(r=>r.path!==t.path),this.renderAttachmentsList(),new or.Notice(this.translate("notices.timeblockAttachmentRemoved",{fileName:t.name}))}renderAttachmentsList(){if(this.attachmentsList.empty(),this.selectedAttachments.length===0){let t=this.attachmentsList.createDiv({cls:"timeblock-attachments-empty"});t.textContent="No attachments added yet";return}this.selectedAttachments.forEach(t=>{let r=this.attachmentsList.createDiv({cls:"timeblock-attachment-item"}),a=r.createDiv({cls:"timeblock-attachment-info"}),i=a.createSpan({cls:"timeblock-attachment-name"});if(i.textContent=t.name,t.path!==t.name){let o=a.createDiv({cls:"timeblock-attachment-path"});o.textContent=t.path}let s=r.createEl("button",{cls:"timeblock-attachment-remove",text:"×"});(0,or.setTooltip)(s,"Remove attachment",{placement:"top"}),s.addEventListener("click",()=>{this.removeAttachment(t)})})}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}}});var Cce,yp,E2=y(()=>{Cr();q();Cce=M({tag:"Services/CalendarExportService"}),yp=class{static generateCalendarURL(e){let{type:t,task:r,useScheduledAsDue:a=!0}=e;switch(t){case"google":return this.generateGoogleCalendarURL(r,a);case"outlook":return this.generateOutlookCalendarURL(r,a);case"yahoo":return this.generateYahooCalendarURL(r,a);case"ics":return this.generateICSDownloadURL(r);default:throw new Error("Unsupported calendar type")}}static generateGoogleCalendarURL(e,t){let r="https://calendar.google.com/calendar/render",a=new URLSearchParams;a.append("action","TEMPLATE"),a.append("text",e.title);let i=this.formatGoogleDates(e,t);i&&a.append("dates",i);let s=this.buildDescription(e);return s&&a.append("details",s),e.contexts&&e.contexts.length>0&&a.append("location",e.contexts.join(", ")),`${r}?${a.toString()}`}static generateOutlookCalendarURL(e,t){let r="https://outlook.live.com/calendar/0/deeplink/compose",a=new URLSearchParams;a.append("subject",e.title);let{startISO:i,endISO:s}=this.getTaskDateRange(e,t);i&&a.append("startdt",i),s&&a.append("enddt",s);let o=this.buildDescription(e);return o&&a.append("body",o),e.contexts&&e.contexts.length>0&&a.append("location",e.contexts.join(", ")),a.append("path","/calendar/action/compose"),a.append("rru","addevent"),`${r}?${a.toString()}`}static generateYahooCalendarURL(e,t){let r="https://calendar.yahoo.com/",a=new URLSearchParams;a.append("v","60"),a.append("title",e.title);let{startYahoo:i,endYahoo:s}=this.getYahooDateFormat(e,t);i&&a.append("st",i),s&&a.append("et",s);let o=this.buildDescription(e);return o&&a.append("desc",o),e.contexts&&e.contexts.length>0&&a.append("in_loc",e.contexts.join(", ")),`${r}?${a.toString()}`}static generateICSDownloadURL(e){let t=this.generateICSContent(e);return`data:text/calendar;charset=utf8,${encodeURIComponent(t)}`}static generateICSContent(e,t){let r=`${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}@tasknotes`,a=new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//TaskNotes//Task Export//EN","CALSCALE:GREGORIAN","METHOD:PUBLISH","BEGIN:VEVENT",`UID:${r}`,`DTSTAMP:${a}`];i.push(`SUMMARY:${this.escapeICSText(e.title)}`);let{startLine:s,endLine:o}=this.getICSDateProperties(e,!0,t);s&&i.push(s),o&&i.push(o);let l=this.buildDescription(e,t);if(l&&i.push(`DESCRIPTION:${this.escapeICSText(l)}`),e.contexts&&e.contexts.length>0&&i.push(`LOCATION:${this.escapeICSText(e.contexts.join(", "))}`),e.tags&&e.tags.length>0&&i.push(`CATEGORIES:${e.tags.map(c=>this.escapeICSText(c)).join(",")}`),e.priority){let d={highest:"1",high:"3",medium:"5",low:"7",lowest:"9"}[e.priority]||"5";i.push(`PRIORITY:${d}`)}return e.status&&i.push(`STATUS:${this.getVEventStatus(e.status)}`),i.push("END:VEVENT"),i.push("END:VCALENDAR"),i.join(`\r
`)}static buildDescription(e,t){let r=[],a=[];e.priority&&a.push(`Priority: ${e.priority}`),e.status&&a.push(`Status: ${e.status}`),e.projects&&e.projects.length>0&&a.push(`Projects: ${e.projects.join(", ")}`),e.tags&&e.tags.length>0&&a.push(`Tags: ${e.tags.join(", ")}`),e.contexts&&e.contexts.length>0&&a.push(`Contexts: ${e.contexts.join(", ")}`),e.timeEstimate&&a.push(`Estimated time: ${e.timeEstimate} minutes`),a.length>0&&r.push(...a),r.length>0&&r.push(""),r.push(`Exported from TaskNotes: ${e.path}`);let i=this.buildObsidianOpenUri(e,t);return i&&r.push(`Open in Obsidian: ${i}`),r.join(`
`)}static buildObsidianOpenUri(e,t){return!(t!=null&&t.includeObsidianLink)||!t.vaultName?null:`obsidian://open?vault=${encodeURIComponent(t.vaultName)}&file=${encodeURIComponent(e.path)}`}static formatGoogleDates(e,t){let{startICS:r,endICS:a}=this.getICSDateFormat(e,t);if(!r)return null;if(a)return`${r}/${a}`;let i=this.parseICSDate(r),s=new Date(i.getTime()+3600*1e3),o=this.formatDateToICS(s);return`${r}/${o}`}static getTaskDateRange(e,t,r){let a=null,i=null;if(e.scheduled)try{a=this.parseTaskDate(e.scheduled).toISOString()}catch(s){Cce.warn("Invalid scheduled date:",{category:"provider",operation:"invalid-scheduled-date",details:{value:e.scheduled}})}if(r!=null&&r.useDurationForExport&&a&&e.timeEstimate&&e.timeEstimate>0){let s=new Date(a);i=new Date(s.getTime()+e.timeEstimate*60*1e3).toISOString()}else if(e.due)try{i=this.parseTaskDate(e.due).toISOString()}catch(s){Cce.warn("Invalid due date:",{category:"provider",operation:"invalid-due-date",details:{value:e.due}})}else if(t&&a){let s=new Date(a);i=new Date(s.getTime()+3600*1e3).toISOString()}return{startISO:a,endISO:i}}static getYahooDateFormat(e,t){let{startISO:r,endISO:a}=this.getTaskDateRange(e,t),i=s=>{let o=new Date(s);return D(o,"yyyyMMdd'T'HHmmss")};return{startYahoo:r?i(r):null,endYahoo:a?i(a):null}}static getICSDateFormat(e,t=!0,r){let{startISO:a,endISO:i}=this.getTaskDateRange(e,t,r),s=o=>{let l=new Date(o);return this.formatDateToICS(l)};return{startICS:a?s(a):null,endICS:i?s(i):null}}static getICSDateProperties(e,t=!0,r){if(e.scheduled&&!this.hasTimeComponent(e.scheduled)){let s=e.scheduled,o=this.getAllDayEndDate(e,t,r)||s;return{startLine:`DTSTART;VALUE=DATE:${this.formatDateOnlyToICS(s)}`,endLine:`DTEND;VALUE=DATE:${this.formatDateOnlyToICS(o)}`}}let{startICS:a,endICS:i}=this.getICSDateFormat(e,t,r);return{startLine:a?`DTSTART:${a}`:null,endLine:i?`DTEND:${i}`:null}}static formatDateToICS(e){return e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,"")}static parseICSDate(e){let t=e.slice(0,4),r=e.slice(4,6),a=e.slice(6,8),i=e.slice(9,11),s=e.slice(11,13),o=e.slice(13,15);return new Date(`${t}-${r}-${a}T${i}:${s}:${o}Z`)}static parseTaskDate(e){let t=e.trim().replace(" ","T");return this.hasTimeComponent(t)?Na(t):Na(`${t}T00:00:00`)}static hasTimeComponent(e){return/\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/.test(e)}static formatDateOnlyToICS(e){return e.split(/[T\s]/)[0].replace(/-/g,"")}static getAllDayEndDate(e,t,r){if(!e.scheduled)return null;let a=e.scheduled;if(r!=null&&r.useDurationForExport&&e.timeEstimate&&e.timeEstimate>0){let i=Math.max(1,Math.ceil(e.timeEstimate/1440));return this.addDaysToDateString(e.scheduled,i)}if(e.due)a=e.due;else if(!t)return null;return this.addDaysToDateString(a,1)}static addDaysToDateString(e,t){let r=Na(`${e.split(/[T\s]/)[0]}T00:00:00`);return r.setDate(r.getDate()+t),D(r,"yyyy-MM-dd")}static escapeICSText(e){return e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\n/g,"\\n").replace(/\r/g,"")}static foldICSLines(e){let t=e.split(`\r
`),r=[];return t.forEach(a=>{if(a.length<=75)r.push(a);else{let i=a;for(;i.length>75;)r.push(i.substring(0,75)),i=" "+i.substring(75);i.length>0&&r.push(i)}}),r.join(`\r
`)}static generateMultipleTasksICSContent(e,t){let r=new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),a=this.filterTasksForExport(e,t),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//TaskNotes//EN","CALSCALE:GREGORIAN"];return a.forEach((s,o)=>{let l=`${s.path.replace(/[^a-zA-Z0-9]/g,"-")}-${o}-${Date.now()}@tasknotes`;i.push("BEGIN:VEVENT"),i.push(`UID:${l}`),i.push(`DTSTAMP:${r}`),i.push(`SUMMARY:${this.escapeICSText(s.title)}`);let{startLine:c,endLine:d}=this.getICSDateProperties(s,!0,t);if(c){if(!d){let p=c.split(":",2)[1];if(c.includes("VALUE=DATE")){let m=Na(`${p.slice(0,4)}-${p.slice(4,6)}-${p.slice(6,8)}T00:00:00`);m.setDate(m.getDate()+1),d=`DTEND;VALUE=DATE:${D(m,"yyyyMMdd")}`}else{let m=this.parseICSDate(p),f=new Date(m.getTime()+3600*1e3);d=`DTEND:${this.formatDateToICS(f)}`}}}else{let p;if(s.dateCreated?p=new Date(s.dateCreated):p=new Date,c=`DTSTART:${this.formatDateToICS(p)}`,!d){let f=new Date(p.getTime()+36e5);d=`DTEND:${this.formatDateToICS(f)}`}}i.push(c),i.push(d);let u=this.buildDescription(s,t);if(u&&i.push(`DESCRIPTION:${this.escapeICSText(u)}`),s.contexts&&s.contexts.length>0&&i.push(`LOCATION:${this.escapeICSText(s.contexts.join(", "))}`),s.tags&&s.tags.length>0&&i.push(`CATEGORIES:${s.tags.map(p=>this.escapeICSText(p)).join(",")}`),s.priority){let m={highest:"1",high:"3",medium:"5",low:"7",lowest:"9"}[s.priority]||"5";i.push(`PRIORITY:${m}`)}s.status&&i.push(`STATUS:${this.getVEventStatus(s.status)}`),i.push("END:VEVENT")}),i.push("END:VCALENDAR"),this.foldICSLines(i.join(`\r
`))}static filterTasksForExport(e,t){var a;if(!(t!=null&&t.excludeArchived)&&!(t!=null&&t.excludeCompleted)&&!(t!=null&&t.requireDueDate)&&!(t!=null&&t.requireScheduledDate))return e;let r=new Set((a=t.completedStatuses)!=null&&a.length?t.completedStatuses:["done"]);return e.filter(i=>!(t.excludeArchived&&i.archived||t.excludeCompleted&&r.has(i.status)||t.requireDueDate&&!i.due||t.requireScheduledDate&&!i.scheduled))}static getVEventStatus(e){let t=e.trim().toLowerCase();return t==="cancelled"||t==="canceled"?"CANCELLED":t==="tentative"?"TENTATIVE":"CONFIRMED"}static createMultipleTasksICSDownload(e,t){if(!e||e.length===0)return null;let r=this.filterTasksForExport(e,t);if(r.length===0)return null;let a=new Date().toISOString().split("T")[0];return{content:this.generateMultipleTasksICSContent(r,t),filename:`tasknotes-all-tasks-${a}.ics`,taskCount:r.length}}static createTaskICSDownload(e,t){return{content:this.generateICSContent(e,t),filename:`${e.title.replace(/[^a-zA-Z0-9]/g,"-")}.ics`,taskCount:1}}}});function Ze(n,e){return e===void 0?new D2.Notice(n):new D2.Notice(n,e)}var D2,Wd=y(()=>{D2=require("obsidian")});var Ece={};Xe(Ece,{downloadAllTasksICSFile:()=>XUe,downloadTaskICSFile:()=>A2,openCalendarURL:()=>xC});function uv(n,e,t,r){return n?n(e,r):t}function xce(n){let e=new Blob([n.content],{type:"text/calendar"}),t=URL.createObjectURL(e);try{let r=activeWindow.createEl("a");r.href=t,r.download=n.filename,r.click()}finally{URL.revokeObjectURL(t)}}function xC(n,e){try{let t=yp.generateCalendarURL(n);window.open(t,"_blank")}catch(t){P2.error("Failed to generate calendar URL:",{category:"provider",operation:"generate-calendar-url",error:t}),Ze(uv(e,"services.calendarExport.notices.generateLinkFailed","Failed to generate calendar link"))}}function XUe(n,e,t){try{let r=yp.createMultipleTasksICSDownload(n,t);if(!r){Ze(uv(e,"services.calendarExport.notices.noTasksToExport","No tasks found to export"));return}xce(r);let a=r.taskCount===1?"":"s";Ze(uv(e,"services.calendarExport.notices.downloadSuccess",`Downloaded ${r.filename} with ${r.taskCount} task${a}`,{filename:r.filename,count:r.taskCount,plural:a}))}catch(r){P2.error("Failed to download all tasks ICS file:",{category:"provider",operation:"download-all-tasks-ics-file",error:r}),Ze(uv(e,"services.calendarExport.notices.downloadFailed","Failed to download calendar file"))}}function A2(n,e,t){try{let r=yp.createTaskICSDownload(n,t);xce(r),Ze(uv(e,"services.calendarExport.notices.singleDownloadSuccess",`Downloaded ${r.filename}`,{filename:r.filename}))}catch(r){P2.error("Failed to download ICS file:",{category:"provider",operation:"download-ics-file",error:r}),Ze(uv(e,"services.calendarExport.notices.downloadFailed","Failed to download calendar file"))}}var P2,M2=y(()=>{E2();q();Wd();P2=M({tag:"UI/CalendarExportActions"})});async function Pce(n){let{plugin:e,path:t,openInNewLeaf:r=!1}=n,a=e.app.vault.getAbstractFileByPath(t);if(a instanceof Gf.TFile){await e.app.workspace.getLeaf(r).openFile(a);return}await e.app.workspace.openLinkText(t,"",r)}async function pv(n){let{plugin:e,parentTask:t,targetDate:r,openInNewLeaf:a=!1,onUpdate:i}=n,s=ae(r);try{let o=await e.taskService.findMaterializedOccurrence(t,r),l=await e.taskService.materializeOccurrence(t,r);return await Pce({plugin:e,path:l.path,openInNewLeaf:a}),i==null||i(),new Gf.Notice(o?`Opened occurrence note for ${s}`:`Created occurrence note for ${s}`),l}catch(o){let l=o instanceof Error?o.message:String(o);return Dce.error("Error opening or creating occurrence note:",{category:"persistence",operation:"open-or-create-occurrence-note",details:{taskPath:t.path,targetDate:s},error:l}),new Gf.Notice(`Failed to open occurrence note: ${l}`),null}}async function kM(n){let{plugin:e,occurrenceTask:t,openInNewLeaf:r=!1}=n;try{let a=await e.taskService.getMaterializedOccurrenceParent(t);return a?(await Pce({plugin:e,path:a.path,openInNewLeaf:r}),a):(new Gf.Notice("Recurring parent not found"),null)}catch(a){let i=a instanceof Error?a.message:String(a);return Dce.error("Error opening materialized occurrence parent:",{category:"persistence",operation:"open-materialized-occurrence-parent",details:{taskPath:t.path,occurrenceDate:t.occurrence_date},error:i}),new Gf.Notice(`Failed to open recurring parent: ${i}`),null}}var Gf,Dce,TM=y(()=>{Gf=require("obsidian");xe();q();Dce=M({tag:"UI/OccurrenceNoteActions"})});function bM(n){return n.trim()}function EC(n){let e=new Set,t=[];for(let r of n!=null?n:[]){if(typeof r!="string")continue;let a=bM(r);!a||e.has(a)||(e.add(a),t.push(a))}return t}function Ace(n,e){let t=bM(e),r=EC(n);return t?r.includes(t)?r:[...r,t]:r.length>0?r:void 0}function eHe(n,e){let t=bM(e),r=EC(n).filter(a=>a!==t);return r.length>0?r:void 0}function tHe(n,e){let t=bM(e),r=EC(n);return t?r.includes(t)?eHe(r,t):Ace(r,t):r.length>0?r:void 0}function _n(n){return n.setSubmenu()}function I2(n){var t,r;let e=n;return(r=(t=e.dom)!=null?t:e.domEl)!=null?r:null}function mv(n,e=""){let r=(typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="bigint"?String(n):"").trim();return r.length>0?r:e}var De,tr,ll,DC=y(()=>{De=require("obsidian");xe();lce();Jy();vC();ya();p2();Fi();Uy();$y();Qy();v$();aC();co();py();Zs();Cn();Md();Id();Sce();x2();b$();M2();TM();q();tr=M({tag:"Components/TaskContextMenu"});ll=class n{constructor(e,t=new ra){this.targetDoc=activeDocument;this.menu=t,this.options=e,this.buildMenu()}static addToMenu(e,t){new n(t,e)}t(e,t){return this.options.plugin.i18n.translate(e,t)}buildMenu(){let{task:e,plugin:t}=this.options,r=this.addPromotedOccurrenceControls(e,t);this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.status")),a.setIcon("circle");let i=_n(a);this.addStatusOptions(i,e,t)}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.priority")),a.setIcon("star");let i=_n(a);this.addPriorityOptions(i,e,t)}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.tags")),a.setIcon("tags");let i=_n(a);this.addTagOptions(i,e,t)}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.dueDate")),a.setIcon("calendar");let i=_n(a);this.addDateOptions(i,e.due,async s=>{var o,l;try{await t.updateTaskProperty(e,"due",s||void 0),(l=(o=this.options).onUpdate)==null||l.call(o)}catch(c){let d=c instanceof Error?c.message:String(c);tr.error("Error updating task due date:",{category:"validation",operation:"updating-task-due-date",details:{taskPath:e.path},error:d}),new De.Notice(this.t("contextMenus.task.notices.updateDueDateFailure",{message:d}))}},()=>{t.openDueDateModal(e)})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.scheduledDate")),a.setIcon("calendar-clock");let i=_n(a);this.addDateOptions(i,e.scheduled,async s=>{var o,l;try{await t.updateTaskProperty(e,"scheduled",s||void 0),(l=(o=this.options).onUpdate)==null||l.call(o)}catch(c){let d=c instanceof Error?c.message:String(c);tr.error("Error updating task scheduled date:",{category:"validation",operation:"updating-task-scheduled-date",details:{taskPath:e.path},error:d}),new De.Notice(this.t("contextMenus.task.notices.updateScheduledFailure",{message:d}))}},()=>{t.openScheduledDateModal(e)})}),this.addCustomDateFieldMenuItems(e,t),this.addCompleteOrSkipSection(e,t),e.recurrence&&!this.options.promoteOccurrenceControls&&this.addOccurrenceNoteMenuItem(e,t),!r&&e.recurrence_parent&&e.occurrence_date&&this.addMaterializedOccurrenceMenuItems(e,t),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.reminders")),a.setIcon("bell");let i=_n(a);this.addQuickRemindersSection(i,e,t,"due",this.t("contextMenus.task.remindBeforeDue")),this.addQuickRemindersSection(i,e,t,"scheduled",this.t("contextMenus.task.remindBeforeScheduled")),i.addSeparator(),i.addItem(s=>{s.setTitle(this.t("contextMenus.task.manageReminders")),s.setIcon("settings"),s.onClick(()=>{new sl(t.app,t,e,l=>{(async()=>{var c,d;try{await t.updateTaskProperty(e,"reminders",l.length>0?l:void 0),(d=(c=this.options).onUpdate)==null||d.call(c)}catch(u){tr.error("Error updating reminders:",{category:"persistence",operation:"updating-reminders",error:u}),new De.Notice(this.t("contextMenus.task.notices.updateRemindersFailure"))}})()}).open()})}),e.reminders&&e.reminders.length>0&&i.addItem(s=>{s.setTitle(this.t("contextMenus.task.clearReminders")),s.setIcon("trash"),s.onClick(async()=>{var o,l;try{await t.updateTaskProperty(e,"reminders",void 0),(l=(o=this.options).onUpdate)==null||l.call(o)}catch(c){tr.error("Error clearing reminders:",{category:"persistence",operation:"clearing-reminders",error:c}),new De.Notice(this.t("contextMenus.task.notices.clearRemindersFailure"))}})})}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.dependencies.title")),a.setIcon("git-branch");let i=_n(a);this.addDependencyMenuItems(i,e,t)}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.title")),a.setIcon("folder-tree");let i=_n(a);this.addOrganizationMenuItems(i,e,t)}),this.menu.addSeparator(),this.menu.addItem(a=>{let i=t.getActiveTimeSession(e);a.setTitle(i?this.t("contextMenus.task.stopTimeTracking"):this.t("contextMenus.task.startTimeTracking")),a.setIcon(i?"pause":"play"),a.onClick(async()=>{var o,l;t.getActiveTimeSession(e)?await t.stopTimeTracking(e):await t.startTimeTracking(e),(l=(o=this.options).onUpdate)==null||l.call(o)})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.editTimeEntries")),a.setIcon("clock"),a.onClick(()=>{t.openTimeEntryEditor(e)})}),t.settings.calendarViewSettings.enableTimeblocking&&this.menu.addItem(a=>{a.setTitle("Create timeblock"),a.setIcon("calendar-plus"),a.onClick(()=>{let i=wce(e,this.options.targetDate);new dv(t.app,t,{date:i.date,startTime:i.startTime,endTime:i.endTime,prefilledTitle:e.title,prefilledAttachmentPaths:[e.path]}).open()})}),this.menu.addItem(a=>{a.setTitle(e.archived?this.t("contextMenus.task.unarchive"):this.t("contextMenus.task.archive")),a.setIcon(e.archived?"archive-restore":"archive"),a.onClick(async()=>{var i,s;try{await t.toggleTaskArchive(e),(s=(i=this.options).onUpdate)==null||s.call(i)}catch(o){let l=o instanceof Error?o.message:String(o);tr.error("Error toggling task archive:",{category:"persistence",operation:"toggling-task-archive",details:{taskPath:e.path},error:l}),new De.Notice(this.t("contextMenus.task.notices.archiveFailure",{message:l}))}})}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("modals.taskEdit.title")),a.setIcon("pencil"),a.onClick(()=>{t.openTaskEditModal(e,()=>{var i,s;(s=(i=this.options).onUpdate)==null||s.call(i)})})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.openNote")),a.setIcon("file-text"),a.onClick(()=>{let i=t.app.vault.getAbstractFileByPath(e.path);i instanceof De.TFile&&t.app.workspace.getLeaf(!1).openFile(i)})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.openNoteInNewTab")),a.setIcon("external-link"),a.onClick(()=>{t.app.vault.getAbstractFileByPath(e.path)instanceof De.TFile&&t.app.workspace.openLinkText(e.path,"",!0)})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.copyTitle")),a.setIcon("copy"),a.onClick(async()=>{try{await navigator.clipboard.writeText(e.title),new De.Notice(this.t("contextMenus.task.notices.copyTitleSuccess"))}catch(i){new De.Notice(this.t("contextMenus.task.notices.copyFailure"))}})}),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.noteActions")),a.setIcon("file-text");let i=_n(a),s=t.app.vault.getAbstractFileByPath(e.path);if(s instanceof De.TFile){try{t.app.workspace.trigger("file-menu",i,s,"tasknotes-context-menu")}catch(o){tr.debug("Native file menu not available, using fallback",{category:"stale-data",operation:"native-file-menu-not-using-fallback"})}i.addItem(o=>{o.setTitle(this.t("contextMenus.task.rename")),o.setIcon("pencil"),o.onClick(async()=>{try{let l=s.basename,c=await Vy(t.app,{title:this.t("contextMenus.task.renameTitle"),placeholder:this.t("contextMenus.task.renamePlaceholder"),initialValue:l});if(c&&c.trim()!==""&&c!==l){let d=s.extension,u=c.endsWith(`.${d}`)?c:`${c}.${d}`,p=s.parent?`${s.parent.path}/${u}`:u;await Kz(t.app,s,p),new De.Notice(this.t("contextMenus.task.notices.renameSuccess",{name:u})),this.options.onUpdate&&this.options.onUpdate()}}catch(l){tr.error("Error renaming file:",{category:"persistence",operation:"renaming-file",error:l}),new De.Notice(this.t("contextMenus.task.notices.renameFailure"))}})}),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.delete")),o.setIcon("trash"),o.onClick(async()=>{if(await ur(t.app,{title:this.t("contextMenus.task.deleteTitle"),message:this.t("contextMenus.task.deleteMessage",{name:s.name}),confirmText:this.t("contextMenus.task.deleteConfirm"),cancelText:this.t("common.cancel"),isDestructive:!0}))try{await t.taskService.deleteTask(e),this.options.onUpdate&&this.options.onUpdate()}catch(c){let d=c instanceof Error?c.message:String(c);tr.error("Error deleting task:",{category:"persistence",operation:"deleting-task",error:c}),new De.Notice(`Failed to delete task: ${d}`)}})}),i.addSeparator(),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.copyPath")),o.setIcon("copy"),o.onClick(()=>{navigator.clipboard.writeText(s.path).then(()=>{new De.Notice(this.t("contextMenus.task.notices.copyPathSuccess"))}).catch(()=>{new De.Notice(this.t("contextMenus.task.notices.copyFailure"))})})}),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.copyUrl")),o.setIcon("link"),o.onClick(()=>{let l=`obsidian://open?vault=${encodeURIComponent(t.app.vault.getName())}&file=${encodeURIComponent(s.path)}`;navigator.clipboard.writeText(l).then(()=>{new De.Notice(this.t("contextMenus.task.notices.copyUrlSuccess"))}).catch(()=>{new De.Notice(this.t("contextMenus.task.notices.copyFailure"))})})}),i.addSeparator(),i.addItem(o=>{o.setTitle(this.t("contextMenus.task.showInExplorer")),o.setIcon("folder-open"),o.onClick(()=>{t.app.workspace.getLeaf().setViewState({type:"file-explorer",state:{}}).then(()=>{let l=t.app.workspace.getLeavesOfType("file-explorer")[0];l!=null&&l.view&&"revealInFolder"in l.view&&l.view.revealInFolder(s)}).catch(l=>{tr.warn("Failed to reveal task in file explorer:",{category:"persistence",operation:"reveal-task-file-explorer",error:l})})})})}}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.addToCalendar")),a.setIcon("calendar-plus");let i=_n(a);i.addItem(s=>{s.setTitle(this.t("contextMenus.task.calendar.google")),s.setIcon("external-link"),s.onClick(()=>{xC({type:"google",task:e,useScheduledAsDue:!0},this.t.bind(this))})}),i.addItem(s=>{s.setTitle(this.t("contextMenus.task.calendar.outlook")),s.setIcon("external-link"),s.onClick(()=>{xC({type:"outlook",task:e,useScheduledAsDue:!0},this.t.bind(this))})}),i.addItem(s=>{s.setTitle(this.t("contextMenus.task.calendar.yahoo")),s.setIcon("external-link"),s.onClick(()=>{xC({type:"yahoo",task:e,useScheduledAsDue:!0},this.t.bind(this))})}),i.addSeparator(),i.addItem(s=>{s.setTitle(this.t("contextMenus.task.calendar.downloadIcs")),s.setIcon("download"),s.onClick(()=>{A2(e,this.t.bind(this),{includeObsidianLink:!0,vaultName:t.app.vault.getName()})})}),i.addSeparator(),i.addItem(s=>{s.setTitle(this.t("contextMenus.task.calendar.syncToGoogle")),s.setIcon("refresh-cw"),s.onClick(async()=>{var o,l,c;if(!((o=t.taskCalendarSyncService)!=null&&o.isEnabled())){new De.Notice(this.t("contextMenus.task.calendar.syncToGoogleNotConfigured"));return}try{await t.taskCalendarSyncService.syncTaskToCalendar(e),new De.Notice(this.t("contextMenus.task.calendar.syncToGoogleSuccess")),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){tr.error("Failed to sync task to Google Calendar:",{category:"provider",operation:"sync-task-google-calendar",error:d}),new De.Notice(this.t("contextMenus.task.calendar.syncToGoogleFailed"))}})})}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.recurrence")),a.setIcon("refresh-ccw");let i=_n(a),s=typeof e.recurrence=="string"?e.recurrence:void 0;this.addRecurrenceOptions(i,s,async o=>{var l,c;try{await t.updateTaskProperty(e,"recurrence",o||void 0),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){let u=d instanceof Error?d.message:String(d);tr.error("Error updating task recurrence:",{category:"persistence",operation:"updating-task-recurrence",details:{taskPath:e.path},error:u}),new De.Notice(this.t("contextMenus.task.notices.updateRecurrenceFailure",{message:u}))}},t),s&&this.addOccurrencePolicyOptions(i,e,t)}),this.menu.addSeparator(),this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.createSubtask")),a.setIcon("plus"),a.onClick(()=>{let i=t.app.vault.getAbstractFileByPath(e.path);i instanceof De.TFile&&t.openTaskCreationModal({...cM(t,e,i)})})}),this.addMobileDismissOption(),window.setTimeout(()=>{this.updateMainMenuIconColors(e,t)},10)}addMobileDismissOption(){De.Platform.isMobile&&(this.menu.addSeparator(),this.menu.addItem(e=>{e.setTitle(this.t("common.close")),e.setIcon("x"),e.onClick(()=>{this.menu.hide()})}))}addCompleteOrSkipSection(e,t){let r=!!e.recurrence;if(t.settings.completionMenuAsSubmenu===!1){this.menu.addSeparator(),this.addCompletionMenuItems(e,t,this.menu),r&&this.addSkipMenuItem(e,t,this.menu),this.menu.addSeparator();return}this.menu.addItem(a=>{a.setTitle(this.t(r?"contextMenus.task.completion.submenu":"contextMenus.task.completion.submenuCompleteOnly")),a.setIcon("check-check");let i=_n(a);this.addCompletionMenuItems(e,t,i),r&&this.addSkipMenuItem(e,t,i)})}addCompletionMenuItems(e,t,r){if(!!!e.recurrence&&t.statusManager.isCompletedStatus(e.status)){r.addItem(i=>{i.setTitle(this.t("contextMenus.task.completion.markIncomplete")),i.setIcon("x"),i.onClick(async()=>{await this.uncompleteNonRecurringTask(e,t)})});return}this.addConcreteCompletionAction(e,t,"today","contextMenus.task.completion.completeToday",r),this.addConcreteCompletionAction(e,t,"asScheduled","contextMenus.task.completion.completeAsScheduled",r),this.addConcreteCompletionAction(e,t,"onDue","contextMenus.task.completion.completeOnDue",r),this.addPickCompletionDateAction(e,t,r)}addConcreteCompletionAction(e,t,r,a,i){let s=!!e.recurrence,o={occurrenceDate:this.options.occurrenceDate},l=c2(e,r,o);i.addItem(c=>{var p,m;if(!l.available){c.setTitle(this.t(a)),c.setIcon("check"),c.setDisabled(!0);let f=I2(c);f&&(0,De.setTooltip)(f,this.t(l.reasonKey));return}let d=l.date,u=s&&((m=(p=e.complete_instances)==null?void 0:p.includes(ae(d)))!=null?m:!1);c.setTitle(u?this.t("contextMenus.task.completion.markIncomplete"):this.t(a)),c.setIcon(u?"x":"check"),c.onClick(async()=>{await this.dispatchCompletion(e,t,d)})})}addPickCompletionDateAction(e,t,r){r.addItem(a=>{a.setTitle(this.t("contextMenus.task.completion.completeOnPicked")),a.setIcon("calendar-plus"),a.onClick(()=>{this.pickCompletionDate(e,t)})})}pickCompletionDate(e,t){this.menu.hide(),new oo(t.app,{currentDate:null,title:this.t("contextMenus.task.completion.pickDateTitle"),showTime:!1,plugin:t,onSelect:a=>{if(!a)return;let i=st(re(a)),s=c2(e,"onPicked",{pickedDate:i});s.available&&this.dispatchCompletion(e,t,s.date)}}).open()}async dispatchCompletion(e,t,r){var a,i;try{if(e.recurrence)await t.toggleRecurringTaskComplete(e,r);else{let s=t.statusManager.getCompletedStatuses()[0];if(!s){new De.Notice(this.t("contextMenus.task.completion.noCompletedStatus"));return}await t.updateTaskProperty(e,"status",s,{completionDate:ae(r)})}(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){let o=s instanceof Error?s.message:String(s);tr.error("Error completing task:",{category:"persistence",operation:"completing-task",details:{taskPath:e.path},error:o}),new De.Notice(this.t("contextMenus.task.completion.completeFailure",{message:o}))}}async uncompleteNonRecurringTask(e,t){var r,a,i;try{let s=(r=t.settings.defaultTaskStatus)!=null?r:"open";await t.updateTaskProperty(e,"status",s),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){let o=s instanceof Error?s.message:String(s);tr.error("Error marking task incomplete:",{category:"persistence",operation:"uncompleting-task",details:{taskPath:e.path},error:o}),new De.Notice(this.t("contextMenus.task.completion.completeFailure",{message:o}))}}addSkipMenuItem(e,t,r){var l;let a=this.options.occurrenceDate,i=a!=null?a:mM(e),s=ae(i),o=((l=e.skipped_instances)==null?void 0:l.includes(s))||!1;r.addItem(c=>{c.setTitle(o?this.t("contextMenus.task.unskipInstance"):this.t("contextMenus.task.skipInstance")),c.setIcon(o?"undo":"x-circle"),c.onClick(async()=>{var d,u;try{await t.taskService.toggleRecurringTaskSkipped(e,a),(u=(d=this.options).onUpdate)==null||u.call(d)}catch(p){let m=p instanceof Error?p.message:String(p);tr.error("Error toggling recurring task skip:",{category:"persistence",operation:"toggling-recurring-task-skip",details:{taskPath:e.path},error:m}),new De.Notice(this.t("contextMenus.task.notices.toggleSkipFailure",{message:m}))}})})}addPromotedOccurrenceControls(e,t){if(!this.options.promoteOccurrenceControls)return!1;let r=!1;return e.recurrence&&(this.addOccurrenceNoteMenuItem(e,t),r=!0),e.recurrence_parent&&e.occurrence_date&&(this.addMaterializedOccurrenceMenuItems(e,t),r=!0),r&&this.menu.addSeparator(),r}addOccurrenceNoteMenuItem(e,t){this.menu.addItem(r=>{r.setTitle("Open or create occurrence note"),r.setIcon("file-plus"),r.onClick(async()=>{await pv({plugin:t,parentTask:e,targetDate:this.getOccurrenceNoteTargetDate(e),onUpdate:this.options.onUpdate})})})}getOccurrenceNoteTargetDate(e){if(this.options.promoteOccurrenceControls||e.recurrence_anchor!=="completion")return this.options.targetDate;try{let t=re(e.scheduled||"");return t?st(t):this.options.targetDate}catch(t){return this.options.targetDate}}addMaterializedOccurrenceMenuItems(e,t){this.menu.addItem(i=>{i.setTitle("Open recurring parent"),i.setIcon("refresh-ccw"),i.onClick(async()=>{await kM({plugin:t,occurrenceTask:e})})});let r=this.getSkippedStatusValue(t),a=this.isSkippedMaterializedOccurrence(e,t);!r&&!a||this.menu.addItem(i=>{i.setTitle(a?"Unskip occurrence":"Skip occurrence"),i.setIcon(a?"undo":"x-circle"),i.onClick(async()=>{var s,o;try{let l=a?await t.taskService.unskipMaterializedOccurrence(e):await t.taskService.skipMaterializedOccurrence(e,r);Object.assign(e,l),(o=(s=this.options).onUpdate)==null||o.call(s)}catch(l){let c=l instanceof Error?l.message:String(l);tr.error("Error updating materialized occurrence skip state:",{category:"persistence",operation:"updating-materialized-occurrence-skip-state",details:{taskPath:e.path,occurrenceDate:e.occurrence_date},error:c}),new De.Notice(`Failed to update occurrence: ${c}`)}})})}getSkippedStatusValue(e){var t,r;return(r=(t=e.settings.customStatuses)==null?void 0:t.find(a=>a.isSkipped))==null?void 0:r.value}isSkippedMaterializedOccurrence(e,t){var r;return((r=t.settings.customStatuses)==null?void 0:r.some(a=>a.isSkipped&&a.value===e.status))===!0}addDependencyMenuItems(e,t,r){var s,o;e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.addBlockedBy")),l.setIcon("link-2"),l.onClick(()=>{this.menu.hide(),this.openBlockedBySelector(t,r)})});let a=(s=t.blockedBy)!=null?s:[];a.length>0&&e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.removeBlockedBy")),l.setIcon("unlink");let c=_n(l);a.forEach((d,u)=>{c.addItem(p=>{let m=mv(iB(d),this.t("contextMenus.task.dependencies.unknownDependency"));p.setTitle(m),p.onClick(async()=>{var f,h;try{let g=a.filter((k,T)=>T!==u),v=await r.updateTaskProperty(t,"blockedBy",g.length>0?g:void 0);Object.assign(t,v),new De.Notice(this.t("contextMenus.task.dependencies.notices.blockedByRemoved")),(h=(f=this.options).onUpdate)==null||h.call(f)}catch(g){tr.error("Failed to remove blocked-by dependency:",{category:"persistence",operation:"remove-blocked-by-dependency",error:g}),new De.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}})})})}),e.addSeparator(),e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.addBlocking")),l.setIcon("git-branch-plus"),l.onClick(()=>{this.menu.hide(),this.openBlockingSelector(t,r)})});let i=(o=t.blocking)!=null?o:[];i.length>0&&e.addItem(l=>{l.setTitle(this.t("contextMenus.task.dependencies.removeBlocking")),l.setIcon("git-branch-minus");let c=_n(l);i.forEach(d=>{let u=r.app.vault.getAbstractFileByPath(d),p=u instanceof De.TFile?r.app.metadataCache.fileToLinktext(u,t.path,!1):d.split("/").pop()||d;c.addItem(m=>{m.setTitle(p),m.onClick(async()=>{var f,h;try{await r.taskService.updateBlockingRelationships(t,[],[d],{});let g=await r.cacheManager.getTaskInfo(t.path);g&&Object.assign(t,g),new De.Notice(this.t("contextMenus.task.dependencies.notices.blockingRemoved")),(h=(f=this.options).onUpdate)==null||h.call(f)}catch(g){tr.error("Failed to remove blocking dependency:",{category:"persistence",operation:"remove-blocking-dependency",error:g}),new De.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}})})})})}dedupeDependencyEntries(e){let t=new Map;for(let r of e){let a=Ai(r);if(!a)continue;let i=this.getDependencyKey(a);t.has(i)||t.set(i,a)}return Array.from(t.values())}async openBlockedBySelector(e,t){let r=new Set((Array.isArray(e.blockedBy)?e.blockedBy:[]).map(a=>a.uid));await this.openTaskDependencySelector(t,a=>{if(a.path===e.path)return!1;let i=Ks(t.app,e.path,a.path,t.settings.useFrontmatterMarkdownLinks);return!r.has(i)},async a=>{await this.handleBlockedBySelection(e,t,a)})}async openBlockingSelector(e,t){var a;let r=new Set((a=e.blocking)!=null?a:[]);await this.openTaskDependencySelector(t,i=>i.path===e.path?!1:!r.has(i.path),async i=>{await this.handleBlockingSelection(e,t,i)})}async openTaskDependencySelector(e,t,r){try{let i=(await e.cacheManager.getAllTasks()).filter(t);if(i.length===0){new De.Notice(this.t("contextMenus.task.dependencies.notices.noEligibleTasks"));return}fn(e,i,s=>{s&&r(s)})}catch(a){tr.error("Failed to open task selector for dependencies:",{category:"persistence",operation:"open-task-selector-dependencies",error:a}),new De.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}async handleBlockedBySelection(e,t,r){var a,i;if(r.path!==e.path)try{let s={uid:Ks(t.app,e.path,r.path,t.settings.useFrontmatterMarkdownLinks),reltype:Pi},o=Array.isArray(e.blockedBy)?e.blockedBy:[],l=this.dedupeDependencyEntries([...o,s]);if(l.length===o.length)return;let c=await t.updateTaskProperty(e,"blockedBy",l);Object.assign(e,c),new De.Notice(this.t("contextMenus.task.dependencies.notices.blockedByAdded",{count:1})),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){tr.error("Failed to add blocked-by dependency via selector:",{category:"persistence",operation:"add-blocked-by-dependency-via-selector",error:s}),new De.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}async handleBlockingSelection(e,t,r){var i,s,o;let a=r.path;if(a!==e.path&&!((i=e.blocking)!=null&&i.includes(a)))try{let l={uid:Ks(t.app,a,e.path,t.settings.useFrontmatterMarkdownLinks),reltype:Pi};await t.taskService.updateBlockingRelationships(e,[a],[],{[a]:l});let c=await t.cacheManager.getTaskInfo(e.path);c?Object.assign(e,c):Array.isArray(e.blocking)?e.blocking=Array.from(new Set([...e.blocking,a])):e.blocking=[a],new De.Notice(this.t("contextMenus.task.dependencies.notices.blockingAdded",{count:1})),(o=(s=this.options).onUpdate)==null||o.call(s)}catch(l){tr.error("Failed to add blocking dependency via selector:",{category:"persistence",operation:"add-blocking-dependency-via-selector",error:l}),new De.Notice(this.t("contextMenus.task.dependencies.notices.updateFailed"))}}getDependencyKey(e){var t;return`${e.uid}::${e.reltype}::${(t=e.gap)!=null?t:""}`}addOrganizationMenuItems(e,t,r){e.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.contexts")),a.setIcon("at-sign");let i=_n(a);this.addContextMenuItems(i,t,r)}),e.addSeparator(),e.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.addToProject")),a.setIcon("folder-plus"),a.onClick(()=>{this.menu.hide(),this.openProjectSelector(t,r)})}),e.addItem(a=>{a.setTitle(this.t("contextMenus.task.organization.addSubtasks")),a.setIcon("indent"),a.onClick(()=>{this.menu.hide(),this.openSubtaskAssignmentSelector(t,r)})})}addContextMenuItems(e,t,r){let a=EC(t.contexts),i=this.getContextOptions(t,r);if(e.addItem(s=>{s.setTitle(this.t("contextMenus.task.organization.addContext")),s.setIcon("plus"),s.onClick(()=>{this.menu.hide(),this.openContextInput(t,r)})}),i.length>0){e.addSeparator();for(let s of i)e.addItem(o=>{let l=a.includes(s);o.setTitle(l?this.t("contextMenus.task.organization.contextSelected",{context:s}):s),o.setIcon(l?"check":"at-sign"),o.onClick(async()=>{await this.updateTaskContexts(t,r,tHe(t.contexts,s))})})}a.length>0&&(e.addSeparator(),e.addItem(s=>{s.setTitle(this.t("contextMenus.task.organization.clearContexts")),s.setIcon("x"),s.onClick(async()=>{await this.updateTaskContexts(t,r,void 0)})}))}getContextOptions(e,t){var i,s,o,l;let r=(o=(s=(i=t.cacheManager).getAllContexts)==null?void 0:s.call(i))!=null?o:[];return EC([...r,...(l=e.contexts)!=null?l:[]]).sort((c,d)=>c.localeCompare(d))}async openContextInput(e,t){let r=await Vy(t.app,{title:this.t("contextMenus.task.organization.addContext"),placeholder:this.t("contextMenus.task.organization.contextPlaceholder"),confirmText:this.t("common.confirm"),cancelText:this.t("common.cancel")});r&&await this.updateTaskContexts(e,t,Ace(e.contexts,r))}async updateTaskContexts(e,t,r){var a,i;try{let s=await t.updateTaskProperty(e,"contexts",r);Object.assign(e,s),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){tr.error("Failed to update task contexts:",{category:"validation",operation:"update-task-contexts",error:s}),new De.Notice(this.t("contextMenus.task.organization.notices.updateContextsFailed"))}}addTagOptions(e,t,r){let a=ole(t,r.settings);if(e.addItem(i=>{i.setTitle(this.t("contextMenus.task.addTag")),i.setIcon("plus"),i.onClick(()=>{this.menu.hide(),this.openTagInput(t,r,"add")})}),a.length>0){e.addSeparator();for(let i of a)e.addItem(s=>{s.setTitle(this.t("contextMenus.task.removeTag",{tag:`#${i}`})),s.setIcon("x"),s.onClick(async()=>{await this.updateTaskTags(t,r,sC(t.tags,[i]))})});e.addSeparator(),e.addItem(i=>{i.setTitle(this.t("contextMenus.task.clearTags")),i.setIcon("eraser"),i.onClick(async()=>{await this.updateTaskTags(t,r,VA(t.tags,r.settings))})})}}async openTagInput(e,t,r){let a=await Vy(t.app,{title:r==="add"?this.t("contextMenus.task.addTag"):this.t("contextMenus.task.removeTagInput"),placeholder:this.t("contextMenus.task.tagPlaceholder"),confirmText:this.t("common.confirm"),cancelText:this.t("common.cancel"),onInputReady:o=>{new sp(t.app,o,t)}}),i=iC(a);if(i.length===0)return;let s=r==="add"?HA(e.tags,i):sC(e.tags,i);await this.updateTaskTags(e,t,s)}async updateTaskTags(e,t,r){var a,i;try{let s=await t.updateTaskProperty(e,"tags",r);Object.assign(e,s),(i=(a=this.options).onUpdate)==null||i.call(a)}catch(s){tr.error("Failed to update task tags:",{category:"validation",operation:"update-task-tags",error:s}),new De.Notice(this.t("contextMenus.task.notices.updateTagsFailed"))}}async openProjectSelector(e,t){try{new Ys(t.app,t,a=>{a&&this.addTaskToProject(e,t,a)}).open()}catch(r){tr.error("Failed to open project selector:",{category:"persistence",operation:"open-project-selector",error:r}),new De.Notice(this.t("contextMenus.task.organization.notices.projectSelectFailed"))}}async openSubtaskAssignmentSelector(e,t){try{let a=(await t.cacheManager.getAllTasks()).filter(i=>i.path!==e.path);if(a.length===0){new De.Notice(this.t("contextMenus.task.organization.notices.noEligibleSubtasks"));return}fn(t,a,i=>{i&&this.assignTaskAsSubtask(e,t,i)})}catch(r){tr.error("Failed to open subtask assignment selector:",{category:"persistence",operation:"open-subtask-assignment-selector",error:r}),new De.Notice(this.t("contextMenus.task.organization.notices.subtaskSelectFailed"))}}async addTaskToProject(e,t,r){var a,i;try{if(!(r instanceof De.TFile)){new De.Notice(this.t("contextMenus.task.organization.notices.projectSelectFailed"));return}let s=await rv(t,e,r);s&&(Object.assign(e,s),(i=(a=this.options).onUpdate)==null||i.call(a))}catch(s){tr.error("Failed to add task to project:",{category:"persistence",operation:"add-task-project",error:s}),new De.Notice(this.t("contextMenus.task.organization.notices.addToProjectFailed"))}}async assignTaskAsSubtask(e,t,r){var a,i;try{let s=t.app.vault.getAbstractFileByPath(e.path);if(!(s instanceof De.TFile)){new De.Notice(this.t("contextMenus.task.organization.notices.currentTaskNotFound"));return}let o=await lM(t,s,r);o&&(Object.assign(r,o),(i=(a=this.options).onUpdate)==null||i.call(a))}catch(s){tr.error("Failed to assign task as subtask:",{category:"persistence",operation:"assign-task-as-subtask",error:s}),new De.Notice(this.t("contextMenus.task.organization.notices.addAsSubtaskFailed"))}}buildProjectReference(e,t,r){return Qo(r.app,e,t,"","",r.settings.useFrontmatterMarkdownLinks)}updateMainMenuIconColors(e,t){let r=this.targetDoc.querySelector(".menu");if(!r)return;let a=r.querySelectorAll(".menu-item"),i=this.t("contextMenus.task.status"),s=this.t("contextMenus.task.priority");a.forEach(o=>{let l=o.querySelector(".menu-item-title"),c=o.querySelector(".menu-item-icon");if(l&&c){let d=l.textContent;if(d===i){let u=t.settings.customStatuses.find(p=>p.value===e.status);u&&u.color&&(c.style.color=u.color)}else if(d===s){let u=t.settings.customPriorities.find(p=>p.value===e.priority);u&&u.color&&(c.style.color=u.color)}}})}addStatusOptions(e,t,r){this.getStatusOptions(t,r).forEach((i,s)=>{e.addItem(o=>{let l=mv(i.label,i.value),c=l;o.setIcon(i.icon||"circle"),i.value===t.status&&(c=this.t("contextMenus.task.statusSelected",{label:l})),o.setTitle(c),o.onClick(async()=>{var u,p;try{await r.updateTaskProperty(t,"status",i.value),(p=(u=this.options).onUpdate)==null||p.call(u)}catch(m){let f=m instanceof Error?m.message:String(m);tr.error("Error updating task status:",{category:"persistence",operation:"updating-task-status",details:{taskPath:t.path},error:f}),new De.Notice(`Failed to update task status: ${f}`)}});let d=i.color;d&&window.setTimeout(()=>{let u=I2(o);if(u){let p=u.querySelector(".menu-item-icon");p&&(p.style.color=d)}},10)})})}addPriorityOptions(e,t,r){r.priorityManager.getPrioritiesByWeight().forEach(i=>{let s=mv(i.value);if(!s)return;let o=mv(i.label,s);e.addItem(l=>{let c=o;l.setIcon("star"),s===t.priority&&(c=this.t("contextMenus.task.prioritySelected",{label:o})),l.setTitle(c),l.onClick(async()=>{var d,u;try{await r.updateTaskProperty(t,"priority",s),(u=(d=this.options).onUpdate)==null||u.call(d)}catch(p){let m=p instanceof Error?p.message:String(p);tr.error("Error updating task priority:",{category:"persistence",operation:"updating-task-priority",details:{taskPath:t.path},error:m}),new De.Notice(`Failed to update task priority: ${m}`)}}),i.color&&window.setTimeout(()=>{let d=I2(l);if(d){let u=d.querySelector(".menu-item-icon");u&&(u.style.color=i.color)}},10)})})}addDateOptions(e,t,r,a,i={}){let o=new rl({currentValue:t,onSelect:u=>{r(u)},onCustomDate:a,plugin:this.options.plugin,app:this.options.plugin.app}).getDateOptions(),l=o.filter(u=>u.category==="increment");l.length>0&&(l.forEach(u=>{e.addItem(p=>{u.icon&&p.setIcon(u.icon),p.setTitle(u.label),p.onClick(()=>{r(u.value)})})}),e.addSeparator()),o.filter(u=>u.category==="basic").forEach(u=>{e.addItem(p=>{u.icon&&p.setIcon(u.icon);let f=u.value===t?this.t("contextMenus.date.selected",{label:u.label}):u.label;p.setTitle(f),p.onClick(()=>{r(u.value)})})});let d=o.filter(u=>u.category==="weekday");d.length>0&&(e.addSeparator(),e.addItem(u=>{u.setTitle(this.t("contextMenus.date.weekdaysLabel")),u.setIcon("calendar");let p=_n(u);d.forEach(m=>{p.addItem(f=>{let g=m.value===t?this.t("contextMenus.date.selected",{label:m.label}):m.label;f.setTitle(g),f.setIcon("calendar"),f.onClick(()=>{r(m.value)})})})})),e.addSeparator(),e.addItem(u=>{var p;u.setTitle((p=i.pickDateTitle)!=null?p:this.t("contextMenus.date.pickDateTime")),u.setIcon("calendar"),u.onClick(a)}),t&&e.addItem(u=>{u.setTitle(this.t("contextMenus.date.clearDate")),u.setIcon("x"),u.onClick(()=>{r(null)})})}addCustomDateFieldMenuItems(e,t){let r=this.getCustomDateFields(t);r.length!==0&&this.menu.addItem(a=>{a.setTitle(this.t("contextMenus.task.customDates")),a.setIcon("calendar-days");let i=_n(a);r.forEach(s=>{i.addItem(o=>{let l=this.getCustomFieldLabel(s);o.setTitle(l),o.setIcon("calendar");let c=_n(o),d=this.getCustomDateFieldValue(e,s);this.addDateOptions(c,d,async u=>{await this.updateCustomDateField(e,t,s,u)},()=>{this.openCustomDateFieldPicker(e,t,s,d)},{pickDateTitle:this.t("modals.task.userFields.pickDate",{field:l})})})})})}getCustomDateFields(e){return(e.settings.userFields||[]).filter(t=>t.type==="date"&&t.key.trim().length>0)}getCustomFieldLabel(e){return e.displayName.trim()||e.key||e.id}getCustomDateFieldValue(e,t){var i,s;let a=(s=e[t.key])!=null?s:(i=e.customProperties)==null?void 0:i[t.key];return typeof a=="string"&&a.trim().length>0?a:void 0}openCustomDateFieldPicker(e,t,r,a){this.menu.hide();let i=this.getCustomFieldLabel(r);new oo(t.app,{currentDate:a||null,title:this.t("modals.task.userFields.pickDate",{field:i}),showTime:!1,plugin:t,onSelect:o=>{this.updateCustomDateField(e,t,r,o)}}).open()}async updateCustomDateField(e,t,r,a){var s,o;let i=this.getCustomFieldLabel(r);try{let l=await t.updateTaskProperty(e,r.key,a||void 0);Object.assign(e,l),(o=(s=this.options).onUpdate)==null||o.call(s)}catch(l){let c=l instanceof Error?l.message:String(l);tr.error("Error updating custom date field:",{category:"persistence",operation:"updating-custom-date-field",details:{taskPath:e.path,field:r.key},error:c}),new De.Notice(this.t("contextMenus.task.notices.updateCustomDateFailure",{field:i,message:c}))}}addRecurrenceOptions(e,t,r,a){let i=new Date,s=["SU","MO","TU","WE","TH","FR","SA"],o=[a.i18n.translate("common.months.january"),a.i18n.translate("common.months.february"),a.i18n.translate("common.months.march"),a.i18n.translate("common.months.april"),a.i18n.translate("common.months.may"),a.i18n.translate("common.months.june"),a.i18n.translate("common.months.july"),a.i18n.translate("common.months.august"),a.i18n.translate("common.months.september"),a.i18n.translate("common.months.october"),a.i18n.translate("common.months.november"),a.i18n.translate("common.months.december")],l=s[i.getDay()],c=i.getDate(),d=i.getMonth()+1,u=o[i.getMonth()],p=gC(a),m=i.toLocaleDateString(p||void 0,{weekday:"long"}),f=k=>{let T=k.getFullYear(),b=String(k.getMonth()+1).padStart(2,"0"),w=String(k.getDate()).padStart(2,"0");return`${T}${b}${w}`},h=k=>{let T=["th","st","nd","rd"],b=k%100;return k+(T[(b-20)%10]||T[b]||T[0])},g=f(i);[{label:this.t("modals.task.recurrence.daily"),value:`DTSTART:${g};FREQ=DAILY;INTERVAL=1`,icon:"calendar-days"},{label:this.t("modals.task.recurrence.weeklyOn",{days:m}),value:`DTSTART:${g};FREQ=WEEKLY;INTERVAL=1;BYDAY=${l}`,icon:"calendar"},{label:this.t("modals.task.recurrence.everyTwoWeeks"),value:`DTSTART:${g};FREQ=WEEKLY;INTERVAL=2;BYDAY=${l}`,icon:"calendar"},{label:this.t("modals.task.recurrence.monthlyOnOrdinal",{ordinal:h(c)}),value:`DTSTART:${g};FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=${c}`,icon:"calendar-range"},{label:this.t("modals.task.recurrence.everyThreeMonths"),value:`DTSTART:${g};FREQ=MONTHLY;INTERVAL=3;BYMONTHDAY=${c}`,icon:"calendar-range"},{label:this.t("modals.task.recurrence.yearlyOn",{month:u,day:h(c)}),value:`DTSTART:${g};FREQ=YEARLY;INTERVAL=1;BYMONTH=${d};BYMONTHDAY=${c}`,icon:"calendar-clock"},{label:this.t("modals.task.recurrence.weekdays"),value:tM(g,p),icon:"briefcase"}].forEach(k=>{e.addItem(T=>{let b=k.value===t;T.setTitle(b?`✓ ${k.label}`:k.label),T.setIcon(k.icon),T.onClick(()=>{r(k.value)})})}),e.addSeparator(),e.addItem(k=>{k.setTitle(this.t("contextMenus.task.customRecurrence")),k.setIcon("settings"),k.onClick(()=>{new il({currentValue:typeof t=="string"?t:void 0,currentAnchor:this.options.task.recurrence_anchor||"scheduled",scheduledDate:this.options.task.scheduled,onSelect:b=>{r(b)},app:a.app,plugin:a}).showCustomRecurrenceModal()})}),t&&e.addItem(k=>{k.setTitle(this.t("contextMenus.task.clearRecurrence")),k.setIcon("x"),k.onClick(()=>{r(null)})})}addOccurrencePolicyOptions(e,t,r){let a=t.occurrence_materialization||"manual",i=t.occurrence_next_trigger||"completion";e.addSeparator(),e.addItem(s=>{s.setTitle("Occurrence notes"),s.setIcon("files");let o=_n(s),l=(d,u,p)=>{o.addItem(m=>{m.setTitle(a===d?`✓ ${u}`:u),m.setIcon(p),m.onClick(async()=>{await this.updateOccurrenceMaterializationPolicy(t,r,d)})})};if(l("manual","Create manually","file-plus"),l("on_completion","Create next after completion","check-circle"),o.addItem(d=>{d.setTitle(a==="rolling"?"✓ Rolling window (not automated yet)":"Rolling window (not automated yet)"),d.setIcon("calendar-range"),d.setDisabled(!0)}),a!=="on_completion")return;o.addSeparator(),[{value:"completion",label:"Completion only",icon:"check"},{value:"completion_or_skip",label:"Completion or skip",icon:"check-check"}].forEach(d=>{o.addItem(u=>{u.setTitle(i===d.value?`✓ ${d.label}`:d.label),u.setIcon(d.icon),u.onClick(async()=>{await this.updateOccurrenceNextTrigger(t,r,d.value)})})})})}async updateOccurrenceMaterializationPolicy(e,t,r){var a,i;try{let s=await t.updateTaskProperty(e,"occurrence_materialization",r==="manual"?void 0:r);if(Object.assign(e,s),r!=="on_completion"&&e.occurrence_next_trigger){let o=await t.updateTaskProperty(e,"occurrence_next_trigger",void 0);Object.assign(e,o)}(i=(a=this.options).onUpdate)==null||i.call(a),new De.Notice(r==="manual"?"Occurrence notes set to manual creation":"Occurrence notes will be created after completion")}catch(s){let o=s instanceof Error?s.message:String(s);tr.error("Error updating occurrence materialization policy:",{category:"persistence",operation:"updating-occurrence-materialization-policy",details:{taskPath:e.path,mode:r},error:o}),new De.Notice(`Failed to update occurrence notes setting: ${o}`)}}async updateOccurrenceNextTrigger(e,t,r){var a,i;try{let s=await t.updateTaskProperty(e,"occurrence_next_trigger",r==="completion"?void 0:r);Object.assign(e,s),(i=(a=this.options).onUpdate)==null||i.call(a),new De.Notice(r==="completion"?"Next occurrence note will be created after completion":"Next occurrence note will be created after completion or skip")}catch(s){let o=s instanceof Error?s.message:String(s);tr.error("Error updating occurrence next trigger:",{category:"persistence",operation:"updating-occurrence-next-trigger",details:{taskPath:e.path,trigger:r},error:o}),new De.Notice(`Failed to update occurrence trigger: ${o}`)}}getStatusOptions(e,t){let r=t.settings.customStatuses,a=[];return r&&r.length>0&&[...r].sort((s,o)=>s.order-o.order).forEach(s=>{let o=mv(s.value);o&&a.push({label:mv(s.label,o),value:o,color:typeof s.color=="string"?s.color:void 0,icon:typeof s.icon=="string"?s.icon:void 0})}),a}addQuickRemindersSection(e,t,r,a,i){if(!(a==="due"?t.due:t.scheduled)){e.addItem(o=>{o.setTitle(i),o.setIcon("bell"),o.setDisabled(!0)});return}e.addItem(o=>{o.setTitle(i),o.setIcon("bell");let l=_n(o);[{labelKey:"contextMenus.task.quickReminders.atTime",offset:"PT0M"},{labelKey:"contextMenus.task.quickReminders.fiveMinutes",offset:"-PT5M"},{labelKey:"contextMenus.task.quickReminders.fifteenMinutes",offset:"-PT15M"},{labelKey:"contextMenus.task.quickReminders.oneHour",offset:"-PT1H"},{labelKey:"contextMenus.task.quickReminders.oneDay",offset:"-P1D"}].forEach(d=>{l.addItem(u=>{let p=this.t(d.labelKey);u.setTitle(p),u.onClick(()=>{this.addQuickReminder(t,r,a,d.offset,p)})})})})}async addQuickReminder(e,t,r,a,i){var l,c;let s={id:`rem_${Date.now()}`,type:"relative",relatedTo:r,offset:a,description:i},o=[...e.reminders||[],s];try{await t.updateTaskProperty(e,"reminders",o),(c=(l=this.options).onUpdate)==null||c.call(l)}catch(d){tr.error("Error adding reminder:",{category:"persistence",operation:"adding-reminder",error:d}),new De.Notice("Failed to add reminder")}}show(e){var t,r;(r=(t=e.target)==null?void 0:t.instanceOf)!=null&&r.call(t,HTMLElement)&&(this.targetDoc=e.target.ownerDocument),za(this.menu,e)}showAtElement(e){this.targetDoc=e.ownerDocument,jl(this.menu,e)}}});function rHe(n,e,t){return n.i18n.translate(`ui.taskCard.${e}`,t)}function nHe(n){return M({tag:"TaskCard/ContextMenu",isDebugEnabled:()=>n.settings.enableDebugLogging})}function Mce(n){let{mainRow:e,taskPath:t,plugin:r,targetDate:a,promoteOccurrenceControls:i}=n,s=rHe(r,"taskOptions"),o=e.createDiv({cls:"task-card__context-menu",attr:{"aria-label":s}});return(0,nc.setIcon)(o,"ellipsis-vertical"),(0,nc.setTooltip)(o,s,{placement:"top"}),al(o),o.addEventListener("click",l=>{if(l.stopPropagation(),l.preventDefault(),i===void 0){uo(l,t,r,a);return}uo(l,t,r,a,{promoteOccurrenceControls:i})}),o}async function uo(n,e,t,r,a={}){let i=t.app.vault.getAbstractFileByPath(e),s=()=>{i instanceof nc.TFile&&aHe(n,i,t)};try{let o=await t.cacheManager.getTaskInfo(e);if(!o){s();return}new ll({task:o,plugin:t,targetDate:r,occurrenceDate:a.occurrenceDate,promoteOccurrenceControls:a.promoteOccurrenceControls,onUpdate:()=>{t.app.workspace.trigger("tasknotes:refresh-views")}}).show(n)}catch(o){let l=o instanceof Error?o.message:String(o);nHe(t).error("Error creating context menu",{category:"internal",operation:"create-context-menu",details:{taskPath:e,errorMessage:l},error:o}),new nc.Notice(`Failed to create context menu: ${l}`),s()}}function aHe(n,e,t){var i,s;let r=new nc.Menu,a=!1;try{t.app.workspace.trigger("file-menu",r,e,"tasknotes-bases-view"),a=((s=(i=r.items)==null?void 0:i.length)!=null?s:0)>0}catch(o){a=!1}a||(r.addItem(o=>{o.setTitle("Open"),o.setIcon("file-text"),o.onClick(()=>{t.app.workspace.getLeaf(!1).openFile(e)})}),r.addItem(o=>{o.setTitle("Open in new tab"),o.setIcon("external-link"),o.onClick(()=>{t.app.workspace.openLinkText(e.path,"",!0)})})),r.showAtMouseEvent(n)}var nc,N2=y(()=>{nc=require("obsidian");DC();q();mC()});function iHe(n,e){return Y(e).trim()||Y(n.title)}function Ice(n,e,t,r){n.empty();let a={metadataCache:t.app.metadataCache,workspace:t.app.workspace,sourcePath:e.path};Zl(n,iHe(e,r),a)}function R2(n,e){let t=n.querySelector(".task-card__title"),r=n.querySelector(".task-card__title-text");t==null||t.classList.toggle("completed",e),r==null||r.classList.toggle("completed",e)}function Nce(n){let{contentContainer:e,layout:t,task:r,plugin:a,displayText:i,isCompleted:s=!1}=n,o=e.createEl(t==="inline"?"span":"div",{cls:"task-card__title"}),l=o.createSpan({cls:"task-card__title-text"});return Ice(l,r,a,i),o.classList.toggle("completed",s),l.classList.toggle("completed",s),{titleEl:o,titleTextEl:l}}function Rce(n){let{card:e,task:t,plugin:r,displayText:a,isCompleted:i=!1}=n,s=e.querySelector(".task-card__title-text");s&&Ice(s,t,r,a),R2(e,i)}var _2=y(()=>{dr();cp()});function sHe(n,e,t,r,a){var o;n.classList.toggle("task-card--completed",r),n.classList.toggle("task-card--completed-strikethrough",r&&i2(t)),n.classList.toggle("task-card--archived",!!e.archived),n.classList.toggle("task-card--actively-tracked",t.getActiveTimeSession(e)!==null),n.classList.toggle("task-card--recurring",!!e.recurrence),n.classList.toggle("task-card--chevron-left",((o=t.settings)==null?void 0:o.subtaskChevronPosition)==="left");let i=a2(e,t);n.classList.toggle("task-card--has-details",i),n.dataset.hasDetails=i?"true":"false",F2(n,"task-card--priority-"),e.priority&&n.classList.add(`task-card--priority-${Dd(e.priority)}`),F2(n,"task-card--status-"),a&&n.classList.add(`task-card--status-${Dd(a)}`),F2(n,"task-card--project-");let s=s2(e);n.classList.toggle("task-card--has-projects",s.length>0),s.forEach(l=>n.classList.add(l)),n.dataset.status=a,R2(n,r)}function L2({card:n,statusDot:e,plugin:t,updatedTask:r,effectiveStatus:a,isCompleted:i}){sM(e,t.statusManager.getStatusConfig(a)),iM(n,a,t);let s=n.querySelector(".task-card__checkbox");s&&(s.checked=i),sHe(n,r,t,i,a)}function F2(n,e){for(let t of Array.from(n.classList))t.startsWith(e)&&n.classList.remove(t)}var _ce=y(()=>{yt();l2();n2();_2()});async function Fce(n,e){return new Promise((t,r)=>{new O2(e.app,n,async()=>{try{await e.taskService.deleteTask(n),t()}catch(i){r(i instanceof Error?i:new Error(String(i)))}}).open()})}var PC,oHe,O2,Lce=y(()=>{PC=require("obsidian");q();oHe=M({tag:"Ui/TaskCardDeletion"}),O2=class extends PC.Modal{constructor(e,t,r){super(e),this.task=t,this.onConfirm=r}onOpen(){let{contentEl:e}=this;e.empty(),e.createEl("h2",{text:"Delete task"});let t=e.createEl("p");t.appendText('Are you sure you want to delete the task "'),t.createEl("strong",{text:this.task.title}),t.appendText('"?'),e.createEl("p",{cls:"mod-warning",text:"This action cannot be undone. The task file will be permanently deleted."});let r=e.createDiv({cls:"modal-button-container"});r.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),r.classList.add("tn-static-display-flex-75816cae"),r.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),r.classList.add("tn-static-gap-10px-f3d7ce77"),r.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),r.classList.add("tn-static-justify-content-flex-end-455f8cca"),r.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),r.classList.add("tn-static-margin-top-20px-a26bda7d");let a=r.createEl("button",{text:"Cancel"});a.addEventListener("click",()=>{this.close()});let i=r.createEl("button",{text:"Delete",cls:"mod-warning"});i.classList.remove("tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-text-accent-a954c70f"),i.classList.add("tn-static-background-color-var-color-red-134bc721"),i.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),i.classList.add("tn-static-color-white-0a43e56a"),i.addEventListener("click",()=>{(async()=>{try{await this.onConfirm(),this.close(),new PC.Notice("Task deleted successfully")}catch(s){let o=s instanceof Error?s.message:String(s);new PC.Notice(`Failed to delete task: ${o}`),oHe.error("Error in delete confirmation:",{category:"persistence",operation:"delete-confirmation",error:s})}})()}),a.focus()}onClose(){let{contentEl:e}=this;e.empty()}}});var fv={};Xe(fv,{DEFAULT_TASK_CARD_OPTIONS:()=>z2,cleanupTaskCard:()=>dHe,createTaskCard:()=>pr,refreshParentTaskSubtasks:()=>uHe,showDeleteConfirmationModal:()=>Fce,showTaskContextMenu:()=>uo,toggleBlockedByTasks:()=>jce,toggleBlockingTasks:()=>Bce,toggleSubtasks:()=>zce,updateTaskCard:()=>cHe});function lHe(n){var e;return(e=n._taskCardOptions)!=null?e:{}}function wM(n){return{plugin:n,getRelationshipOptions:lHe,renderTaskCard:(e,t)=>pr(e,n,void 0,t)}}function Oce(n){return{toggleSubtasks:(e,t,r)=>zce(e,t,n,r),toggleBlockingTasks:(e,t,r)=>Bce(e,t,n,r),toggleBlockedByTasks:(e,t,r)=>jce(e,t,n,r)}}function pr(n,e,t,r={}){let a={...z2,...r},i=o2(n,e,a),{targetDate:s,effectiveStatus:o,layout:l,isCompleted:c,hasDetails:d}=i,u=activeWindow.createEl(l==="inline"?"span":"div"),p=u;p._taskPath=n.path,p._taskCardOptions=a,u.className=i.cardClasses.join(" "),u.dataset.taskPath=n.path,u.dataset.key=n.path,u.dataset.status=o,n.priority?u.dataset.priority=n.priority:delete u.dataset.priority,u.dataset.hasDetails=d?"true":"false";let m=u.createEl(l==="inline"?"span":"div",{cls:"task-card__main-row"});e2(u,n,e),t2({mainRow:m,card:u,task:n,plugin:e,effectiveStatus:o,visibleProperties:t,hideStatusIndicator:a.hideStatusIndicator,onClick:z$({task:n,plugin:e,targetDate:s,updateStatusVisuals:(S,C,x)=>{let E=u.querySelector(".task-card__status-dot");E&&L2({card:u,statusDot:E,plugin:e,updatedTask:S,effectiveStatus:C,isCompleted:x})}})}),r2({mainRow:m,task:n,plugin:e,visibleProperties:t,onClick:B$(n,e)});let f=m.createEl(l==="inline"?"span":"div",{cls:"task-card__content"}),h=l!=="inline"?m.createDiv({cls:"task-card__badges"}):null,g=Oce(e);Jle({card:u,badgesContainer:h,task:n,plugin:e,hasDetails:d,propertyOptions:a,handlers:g}),Mce({mainRow:m,taskPath:n.path,plugin:e,targetDate:s,promoteOccurrenceControls:a.promoteOccurrenceControlsInContextMenu}),Nce({contentContainer:f,layout:l,task:n,plugin:e,displayText:a.displayText,isCompleted:c});let v=f.createEl(l==="inline"?"span":"div",{cls:"task-card__metadata"});J$({metadataLine:v,card:u,task:n,plugin:e,visibleProperties:t,propertyOptions:a,handlers:g});let{clickHandler:k,auxclickHandler:T,dblclickHandler:b,contextmenuHandler:w}=fre({task:n,plugin:e,navigationSubpath:a.navigationSubpath,contextMenuHandler:S=>{let C=u.dataset.taskPath;if(C){if(a.promoteOccurrenceControlsInContextMenu===void 0){uo(S,C,e,s);return}uo(S,C,e,s,{promoteOccurrenceControls:a.promoteOccurrenceControlsInContextMenu})}},createBatchContextMenu:(S,C)=>new Gy({plugin:e,selectedPaths:S,onUpdate:C})});return u.addEventListener("click",k),u.addEventListener("auxclick",T),u.addEventListener("dblclick",b),u.addEventListener("contextmenu",w),a.enableHoverPreview&&u.addEventListener("mouseover",hre(n,e)),u}function cHe(n,e,t,r,a={}){let i={...z2,...a},s=o2(e,t,i),{targetDate:o,effectiveStatus:l,isCompleted:c,hasDetails:d}=s;n.className=s.cardClasses.join(" "),n.dataset.status=l,e.priority?n.dataset.priority=e.priority:delete n.dataset.priority,n.dataset.hasDetails=d?"true":"false";let u=n.querySelector(".task-card__main-row");e2(n,e,t);let p=n.querySelector(".task-card__checkbox");p&&(p.checked=t.statusManager.isCompletedStatus(l)),ace({mainRow:u,card:n,task:e,plugin:t,effectiveStatus:l,visibleProperties:r,hideStatusIndicator:i.hideStatusIndicator,onClick:z$({task:e,plugin:t,targetDate:o,updateStatusVisuals:(g,v,k)=>{let T=n.querySelector(".task-card__status-dot");T&&L2({card:n,statusDot:T,plugin:t,updatedTask:g,effectiveStatus:v,isCompleted:k})}})}),sce({mainRow:u,task:e,plugin:t,visibleProperties:r,onClick:B$(e,t)});let m=Oce(t);Xle({card:n,mainRow:u,task:e,plugin:t,hasDetails:d,propertyOptions:i,handlers:m}),Rce({card:n,task:e,plugin:t,displayText:i.displayText,isCompleted:c});let f=n.querySelector(".task-card__badge--blocked");f&&f.remove();let h=n.querySelector(".task-card__metadata");h&&J$({metadataLine:h,card:n,task:e,plugin:t,visibleProperties:r,propertyOptions:i,handlers:m})}function dHe(n){Ule(n)}async function zce(n,e,t,r){await q$(wM(t),n,e,r)}async function Bce(n,e,t,r){await Vle(wM(t),n,e,r)}async function jce(n,e,t,r){await Wle(wM(t),n,e,r)}async function uHe(n,e,t){await qle(wM(e),n,t)}var z2,Ua=y(()=>{oB();w$();ece();G$();U$();n2();l2();Q$();N2();_2();_ce();Lce();N2();z2={layout:"default",showSecondaryBadges:!0,enableHoverPreview:!0}});function B2({plugin:n,sourcePath:e},t){return{dependency:{uid:Ks(n.app,e,t.path,n.settings.useFrontmatterMarkdownLinks),reltype:Pi},path:t.path,name:t.basename}}function $ce({plugin:n,sourcePath:e},t){var s;let r=Ai(t);if(!r){let o=typeof t=="object"&&t&&"uid"in t&&typeof t.uid=="string"?t.uid:Y(t);return{dependency:{uid:o,reltype:Pi},name:o,unresolved:!0}}let a=Jo(n.app,e,r);if(a){let o=((s=a.file)==null?void 0:s.basename)||a.path.split("/").pop()||r.uid;return{dependency:r,path:a.path,name:o}}let i=r.uid.replace(/^\[\[/,"").replace(/\]\]$/,"");return{dependency:r,name:i||t.uid,unresolved:!0}}function Uce({plugin:n,sourcePath:e},t){let r=n.app.vault.getAbstractFileByPath(t);if(r instanceof AC.TFile)return B2({plugin:n,sourcePath:e},r);let i=(t.split("/").pop()||t).replace(/\.md$/i,"");return{dependency:{uid:`[[${i}]]`,reltype:Pi},path:t,name:i,unresolved:!0}}function pHe(n,e){return n.some(t=>t.dependency.uid===e.dependency.uid||!!e.path&&t.path===e.path)}function j2(n,e){return pHe(n,e)?[...n]:[...n,e]}function $2(n,e){return n.filter((t,r)=>r!==e)}async function Hce({plugin:n,listEl:e,items:t,linkServices:r,translate:a,onRemove:i}){if(e&&(e.empty(),t.length!==0))for(let[s,o]of t.entries()){let l=!!(o.path&&!o.unresolved),c=e.createDiv({cls:l?"task-project-item task-project-item--task-card":"task-project-item"});o.unresolved&&(c.addClass("task-project-item--unresolved"),(0,AC.setTooltip)(c,a("contextMenus.task.dependencies.notices.unresolved",{entries:o.dependency.uid}),{placement:"top"}));let d=c.createDiv({cls:l?"task-project-card-host":"task-project-info"});o.path&&!o.unresolved?await mHe(n,d,o,r):fHe(d,o);let u=c.createEl("button",{cls:"task-project-remove",text:"×"});(0,AC.setTooltip)(u,a("modals.task.dependencies.removeTaskTooltip"),{placement:"top"}),u.addEventListener("click",p=>{p.preventDefault(),p.stopPropagation(),i(s)})}}async function mHe(n,e,t,r){if(!t.path)return;let a=await n.cacheManager.getCachedTaskInfo(t.path);if(a){let s=pr(a,n,void 0,{layout:"default",showSecondaryBadges:!1,enableHoverPreview:!1});e.appendChild(s);return}let i=e.createSpan({cls:"task-project-name clickable-dependency"});nl(i,t.path,t.name,r,{cssClass:"task-dependency-link internal-link",hoverSource:"tasknotes-dependency-link",showErrorNotices:!0}),t.path!==t.name&&e.createDiv({cls:"task-project-path",text:t.path})}function fHe(n,e){var a;let t=n.createSpan({cls:"task-project-name"});t.textContent=e.name;let r=(a=e.path)!=null?a:e.dependency.uid;n.createDiv({cls:"task-project-path",text:r})}function Vce(n,e,t){return Ks(n.app,e,t.path,n.settings.useFrontmatterMarkdownLinks)}function Wce({plugin:n,sourcePath:e,allTasks:t,existingItems:r,currentPath:a}){let i=new Set(r.map(s=>s.dependency.uid));return t.filter(s=>{if(a&&s.path===a)return!1;let o=Vce(n,e,s);return!i.has(o)})}function qce({plugin:n,sourcePath:e,allTasks:t,existingItems:r,currentPath:a}){let i=new Set(r.map(o=>o.path).filter(o=>typeof o=="string")),s=new Set(r.map(o=>o.dependency.uid));return t.filter(o=>{if(a&&o.path===a||i.has(o.path))return!1;let l=Vce(n,e,o);return!s.has(l)})}var AC,Gce=y(()=>{AC=require("obsidian");Zs();cp();Ua();dr()});function hHe(n){return parseInt(n)||0}function Yce(n,e){let t=null,r=new SM.Setting(e.container);if(r.settingEl.addClass("tn-task-modal__wide-text-setting"),r.setName(n.translate("modals.task.contextsLabel")).addText(a=>{a.setPlaceholder(n.translate("modals.task.contextsPlaceholder")).setValue(e.value).onChange(e.onChange),t=a.inputEl,n.attachMobileKeyboardScrollGuard(a.inputEl),new BA(n.app,a.inputEl,n.plugin)}),!t)throw new Error("Failed to create contexts input");return t}function Kce(n,e){let t=null,r=new SM.Setting(e.container);if(r.settingEl.addClass("tn-task-modal__wide-text-setting"),r.setName(n.translate("modals.task.tagsLabel")).addText(a=>{a.setPlaceholder(n.translate("modals.task.tagsPlaceholder")).setValue(e.value).onChange(i=>{e.onChange(ha(i))}),t=a.inputEl,n.attachMobileKeyboardScrollGuard(a.inputEl),new sp(n.app,a.inputEl,n.plugin)}),!t)throw new Error("Failed to create tags input");return t}function Zce(n,e){let t=null;if(new SM.Setting(e.container).setName(n.translate("modals.task.timeEstimateLabel")).addText(r=>{r.setPlaceholder(n.translate("modals.task.timeEstimatePlaceholder")).setValue(e.value.toString()).onChange(a=>{e.onChange(hHe(a))}),t=r.inputEl,n.attachMobileKeyboardScrollGuard(r.inputEl)}),!t)throw new Error("Failed to create time estimate input");return t}var SM,Qce=y(()=>{SM=require("obsidian");yt();aC()});function vp(n){return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):Array.isArray(n)?n.map(vp).join(", "):""}function Xce(n){return Array.isArray(n)?n.map(vp).join(", "):vp(n)}function U2(n){return n.split(",").map(e=>e.trim()).filter(e=>e.length>0)}function ede(n){let e=U2(n);return e.length>0?e:null}function H2(n){let e=parseFloat(n);return isNaN(e)?null:e}function CM(n){return n||null}function V2(n){return n===!0||n==="true"}function tde(n){let e={};for(let[t,r]of Object.entries(n))r!=null&&r!==""&&(e[t]=r);return e}function rde(n,e,t){let r={};for(let a of t){if(!(a!=null&&a.key))continue;let i=n[a.key],s=e[a.key];gHe(i,s)&&(r[a.key]=i==null||i===""?null:i)}return r}function gHe(n,e){let t=Jce(n),r=Jce(e);return Array.isArray(t)||Array.isArray(r)?JSON.stringify(t)!==JSON.stringify(r):t!==r}function Jce(n){return n==null||n===""?null:n}var xM=y(()=>{});function nde(n,e){let{container:t,field:r,values:a,inputRefs:i,toggleRefs:s,onValueChange:o}=e,l=new qd.Setting(t).setName(r.displayName);switch(r.type){case"text":case"list":{l.addText(c=>{let d=a[r.key],u=Array.isArray(d)?d.map(vp).join(", "):vp(d);c.setValue(u).onChange(p=>{o(r.key,r.type==="list"?U2(p):p)}),Yf(n,i,r,c.inputEl)});break}case"number":{l.addText(c=>{let d=a[r.key];c.setValue(vp(d)).onChange(u=>{o(r.key,H2(u))}),c.inputEl.type="number",Yf(n,i,r,c.inputEl,{attachSuggest:!1})});break}case"date":{l.addText(c=>{let d=a[r.key];c.setValue(vp(d)).onChange(u=>{o(r.key,u)}),c.inputEl.type="date",ql(c.inputEl,{onCommit:u=>{o(r.key,u)}}),Yf(n,i,r,c.inputEl,{attachSuggest:!1})});break}case"boolean":{l.addToggle(c=>{let d=a[r.key];c.setValue(d===!0).onChange(u=>{o(r.key,u)}),s.set(r.key,c)});break}}}function ade(n,e){let{container:t,fields:r}=e;r.length>0&&t.createDiv({cls:"tn-task-modal__user-fields"}).createDiv({text:n.translate("modals.task.customFieldsLabel"),cls:"tn-task-modal__section-label"});for(let a of r)!a||!a.key||!a.displayName||yHe(n,e,a)}function ide(n){for(let e of n.fields){let t=n.values[e.key],r=n.inputRefs.get(e.key);r&&(r.value=Xce(t));let a=n.toggleRefs.get(e.key);a&&a.setValue(V2(t))}}function yHe(n,e,t){let r=e.values[t.key]||"";switch(t.type){case"boolean":new qd.Setting(e.container).setName(t.displayName).addToggle(a=>{a.setValue(V2(r)).onChange(i=>{e.onValueChange(t.key,i)}),e.toggleRefs.set(t.key,a)});break;case"number":new qd.Setting(e.container).setName(t.displayName).addText(a=>{a.setPlaceholder(n.translate("modals.task.userFields.numberPlaceholder")).setValue(r?Y(r):"").onChange(i=>{e.onValueChange(t.key,H2(i))}),Yf(n,e.inputRefs,t,a.inputEl,{attachSuggest:!1})});break;case"date":vHe(n,e,t,r);break;case"list":new qd.Setting(e.container).setName(t.displayName).addText(a=>{var o;let i=Array.isArray(r)?r.join(", "):r?Y(r):"";a.setPlaceholder(n.translate("modals.task.userFields.listPlaceholder")).setValue(i).onChange(l=>{e.onValueChange(t.key,ede(l))}),Yf(n,e.inputRefs,t,a.inputEl);let s=e.container.querySelector(".user-field-link-preview");s&&((o=s.detach)==null||o.call(s))});break;case"text":default:new qd.Setting(e.container).setName(t.displayName).addText(a=>{a.setPlaceholder(n.translate("modals.task.userFields.textPlaceholder",{field:t.displayName})).setValue(r?Y(r):"").onChange(i=>{e.onValueChange(t.key,CM(i))}),Yf(n,e.inputRefs,t,a.inputEl)});break}}function vHe(n,e,t,r){new qd.Setting(e.container).setName(t.displayName).addText(a=>{a.setPlaceholder(n.translate("modals.task.userFields.datePlaceholder")).setValue(r?Y(r):"").onChange(o=>{e.onValueChange(t.key,CM(o))}),Yf(n,e.inputRefs,t,a.inputEl,{attachSuggest:!1});let i=a.inputEl.parentElement;i&&i.addClass("tn-date-control"),ql(a.inputEl,{onCommit:o=>{e.onValueChange(t.key,o)}});let s=i==null?void 0:i.createEl("button",{cls:"user-field-date-picker-btn"});s&&(s.setAttribute("aria-label",n.translate("modals.task.userFields.pickDate",{field:t.displayName})),(0,qd.setIcon)(s,"calendar"),s.addEventListener("click",o=>{o.preventDefault(),new oo(n.app,{currentDate:kHe(a)||null,title:n.translate("modals.task.userFields.pickDate",{field:t.displayName}),showTime:!1,plugin:n.plugin,onSelect:c=>{a.setValue(c||""),e.onValueChange(t.key,CM(c))}}).open()}))})}function Yf(n,e,t,r,a={}){e.set(t.key,r),n.attachMobileKeyboardScrollGuard(r),a.attachSuggest!==!1&&new jA(n.app,r,n.plugin,t)}function kHe(n){return typeof n.getValue=="function"?n.getValue():n.inputEl.value}var qd,sde=y(()=>{qd=require("obsidian");$y();rC();dr();aC();xM()});function EM(n,e){var i;let t=e.container.createDiv("modal-button-container tn-task-modal__button-bar");for(let s of(i=e.leadingButtons)!=null?i:[])t.createEl("button",{cls:s.className,text:s.text}).addEventListener("click",s.onClick);let r=t.createEl("button",{cls:"mod-cta",text:n.translate("modals.task.buttons.save")});return r.addEventListener("click",()=>{THe(r,e.onSave,e.onSaved)}),t.createEl("button",{text:n.translate("common.cancel")}).addEventListener("click",e.onCancel),t}async function THe(n,e,t){n.disabled=!0;try{await e(),t()}finally{n.disabled=!1}}var W2=y(()=>{});function q2(n,e){let t=n.createDiv("action-icon");t.setAttribute("aria-label",e.tooltip),t.setAttribute("data-initial-tooltip",e.tooltip),t.setAttribute("tabindex","0"),t.setAttribute("role","button"),e.dataType&&t.setAttribute("data-type",e.dataType),(0,DM.setTooltip)(t,e.tooltip,{placement:"top"});let r=t.createSpan("icon");(0,DM.setIcon)(r,e.iconName);let a=i=>{i.preventDefault(),i.stopPropagation(),e.onClick(t,i)};return t.addEventListener("click",a),t.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&a(i)}),t}function ode(n,e){return e.map(t=>q2(n,t))}var DM,lde=y(()=>{DM=require("obsidian")});function dde(n,e,t){n&&(cde(n,e,"due-date",t.dueDate,{activeTooltipKey:"modals.task.tooltips.dueValue",defaultTooltipKey:"modals.task.actions.due"}),cde(n,e,"scheduled-date",t.scheduledDate,{activeTooltipKey:"modals.task.tooltips.scheduledValue",defaultTooltipKey:"modals.task.actions.scheduled"}),wHe(n,e,t),SHe(n,e,t),CHe(n,e,t),xHe(n,e,t.reminderCount))}function cde(n,e,t,r,a){let i=MC(n,t);if(i){if(r){i.classList.add("has-value"),(0,Gd.setTooltip)(i,e.translate(a.activeTooltipKey,{value:r}),{placement:"top"});return}i.classList.remove("has-value"),(0,Gd.setTooltip)(i,e.translate(a.defaultTooltipKey),{placement:"top"})}}function wHe(n,e,t){let r=MC(n,"status");if(!r)return;let a=t.statusConfigs.find(s=>s.value===t.status),i=a?a.label:t.status;ude(r,e,{isActive:!!(t.status&&a&&a.value!==t.defaultStatus),activeTooltipKey:"modals.task.tooltips.statusValue",defaultTooltipKey:"modals.task.actions.status",label:i,color:a==null?void 0:a.color})}function SHe(n,e,t){let r=MC(n,"priority");if(!r)return;let a=t.priorityConfigs.find(s=>s.value===t.priority),i=a?a.label:t.priority;ude(r,e,{isActive:!!(t.priority&&a&&a.value!==t.defaultPriority),activeTooltipKey:"modals.task.tooltips.priorityValue",defaultTooltipKey:"modals.task.actions.priority",label:i,color:a==null?void 0:a.color})}function ude(n,e,t){t.isActive?(n.classList.add("has-value"),(0,Gd.setTooltip)(n,e.translate(t.activeTooltipKey,{value:t.label}),{placement:"top"})):(n.classList.remove("has-value"),(0,Gd.setTooltip)(n,e.translate(t.defaultTooltipKey),{placement:"top"}));let r=n.querySelector(".icon");if(r){if(t.color){r.style.color=t.color;return}r.classList.remove(...bHe),r.style.removeProperty("color")}}function CHe(n,e,t){let r=MC(n,"recurrence");if(r){if(t.recurrenceRule.trim()){r.classList.add("has-value"),(0,Gd.setTooltip)(r,e.translate("modals.task.tooltips.recurrenceValue",{value:t.recurrenceDisplayText}),{placement:"top"});return}r.classList.remove("has-value"),(0,Gd.setTooltip)(r,e.translate("modals.task.actions.recurrence"),{placement:"top"})}}function xHe(n,e,t){let r=MC(n,"reminders");if(r){if(t>0){r.classList.add("has-value");let a=t===1?e.translate("modals.task.tooltips.remindersSingle"):e.translate("modals.task.tooltips.remindersPlural",{count:t});(0,Gd.setTooltip)(r,a,{placement:"top"});return}r.classList.remove("has-value"),(0,Gd.setTooltip)(r,e.translate("modals.task.actions.reminders"),{placement:"top"})}}function MC(n,e){return n.querySelector(`[data-type="${e}"]`)}var Gd,bHe,pde=y(()=>{Gd=require("obsidian"),bHe=["tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"]});function mde(n){return!n||n.length===0?"open":[...n].sort((t,r)=>t.order-r.order)[0].value}function fde(n){return!n||n.length===0?"normal":[...n].sort((t,r)=>t.weight-r.weight)[0].value}function hde(n){return n?n.includes("FREQ=DAILY")?"Daily":n.includes("FREQ=WEEKLY")?PHe(n):n.includes("FREQ=MONTHLY")?AHe(n):n.includes("FREQ=YEARLY")?MHe(n):`Custom${IHe(n)}`:""}function gde(n){let e=["th","st","nd","rd"],t=n%100;return n+(e[(t-20)%10]||e[t]||e[0])}function PHe(n){if(n.includes("INTERVAL=2"))return"Every 2 weeks";if(n.includes("BYDAY=MO,TU,WE,TH,FR"))return"Weekdays";if(!n.includes("BYDAY="))return"Weekly";let e=n.match(/BYDAY=([A-Z]{2})/);return e?`Weekly on ${EHe[e[1]]||e[1]}`:"Weekly"}function AHe(n){if(n.includes("INTERVAL=3"))return"Every 3 months";if(n.includes("BYMONTHDAY=")){let e=n.match(/BYMONTHDAY=(\d+)/);return e?`Monthly on the ${gde(Number.parseInt(e[1],10))}`:"Monthly"}return n.includes("BYDAY=")?"Monthly (by weekday)":"Monthly"}function MHe(n){if(n.includes("BYMONTH=")&&n.includes("BYMONTHDAY=")){let e=n.match(/BYMONTH=(\d+)/),t=n.match(/BYMONTHDAY=(\d+)/);if(e&&t){let r=DHe[Number.parseInt(e[1],10)],a=gde(Number.parseInt(t[1],10));return`Yearly on ${r} ${a}`}}return"Yearly"}function IHe(n){if(n.includes("COUNT=")){let e=n.match(/COUNT=(\d+)/);return e?` (${e[1]} times)`:""}if(n.includes("UNTIL=")){let e=n.match(/UNTIL=(\d{8})/);if(e){let t=e[1];return` (until ${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)})`}}return""}var EHe,DHe,yde=y(()=>{EHe={SU:"Sunday",MO:"Monday",TU:"Tuesday",WE:"Wednesday",TH:"Thursday",FR:"Friday",SA:"Saturday"},DHe=["","January","February","March","April","May","June","July","August","September","October","November","December"]});function vde(n){return{title:n.title,status:n.status,priority:n.priority,dueDate:n.dueDate,scheduledDate:n.scheduledDate,recurrenceRule:n.recurrenceRule,recurrenceAnchor:n.recurrenceAnchor,reminders:n.reminders||[]}}function kde(n){return{app:n.app,plugin:n.plugin,translate:n.translate,getState:n.getState,setDate:(e,t)=>{if(e==="due"){n.setDueDate(t);return}n.setScheduledDate(t)},setStatus:n.setStatus,setPriority:n.setPriority,setRecurrence:(e,t)=>{n.setRecurrenceRule(e),t!==void 0&&n.setRecurrenceAnchor(t)},setReminders:n.setReminders,onChange:n.onChange}}function Tde(n,e){let t=e.statusConfigs||[],r=e.priorityConfigs||[];return{dueDate:n.dueDate,scheduledDate:n.scheduledDate,status:n.status,priority:n.priority,recurrenceRule:n.recurrenceRule,recurrenceDisplayText:hde(n.recurrenceRule),reminderCount:n.reminders.length,defaultStatus:mde(t),defaultPriority:fde(r),statusConfigs:t,priorityConfigs:r}}var bde=y(()=>{yde()});var PM,wde=y(()=>{Jy();Md();Id();PM=class{constructor(e,t,r,a){this.plugin=e,this.task=t,this.triggerElement=r,this.onUpdate=a}show(e){let t=new ra;this.addQuickRemindersSection(t,"due",this.plugin.i18n.translate("components.reminderContextMenu.remindBeforeDue")),this.addQuickRemindersSection(t,"scheduled",this.plugin.i18n.translate("components.reminderContextMenu.remindBeforeScheduled")),t.addSeparator(),t.addItem(r=>{r.setTitle(this.plugin.i18n.translate("components.reminderContextMenu.manageAllReminders")).setIcon("settings").onClick(()=>{this.openReminderModal()})}),this.task.reminders&&this.task.reminders.length>0&&t.addItem(r=>{r.setTitle(this.plugin.i18n.translate("components.reminderContextMenu.clearAllReminders")).setIcon("trash").onClick(async()=>{await this.clearAllReminders()})}),za(t,e)}addQuickRemindersSection(e,t,r){if(!(t==="due"?this.task.due:this.task.scheduled)){e.addItem(i=>{i.setTitle(r).setIcon("bell").setDisabled(!0)});return}e.addItem(i=>{i.setTitle(r),i.setIcon("bell"),this.addQuickReminderSubmenu(i.setSubmenu(),t)})}addQuickReminderSubmenu(e,t){[{label:this.plugin.i18n.translate("components.reminderContextMenu.quickReminders.atTime"),offset:"PT0M"},{label:this.plugin.i18n.translate("components.reminderContextMenu.quickReminders.fiveMinutesBefore"),offset:"-PT5M"},{label:this.plugin.i18n.translate("components.reminderContextMenu.quickReminders.fifteenMinutesBefore"),offset:"-PT15M"},{label:this.plugin.i18n.translate("components.reminderContextMenu.quickReminders.oneHourBefore"),offset:"-PT1H"},{label:this.plugin.i18n.translate("components.reminderContextMenu.quickReminders.oneDayBefore"),offset:"-P1D"}].forEach(a=>{e.addItem(i=>{i.setTitle(a.label).onClick(async()=>{await this.addQuickReminder(t,a.offset,a.label)})})})}async addQuickReminder(e,t,r){let a={id:`rem_${Date.now()}`,type:"relative",relatedTo:e,offset:t,description:r},i=[...this.task.reminders||[],a];await this.saveReminders(i)}async clearAllReminders(){await this.saveReminders([])}async saveReminders(e){let t;if(this.task.path&&this.task.path.trim()!==""){let r=await this.plugin.cacheManager.getTaskInfo(this.task.path);r?(t={...r,reminders:e},await this.plugin.taskService.updateProperty(t,"reminders",e)):t={...this.task,reminders:e}}else t={...this.task,reminders:e};this.onUpdate(t)}openReminderModal(){new sl(this.plugin.app,this.plugin,this.task,t=>{this.saveReminders(t)}).open()}}});var AM,Sde=y(()=>{Md();Id();AM=class{constructor(e){this.targetDoc=activeDocument;this.menu=new ra,this.options=e,this.buildMenu()}buildMenu(){this.getStatusOptions().forEach((t,r)=>{this.menu.addItem(a=>{let i=t.label;a.setIcon(t.icon||"circle"),t.value===this.options.currentValue&&(i=`✓ ${t.label}`),a.setTitle(i),a.onClick(async()=>{this.options.onSelect(t.value)})})})}getStatusOptions(){let e=this.options.plugin.settings.customStatuses,t=[];return e&&e.length>0&&[...e].sort((a,i)=>a.order-i.order).forEach(a=>{t.push({label:a.label,value:a.value,color:a.color,icon:a.icon})}),t}capitalizeFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}show(e){var t,r;(r=(t=e.target)==null?void 0:t.instanceOf)!=null&&r.call(t,HTMLElement)&&(this.targetDoc=e.target.ownerDocument),za(this.menu,e),window.setTimeout(()=>{this.applyColorStyling()},10)}showAtElement(e){this.targetDoc=e.ownerDocument,jl(this.menu,e),window.setTimeout(()=>{this.applyColorStyling()},10)}applyColorStyling(){let e=this.getStatusOptions(),t=this.targetDoc.querySelector(".menu");if(!t)return;let r=t.querySelectorAll(".menu-item");e.forEach((a,i)=>{let s=r[i];if(s&&a.color){let o=s.querySelector(".menu-item-icon");o&&(o.style.color=a.color)}})}}});function Cde(n,e){let t=_He(n.getState(),e);new oo(n.app,{currentDate:t?re(t):void 0,currentTime:t?si(t):void 0,title:FHe(n,e),dateRole:e,plugin:n.plugin,onSelect:(a,i)=>{n.setDate(e,NHe(a,i)),n.onChange()}}).open()}function xde(n,e){new AM({currentValue:n.getState().status,onSelect:r=>{n.setStatus(r),n.onChange()},plugin:n.plugin}).show(e)}function Ede(n,e){new Ud({currentValue:n.getState().priority,onSelect:r=>{n.setPriority(r),n.onChange()},plugin:n.plugin}).show(e)}function Dde(n,e){let t=n.getState();new il({currentValue:t.recurrenceRule,currentAnchor:t.recurrenceAnchor,scheduledDate:t.scheduledDate,onSelect:(a,i)=>{n.setRecurrence(a||"",i),n.onChange()},app:n.app,plugin:n.plugin}).show(e)}function MM(n,e,t){new PM(n.plugin,RHe(n.getState(),t),e.target,a=>{n.setReminders(a.reminders||[]),n.onChange()}).show(e)}function NHe(n,e){return n?e?fa(n,e):n:""}function RHe(n,e){return{...e,title:n.title,status:n.status,priority:n.priority,due:n.dueDate,scheduled:n.scheduledDate,path:(e==null?void 0:e.path)||"",archived:(e==null?void 0:e.archived)||!1,reminders:n.reminders}}function _He(n,e){return e==="due"?n.dueDate:n.scheduledDate}function FHe(n,e){return e==="due"?n.translate("modals.task.dateMenu.dueTitle"):n.translate("modals.task.dateMenu.scheduledTitle")}var G2=y(()=>{fC();Qy();wde();Sde();xe();$y()});function IM(n,e){return{file:n,name:n.basename,link:e}}function Mde(n,e,t){let r=[...n];for(let a of e){let i=LHe(a,t);!i||Y2(r,i)||r.push(i)}return r}function Ide(n,e){return n.filter(t=>t!==e)}function Nde(n){return n.map(e=>e.link).join(", ")}function LHe(n,e){if(!n||typeof n!="string"||n.trim()==="")return null;let t=n.match(/^\[\[([^\]]+)\]\]$/);if(t)return zHe(n,t[1],e);let r=n.match(/^\[([^\]]*)\]\(([^)]+)\)$/);return r?BHe(n,r,e):jHe(n,e)}function Y2(n,e){let t=Pde(e);return n.some(r=>{let a=Pde(r);return t.some(i=>a.includes(i))})}function Pde(n){var r;let e=new Set;(r=n.file)!=null&&r.path&&e.add(`path:${Ade(n.file.path)}`);let t=vt(n.link);return t&&e.add(`path:${Ade(t)}`),n.link&&e.add(`link:${n.link.trim().toLowerCase()}`),Array.from(e)}function Ade(n){return n.trim().replace(/\.md$/i,"").toLowerCase()}function Rde({app:n,listEl:e,items:t,sourcePath:r,translate:a,onRemove:i}){if(!e||(e.empty(),t.length===0))return;let s={metadataCache:n.metadataCache,workspace:n.workspace};for(let o of t){let l=e.createDiv({cls:"task-project-item"});o.unresolved&&l.addClass("task-project-item--unresolved");let c=l.createDiv({cls:"task-project-info"}),d=c.createDiv({cls:"task-project-name clickable-project"});if(o.file){let p=H0(n,o.file,r,o.file.name);OHe(d,[p],s),o.file.path!==o.file.name&&c.createDiv({cls:"task-project-path",text:o.file.path})}else d.textContent=o.name,(0,hv.setTooltip)(d,a("contextMenus.task.dependencies.notices.unresolved",{name:o.name}),{placement:"top"});let u=l.createEl("button",{cls:"task-project-remove",text:"×"});(0,hv.setTooltip)(u,a("modals.task.projectsRemoveTooltip"),{placement:"top"}),u.addEventListener("click",()=>{i(o)})}}function OHe(n,e,t){Ky(n,e,t),Array.from(n.childNodes).forEach(r=>{var a;r.nodeType===Node.TEXT_NODE&&((a=r.textContent)==null?void 0:a.trim())==="+"&&r.remove()})}function zHe(n,e,t){let r=t.resolveLink(e,t.sourcePath);return r instanceof hv.TFile?IM(r,n):{name:e.split("|")[0],link:n,unresolved:!0}}function BHe(n,e,t){let r=vt(n),a=t.resolveLink(r,t.sourcePath);return a instanceof hv.TFile?IM(a,n):{name:e[1]||r,link:n,unresolved:!0}}function jHe(n,e){let t=e.getMarkdownFiles().find(r=>r.basename===n||r.name===`${n}.md`);return t?{file:t,name:t.basename,link:`[[${t.basename}]]`}:{name:n,link:n,unresolved:!0}}var hv,_de=y(()=>{hv=require("obsidian");cp();Cn()});function Fde(n,e,t){let r=new Set(e.map(a=>a.path));return n.filter(a=>t&&a.path===t?!1:!r.has(a.path))}function Lde(n,e){return $He(n,e)?[...n]:[...n,e]}function Ode(n,e){return n.filter(t=>t.path!==e.path)}function $He(n,e){return n.some(t=>t.path===e.path)}async function zde({app:n,listEl:e,files:t,sourcePath:r,getCachedTaskInfo:a,createTaskCard:i,translate:s,onRemove:o}){if(!e||(e.empty(),t.length===0))return;let l={metadataCache:n.metadataCache,workspace:n.workspace};for(let c of t){if(!(c instanceof NM.TFile))return;let d=e.createDiv({cls:"task-project-item task-project-item--task-card"}),u=d.createDiv({cls:"task-project-card-host"}),p=await a(c.path);p?u.appendChild(i(p)):UHe(n,u,c,r,l);let m=d.createEl("button",{cls:"task-project-remove",text:"×"});(0,NM.setTooltip)(m,s("modals.task.organization.removeSubtaskTooltip"),{placement:"top"}),m.addEventListener("click",()=>{o(c)})}}function UHe(n,e,t,r,a){let i=e.createDiv({cls:"task-project-info"}),s=i.createDiv({cls:"task-project-name clickable-project"}),o=H0(n,t,r,t.name);HHe(s,[o],a),t.path!==t.name&&i.createDiv({cls:"task-project-path",text:t.path})}function HHe(n,e,t){Ky(n,e,t),Array.from(n.childNodes).forEach(r=>{var a;r.nodeType===Node.TEXT_NODE&&((a=r.textContent)==null?void 0:a.trim())==="+"&&r.remove()})}var NM,Bde=y(()=>{NM=require("obsidian");cp();Cn()});async function RM({plugin:n,getAllTasks:e=async()=>{var p,m,f;return(f=await((m=(p=n.cacheManager).getAllTasks)==null?void 0:m.call(p)))!=null?f:[]},getCandidates:t,onSelect:r,translate:a,noEligibleTasksMessageKey:i,openFailedMessageKey:s,logOperation:o,openSelector:l=fn,selectorOptions:c,showNotice:d=p=>{new jde.Notice(p)},logger:u=VHe}){var p;try{let m=(p=await e())!=null?p:[],f=[...t(m)];if(f.length===0)return d(a(i)),"empty";let h=g=>{g&&r(g)};return c?l(n,f,h,c):l(n,f,h),"opened"}catch(m){return u.error("Failed to open task selector",{category:"stale-data",operation:o,error:m}),d(a(s)),"error"}}var jde,VHe,$de=y(()=>{jde=require("obsidian");q();co();VHe=M({tag:"TaskModal/TaskSelector"})});function Vde({container:n,className:e,placeholder:t,value:r,onChange:a,attachFocusScrollGuard:i}){let s=n.createEl("textarea",{cls:e});return s.placeholder=t,s.rows=1,s.spellcheck=!0,s.setAttribute("aria-label",t),s.addEventListener("keydown",o=>{o.key==="Enter"&&!o.ctrlKey&&!o.metaKey&&o.preventDefault()}),WHe(s,{value:r,onChange:a,attachFocusScrollGuard:i}),s}function WHe(n,{value:e,onChange:t,attachFocusScrollGuard:r}){n.value=e,n.addEventListener("input",a=>{let i=a.target,s=qHe(i.value);i.value!==s&&(i.value=s),t(s),Ude(i)}),r==null||r(n),Ude(n)}function qHe(n){return n.replace(/\s*\n+\s*/g," ")}function Ude(n){var u;let e=n.ownerDocument.defaultView,t=(u=e==null?void 0:e.HTMLTextAreaElement)!=null?u:HTMLTextAreaElement;if(!(n instanceof t))return;let r=e==null?void 0:e.getComputedStyle(n),a=r?Number.parseFloat(r.lineHeight):0,i=r&&Number.parseFloat(r.paddingTop)||0,s=r&&Number.parseFloat(r.paddingBottom)||0,o=r&&Number.parseFloat(r.borderTopWidth)||0,l=r&&Number.parseFloat(r.borderBottomWidth)||0,c=(a>0?a*3:72)+i+s+o+l;Hde(n,{"--tn-task-modal-title-height":"auto"});let d=Math.min(n.scrollHeight,c);Hde(n,{"--tn-task-modal-title-height":`${d}px`,"--tn-task-modal-title-overflow-y":n.scrollHeight>c?"auto":"hidden"})}function Hde(n,e){if(typeof n.setCssProps=="function"){n.setCssProps(e);return}for(let[t,r]of Object.entries(e))n.style.setProperty(t,r)}var Wde=y(()=>{});function LM({detailsContainer:n,splitRightColumn:e}){FM(n),n.classList.add(_M),e&&(FM(e),e.classList.add(_M))}function Qde({containerEl:n,detailsContainer:e,splitRightColumn:t,timerWindow:r}){var i;FM(e,_M),e.classList.add(YHe),n.classList.add("expanded"),t&&(FM(t,_M),t.style.removeProperty("display")),e.classList.remove(Gde,Yde),e.classList.add(qde),e.classList.remove(Zde),e.classList.add(Kde),((i=r!=null?r:e.ownerDocument.defaultView)!=null?i:window).setTimeout(()=>{e.classList.remove(Gde,qde),e.classList.add(Yde),e.classList.remove(Kde),e.classList.add(Zde)},50)}function FM(n,...e){n.classList.remove(...GHe,...e)}var GHe,_M,YHe,qde,Gde,Yde,Kde,Zde,K2=y(()=>{GHe=["tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"],_M="tn-static-display-none-6b99de8b",YHe="tn-static-display-block-2a1b75c9",qde="tn-static-opacity-0-8d919cb5",Gde="tn-static-opacity-0-6-d95b59ac",Yde="tn-static-opacity-1-c6e7979d",Kde="tn-static-transform-translatey-10px-5b91bf02",Zde="tn-static-transform-translatey-0-1b976432"});function Z2(n,e){var t;return((t=n.instanceOf)==null?void 0:t.call(n,e))===!0||Object.prototype.isPrototypeOf.call(e.prototype,n)}var OM,Jde=y(()=>{OM=class{constructor(e){this.guardedTitleInputs=new WeakSet;this.guardedMobileKeyboardInputs=new WeakSet;this.pendingTitleFocusScrollPositions=null;this.mobileKeyboardFocusCleanups=[];this.mobileKeyboardScrollTimers=[];this.activeMobileKeyboardInput=null;this.elements=e}focusTitleInput(e){this.getWindow().setTimeout(()=>{this.pendingTitleFocusScrollPositions=this.captureTitleFocusScrollPositions(e),e.focus({preventScroll:!0}),e.select(),this.restoreTitleFocusScrollPositions(this.pendingTitleFocusScrollPositions)},this.getInitialFocusDelay())}getInitialFocusDelay(){return this.isMobileLikeEnvironment()?350:100}isMobileLikeEnvironment(){var r,a;let e=this.elements.containerEl.ownerDocument,t=e.defaultView||window;return e.body.classList.contains("is-mobile")||((a=(r=t.matchMedia)==null?void 0:r.call(t,"(pointer: coarse)"))==null?void 0:a.matches)===!0}attachTitleFocusScrollGuard(e){if(this.guardedTitleInputs.has(e))return;this.guardedTitleInputs.add(e);let t=()=>{this.pendingTitleFocusScrollPositions=this.captureTitleFocusScrollPositions(e)};e.addEventListener("pointerdown",t,{capture:!0}),e.addEventListener("touchstart",t,{capture:!0}),e.addEventListener("focus",()=>{this.pendingTitleFocusScrollPositions&&this.scheduleTitleFocusScrollRestore(this.pendingTitleFocusScrollPositions)})}attachMobileKeyboardScrollGuard(e,t={}){var l,c;if(this.guardedMobileKeyboardInputs.has(e))return;this.guardedMobileKeyboardInputs.add(e);let r=(l=t.scrollOnFocus)!=null?l:!0,a=d=>{if(!this.isMobileLikeEnvironment())return;let u=d.target;this.activeMobileKeyboardInput=u,this.elements.containerEl.addClass("is-mobile-keyboard-focused"),r&&this.scheduleMobileKeyboardScrollIntoView(u)},i=(c=e.ownerDocument.defaultView)==null?void 0:c.visualViewport,s=()=>{let d=this.activeMobileKeyboardInput;r&&d&&e.contains(d)&&this.scheduleMobileKeyboardScrollIntoView(d)},o=()=>{let u=(e.ownerDocument.defaultView||window).setTimeout(()=>{this.mobileKeyboardScrollTimers=this.mobileKeyboardScrollTimers.filter(m=>m!==u);let p=e.ownerDocument.activeElement;(!p||!this.elements.modalEl.contains(p)||!this.isKeyboardTextEntryElement(p))&&(this.activeMobileKeyboardInput=null,this.elements.containerEl.removeClass("is-mobile-keyboard-focused"))},100);this.mobileKeyboardScrollTimers.push(u)};e.addEventListener("focus",a,!0),e.addEventListener("blur",o,!0),i==null||i.addEventListener("resize",s),this.mobileKeyboardFocusCleanups.push(()=>{e.removeEventListener("focus",a,!0),e.removeEventListener("blur",o,!0),i==null||i.removeEventListener("resize",s)})}destroy(){for(let t of this.mobileKeyboardFocusCleanups)t();this.mobileKeyboardFocusCleanups=[];let e=this.getWindow();for(let t of this.mobileKeyboardScrollTimers)e.clearTimeout(t);this.mobileKeyboardScrollTimers=[],this.activeMobileKeyboardInput=null,this.elements.containerEl.removeClass("is-mobile-keyboard-focused"),this.pendingTitleFocusScrollPositions=null}captureTitleFocusScrollPositions(e){if(!this.isMobileLikeEnvironment())return null;let t=new Set,r=i=>{var l;let s=i==null?void 0:i.ownerDocument.defaultView,o=(l=s==null?void 0:s.HTMLElement)!=null?l:HTMLElement;i instanceof o&&t.add(i)};r(this.elements.containerEl),r(this.elements.modalEl),r(this.elements.contentEl),this.elements.modalEl.querySelectorAll(".modal-content, .minimalist-modal-container, .modal-split-content, .modal-split-left, .modal-split-right, .details-container").forEach(r);let a=e.parentElement;for(;a&&a!==this.elements.containerEl.parentElement;)r(a),a=a.parentElement;return Array.from(t).map(i=>({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}))}restoreTitleFocusScrollPositions(e){if(e)for(let{element:t,scrollTop:r,scrollLeft:a}of e)t.scrollTop=r,t.scrollLeft=a}scheduleTitleFocusScrollRestore(e){this.restoreTitleFocusScrollPositions(e);let t=this.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(()=>this.restoreTitleFocusScrollPositions(e)):t.setTimeout(()=>this.restoreTitleFocusScrollPositions(e),16),t.setTimeout(()=>this.restoreTitleFocusScrollPositions(e),50),t.setTimeout(()=>{this.restoreTitleFocusScrollPositions(e),this.pendingTitleFocusScrollPositions===e&&(this.pendingTitleFocusScrollPositions=null)},250)}isKeyboardTextEntryElement(e){var o,l,c;let t=e.ownerDocument.defaultView||window,r=(o=t.HTMLInputElement)!=null?o:HTMLInputElement,a=(l=t.HTMLTextAreaElement)!=null?l:HTMLTextAreaElement,i=(c=t.HTMLElement)!=null?c:HTMLElement;return Z2(e,i)&&e.isContentEditable||Z2(e,a)?!0:Z2(e,r)?!new Set(["button","checkbox","color","file","hidden","radio","range","reset","submit"]).has(e.type):!1}scheduleMobileKeyboardScrollIntoView(e){let t=e.ownerDocument.defaultView||window;for(let r of[0,150,350]){let a=t.setTimeout(()=>{this.mobileKeyboardScrollTimers=this.mobileKeyboardScrollTimers.filter(i=>i!==a),this.activeMobileKeyboardInput===e&&this.scrollMobileKeyboardTargetIntoView(e)},r);this.mobileKeyboardScrollTimers.push(a)}}scrollMobileKeyboardTargetIntoView(e){var r;if(!this.isMobileLikeEnvironment())return;let t=(r=e.closest(".setting-item"))!=null?r:e;t.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"}),this.nudgeFocusedFieldInsideVisualViewport(t)}nudgeFocusedFieldInsideVisualViewport(e){var d,u,p;let t=e.ownerDocument.defaultView||window,r=t.visualViewport,a=r&&Number.isFinite(r.height)?r.offsetTop+r.height:t.innerHeight;if(!Number.isFinite(a)||a<=0)return;let i=(u=(d=e.closest(".modal-split-content"))!=null?d:e.closest(".modal-content"))!=null?u:this.elements.contentEl,s=e.getBoundingClientRect(),o=i.getBoundingClientRect(),l=Math.max((p=r==null?void 0:r.offsetTop)!=null?p:0,o.top)+24,c=Math.min(a,o.bottom)-24;s.bottom>c?i.scrollTop+=s.bottom-c:s.top<l&&(i.scrollTop-=l-s.top)}getWindow(){return this.elements.containerEl.ownerDocument.defaultView||window}}});var gv,KHe,yv,Q2=y(()=>{gv=require("obsidian");Y1();WX();nz();yt();py();Zs();Cn();pre();Ua();Gce();Qce();sde();W2();lde();pde();bde();G2();_de();Bde();$de();vC();Wde();K2();Jde();q();KHe=M({tag:"Modals/TaskModal"}),yv=class extends gv.Modal{constructor(t,r){super(t);this.keyboardHandler=null;this.title="";this.details="";this.originalDetails="";this.dueDate="";this.scheduledDate="";this.priority="normal";this.status="open";this.contexts="";this.projects="";this.tags="";this.timeEstimate=0;this.recurrenceRule="";this.recurrenceAnchor="scheduled";this.reminders=[];this.userFields={};this.userFieldInputs=new Map;this.userFieldToggles=new Map;this.blockedByItems=[];this.blockingItems=[];this.blockedByList=void 0;this.blockingList=void 0;this.selectedProjectItems=[];this.selectedSubtaskFiles=[];this.initialSubtaskFiles=[];this.titleInput=void 0;this.detailsInput=void 0;this.detailsMarkdownEditor=null;this.contextsInput=void 0;this.projectsInput=void 0;this.tagsInput=void 0;this.timeEstimateInput=void 0;this.projectsList=void 0;this.subtasksList=void 0;this.actionBar=void 0;this.detailsContainer=void 0;this.isExpanded=!1;this.splitRightColumn=void 0;this.plugin=r,this.focusGuards=new OM({containerEl:this.containerEl,modalEl:this.modalEl,contentEl:this.contentEl})}createDependencyItemFromFile(t,r={}){var a;return B2({plugin:this.plugin,sourcePath:(a=r.sourcePath)!=null?a:this.getDependencySourcePath()},t)}createDependencyItemFromDependency(t,r){return $ce({plugin:this.plugin,sourcePath:r!=null?r:this.getDependencySourcePath()},t)}createDependencyItemFromPath(t){return Uce({plugin:this.plugin,sourcePath:this.getDependencySourcePath()},t)}getDependencySourcePath(){var t;return this.getCurrentTaskPath()||((t=this.plugin.app.workspace.getActiveFile())==null?void 0:t.path)||""}getCurrentTaskPath(){}getModalEditorFile(){let t=this.getCurrentTaskPath();if(!t)return this.app.workspace.getActiveFile();let r=this.app.vault.getAbstractFileByPath(t);return r instanceof gv.TFile?r:this.app.workspace.getActiveFile()}async openTaskNote(){}renderDependencyLists(){this.renderBlockedByList(),this.renderBlockingList()}getLinkServices(){var t;return{metadataCache:this.plugin.app.metadataCache,workspace:this.plugin.app.workspace,sourcePath:this.getCurrentTaskPath()||((t=this.plugin.app.workspace.getActiveFile())==null?void 0:t.path)||""}}renderBlockedByList(){this.renderDependencyList(this.blockedByList,this.blockedByItems,t=>{this.blockedByItems=$2(this.blockedByItems,t),this.renderBlockedByList()})}renderBlockingList(){this.renderDependencyList(this.blockingList,this.blockingItems,t=>{this.blockingItems=$2(this.blockingItems,t),this.renderBlockingList()})}async renderDependencyList(t,r,a){t&&await Hce({plugin:this.plugin,listEl:t,items:r,linkServices:this.getLinkServices(),translate:(i,s)=>this.t(i,s),onRemove:a})}extractDetailsFromContent(t){let{body:r}=Gu(t);return r.replace(/\r\n/g,`
`).trimEnd()}normalizeDetails(t){return t.replace(/\r\n/g,`
`).trimEnd()}addBlockedByTask(t){let r={uid:Ks(this.plugin.app,this.getDependencySourcePath(),t.path,this.plugin.settings.useFrontmatterMarkdownLinks),reltype:Pi};this.addBlockedByDependency(r)}addBlockingTask(t){this.addBlockingTaskFromPath(t.path)}addBlockedByDependency(t){let r=this.getDependencySourcePath(),a=this.createDependencyItemFromDependency(t,r),i=j2(this.blockedByItems,a);i.length!==this.blockedByItems.length&&(this.blockedByItems=i,this.renderBlockedByList())}addBlockingTaskFromPath(t){let r=this.getCurrentTaskPath();if(r&&t===r)return;let a=this.createDependencyItemFromPath(t),i=j2(this.blockingItems,a);i.length!==this.blockingItems.length&&(this.blockingItems=i,this.renderBlockingList())}async openBlockedBySelector(){let t=this.getDependencySourcePath();await RM({plugin:this.plugin,getCandidates:r=>Wce({plugin:this.plugin,sourcePath:t,allTasks:r,existingItems:this.blockedByItems,currentPath:this.getCurrentTaskPath()}),onSelect:r=>{let a={uid:Ks(this.plugin.app,t,r.path),reltype:Pi};this.addBlockedByDependency(a)},translate:r=>this.t(r),noEligibleTasksMessageKey:"contextMenus.task.dependencies.notices.noEligibleTasks",openFailedMessageKey:"contextMenus.task.dependencies.notices.updateFailed",logOperation:"open-blocked-by-selector"})}async openBlockingSelector(){let t=this.getDependencySourcePath();await RM({plugin:this.plugin,getCandidates:r=>qce({plugin:this.plugin,sourcePath:t,allTasks:r,existingItems:this.blockingItems,currentPath:this.getCurrentTaskPath()}),onSelect:r=>{this.addBlockingTaskFromPath(r.path)},translate:r=>this.t(r),noEligibleTasksMessageKey:"contextMenus.task.dependencies.notices.noEligibleTasks",openFailedMessageKey:"contextMenus.task.dependencies.notices.updateFailed",logOperation:"open-blocking-selector"})}getApp(){return this.app}getPlugin(){return this.plugin}t(t,r){return this.plugin.i18n.translate(t,r)}getFileByPath(t){return this.app.vault.getAbstractFileByPath(t)}getMarkdownFiles(){return this.app.vault.getMarkdownFiles()}getFileCache(t){return this.app.metadataCache.getFileCache(t)}resolveLink(t,r){return this.app.metadataCache.getFirstLinkpathDest(t,r)}isEditMode(){return!1}isCreationMode(){return!1}async handleSubmitShortcut(t){await this.handleSave()}onOpen(){this.containerEl.addClass("tasknotes-plugin","minimalist-task-modal"),this.plugin.settings.enableModalSplitLayout&&this.containerEl.addClass("split-layout-enabled"),this.modalEl.addClass("mod-tasknotes"),this.titleEl.setText(this.getModalTitle()),this.keyboardHandler=t=>{if(t.key==="Enter"&&(t.ctrlKey||t.metaKey)){if(t.target.closest(".cm-editor"))return;t.preventDefault(),this.handleSubmitShortcut(t.shiftKey)}},this.containerEl.addEventListener("keydown",this.keyboardHandler),this.initializeFormData().then(()=>{this.createModalContent(),this.focusTitleInput()})}createModalContent(){let{contentEl:t}=this;t.empty();let r=t.createDiv("minimalist-modal-container");this.splitContentWrapper=r.createDiv("modal-split-content"),this.splitLeftColumn=this.splitContentWrapper.createDiv("modal-split-left"),this.createPrimaryInput(this.splitLeftColumn),this.createActionBar(this.splitLeftColumn),this.splitRightColumn=this.splitLeftColumn.createDiv("modal-split-right"),this.createDetailsSection(r),this.createAdditionalSections(this.splitLeftColumn),this.createActionButtons(r)}createPrimaryInput(t){this.createTitleInput(t)}createAdditionalSections(t){}createTitleInput(t){let r=t.createDiv("title-input-container");this.titleInput=this.createTitleTextarea(r,"title-input",this.t("modals.task.titlePlaceholder"))}createTitleTextarea(t,r,a){return Vde({container:t,className:r,placeholder:a,value:this.title,onChange:i=>{this.title=i},attachFocusScrollGuard:i=>{this.attachTitleFocusScrollGuard(i),this.attachMobileKeyboardScrollGuard(i,{scrollOnFocus:!1})}})}createActionBar(t){this.actionBar=t.createDiv("tn-task-modal__action-bar"),this.createCoreActionIcons(this.actionBar),this.updateIconStates()}createCoreActionIcons(t){return ode(t,this.getCoreActionIconSpecs())}getCoreActionIconSpecs(){return[{iconName:"dot-square",tooltip:this.t("modals.task.actions.status"),onClick:(t,r)=>{this.showStatusContextMenu(r)},dataType:"status"},{iconName:"star",tooltip:this.t("modals.task.actions.priority"),onClick:(t,r)=>{this.showPriorityContextMenu(r)},dataType:"priority"},{iconName:"calendar",tooltip:this.t("modals.task.actions.due"),onClick:(t,r)=>{this.showDateContextMenu(r,"due")},dataType:"due-date"},{iconName:"calendar-clock",tooltip:this.t("modals.task.actions.scheduled"),onClick:(t,r)=>{this.showDateContextMenu(r,"scheduled")},dataType:"scheduled-date"},{iconName:"refresh-ccw",tooltip:this.t("modals.task.actions.recurrence"),onClick:(t,r)=>{this.showRecurrenceContextMenu(r)},dataType:"recurrence"},{iconName:"bell",tooltip:this.t("modals.task.actions.reminders"),onClick:(t,r)=>{this.showReminderContextMenu(r)},dataType:"reminders"}]}createActionIcon(t,r,a,i,s){return q2(t,{iconName:r,tooltip:a,onClick:i,dataType:s})}createDetailsSection(t){this.userFieldInputs.clear(),this.userFieldToggles.clear(),this.detailsContainer=this.splitLeftColumn?this.splitLeftColumn.createDiv("details-container"):t.createDiv("details-container"),this.isExpanded||LM({detailsContainer:this.detailsContainer,splitRightColumn:this.splitRightColumn});let r=this.plugin.settings.modalFieldsConfig,a=this.shouldShowField("title",r),i=this.shouldShowField("details",r);this.splitContentWrapper.classList.toggle("modal-split-content--right-empty",!i);let s=this.isEditMode(),o=this.isCreationMode()&&this.plugin.settings.enableNaturalLanguageInput;if(a&&(s||o)){let l=this.detailsContainer.createDiv("detail-label");l.textContent=this.t("modals.task.titleLabel");let c=this.createTitleTextarea(this.detailsContainer,"title-input-detailed",this.t("modals.task.titleDetailedPlaceholder"));(s||o)&&!this.titleInput&&(this.titleInput=c)}if(i){let l=this.splitRightColumn||this.detailsContainer;this.detailsMarkdownEditor=XX({app:this.app,parent:l,label:this.t("modals.task.detailsLabel"),value:this.details,placeholder:this.t("modals.task.detailsPlaceholder"),file:this.getModalEditorFile(),tabMovesFocus:this.plugin.settings.taskModalTabMovesFocus,onChange:c=>{this.details=c},onSubmit:c=>{this.handleSubmitShortcut(c)},onEscape:()=>{this.close()},focusNextField:()=>this.focusNextField(),focusPreviousField:()=>this.focusPreviousField(),attachMobileKeyboardScrollGuard:c=>{this.attachMobileKeyboardScrollGuard(c)}})}this.createAdditionalFields(this.detailsContainer)}shouldShowField(t,r){return UX(t,r,this.isCreationMode())}createAdditionalFields(t){let r=this.plugin.settings.modalFieldsConfig;if(!r){KHe.error("TaskModal: modalFieldsConfig is not initialized. This should never happen.",{category:"configuration",operation:"taskmodal-modalfieldsconfig-not-initialized-this-should-never-happen"});return}this.createFieldsFromConfig(t,r)}createFieldsFromConfig(t,r){VX({container:t,config:r,isCreationMode:this.isCreationMode(),fieldRenderers:this.getFieldRenderers(),renderUserField:(a,i)=>{this.createUserFieldByConfig(a,i)}})}createField(t,r){K1({container:t,fieldConfig:r,fieldRenderers:this.getFieldRenderers(),renderUserField:(a,i)=>{this.createUserFieldByConfig(a,i)}})}getFieldRenderers(){return{contexts:t=>this.createContextsField(t),tags:t=>this.createTagsField(t),"time-estimate":t=>this.createTimeEstimateField(t),projects:t=>this.createProjectsField(t),subtasks:t=>this.createSubtasksField(t),"blocked-by":t=>this.createBlockedByField(t),blocking:t=>this.createBlockingField(t)}}createContextsField(t){this.contextsInput=Yce(this.getMetadataFieldContext(),{container:t,value:this.contexts,onChange:r=>{this.contexts=r}})}createTagsField(t){this.tagsInput=Kce(this.getMetadataFieldContext(),{container:t,value:this.tags,onChange:r=>{this.tags=r}})}createTimeEstimateField(t){this.timeEstimateInput=Zce(this.getMetadataFieldContext(),{container:t,value:this.timeEstimate,onChange:r=>{this.timeEstimate=r}})}getMetadataFieldContext(){return{app:this.app,plugin:this.plugin,translate:t=>this.t(t),attachMobileKeyboardScrollGuard:t=>{this.attachMobileKeyboardScrollGuard(t)}}}createProjectsField(t){this.projectsList=lre(this.getOrganizationFieldContext(),{container:t,onButtonClick:()=>{new Ys(this.app,this.plugin,a=>{this.addProject(a)}).open()},listElement:this.projectsList}),this.renderOrganizationLists()}createSubtasksField(t){this.subtasksList=cre(this.getOrganizationFieldContext(),{container:t,onButtonClick:()=>{this.openSubtaskSelector()},listElement:this.subtasksList}),this.renderOrganizationLists()}getOrganizationFieldContext(){return{translate:t=>this.t(t)}}getUserFieldContext(){return{app:this.app,plugin:this.plugin,translate:(t,r)=>this.t(t,r),attachMobileKeyboardScrollGuard:t=>{this.attachMobileKeyboardScrollGuard(t)}}}createBlockedByField(t){this.blockedByList=dre(this.getOrganizationFieldContext(),{container:t,onButtonClick:()=>{this.openBlockedBySelector()},listElement:this.blockedByList}),this.renderDependencyLists()}createBlockingField(t){this.blockingList=ure(this.getOrganizationFieldContext(),{container:t,onButtonClick:()=>{this.openBlockingSelector()},listElement:this.blockingList}),this.renderDependencyLists()}createUserFieldByConfig(t,r){var i;let a=(i=this.plugin.settings.userFields)==null?void 0:i.find(s=>s.id===r.id);a&&nde(this.getUserFieldContext(),{container:t,field:a,values:this.userFields,inputRefs:this.userFieldInputs,toggleRefs:this.userFieldToggles,onValueChange:(s,o)=>{this.userFields[s]=o}})}updateUserFieldControls(){var t;ide({fields:((t=this.plugin.settings)==null?void 0:t.userFields)||[],values:this.userFields,inputRefs:this.userFieldInputs,toggleRefs:this.userFieldToggles})}createUserFields(t){var r;ade(this.getUserFieldContext(),{container:t,fields:((r=this.plugin.settings)==null?void 0:r.userFields)||[],values:this.userFields,inputRefs:this.userFieldInputs,toggleRefs:this.userFieldToggles,onValueChange:(a,i)=>{this.userFields[a]=i}})}createActionButtons(t){let r=[];this.isEditMode()&&r.push({className:"tn-task-modal__open-note-button",text:this.t("modals.task.buttons.openNote"),onClick:()=>{this.openTaskNote()}}),EM(this.getActionButtonContext(),{container:t,leadingButtons:r,onSave:()=>this.handleSave(),onSaved:()=>{this.close()},onCancel:()=>{this.close()}})}getActionButtonContext(){return{translate:t=>this.t(t)}}expandModal(){this.isExpanded||(this.isExpanded=!0,Qde({containerEl:this.containerEl,detailsContainer:this.detailsContainer,splitRightColumn:this.splitRightColumn}))}showDateContextMenu(t,r){Cde(this.getActionMenuContext(),r)}showStatusContextMenu(t){xde(this.getActionMenuContext(),t)}showPriorityContextMenu(t){Ede(this.getActionMenuContext(),t)}showRecurrenceContextMenu(t){Dde(this.getActionMenuContext(),t)}showReminderContextMenu(t){MM(this.getActionMenuContext(),t)}getActionMenuState(){return vde({title:this.title,status:this.status,priority:this.priority,dueDate:this.dueDate,scheduledDate:this.scheduledDate,recurrenceRule:this.recurrenceRule,recurrenceAnchor:this.recurrenceAnchor,reminders:this.reminders})}getActionMenuContext(){return kde({app:this.app,plugin:this.plugin,translate:(t,r)=>this.t(t,r),getState:()=>this.getActionMenuState(),setDueDate:t=>{this.dueDate=t},setScheduledDate:t=>{this.scheduledDate=t},setStatus:t=>{this.status=t},setPriority:t=>{this.priority=t},setRecurrenceRule:t=>{this.recurrenceRule=t},setRecurrenceAnchor:t=>{this.recurrenceAnchor=t},setReminders:t=>{this.reminders=t},onChange:()=>this.updateIconStates()})}updateDateIconState(){this.updateIconStates()}updateStatusIconState(){this.updateIconStates()}updatePriorityIconState(){this.updateIconStates()}updateRecurrenceIconState(){this.updateIconStates()}updateReminderIconState(){this.updateIconStates()}updateIconStates(){let t=this.getActionMenuState();dde(this.actionBar,{translate:(r,a)=>this.t(r,a)},Tde(t,{statusConfigs:this.plugin.settings.customStatuses||[],priorityConfigs:this.plugin.settings.customPriorities||[]}))}focusTitleInput(){this.focusGuards.focusTitleInput(this.titleInput)}getInitialFocusDelay(){return this.focusGuards.getInitialFocusDelay()}isMobileLikeEnvironment(){return this.focusGuards.isMobileLikeEnvironment()}attachTitleFocusScrollGuard(t){this.focusGuards.attachTitleFocusScrollGuard(t)}attachMobileKeyboardScrollGuard(t,r){this.focusGuards.attachMobileKeyboardScrollGuard(t,r)}addProject(t){if(t instanceof gv.TFile){let r=IM(t,this.buildProjectReference(t,this.getCurrentTaskPath()||""));if(Y2(this.selectedProjectItems,r))return;this.selectedProjectItems.push(r)}this.updateProjectsFromFiles(),this.renderProjectsList()}removeProject(t){this.selectedProjectItems=Ide(this.selectedProjectItems,t),this.updateProjectsFromFiles(),this.renderProjectsList()}updateProjectsFromFiles(){this.projects=Nde(this.selectedProjectItems)}buildProjectReference(t,r){return Qo(this.app,t,r,"","",this.plugin.settings.useFrontmatterMarkdownLinks)}initializeProjectsFromStrings(t){this.selectedProjectItems=[],this.addProjectsFromStrings(t)}addProjectsFromStrings(t){this.selectedProjectItems=Mde(this.selectedProjectItems,t,this.getProjectStringContext()),this.updateProjectsFromFiles()}getProjectStringContext(){return{sourcePath:this.getCurrentTaskPath()||"",getMarkdownFiles:()=>this.getMarkdownFiles(),resolveLink:(t,r)=>this.resolveLink(t,r)}}renderProjectsList(){Rde({app:this.app,listEl:this.projectsList,items:this.selectedProjectItems,sourcePath:this.getCurrentTaskPath()||"",translate:(t,r)=>this.t(t,r),onRemove:t=>this.removeProject(t)})}async openSubtaskSelector(){let t=this.getCurrentTaskPath(),r=t?this.app.vault.getAbstractFileByPath(t):null,a=t?await this.plugin.cacheManager.getTaskInfo(t):null,i=r instanceof gv.TFile&&a?cM(this.plugin,a,r):void 0;await RM({plugin:this.plugin,selectorOptions:i?{creationDefaults:i}:void 0,getCandidates:s=>Fde(s,this.selectedSubtaskFiles,this.getCurrentTaskPath()),onSelect:s=>{let o=this.app.vault.getAbstractFileByPath(s.path);o&&this.addSubtask(o)},translate:s=>this.t(s),noEligibleTasksMessageKey:"modals.task.organization.notices.noEligibleSubtasks",openFailedMessageKey:"modals.task.organization.notices.subtaskSelectFailed",logOperation:"open-subtask-selector"})}addSubtask(t){let r=Lde(this.selectedSubtaskFiles,t);r.length!==this.selectedSubtaskFiles.length&&(this.selectedSubtaskFiles=r,this.renderSubtasksList())}removeSubtask(t){this.selectedSubtaskFiles=Ode(this.selectedSubtaskFiles,t),this.renderSubtasksList()}async renderSubtasksList(){await zde({app:this.app,listEl:this.subtasksList,files:this.selectedSubtaskFiles,sourcePath:this.getCurrentTaskPath()||"",getCachedTaskInfo:t=>this.plugin.cacheManager.getCachedTaskInfo(t),createTaskCard:t=>pr(t,this.plugin,void 0,{layout:"default",showSecondaryBadges:!1,enableHoverPreview:!1}),translate:(t,r)=>this.t(t,r),onRemove:t=>this.removeSubtask(t)})}renderOrganizationLists(){this.renderProjectsList(),this.renderSubtasksList()}toggleProjectsList(){this.projectsList&&this.projectsList.toggleClass("collapsed",!this.projectsList.hasClass("collapsed"))}toggleSubtasksList(){this.subtasksList&&this.subtasksList.toggleClass("collapsed",!this.subtasksList.hasClass("collapsed"))}validateForm(){return this.title.trim().length>0}focusNextField(){let t=this.contextsInput||this.tagsInput||this.timeEstimateInput;return t?(window.setTimeout(()=>{t.focus()},50),!0):!1}focusPreviousField(){return this.titleInput?(window.setTimeout(()=>{var t;(t=this.titleInput)==null||t.focus()},50),!0):!1}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null),this.focusGuards.destroy(),tee(this.detailsMarkdownEditor),this.detailsMarkdownEditor=null,super.onClose()}}});var zM,Xde=y(()=>{zM=class{constructor(e,t=[]){this.config=e,this.userFields=t,this.triggerMap=new Map,this.propertyMap=new Map,this.buildMaps()}buildMaps(){this.triggerMap.clear(),this.propertyMap.clear();for(let e of this.config.triggers)e.enabled&&(this.triggerMap.set(e.trigger,e),this.propertyMap.set(e.propertyId,e))}getTriggerForProperty(e){return this.propertyMap.get(e)}getPropertyForTrigger(e){var t;return(t=this.triggerMap.get(e))==null?void 0:t.propertyId}getAllEnabledTriggers(){return this.config.triggers.filter(e=>e.enabled)}getTriggersOrderedByLength(){return this.getAllEnabledTriggers().sort((e,t)=>t.trigger.length-e.trigger.length)}usesNativeTagSuggester(){let e=this.getTriggerForProperty("tags");return(e==null?void 0:e.trigger)==="#"&&(e==null?void 0:e.enabled)}getTagTrigger(){let e=this.getTriggerForProperty("tags");return e!=null&&e.enabled?e.trigger:void 0}getContextTrigger(){let e=this.getTriggerForProperty("contexts");return e!=null&&e.enabled?e.trigger:void 0}getProjectTrigger(){let e=this.getTriggerForProperty("projects");return e!=null&&e.enabled?e.trigger:void 0}getStatusTrigger(){let e=this.getTriggerForProperty("status");return e!=null&&e.enabled?e.trigger:void 0}getPriorityTrigger(){let e=this.getTriggerForProperty("priority");return e!=null&&e.enabled?e.trigger:void 0}getUserField(e){return this.userFields.find(t=>t.id===e)}isUserField(e){return this.userFields.some(t=>t.id===e)}getSuggesterType(e){if(e==="tags")return this.usesNativeTagSuggester()?"native-tag":"list";if(e==="contexts")return"list";if(e==="projects")return"file";if(e==="status")return"status";if(e==="priority")return"priority";let t=this.getUserField(e);if(t)switch(t.type){case"text":case"list":return t.autosuggestFilter?"file":"list";case"boolean":return"boolean";default:return"none"}return"none"}updateConfig(e){this.config=e,this.buildMaps()}updateUserFields(e){this.userFields=e}}});function tue(n){let e=(0,ac.autocompletion)({override:[JHe(n)],activateOnTyping:!0,closeOnBlur:!0,maxRenderedOptions:10,addToOptions:[{render:(r,a,i)=>XHe(r,i.dom.ownerDocument),position:100}]}),t=J2.Prec.high(eue.keymap.of([{key:"ArrowDown",run:(0,ac.moveCompletionSelection)(!0)},{key:"ArrowUp",run:(0,ac.moveCompletionSelection)(!1)},{key:"Enter",run:ac.acceptCompletion},{key:"Tab",run:ac.acceptCompletion},{key:"Escape",run:ac.closeCompletion}]));return[J2.Prec.high(e),t]}function JHe(n){return async e=>{let t=new zM(n.settings.nlpTriggers,n.settings.userFields||[]),r=e.state.doc.lineAt(e.pos),a=r.text.slice(0,e.pos-r.from),i=(f,h)=>{if(f===-1)return!1;if(f===0)return!0;let g=h[f-1];return!/\w/.test(g)},s=t.getTriggersOrderedByLength(),o=[];for(let f of s){if(f.propertyId==="tags"&&f.trigger==="#")continue;let h=a.lastIndexOf(f.trigger);i(h,a)&&o.push({propertyId:f.propertyId,trigger:f.trigger,index:h,triggerLength:f.trigger.length})}if(o.length===0)return null;o.sort((f,h)=>h.index-f.index);let l=o[0],c=l.index+l.triggerLength,d=a.slice(c);if(l.propertyId==="projects"&&/^\[\[[^\]]*\]\]/.test(d)||l.propertyId!=="projects"&&(d.includes(" ")||d.includes(`
`)))return null;let u=await eVe(l.propertyId,d,n,t);if(!u||u.length===0)return null;let p=e.pos,m=r.text.slice(e.pos-r.from);return l.propertyId==="status"&&m.startsWith(l.trigger)&&(p=Math.min(r.to,e.pos+l.triggerLength)),{from:r.from+l.index+l.triggerLength,to:p,options:u,validFor:/^[\w\s-]*$/}}}function XHe(n,e=activeDocument){let t=n;if(!t.projectMetadata)return null;let r=Ie(e,"div");r.className="cm-project-suggestion__metadata";for(let a of t.projectMetadata){let i=Ie(e,"div");i.className="cm-project-suggestion__meta",a.forEach((s,o)=>{o>0&&i.appendChild(e.createTextNode(" "));let l=Ie(e,"span");l.className=s.kind==="value"?"cm-project-suggestion__meta-value":s.kind==="label"?"cm-project-suggestion__meta-label":"cm-project-suggestion__meta-literal",s.searchable&&l.classList.add("cm-project-suggestion__meta-searchable"),s.searchable&&t.projectQuery?aVe(l,s.text,t.projectQuery):l.textContent=s.text,i.appendChild(l)}),r.appendChild(i)}return r}async function eVe(n,e,t,r){switch(r.getSuggesterType(n)){case"list":return tVe(n,e,t);case"file":return rVe(n,e,t,r);case"status":return iVe(e,t);case"priority":return sVe(e,t);case"boolean":return oVe(e);case"native-tag":return null;default:return null}}function tVe(n,e,t){let r=[],a=n;switch(n){case"tags":r=t.cacheManager.getAllTags(),a="Tag";break;case"contexts":r=t.cacheManager.getAllContexts(),a="Context";break;default:r=[],a=n;break}return r.filter(i=>i&&typeof i=="string").filter(i=>i.toLowerCase().includes(e.toLowerCase())).slice(0,10).map(i=>({label:i,apply:i+" ",type:"text",info:a}))}async function rVe(n,e,t,r){var a,i,s;try{let o;if(n==="projects")o=t.settings.projectAutosuggest;else{let c=r.getUserField(n);o=c==null?void 0:c.autosuggestFilter}let l=await nB.suggest(t,e,20,o);if(n==="projects"){let c=new Yu({getFrontmatter:u=>u.frontmatter}),d=((s=(i=(a=t.settings)==null?void 0:a.projectAutosuggest)==null?void 0:i.rows)!=null?s:[]).slice(0,3);return l.map(u=>{var g;let p=u.displayText||u.insertText,m=u.insertText,f=t.app.vault.getMarkdownFiles().find(v=>v.path===u.path),h=[];if(f&&d.length>0){let v=t.app.metadataCache.getFileCache(f),k=(v==null?void 0:v.frontmatter)||{},T=t.fieldMapper.mapFromFrontmatter(k,f.path,t.settings.storeTitleInFilename),b=typeof T.title=="string"?T.title:"",w=Array.isArray(k.aliases)?k.aliases.filter(C=>typeof C=="string"):[],S={basename:f.basename,name:f.name,path:f.path,parent:((g=f.parent)==null?void 0:g.path)||"",title:b,aliases:w,frontmatter:k};h=nVe(d,S,c)}return{label:p,apply:`[[${m}]] `,type:"text",info:"Project",projectMetadata:h.length>0?h:void 0,projectQuery:e}})}return l.map(c=>{let d=c.displayText||c.insertText,u=c.insertText;return{label:d,apply:`[[${u}]] `,type:"text",info:n==="projects"?"Project":n}})}catch(o){return ZHe.error(`Error getting file suggestions for ${n}:`,{category:"persistence",operation:"getting-file-suggestions",error:o}),[]}}function nVe(n,e,t){var i;let r=[],a=Math.min(n.length,3);for(let s=0;s<a;s++){let o=n[s];if(o)try{let l=zl(o),c=[];for(let d of l){if(d.property.startsWith("literal:")){let p=d.property.slice(8);p&&c.push({text:p,searchable:!1,kind:"literal"});continue}let u=t.resolve(d.property,e);u&&(d.showName&&c.push({text:`${(i=d.displayName)!=null?i:d.property}:`,searchable:!1,kind:"label"}),c.push({text:u,searchable:d.searchable===!0||QHe.has(d.property),kind:"value"}))}c.some(d=>d.text.trim().length>0)&&r.push(c)}catch(l){}}return r}function aVe(n,e,t){let r=n.ownerDocument,a=t.toLowerCase().split(/\s+/).filter(Boolean);if(a.length===0){n.textContent=e;return}let i=e.toLowerCase(),s=[];for(let c of a){let d=i.indexOf(c);for(;d!==-1;)s.push({start:d,end:d+c.length}),d=i.indexOf(c,d+1)}s.sort((c,d)=>c.start-d.start);let o=[];for(let c of s){let d=o[o.length-1];(!d||c.start>=d.end)&&o.push(c)}if(o.length===0){n.textContent=e;return}let l=0;for(let c of o){c.start>l&&n.appendChild(r.createTextNode(e.slice(l,c.start)));let d=Ie(r,"mark");d.textContent=e.slice(c.start,c.end),n.appendChild(d),l=c.end}l<e.length&&n.appendChild(r.createTextNode(e.slice(l)))}function iVe(n,e){return Nn.fromPlugin(e).getStatusSuggestions(n,10).map(a=>({label:a.display,apply:a.value+" ",type:"text",info:"Status"}))}function sVe(n,e){return(e.settings.customPriorities||[]).filter(r=>r.label.toLowerCase().includes(n.toLowerCase())).slice(0,10).map(r=>({label:r.label,apply:r.value+" ",type:"text",info:"Priority"}))}function oVe(n){return["true","false"].filter(t=>t.toLowerCase().includes(n.toLowerCase())).map(t=>({label:t,apply:t+" ",type:"text",info:"Boolean"}))}var ac,J2,eue,ZHe,QHe,rue=y(()=>{ac=require("@codemirror/autocomplete"),J2=require("@codemirror/state"),eue=require("@codemirror/view");Wl();Xde();Hb();O0();$b();q();Li();ZHe=M({tag:"Editor/NLPCodeMirrorAutocomplete"}),QHe=new Set(["title","aliases","file.basename"])});function nue(n){let e=qe(),t=n.contexts.split(",").map(l=>l.trim()).filter(l=>l.length>0),r=ms(n.projects),a=ha(n.tags).split(",").map(l=>l.trim()).filter(l=>l.length>0);n.taskIdentificationMethod==="tag"&&n.taskTag&&!a.includes(n.taskTag)&&a.unshift(n.taskTag);let i={title:n.title.trim(),due:n.dueDate||void 0,scheduled:n.scheduledDate||void 0,priority:n.priority,status:n.status,contexts:t.length>0?t:void 0,projects:r.length>0?r:void 0,tags:a.length>0?a:void 0,timeEstimate:n.timeEstimate>0?n.timeEstimate:void 0,recurrence:n.recurrenceRule||void 0,recurrence_anchor:n.recurrenceRule?n.recurrenceAnchor:void 0,reminders:n.reminders.length>0?n.reminders:void 0,creationContext:n.creationContext||"manual-creation",dateCreated:e,dateModified:e,customFrontmatter:tde(n.userFields)},s=n.blockedByItems.map(l=>({...l.dependency}));s.length>0&&(i.blockedBy=s);let o=n.normalizeDetails(n.details).trimEnd();return o.length>0&&(i.details=o),i}function aue(n){let e=[],t={},r=[];return n.forEach(a=>{a.path?e.includes(a.path)||(e.push(a.path),t[a.path]={...a.dependency}):r.push(a.dependency.uid)}),{added:e,raw:t,unresolved:r}}var iue=y(()=>{xe();yt();Ku();xM()});var lue={};Xe(lue,{convertDefaultRemindersToReminders:()=>IC,hasAnyUserFieldsEnabled:()=>sue,isUserFieldConfigComplete:()=>oue,isUserFieldEnabled:()=>lVe});function IC(n,e){return n.map(t=>{let r={id:`rem_${Date.now()}_${Math.random().toString(36).slice(2,11)}`,type:t.type,description:t.description};if(t.type==="relative"){if(t.relatedTo&&t.offset!==void 0&&t.unit&&t.direction){let a="PT";t.unit==="days"?a=`P${t.offset}D`:t.unit==="hours"?a=`PT${t.offset}H`:a=`PT${t.offset}M`,t.direction==="before"&&(a="-"+a),r.relatedTo=t.relatedTo,r.offset=a}}else t.type==="absolute"&&t.absoluteDate&&t.absoluteTime&&(r.absoluteTime=`${t.absoluteDate}T${t.absoluteTime}:00`);return r}).filter(t=>t.type==="relative"?t.relatedTo&&t.offset:!!t.absoluteTime)}function sue(n){let e=n.userFields;return!e||e.length===0?!1:e.some(t=>!!(t&&t.displayName&&t.key&&t.type))}function oue(n){return!n||!n.enabled?!1:!!(n.displayName&&n.key&&n.type)}function lVe(n){return n.userFields&&n.userFields.length>0?sue(n):oue(n.userField)}var BM=y(()=>{});function cue(n){let e=n.taskCreationDefaults,t={title:"",dueDate:Ol(e.defaultDueDate,e.defaultDueTime),scheduledDate:Ol(e.defaultScheduledDate,e.defaultScheduledTime),priority:n.defaultPriority,status:n.defaultStatus,contexts:e.defaultContexts||"",tags:e.defaultTags||"",projectStrings:e.defaultProjects?ms(e.defaultProjects):[],timeEstimate:e.defaultTimeEstimate&&e.defaultTimeEstimate>0?e.defaultTimeEstimate:0,recurrenceRule:"",recurrenceAnchor:"scheduled",reminders:e.defaultReminders&&e.defaultReminders.length>0?IC(e.defaultReminders):[],userFields:cVe(n.userFields||[])};return n.prePopulatedValues&&uVe(t,n.prePopulatedValues,n.taskTag),t}function cVe(n){let e={};for(let t of n)if(t.defaultValue!==void 0){if(t.type==="date"&&typeof t.defaultValue=="string"){let r=dVe(t.defaultValue);r&&(e[t.key]=r);continue}e[t.key]=t.defaultValue}return e}function dVe(n){return n!=="none"&&n!=="today"&&n!=="tomorrow"&&n!=="next-week"?"":jb(n)}function uVe(n,e,t){if(e.title!==void 0&&(n.title=e.title),e.due!==void 0&&(n.dueDate=e.due),e.scheduled!==void 0&&(n.scheduledDate=e.scheduled),e.priority!==void 0&&(n.priority=e.priority),e.status!==void 0&&(n.status=e.status),e.contexts!==void 0&&(n.contexts=e.contexts.join(", ")),e.projects!==void 0&&(n.projectStrings=e.projects.filter(r=>r&&typeof r=="string"&&r.trim()!=="")),e.tags!==void 0&&(n.tags=ha(e.tags.filter(r=>r!==t).join(", "))),e.timeEstimate!==void 0&&(n.timeEstimate=e.timeEstimate),e.recurrence!==void 0&&typeof e.recurrence=="string"&&(n.recurrenceRule=e.recurrence),e.recurrence_anchor!==void 0&&(n.recurrenceAnchor=e.recurrence_anchor),e.customFrontmatter)for(let[r,a]of Object.entries(e.customFrontmatter))n.userFields[r]=a}var due=y(()=>{yt();BM();Ku()});async function uue(n){var t;let e={updated:0,missing:0,skipped:0,failed:0};if(!n.currentTaskFile)return e;for(let r of n.subtaskFiles)try{let a=await n.getTaskInfo(r.path);if(!a){e.missing+=1;continue}let i=n.buildProjectReference(n.currentTaskFile,r.path),s=X2(a.projects,i,pVe(n.currentTaskFile));if(!s){e.skipped+=1;continue}await n.updateTaskProjects(a,s),e.updated+=1}catch(a){e.failed+=1,(t=n.onError)==null||t.call(n,a,r)}return e}function X2(n,e,t){let a=(Array.isArray(n)?n:[]).filter(i=>typeof i=="string");return a.includes(e)||a.includes(t)?null:[...a,e]}function pVe(n){return`[[${n.basename}]]`}var eU=y(()=>{});function pue(n){return n.replace(/\\/g,"/").replace(/\/+/g,"/").replace(/^\/+/,"")}async function mue(n,e){return n.getAbstractFileByPath(e)?!0:n.adapter.exists(e,!1)}function fue(n,e){if(!n||!e)throw new Error("Invalid context or settings provided");if(!n.title||typeof n.title!="string")throw new Error("Context must have a valid title");if(n.title.trim().length===0)throw new Error("Title cannot be empty");let t=n.date||new Date;if(!(t instanceof Date)||isNaN(t.getTime()))throw new Error("Invalid date provided in context");try{let r=e.icsIntegration;if(r)switch(r.icsNoteFilenameFormat){case"title":return Ir(n.title);case"zettel":return Kf(t);case"timestamp":return gue(t);case"custom":{let a={icsEventTitle:n.icsEventTitle?Ir(n.icsEventTitle):Ir(n.title),icsEventLocation:n.icsEventLocation?Ir(n.icsEventLocation):"",icsEventDescription:n.icsEventDescription?Ir(n.icsEventDescription.substring(0,50)):"",icsEventTitleWithDate:Ir(`${n.icsEventTitle||n.title} - ${D(t,"PPP")}`)};return tU(n,r.customICSNoteFilenameTemplate,t,a)}default:return Ir(n.title)}return Ir(n.title)}catch(r){return Zf.error("Error generating ICS note filename:",{category:"provider",operation:"generating-ics-note-filename",error:r}),Ir(n.title)}}function hue(n,e){if(!n||!e)throw new Error("Invalid context or settings provided");if(!n.title||typeof n.title!="string")throw new Error("Context must have a valid title");if(n.title.trim().length===0)throw new Error("Title cannot be empty");let t=n.date||new Date;if(!(t instanceof Date)||isNaN(t.getTime()))throw new Error("Invalid date provided in context");if(e.storeTitleInFilename)return Ir(n.title);try{switch(e.taskFilenameFormat){case"title":return Ir(n.title);case"zettel":return Kf(t);case"timestamp":return gue(t);case"uuid":return yue();case"custom":return tU(n,e.customFilenameTemplate,t);default:return Kf(t)}}catch(r){return Zf.error("Error generating filename:",{category:"persistence",operation:"generating-filename",error:r}),Kf(t)}}function jM(n,e,t){if(!n.storeTitleInFilename&&n.taskFilenameFormat!=="title")return!1;let r=Ir(e);return t.startsWith("task-")&&t!==r}function Kf(n){let e=D(n,"yyMMdd"),t=new Date(n);t.setHours(0,0,0,0);let a=Math.floor((n.getTime()-t.getTime())/1e3).toString(36);return`${e}${a}`}function gue(n){return D(n,"yyyy-MM-dd-HHmmss")}function yue(){let n=typeof window!="undefined"?window.crypto:void 0;if(typeof(n==null?void 0:n.randomUUID)=="function")return n.randomUUID();let e=new Uint8Array(16);if(typeof(n==null?void 0:n.getRandomValues)=="function")n.getRandomValues(e);else for(let r=0;r<e.length;r++)e[r]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,r=>r.toString(16).padStart(2,"0"));return`${t.slice(0,4).join("")}-${t.slice(4,6).join("")}-${t.slice(6,8).join("")}-${t.slice(8,10).join("")}-${t.slice(10,16).join("")}`}function mVe(n){return Array.isArray(n)?n.map(e=>Zo(e).trim()).filter(e=>e.length>0).map(e=>Ir(e)):[]}function fVe(n){return n?n.replace(/[^a-zA-Z0-9]/g,"").substring(0,4).toUpperCase():""}function tU(n,e,t,r){var a;if(!n||!e||!t)throw new Error("Invalid inputs for custom filename generation");if(typeof e!="string"||e.trim().length===0)throw new Error("Template must be a non-empty string");if(!(t instanceof Date)||isNaN(t.getTime()))throw new Error("Invalid date for filename generation");try{let i=Ir(n.title),s=n.priority&&["low","normal","medium","high"].includes(n.priority)?n.priority:"normal",o=n.status?Ir(n.status):"open",l=Array.isArray(n.contexts)?n.contexts:[],c=mVe(n.projects),d=Array.isArray(n.tags)?n.tags:[],u={title:i,date:D(t,"yyyy-MM-dd"),time:D(t,"HHmmss"),priority:s,status:o,timestamp:D(t,"yyyy-MM-dd-HHmmss"),dateTime:D(t,"yyyy-MM-dd-HHmm"),year:D(t,"yyyy"),month:D(t,"MM"),day:D(t,"dd"),hour:D(t,"HH"),minute:D(t,"mm"),second:D(t,"ss"),dueDate:n.dueDate||"",scheduledDate:n.scheduledDate||"",context:l[0]?Ir(l[0]):"",contexts:l.map(m=>Ir(m)).join("/"),project:c[0]||"",projects:c.join("/"),projectId:fVe(c[0]),tags:d.map(m=>Ir(m)).join(", "),hashtags:d.map(m=>`#${Ir(m)}`).join(" "),timeEstimate:((a=n.timeEstimate)==null?void 0:a.toString())||"",details:n.details?Ir(n.details.substring(0,50)):"",parentNote:n.parentNote?Ir(n.parentNote):"",shortDate:D(t,"yyMMdd"),shortYear:D(t,"yy"),monthName:D(t,"MMMM"),monthNameShort:D(t,"MMM"),dayName:D(t,"EEEE"),dayNameShort:D(t,"EEE"),week:D(t,"ww"),quarter:D(t,"q"),time12:D(t,"hh:mm a"),time24:D(t,"HH:mm"),hourPadded:D(t,"HH"),hour12:D(t,"hh"),ampm:D(t,"a"),unix:Math.floor(t.getTime()/1e3).toString(),unixMs:t.getTime().toString(),milliseconds:D(t,"SSS"),ms:D(t,"SSS"),timezone:D(t,"xxx"),timezoneShort:D(t,"xx"),utcOffset:D(t,"xxx"),utcOffsetShort:D(t,"xx"),utcZ:"Z",priorityShort:s.substring(0,1).toUpperCase(),statusShort:o.substring(0,1).toUpperCase(),titleLower:i.toLowerCase(),titleUpper:i.toUpperCase(),titleSnake:i.toLowerCase().replace(/\s+/g,"_"),titleKebab:i.toLowerCase().replace(/\s+/g,"-"),titleCamel:i.replace(/(?:^\w|[A-Z]|\b\w)/g,(m,f)=>f===0?m.toLowerCase():m.toUpperCase()).replace(/\s+/g,""),titlePascal:i.replace(/(?:^\w|[A-Z]|\b\w)/g,m=>m.toUpperCase()).replace(/\s+/g,""),zettel:Kf(t),uuid:yue(),nano:Date.now().toString()+Math.random().toString(36).substring(2,7),...r||{}},p=e;if(e.length>500)throw new Error("Template too long");return Object.entries(u).forEach(([m,f])=>{try{let h=new RegExp(`\\{\\{${m}\\}\\}`,"g");p=p.replace(h,f);let g=new RegExp(`\\{${m}\\}`,"g");p=p.replace(g,f)}catch(h){Zf.warn(`Error replacing template variable ${m}:`,{category:"persistence",operation:"replacing-template-variable",error:h})}}),p=p.replace(/\{\{[^}]+\}\}/g,""),p=p.replace(/\{[^}]+\}/g,""),p.trim()||(p=i||Kf(t)),Ir(p)}catch(i){return Zf.error("Error generating custom filename:",{category:"persistence",operation:"generating-custom-filename",error:i}),Ir(n.title)||Kf(t)}}function Ir(n){if(!n||typeof n!="string")return"untitled";try{let e=n.trim().replace(/\s+/g," ").replace(/[<>:"/\\|?*#[\]]/g,"").replace(/./g,r=>{let a=r.charCodeAt(0);return a<=31||a>=127&&a<=159?"":r}).replace(/^\.+|\.+$/g,"").trim();return(!e||e.length===0)&&(e="untitled"),["CON","PRN","AUX","NUL","COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9","LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"].includes(e.toUpperCase())&&(e=`task-${e}`),e}catch(e){return Zf.error("Error sanitizing filename:",{category:"persistence",operation:"sanitizing-filename",error:e}),"untitled"}}async function vv(n,e,t){if(!n||typeof n!="string")throw new Error("Base filename must be a non-empty string");if(typeof e!="string")throw new Error("Folder path must be a string");if(!t)throw new Error("Vault must be provided");let r=Ir(n);if(!r)throw new Error("Base filename cannot be sanitized to a valid name");let a=e.replace(/\.\./g,"").trim();try{let i=pue(`${a}/${r}.md`);if(i.length>260)throw new Error("Generated path too long");if(!await mue(t,i))return r;for(let l=2;l<=999;l++){let c=`${r}-${l}`,d=pue(`${a}/${c}.md`);if(d.length>260)break;if(!await mue(t,d))return c}let s=Date.now().toString(36),o=`${r.substring(0,50)}-${s}`;return Ir(o)}catch(i){return Zf.error("Error generating unique filename:",{category:"persistence",operation:"generating-unique-filename",error:i}),`task-${Date.now().toString(36)}`}}function hVe(n){let e=et(n);if(!(e instanceof Date)||isNaN(e.getTime()))throw new Error(`Invalid occurrence date: ${n}`);return{occurrenceDate:D(e,"yyyy-MM-dd"),occurrenceWeek:D(e,"RRRR-'W'II"),occurrenceMonth:D(e,"yyyy-MM"),occurrenceYear:D(e,"yyyy"),occurrenceMonthName:D(e,"MMMM")}}function vue(n,e,t){try{let r=hVe(t);return tU(n,e,n.date||new Date,r)}catch(r){return Zf.error("Error generating occurrence filename:",{category:"persistence",operation:"generating-occurrence-filename",error:r}),Ir(n.title)}}var Zf,kv=y(()=>{Cr();Cn();q();xe();Zf=M({tag:"Utils/FilenameGenerator"})});var Sue={};Xe(Sue,{TaskCreationModal:()=>kp,getTaskCreationFailureNoticeMessage:()=>Tue,openCreatedTaskFileAfterSave:()=>wue,shouldOpenCreatedTaskAfterSave:()=>bue});function vVe(n){return n.disabled?!1:n.tabIndex>=0||yVe.has(n.tagName)}function Tue(n){let e=n instanceof Error&&n.message?n.message:String(n);return e.startsWith(kue)?e.slice(kue.length):e}function bue(n,e,t){return(n==="same-tab"||n==="new-tab")&&!e.createAnother&&!t}async function wue(n,e,t){await(t==="new-tab"?n.workspace.getLeaf("tab"):n.workspace.getLeaf(!1)).openFile(e)}function kVe(n,e,t){let r=(tz(),BP(ez));return new r.EmbeddableMarkdownEditor(n,e,t)}var xs,$M,kue,gVe,yVe,kp,UM=y(()=>{xs=require("obsidian");Q2();yt();Wl();xe();rue();iue();due();eU();m2();kv();nz();K2();q();$M=M({tag:"Modals/TaskCreationModal"}),kue="Failed to create task: ",gVe=["button","a[href]","input","select","textarea","[tabindex]:not([tabindex='-1'])",".tn-task-modal__markdown-editor--nlp"].join(", "),yVe=new Set(["A","BUTTON","INPUT","SELECT","TEXTAREA"]);kp=class n extends yv{constructor(t,r,a={}){super(t,r);this.nlInput=void 0;this.nlMarkdownEditor=null;this.nlPreviewContainer=void 0;this.nlButtonContainer=void 0;this.nlpSuggest=null;this.eventListeners=[];this.options=a,this.nlParser=Nn.fromPlugin(r)}getModalTitle(){return this.t("modals.taskCreation.title")}isCreationMode(){return!0}addTrackedEventListener(t,r,a){t.addEventListener(r,a),this.eventListeners.push({element:t,event:r,handler:a})}removeAllEventListeners(){for(let{element:t,event:r,handler:a}of this.eventListeners)t.removeEventListener(r,a);this.eventListeners=[]}createPrimaryInput(t){this.plugin.settings.enableNaturalLanguageInput?this.createNaturalLanguageInput(t):(this.createTitleInput(t),this.isExpanded=!0,this.containerEl.addClass("expanded"))}createAdditionalSections(t){(this.options.prePopulatedValues&&this.options.prePopulatedValues.projects||this.selectedProjectItems.length>0)&&this.renderProjectsList()}createNaturalLanguageInput(t){let r=t.createDiv("nl-input-container"),a=r.createDiv("tn-task-modal__markdown-editor tn-task-modal__markdown-editor--nlp");a.setAttribute("role","textbox"),a.setAttribute("aria-label",this.t("modals.taskCreation.nlPlaceholder")),a.setAttribute("aria-multiline","true"),this.nlPreviewContainer=r.createDiv("nl-preview-container"),this.nlPreviewContainer.setAttribute("role","status"),this.nlPreviewContainer.setAttribute("aria-live","polite"),this.nlPreviewContainer.setAttribute("aria-label","Task preview");try{let i=tue(this.plugin);this.nlMarkdownEditor=kVe(this.app,a,{value:"",placeholder:this.t("modals.taskCreation.nlPlaceholder"),cls:"nlp-editor",extensions:i,enterVimInsertMode:!0,onChange:s=>{s.trim()?this.updateNaturalLanguagePreview(s.trim()):this.clearNaturalLanguagePreview()},onSubmit:(s,o)=>{this.handleSubmitShortcut(o)},onEscape:()=>{this.close()},onTab:(s,o)=>o?this.focusPreviousNaturalLanguageField(a):(this.isExpanded||this.expandModal(),window.setTimeout(()=>{let l=this.modalEl.querySelector(".title-input-detailed");l&&l.focus()},50),!0),onEnter:(s,o,l)=>!!o})}catch(i){$M.error("Failed to create NLP markdown editor:",{category:"persistence",operation:"create-nlp-markdown-editor",error:i}),this.nlInput=a.createEl("textarea",{cls:"nl-input",attr:{placeholder:this.t("modals.taskCreation.nlPlaceholder"),rows:"3"}});let s=()=>{let l=this.nlInput.value.trim();l?this.updateNaturalLanguagePreview(l):this.clearNaturalLanguagePreview()};this.addTrackedEventListener(this.nlInput,"input",s);let o=l=>{let c=this.nlInput.value.trim();if(!c)return;let d=l;d.key==="Enter"&&(d.ctrlKey||d.metaKey)?(d.preventDefault(),this.handleSubmitShortcut(d.shiftKey)):d.key==="Tab"&&d.shiftKey&&(d.preventDefault(),this.parseAndFillForm(c))};this.addTrackedEventListener(this.nlInput,"keydown",o),this.nlpSuggest=new nv(this.app,this.nlInput,this.plugin)}}focusPreviousNaturalLanguageField(t){let r=this.modalEl.contains(t)?this.modalEl:this.contentEl,a=Array.from(r.querySelectorAll(gVe)),i=a.findIndex(o=>o===t||t.contains(o));if(i<=0)return!0;let s=a.slice(0,i).reverse().find(vVe);return s&&window.setTimeout(()=>{s.focus()},50),!0}focusTitleInput(){if(!this.plugin.settings.enableNaturalLanguageInput){super.focusTitleInput();return}window.setTimeout(()=>{var r,a;let t=(a=(r=this.nlMarkdownEditor)==null?void 0:r.editor)==null?void 0:a.cm;if(t){t.focus(),t.scrollDOM.scrollTop=0;return}this.nlInput&&(this.nlInput.focus({preventScroll:!0}),this.nlInput.select())},this.getInitialFocusDelay())}updateNaturalLanguagePreview(t){if(!this.nlPreviewContainer)return;let r=this.nlParser.parseInput(t),a=this.nlParser.getPreviewData(r);a.length>0&&r.title?(this.nlPreviewContainer.empty(),this.nlPreviewContainer.classList.add("nl-preview-container--visible"),this.nlPreviewContainer.classList.remove("tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),a.forEach(i=>{let s=this.nlPreviewContainer.createDiv("nl-preview-item");s.textContent=i.text})):this.clearNaturalLanguagePreview()}clearNaturalLanguagePreview(){this.nlPreviewContainer&&(this.nlPreviewContainer.empty(),this.nlPreviewContainer.classList.remove("nl-preview-container--visible"),this.nlPreviewContainer.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"))}getNLPInputValue(){return this.nlMarkdownEditor?this.nlMarkdownEditor.value:this.nlInput?this.nlInput.value:""}createActionBar(t){if(this.actionBar=t.createDiv("tn-task-modal__action-bar"),this.plugin.settings.enableNaturalLanguageInput){this.createActionIcon(this.actionBar,"wand",this.t("modals.taskCreation.actions.fillFromNaturalLanguage"),(a,i)=>{let s=this.getNLPInputValue().trim();s&&this.parseAndFillForm(s)}),this.createActionIcon(this.actionBar,this.isExpanded?"chevron-up":"chevron-down",this.isExpanded?this.t("modals.taskCreation.actions.hideDetailedOptions"):this.t("modals.taskCreation.actions.showDetailedOptions"),(a,i)=>{this.toggleDetailedForm();let s=a.querySelector(".icon");s&&(0,xs.setIcon)(s,this.isExpanded?"chevron-up":"chevron-down"),(0,xs.setTooltip)(a,this.isExpanded?this.t("modals.taskCreation.actions.hideDetailedOptions"):this.t("modals.taskCreation.actions.showDetailedOptions"),{placement:"top"})});let r=this.actionBar.createDiv("action-separator");r.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),r.classList.add("tn-static-width-1px-aa77e27e"),r.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-min-height-800px-997b4c8c"),r.classList.add("tn-static-height-24px-29a11d37"),r.classList.remove("tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-color-red-134bc721","tn-static-background-color-var-text-accent-a954c70f"),r.classList.add("tn-static-background-color-var-background-mo-94b219f0"),r.classList.remove("tn-static-margin-0-11696618","tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),r.classList.add("tn-static-margin-0-var-size-4-2-77f7dc08")}this.createCoreActionIcons(this.actionBar),this.updateIconStates()}parseAndFillForm(t){let r=this.nlParser.parseInput(t);this.applyParsedData(r),this.isExpanded||this.expandModal()}applyParsedData(t){var r;if(t.title&&(this.title=t.title),t.status&&(this.status=t.status),t.priority&&(this.priority=t.priority),t.dueDate&&(this.dueDate=t.dueTime?fa(t.dueDate,t.dueTime):t.dueDate),t.scheduledDate&&(this.scheduledDate=t.scheduledTime?fa(t.scheduledDate,t.scheduledTime):t.scheduledDate),t.contexts&&t.contexts.length>0&&(this.contexts=t.contexts.join(", ")),t.tags&&t.tags.length>0&&(this.tags=ha(t.tags.join(", "))),t.details&&(this.details=t.details),t.recurrence&&(this.recurrenceRule=t.recurrence),t.estimate!==void 0&&(this.timeEstimate=t.estimate>0?t.estimate:0,this.timeEstimateInput&&(this.timeEstimateInput.value=this.timeEstimate>0?this.timeEstimate.toString():"")),this.titleInput&&(this.titleInput.value=this.title),this.detailsInput&&(this.detailsInput.value=this.details),eee(this.detailsMarkdownEditor,this.details),this.contextsInput&&(this.contextsInput.value=this.contexts),this.tagsInput&&(this.tagsInput.value=this.tags),t.projects&&t.projects.length>0&&(this.addProjectsFromStrings(t.projects),this.renderProjectsList()),t.userFields){for(let[a,i]of Object.entries(t.userFields)){let s=(r=this.plugin.settings.userFields)==null?void 0:r.find(o=>o.id===a);s&&(this.userFields[s.key]=i)}this.updateUserFieldControls()}this.updateIconStates()}toggleDetailedForm(){this.isExpanded?(this.isExpanded=!1,LM({detailsContainer:this.detailsContainer,splitRightColumn:this.splitRightColumn}),this.containerEl.removeClass("expanded")):this.expandModal()}async initializeFormData(){let t=cue({defaultPriority:this.plugin.settings.defaultTaskPriority,defaultStatus:this.plugin.settings.defaultTaskStatus,taskCreationDefaults:this.plugin.settings.taskCreationDefaults,taskTag:this.plugin.settings.taskTag,userFields:this.plugin.settings.userFields,prePopulatedValues:this.options.prePopulatedValues});this.title=t.title,this.dueDate=t.dueDate,this.scheduledDate=t.scheduledDate,this.priority=t.priority,this.status=t.status,this.contexts=t.contexts,this.tags=t.tags,this.timeEstimate=t.timeEstimate,this.recurrenceRule=t.recurrenceRule,this.recurrenceAnchor=t.recurrenceAnchor,this.reminders=t.reminders,this.userFields=t.userFields,t.projectStrings.length>0&&this.initializeProjectsFromStrings(t.projectStrings),this.details=this.normalizeDetails(this.details),this.originalDetails=this.details}async handleSubmitShortcut(t){await this.handleSave({createAnother:t})}async handleSave(t={}){if(this.plugin.settings.enableNaturalLanguageInput){let r=this.getNLPInputValue().trim();if(r&&!this.title.trim()){let a=this.nlParser.parseInput(r);this.applyParsedData(a)}}if(!this.validateForm()){new xs.Notice(this.t("modals.taskCreation.notices.titleRequired"));return}try{let r=this.buildTaskData(),a=await this.plugin.taskService.createTask(r,{applyDefaults:!1}),i=a.taskInfo;if(jM(this.plugin.settings,a.taskInfo.title,a.file.basename)?new xs.Notice(this.t("modals.taskCreation.notices.successShortened",{title:i.title})):new xs.Notice(this.t("modals.taskCreation.notices.success",{title:i.title})),this.blockingItems.length>0){let s=aue(this.blockingItems);if(s.added.length>0){await this.plugin.taskService.updateBlockingRelationships(i,s.added,[],s.raw);let o=await this.plugin.cacheManager.getTaskInfo(i.path);o&&(i=o)}s.unresolved.length>0&&new xs.Notice(this.t("modals.taskCreation.notices.blockingUnresolved",{entries:s.unresolved.join(", ")})),this.blockingItems=[]}this.selectedSubtaskFiles.length>0&&await this.applySubtaskAssignments(i),this.options.onTaskCreated&&this.options.onTaskCreated(i),await this.openCreatedTaskIfConfigured(a.file,t),this.close(),t.createAnother&&window.setTimeout(()=>{new n(this.app,this.plugin,this.options).open()},0)}catch(r){$M.error("Failed to create task:",{category:"persistence",operation:"create-task",error:r});let a=Tue(r);new xs.Notice(this.t("modals.taskCreation.notices.failure",{message:a}))}}async openCreatedTaskIfConfigured(t,r){var i;let a=(i=this.plugin.settings.openTaskAfterCreation)!=null?i:"none";if(bue(a,r,!!this.options.onTaskCreated))try{await wue(this.app,t,a)}catch(s){$M.error("Failed to open created task note:",{category:"persistence",operation:"open-created-task-note",error:s}),new xs.Notice(this.t("modals.taskCreation.notices.openCreatedTaskFailure"))}}buildTaskData(){var a;let t=nue({title:this.title,dueDate:this.dueDate,scheduledDate:this.scheduledDate,priority:this.priority,status:this.status,contexts:this.contexts,projects:this.projects,tags:this.tags,timeEstimate:this.timeEstimate,recurrenceRule:this.recurrenceRule,recurrenceAnchor:this.recurrenceAnchor,reminders:this.reminders,blockedByItems:this.blockedByItems,details:this.details,userFields:this.userFields,creationContext:this.options.creationContext,taskIdentificationMethod:this.plugin.settings.taskIdentificationMethod,taskTag:this.plugin.settings.taskTag,normalizeDetails:i=>this.normalizeDetails(i)}),r=(a=this.options.prePopulatedValues)==null?void 0:a.customFrontmatter;return r&&(t.customFrontmatter={...r,...t.customFrontmatter}),t}createTitleInput(t){this.plugin.settings.enableNaturalLanguageInput||super.createTitleInput(t)}async applySubtaskAssignments(t){let r=this.app.vault.getAbstractFileByPath(t.path);r instanceof xs.TFile&&await uue({currentTaskFile:r,subtaskFiles:this.selectedSubtaskFiles,getTaskInfo:a=>this.plugin.cacheManager.getTaskInfo(a),buildProjectReference:(a,i)=>this.buildProjectReference(a,i),updateTaskProjects:(a,i)=>this.plugin.updateTaskProperty(a,"projects",i),onError:a=>{$M.error("Failed to assign subtask:",{category:"persistence",operation:"assign-subtask",error:a})}})}onClose(){this.nlMarkdownEditor&&(this.nlMarkdownEditor.destroy(),this.nlMarkdownEditor=null),this.nlpSuggest&&(this.nlpSuggest.close(),this.nlpSuggest=null),this.removeAllEventListeners(),super.onClose()}}});var wv,YM,uU=y(()=>{wv=class{constructor(){this.inFlightRequests=new Map;this.prefetchQueue=new Set;this.prefetchPromises=new Map;this.activeTimeouts=new Set}async execute(e,t,r=5e3){if(this.inFlightRequests.has(e))return this.inFlightRequests.get(e);let a=this.createRequest(e,t,r);return this.inFlightRequests.set(e,a),a}async createRequest(e,t,r){try{let a=await t(),i=window.setTimeout(()=>{this.inFlightRequests.delete(e),this.activeTimeouts.delete(i)},r);return this.activeTimeouts.add(i),a}catch(a){throw this.inFlightRequests.delete(e),a}}prefetch(e,t,r="low"){if(!(this.inFlightRequests.has(e)||this.prefetchPromises.has(e)))if(r==="high")this.executePrefetch(e,t);else if(this.prefetchQueue.add(e),"requestIdleCallback"in window)requestIdleCallback(()=>{this.processPrefetchQueue(e,t)});else{let i=window.setTimeout(()=>{this.processPrefetchQueue(e,t),this.activeTimeouts.delete(i)},50);this.activeTimeouts.add(i)}}async executePrefetch(e,t){try{let r=t();this.prefetchPromises.set(e,r),await r;let a=window.setTimeout(()=>{this.prefetchPromises.delete(e),this.activeTimeouts.delete(a)},3e4);this.activeTimeouts.add(a)}catch(r){this.prefetchPromises.delete(e)}}processPrefetchQueue(e,t){this.prefetchQueue.has(e)&&(this.prefetchQueue.delete(e),this.executePrefetch(e,t))}getPrefetchedData(e){return this.prefetchPromises.get(e)||null}cancel(e){this.inFlightRequests.delete(e),this.prefetchPromises.delete(e),this.prefetchQueue.delete(e)}cancelAll(){this.inFlightRequests.clear(),this.prefetchPromises.clear(),this.prefetchQueue.clear();for(let e of this.activeTimeouts)window.clearTimeout(e);this.activeTimeouts.clear()}getStats(){return{inFlightCount:this.inFlightRequests.size,prefetchCount:this.prefetchPromises.size,queuedCount:this.prefetchQueue.size}}},YM=class{constructor(e){this.lastAccessTime=new Map;this.deduplicator=e}recordAccess(e,t,r){let a=this.getDateKey(e);this.lastAccessTime.set(a,Date.now()),this.prefetchAdjacentDates(e,t,r)}prefetchAdjacentDates(e,t,r){this.getAdjacentDates(e).forEach(({date:i,priority:s})=>{let o=`${t}-${this.getDateKey(i)}`;this.deduplicator.prefetch(o,()=>r(i),s)})}getAdjacentDates(e){let t=[],r=new Date(e);r.setDate(e.getDate()-1),t.push({date:r,priority:"high"});let a=new Date(e);a.setDate(e.getDate()+1),t.push({date:a,priority:"high"});for(let i=2;i<=7;i++){let s=new Date(e);s.setDate(e.getDate()-i),t.push({date:s,priority:"low"});let o=new Date(e);o.setDate(e.getDate()+i),t.push({date:o,priority:"low"})}return t}getDateKey(e){return e.toISOString().split("T")[0]}cleanup(){let e=Date.now(),t=1440*60*1e3;for(let[r,a]of this.lastAccessTime)e-a>t&&this.lastAccessTime.delete(r)}}});var zVe,Sv,KM,Yue=y(()=>{q();zVe=M({tag:"Utils/DOMReconciler"}),Sv=class{constructor(){this.updateQueue=[];this.isProcessing=!1;this.activeTimeouts=new Set}scheduleUpdate(e){this.updateQueue.push(e),this.isProcessing||(this.isProcessing=!0,window.requestAnimationFrame(()=>{this.processUpdates()}))}processUpdates(){let e=[...this.updateQueue];this.updateQueue=[];try{e.forEach(t=>{try{t()}catch(r){zVe.error("Error processing DOM update:",{category:"validation",operation:"processing-dom-update",error:r})}})}finally{this.isProcessing=!1,this.updateQueue.length>0&&window.requestAnimationFrame(()=>{this.processUpdates()})}}updateAttributes(e,t){for(let[r,a]of Object.entries(t))a===null?e.removeAttribute(r):e.getAttribute(r)!==a&&e.setAttribute(r,a)}updateClasses(e,t){for(let[r,a]of Object.entries(t))a?e.classList.add(r):e.classList.remove(r)}updateTextContent(e,t){e.textContent!==t&&(e.textContent=t)}updateStyles(e,t){for(let[r,a]of Object.entries(t))a===null?e.style.removeProperty(r):e.style.setProperty(r,a)}preserveState(e){let t={scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,focused:activeDocument.activeElement===e,selection:null};return(e.instanceOf(HTMLInputElement)||e.instanceOf(HTMLTextAreaElement))&&(t.selection={start:e.selectionStart||0,end:e.selectionEnd||0}),t}restoreState(e,t){e.scrollTop=t.scrollTop,e.scrollLeft=t.scrollLeft,t.focused&&e.focus(),t.selection&&(e.instanceOf(HTMLInputElement)||e.instanceOf(HTMLTextAreaElement))&&e.setSelectionRange(t.selection.start,t.selection.end)}animateUpdate(e,t,r=1500){e.classList.add(`task-${t}`);let a=window.setTimeout(()=>{e.classList.remove(`task-${t}`),this.activeTimeouts.delete(a)},r);this.activeTimeouts.add(a)}updateList(e,t,r,a,i){let s=new Map,o=new Set;Array.from(e.children).forEach(d=>{let u=d.dataset.key;u&&(s.set(u,d),o.add(u))});let l=new Set(t.map(r)),c=activeWindow.createFragment();t.forEach(d=>{let u=r(d),p=s.get(u);if(p)i&&i(p,d),c.appendChild(p);else{let m=a(d);m.dataset.key=u,c.appendChild(m)}}),o.forEach(d=>{if(!l.has(d)){let u=s.get(d);u&&u.parentNode&&u.remove()}}),e.replaceChildren(c)}createOptimisticUpdate(e,t,r){return t(e),{commit:()=>{},revert:()=>{r(e)}}}destroy(){this.updateQueue=[],this.isProcessing=!1;for(let e of this.activeTimeouts)window.clearTimeout(e);this.activeTimeouts.clear()}},KM=class{constructor(){this.stateMap=new Map}saveState(e,t){let r=new Sv;this.stateMap.set(e,r.preserveState(t))}restoreState(e,t){let r=this.stateMap.get(e);r&&new Sv().restoreState(t,r)}clearState(e){e?this.stateMap.delete(e):this.stateMap.clear()}destroy(){this.stateMap.clear()}}});var Kue=y(()=>{yz()});var Cv,pU=y(()=>{wb();Ll();Cv=class n{constructor(e,t="open"){this.statuses=e;this.defaultStatus=t}normalizeStatusValue(e){var t;return(t=zu(e,this.statuses))!=null?t:String(e)}findStatusIndex(e,t){let r=this.normalizeStatusValue(t);return e.findIndex(a=>this.normalizeStatusValue(a.value)===r)}getCycleStatuses(){return this.getStatusesByOrder().filter(e=>!e.excludeFromCycle)}getNextStatus(e){var l,c;let t=this.getStatusConfig(e),r=t?this.normalizeStatusValue(t.value):void 0,a=t!=null&&t.nextStatus?this.normalizeStatusValue(t.nextStatus):void 0,i=a&&a!==r?this.getStatusConfig(a):void 0;if(i)return i.value;let s=this.getCycleStatuses(),o=this.findStatusIndex(s,e);if(s.length===0)return(t==null?void 0:t.value)||this.defaultStatus;if(o!==-1){let d=(o+1)%s.length;return s[d].value}return t?((c=s.find(d=>d.order>t.order))==null?void 0:c.value)||s[0].value:((l=s[0])==null?void 0:l.value)||this.defaultStatus}getPreviousStatus(e){var i,s,o;let t=this.getCycleStatuses(),r=this.findStatusIndex(t,e);if(t.length===0)return((i=this.getStatusConfig(e))==null?void 0:i.value)||this.defaultStatus;if(r!==-1){let l=(r-1+t.length)%t.length;return t[l].value}let a=this.getStatusConfig(e);return a?((o=[...t].reverse().find(l=>l.order<a.order))==null?void 0:o.value)||t[t.length-1].value:((s=t[t.length-1])==null?void 0:s.value)||this.defaultStatus}getStatusConfig(e){let t=this.normalizeStatusValue(e);return this.statuses.find(r=>this.normalizeStatusValue(r.value)===t)}getCompletedStatuses(){return this.statuses.filter(e=>e.isCompleted).map(e=>e.value)}getOpenStatuses(){return this.statuses.filter(e=>!e.isCompleted).map(e=>e.value)}getStatusesByOrder(){return[...this.statuses].sort((e,t)=>e.order-t.order)}isCompletedStatus(e){let t=this.getStatusConfig(e);return(t==null?void 0:t.isCompleted)||!1}getStatusOrder(e){let t=this.getStatusConfig(e);return(t==null?void 0:t.order)||0}getStatusColorVariables(){return this.statuses.map(e=>[`--status-${e.value.replace(/[^a-zA-Z0-9-]/g,"-")}-color`,hr(e.color)])}getAllStatuses(){return[...this.statuses]}getNonCompletionStatuses(){return this.statuses.filter(e=>!e.isCompleted)}updateStatuses(e){this.statuses=e}static validateStatuses(e){let t=[];e.length<2&&t.push("At least 2 statuses are required"),e.some(l=>l.isCompleted)||t.push("At least one status must be marked as completed");let a=e.map(l=>l.value),i=new Set(a);a.length!==i.size&&t.push("Status values must be unique");let s=e.map(l=>l.id),o=new Set(s);s.length!==o.size&&t.push("Status IDs must be unique");for(let l of e){if(!l.value||l.value.trim()===""){t.push("Status values cannot be empty");break}if(!l.label||l.label.trim()===""){t.push("Status labels cannot be empty");break}if(!M0(l.color)){t.push("Status colors must be valid CSS colors or Obsidian theme colors");break}}return{valid:t.length===0,errors:t}}static generateStatusId(e){let t=new Set(e.map(i=>i.id)),r=1,a=`status-${r}`;for(;t.has(a);)r++,a=`status-${r}`;return a}static createDefaultStatus(e){let t=n.generateStatusId(e),r=Math.max(...e.map(a=>a.order),0)+1;return{id:t,value:"new-status",label:"New status",color:"#808080",isCompleted:!1,excludeFromCycle:!1,order:r,autoArchive:!1,autoArchiveDelay:5}}}});var ZM,Zue=y(()=>{wb();Ll();ZM=class n{constructor(e){this.priorities=e}normalizePriorityValue(e){var t;return(t=Bu(e,this.priorities))!=null?t:String(e)}getPriorityConfig(e){let t=this.normalizePriorityValue(e);return this.priorities.find(r=>r.value===t)}getPrioritiesByWeight(){return[...this.priorities].sort((e,t)=>t.weight-e.weight)}getPrioritiesByWeightAsc(){return[...this.priorities].sort((e,t)=>e.weight-t.weight)}getNextPriority(e){var s;let t=this.getPrioritiesByWeightAsc(),r=this.normalizePriorityValue(e),a=t.findIndex(o=>o.value===r);if(a===-1)return((s=t[0])==null?void 0:s.value)||"normal";let i=(a+1)%t.length;return t[i].value}comparePriorities(e,t){let r=this.getPriorityConfig(e),a=this.getPriorityConfig(t),i=(r==null?void 0:r.weight)||0;return((a==null?void 0:a.weight)||0)-i}getPriorityColorVariables(){return this.priorities.map(e=>[`--priority-${e.value.replace(/[^a-zA-Z0-9-]/g,"-")}-color`,hr(e.color)])}getAllPriorities(){return[...this.priorities]}updatePriorities(e){this.priorities=e}getHighestPriority(){var t;return(t=this.getPrioritiesByWeight()[0])==null?void 0:t.value}getLowestPriority(){var t;return(t=this.getPrioritiesByWeightAsc()[0])==null?void 0:t.value}getPriorityWeight(e){let t=this.getPriorityConfig(e);return(t==null?void 0:t.weight)||0}isHigherPriority(e,t){return this.comparePriorities(e,t)>0}static validatePriorities(e){let t=[];e.length<1&&t.push("At least 1 priority is required");let r=e.map(c=>c.value),a=new Set(r);r.length!==a.size&&t.push("Priority values must be unique");let i=e.map(c=>c.id),s=new Set(i);i.length!==s.size&&t.push("Priority IDs must be unique");let o=e.map(c=>c.weight),l=new Set(o);o.length!==l.size&&t.push("Priority weights must be unique");for(let c of e){if(!c.value||c.value.trim()===""){t.push("Priority values cannot be empty");break}if(!c.label||c.label.trim()===""){t.push("Priority labels cannot be empty");break}if(!M0(c.color)){t.push("Priority colors must be valid CSS colors or Obsidian theme colors");break}if(typeof c.weight!="number"||c.weight<0){t.push("Priority weights must be non-negative numbers");break}}return{valid:t.length===0,errors:t}}static generatePriorityId(e){let t=new Set(e.map(i=>i.id)),r=1,a=`priority-${r}`;for(;t.has(a);)r++,a=`priority-${r}`;return a}static generatePriorityWeight(e){let t=e.map(r=>r.weight);return t.length===0?1:Math.max(...t)+1}static createDefaultPriority(e){let t=n.generatePriorityId(e),r=n.generatePriorityWeight(e);return{id:t,value:"new-priority",label:"New priority",color:"#808080",weight:r}}}});function Que({path:n,mappedTask:e,defaultTaskStatus:t,isBlocked:r,blockingTasks:a}){let i=e.timeEntries?oi(e.timeEntries):0;return{...e,id:n,path:n,title:e.title||"Untitled task",status:e.status||t,priority:e.priority||"normal",archived:e.archived||!1,tags:Array.isArray(e.tags)?e.tags:[],contexts:Array.isArray(e.contexts)?e.contexts:[],projects:Array.isArray(e.projects)?e.projects:[],totalTrackedTime:i,isBlocked:r,isBlocking:a.length>0,blocking:a.length>0?a:void 0}}var Jue=y(()=>{yt()});function BVe(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Xue(n,e){if(typeof n=="boolean"){let t=e.toLowerCase();if(t==="true"||t==="false")return n===(t==="true")}return n===e}function epe(n,e){if(!BVe(n))return!1;if(e.taskIdentificationMethod==="property"){let r=e.taskPropertyName,a=e.taskPropertyValue;if(!r||!a)return!1;let i=n[r];return i===void 0?!1:Array.isArray(i)?i.some(s=>Xue(s,a)):Xue(i,a)}return qo(n.tags).some(r=>ir.matchesHierarchicalTagExact(r,e.taskTag))}var tpe=y(()=>{Ad();Yg()});var po,Jf,QM,rpe=y(()=>{po=require("obsidian");Pr();wb();xe();hb();Jue();tpe();q();Jf=M({tag:"Utils/TaskManager"}),QM=class extends po.Events{constructor(t,r,a){super();this.initialized=!1;this.eventListeners=[];this.debouncedHandlers=new Map;this.DEBOUNCE_DELAY=300;this.pendingTaskInfoByPath=new Map;this.filterIndexesBuilt=!1;this.indexedTaskPaths=new Set;this.taskFilterEntries=new Map;this.statusIndex=new Map;this.priorityIndex=new Map;this.dueDateIndex=new Map;this.scheduledDateIndex=new Map;this.tagCounts=new Map;this.contextCounts=new Map;this.projectCounts=new Map;this._dependencyCache=void 0;this.app=t,this.settings=r,this.taskTag=r.taskTag,this.excludedFolders=Il(r.excludedFolders),this.fieldMapper=a,this.disableNoteIndexing=r.disableNoteIndexing,this.storeTitleInFilename=r.storeTitleInFilename}initialize(){this.initialized||(this.setupNativeEventListeners(),this.initialized=!0,this.trigger("cache-initialized",{message:"Task manager ready"}))}getApp(){return this.app}isTaskFile(t){return epe(t,this.settings)}setupNativeEventListeners(){let t=this.app.metadataCache.on("changed",(i,s,o)=>{i instanceof po.TFile&&i.extension==="md"&&this.isValidFile(i.path)&&this.handleFileChangedDebounced(i,o)});this.eventListeners.push(t);let r=this.app.metadataCache.on("deleted",(i,s)=>{i instanceof po.TFile&&i.extension==="md"&&this.handleFileDeleted(i.path,s)});this.eventListeners.push(r);let a=this.app.vault.on("rename",(i,s)=>{i instanceof po.TFile&&i.extension==="md"&&this.handleFileRenamed(i,s)});this.eventListeners.push(a)}handleFileChangedDebounced(t,r){let a=t.path,i=this.debouncedHandlers.get(a);i&&window.clearTimeout(i);let s=window.setTimeout(()=>{this.debouncedHandlers.delete(a),this.handleFileChanged(t,r)},this.DEBOUNCE_DELAY);this.debouncedHandlers.set(a,s)}async handleFileChanged(t,r){let a=null,i=!1;if(r&&typeof r=="object"&&"frontmatter"in r){let s=r.frontmatter;if(s&&this.isTaskFile(s)){let o=this.extractTaskInfoFromNative(t.path,s),l=this.getPendingTaskInfo(t.path);l&&this.shouldUsePendingTaskInfo(l,o)?a=l:(this.pendingTaskInfoByPath.delete(t.path),a=o)}else this.pendingTaskInfoByPath.delete(t.path)}i=this.updateFilterIndexesForFile(t.path,r),this.trigger("file-updated",{path:t.path,file:t,updatedTask:a,filterIndexChanged:i}),a&&this.trigger(rt,{path:t.path,task:a,taskInfo:a,updatedTask:a}),this.trigger("data-changed")}handleFileDeleted(t,r){this.pendingTaskInfoByPath.delete(t),this.removeFilterIndexEntry(t);let a=this.debouncedHandlers.get(t);a&&(window.clearTimeout(a),this.debouncedHandlers.delete(t)),this.trigger("file-deleted",{path:t,prevCache:r}),this.trigger("data-changed")}handleFileRenamed(t,r){let a=this.pendingTaskInfoByPath.get(r);a&&(this.pendingTaskInfoByPath.delete(r),this.pendingTaskInfoByPath.set(t.path,{...a,id:t.path,path:t.path}));let i=this.debouncedHandlers.get(r);i&&(window.clearTimeout(i),this.debouncedHandlers.delete(r)),this.removeFilterIndexEntry(r),this.updateFilterIndexesForFile(t.path,this.app.metadataCache.getFileCache(t)),this.trigger("file-renamed",{oldPath:r,newPath:t.path,file:t}),this.trigger("data-changed")}isValidFile(t){return!qg(t,this.excludedFolders)}async getTaskInfo(t){if(!this.isValidFile(t))return null;let r=this.app.vault.getAbstractFileByPath(t);if(!(r instanceof po.TFile))return null;let a=this.getPendingTaskInfo(t),i=this.app.metadataCache.getFileCache(r);if(!(i!=null&&i.frontmatter)){if(a)return a;if(i)return null;let o=await this.readFrontmatterFromFile(r);return!o||!this.isTaskFile(o)?null:this.extractTaskInfoFromNative(t,o)}let s=this.isTaskFile(i.frontmatter)?this.extractTaskInfoFromNative(t,i.frontmatter):null;return a&&this.shouldUsePendingTaskInfo(a,s)?a:(this.pendingTaskInfoByPath.delete(t),s)}getPendingTaskInfo(t){var a;let r=this.pendingTaskInfoByPath.get(t);return r?{...r,id:(a=r.id)!=null?a:t,path:t}:null}shouldUsePendingTaskInfo(t,r){return r?t.dateModified?r.dateModified!==t.dateModified:!1:!0}extractTaskInfoFromNative(t,r){if(!r||!this.fieldMapper||!this.isTaskFile(r))return null;try{let a=this.fieldMapper.mapFromFrontmatter(r,t,this.storeTitleInFilename),i=!1,s=[];return this._dependencyCache?(i=this._dependencyCache.isTaskBlocked(t),s=this._dependencyCache.getBlockedTaskPaths(t)):i=Array.isArray(a.blockedBy)&&a.blockedBy.length>0,Que({path:t,mappedTask:a,defaultTaskStatus:this.settings.defaultTaskStatus,isBlocked:i,blockingTasks:s})}catch(a){return Jf.error(`Error extracting task info from native metadata for ${t}:`,{category:"persistence",operation:"extracting-task-info-native-metadata",error:a}),null}}ensureFilterIndexes(){if(!this.filterIndexesBuilt){this.clearFilterIndexes();for(let t of this.app.vault.getMarkdownFiles()){if(!this.isValidFile(t.path))continue;let r=this.app.metadataCache.getFileCache(t);if(r!=null&&r.frontmatter&&this.isTaskFile(r.frontmatter)){let a=this.createFilterIndexEntry(t.path,r.frontmatter);this.addFilterIndexEntry(a)}}this.filterIndexesBuilt=!0}}updateFilterIndexesForFile(t,r){var o;if(!this.filterIndexesBuilt)return!0;if(!this.isValidFile(t))return this.removeFilterIndexEntry(t);let a=(o=this.getFrontmatterFromCache(r))!=null?o:this.getFrontmatterForPath(t);if(!a||!this.isTaskFile(a))return this.removeFilterIndexEntry(t);let i=this.createFilterIndexEntry(t,a),s=this.taskFilterEntries.get(t);return(s==null?void 0:s.signature)===i.signature?!1:(s&&this.removeFilterIndexEntry(t),this.addFilterIndexEntry(i),!0)}updateFilterIndexesFromTaskInfo(t,r){if(!this.filterIndexesBuilt)return!0;if(!this.isValidFile(t))return this.removeFilterIndexEntry(t);let a=this.createFilterIndexEntryFromTaskInfo(t,r),i=this.taskFilterEntries.get(t);return(i==null?void 0:i.signature)===a.signature?!1:(i&&this.removeFilterIndexEntry(t),this.addFilterIndexEntry(a),!0)}getFrontmatterFromCache(t){if(!t||typeof t!="object"||!("frontmatter"in t))return null;let r=t.frontmatter;return!r||typeof r!="object"||Array.isArray(r)?null:r}getFrontmatterForPath(t){let r=this.app.vault.getAbstractFileByPath(t);return r instanceof po.TFile?this.getFrontmatterFromCache(this.app.metadataCache.getFileCache(r)):null}createFilterIndexEntry(t,r){var w,S,C,x,E,_,F,I,A,R;let a=((w=this.fieldMapper)==null?void 0:w.toUserField("status"))||"status",i=((S=this.fieldMapper)==null?void 0:S.toUserField("priority"))||"priority",s=((C=this.fieldMapper)==null?void 0:C.toUserField("scheduled"))||"scheduled",o=((x=this.fieldMapper)==null?void 0:x.toUserField("due"))||"due",l=((E=this.fieldMapper)==null?void 0:E.toUserField("contexts"))||"context",c=((_=this.fieldMapper)==null?void 0:_.toUserField("projects"))||"project",d=((F=this.fieldMapper)==null?void 0:F.toUserField("timeEstimate"))||"timeEstimate",u=(I=zu(r[a],this.settings.customStatuses))!=null?I:void 0,p=(A=Bu(r[i],this.settings.customPriorities))!=null?A:void 0,m=this.normalizeDateValue(r[o]),f=this.normalizeDateValue(r[s]),h=this.normalizeStringValues(r.tags,!1),g=this.normalizeStringValues(r[l],!0),v=this.normalizeStringValues(r[c],!0),k=r[d],T=typeof k=="number"&&k>0?k:void 0,b=((R=this.settings.customStatuses)==null?void 0:R.some(O=>O.value===u&&O.isCompleted))||!1;return this.withFilterIndexSignature({path:t,status:u,priority:p,dueDate:m,scheduledDate:f,tags:h,contexts:g,projects:v,timeEstimate:T,isCompleted:b,signature:""})}createFilterIndexEntryFromTaskInfo(t,r){var m,f,h;let a=(m=zu(r.status,this.settings.customStatuses))!=null?m:void 0,i=(f=Bu(r.priority,this.settings.customPriorities))!=null?f:void 0,s=this.normalizeDateValue(r.due),o=this.normalizeDateValue(r.scheduled),l=this.normalizeStringValues(r.tags,!1),c=this.normalizeStringValues(r.contexts,!0),d=this.normalizeStringValues(r.projects,!0),u=typeof r.timeEstimate=="number"&&r.timeEstimate>0?r.timeEstimate:void 0,p=((h=this.settings.customStatuses)==null?void 0:h.some(g=>g.value===a&&g.isCompleted))||!1;return this.withFilterIndexSignature({path:t,status:a,priority:i,dueDate:s,scheduledDate:o,tags:l,contexts:c,projects:d,timeEstimate:u,isCompleted:p,signature:""})}withFilterIndexSignature(t){return{...t,signature:JSON.stringify({contexts:t.contexts,dueDate:t.dueDate,isCompleted:t.isCompleted,priority:t.priority,projects:t.projects,scheduledDate:t.scheduledDate,status:t.status,tags:t.tags,timeEstimate:t.timeEstimate})}}normalizeDateValue(t){if(typeof t!="string"||t.length===0)return;let r=re(t);return r.length>0?r:void 0}normalizeStringValues(t,r){let a=Array.isArray(t)?t:r&&t?[t]:[],i=new Set;for(let s of a){if(typeof s!="string")continue;let o=s.trim();o&&i.add(o)}return Array.from(i).sort()}addFilterIndexEntry(t){this.taskFilterEntries.set(t.path,t),this.indexedTaskPaths.add(t.path),this.addPathToIndex(this.statusIndex,t.status,t.path),this.addPathToIndex(this.priorityIndex,t.priority,t.path),this.addPathToIndex(this.dueDateIndex,t.dueDate,t.path),this.addPathToIndex(this.scheduledDateIndex,t.scheduledDate,t.path),this.incrementValues(this.tagCounts,t.tags),this.incrementValues(this.contextCounts,t.contexts),this.incrementValues(this.projectCounts,t.projects)}removeFilterIndexEntry(t){if(!this.filterIndexesBuilt)return!1;let r=this.taskFilterEntries.get(t);return r?(this.taskFilterEntries.delete(t),this.indexedTaskPaths.delete(t),this.removePathFromIndex(this.statusIndex,r.status,t),this.removePathFromIndex(this.priorityIndex,r.priority,t),this.removePathFromIndex(this.dueDateIndex,r.dueDate,t),this.removePathFromIndex(this.scheduledDateIndex,r.scheduledDate,t),this.decrementValues(this.tagCounts,r.tags),this.decrementValues(this.contextCounts,r.contexts),this.decrementValues(this.projectCounts,r.projects),!0):!1}addPathToIndex(t,r,a){if(!r)return;let i=t.get(r);if(i){i.add(a);return}t.set(r,new Set([a]))}removePathFromIndex(t,r,a){if(!r)return;let i=t.get(r);i&&(i.delete(a),i.size===0&&t.delete(r))}incrementValues(t,r){var a;for(let i of r)t.set(i,((a=t.get(i))!=null?a:0)+1)}decrementValues(t,r){var a;for(let i of r){let s=((a=t.get(i))!=null?a:0)-1;s>0?t.set(i,s):t.delete(i)}}sortedCountKeys(t){return Array.from(t.keys()).sort()}clearFilterIndexes(){this.indexedTaskPaths.clear(),this.taskFilterEntries.clear(),this.statusIndex.clear(),this.priorityIndex.clear(),this.dueDateIndex.clear(),this.scheduledDateIndex.clear(),this.tagCounts.clear(),this.contextCounts.clear(),this.projectCounts.clear()}async getAllTasks(){let t=[],r=this.app.vault.getMarkdownFiles();for(let a of r){if(!this.isValidFile(a.path))continue;let i=await this.getTaskInfo(a.path);i&&t.push(i)}return t}getAllCachedTasks(){let t=[],r=this.app.vault.getMarkdownFiles();for(let a of r){if(!this.isValidFile(a.path))continue;let i=this.getCachedTaskInfoSync(a.path);i&&t.push(i)}return t}getAllTaskPaths(){return this.ensureFilterIndexes(),new Set(this.indexedTaskPaths)}getTasksForDate(t){var a,i;let r=re(t);return this.ensureFilterIndexes(),Array.from(new Set([...(a=this.scheduledDateIndex.get(r))!=null?a:[],...(i=this.dueDateIndex.get(r))!=null?i:[]]))}getTaskPathsForDateRange(t,r,a){this.ensureFilterIndexes();let i=re(a),s=t==="due"?this.dueDateIndex:this.scheduledDateIndex,o=new Set;for(let[l,c]of s)if(this.matchesDateRange(l,r,i))for(let d of c)o.add(d);return o}matchesDateRange(t,r,a){switch(r){case"is-before":return t<a;case"is-after":return t>a;case"is-on-or-before":return t<=a;case"is-on-or-after":return t>=a;default:return!1}}getTaskPathsByStatus(t){var a,i;let r=(a=zu(t,this.settings.customStatuses))!=null?a:t;return this.ensureFilterIndexes(),Array.from((i=this.statusIndex.get(r))!=null?i:[])}getTaskPathsByPriority(t){var a,i;let r=(a=Bu(t,this.settings.customPriorities))!=null?a:t;return this.ensureFilterIndexes(),Array.from((i=this.priorityIndex.get(r))!=null?i:[])}getOverdueTaskPaths(){let t=new Set,r=zr();this.ensureFilterIndexes();for(let[a,i]of this.dueDateIndex)if(cf(a,r))for(let s of i){let o=this.taskFilterEntries.get(s);o&&!o.isCompleted&&t.add(s)}return t}getAllStatuses(){return this.ensureFilterIndexes(),Array.from(this.statusIndex.keys()).sort()}getAllPriorities(){return this.ensureFilterIndexes(),Array.from(this.priorityIndex.keys()).sort()}getAllTags(){return this.ensureFilterIndexes(),this.sortedCountKeys(this.tagCounts)}getAllContexts(){return this.ensureFilterIndexes(),this.sortedCountKeys(this.contextCounts)}getAllProjects(){return this.ensureFilterIndexes(),this.sortedCountKeys(this.projectCounts)}getAllTimeEstimates(){let t=new Map;this.ensureFilterIndexes();for(let[r,a]of this.taskFilterEntries)a.timeEstimate!==void 0&&t.set(r,a.timeEstimate);return t}async getNotesForDate(t){if(this.disableNoteIndexing)return[];let r=[],a=ae(t),i=this.app.vault.getMarkdownFiles();for(let s of i){if(!this.isValidFile(s.path))continue;let o=this.app.metadataCache.getFileCache(s);if(!(o!=null&&o.frontmatter)||this.isTaskFile(o.frontmatter))continue;(o.frontmatter.date||o.frontmatter.scheduled)===a&&r.push({path:s.path,title:this.storeTitleInFilename?s.basename:o.frontmatter.title||s.basename,tags:o.frontmatter.tags||[]})}return r}async getTaskByPath(t){return this.getTaskInfo(t)}async getCachedTaskInfo(t){return this.getTaskInfo(t)}getCachedTaskInfoSync(t){if(!this.isValidFile(t))return null;let r=this.app.vault.getAbstractFileByPath(t);if(!(r instanceof po.TFile))return null;let a=this.getPendingTaskInfo(t),i=this.app.metadataCache.getFileCache(r);if(!(i!=null&&i.frontmatter))return a;let s=this.isTaskFile(i.frontmatter)?this.extractTaskInfoFromNative(t,i.frontmatter):null;return a&&this.shouldUsePendingTaskInfo(a,s)?a:(this.pendingTaskInfoByPath.delete(t),s)}async readFrontmatterFromFile(t){try{let r=await this.app.vault.read(t);return this.parseFrontmatterFromContent(r,t.path)}catch(r){return Jf.warn(`TaskManager: Failed to read frontmatter fallback for ${t.path}`,{category:"validation",operation:"taskmanager-read-frontmatter-fallback",error:r}),null}}parseFrontmatterFromContent(t,r){let a=t.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!a)return null;try{let i=(0,po.parseYaml)(a[1]||"");return!i||typeof i!="object"||Array.isArray(i)?null:i}catch(i){let s=r?` for ${r}`:"";return Jf.warn(`TaskManager: Failed to parse frontmatter fallback${s}`,{category:"validation",operation:"taskmanager-parse-frontmatter-fallback",details:r?{path:r}:void 0,error:i}),null}}isInitialized(){return this.initialized}destroy(){this.debouncedHandlers.forEach(t=>{window.clearTimeout(t)}),this.debouncedHandlers.clear(),this.eventListeners.forEach(t=>{this.app.metadataCache.offref(t)}),this.eventListeners=[],this.clearFilterIndexes(),this.filterIndexesBuilt=!1,this.initialized=!1}setDependencyCache(t){this._dependencyCache=t}getBlockingTaskPaths(t){return this._dependencyCache?this._dependencyCache.getBlockingTaskPaths(t):(Jf.warn("DependencyCache not set in TaskManager",{category:"stale-data",operation:"dependencycache-not-set-taskmanager"}),[])}getBlockedTaskPaths(t){return this._dependencyCache?this._dependencyCache.getBlockedTaskPaths(t):(Jf.warn("DependencyCache not set in TaskManager",{category:"stale-data",operation:"dependencycache-not-set-taskmanager"}),[])}isTaskBlocked(t){return this._dependencyCache?this._dependencyCache.isTaskBlocked(t):!1}getTasksReferencingProject(t){return this._dependencyCache?this._dependencyCache.getTasksReferencingProject(t):(Jf.warn("DependencyCache not set in TaskManager",{category:"stale-data",operation:"dependencycache-not-set-taskmanager"}),[])}isFileUsedAsProject(t){return this._dependencyCache?this._dependencyCache.isFileUsedAsProject(t):!1}async waitForFreshTaskData(t,r=10){let a=typeof t=="string"?t:t.path,i=typeof t=="string"?this.app.vault.getAbstractFileByPath(a):t;if(!(i instanceof po.TFile)){await new Promise(s=>window.setTimeout(s,100));return}for(let s=0;s<r;s++){let o=this.app.metadataCache.getFileCache(i);if(o!=null&&o.frontmatter)return;await new Promise(l=>window.setTimeout(l,50*(s+1)))}Jf.warn(`TaskManager: Metadata cache not ready for ${a} after ${r} retries`,{category:"stale-data",operation:"taskmanager-metadata-cache-not-ready"})}updateConfig(t){this.settings=t,this.taskTag=t.taskTag,this.excludedFolders=Il(t.excludedFolders),this.disableNoteIndexing=t.disableNoteIndexing,this.storeTitleInFilename=t.storeTitleInFilename,this.clearFilterIndexes(),this.filterIndexesBuilt=!1,this.pruneExcludedPendingTaskInfo(),this.trigger("data-changed")}pruneExcludedPendingTaskInfo(){for(let t of this.pendingTaskInfoByPath.keys())this.isValidFile(t)||this.pendingTaskInfoByPath.delete(t)}subscribe(t,r){return this.on(t,r),()=>{this.off(t,r)}}async getCalendarData(t,r){let a=await this.getAllTasks(),i={};for(let s of a)s.scheduled&&(i[s.scheduled]||(i[s.scheduled]=[]),i[s.scheduled].push(s)),s.due&&(i[s.due]||(i[s.due]=[]),i[s.due].includes(s)||i[s.due].push(s));return i}async getTaskInfoForDate(t){let r=ae(t),a=this.getTasksForDate(r),i=[];for(let s of a){let o=await this.getTaskInfo(s);o&&i.push(o)}return i}getTaskPathsByDate(t){return new Set(this.getTasksForDate(t))}getAllProjectsWithDetails(){return[]}getAllProjectFiles(){return[]}async rebuildDailyNotesCache(t,r){}async clearAllCaches(){this.pendingTaskInfoByPath.clear(),this.clearFilterIndexes(),this.filterIndexesBuilt=!1,this.trigger("data-changed")}clearCacheEntry(t){this.pendingTaskInfoByPath.delete(t),this.removeFilterIndexEntry(t)}updateTaskInfoInCache(t,r){var i;let a=!1;if(!this.isValidFile(t)){this.pendingTaskInfoByPath.delete(t),a=this.removeFilterIndexEntry(t),this.trigger("data-changed");return}this.pendingTaskInfoByPath.set(t,{...r,id:(i=r.id)!=null?i:t,path:t}),a=this.updateFilterIndexesFromTaskInfo(t,r),this.trigger("file-updated",{path:t,updatedTask:r,filterIndexChanged:a})}}});var Xf,JM,bp,XM,mU=y(()=>{Xf=require("obsidian");Zs();hb();q();JM=M({tag:"Utils/DependencyCache"}),bp="dependency-cache-changed",XM=class extends Xf.Events{constructor(t,r,a,i,s){super();this.dependencySources=new Map;this.dependencyTargets=new Map;this.activeDependencySources=new Map;this.activeDependencyTargets=new Map;this.projectReferences=new Map;this.projectReferenceSources=new Map;this.relationshipFingerprints=new Map;this.completedStatusByPath=new Map;this.initialized=!1;this.indexesBuilt=!1;this.eventListeners=[];this.app=t,this.settings=r,this.excludedFolders=Il(r.excludedFolders),this.fieldMapper=a,this.statusManager=i,this.isTaskFileCallback=s}initialize(){this.initialized||(this.setupEventListeners(),this.initialized=!0)}async buildIndexes(){if(this.indexesBuilt)return;let t=this.app.vault.getMarkdownFiles();for(let r of t){if(!this.isValidFile(r.path))continue;let a=this.app.metadataCache.getFileCache(r);!(a!=null&&a.frontmatter)||!this.isTaskFileCallback(a.frontmatter)||this.indexTaskFile(r.path,a.frontmatter)}this.indexesBuilt=!0,this.trigger(bp)}setupEventListeners(){let t=this.app.metadataCache.on("changed",(i,s,o)=>{i instanceof Xf.TFile&&i.extension==="md"&&this.handleFileChanged(i,o)});this.eventListeners.push(t);let r=this.app.metadataCache.on("deleted",(i,s)=>{i instanceof Xf.TFile&&i.extension==="md"&&this.handleFileDeleted(i.path)});this.eventListeners.push(r);let a=this.app.vault.on("rename",(i,s)=>{i instanceof Xf.TFile&&i.extension==="md"&&this.handleFileRenamed(i,s)});this.eventListeners.push(a)}handleFileChanged(t,r){var o;let a=this.getFileRelationshipSignature(t.path);if(!this.isValidFile(t.path)){this.clearFileFromIndexes(t.path),this.triggerIfFileRelationshipsChanged(t.path,a);return}let i=(o=this.getFrontmatterFromCache(r))!=null?o:this.getFrontmatterForFile(t);if(this.updateCompletionState(t.path,i),!i){this.hasForwardRelationships(t.path)&&this.clearForwardDependencies(t.path),this.triggerIfFileRelationshipsChanged(t.path,a);return}if(!this.isTaskFileCallback(i)){this.hasForwardRelationships(t.path)&&this.clearForwardDependencies(t.path),this.triggerIfFileRelationshipsChanged(t.path,a);return}let s=this.buildRelationshipFingerprint(i);if(this.relationshipFingerprints.get(t.path)===s){this.triggerIfFileRelationshipsChanged(t.path,a);return}this.clearForwardDependencies(t.path),this.indexTaskFile(t.path,i),this.triggerIfFileRelationshipsChanged(t.path,a)}triggerIfFileRelationshipsChanged(t,r){this.getFileRelationshipSignature(t)!==r&&this.trigger(bp)}getFileRelationshipSignature(t){let r=this.sortedSetValues(this.dependencySources.get(t)),a=this.sortedSetValues(this.activeDependencyTargets.get(t)),i=this.sortedSetValues(this.projectReferenceSources.get(t)),s=this.sortedSetValues(this.projectReferences.get(t));return JSON.stringify({blockedTasks:a,blockingTasks:r,projectTasks:s,referencedProjects:i})}sortedSetValues(t){return t?Array.from(t).sort():[]}handleFileDeleted(t){this.clearFileFromIndexes(t),this.trigger(bp)}handleFileRenamed(t,r){let a=this.getFrontmatterForFile(t);this.clearFileFromIndexes(r),this.isValidFile(t.path)&&a&&this.isTaskFileCallback(a)&&this.indexTaskFile(t.path,a),this.trigger(bp)}getFrontmatterForFile(t){let r=this.app.metadataCache.getFileCache(t);return this.getFrontmatterFromCache(r)}getFrontmatterFromCache(t){if(!t||typeof t!="object"||!("frontmatter"in t))return null;let r=t.frontmatter;return!r||typeof r!="object"||Array.isArray(r)?null:r}resolveProjectReference(t,r){if(!r||typeof r!="string")return null;let a=r.trim();if(!a)return null;let i=Jo(this.app,t,a);return(i==null?void 0:i.path)||null}indexTaskFile(t,r){var l,c;if(!this.isValidFile(t))return;this.relationshipFingerprints.set(t,this.buildRelationshipFingerprint(r)),this.completedStatusByPath.set(t,this.isCompletedFrontmatter(r));let a=((l=this.fieldMapper)==null?void 0:l.toUserField("blockedBy"))||"blockedBy",i=((c=this.fieldMapper)==null?void 0:c.toUserField("projects"))||"project",s=r[a];if(s){let d=yf(s);if(d){let u=new Set;for(let p of d){let m=Jo(this.app,t,p);m!=null&&m.path&&this.isValidFile(m.path)&&this.addDependencyLink(t,m.path,u)}u.size>0&&this.dependencySources.set(t,u)}}let o=r[i];if(o){let d=Array.isArray(o)?o:[o];for(let u of d)if(typeof u=="string"){let p=this.resolveProjectReference(t,u);p&&this.isValidFile(p)&&(this.projectReferences.has(p)||this.projectReferences.set(p,new Set),this.projectReferences.get(p).add(t),this.projectReferenceSources.has(t)||this.projectReferenceSources.set(t,new Set),this.projectReferenceSources.get(t).add(p))}}}addDependencyLink(t,r,a){a.add(r),this.dependencyTargets.has(r)||this.dependencyTargets.set(r,new Set),this.dependencyTargets.get(r).add(t),this.isCompletedPath(r)||this.addActiveDependencyLink(t,r)}addActiveDependencyLink(t,r){this.activeDependencySources.has(t)||this.activeDependencySources.set(t,new Set),this.activeDependencySources.get(t).add(r),this.activeDependencyTargets.has(r)||this.activeDependencyTargets.set(r,new Set),this.activeDependencyTargets.get(r).add(t)}removeActiveDependencyLink(t,r){let a=this.activeDependencySources.get(t);a&&(a.delete(r),a.size===0&&this.activeDependencySources.delete(t));let i=this.activeDependencyTargets.get(r);i&&(i.delete(t),i.size===0&&this.activeDependencyTargets.delete(r))}rebuildActiveLinksForBlocker(t){let r=this.dependencyTargets.get(t);if(this.activeDependencyTargets.delete(t),!!r){for(let a of r){let i=this.activeDependencySources.get(a);i&&(i.delete(t),i.size===0&&this.activeDependencySources.delete(a))}if(!this.isCompletedPath(t))for(let a of r)this.addActiveDependencyLink(a,t)}}buildRelationshipFingerprint(t){var o,l,c;let r=((o=this.fieldMapper)==null?void 0:o.toUserField("blockedBy"))||"blockedBy",a=((l=this.fieldMapper)==null?void 0:l.toUserField("projects"))||"project",i=((c=yf(t[r]))!=null?c:[]).map(d=>d.uid).filter(d=>d.length>0).sort(),s=this.normalizeProjectFingerprintValues(t[a]);return JSON.stringify({dependencies:i,projects:s})}normalizeProjectFingerprintValues(t){let r=Array.isArray(t)?t:t?[t]:[],a=new Set;for(let i of r){if(typeof i!="string")continue;let s=i.trim();s&&a.add(s)}return Array.from(a).sort()}hasForwardRelationships(t){return this.relationshipFingerprints.has(t)||this.dependencySources.has(t)||this.projectReferenceSources.has(t)}updateCompletionState(t,r){var s;let a=(s=this.completedStatusByPath.get(t))!=null?s:!1,i=r?this.isCompletedFrontmatter(r):!1;this.completedStatusByPath.set(t,i),a!==i&&this.rebuildActiveLinksForBlocker(t)}isCompletedPath(t){let r=this.completedStatusByPath.get(t);if(r!==void 0)return r;let a=this.app.vault.getAbstractFileByPath(t);if(!(a instanceof Xf.TFile))return this.completedStatusByPath.set(t,!1),!1;let i=this.getFrontmatterForFile(a),s=i?this.isCompletedFrontmatter(i):!1;return this.completedStatusByPath.set(t,s),s}isCompletedFrontmatter(t){var s;let r=((s=this.fieldMapper)==null?void 0:s.toUserField("status"))||"status",a=t[r],i=this.stringifyStatusValue(a);return!!(i&&this.statusManager.isCompletedStatus(i))}stringifyStatusValue(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):null}clearForwardDependencies(t){let r=this.dependencySources.get(t);if(r){for(let i of r){let s=this.dependencyTargets.get(i);s&&(s.delete(t),s.size===0&&this.dependencyTargets.delete(i)),this.removeActiveDependencyLink(t,i)}this.dependencySources.delete(t)}this.activeDependencySources.delete(t);let a=this.projectReferenceSources.get(t);if(a){for(let i of a){let s=this.projectReferences.get(i);s&&(s.delete(t),s.size===0&&this.projectReferences.delete(i))}this.projectReferenceSources.delete(t)}this.relationshipFingerprints.delete(t)}clearFileFromIndexes(t){let r=this.dependencySources.get(t);if(r){for(let o of r){let l=this.dependencyTargets.get(o);l&&(l.delete(t),l.size===0&&this.dependencyTargets.delete(o)),this.removeActiveDependencyLink(t,o)}this.dependencySources.delete(t)}this.activeDependencySources.delete(t);let a=this.dependencyTargets.get(t);if(a){for(let o of a){let l=this.dependencySources.get(o);l&&(l.delete(t),l.size===0&&this.dependencySources.delete(o)),this.removeActiveDependencyLink(o,t)}this.dependencyTargets.delete(t)}this.activeDependencyTargets.delete(t);let i=this.projectReferenceSources.get(t);if(i){for(let o of i){let l=this.projectReferences.get(o);l&&(l.delete(t),l.size===0&&this.projectReferences.delete(o))}this.projectReferenceSources.delete(t)}let s=this.projectReferences.get(t);if(s){for(let o of s){let l=this.projectReferenceSources.get(o);l&&(l.delete(t),l.size===0&&this.projectReferenceSources.delete(o))}this.projectReferences.delete(t)}this.relationshipFingerprints.delete(t),this.completedStatusByPath.delete(t)}getBlockingTaskPaths(t){this.indexesBuilt||(JM.warn("DependencyCache: getBlockingTaskPaths called before indexes built, building now...",{category:"stale-data",operation:"dependencycache-getblockingtaskpaths-called-indexes-built-building-now"}),this.buildIndexesSync());let r=this.dependencySources.get(t);return r?Array.from(r):[]}getBlockedTaskPaths(t){this.indexesBuilt||(JM.warn("DependencyCache: getBlockedTaskPaths called before indexes built, building now...",{category:"stale-data",operation:"dependencycache-getblockedtaskpaths-called-indexes-built-building-now"}),this.buildIndexesSync());let r=this.activeDependencyTargets.get(t);return r?Array.from(r):[]}isTaskBlocked(t){var r,a;return this.indexesBuilt||this.buildIndexesSync(),((a=(r=this.activeDependencySources.get(t))==null?void 0:r.size)!=null?a:0)>0}getTasksReferencingProject(t){this.indexesBuilt||(JM.warn("DependencyCache: getTasksReferencingProject called before indexes built, building now...",{category:"stale-data",operation:"dependencycache-gettasksreferencingproject-called-indexes-built-building-now"}),this.buildIndexesSync());let r=this.projectReferences.get(t);return r?Array.from(r):[]}isFileUsedAsProject(t){return this.indexesBuilt||(JM.warn("DependencyCache: isFileUsedAsProject called before indexes built, building now...",{category:"stale-data",operation:"dependencycache-isfileusedasproject-called-indexes-built-building-now"}),this.buildIndexesSync()),this.projectReferences.has(t)}buildIndexesSync(){if(this.indexesBuilt)return;let t=this.app.vault.getMarkdownFiles();for(let r of t){if(!this.isValidFile(r.path))continue;let a=this.app.metadataCache.getFileCache(r);!(a!=null&&a.frontmatter)||!this.isTaskFileCallback(a.frontmatter)||this.indexTaskFile(r.path,a.frontmatter)}this.indexesBuilt=!0,this.trigger(bp)}updateConfig(t){this.settings=t,this.excludedFolders=Il(t.excludedFolders),this.clearIndexes(),this.indexesBuilt=!1}isValidFile(t){return!qg(t,this.excludedFolders)}clearIndexes(){this.dependencySources.clear(),this.dependencyTargets.clear(),this.activeDependencySources.clear(),this.activeDependencyTargets.clear(),this.projectReferences.clear(),this.projectReferenceSources.clear(),this.relationshipFingerprints.clear(),this.completedStatusByPath.clear()}destroy(){this.eventListeners.forEach(t=>{this.app.metadataCache.offref(t)}),this.eventListeners=[],this.clearIndexes(),this.initialized=!1,this.indexesBuilt=!1}}});function mo(n){let e=cpe(n),t=e.match(tI);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s);if(!upe(o,l,c))throw new Error(`Invalid date "${n}".`);return new Date(Date.UTC(o,l-1,c,0,0,0,0))}if(!dpe(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!rI(r))throw new Error(`Invalid date "${n}".`);return r}function $Ve(n){let e=cpe(n),t=e.match(tI);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s),d=new Date(o,l-1,c,0,0,0,0);if(!rI(d)||d.getFullYear()!==o||d.getMonth()!==l-1||d.getDate()!==c)throw new Error(`Invalid date "${n}".`);return d}if(!dpe(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!rI(r))throw new Error(`Invalid date "${n}".`);return r}function sc(n){if(!rI(n))return"";let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}function UVe(n){return sc(n)}function HVe(){let n=new Date,e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function hU(n){return mo(wp(n))}function VVe(n){if(!/^\d{4}-\d{2}-\d{2}$/.test(n))throw new Error(`Invalid date "${n}". Expected YYYY-MM-DD.`);return mo(n),n}function WVe(n){return n?/T\d{2}:\d{2}/.test(n):!1}function wp(n){if(!n)return"";let e=n.trim();if(tI.test(e))return e;let t=e.indexOf("T");if(t>-1)return e.slice(0,t);let r=e.indexOf(" ");return r>-1&&tI.test(e.slice(0,r))?e.slice(0,r):sc(mo(e))}function cpe(n,e="Date string cannot be empty"){if(!n||n.trim().length===0)throw new Error(e);return n.trim()}function dpe(n){let e=n.match(jVe);if(!e)return!1;let[,t,r,a,i,s,o,,l,c,d]=e;return upe(Number(t),Number(r),Number(a))&&qVe(Number(i),Number(s),Number(o))&&GVe(l,c,d)}function upe(n,e,t){let r=new Date(Date.UTC(n,e-1,t,0,0,0,0));return r.getUTCFullYear()===n&&r.getUTCMonth()===e-1&&r.getUTCDate()===t}function qVe(n,e,t){return n>=0&&n<=23&&e>=0&&e<=59&&t>=0&&t<=59}function GVe(n,e,t){if(!n)return!0;let r=Number(e),a=Number(t);return!(r>14||a>59||r===14&&a!==0)}function rI(n){return n instanceof Date&&!Number.isNaN(n.getTime())}function ppe(n,e){if(!n.recurrence||typeof n.recurrence!="string")return!0;try{let t=fpe(n);if(!t)return!1;let r=hU(UVe(e));return t.between(r,new Date(r.getTime()+1440*60*1e3-1),!0).length>0}catch(t){return!0}}function mpe(n,e,t){if(!n.recurrence||typeof n.recurrence!="string")return[];try{let r=fpe(n);if(!r)return[];let a=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0)),i=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),23,59,59,999));return r.between(a,i,!0)}catch(r){let a=[],i=new Date(e);for(;i<=t;)ppe(n,i)&&a.push(new Date(i)),i.setUTCDate(i.getUTCDate()+1);return a}}function YVe(n,e={}){return n.recurrence?(n.recurrence_anchor||"scheduled")==="completion"?nWe(n,e):rWe(n,e):null}function KVe(n,e=!0,t={}){let r=YVe(n,t),a=null,i=null,s=null;if(r){try{let o=n.scheduled?mo(wp(n.scheduled)):null,l=n.due?mo(wp(n.due)):null;if(o&&l){let c=!e&&l.getTime()<r.getTime();if(e||c){let d=l.getTime()-o.getTime();s=new Date(r.getTime()+d)}}}catch(o){s=null}n.scheduled&&n.scheduled.includes("T")?a=`${sc(r)}T${n.scheduled.split("T")[1]}`:a=sc(r),s&&n.due&&n.due.includes("T")?i=`${sc(s)}T${n.due.split("T")[1]}`:s&&(i=sc(s))}return{scheduled:a,due:i}}function ZVe(n){if(!n.recurrence||typeof n.recurrence!="string")return null;if(n.recurrence.includes("DTSTART:"))return n.recurrence;let e=n.scheduled||n.dateCreated;return e?`DTSTART:${gpe(e)};${n.recurrence}`:null}function QVe(n,e){if(!n||typeof n!="string")return null;let t=gpe(e);return n.includes("DTSTART:")?n.replace(/DTSTART:[^;]+;?/,`DTSTART:${t};`):`DTSTART:${t};${n}`}function fpe(n){if(!n.recurrence||typeof n.recurrence!="string")return null;let e=JVe(n);if(!e)return null;let t=n.recurrence.replace(/DTSTART:[^;]+;?/,"").replace(/^;/,"").trim(),r=npe.parseString(t);return r.dtstart=e,new npe(r)}function JVe(n){return n.recurrence?gU(n.recurrence)||(n.scheduled?hU(n.scheduled):null)||(n.dateCreated?hU(n.dateCreated):null):null}function gU(n){let e=n.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);return e?XVe(e[1],!1):null}function XVe(n,e){let t=Number(n.slice(0,4)),r=Number(n.slice(4,6))-1,a=Number(n.slice(6,8));if(n.length===8)return e?new Date(Date.UTC(t,r,a,23,59,59,999)):new Date(Date.UTC(t,r,a,0,0,0,0));let i=Number(n.slice(9,11))||0,s=Number(n.slice(11,13))||0,o=Number(n.slice(13,15))||0;return new Date(Date.UTC(t,r,a,i,s,o,0))}function eWe(n){let e=n.match(/INTERVAL=(\d+)/);return e?Number.parseInt(e[1],10):1}function hpe(n){let e=eWe(n);return n.includes("FREQ=DAILY")?Math.max(30,e*2):n.includes("FREQ=WEEKLY")?Math.max(90,e*7*2):n.includes("FREQ=MONTHLY")?Math.max(400,e*31*2):n.includes("FREQ=YEARLY")?Math.max(800,e*366*2):365}function gpe(n){if(WVe(n)){let e=$Ve(n),t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return`${t}${r}${a}T${i}${s}${o}Z`}return tWe(mo(n))}function tWe(n){let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}${t}${r}`}function rWe(n,e){if(!n.recurrence)return null;let t=mo(e.today||lpe()),r=hpe(n.recurrence),a=t,i=gU(n.recurrence);i&&i<t&&(a=i);let s=new Date(t.getTime()+r*24*60*60*1e3),o=mpe(n,a,s),l=new Set([...n.complete_instances||[],...n.skipped_instances||[]]);for(let c of o){let d=sc(c);if(!l.has(d)&&c>=t)return c}return null}function nWe(n,e){if(!n.recurrence||typeof n.recurrence!="string")return null;let t=mo(e.today||lpe()),r=hpe(n.recurrence),a=gU(n.recurrence),i=a||t,s=new Date(i.getTime()+r*24*60*60*1e3),o=mpe(n,i,s),l=new Set(n.skipped_instances||[]),c=a?a.getTime():0;for(let d of o){let u=sc(d);if(d.getTime()>c&&d>=t&&!l.has(u))return d}return null}function aWe(n){let e=n.toLowerCase();return e==="true"||e==="false"?e==="true":n}function iWe(n){let e=n.trim(),t=e.match(/^\[\[([^|\]#]+)(?:#[^\]|]+)?(?:\|[^\]]+)?\]\]$/);if(t)return t[1].trim();let r=e.match(/^\[[^\]]+\]\(([^)#]+)(?:#[^)]+)?\)$/);return r?decodeURI(r[1].trim()):e}function ype(n,e="manual"){return lWe(n.occurrence_materialization)?n.occurrence_materialization:e}function sWe(n,e="completion"){return cWe(n.occurrence_next_trigger)?n.occurrence_next_trigger:e}function FC(n){return typeof n.recurrence_parent=="string"&&typeof n.occurrence_date=="string"}function eh(n){return n?iWe(n).replace(/\\/g,"/").replace(/^\/+/,"").replace(/\.md$/i,"").trim().toLowerCase():""}function vpe(n){return`[[${n.path.replace(/\.md$/i,"")}]]`}function yU(n,e,t,r=vpe(e)){let a=eh(e.path),i=eh(r);return n.find(s=>{if(s.occurrence_date!==t||!s.recurrence_parent)return!1;let o=eh(s.recurrence_parent);return o===a||o===i})}function vU({parentTask:n,targetDate:e,currentTimestamp:t,existingOccurrences:r=[],parentLink:a,defaultStatus:i=n.status,defaultPriority:s=n.priority,templateTask:o={},overrides:l={},allowNonGeneratedTarget:c=!0}){var v,k,T,b,w,S,C,x,E,_,F,I,A,R;if(!n.recurrence)throw new Error("occurrence_parent_not_recurring");let d=kU(e),u=a||vpe(n),p=yU(r,n,d,u),m=[];if(yWe(n,d)||m.push({code:"materialization_target_not_generated",message:`Target date "${d}" is not generated by the parent recurrence rule.`,severity:c?"warning":"error",field:"occurrence_date"}),p)return{kind:"occurrence.materialize",parentTask:n,targetDate:d,parentReference:u,created:!1,existingOccurrence:p,occurrenceTask:p,fields:xv(p),issues:m,metadata:{idempotent:!0}};let f=dWe(n,d),h=hWe(f.customProperties,o.customProperties,l.customProperties),g=Epe({...f,...o,...l,id:void 0,path:void 0,archived:void 0,status:(k=(v=l.status)!=null?v:o.status)!=null?k:i,priority:(w=(b=(T=l.priority)!=null?T:o.priority)!=null?b:n.priority)!=null?w:s,scheduled:(x=(C=(S=l.scheduled)!=null?S:o.scheduled)!=null?C:f.scheduled)!=null?x:d,due:(_=(E=l.due)!=null?E:o.due)!=null?_:f.due,customProperties:h,recurrence:void 0,recurrence_anchor:void 0,complete_instances:void 0,skipped_instances:void 0,recurrence_parent:u,occurrence_date:d,occurrence_materialization:void 0,occurrence_next_trigger:void 0,occurrence_template:void 0,occurrence_past_horizon:void 0,occurrence_future_horizon:void 0,completedDate:void 0,timeEntries:void 0,totalTrackedTime:void 0,icsEventId:void 0,googleCalendarEventId:void 0,googleCalendarExceptionEventId:void 0,googleCalendarExceptionOriginalScheduled:void 0,googleCalendarMovedOriginalDates:void 0,basesData:void 0,blocking:void 0,isBlocked:void 0,isBlocking:void 0,hasSubtasks:void 0,dateCreated:(I=(F=l.dateCreated)!=null?F:o.dateCreated)!=null?I:t,dateModified:(R=(A=l.dateModified)!=null?A:o.dateModified)!=null?R:t});return{kind:"occurrence.materialize",parentTask:n,targetDate:d,parentReference:u,created:!0,occurrenceTask:g,fields:xv(g),issues:m,metadata:{idempotent:!1,template:n.occurrence_template}}}function kpe({occurrenceTask:n,parentTask:e,completedStatus:t,currentTimestamp:r,targetDate:a,completionDate:i,maintainDueDateOffsetInRecurring:s}){let o=nI(n,a);if(aI(n,o),!e.recurrence)throw new Error("occurrence_parent_not_recurring");let l=i===void 0?o:kU(i),c=(e.recurrence_anchor||"scheduled")==="completion"?l:o,d=Dpe(Ev(e.complete_instances),o),u=Ev(e.skipped_instances).filter(v=>v!==o),p=xpe({parentTask:e,targetDate:c,completeInstances:d,skippedInstances:u,currentTimestamp:r,maintainDueDateOffsetInRecurring:s,advanceCompletionAnchor:!0}),m={status:t,completedDate:l,dateModified:r},f={...e,...p},h={...n,...m},g=ype(e)==="on_completion"?wp(f.scheduled||""):void 0;return iI({kind:"occurrence.complete",targetDate:o,occurrenceTask:n,parentTask:e,updatedOccurrenceTask:h,updatedParentTask:f,occurrenceUpdates:m,parentUpdates:p,currentTimestamp:r,materializeNextDate:g,metadata:{trigger:"completion"}})}function Tpe({occurrenceTask:n,parentTask:e,activeStatus:t,currentTimestamp:r,targetDate:a}){let i=nI(n,a);aI(n,i);let s={complete_instances:Ev(e.complete_instances).filter(l=>l!==i),dateModified:r},o={status:t,completedDate:void 0,dateModified:r};return iI({kind:"occurrence.uncomplete",targetDate:i,occurrenceTask:n,parentTask:e,updatedOccurrenceTask:{...n,...o},updatedParentTask:{...e,...s},occurrenceUpdates:o,parentUpdates:s,currentTimestamp:r,metadata:{trigger:"uncomplete"}})}function bpe({occurrenceTask:n,parentTask:e,skippedStatus:t,currentTimestamp:r,targetDate:a,maintainDueDateOffsetInRecurring:i}){if(!t)throw new Error("missing_skipped_status");let s=nI(n,a);if(aI(n,s),!e.recurrence)throw new Error("occurrence_parent_not_recurring");let o=Dpe(Ev(e.skipped_instances),s),l=Ev(e.complete_instances).filter(m=>m!==s),c=xpe({parentTask:e,targetDate:s,completeInstances:l,skippedInstances:o,currentTimestamp:r,maintainDueDateOffsetInRecurring:i,advanceCompletionAnchor:!1}),d={status:t,completedDate:void 0,dateModified:r},u={...e,...c},p=ype(e)==="on_completion"&&sWe(e)==="completion_or_skip"?wp(u.scheduled||""):void 0;return iI({kind:"occurrence.skip",targetDate:s,occurrenceTask:n,parentTask:e,updatedOccurrenceTask:{...n,...d},updatedParentTask:u,occurrenceUpdates:d,parentUpdates:c,currentTimestamp:r,materializeNextDate:p,metadata:{trigger:"skip"}})}function wpe({occurrenceTask:n,parentTask:e,activeStatus:t,currentTimestamp:r,targetDate:a}){let i=nI(n,a);aI(n,i);let s={skipped_instances:Ev(e.skipped_instances).filter(l=>l!==i),dateModified:r},o={status:t,completedDate:void 0,dateModified:r};return iI({kind:"occurrence.unskip",targetDate:i,occurrenceTask:n,parentTask:e,updatedOccurrenceTask:{...n,...o},updatedParentTask:{...e,...s},occurrenceUpdates:o,parentUpdates:s,currentTimestamp:r,metadata:{trigger:"unskip"}})}function Spe(n,e){let t=[];for(let[r,a]of Object.entries(n)){let i=oWe(e,r);i&&(a===void 0||Array.isArray(a)&&a.length===0?t.push({op:"delete",field:i}):r==="status"?t.push({op:"set",field:i,value:aWe(String(a))}):t.push({op:"set",field:i,value:a}))}return t}function xv(n){let e={};return xr(e,"title",n.title),xr(e,"status",n.status),xr(e,"priority",n.priority),xr(e,"due",n.due),xr(e,"scheduled",n.scheduled),xr(e,"completedDate",n.completedDate),xr(e,"dateCreated",n.dateCreated),xr(e,"dateModified",n.dateModified),xr(e,"recurrence",n.recurrence),xr(e,"recurrenceAnchor",n.recurrence_anchor),xr(e,"completeInstances",n.complete_instances),xr(e,"skippedInstances",n.skipped_instances),xr(e,"recurrenceParent",n.recurrence_parent),xr(e,"occurrenceDate",n.occurrence_date),xr(e,"occurrenceMaterialization",n.occurrence_materialization),xr(e,"occurrenceNextTrigger",n.occurrence_next_trigger),xr(e,"occurrenceTemplate",n.occurrence_template),xr(e,"occurrencePastHorizon",n.occurrence_past_horizon),xr(e,"occurrenceFutureHorizon",n.occurrence_future_horizon),xr(e,"timeEntries",n.timeEntries),xr(e,"tags",n.tags),xr(e,"contexts",n.contexts),xr(e,"projects",n.projects),xr(e,"attachments",n.attachments),xr(e,"timeEstimate",n.timeEstimate),xr(e,"blockedBy",n.blockedBy),xr(e,"reminders",n.reminders),e}function oWe(n,e){let r={title:"title",status:"status",priority:"priority",due:"due",scheduled:"scheduled",contexts:"contexts",projects:"projects",attachments:"attachments",timeEstimate:"timeEstimate",completedDate:"completedDate",dateCreated:"dateCreated",dateModified:"dateModified",recurrence:"recurrence",recurrence_anchor:"recurrenceAnchor",complete_instances:"completeInstances",skipped_instances:"skippedInstances",recurrence_parent:"recurrenceParent",occurrence_date:"occurrenceDate",occurrence_materialization:"occurrenceMaterialization",occurrence_next_trigger:"occurrenceNextTrigger",occurrence_template:"occurrenceTemplate",occurrence_past_horizon:"occurrencePastHorizon",occurrence_future_horizon:"occurrenceFutureHorizon",timeEntries:"timeEntries",blockedBy:"blockedBy",reminders:"reminders",sortOrder:"sortOrder"}[e];return r?n[r]:void 0}function lWe(n){return n==="manual"||n==="on_completion"||n==="rolling"}function cWe(n){return n==="completion"||n==="completion_or_skip"}function kU(n){return VVe(n instanceof Date?sc(n):wp(n))}function nI(n,e){var t;return kU((t=e!=null?e:n.occurrence_date)!=null?t:"")}function aI(n,e){if(!n.recurrence_parent||!n.occurrence_date)throw new Error("task_not_materialized_occurrence");if(n.occurrence_date!==e)throw new Error("occurrence_date_mismatch")}function dWe(n,e){let t=n.scheduled?ape(n.scheduled,n.scheduled,e):e,r=n.due?ape(n.due,n.scheduled||n.due,e):void 0;return Epe({title:n.title,priority:n.priority,due:r,scheduled:t,contexts:eI(n.contexts),projects:eI(n.projects),attachments:eI(n.attachments),tags:eI(n.tags),timeEstimate:n.timeEstimate,reminders:ipe(n.reminders),blockedBy:ipe(n.blockedBy),details:n.details,customProperties:fWe(n.customProperties)})}function ape(n,e,t){try{let r=wp(n),a=wp(e);if(!r||!a)return;let i=pWe(a,r),s=mWe(t,i);return uWe(n,s)}catch(r){return}}function uWe(n,e){var a;let r=n.trim().match(/^(\d{4}-\d{2}-\d{2})(.*)$/);return r?`${e}${(a=r[2])!=null?a:""}`:e}function pWe(n,e){let r=mo(n).getTime(),a=mo(e).getTime();return Math.round((a-r)/864e5)}function mWe(n,e){let t=mo(n);return t.setUTCDate(t.getUTCDate()+e),sc(t)}function eI(n){return Array.isArray(n)?[...n]:void 0}function ipe(n){return Array.isArray(n)?n.map(e=>({...e})):void 0}function fWe(n){if(!(!n||Object.keys(n).length===0))return Cpe(n)}function hWe(...n){let e={};for(let t of n)t&&Object.assign(e,Cpe(t));return Object.keys(e).length>0?e:void 0}function Cpe(n){let e={};for(let[t,r]of Object.entries(n))Array.isArray(r)?e[t]=[...r]:gWe(r)?e[t]={...r}:e[t]=r;return e}function gWe(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function yWe(n,e){try{return ppe(n,mo(e))}catch(t){return!1}}function xpe({parentTask:n,targetDate:e,completeInstances:t,skippedInstances:r,currentTimestamp:a,maintainDueDateOffsetInRecurring:i,advanceCompletionAnchor:s}){let o=n.recurrence;typeof o=="string"&&o.length>0&&(s&&(n.recurrence_anchor||"scheduled")==="completion"?o=QVe(o,e)||o:o.includes("DTSTART:")||(o=ZVe(n)||o));let l={...n,recurrence:o,complete_instances:t,skipped_instances:r},c=KVe(l,i,{today:e}),d={recurrence:o,complete_instances:t,skipped_instances:r,dateModified:a};return c.scheduled&&(d.scheduled=c.scheduled),c.due&&(d.due=c.due),d}function iI({kind:n,targetDate:e,occurrenceTask:t,parentTask:r,updatedOccurrenceTask:a,updatedParentTask:i,occurrenceUpdates:s,parentUpdates:o,currentTimestamp:l,materializeNextDate:c,metadata:d}){return{kind:n,targetDate:e,updatedOccurrenceTask:a,updatedParentTask:i,occurrenceUpdates:s,parentUpdates:o,occurrenceFields:xv(s),parentFields:xv(o),dateModified:l,changed:spe(t,s)||spe(r,o),materializeNextDate:c||void 0,metadata:d}}function spe(n,e){return Object.entries(e).some(([t,r])=>n[t]!==r)}function Epe(n){let e={};for(let[t,r]of Object.entries(n))r!==void 0&&(e[t]=r);return e}function xr(n,e,t){t!==void 0&&(n[e]=t)}function Dpe(n,e){return n.includes(e)?n:[...n,e]}function Ev(n){return Array.isArray(n)?n.filter(e=>typeof e=="string"):[]}var tI,jVe,lpe,fU,ope,npe,TU=y(()=>{ny();tI=/^(\d{4})-(\d{2})-(\d{2})$/,jVe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,3})?(?:Z|([+-])(\d{2}):(\d{2}))?$/;lpe=HVe;fU=Reflect.get(Uu,"default"),npe=(ope=ye)!=null?ope:fU==null?void 0:fU.RRule});function rr(n){if(n&&typeof n=="object")switch(n[mi]){case cl:case Yd:return!0}return!1}function Rt(n){if(n&&typeof n=="object")switch(n[mi]){case sI:case cl:case Es:case Yd:return!0}return!1}var sI,oI,cl,bU,Es,Yd,mi,fo,ho,go,Et,dt,yo,lI,Wt=y(()=>{sI=Symbol.for("yaml.alias"),oI=Symbol.for("yaml.document"),cl=Symbol.for("yaml.map"),bU=Symbol.for("yaml.pair"),Es=Symbol.for("yaml.scalar"),Yd=Symbol.for("yaml.seq"),mi=Symbol.for("yaml.node.type"),fo=n=>!!n&&typeof n=="object"&&n[mi]===sI,ho=n=>!!n&&typeof n=="object"&&n[mi]===oI,go=n=>!!n&&typeof n=="object"&&n[mi]===cl,Et=n=>!!n&&typeof n=="object"&&n[mi]===bU,dt=n=>!!n&&typeof n=="object"&&n[mi]===Es,yo=n=>!!n&&typeof n=="object"&&n[mi]===Yd;lI=n=>(dt(n)||rr(n))&&!!n.anchor});function dl(n,e){let t=Ape(e);ho(n)?Dv(null,n.contents,t,Object.freeze([n]))===oc&&(n.contents=null):Dv(null,n,t,Object.freeze([]))}function Dv(n,e,t,r){let a=Mpe(n,e,t,r);if(Rt(a)||Et(a))return Ipe(n,r,a),Dv(n,a,t,r);if(typeof a!="symbol"){if(rr(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){let s=Dv(i,e.items[i],t,r);if(typeof s=="number")i=s-1;else{if(s===Bi)return Bi;s===oc&&(e.items.splice(i,1),i-=1)}}}else if(Et(e)){r=Object.freeze(r.concat(e));let i=Dv("key",e.key,t,r);if(i===Bi)return Bi;i===oc&&(e.key=null);let s=Dv("value",e.value,t,r);if(s===Bi)return Bi;s===oc&&(e.value=null)}}return a}async function LC(n,e){let t=Ape(e);ho(n)?await Pv(null,n.contents,t,Object.freeze([n]))===oc&&(n.contents=null):await Pv(null,n,t,Object.freeze([]))}async function Pv(n,e,t,r){let a=await Mpe(n,e,t,r);if(Rt(a)||Et(a))return Ipe(n,r,a),Pv(n,a,t,r);if(typeof a!="symbol"){if(rr(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){let s=await Pv(i,e.items[i],t,r);if(typeof s=="number")i=s-1;else{if(s===Bi)return Bi;s===oc&&(e.items.splice(i,1),i-=1)}}}else if(Et(e)){r=Object.freeze(r.concat(e));let i=await Pv("key",e.key,t,r);if(i===Bi)return Bi;i===oc&&(e.key=null);let s=await Pv("value",e.value,t,r);if(s===Bi)return Bi;s===oc&&(e.value=null)}}return a}function Ape(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Mpe(n,e,t,r){var a,i,s,o,l;if(typeof t=="function")return t(n,e,r);if(go(e))return(a=t.Map)==null?void 0:a.call(t,n,e,r);if(yo(e))return(i=t.Seq)==null?void 0:i.call(t,n,e,r);if(Et(e))return(s=t.Pair)==null?void 0:s.call(t,n,e,r);if(dt(e))return(o=t.Scalar)==null?void 0:o.call(t,n,e,r);if(fo(e))return(l=t.Alias)==null?void 0:l.call(t,n,e,r)}function Ipe(n,e,t){let r=e[e.length-1];if(rr(r))r.items[n]=t;else if(Et(r))n==="key"?r.key=t:r.value=t;else if(ho(r))r.contents=t;else{let a=fo(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}var Bi,Ppe,oc,OC=y(()=>{Wt();Bi=Symbol("break visit"),Ppe=Symbol("skip children"),oc=Symbol("remove node");dl.BREAK=Bi;dl.SKIP=Ppe;dl.REMOVE=oc;LC.BREAK=Bi;LC.SKIP=Ppe;LC.REMOVE=oc});var vWe,kWe,lc,wU=y(()=>{Wt();OC();vWe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},kWe=n=>n.replace(/[!,[\]{}]/g,e=>vWe[e]),lc=class n{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},n.defaultYaml,e),this.tags=Object.assign({},n.defaultTags,t)}clone(){let e=new n(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new n(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:n.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},n.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:n.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},n.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),a=r.shift();switch(a){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[i,s]=r;return this.tags[i]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let s=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,s),!1}}default:return t(0,`Unknown directive ${a}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let s=e.slice(2,-1);return s==="!"||s==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),s)}let[,r,a]=e.match(/^(.*!)([^!]*)$/s);a||t(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(a)}catch(s){return t(String(s)),null}return r==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+kWe(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),a;if(e&&r.length>0&&Rt(e.contents)){let i={};dl(e.contents,(s,o)=>{Rt(o)&&o.tag&&(i[o.tag]=!0)}),a=Object.keys(i)}else a=[];for(let[i,s]of r)i==="!!"&&s==="tag:yaml.org,2002:"||(!e||a.some(o=>o.startsWith(s)))&&t.push(`%TAG ${i} ${s}`);return t.join(`
`)}};lc.defaultYaml={explicit:!1,version:"1.2"};lc.defaultTags={"!!":"tag:yaml.org,2002:"}});function cI(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function SU(n){let e=new Set;return dl(n,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function CU(n,e){for(let t=1;;++t){let r=`${n}${t}`;if(!e.has(r))return r}}function Npe(n,e){let t=[],r=new Map,a=null;return{onAnchor:i=>{t.push(i),a!=null||(a=SU(n));let s=CU(e,a);return a.add(s),s},setAnchors:()=>{for(let i of t){let s=r.get(i);if(typeof s=="object"&&s.anchor&&(dt(s.node)||rr(s.node)))s.node.anchor=s.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=i,o}}},sourceObjects:r}}var dI=y(()=>{Wt();OC()});function Sp(n,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let a=0,i=r.length;a<i;++a){let s=r[a],o=Sp(n,r,String(a),s);o===void 0?delete r[a]:o!==s&&(r[a]=o)}else if(r instanceof Map)for(let a of Array.from(r.keys())){let i=r.get(a),s=Sp(n,r,a,i);s===void 0?r.delete(a):s!==i&&r.set(a,s)}else if(r instanceof Set)for(let a of Array.from(r)){let i=Sp(n,r,a,a);i===void 0?r.delete(a):i!==a&&(r.delete(a),r.add(i))}else for(let[a,i]of Object.entries(r)){let s=Sp(n,r,a,i);s===void 0?delete r[a]:s!==i&&(r[a]=s)}return n.call(e,t,r)}var xU=y(()=>{});function Gn(n,e,t){if(Array.isArray(n))return n.map((r,a)=>Gn(r,String(a),t));if(n&&typeof n.toJSON=="function"){if(!t||!lI(n))return n.toJSON(e,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(n,r),t.onCreate=i=>{r.res=i,delete t.onCreate};let a=n.toJSON(e,t);return t.onCreate&&t.onCreate(a),a}return typeof n=="bigint"&&!(t!=null&&t.keep)?Number(n):n}var Cp=y(()=>{Wt()});var xp,uI=y(()=>{xU();Wt();Cp();xp=class{constructor(e){Object.defineProperty(this,mi,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:a,reviver:i}={}){if(!ho(e))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=Gn(this,"",s);if(typeof a=="function")for(let{count:l,res:c}of s.anchors.values())a(c,l);return typeof i=="function"?Sp(i,{"":o},"",o):o}}});function pI(n,e,t){if(fo(e)){let r=e.resolve(n),a=t&&r&&t.get(r);return a?a.count*a.aliasCount:0}else if(rr(e)){let r=0;for(let a of e.items){let i=pI(n,a,t);i>r&&(r=i)}return r}else if(Et(e)){let r=pI(n,e.key,t),a=pI(n,e.value,t);return Math.max(r,a)}return 1}var cc,zC=y(()=>{dI();OC();Wt();uI();Cp();cc=class extends xp{constructor(e){super(sI),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if((t==null?void 0:t.maxAliasCount)===0)throw new ReferenceError("Alias resolution is disabled");let r;t!=null&&t.aliasResolveCache?r=t.aliasResolveCache:(r=[],dl(e,{Node:(i,s)=>{(fo(s)||lI(s))&&r.push(s)}}),t&&(t.aliasResolveCache=r));let a;for(let i of r){if(i===this)break;i.anchor===this.source&&(a=i)}return a}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:a,maxAliasCount:i}=t,s=this.resolve(a,t);if(!s){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=r.get(s);if(o||(Gn(s,null,t),o=r.get(s)),(o==null?void 0:o.res)===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=pI(a,s,r)),o.count*o.aliasCount>i)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(e,t,r){let a=`*${this.source}`;if(e){if(cI(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${a} `}return a}}});var mI,Pe,Fn=y(()=>{Wt();uI();Cp();mI=n=>!n||typeof n!="function"&&typeof n!="object",Pe=class extends xp{constructor(e){super(Es),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Gn(this.value,e,t)}toString(){return String(this.value)}};Pe.BLOCK_FOLDED="BLOCK_FOLDED";Pe.BLOCK_LITERAL="BLOCK_LITERAL";Pe.PLAIN="PLAIN";Pe.QUOTE_DOUBLE="QUOTE_DOUBLE";Pe.QUOTE_SINGLE="QUOTE_SINGLE"});function bWe(n,e,t){var r;if(e){let a=t.filter(s=>s.tag===e),i=(r=a.find(s=>!s.format))!=null?r:a[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(a=>{var i;return((i=a.identify)==null?void 0:i.call(a,n))&&!a.format})}function Kd(n,e,t){var u,p,m,f;if(ho(n)&&(n=n.contents),Rt(n))return n;if(Et(n)){let h=(p=(u=t.schema[cl]).createNode)==null?void 0:p.call(u,t.schema,null,t);return h.items.push(n),h}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt!="undefined"&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:r,onAnchor:a,onTagObj:i,schema:s,sourceObjects:o}=t,l;if(r&&n&&typeof n=="object"){if(l=o.get(n),l)return(m=l.anchor)!=null||(l.anchor=a(n)),new cc(l.anchor);l={anchor:null,node:null},o.set(n,l)}e!=null&&e.startsWith("!!")&&(e=TWe+e.slice(2));let c=bWe(n,e,s.tags);if(!c){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){let h=new Pe(n);return l&&(l.node=h),h}c=n instanceof Map?s[cl]:Symbol.iterator in Object(n)?s[Yd]:s[cl]}i&&(i(c),delete t.onTagObj);let d=c!=null&&c.createNode?c.createNode(t.schema,n,t):typeof((f=c==null?void 0:c.nodeClass)==null?void 0:f.from)=="function"?c.nodeClass.from(t.schema,n,t):new Pe(n);return e?d.tag=e:c.default||(d.tag=c.tag),l&&(l.node=d),d}var TWe,BC=y(()=>{zC();Wt();Fn();TWe="tag:yaml.org,2002:"});function jC(n,e,t){let r=t;for(let a=e.length-1;a>=0;--a){let i=e[a];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let s=[];s[i]=r,r=s}else r=new Map([[i,r]])}return Kd(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}var Mv,Av,fI=y(()=>{BC();Wt();uI();Mv=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done,Av=class extends xp{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>Rt(r)||Et(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Mv(e))this.add(t);else{let[r,...a]=e,i=this.get(r,!0);if(rr(i))i.addIn(a,t);else if(i===void 0&&this.schema)this.set(r,jC(this.schema,a,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let a=this.get(t,!0);if(rr(a))return a.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...a]=e,i=this.get(r,!0);return a.length===0?!t&&dt(i)?i.value:i:rr(i)?i.getIn(a,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Et(t))return!1;let r=t.value;return r==null||e&&dt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let a=this.get(t,!0);return rr(a)?a.hasIn(r):!1}setIn(e,t){let[r,...a]=e;if(a.length===0)this.set(r,t);else{let i=this.get(r,!0);if(rr(i))i.setIn(a,t);else if(i===void 0&&this.schema)this.set(r,jC(this.schema,a,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}}});function vo(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}var Rpe,dc,$C=y(()=>{Rpe=n=>n.replace(/^(?!$)(?: $)?/gm,"#");dc=(n,e,t)=>n.endsWith(`
`)?vo(t,e):t.includes(`
`)?`
`+vo(t,e):(n.endsWith(" ")?"":" ")+t});function HC(n,e,t="flow",{indentAtStart:r,lineWidth:a=80,minContentWidth:i=20,onFold:s,onOverflow:o}={}){if(!a||a<0)return n;a<i&&(i=0);let l=Math.max(1+i,1+a-e.length);if(n.length<=l)return n;let c=[],d={},u=a-e.length;typeof r=="number"&&(r>a-Math.max(2,i)?c.push(0):u=a-r);let p,m,f=!1,h=-1,g=-1,v=-1;t===hI&&(h=_pe(n,h,e.length),h!==-1&&(u=h+l));for(let T;T=n[h+=1];){if(t===UC&&T==="\\"){switch(g=h,n[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}v=h}if(T===`
`)t===hI&&(h=_pe(n,h,e.length)),u=h+e.length+l,p=void 0;else{if(T===" "&&m&&m!==" "&&m!==`
`&&m!==" "){let b=n[h+1];b&&b!==" "&&b!==`
`&&b!==" "&&(p=h)}if(h>=u)if(p)c.push(p),u=p+l,p=void 0;else if(t===UC){for(;m===" "||m===" ";)m=T,T=n[h+=1],f=!0;let b=h>v+1?h-2:g-1;if(d[b])return n;c.push(b),d[b]=!0,u=b+l,p=void 0}else f=!0}m=T}if(f&&o&&o(),c.length===0)return n;s&&s();let k=n.slice(0,c[0]);for(let T=0;T<c.length;++T){let b=c[T],w=c[T+1]||n.length;b===0?k=`
${e}${n.slice(0,w)}`:(t===UC&&d[b]&&(k+=`${n[b]}\\`),k+=`
${e}${n.slice(b+1,w)}`)}return k}function _pe(n,e,t){let r=e,a=e+1,i=n[a];for(;i===" "||i===" ";)if(e<a+t)i=n[++e];else{do i=n[++e];while(i&&i!==`
`);r=e,a=e+1,i=n[a]}return r}var EU,hI,UC,Fpe=y(()=>{EU="flow",hI="block",UC="quoted"});function wWe(n,e,t){if(!e||e<0)return!1;let r=e-t,a=n.length;if(a<=r)return!1;for(let i=0,s=0;i<a;++i)if(n[i]===`
`){if(i-s>r)return!0;if(s=i+1,a-s<=r)return!1}return!0}function VC(n,e){let t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:r}=e,a=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(vI(n)?" ":""),s="",o=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(s+=t.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{s+=t.slice(o,l);let d=t.substr(l+2,4);switch(d){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:d.substr(0,2)==="00"?s+="\\x"+d.substr(2):s+=t.substr(l,6)}l+=5,o=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<a)l+=1;else{for(s+=t.slice(o,l)+`
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)s+=`
`,l+=2;s+=i,t[l+2]===" "&&(s+="\\"),l+=1,o=l+1}break;default:l+=1}return s=o?s+t.slice(o):t,r?s:HC(s,i,UC,yI(e,!1))}function DU(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
`)||/[ \t]\n|\n[ \t]/.test(n))return VC(n,e);let t=e.indent||(vI(n)?" ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
${t}`)+"'";return e.implicitKey?r:HC(r,t,EU,yI(e,!1))}function Iv(n,e){let{singleQuote:t}=e.options,r;if(t===!1)r=VC;else{let a=n.includes('"'),i=n.includes("'");a&&!i?r=DU:i&&!a?r=VC:r=t?DU:VC}return r(n,e)}function gI({comment:n,type:e,value:t},r,a,i){let{blockQuote:s,commentString:o,lineWidth:l}=r.options;if(!s||/\n[\t ]+$/.test(t))return Iv(t,r);let c=r.indent||(r.forceBlockIndent||vI(t)?" ":""),d=s==="literal"?!0:s==="folded"||e===Pe.BLOCK_FOLDED?!1:e===Pe.BLOCK_LITERAL?!0:!wWe(t,l,c.length);if(!t)return d?`|
`:`>
`;let u,p;for(p=t.length;p>0;--p){let w=t[p-1];if(w!==`
`&&w!==" "&&w!==" ")break}let m=t.substring(p),f=m.indexOf(`
`);f===-1?u="-":t===m||f!==m.length-1?(u="+",i&&i()):u="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
`&&(m=m.slice(0,-1)),m=m.replace(PU,`$&${c}`));let h=!1,g,v=-1;for(g=0;g<t.length;++g){let w=t[g];if(w===" ")h=!0;else if(w===`
`)v=g;else break}let k=t.substring(0,v<g?v+1:g);k&&(t=t.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let b=(h?c?"2":"1":"")+u;if(n&&(b+=" "+o(n.replace(/ ?[\r\n]+/g," ")),a&&a()),!d){let w=t.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),S=!1,C=yI(r,!0);s!=="folded"&&e!==Pe.BLOCK_FOLDED&&(C.onOverflow=()=>{S=!0});let x=HC(`${k}${w}${m}`,c,hI,C);if(!S)return`>${b}
${c}${x}`}return t=t.replace(/\n+/g,`$&${c}`),`|${b}
${c}${k}${t}${m}`}function SWe(n,e,t,r){let{type:a,value:i}=n,{actualString:s,implicitKey:o,indent:l,indentStep:c,inFlow:d}=e;if(o&&i.includes(`
`)||d&&/[[\]{},]/.test(i))return Iv(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||d||!i.includes(`
`)?Iv(i,e):gI(n,e,t,r);if(!o&&!d&&a!==Pe.PLAIN&&i.includes(`
`))return gI(n,e,t,r);if(vI(i)){if(l==="")return e.forceBlockIndent=!0,gI(n,e,t,r);if(o&&l===c)return Iv(i,e)}let u=i.replace(/\n+/g,`$&
${l}`);if(s){let p=h=>{var g;return h.default&&h.tag!=="tag:yaml.org,2002:str"&&((g=h.test)==null?void 0:g.test(u))},{compat:m,tags:f}=e.doc.schema;if(f.some(p)||m!=null&&m.some(p))return Iv(i,e)}return o?u:HC(u,l,EU,yI(e,!1))}function Zd(n,e,t,r){let{implicitKey:a,inFlow:i}=e,s=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)}),{type:o}=n;o!==Pe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=Pe.QUOTE_DOUBLE);let l=d=>{switch(d){case Pe.BLOCK_FOLDED:case Pe.BLOCK_LITERAL:return a||i?Iv(s.value,e):gI(s,e,t,r);case Pe.QUOTE_DOUBLE:return VC(s.value,e);case Pe.QUOTE_SINGLE:return DU(s.value,e);case Pe.PLAIN:return SWe(s,e,t,r);default:return null}},c=l(o);if(c===null){let{defaultKeyType:d,defaultStringType:u}=e.options,p=a&&d||u;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}var yI,vI,PU,WC=y(()=>{Fn();Fpe();yI=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),vI=n=>/^(%|---|\.\.\.)/m.test(n);try{PU=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch(n){PU=/\n+(?!\n|$)/g}});function kI(n,e){let t=Object.assign({blockQuote:!0,commentString:Rpe,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function CWe(n,e){var a,i,s,o;if(e.tag){let l=n.filter(c=>c.tag===e.tag);if(l.length>0)return(a=l.find(c=>c.format===e.format))!=null?a:l[0]}let t,r;if(dt(e)){r=e.value;let l=n.filter(c=>{var d;return(d=c.identify)==null?void 0:d.call(c,r)});if(l.length>1){let c=l.filter(d=>d.test);c.length>0&&(l=c)}t=(i=l.find(c=>c.format===e.format))!=null?i:l.find(c=>!c.format)}else r=e,t=n.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!t){let l=(o=(s=r==null?void 0:r.constructor)==null?void 0:s.name)!=null?o:r===null?"null":typeof r;throw new Error(`Tag not resolved for ${l} value`)}return t}function xWe(n,e,{anchors:t,doc:r}){var o;if(!r.directives)return"";let a=[],i=(dt(n)||rr(n))&&n.anchor;i&&cI(i)&&(t.add(i),a.push(`&${i}`));let s=(o=n.tag)!=null?o:e.default?null:e.tag;return s&&a.push(r.directives.tagString(s)),a.join(" ")}function Qd(n,e,t,r){var l,c;if(Et(n))return n.toString(e,t,r);if(fo(n)){if(e.doc.directives)return n.toString(e);if((l=e.resolvedAliases)!=null&&l.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let a,i=Rt(n)?n:e.doc.createNode(n,{onTagObj:d=>a=d});a!=null||(a=CWe(e.doc.schema.tags,i));let s=xWe(i,a,e);s.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+s.length+1);let o=typeof a.stringify=="function"?a.stringify(i,e,t,r):dt(i)?Zd(i,e,t,r):i.toString(e,t,r);return s?dt(i)||o[0]==="{"||o[0]==="["?`${s} ${o}`:`${s}
${e.indent}${o}`:o}var qC=y(()=>{dI();Wt();$C();WC()});function Lpe({key:n,value:e},t,r,a){var C,x;let{allNullValues:i,doc:s,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=t,p=Rt(n)&&n.comment||null;if(u){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(rr(n)||!Rt(n)&&typeof n=="object"){let E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let m=!u&&(!n||p&&e==null&&!t.inFlow||rr(n)||(dt(n)?n.type===Pe.BLOCK_FOLDED||n.type===Pe.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(u||!i),indent:o+l});let f=!1,h=!1,g=Qd(n,t,()=>f=!0,()=>h=!0);if(!m&&!t.inFlow&&g.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(i||e==null)return f&&r&&r(),g===""?"?":m?`? ${g}`:g}else if(i&&!u||e==null&&m)return g=`? ${g}`,p&&!f?g+=dc(g,t.indent,c(p)):h&&a&&a(),g;f&&(p=null),m?(p&&(g+=dc(g,t.indent,c(p))),g=`? ${g}
${o}:`):(g=`${g}:`,p&&(g+=dc(g,t.indent,c(p))));let v,k,T;Rt(e)?(v=!!e.spaceBefore,k=e.commentBefore,T=e.comment):(v=!1,k=null,T=null,e&&typeof e=="object"&&(e=s.createNode(e))),t.implicitKey=!1,!m&&!p&&dt(e)&&(t.indentAtStart=g.length+1),h=!1,!d&&l.length>=2&&!t.inFlow&&!m&&yo(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let b=!1,w=Qd(e,t,()=>b=!0,()=>h=!0),S=" ";if(p||v||k){if(S=v?`
`:"",k){let E=c(k);S+=`
${vo(E,t.indent)}`}w===""&&!t.inFlow?S===`
`&&T&&(S=`
`):S+=`
${t.indent}`}else if(!m&&rr(e)){let E=w[0],_=w.indexOf(`
`),F=_!==-1,I=(x=(C=t.inFlow)!=null?C:e.flow)!=null?x:e.items.length===0;if(F||!I){let A=!1;if(F&&(E==="&"||E==="!")){let R=w.indexOf(" ");E==="&"&&R!==-1&&R<_&&w[R+1]==="!"&&(R=w.indexOf(" ",R+1)),(R===-1||_<R)&&(A=!0)}A||(S=`
${t.indent}`)}}else(w===""||w[0]===`
`)&&(S="");return g+=S+w,t.inFlow?b&&r&&r():T&&!b?g+=dc(g,t.indent,c(T)):h&&a&&a(),g}var Ope=y(()=>{Wt();Fn();qC();$C()});function TI(n,e){(n==="debug"||n==="warn")&&console.warn(e)}var AU=y(()=>{});function IU(n,e,t){let r=Bpe(n,t);if(yo(r))for(let a of r.items)MU(n,e,a);else if(Array.isArray(r))for(let a of r)MU(n,e,a);else MU(n,e,r)}function MU(n,e,t){let r=Bpe(n,t);if(!go(r))throw new Error("Merge sources must be maps or map aliases");let a=r.toJSON(null,n,Map);for(let[i,s]of a)e instanceof Map?e.has(i)||e.set(i,s):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}function Bpe(n,e){return n&&fo(e)?e.resolve(n.doc,n):e}var bI,ul,zpe,wI=y(()=>{Wt();Fn();bI="<<",ul={identify:n=>n===bI||typeof n=="symbol"&&n.description===bI,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Pe(Symbol(bI)),{addToJSMap:IU}),stringify:()=>bI},zpe=(n,e)=>(ul.identify(e)||dt(e)&&(!e.type||e.type===Pe.PLAIN)&&ul.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(t=>t.tag===ul.tag&&t.default))});function SI(n,e,{key:t,value:r}){if(Rt(t)&&t.addToJSMap)t.addToJSMap(n,e,r);else if(zpe(n,t))IU(n,e,r);else{let a=Gn(t,"",n);if(e instanceof Map)e.set(a,Gn(r,a,n));else if(e instanceof Set)e.add(a);else{let i=EWe(t,a,n),s=Gn(r,i,n);i in e?Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[i]=s}}return e}function EWe(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Rt(n)&&(t!=null&&t.doc)){let r=kI(t.doc,{});r.anchors=new Set;for(let i of t.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;let a=n.toString(r);if(!t.mapKeyWarned){let i=JSON.stringify(a);i.length>40&&(i=i.substring(0,36)+'..."'),TI(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return a}return JSON.stringify(e)}var NU=y(()=>{AU();wI();qC();Wt();Cp()});function Nv(n,e,t){let r=Kd(n,void 0,t),a=Kd(e,void 0,t);return new an(r,a)}var an,Ep=y(()=>{BC();Ope();NU();Wt();an=class n{constructor(e,t=null){Object.defineProperty(this,mi,{value:bU}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return Rt(t)&&(t=t.clone(e)),Rt(r)&&(r=r.clone(e)),new n(t,r)}toJSON(e,t){let r=t!=null&&t.mapAsMap?new Map:{};return SI(t,r,this)}toString(e,t,r){return e!=null&&e.doc?Lpe(this,e,t,r):JSON.stringify(this)}}});function xI(n,e,t){var i;return(((i=e.inFlow)!=null?i:n.flow)?PWe:DWe)(n,e,t)}function DWe({comment:n,items:e},t,{blockItemPrefix:r,flowChars:a,itemIndent:i,onChompKeep:s,onComment:o}){let{indent:l,options:{commentString:c}}=t,d=Object.assign({},t,{indent:i,type:null}),u=!1,p=[];for(let f=0;f<e.length;++f){let h=e[f],g=null;if(Rt(h))!u&&h.spaceBefore&&p.push(""),CI(t,p,h.commentBefore,u),h.comment&&(g=h.comment);else if(Et(h)){let k=Rt(h.key)?h.key:null;k&&(!u&&k.spaceBefore&&p.push(""),CI(t,p,k.commentBefore,u))}u=!1;let v=Qd(h,d,()=>g=null,()=>u=!0);g&&(v+=dc(v,i,c(g))),u&&g&&(u=!1),p.push(r+v)}let m;if(p.length===0)m=a.start+a.end;else{m=p[0];for(let f=1;f<p.length;++f){let h=p[f];m+=h?`
${l}${h}`:`
`}}return n?(m+=`
`+vo(c(n),l),o&&o()):u&&s&&s(),m}function PWe({items:n},e,{flowChars:t,itemIndent:r}){let{indent:a,indentStep:i,flowCollectionPadding:s,options:{commentString:o}}=e;r+=i;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let f=0;f<n.length;++f){let h=n[f],g=null;if(Rt(h))h.spaceBefore&&u.push(""),CI(e,u,h.commentBefore,!1),h.comment&&(g=h.comment);else if(Et(h)){let k=Rt(h.key)?h.key:null;k&&(k.spaceBefore&&u.push(""),CI(e,u,k.commentBefore,!1),k.comment&&(c=!0));let T=Rt(h.value)?h.value:null;T?(T.comment&&(g=T.comment),T.commentBefore&&(c=!0)):h.value==null&&(k!=null&&k.comment)&&(g=k.comment)}g&&(c=!0);let v=Qd(h,l,()=>g=null);c||(c=u.length>d||v.includes(`
`)),f<n.length-1?v+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=u.reduce((k,T)=>k+T.length+2,2)+(v.length+2)>e.options.lineWidth)),c&&(v+=",")),g&&(v+=dc(v,r,o(g))),u.push(v),d=u.length}let{start:p,end:m}=t;if(u.length===0)return p+m;if(!c){let f=u.reduce((h,g)=>h+g.length+2,2);c=e.options.lineWidth>0&&f>e.options.lineWidth}if(c){let f=p;for(let h of u)f+=h?`
${i}${a}${h}`:`
`;return`${f}
${a}${m}`}else return`${p}${s}${u.join(" ")}${s}${m}`}function CI({indent:n,options:{commentString:e}},t,r,a){if(r&&a&&(r=r.replace(/^\n+/,"")),r){let i=vo(e(r),n);t.push(i.trimStart())}}var RU=y(()=>{Wt();qC();$C()});function Dp(n,e){let t=dt(e)?e.value:e;for(let r of n)if(Et(r)&&(r.key===e||r.key===t||dt(r.key)&&r.key.value===t))return r}var hn,Pp=y(()=>{RU();NU();fI();Wt();Ep();Fn();hn=class extends Av{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(cl,e),this.items=[]}static from(e,t,r){let{keepUndefined:a,replacer:i}=r,s=new this(e),o=(l,c)=>{if(typeof i=="function")c=i.call(t,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||a)&&s.items.push(Nv(l,c,r))};if(t instanceof Map)for(let[l,c]of t)o(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))o(l,t[l]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,t){var s;let r;Et(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new an(e,e==null?void 0:e.value):r=new an(e.key,e.value);let a=Dp(this.items,r.key),i=(s=this.schema)==null?void 0:s.sortMapEntries;if(a){if(!t)throw new Error(`Key ${r.key} already set`);dt(a.value)&&mI(r.value)?a.value.value=r.value:a.value=r.value}else if(i){let o=this.items.findIndex(l=>i(r,l)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let t=Dp(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var i;let r=Dp(this.items,e),a=r==null?void 0:r.value;return(i=!t&&dt(a)?a.value:a)!=null?i:void 0}has(e){return!!Dp(this.items,e)}set(e,t){this.add(new an(e,t),!0)}toJSON(e,t,r){let a=r?new r:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(a);for(let i of this.items)SI(t,a,i);return a}toString(e,t,r){if(!e)return JSON.stringify(this);for(let a of this.items)if(!Et(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),xI(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}});var pl,Rv=y(()=>{Wt();Pp();pl={collection:"map",default:!0,nodeClass:hn,tag:"tag:yaml.org,2002:map",resolve(n,e){return go(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>hn.from(n,e,t)}});function EI(n){let e=dt(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var ka,Ap=y(()=>{BC();RU();fI();Wt();Fn();Cp();ka=class extends Av{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Yd,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=EI(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let r=EI(e);if(typeof r!="number")return;let a=this.items[r];return!t&&dt(a)?a.value:a}has(e){let t=EI(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=EI(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let a=this.items[r];dt(a)&&mI(t)?a.value=t:this.items[r]=t}toJSON(e,t){let r=[];t!=null&&t.onCreate&&t.onCreate(r);let a=0;for(let i of this.items)r.push(Gn(i,String(a++),t));return r}toString(e,t,r){return e?xI(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:a}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let s=0;for(let o of t){if(typeof a=="function"){let l=t instanceof Set?o:String(s++);o=a.call(t,l,o)}i.items.push(Kd(o,void 0,r))}}return i}}});var ml,_v=y(()=>{Wt();Ap();ml={collection:"seq",default:!0,nodeClass:ka,tag:"tag:yaml.org,2002:seq",resolve(n,e){return yo(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>ka.from(n,e,t)}});var Mp,GC=y(()=>{WC();Mp={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,r){return e=Object.assign({actualString:!0},e),Zd(n,e,t,r)}}});var th,DI=y(()=>{Fn();th={identify:n=>n==null,createNode:()=>new Pe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Pe(null),stringify:({source:n},e)=>typeof n=="string"&&th.test.test(n)?n:e.options.nullStr}});var YC,_U=y(()=>{Fn();YC={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new Pe(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&YC.test.test(n)){let r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?t.options.trueStr:t.options.falseStr}}});function Ha({format:n,minFractionDigits:e,tag:t,value:r}){if(typeof r=="bigint")return String(r);let a=typeof r=="number"?r:Number(r);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let s=i.indexOf(".");s<0&&(s=i.length,i+=".");let o=e-(i.length-s-1);for(;o-- >0;)i+="0"}return i}var Fv=y(()=>{});var PI,AI,MI,FU=y(()=>{Fn();Fv();PI={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ha},AI={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():Ha(n)}},MI={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){let e=new Pe(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:Ha}});function jpe(n,e,t){let{value:r}=n;return II(r)&&r>=0?t+r.toString(e):Ha(n)}var II,LU,NI,RI,_I,OU=y(()=>{Fv();II=n=>typeof n=="bigint"||Number.isInteger(n),LU=(n,e,t,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),t);NI={identify:n=>II(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>LU(n,2,8,t),stringify:n=>jpe(n,8,"0o")},RI={identify:II,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>LU(n,0,10,t),stringify:Ha},_I={identify:n=>II(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>LU(n,2,16,t),stringify:n=>jpe(n,16,"0x")}});var $pe,Upe=y(()=>{Rv();DI();_v();GC();_U();FU();OU();$pe=[pl,ml,Mp,th,YC,NI,RI,_I,PI,AI,MI]});function Hpe(n){return typeof n=="bigint"||Number.isInteger(n)}var FI,AWe,MWe,Vpe,Wpe=y(()=>{Fn();Rv();_v();FI=({value:n})=>JSON.stringify(n),AWe=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:FI},{identify:n=>n==null,createNode:()=>new Pe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:FI},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:FI},{identify:Hpe,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>Hpe(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:FI}],MWe={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},Vpe=[pl,ml].concat(AWe,MWe)});var KC,zU=y(()=>{Fn();WC();KC={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof atob=="function"){let t=atob(n.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let a=0;a<t.length;++a)r[a]=t.charCodeAt(a);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},r,a,i){if(!t)return"";let s=t,o;if(typeof btoa=="function"){let l="";for(let c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);o=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e!=null||(e=Pe.BLOCK_LITERAL),e!==Pe.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(o.length/l),d=new Array(c);for(let u=0,p=0;u<c;++u,p+=l)d[u]=o.substr(p,l);o=d.join(e===Pe.BLOCK_LITERAL?`
`:" ")}return Zd({comment:n,type:e,value:o},r,a,i)}}});function BU(n,e){var t;if(yo(n))for(let r=0;r<n.items.length;++r){let a=n.items[r];if(!Et(a)){if(go(a)){a.items.length>1&&e("Each pair must have its own sequence indicator");let i=a.items[0]||new an(new Pe(null));if(a.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${a.commentBefore}
${i.key.commentBefore}`:a.commentBefore),a.comment){let s=(t=i.value)!=null?t:i.key;s.comment=s.comment?`${a.comment}
${s.comment}`:a.comment}a=i}n.items[r]=Et(a)?a:new an(a)}}else e("Expected a sequence for this tag");return n}function jU(n,e,t){let{replacer:r}=t,a=new ka(n);a.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof r=="function"&&(s=r.call(e,String(i++),s));let o,l;if(Array.isArray(s))if(s.length===2)o=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)o=c[0],l=s[o];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=s;a.items.push(Nv(o,l,t))}return a}var ZC,LI=y(()=>{Wt();Ep();Fn();Ap();ZC={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:BU,createNode:jU}});var Lv,QC,$U=y(()=>{Wt();Cp();Pp();Ap();LI();Lv=class n extends ka{constructor(){super(),this.add=hn.prototype.add.bind(this),this.delete=hn.prototype.delete.bind(this),this.get=hn.prototype.get.bind(this),this.has=hn.prototype.has.bind(this),this.set=hn.prototype.set.bind(this),this.tag=n.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t!=null&&t.onCreate&&t.onCreate(r);for(let a of this.items){let i,s;if(Et(a)?(i=Gn(a.key,"",t),s=Gn(a.value,i,t)):i=Gn(a,"",t),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,s)}return r}static from(e,t,r){let a=jU(e,t,r),i=new this;return i.items=a.items,i}};Lv.tag="tag:yaml.org,2002:omap";QC={collection:"seq",identify:n=>n instanceof Map,nodeClass:Lv,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){let t=BU(n,e),r=[];for(let{key:a}of t.items)dt(a)&&(r.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):r.push(a.value));return Object.assign(new Lv,t)},createNode:(n,e,t)=>Lv.from(n,e,t)}});function qpe({value:n,source:e},t){return e&&(n?UU:HU).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}var UU,HU,Gpe=y(()=>{Fn();UU={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Pe(!0),stringify:qpe},HU={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Pe(!1),stringify:qpe}});var Ype,Kpe,Zpe,Qpe=y(()=>{Fn();Fv();Ype={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ha},Kpe={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():Ha(n)}},Zpe={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){let e=new Pe(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){let r=n.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Ha}});function OI(n,e,t,{intAsBigInt:r}){let a=n[0];if((a==="-"||a==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}let s=BigInt(n);return a==="-"?BigInt(-1)*s:s}let i=parseInt(n,t);return a==="-"?-1*i:i}function VU(n,e,t){let{value:r}=n;if(JC(r)){let a=r.toString(e);return r<0?"-"+t+a.substr(1):t+a}return Ha(n)}var JC,Jpe,Xpe,eme,tme,rme=y(()=>{Fv();JC=n=>typeof n=="bigint"||Number.isInteger(n);Jpe={identify:JC,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>OI(n,2,2,t),stringify:n=>VU(n,2,"0b")},Xpe={identify:JC,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>OI(n,1,8,t),stringify:n=>VU(n,8,"0")},eme={identify:JC,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>OI(n,0,10,t),stringify:Ha},tme={identify:JC,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>OI(n,2,16,t),stringify:n=>VU(n,16,"0x")}});var Ov,XC,WU=y(()=>{Wt();Ep();Pp();Ov=class n extends hn{constructor(e){super(e),this.tag=n.tag}add(e){let t;Et(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new an(e.key,null):t=new an(e,null),Dp(this.items,t.key)||this.items.push(t)}get(e,t){let r=Dp(this.items,e);return!t&&Et(r)?dt(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Dp(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new an(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){let{replacer:a}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let s of t)typeof a=="function"&&(s=a.call(t,s,s)),i.items.push(Nv(s,null,r));return i}};Ov.tag="tag:yaml.org,2002:set";XC={collection:"map",identify:n=>n instanceof Set,nodeClass:Ov,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>Ov.from(n,e,t),resolve(n,e){if(go(n)){if(n.hasAllNullValues(!0))return Object.assign(new Ov,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}}});function qU(n,e){let t=n[0],r=t==="-"||t==="+"?n.substring(1):n,a=s=>e?BigInt(s):Number(s),i=r.replace(/_/g,"").split(":").reduce((s,o)=>s*a(60)+a(o),a(0));return t==="-"?a(-1)*i:i}function nme(n){let{value:e}=n,t=s=>s;if(typeof e=="bigint")t=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return Ha(n);let r="";e<0&&(r="-",e*=t(-1));let a=t(60),i=[e%a];return e<60?i.unshift(0):(e=(e-i[0])/a,i.unshift(e%a),e>=60&&(e=(e-i[0])/a,i.unshift(e))),r+i.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var zI,BI,zv,GU=y(()=>{Fv();zI={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>qU(n,t),stringify:nme},BI={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>qU(n,!1),stringify:nme},zv={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){let e=n.match(zv.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,a,i,s,o]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,r-1,a,i||0,s||0,o||0,l),d=e[8];if(d&&d!=="Z"){let u=qU(d,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:n})=>{var e;return(e=n==null?void 0:n.toISOString().replace(/(T00:00:00)?\.000Z$/,""))!=null?e:""}}});var YU,ame=y(()=>{Rv();DI();_v();GC();zU();Gpe();Qpe();rme();wI();$U();LI();WU();GU();YU=[pl,ml,Mp,th,UU,HU,Jpe,Xpe,eme,tme,Ype,Kpe,Zpe,KC,ul,QC,ZC,XC,zI,BI,zv]});function jI(n,e,t){let r=ime.get(e);if(r&&!n)return t&&!r.includes(ul)?r.concat(ul):r.slice();let a=r;if(!a)if(Array.isArray(n))a=[];else{let i=Array.from(ime.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(n))for(let i of n)a=a.concat(i);else typeof n=="function"&&(a=n(a.slice()));return t&&(a=a.concat(ul)),a.reduce((i,s)=>{let o=typeof s=="string"?sme[s]:s;if(!o){let l=JSON.stringify(s),c=Object.keys(sme).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return i.includes(o)||i.push(o),i},[])}var ime,sme,ome,lme=y(()=>{Rv();DI();_v();GC();_U();FU();OU();Upe();Wpe();zU();wI();$U();LI();ame();WU();GU();ime=new Map([["core",$pe],["failsafe",[pl,ml,Mp]],["json",Vpe],["yaml11",YU],["yaml-1.1",YU]]),sme={binary:KC,bool:YC,float:MI,floatExp:AI,floatNaN:PI,floatTime:BI,int:RI,intHex:_I,intOct:NI,intTime:zI,map:pl,merge:ul,null:th,omap:QC,pairs:ZC,seq:ml,set:XC,timestamp:zv},ome={"tag:yaml.org,2002:binary":KC,"tag:yaml.org,2002:merge":ul,"tag:yaml.org,2002:omap":QC,"tag:yaml.org,2002:pairs":ZC,"tag:yaml.org,2002:set":XC,"tag:yaml.org,2002:timestamp":zv}});var IWe,Bv,KU=y(()=>{Wt();Rv();_v();GC();lme();IWe=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0,Bv=class n{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:a,schema:i,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(e)?jI(e,"compat"):e?jI(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=a?ome:{},this.tags=jI(t,this.name,r),this.toStringOptions=o!=null?o:null,Object.defineProperty(this,cl,{value:pl}),Object.defineProperty(this,Es,{value:Mp}),Object.defineProperty(this,Yd,{value:ml}),this.sortMapEntries=typeof s=="function"?s:s===!0?IWe:null}clone(){let e=Object.create(n.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}});function cme(n,e){var l;let t=[],r=e.directives===!0;if(e.directives!==!1&&n.directives){let c=n.directives.toString(n);c?(t.push(c),r=!0):n.directives.docStart&&(r=!0)}r&&t.push("---");let a=kI(n,e),{commentString:i}=a.options;if(n.commentBefore){t.length!==1&&t.unshift("");let c=i(n.commentBefore);t.unshift(vo(c,""))}let s=!1,o=null;if(n.contents){if(Rt(n.contents)){if(n.contents.spaceBefore&&r&&t.push(""),n.contents.commentBefore){let u=i(n.contents.commentBefore);t.push(vo(u,""))}a.forceBlockIndent=!!n.comment,o=n.contents.comment}let c=o?void 0:()=>s=!0,d=Qd(n.contents,a,()=>o=null,c);o&&(d+=dc(d,"",i(o))),(d[0]==="|"||d[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${d}`:t.push(d)}else t.push(Qd(n.contents,a));if((l=n.directives)!=null&&l.docEnd)if(n.comment){let c=i(n.comment);c.includes(`
`)?(t.push("..."),t.push(vo(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=n.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||o)&&t[t.length-1]!==""&&t.push(""),t.push(vo(i(c),"")))}return t.join(`
`)+`
`}var dme=y(()=>{Wt();qC();$C()});function jv(n){if(rr(n))return!0;throw new Error("Expected a YAML collection as document contents")}var uc,ex=y(()=>{zC();fI();Wt();Ep();Cp();KU();dme();dI();xU();BC();wU();uc=class n{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,mi,{value:oI});let a=null;typeof t=="function"||Array.isArray(t)?a=t:r===void 0&&t&&(r=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:s}=i;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new lc({version:s}),this.setSchema(s,r),this.contents=e===void 0?null:this.createNode(e,a,r)}clone(){let e=Object.create(n.prototype,{[mi]:{value:oI}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Rt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){jv(this.contents)&&this.contents.add(e)}addIn(e,t){jv(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=SU(this);e.anchor=!t||r.has(t)?CU(t||"a",r):t}return new cc(e.anchor)}createNode(e,t,r){let a;if(typeof t=="function")e=t.call({"":e},"",e),a=t;else if(Array.isArray(t)){let g=k=>typeof k=="number"||k instanceof String||k instanceof Number,v=t.filter(g).map(String);v.length>0&&(t=t.concat(v)),a=t}else r===void 0&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:s,flow:o,keepUndefined:l,onTagObj:c,tag:d}=r!=null?r:{},{onAnchor:u,setAnchors:p,sourceObjects:m}=Npe(this,s||"a"),f={aliasDuplicateObjects:i!=null?i:!0,keepUndefined:l!=null?l:!1,onAnchor:u,onTagObj:c,replacer:a,schema:this.schema,sourceObjects:m},h=Kd(e,d,f);return o&&rr(h)&&(h.flow=!0),p(),h}createPair(e,t,r={}){let a=this.createNode(e,null,r),i=this.createNode(t,null,r);return new an(a,i)}delete(e){return jv(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Mv(e)?this.contents==null?!1:(this.contents=null,!0):jv(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return rr(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Mv(e)?!t&&dt(this.contents)?this.contents.value:this.contents:rr(this.contents)?this.contents.getIn(e,t):void 0}has(e){return rr(this.contents)?this.contents.has(e):!1}hasIn(e){return Mv(e)?this.contents!==void 0:rr(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=jC(this.schema,[e],t):jv(this.contents)&&this.contents.set(e,t)}setIn(e,t){Mv(e)?this.contents=t:this.contents==null?this.contents=jC(this.schema,Array.from(e),t):jv(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new lc({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new lc({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let a=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new Bv(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:a,onAnchor:i,reviver:s}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},l=Gn(this.contents,t!=null?t:"",o);if(typeof i=="function")for(let{count:c,res:d}of o.anchors.values())i(d,c);return typeof s=="function"?Sp(s,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return cme(this,e)}}});var $v,Ds,Uv,tx,rx=y(()=>{$v=class extends Error{constructor(e,t,r,a){super(),this.name=e,this.code=r,this.message=a,this.pos=t}},Ds=class extends $v{constructor(e,t,r){super("YAMLParseError",e,t,r)}},Uv=class extends $v{constructor(e,t,r){super("YAMLWarning",e,t,r)}},tx=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(o=>e.linePos(o));let{line:r,col:a}=t.linePos[0];t.message+=` at line ${r}, column ${a}`;let i=a-1,s=n.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){let o=Math.min(i-39,s.length-79);s="…"+s.substring(o),i-=o-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,i))){let o=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`…
`),s=o+s}if(/[^ ]/.test(s)){let o=1,l=t.linePos[1];(l==null?void 0:l.line)===r&&l.col>a&&(o=Math.max(1,Math.min(l.col-a,80-i)));let c=" ".repeat(i)+"^".repeat(o);t.message+=`:
${s}
${c}
`}}});function pc(n,{flow:e,indicator:t,next:r,offset:a,onError:i,parentIndent:s,startOnNewline:o}){let l=!1,c=o,d=o,u="",p="",m=!1,f=!1,h=null,g=null,v=null,k=null,T=null,b=null,w=null;for(let x of n)switch(f&&(x.type!=="space"&&x.type!=="newline"&&x.type!=="comma"&&i(x.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f=!1),h&&(c&&x.type!=="comment"&&x.type!=="newline"&&i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),x.type){case"space":!e&&(t!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&x.source.includes(" ")&&(h=x),d=!0;break;case"comment":{d||i(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let E=x.source.substring(1)||" ";u?u+=p+E:u=E,p="",c=!1;break}case"newline":c?u?u+=x.source:(!b||t!=="seq-item-ind")&&(l=!0):p+=x.source,c=!0,m=!0,(g||v)&&(k=x),d=!0;break;case"anchor":g&&i(x,"MULTIPLE_ANCHORS","A node can have at most one anchor"),x.source.endsWith(":")&&i(x.offset+x.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=x,w!=null||(w=x.offset),c=!1,d=!1,f=!0;break;case"tag":{v&&i(x,"MULTIPLE_TAGS","A node can have at most one tag"),v=x,w!=null||(w=x.offset),c=!1,d=!1,f=!0;break}case t:(g||v)&&i(x,"BAD_PROP_ORDER",`Anchors and tags must be after the ${x.source} indicator`),b&&i(x,"UNEXPECTED_TOKEN",`Unexpected ${x.source} in ${e!=null?e:"collection"}`),b=x,c=t==="seq-item-ind"||t==="explicit-key-ind",d=!1;break;case"comma":if(e){T&&i(x,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),T=x,c=!1,d=!1;break}default:i(x,"UNEXPECTED_TOKEN",`Unexpected ${x.type} token`),c=!1,d=!1}let S=n[n.length-1],C=S?S.offset+S.source.length:a;return f&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=s||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:b,spaceBefore:l,comment:u,hasNewline:m,anchor:g,tag:v,newlineAfterProp:k,end:C,start:w!=null?w:C}}var nx=y(()=>{});function Ip(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
`))return!0;if(n.end){for(let e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of n.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(Ip(e.key)||Ip(e.value))return!0}return!1;default:return!0}}var $I=y(()=>{});function ax(n,e,t){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&Ip(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}var ZU=y(()=>{$I()});function UI(n,e,t){let{uniqueKeys:r}=n.options;if(r===!1)return!1;let a=typeof r=="function"?r:(i,s)=>i===s||dt(i)&&dt(s)&&i.value===s.value;return e.some(i=>a(i.key,t))}var QU=y(()=>{Wt()});function pme({composeNode:n,composeEmptyNode:e},t,r,a,i){var d,u;let s=(d=i==null?void 0:i.nodeClass)!=null?d:hn,o=new s(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(let p of r.items){let{start:m,key:f,sep:h,value:g}=p,v=pc(m,{indicator:"explicit-key-ind",next:f!=null?f:h==null?void 0:h[0],offset:l,onError:a,parentIndent:r.indent,startOnNewline:!0}),k=!v.found;if(k){if(f&&(f.type==="block-seq"?a(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==r.indent&&a(l,"BAD_INDENT",ume)),!v.anchor&&!v.tag&&!h){c=v.end,v.comment&&(o.comment?o.comment+=`
`+v.comment:o.comment=v.comment);continue}(v.newlineAfterProp||Ip(f))&&a(f!=null?f:m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=v.found)==null?void 0:u.indent)!==r.indent&&a(l,"BAD_INDENT",ume);t.atKey=!0;let T=v.end,b=f?n(t,f,v,a):e(t,T,m,null,v,a);t.schema.compat&&ax(r.indent,f,a),t.atKey=!1,UI(t,o.items,b)&&a(T,"DUPLICATE_KEY","Map keys must be unique");let w=pc(h!=null?h:[],{indicator:"map-value-ind",next:g,offset:b.range[2],onError:a,parentIndent:r.indent,startOnNewline:!f||f.type==="block-scalar"});if(l=w.end,w.found){k&&((g==null?void 0:g.type)==="block-map"&&!w.hasNewline&&a(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&v.start<w.found.offset-1024&&a(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=g?n(t,g,w,a):e(t,l,h,null,w,a);t.schema.compat&&ax(r.indent,g,a),l=S.range[2];let C=new an(b,S);t.options.keepSourceTokens&&(C.srcToken=p),o.items.push(C)}else{k&&a(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
`+w.comment:b.comment=w.comment);let S=new an(b);t.options.keepSourceTokens&&(S.srcToken=p),o.items.push(S)}}return c&&c<l&&a(c,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,l,c!=null?c:l],o}var ume,mme=y(()=>{Ep();Pp();nx();$I();ZU();QU();ume="All mapping items must start at the same column"});function fme({composeNode:n,composeEmptyNode:e},t,r,a,i){var d;let s=(d=i==null?void 0:i.nodeClass)!=null?d:ka,o=new s(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(let{start:u,value:p}of r.items){let m=pc(u,{indicator:"seq-item-ind",next:p,offset:l,onError:a,parentIndent:r.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||p)(p==null?void 0:p.type)==="block-seq"?a(m.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator");else{c=m.end,m.comment&&(o.comment=m.comment);continue}let f=p?n(t,p,m,a):e(t,m.end,u,null,m,a);t.schema.compat&&ax(r.indent,p,a),l=f.range[2],o.items.push(f)}return o.range=[r.offset,l,c!=null?c:l],o}var hme=y(()=>{Ap();nx();ZU()});function mc(n,e,t,r){let a="";if(n){let i=!1,s="";for(let o of n){let{source:l,type:c}=o;switch(c){case"space":i=!0;break;case"comment":{t&&!i&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";a?a+=s+d:a=d,s="";break}case"newline":a&&(s+=l),i=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:a,offset:e}}var Hv=y(()=>{});function gme({composeNode:n,composeEmptyNode:e},t,r,a,i){var g,v,k;let s=r.start.source==="{",o=s?"flow map":"flow sequence",l=(g=i==null?void 0:i.nodeClass)!=null?g:s?hn:ka,c=new l(t.schema);c.flow=!0;let d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=r.offset+r.start.source.length;for(let T=0;T<r.items.length;++T){let b=r.items[T],{start:w,key:S,sep:C,value:x}=b,E=pc(w,{flow:o,indicator:"explicit-key-ind",next:S!=null?S:C==null?void 0:C[0],offset:u,onError:a,parentIndent:r.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!C&&!x){T===0&&E.comma?a(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):T<r.items.length-1&&a(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),E.comment&&(c.comment?c.comment+=`
`+E.comment:c.comment=E.comment),u=E.end;continue}!s&&t.options.strict&&Ip(S)&&a(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0)E.comma&&a(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(E.comma||a(E.start,"MISSING_CHAR",`Missing , between ${o} items`),E.comment){let _="";e:for(let F of w)switch(F.type){case"comma":case"space":break;case"comment":_=F.source.substring(1);break e;default:break e}if(_){let F=c.items[c.items.length-1];Et(F)&&(F=(v=F.value)!=null?v:F.key),F.comment?F.comment+=`
`+_:F.comment=_,E.comment=E.comment.substring(_.length+1)}}if(!s&&!C&&!E.found){let _=x?n(t,x,E,a):e(t,E.end,C,null,E,a);c.items.push(_),u=_.range[2],XU(x)&&a(_.range,"BLOCK_IN_FLOW",JU)}else{t.atKey=!0;let _=E.end,F=S?n(t,S,E,a):e(t,_,w,null,E,a);XU(S)&&a(F.range,"BLOCK_IN_FLOW",JU),t.atKey=!1;let I=pc(C!=null?C:[],{flow:o,indicator:"map-value-ind",next:x,offset:F.range[2],onError:a,parentIndent:r.indent,startOnNewline:!1});if(I.found){if(!s&&!E.found&&t.options.strict){if(C)for(let O of C){if(O===I.found)break;if(O.type==="newline"){a(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<I.found.offset-1024&&a(I.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else x&&("source"in x&&((k=x.source)==null?void 0:k[0])===":"?a(x,"MISSING_CHAR",`Missing space after : in ${o}`):a(I.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let A=x?n(t,x,I,a):I.found?e(t,I.end,C,null,I,a):null;A?XU(x)&&a(A.range,"BLOCK_IN_FLOW",JU):I.comment&&(F.comment?F.comment+=`
`+I.comment:F.comment=I.comment);let R=new an(F,A);if(t.options.keepSourceTokens&&(R.srcToken=b),s){let O=c;UI(t,O.items,F)&&a(_,"DUPLICATE_KEY","Map keys must be unique"),O.items.push(R)}else{let O=new hn(t.schema);O.flow=!0,O.items.push(R);let U=(A!=null?A:F).range;O.range=[F.range[0],U[1],U[2]],c.items.push(O)}u=A?A.range[2]:I.end}}let p=s?"}":"]",[m,...f]=r.end,h=u;if((m==null?void 0:m.source)===p)h=m.offset+m.source.length;else{let T=o[0].toUpperCase()+o.substring(1),b=d?`${T} must end with a ${p}`:`${T} in block collection must be sufficiently indented and end with a ${p}`;a(u,d?"MISSING_CHAR":"BAD_INDENT",b),m&&m.source.length!==1&&f.unshift(m)}if(f.length>0){let T=mc(f,h,t.options.strict,a);T.comment&&(c.comment?c.comment+=`
`+T.comment:c.comment=T.comment),c.range=[r.offset,h,T.offset]}else c.range=[r.offset,h,h];return c}var JU,XU,yme=y(()=>{Wt();Ep();Pp();Ap();Hv();nx();$I();QU();JU="Block collections are not allowed within flow collections",XU=n=>n&&(n.type==="block-map"||n.type==="block-seq")});function eH(n,e,t,r,a,i){let s=t.type==="block-map"?pme(n,e,t,r,i):t.type==="block-seq"?fme(n,e,t,r,i):gme(n,e,t,r,i),o=s.constructor;return a==="!"||a===o.tagName?(s.tag=o.tagName,s):(a&&(s.tag=a),s)}function vme(n,e,t,r,a){var p,m,f;let i=r.tag,s=i?e.directives.tagName(i.source,h=>a(i,"TAG_RESOLVE_FAILED",h)):null;if(t.type==="block-seq"){let{anchor:h,newlineAfterProp:g}=r,v=h&&i?h.offset>i.offset?h:i:h!=null?h:i;v&&(!g||g.offset<v.offset)&&a(v,"MISSING_CHAR","Missing newline after block sequence props")}let o=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!i||!s||s==="!"||s===hn.tagName&&o==="map"||s===ka.tagName&&o==="seq")return eH(n,e,t,a,s);let l=e.schema.tags.find(h=>h.tag===s&&h.collection===o);if(!l){let h=e.schema.knownTags[s];if((h==null?void 0:h.collection)===o)e.schema.tags.push(Object.assign({},h,{default:!1})),l=h;else return h?a(i,"BAD_COLLECTION_TYPE",`${h.tag} used for ${o} collection, but expects ${(p=h.collection)!=null?p:"scalar"}`,!0):a(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),eH(n,e,t,a,s)}let c=eH(n,e,t,a,s,l),d=(f=(m=l.resolve)==null?void 0:m.call(l,c,h=>a(i,"TAG_RESOLVE_FAILED",h),e.options))!=null?f:c,u=Rt(d)?d:new Pe(d);return u.range=c.range,u.tag=s,l!=null&&l.format&&(u.format=l.format),u}var kme=y(()=>{Wt();Fn();Pp();Ap();mme();hme();yme()});function HI(n,e,t){let r=e.offset,a=NWe(e,n.options.strict,t);if(!a)return{value:"",type:null,comment:"",range:[r,r,r]};let i=a.mode===">"?Pe.BLOCK_FOLDED:Pe.BLOCK_LITERAL,s=e.source?RWe(e.source):[],o=s.length;for(let h=s.length-1;h>=0;--h){let g=s[h][1];if(g===""||g==="\r")o=h;else break}if(o===0){let h=a.chomp==="+"&&s.length>0?`
`.repeat(Math.max(1,s.length-1)):"",g=r+a.length;return e.source&&(g+=e.source.length),{value:h,type:i,comment:a.comment,range:[r,g,g]}}let l=e.indent+a.indent,c=e.offset+a.length,d=0;for(let h=0;h<o;++h){let[g,v]=s[h];if(v===""||v==="\r")a.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&t(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(l=g.length),d=h,l===0&&!n.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+v.length+1}for(let h=s.length-1;h>=o;--h)s[h][0].length>l&&(o=h+1);let u="",p="",m=!1;for(let h=0;h<d;++h)u+=s[h][0].slice(l)+`
`;for(let h=d;h<o;++h){let[g,v]=s[h];c+=g.length+v.length+1;let k=v[v.length-1]==="\r";if(k&&(v=v.slice(0,-1)),v&&g.length<l){let b=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;t(c-v.length-(k?2:1),"BAD_INDENT",b),g=""}i===Pe.BLOCK_LITERAL?(u+=p+g.slice(l)+v,p=`
`):g.length>l||v[0]===" "?(p===" "?p=`
`:!m&&p===`
`&&(p=`
`),u+=p+g.slice(l)+v,p=`
`,m=!0):v===""?p===`
`?u+=`
`:p=`
`:(u+=p+v,p=" ",m=!1)}switch(a.chomp){case"-":break;case"+":for(let h=o;h<s.length;++h)u+=`
`+s[h][0].slice(l);u[u.length-1]!==`
`&&(u+=`
`);break;default:u+=`
`}let f=r+a.length+e.source.length;return{value:u,type:i,comment:a.comment,range:[r,f,f]}}function NWe({offset:n,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:a}=e[0],i=a[0],s=0,o="",l=-1;for(let p=1;p<a.length;++p){let m=a[p];if(!o&&(m==="-"||m==="+"))o=m;else{let f=Number(m);!s&&f?s=f:l===-1&&(l=n+p)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let c=!1,d="",u=a.length;for(let p=1;p<e.length;++p){let m=e[p];switch(m.type){case"space":c=!0;case"newline":u+=m.source.length;break;case"comment":t&&!c&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,d=m.source.substring(1);break;case"error":r(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{let f=`Unexpected token in block scalar header: ${m.type}`;r(m,"UNEXPECTED_TOKEN",f);let h=m.source;h&&typeof h=="string"&&(u+=h.length)}}}return{mode:i,indent:s,chomp:o,comment:d,length:u}}function RWe(n){let e=n.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),i=[r!=null&&r[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let s=1;s<e.length;s+=2)i.push([e[s],e[s+1]]);return i}var tH=y(()=>{Fn()});function VI(n,e,t){let{offset:r,type:a,source:i,end:s}=n,o,l,c=(p,m,f)=>t(r+p,m,f);switch(a){case"scalar":o=Pe.PLAIN,l=_We(i,c);break;case"single-quoted-scalar":o=Pe.QUOTE_SINGLE,l=FWe(i,c);break;case"double-quoted-scalar":o=Pe.QUOTE_DOUBLE,l=LWe(i,c);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}let d=r+i.length,u=mc(s,d,e,t);return{value:l,type:o,comment:u.comment,range:[r,d,u.offset]}}function _We(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Tme(n)}function FWe(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Tme(n.slice(1,-1)).replace(/''/g,"'")}function Tme(n){var l;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch(c){e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let a=r[1],i=" ",s=e.lastIndex;for(t.lastIndex=s;r=t.exec(n);)r[1]===""?i===`
`?a+=i:i=`
`:(a+=i+r[1],i=" "),s=t.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=s,r=o.exec(n),a+i+((l=r==null?void 0:r[1])!=null?l:"")}function LWe(n,e){let t="";for(let r=1;r<n.length-1;++r){let a=n[r];if(!(a==="\r"&&n[r+1]===`
`))if(a===`
`){let{fold:i,offset:s}=OWe(n,r);t+=i,r=s}else if(a==="\\"){let i=n[++r],s=zWe[i];if(s)t+=s;else if(i===`
`)for(i=n[r+1];i===" "||i===" ";)i=n[++r+1];else if(i==="\r"&&n[r+1]===`
`)for(i=n[++r+1];i===" "||i===" ";)i=n[++r+1];else if(i==="x"||i==="u"||i==="U"){let o=i==="x"?2:i==="u"?4:8;t+=BWe(n,r+1,o,e),r+=o}else{let o=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),t+=o}}else if(a===" "||a===" "){let i=r,s=n[r+1];for(;s===" "||s===" ";)s=n[++r+1];s!==`
`&&!(s==="\r"&&n[r+2]===`
`)&&(t+=r>i?n.slice(i,r+1):a)}else t+=a}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function OWe(n,e){let t="",r=n[e+1];for(;(r===" "||r===" "||r===`
`||r==="\r")&&!(r==="\r"&&n[e+2]!==`
`);)r===`
`&&(t+=`
`),e+=1,r=n[e+1];return t||(t=" "),{fold:t,offset:e}}function BWe(n,e,t,r){let a=n.substr(e,t),s=a.length===t&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;try{return String.fromCodePoint(s)}catch(o){let l=n.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}var zWe,rH=y(()=>{Fn();Hv();zWe={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "}});function nH(n,e,t,r){let{value:a,type:i,comment:s,range:o}=e.type==="block-scalar"?HI(n,e,r):VI(e,n.options.strict,r),l=t?n.directives.tagName(t.source,u=>r(t,"TAG_RESOLVE_FAILED",u)):null,c;n.options.stringKeys&&n.atKey?c=n.schema[Es]:l?c=jWe(n.schema,a,l,t,r):e.type==="scalar"?c=$We(n,a,e,r):c=n.schema[Es];let d;try{let u=c.resolve(a,p=>r(t!=null?t:e,"TAG_RESOLVE_FAILED",p),n.options);d=dt(u)?u:new Pe(u)}catch(u){let p=u instanceof Error?u.message:String(u);r(t!=null?t:e,"TAG_RESOLVE_FAILED",p),d=new Pe(a)}return d.range=o,d.source=a,i&&(d.type=i),l&&(d.tag=l),c.format&&(d.format=c.format),s&&(d.comment=s),d}function jWe(n,e,t,r,a){var o;if(t==="!")return n[Es];let i=[];for(let l of n.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)i.push(l);else return l;for(let l of i)if((o=l.test)!=null&&o.test(e))return l;let s=n.knownTags[t];return s&&!s.collection?(n.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(a(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[Es])}function $We({atKey:n,directives:e,schema:t},r,a,i){var o;let s=t.tags.find(l=>{var c;return(l.default===!0||n&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||t[Es];if(t.compat){let l=(o=t.compat.find(c=>{var d;return c.default&&((d=c.test)==null?void 0:d.test(r))}))!=null?o:t[Es];if(s.tag!==l.tag){let c=e.tagString(s.tag),d=e.tagString(l.tag),u=`Value may be parsed as either ${c} or ${d}`;i(a,"TAG_RESOLVE_FAILED",u,!0)}}return s}var bme=y(()=>{Wt();Fn();tH();rH()});function wme(n,e,t){if(e){t!=null||(t=e.length);for(let r=t-1;r>=0;--r){let a=e[r];switch(a.type){case"space":case"comment":case"newline":n-=a.source.length;continue}for(a=e[++r];(a==null?void 0:a.type)==="space";)n+=a.source.length,a=e[++r];break}}return n}var Sme=y(()=>{});function aH(n,e,t,r){let a=n.atKey,{spaceBefore:i,comment:s,anchor:o,tag:l}=t,c,d=!0;switch(e.type){case"alias":c=HWe(n,e,r),(o||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=nH(n,e,l,r),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=vme(UWe,n,e,t,r),o&&(c.anchor=o.source.substring(1))}catch(u){let p=u instanceof Error?u.message:String(u);r(e,"RESOURCE_EXHAUSTION",p)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",u),d=!1}}return c!=null||(c=WI(n,e.offset,void 0,null,t,r)),o&&c.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),a&&n.options.stringKeys&&(!dt(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?c.comment=s:c.commentBefore=s),n.options.keepSourceTokens&&d&&(c.srcToken=e),c}function WI(n,e,t,r,{spaceBefore:a,comment:i,anchor:s,tag:o,end:l},c){let d={type:"scalar",offset:wme(e,t,r),indent:-1,source:""},u=nH(n,d,o,c);return s&&(u.anchor=s.source.substring(1),u.anchor===""&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(u.spaceBefore=!0),i&&(u.comment=i,u.range[2]=l),u}function HWe({options:n},{offset:e,source:t,end:r},a){let i=new cc(t.substring(1));i.source===""&&a(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&a(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=e+t.length,o=mc(r,s,n.strict,a);return i.range=[e,s,o.offset],o.comment&&(i.comment=o.comment),i}var UWe,Cme=y(()=>{zC();Wt();kme();bme();Hv();Sme();UWe={composeNode:aH,composeEmptyNode:WI}});function xme(n,e,{offset:t,start:r,value:a,end:i},s){let o=Object.assign({_directives:e},n),l=new uc(void 0,o),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=pc(r,{indicator:"doc-start",next:a!=null?a:i==null?void 0:i[0],offset:t,onError:s,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!d.hasNewline&&s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=a?aH(c,a,d,s):WI(c,d.end,r,null,d,s);let u=l.contents.range[2],p=mc(i,u,!1,s);return p.comment&&(l.comment=p.comment),l.range=[t,u,p.offset],l}var Eme=y(()=>{ex();Cme();Hv();nx()});function ix(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];let{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function Dme(n){var a;let e="",t=!1,r=!1;for(let i=0;i<n.length;++i){let s=n[i];switch(s[0]){case"#":e+=(e===""?"":r?`
`:`
`)+(s.substring(1)||" "),t=!0,r=!1;break;case"%":((a=n[i+1])==null?void 0:a[0])!=="#"&&(i+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var rh,iH=y(()=>{wU();ex();rx();Wt();Eme();Hv();rh=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,a,i)=>{let s=ix(t);i?this.warnings.push(new Uv(s,r,a)):this.errors.push(new Ds(s,r,a))},this.directives=new lc({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:a}=Dme(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
${r}`:r;else if(a||e.directives.docStart||!i)e.commentBefore=r;else if(rr(i)&&!i.flow&&i.items.length>0){let s=i.items[0];Et(s)&&(s=s.key);let o=s.commentBefore;s.commentBefore=o?`${r}
${o}`:r}else{let s=i.commentBefore;i.commentBefore=s?`${r}
${s}`:r}}if(t){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Dme(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let a of e)yield*this.next(a);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,a)=>{let i=ix(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",r,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=xme(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ds(ix(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Ds(ix(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let t=mc(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ds(ix(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),a=new uc(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,t,t],this.decorate(a,!1),yield a}}}});function Pme(n,e=!0,t){if(n){let r=(a,i,s)=>{let o=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(t)t(o,i,s);else throw new Ds([o,o+1],i,s)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return VI(n,e,r);case"block-scalar":return HI({options:{strict:e}},n,r)}}return null}function Ame(n,e){var c;let{implicitKey:t=!1,indent:r,inFlow:a=!1,offset:i=-1,type:s="PLAIN"}=e,o=Zd({type:s,value:n},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:`
`}];switch(o[0]){case"|":case">":{let d=o.indexOf(`
`),u=o.substring(0,d),p=o.substring(d+1)+`
`,m=[{type:"block-scalar-header",offset:i,indent:r,source:u}];return Ime(m,l)||m.push({type:"newline",offset:-1,indent:r,source:`
`}),{type:"block-scalar",offset:i,indent:r,props:m,source:p}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:o,end:l};default:return{type:"scalar",offset:i,indent:r,source:o,end:l}}}function Mme(n,e,t={}){let{afterKey:r=!1,implicitKey:a=!1,inFlow:i=!1,type:s}=t,o="indent"in n?n.indent:null;if(r&&typeof o=="number"&&(o+=2),!s)switch(n.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let c=n.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let l=Zd({type:s,value:e},{implicitKey:a||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":VWe(n,l);break;case'"':sH(n,l,"double-quoted-scalar");break;case"'":sH(n,l,"single-quoted-scalar");break;default:sH(n,l,"scalar")}}function VWe(n,e){let t=e.indexOf(`
`),r=e.substring(0,t),a=e.substring(t+1)+`
`;if(n.type==="block-scalar"){let i=n.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=r,n.source=a}else{let{offset:i}=n,s="indent"in n?n.indent:-1,o=[{type:"block-scalar-header",offset:i,indent:s,source:r}];Ime(o,"end"in n?n.end:void 0)||o.push({type:"newline",offset:-1,indent:s,source:`
`});for(let l of Object.keys(n))l!=="type"&&l!=="offset"&&delete n[l];Object.assign(n,{type:"block-scalar",indent:s,props:o,source:a})}}function Ime(n,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function sH(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{let r=n.props.slice(1),a=e.length;n.props[0].type==="block-scalar-header"&&(a-=n.props[0].source.length);for(let i of r)i.offset+=a;delete n.props,Object.assign(n,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{let a={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
`};delete n.items,Object.assign(n,{type:t,source:e,end:[a]});break}default:{let r="indent"in n?n.indent:-1,a="end"in n&&Array.isArray(n.end)?n.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(n))i!=="type"&&i!=="offset"&&delete n[i];Object.assign(n,{type:t,indent:r,source:e,end:a})}}}var Nme=y(()=>{tH();rH();rx();WC()});function GI(n){switch(n.type){case"block-scalar":{let e="";for(let t of n.props)e+=GI(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(let t of n.items)e+=qI(t);return e}case"flow-collection":{let e=n.start.source;for(let t of n.items)e+=qI(t);for(let t of n.end)e+=t.source;return e}case"document":{let e=qI(n);if(n.end)for(let t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(let t of n.end)e+=t.source;return e}}}function qI({start:n,key:e,sep:t,value:r}){let a="";for(let i of n)a+=i.source;if(e&&(a+=GI(e)),t)for(let i of t)a+=i.source;return r&&(a+=GI(r)),a}var Rme,_me=y(()=>{Rme=n=>"type"in n?GI(n):qI(n)});function Np(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),Lme(Object.freeze([]),n,e)}function Lme(n,e,t){let r=t(e,n);if(typeof r=="symbol")return r;for(let a of["key","value"]){let i=e[a];if(i&&"items"in i){for(let s=0;s<i.items.length;++s){let o=Lme(Object.freeze(n.concat([[a,s]])),i.items[s],t);if(typeof o=="number")s=o-1;else{if(o===oH)return oH;o===Fme&&(i.items.splice(s,1),s-=1)}}typeof r=="function"&&a==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}var oH,WWe,Fme,Ome=y(()=>{oH=Symbol("break visit"),WWe=Symbol("skip children"),Fme=Symbol("remove item");Np.BREAK=oH;Np.SKIP=WWe;Np.REMOVE=Fme;Np.itemAtPath=(n,e)=>{let t=n;for(let[r,a]of e){let i=t==null?void 0:t[r];if(i&&"items"in i)t=i.items[a];else return}return t};Np.parentCollection=(n,e)=>{let t=Np.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],a=t==null?void 0:t[r];if(a&&"items"in a)return a;throw new Error("Parent collection not found")}});var cH={};Xe(cH,{BOM:()=>sx,DOCUMENT:()=>ox,FLOW_END:()=>lx,SCALAR:()=>Vv,createScalarToken:()=>Ame,isCollection:()=>qWe,isScalar:()=>GWe,prettyToken:()=>YWe,resolveAsScalar:()=>Pme,setScalarValue:()=>Mme,stringify:()=>Rme,tokenType:()=>lH,visit:()=>Np});function YWe(n){switch(n){case sx:return"<BOM>";case ox:return"<DOC>";case lx:return"<FLOW_END>";case Vv:return"<SCALAR>";default:return JSON.stringify(n)}}function lH(n){switch(n){case sx:return"byte-order-mark";case ox:return"doc-mode";case lx:return"flow-error-end";case Vv:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}var sx,ox,lx,Vv,qWe,GWe,YI=y(()=>{Nme();_me();Ome();sx="\uFEFF",ox="",lx="",Vv="",qWe=n=>!!n&&"items"in n,GWe=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar")});function fl(n){switch(n){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}var zme,KWe,KI,ZWe,dH,Wv,uH=y(()=>{YI();zme=new Set("0123456789ABCDEFabcdef"),KWe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),KI=new Set(",[]{}"),ZWe=new Set(` ,[]{}
\r `),dH=n=>!n||ZWe.has(n),Wv=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var a;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=(a=this.next)!=null?a:"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
`?!0:t==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let a=this.buffer[r+e+1];if(a===`
`||!a&&!this.atEnd)return e+r+1}return t===`
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&fl(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===sx&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let i=e[r-1];if(i===" "||i===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let i=e[t-1];if(i===" "||i===" ")t-=1;else break}let a=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield ox,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&fl(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!fl(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&fl(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(dH),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&fl(a[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield lx,yield*this.parseLineStart();let i=0;for(;a[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),a[i]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(dH),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let s=this.charAt(1);if(this.flowKey||fl(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let i=0;for(;this.buffer[t-1-i]==="\\";)i+=1;if(i%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),a=r.indexOf(`
`,this.pos);if(a!==-1){for(;a!==-1;){let i=this.continueScalar(a+1);if(i===-1)break;a=r.indexOf(`
`,i)}a!==-1&&(t=a-(r[a-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>fl(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":t+=1;break;case`
`:e=i,t=0;break;case"\r":{let s=this.buffer[i+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
`;)r=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let i=e-1,s=this.buffer[i];s==="\r"&&(s=this.buffer[--i]);let o=i;for(;s===" ";)s=this.buffer[--i];if(s===`
`&&i>=this.pos&&i+1+t>o)e=i;else break}while(!0);return yield Vv,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){let i=this.buffer[r+1];if(fl(i)||e&&KI.has(i))break;t=r}else if(fl(a)){let i=this.buffer[r+1];if(a==="\r"&&(i===`
`?(r+=1,a=`
`,i=this.buffer[r+1]):t=r),i==="#"||e&&KI.has(i))break;if(a===`
`){let s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(e&&KI.has(a))break;t=r}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield Vv,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(dH),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(fl(r)||t&&KI.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!fl(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(KWe.has(t))t=this.buffer[++e];else if(t==="%"&&zme.has(this.buffer[e+1])&&zme.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let a=t-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=t),a}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}});var qv,pH=y(()=>{qv=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let i=t+r>>1;this.lineStarts[i]<e?t=i+1:r=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let a=this.lineStarts[t-1];return{line:t,col:e-a+1}}}}});function Rp(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function Bme(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function $me(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ZI(n){var e;switch(n.type){case"document":return n.start;case"block-map":{let t=n.items[n.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function Gv(n){var t;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=n[++e])==null?void 0:t.type)==="space";);return n.splice(e,n.length)}function QI(n,e){if(e.length<1e5)Array.prototype.push.apply(n,e);else for(let t=0;t<e.length;++t)n.push(e[t])}function jme(n){if(n.start.type==="flow-seq-start")for(let e of n.items)e.sep&&!e.value&&!Rp(e.start,"explicit-key-ind")&&!Rp(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,$me(e.value)?e.value.end?QI(e.value.end,e.sep):e.value.end=e.sep:QI(e.start,e.sep),delete e.sep)}var nh,mH=y(()=>{YI();uH();nh=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Wv,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=lH(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e!=null?e:this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&jme(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=t;else{Object.assign(a,{key:t,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{let a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:t}):a.value=t;break}case"flow-collection":{let a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:t,sep:[]}):a.sep?a.value=t:Object.assign(a,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let a=t.items[t.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&Bme(a.start)===-1&&(t.indent===0||a.start.every(i=>i.type!=="comment"||i.indent<t.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Bme(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=ZI(this.peek(2)),r=Gv(t),a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let a="end"in t.value?t.value.end:void 0,i=Array.isArray(a)?a[a.length-1]:void 0;(i==null?void 0:i.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let a=e.items[e.items.length-2],i=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(i)){QI(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let a=!this.onKeyLine&&this.indent===e.indent,i=a&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&t.sep&&!t.value){let o=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":o.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Rp(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if($me(t.key)&&!Rp(t.sep,"newline")){let o=Gv(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:c}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Rp(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Gv(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Rp(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Rp(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&e.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let a="end"in t.value?t.value.end:void 0,i=Array.isArray(a)?a[a.length-1]:void 0;(i==null?void 0:i.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let a=e.items[e.items.length-2],i=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(i)){QI(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Rp(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:a,sep:[]}):t.sep?this.stack.push(a):Object.assign(t,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let a=ZI(r),i=Gv(a);jme(e);let s=e.end.splice(1,e.end.length);s.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=ZI(e),r=Gv(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ZI(e),r=Gv(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}});function Ume(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new qv||null,prettyErrors:e}}function Hme(n,e={}){let{lineCounter:t,prettyErrors:r}=Ume(e),a=new nh(t==null?void 0:t.addNewLine),i=new rh(e),s=Array.from(i.compose(a.parse(n)));if(r&&t)for(let o of s)o.errors.forEach(tx(n,t)),o.warnings.forEach(tx(n,t));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function fH(n,e={}){let{lineCounter:t,prettyErrors:r}=Ume(e),a=new nh(t==null?void 0:t.addNewLine),i=new rh(e),s=null;for(let o of i.compose(a.parse(n),!0,n.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new Ds(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(s.errors.forEach(tx(n,t)),s.warnings.forEach(tx(n,t))),s}function Vme(n,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let a=fH(n,t);if(!a)return null;if(a.warnings.forEach(i=>TI(a.options.logLevel,i)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},t))}function Wme(n,e,t){var a;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){let{keepUndefined:i}=(a=t!=null?t:e)!=null?a:{};if(!i)return}return ho(n)&&!r?n.toString(t):new uc(n,r,t).toString(t)}var qme=y(()=>{iH();ex();rx();AU();Wt();pH();mH()});var hH={};Xe(hH,{Alias:()=>cc,CST:()=>cH,Composer:()=>rh,Document:()=>uc,Lexer:()=>Wv,LineCounter:()=>qv,Pair:()=>an,Parser:()=>nh,Scalar:()=>Pe,Schema:()=>Bv,YAMLError:()=>$v,YAMLMap:()=>hn,YAMLParseError:()=>Ds,YAMLSeq:()=>ka,YAMLWarning:()=>Uv,isAlias:()=>fo,isCollection:()=>rr,isDocument:()=>ho,isMap:()=>go,isNode:()=>Rt,isPair:()=>Et,isScalar:()=>dt,isSeq:()=>yo,parse:()=>Vme,parseAllDocuments:()=>Hme,parseDocument:()=>fH,stringify:()=>Wme,visit:()=>dl,visitAsync:()=>LC});var gH=y(()=>{iH();ex();KU();rx();zC();Wt();Ep();Fn();Pp();Ap();YI();uH();pH();mH();qme();OC()});var Yv,cx=y(()=>{gH();gH();Yv=hH});function dx(n,e){let t=QWe(n),r=t.frontmatter?JWe(t.frontmatter,e):{},a=XWe(t.body,e);return{frontmatter:r,body:a}}function QWe(n){var t,r;let e=n.split(`
`);if(((t=e[0])==null?void 0:t.trim())==="---"){let a=-1;for(let i=1;i<e.length;i++)if(((r=e[i])==null?void 0:r.trim())==="---"){a=i;break}if(a>0){let s=e.slice(1,a).join(`
`),l=e.slice(a+1).join(`
`);return{frontmatter:s.trim()||null,body:l}}}return{frontmatter:null,body:n}}function JWe(n,e){try{let t=tqe(eqe(n,e)),r=Yv.parse(t);return typeof r!="object"||r===null?(Gme.warn("Template frontmatter did not parse to a valid object",{category:"validation",operation:"template-frontmatter-did-not-parse-valid-object"}),{}):r}catch(t){return Gme.error("Error processing template frontmatter:",{category:"validation",operation:"processing-template-frontmatter",error:t}),{}}}function XWe(n,e){return nqe(n,e)}function eqe(n,e){var g;let t=n,r=new Date,a=e.title||"";t=ah(t,"title",a),t=t.replace(/\{\{priority\}\}/g,e.priority||""),t=t.replace(/\{\{status\}\}/g,e.status||"");let i=Array.isArray(e.contexts)?e.contexts.join(", "):"";t=t.replace(/\{\{contexts\}\}/g,i);let s=Array.isArray(e.tags)?e.tags.join(", "):"";t=t.replace(/\{\{tags\}\}/g,s);let o=Array.isArray(e.tags)?e.tags.map(v=>`#${v}`).join(" "):"";t=t.replace(/\{\{hashtags\}\}/g,o),t=t.replace(/\{\{timeEstimate\}\}/g,((g=e.timeEstimate)==null?void 0:g.toString())||""),t=t.replace(/\{\{dueDate\}\}/g,e.dueDate||""),t=t.replace(/\{\{scheduledDate\}\}/g,e.scheduledDate||""),t=t.replace(/\{\{details\}\}/g,e.details||"");let l=e.parentNote||"";t=ah(t,"parentNote",l,{alwaysQuote:!0}),t=t.replace(/\{\{date\}\}/g,D(r,"yyyy-MM-dd")),t=t.replace(/\{\{time\}\}/g,D(r,"HH:mm")),t=t.replace(/\{\{year\}\}/g,D(r,"yyyy")),t=t.replace(/\{\{month\}\}/g,D(r,"MM")),t=t.replace(/\{\{day\}\}/g,D(r,"dd")),t=t.replace(/\{\{hour\}\}/g,D(r,"HH")),t=t.replace(/\{\{minute\}\}/g,D(r,"mm")),t=t.replace(/\{\{second\}\}/g,D(r,"ss")),t=t.replace(/\{\{timestamp\}\}/g,D(r,"yyyy-MM-dd-HHmmss")),t=t.replace(/\{\{dateTime\}\}/g,D(r,"yyyy-MM-dd-HHmm")),t=t.replace(/\{\{shortDate\}\}/g,D(r,"yyMMdd")),t=t.replace(/\{\{shortYear\}\}/g,D(r,"yy")),t=t.replace(/\{\{monthName\}\}/g,D(r,"MMMM")),t=t.replace(/\{\{monthNameShort\}\}/g,D(r,"MMM")),t=t.replace(/\{\{dayName\}\}/g,D(r,"EEEE")),t=t.replace(/\{\{dayNameShort\}\}/g,D(r,"EEE")),t=t.replace(/\{\{week\}\}/g,D(r,"ww")),t=t.replace(/\{\{quarter\}\}/g,D(r,"q")),t=t.replace(/\{\{time12\}\}/g,D(r,"hh:mm a")),t=t.replace(/\{\{time24\}\}/g,D(r,"HH:mm")),t=t.replace(/\{\{hourPadded\}\}/g,D(r,"HH")),t=t.replace(/\{\{hour12\}\}/g,D(r,"hh")),t=t.replace(/\{\{ampm\}\}/g,D(r,"a")),t=t.replace(/\{\{unix\}\}/g,Math.floor(r.getTime()/1e3).toString()),t=t.replace(/\{\{unixMs\}\}/g,r.getTime().toString()),t=t.replace(/\{\{milliseconds\}\}/g,D(r,"SSS")),t=t.replace(/\{\{ms\}\}/g,D(r,"SSS")),t=t.replace(/\{\{timezone\}\}/g,D(r,"xxx")),t=t.replace(/\{\{timezoneShort\}\}/g,D(r,"xx")),t=t.replace(/\{\{utcOffset\}\}/g,D(r,"xxx")),t=t.replace(/\{\{utcOffsetShort\}\}/g,D(r,"xx")),t=t.replace(/\{\{utcZ\}\}/g,"Z");let c=D(r,"yyMMdd"),d=new Date(r);d.setHours(0,0,0,0);let u=Math.floor((r.getTime()-d.getTime())/1e3),p=`${c}${u.toString(36)}`;t=t.replace(/\{\{zettel\}\}/g,p),t=t.replace(/\{\{nano\}\}/g,Date.now().toString()+Math.random().toString(36).substring(2,7));let m=e.priority||"",f=e.status||"";t=t.replace(/\{\{priorityShort\}\}/g,m.substring(0,1).toUpperCase()),t=t.replace(/\{\{statusShort\}\}/g,f.substring(0,1).toUpperCase());let h=e.title||"";if(t=t.replace(/\{\{titleLower\}\}/g,h.toLowerCase()),t=t.replace(/\{\{titleUpper\}\}/g,h.toUpperCase()),t=t.replace(/\{\{titleSnake\}\}/g,h.toLowerCase().replace(/\s+/g,"_")),t=t.replace(/\{\{titleKebab\}\}/g,h.toLowerCase().replace(/\s+/g,"-")),t=t.replace(/\{\{titleCamel\}\}/g,h.replace(/(?:^\w|[A-Z]|\b\w)/g,(v,k)=>k===0?v.toLowerCase():v.toUpperCase()).replace(/\s+/g,"")),t=t.replace(/\{\{titlePascal\}\}/g,h.replace(/(?:^\w|[A-Z]|\b\w)/g,v=>v.toUpperCase()).replace(/\s+/g,"")),"icsEventTitle"in e){let v=e,k=v.icsEventTitle||"";t=ah(t,"icsEventTitle",k),t=t.replace(/\{\{icsEventStart\}\}/g,v.icsEventStart||""),t=t.replace(/\{\{icsEventEnd\}\}/g,v.icsEventEnd||"");let T=v.icsEventLocation||"";t=ah(t,"icsEventLocation",T);let b=v.icsEventDescription||"";t=ah(t,"icsEventDescription",b),t=t.replace(/\{\{icsEventUrl\}\}/g,v.icsEventUrl||"");let w=v.icsEventSubscription||"";t=ah(t,"icsEventSubscription",w);let S=v.icsEventId||"";t=ah(t,"icsEventId",S,{alwaysQuote:!0})}return t}function ah(n,e,t,r={}){let a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`(["'])\\{\\{${a}\\}\\}\\1`,"g"),s=t||"",o=n.replace(i,(d,u)=>{let p=u==="'"?s.replace(/'/g,"''"):yH(s);return`${u}${p}${u}`}),l=s&&(r.alwaysQuote||rqe(s))?`"${yH(s)}"`:s,c=new RegExp(`\\{\\{${a}\\}\\}`,"g");return o=o.replace(c,l),o}function tqe(n){return n.replace(/^(\s*[^#\n][^:\n]*:\s*)(<%.*?%>)(\s*)$/gm,(e,t,r,a)=>`${t}"${yH(r)}"${a}`)}function rqe(n){if(!n)return!1;let e=/[[\]{}:>|*&!%#`@,]/,t=/^[-?]/,r=/^\d+\.?\d*$/,a=/^(true|false|yes|no|on|off)$/i;return e.test(n)||t.test(n)||r.test(n)||a.test(n)}function yH(n){return n?n.replace(/\\/g,"\\\\").replace(/"/g,'\\"'):""}function nqe(n,e){var f;let t=n,r=new Date;t=t.replace(/\{\{title\}\}/g,e.title||""),t=t.replace(/\{\{priority\}\}/g,e.priority||""),t=t.replace(/\{\{status\}\}/g,e.status||"");let a=Array.isArray(e.contexts)?e.contexts.join(", "):"";t=t.replace(/\{\{contexts\}\}/g,a);let i=Array.isArray(e.tags)?e.tags.join(", "):"";t=t.replace(/\{\{tags\}\}/g,i);let s=Array.isArray(e.tags)?e.tags.map(h=>`#${h}`).join(" "):"";t=t.replace(/\{\{hashtags\}\}/g,s),t=t.replace(/\{\{timeEstimate\}\}/g,((f=e.timeEstimate)==null?void 0:f.toString())||""),t=t.replace(/\{\{dueDate\}\}/g,e.dueDate||""),t=t.replace(/\{\{scheduledDate\}\}/g,e.scheduledDate||""),t=t.replace(/\{\{details\}\}/g,e.details||""),t=t.replace(/\{\{parentNote\}\}/g,e.parentNote||""),t=t.replace(/\{\{date\}\}/g,D(r,"yyyy-MM-dd")),t=t.replace(/\{\{time\}\}/g,D(r,"HH:mm")),t=t.replace(/\{\{year\}\}/g,D(r,"yyyy")),t=t.replace(/\{\{month\}\}/g,D(r,"MM")),t=t.replace(/\{\{day\}\}/g,D(r,"dd")),t=t.replace(/\{\{hour\}\}/g,D(r,"HH")),t=t.replace(/\{\{minute\}\}/g,D(r,"mm")),t=t.replace(/\{\{second\}\}/g,D(r,"ss")),t=t.replace(/\{\{timestamp\}\}/g,D(r,"yyyy-MM-dd-HHmmss")),t=t.replace(/\{\{dateTime\}\}/g,D(r,"yyyy-MM-dd-HHmm")),t=t.replace(/\{\{shortDate\}\}/g,D(r,"yyMMdd")),t=t.replace(/\{\{shortYear\}\}/g,D(r,"yy")),t=t.replace(/\{\{monthName\}\}/g,D(r,"MMMM")),t=t.replace(/\{\{monthNameShort\}\}/g,D(r,"MMM")),t=t.replace(/\{\{dayName\}\}/g,D(r,"EEEE")),t=t.replace(/\{\{dayNameShort\}\}/g,D(r,"EEE")),t=t.replace(/\{\{week\}\}/g,D(r,"ww")),t=t.replace(/\{\{quarter\}\}/g,D(r,"q")),t=t.replace(/\{\{time12\}\}/g,D(r,"hh:mm a")),t=t.replace(/\{\{time24\}\}/g,D(r,"HH:mm")),t=t.replace(/\{\{hourPadded\}\}/g,D(r,"HH")),t=t.replace(/\{\{hour12\}\}/g,D(r,"hh")),t=t.replace(/\{\{ampm\}\}/g,D(r,"a")),t=t.replace(/\{\{unix\}\}/g,Math.floor(r.getTime()/1e3).toString()),t=t.replace(/\{\{unixMs\}\}/g,r.getTime().toString()),t=t.replace(/\{\{milliseconds\}\}/g,D(r,"SSS")),t=t.replace(/\{\{ms\}\}/g,D(r,"SSS")),t=t.replace(/\{\{timezone\}\}/g,D(r,"xxx")),t=t.replace(/\{\{timezoneShort\}\}/g,D(r,"xx")),t=t.replace(/\{\{utcOffset\}\}/g,D(r,"xxx")),t=t.replace(/\{\{utcOffsetShort\}\}/g,D(r,"xx")),t=t.replace(/\{\{utcZ\}\}/g,"Z");let o=D(r,"yyMMdd"),l=new Date(r);l.setHours(0,0,0,0);let c=Math.floor((r.getTime()-l.getTime())/1e3),d=`${o}${c.toString(36)}`;t=t.replace(/\{\{zettel\}\}/g,d),t=t.replace(/\{\{nano\}\}/g,Date.now().toString()+Math.random().toString(36).substring(2,7));let u=e.priority||"",p=e.status||"";t=t.replace(/\{\{priorityShort\}\}/g,u.substring(0,1).toUpperCase()),t=t.replace(/\{\{statusShort\}\}/g,p.substring(0,1).toUpperCase());let m=e.title||"";if(t=t.replace(/\{\{titleLower\}\}/g,m.toLowerCase()),t=t.replace(/\{\{titleUpper\}\}/g,m.toUpperCase()),t=t.replace(/\{\{titleSnake\}\}/g,m.toLowerCase().replace(/\s+/g,"_")),t=t.replace(/\{\{titleKebab\}\}/g,m.toLowerCase().replace(/\s+/g,"-")),t=t.replace(/\{\{titleCamel\}\}/g,m.replace(/(?:^\w|[A-Z]|\b\w)/g,(h,g)=>g===0?h.toLowerCase():h.toUpperCase()).replace(/\s+/g,"")),t=t.replace(/\{\{titlePascal\}\}/g,m.replace(/(?:^\w|[A-Z]|\b\w)/g,h=>h.toUpperCase()).replace(/\s+/g,"")),"icsEventTitle"in e){let h=e;t=t.replace(/\{\{icsEventTitle\}\}/g,h.icsEventTitle||""),t=t.replace(/\{\{icsEventStart\}\}/g,h.icsEventStart||""),t=t.replace(/\{\{icsEventEnd\}\}/g,h.icsEventEnd||""),t=t.replace(/\{\{icsEventLocation\}\}/g,h.icsEventLocation||""),t=t.replace(/\{\{icsEventDescription\}\}/g,h.icsEventDescription||""),t=t.replace(/\{\{icsEventUrl\}\}/g,h.icsEventUrl||""),t=t.replace(/\{\{icsEventSubscription\}\}/g,h.icsEventSubscription||""),t=t.replace(/\{\{icsEventId\}\}/g,h.icsEventId||"")}return t}function Yme(n,e){return{...e,...n}}var Gme,JI=y(()=>{Cr();cx();q();Gme=M({tag:"Utils/TemplateProcessor"})});function oqe(n,e){return n.replace(sqe,t=>D(e,iqe[t]))}function lqe(n){return n.replace(/\\/g,"/").split("/").some(e=>e==="."||e==="..")}function cqe(n){let e=n.replace(/\\/g,"/"),t=e.endsWith("/"),r=[];for(let i of e.split("/"))if(!(!i||i===".")){if(i===".."){r.pop();continue}r.push(i)}let a=r.join("/");return t&&a?`${a}/`:a}function XI(n){return n.replace(/\.md$/i,"")}function dqe(n){let e=n.trim();if(!e)return"";if(e.startsWith("[[")&&e.endsWith("]]")){let r=e.slice(2,-2).trim(),a=r.indexOf("|"),i=a!==-1?r.slice(0,a):r;return XI(i.trim())}let t=e.match(/^\[[^\]]*\]\(([^)]+)\)$/);if(t){let r=t[1].trim();r.startsWith("<")&&r.endsWith(">")&&(r=r.slice(1,-1).trim());try{r=decodeURIComponent(r)}catch(a){aqe.debug("Failed to decode project path:",{category:"persistence",operation:"decode-project-path",details:{value:r},error:a})}return XI(r)}return XI(e)}function uqe(n){return XI(n.trim()).replace(/\\/g,"/").split("/").filter(t=>t.length>0).map(t=>t.replace(/[<>:"|?*]/g,"_")).join("/")}function vH(n,e){let t=e?e(n):dqe(n);return uqe(t)}function Kme(n,e){let t=vH(n,e);return t?t.split("/").slice(0,-1).join("/"):""}function eN(n,e={}){if(!n)return n;let{date:t=new Date,taskData:r,icsData:a,extractProjectBasename:i,extractProjectFilePath:s}=e,o=n,l=lqe(n);if(o=oqe(o,t),r){let u=Array.isArray(r.contexts)&&r.contexts.length>0?r.contexts[0]:"";o=o.replace(/\{\{context\}\}/g,u);let p=Array.isArray(r.projects)&&r.projects.length>0?i?i(r.projects[0]):r.projects[0]:"";o=o.replace(/\{\{project\}\}/g,p);let m=Array.isArray(r.projects)&&r.projects.length>0?r.projects.map(U=>i?i(U):U).join("/"):"";o=o.replace(/\{\{projects\}\}/g,m);let f=Array.isArray(r.projects)&&r.projects.length>0?vH(r.projects[0],s):"";o=o.replace(/\{\{projectFilePath\}\}/g,f);let h=Array.isArray(r.projects)&&r.projects.length>0?r.projects.map(U=>vH(U,s)).filter(U=>U.length>0).join("/"):"";o=o.replace(/\{\{projectFilePaths\}\}/g,h);let g=Array.isArray(r.projects)&&r.projects.length>0?Kme(r.projects[0],s):"";o=o.replace(/\{\{projectFolder\}\}/g,g);let v=Array.isArray(r.projects)&&r.projects.length>0?r.projects.map(U=>Kme(U,s)).filter(U=>U.length>0).join("/"):"";o=o.replace(/\{\{projectFolders\}\}/g,v);let k=Array.isArray(r.contexts)&&r.contexts.length>0?r.contexts.join("/"):"";o=o.replace(/\{\{contexts\}\}/g,k);let T=r.priority||"";o=o.replace(/\{\{priority\}\}/g,T);let b=r.status||"";o=o.replace(/\{\{status\}\}/g,b);let w=r.title?r.title.replace(/[<>:"/\\|?*]/g,"_"):"";o=o.replace(/\{\{title\}\}/g,w);let S=r.due||"";o=o.replace(/\{\{dueDate\}\}/g,S);let C=r.scheduled||"";o=o.replace(/\{\{scheduledDate\}\}/g,C);let x=T?T.substring(0,1).toUpperCase():"";o=o.replace(/\{\{priorityShort\}\}/g,x);let E=b?b.substring(0,1).toUpperCase():"";o=o.replace(/\{\{statusShort\}\}/g,E);let _=w?w.toLowerCase():"";o=o.replace(/\{\{titleLower\}\}/g,_);let F=w?w.toUpperCase():"";o=o.replace(/\{\{titleUpper\}\}/g,F);let I=w?w.toLowerCase().replace(/\s+/g,"_"):"";o=o.replace(/\{\{titleSnake\}\}/g,I);let A=w?w.toLowerCase().replace(/\s+/g,"-"):"";o=o.replace(/\{\{titleKebab\}\}/g,A);let R=w?w.replace(/(?:^\w|[A-Z]|\b\w)/g,(U,pe)=>pe===0?U.toLowerCase():U.toUpperCase()).replace(/\s+/g,""):"";o=o.replace(/\{\{titleCamel\}\}/g,R);let O=w?w.replace(/(?:^\w|[A-Z]|\b\w)/g,U=>U.toUpperCase()).replace(/\s+/g,""):"";o=o.replace(/\{\{titlePascal\}\}/g,O)}if(a){let u=a.title?a.title.replace(/[<>:"/\\|?*]/g,"_"):"";o=o.replace(/\{\{icsEventTitle\}\}/g,u);let p=u?u.toLowerCase():"";o=o.replace(/\{\{icsEventTitleLower\}\}/g,p);let m=u?u.toUpperCase():"";o=o.replace(/\{\{icsEventTitleUpper\}\}/g,m);let f=u?u.toLowerCase().replace(/\s+/g,"_"):"";o=o.replace(/\{\{icsEventTitleSnake\}\}/g,f);let h=u?u.toLowerCase().replace(/\s+/g,"-"):"";o=o.replace(/\{\{icsEventTitleKebab\}\}/g,h);let g=u?u.replace(/(?:^\w|[A-Z]|\b\w)/g,(b,w)=>w===0?b.toLowerCase():b.toUpperCase()).replace(/\s+/g,""):"";o=o.replace(/\{\{icsEventTitleCamel\}\}/g,g);let v=u?u.replace(/(?:^\w|[A-Z]|\b\w)/g,b=>b.toUpperCase()).replace(/\s+/g,""):"";o=o.replace(/\{\{icsEventTitlePascal\}\}/g,v);let k=a.location?a.location.replace(/[<>:"/\\|?*]/g,"_"):"";o=o.replace(/\{\{icsEventLocation\}\}/g,k);let T=a.description?a.description.replace(/[<>:"/\\|?*]/g,"_"):"";o=o.replace(/\{\{icsEventDescription\}\}/g,T)}o=o.replace(/\{\{year\}\}/g,D(t,"yyyy")),o=o.replace(/\{\{month\}\}/g,D(t,"MM")),o=o.replace(/\{\{day\}\}/g,D(t,"dd")),o=o.replace(/\{\{date\}\}/g,D(t,"yyyy-MM-dd")),o=o.replace(/\{\{time\}\}/g,D(t,"HHmmss")),o=o.replace(/\{\{timestamp\}\}/g,D(t,"yyyy-MM-dd-HHmmss")),o=o.replace(/\{\{dateTime\}\}/g,D(t,"yyyy-MM-dd-HHmm")),o=o.replace(/\{\{hour\}\}/g,D(t,"HH")),o=o.replace(/\{\{minute\}\}/g,D(t,"mm")),o=o.replace(/\{\{second\}\}/g,D(t,"ss")),o=o.replace(/\{\{shortDate\}\}/g,D(t,"yyMMdd")),o=o.replace(/\{\{shortYear\}\}/g,D(t,"yy")),o=o.replace(/\{\{monthName\}\}/g,D(t,"MMMM")),o=o.replace(/\{\{monthNameShort\}\}/g,D(t,"MMM")),o=o.replace(/\{\{dayName\}\}/g,D(t,"EEEE")),o=o.replace(/\{\{dayNameShort\}\}/g,D(t,"EEE")),o=o.replace(/\{\{week\}\}/g,D(t,"ww")),o=o.replace(/\{\{quarter\}\}/g,D(t,"q")),o=o.replace(/\{\{time12\}\}/g,D(t,"hh:mm a")),o=o.replace(/\{\{time24\}\}/g,D(t,"HH:mm")),o=o.replace(/\{\{hourPadded\}\}/g,D(t,"HH")),o=o.replace(/\{\{hour12\}\}/g,D(t,"hh")),o=o.replace(/\{\{ampm\}\}/g,D(t,"a")),o=o.replace(/\{\{unix\}\}/g,Math.floor(t.getTime()/1e3).toString()),o=o.replace(/\{\{unixMs\}\}/g,t.getTime().toString()),o=o.replace(/\{\{milliseconds\}\}/g,D(t,"SSS")),o=o.replace(/\{\{ms\}\}/g,D(t,"SSS")),o=o.replace(/\{\{timezone\}\}/g,D(t,"xxx")),o=o.replace(/\{\{timezoneShort\}\}/g,D(t,"xx")),o=o.replace(/\{\{utcOffset\}\}/g,D(t,"xxx")),o=o.replace(/\{\{utcOffsetShort\}\}/g,D(t,"xx")),o=o.replace(/\{\{utcZ\}\}/g,"Z");let c=(()=>{let u=D(t,"yyMMdd"),p=new Date(t);p.setHours(0,0,0,0);let f=Math.floor((t.getTime()-p.getTime())/1e3).toString(36);return`${u}${f}`})();o=o.replace(/\{\{zettel\}\}/g,c);let d=Date.now().toString()+Math.random().toString(36).substring(2,7);if(o=o.replace(/\{\{nano\}\}/g,d),e.currentNote){let u=e.currentNote;o=o.replace(/\{\{currentNote(Path|Title)\}\}/g,(p,m)=>m==="Path"?u.path:u.title)}return l?cqe(o):o}var aqe,iqe,sqe,kH=y(()=>{Cr();q();aqe=M({tag:"Utils/FolderTemplateProcessor"}),iqe={YYYY:"yyyy",YY:"yy",MMMM:"MMMM",MMM:"MMM",MM:"MM",DD:"dd",dddd:"EEEE",ddd:"EEE"},sqe=/YYYY|MMMM|dddd|MMM|ddd|YY|MM|DD/g});var Zme,tN,rN,Qme=y(()=>{Zme=require("obsidian");Pr();pf();kv();yt();xe();dr();JI();Yg();q();tN=M({tag:"Services/TaskService/TaskCreationService"}),rN=class{constructor(e){this.deps=e}setWebhookNotifier(e){this.deps.webhookNotifier=e}async createTask(e,t={}){var s,o,l;let{applyDefaults:r=!0,applyTemplate:a=!0}=t,{runtime:i}=this.deps;try{if(r&&(e=await this.deps.applyTaskCreationDefaults(e)),!e.title||!e.title.trim())throw new Error("Title is required");let c=e.title.trim(),d=this.deps.sanitizeTitleForStorage(c),u=i.settings.storeTitleInFilename?this.deps.sanitizeTitleForFilename(c):d,p=e.priority||i.settings.defaultTaskPriority,m=e.status||i.settings.defaultTaskStatus,f=e.dateCreated||qe(),h=e.dateModified||qe(),g=e.recurrence||void 0,v=g?void 0:e.completedDate||((s=i.statusManager)!=null&&s.isCompletedStatus(m)?Yo():void 0),k=e.contexts||[],T=e.projects||[],b=qo(e.tags||[]);if(i.settings.taskIdentificationMethod==="tag"){let le=(o=qo(i.settings.taskTag)[0])!=null?o:i.settings.taskTag;le&&!b.includes(le)&&(b=[le,...b])}let w={title:u,priority:p,status:m,date:new Date,dueDate:e.due,scheduledDate:e.scheduled,contexts:k,projects:T,tags:b,timeEstimate:e.timeEstimate,details:e.details,parentNote:e.parentNote},S=(l=e.occurrenceFilenameTemplate)==null?void 0:l.trim(),C=S&&e.occurrence_date?vue(w,S,e.occurrence_date):hue(w,i.settings),x=await this.resolveTargetFolder(e);x&&await qu(i.app.vault,x);let E=await vv(C,x,i.app.vault),_=x?`${x}/${E}.md`:`${E}.md`,F=S&&e.occurrence_date?C:u,I=i.settings.storeTitleInFilename&&E===F&&d===u,A={title:d,status:m,priority:p,due:e.due||void 0,scheduled:e.scheduled||void 0,contexts:k.length>0?k:void 0,projects:T.length>0?T:void 0,timeEstimate:e.timeEstimate&&e.timeEstimate>0?e.timeEstimate:void 0,dateCreated:f,dateModified:h,recurrence:g,completedDate:v,recurrence_anchor:e.recurrence_anchor||void 0,recurrence_parent:e.recurrence_parent||void 0,occurrence_date:e.occurrence_date||void 0,occurrence_materialization:e.occurrence_materialization||void 0,occurrence_next_trigger:e.occurrence_next_trigger||void 0,occurrence_template:e.occurrence_template||void 0,occurrence_past_horizon:e.occurrence_past_horizon||void 0,occurrence_future_horizon:e.occurrence_future_horizon||void 0,reminders:e.reminders&&e.reminders.length>0?e.reminders:void 0,customProperties:e.customProperties||void 0,icsEventId:e.icsEventId||void 0,blockedBy:e.blockedBy&&e.blockedBy.length>0?e.blockedBy:void 0},R=i.fieldMapper.getUserFields();if(R.length>0){let le=e,at=A;for(let He of R)Object.prototype.hasOwnProperty.call(le,He.key)&&le[He.key]!==void 0&&(at[He.key]=le[He.key])}if(A.recurrence&&typeof A.recurrence=="string"&&!A.recurrence.includes("DTSTART:")){let le={...A,title:d,status:m,priority:p,path:"",archived:!1},at=uf(le);at&&(A.recurrence=at)}let U=i.settings.taskIdentificationMethod==="tag"?i.settings.taskTag:void 0,pe=i.fieldMapper.mapToFrontmatter(A,U,I);if(i.settings.taskIdentificationMethod==="property"){let le=i.settings.taskPropertyName,at=i.settings.taskPropertyValue;le&&at&&Gg(pe,le,at),b.length>0&&(pe.tags=b)}else pe.tags=b;let oe=a?await this.deps.applyTemplate(e):{frontmatter:{},body:""},X=oe.body?oe.body.replace(/\r\n/g,`
`).trimEnd():e.details?e.details.replace(/\r\n/g,`
`).trimEnd():"",de=Yme(pe,oe.frontmatter);e.customFrontmatter&&(de={...de,...e.customFrontmatter}),I&&delete de[i.fieldMapper.toUserField("title")],i.settings.taskIdentificationMethod==="property"&&Gg(de,i.settings.taskPropertyName,i.settings.taskPropertyValue),b=qo(de.tags);let Q=`---
${(0,Zme.stringifyYaml)(de)}---
`;X.length>0&&(Q+=`${X}
`);let Z=await i.app.vault.create(_,Q),Ue={...A,...de,title:Y(de.title||A.title||d),status:Y(de.status||A.status||m),priority:Y(de.priority||A.priority||p),path:Z.path,tags:b,archived:!1,details:X};try{i.cacheManager.waitForFreshTaskData&&await i.cacheManager.waitForFreshTaskData(Z),i.cacheManager.updateTaskInfoInCache(Z.path,Ue)}catch(le){tN.error("Error updating cache for new task:",{category:"stale-data",operation:"updating-cache-new-task",error:le})}if(i.emitter.trigger(rt,{path:Z.path,updatedTask:Ue}),this.deps.webhookNotifier)try{await this.deps.webhookNotifier.triggerWebhook("task.created",{task:Ue})}catch(le){tN.warn("Failed to trigger webhook for task creation:",{category:"provider",operation:"trigger-webhook-task-creation",error:le})}return i.taskCalendarSyncService&&i.settings.googleCalendarExport.enabled&&i.settings.googleCalendarExport.syncOnTaskCreate&&i.taskCalendarSyncService.syncTaskToCalendar(Ue).catch(le=>{tN.warn("Failed to sync task to Google Calendar:",{category:"provider",operation:"sync-task-google-calendar",error:le})}),{file:Z,taskInfo:Ue}}catch(c){let d=c instanceof Error?c.message:String(c);throw tN.error("Error creating task:",{category:"persistence",operation:"creating-task",details:{stack:c instanceof Error?c.stack:void 0,taskData:e},error:d}),new Error(`Failed to create task: ${d}`)}}async resolveTargetFolder(e){let{runtime:t}=this.deps;if(e.creationContext==="inline-conversion"||e.creationContext==="modal-inline-creation"){let a=t.settings.inlineTaskConvertFolder||"";if(a.trim())return this.deps.processFolderTemplate(a,e);let i=t.settings.tasksFolder||"";return this.deps.processFolderTemplate(i,e)}let r=t.settings.tasksFolder||"";return this.deps.processFolderTemplate(r,e)}}});function Jme(n){return Array.isArray(n.timeEntries)?{...n,timeEntries:n.timeEntries.map(pqe)}:{...n}}function pqe(n){let e={...n};return delete e.duration,e}function nN(n){return Array.isArray(n)?n.filter(e=>typeof e=="string"):[]}function mqe(n,e){let t=new Set(nN(n.complete_instances)),r=new Set(nN(n.skipped_instances)),a,i=s=>{(!a||s>a)&&(a=s)};if(Object.prototype.hasOwnProperty.call(e,"complete_instances"))for(let s of nN(e.complete_instances))t.has(s)||i(s);if(Object.prototype.hasOwnProperty.call(e,"skipped_instances"))for(let s of nN(e.skipped_instances))r.has(s)||i(s);return a}function Xme(n){return Object.prototype.hasOwnProperty.call(n,"details")?typeof n.details=="string"?n.details.replace(/\r\n/g,`
`):"":null}function efe({originalTask:n,updates:e,maintainDueDateOffsetInRecurring:t,updateToNextScheduledOccurrenceFn:r=Cd,addDTSTARTToRecurrenceRuleFn:a=uf}){var o,l;let i={};if(e.recurrence!==void 0&&e.recurrence!==n.recurrence){let c={...n,...e},d=r(c,t);if(d.scheduled&&(i.scheduled=d.scheduled),d.due&&(i.due=d.due),typeof e.recurrence=="string"&&e.recurrence&&!e.recurrence.includes("DTSTART:")){let u={...n,...e,...i},p=a(u);p&&(i.recurrence=p)}}else if(e.recurrence!==void 0&&!n.recurrence&&e.recurrence&&typeof e.recurrence=="string"&&!e.recurrence.includes("DTSTART:")){let c={...n,...e},d=a(c);d&&(i.recurrence=d)}if(e.scheduled!==void 0&&e.scheduled!==n.scheduled&&n.recurrence&&typeof n.recurrence=="string"&&!n.recurrence.includes("DTSTART:")){let c={...n,...e},d=a(c);d&&(i.recurrence=d)}if(Object.prototype.hasOwnProperty.call(e,"scheduled")){let c={...n,...e,...i},d=mqe(n,e),u=d?r({...n,complete_instances:(o=e.complete_instances)!=null?o:n.complete_instances,skipped_instances:(l=e.skipped_instances)!=null?l:n.skipped_instances},t):void 0;d&&e.scheduled!==n.scheduled&&e.scheduled===(u==null?void 0:u.scheduled)&&(e.recurrence===void 0||e.recurrence===n.recurrence)?kC(n,d,c):dM(n,e.scheduled,c),i.googleCalendarExceptionOriginalScheduled=c.googleCalendarExceptionOriginalScheduled,i.googleCalendarMovedOriginalDates=c.googleCalendarMovedOriginalDates}let s={...n,...e,...i};return Vf(s),i.googleCalendarExceptionOriginalScheduled=s.googleCalendarExceptionOriginalScheduled,i.googleCalendarMovedOriginalDates=s.googleCalendarMovedOriginalDates,i}function tfe({frontmatter:n,originalTask:e,updates:t,recurrenceUpdates:r,dateModified:a,fieldMapper:i,taskIdentification:s,storeTitleInFilename:o,updateCompletedDateInFrontmatter:l}){let c={tags:qo(n.tags),...t,...r,dateModified:a},d=i.mapToFrontmatter(c,s.method==="tag"?s.tag:void 0,o);if(fqe(n,t,d,i),Object.entries(d).forEach(([u,p])=>{p!==void 0&&(n[u]=p)}),t.status!==void 0&&l(n,t.status,!!e.recurrence),s.method==="property"&&hqe(n,s),t.customFrontmatter&&Object.entries(t.customFrontmatter).forEach(([u,p])=>{p===null?delete n[u]:n[u]=p}),gqe(n,{...t,...r},i),o&&t.title!==void 0&&t.title!==e.title&&delete n[i.toUserField("title")],Object.prototype.hasOwnProperty.call(t,"tags")){let u=qo(t.tags);u.length>0?n.tags=u:delete n.tags}return s.method==="property"&&Gg(n,s.propertyName,s.propertyValue),{finalTags:qo(n.tags)}}function fqe(n,e,t,r){if(Object.prototype.hasOwnProperty.call(e,"title"))return;let a=r.toUserField("title");Object.prototype.hasOwnProperty.call(n,a)&&delete t[a]}function hqe(n,e){e.propertyName&&e.propertyValue&&Gg(n,e.propertyName,e.propertyValue)}function gqe(n,e,t){if(Object.prototype.hasOwnProperty.call(e,"due")&&e.due===void 0&&delete n[t.toUserField("due")],Object.prototype.hasOwnProperty.call(e,"scheduled")&&e.scheduled===void 0&&delete n[t.toUserField("scheduled")],Object.prototype.hasOwnProperty.call(e,"contexts")&&(!Array.isArray(e.contexts)||e.contexts.length===0)&&delete n[t.toUserField("contexts")],Object.prototype.hasOwnProperty.call(e,"projects")){let r=t.toUserField("projects"),a=Array.isArray(e.projects)?e.projects:[];a.length>0?n[r]=a:delete n[r]}Object.prototype.hasOwnProperty.call(e,"timeEstimate")&&e.timeEstimate===void 0&&delete n[t.toUserField("timeEstimate")],Object.prototype.hasOwnProperty.call(e,"completedDate")&&e.completedDate===void 0&&delete n[t.toUserField("completedDate")],Object.prototype.hasOwnProperty.call(e,"recurrence")&&e.recurrence===void 0&&delete n[t.toUserField("recurrence")],Object.prototype.hasOwnProperty.call(e,"googleCalendarExceptionOriginalScheduled")&&e.googleCalendarExceptionOriginalScheduled===void 0&&delete n[t.toUserField("googleCalendarExceptionOriginalScheduled")],Object.prototype.hasOwnProperty.call(e,"googleCalendarMovedOriginalDates")&&(!Array.isArray(e.googleCalendarMovedOriginalDates)||e.googleCalendarMovedOriginalDates.length===0)&&delete n[t.toUserField("googleCalendarMovedOriginalDates")],Object.prototype.hasOwnProperty.call(e,"blockedBy")&&(!Array.isArray(e.blockedBy)||e.blockedBy.length===0)&&delete n[t.toUserField("blockedBy")],Object.prototype.hasOwnProperty.call(e,"reminders")&&(!Array.isArray(e.reminders)||e.reminders.length===0)&&delete n[t.toUserField("reminders")]}function rfe({originalTask:n,updates:e,recurrenceUpdates:t,newPath:r,dateModified:a,currentDateString:i,normalizedDetails:s,finalTags:o,isCompletedStatus:l}){let c={...n,...e,...t,path:r,dateModified:a};return o&&(c.tags=o),s!==null&&(c.details=s),e.status!==void 0&&!n.recurrence&&(l(e.status)?n.completedDate||(c.completedDate=i):c.completedDate=void 0),c}var nfe=y(()=>{pf();uM();Yg()});var aN,Kv,iN,afe=y(()=>{aN=require("obsidian");Pr();yt();kv();xe();nfe();q();ya();Kv=M({tag:"Services/TaskService/TaskUpdateService"}),iN=class{constructor(e){this.deps=e}setWebhookNotifier(e){this.deps.webhookNotifier=e}setAutoArchiveService(e){this.deps.autoArchiveService=e}async updateTask(e,t){var a;let{runtime:r}=this.deps;try{let i=Jme(t),s=r.app.vault.getAbstractFileByPath(e.path);if(!(s instanceof aN.TFile))throw new Error(`Cannot find task file: ${e.path}`);let o=r.settings.storeTitleInFilename&&i.title&&i.title!==e.title,l=e.path;if(o&&i.title){let h=s.parent?s.parent.path:"",g=await vv(i.title,h,r.app.vault);l=h?`${h}/${g}.md`:`${g}.md`}let c={},d=Xme(i),u,p=qe(),m=i.status!==void 0?Yo():"";if(await yr(r.app,s,h=>{let g=r.fieldMapper.mapFromFrontmatter(h,e.path,r.settings.storeTitleInFilename);e={id:e.id,basesData:e.basesData,details:e.details,blocking:e.blocking,isBlocked:e.isBlocked,isBlocking:e.isBlocking,hasSubtasks:e.hasSubtasks,path:e.path,title:e.title,status:e.status,priority:e.priority,archived:!1,...g},c=efe({originalTask:e,updates:i,maintainDueDateOffsetInRecurring:r.settings.maintainDueDateOffsetInRecurring}),u=tfe({frontmatter:h,originalTask:e,updates:i,recurrenceUpdates:c,dateModified:p,fieldMapper:r.fieldMapper,taskIdentification:{method:r.settings.taskIdentificationMethod,tag:r.settings.taskTag,propertyName:r.settings.taskPropertyName,propertyValue:r.settings.taskPropertyValue},storeTitleInFilename:r.settings.storeTitleInFilename,updateCompletedDateInFrontmatter:(k,T,b)=>this.deps.updateCompletedDateInFrontmatter(k,T,b)}).finalTags}),o&&await r.app.fileManager.renameFile(s,l),d!==null){let h=r.app.vault.getAbstractFileByPath(l);h instanceof aN.TFile&&await Ob(r.app,h,g=>{let{frontmatter:v}=Gu(g),k=v!==null?`---
${v}
---
`:"",T=d.trimEnd(),b=T.length>0?`${T}
`:"";return`${k}${b}`})}let f=rfe({originalTask:e,updates:i,recurrenceUpdates:c,newPath:l,dateModified:p,currentDateString:m,normalizedDetails:d,finalTags:u,isCompletedStatus:h=>r.statusManager.isCompletedStatus(h)});o&&(r.cacheManager.clearCacheEntry(e.path),r.expandedProjectsService.renamePath(e.path,l),r.projectSubtasksService.invalidateIndex());try{let h=r.app.vault.getAbstractFileByPath(l);if(h instanceof aN.TFile&&r.cacheManager.waitForFreshTaskData){let g={};i.title!==void 0&&(g.title=i.title),i.status!==void 0&&(g.status=i.status),i.priority!==void 0&&(g.priority=i.priority),Object.keys(g).length>0&&await r.cacheManager.waitForFreshTaskData(h)}r.cacheManager.updateTaskInfoInCache(l,f)}catch(h){Kv.error("Error updating task cache:",{category:"stale-data",operation:"updating-task-cache",details:{taskPath:l},error:h instanceof Error?h.message:String(h)})}try{r.emitter.trigger(rt,{path:l,originalTask:e,updatedTask:f})}catch(h){Kv.error("Error emitting task update event:",{category:"validation",operation:"emitting-task-update-event",details:{taskPath:l},error:h instanceof Error?h.message:String(h)})}if(this.deps.webhookNotifier)try{let h=r.statusManager.isCompletedStatus(e.status),g=r.statusManager.isCompletedStatus(f.status);!h&&g?await this.deps.webhookNotifier.triggerWebhook("task.completed",{task:f}):await this.deps.webhookNotifier.triggerWebhook("task.updated",{task:f,previous:e})}catch(h){Kv.warn("Failed to trigger webhook for task update:",{category:"provider",operation:"trigger-webhook-task-update",error:h})}if((a=r.taskCalendarSyncService)!=null&&a.isEnabled()){let h=r.statusManager.isCompletedStatus(e.status),g=r.statusManager.isCompletedStatus(f.status);(!h&&g?r.taskCalendarSyncService.completeTaskInCalendar(f):r.taskCalendarSyncService.updateTaskInCalendar(f,e)).catch(k=>{Kv.warn("Failed to sync task update to Google Calendar:",{category:"provider",operation:"sync-task-update-google-calendar",error:k})})}return await this.handleAutoArchive(e,f,i.status),f}catch(i){let s=i instanceof Error?i.message:String(i);throw Kv.error("Error updating task:",{category:"validation",operation:"updating-task",details:{stack:i instanceof Error?i.stack:void 0,taskPath:e.path,updates:t},error:s}),new Error(`Failed to update task: ${s}`)}}async handleAutoArchive(e,t,r){if(!(!this.deps.autoArchiveService||r===void 0||r===e.status))try{let a=this.deps.runtime.statusManager.getStatusConfig(t.status);if(!a)return;a.autoArchive?await this.deps.autoArchiveService.scheduleAutoArchive(t,a):await this.deps.autoArchiveService.cancelAutoArchive(t.path)}catch(a){Kv.warn("Failed to handle auto-archive for status change:",{category:"validation",operation:"handle-auto-archive-status-change",error:a})}}}});function ife(n,e,t={}){var l,c,d,u;let r=e.taskCreationDefaults,a=(l=t.calculateDefaultDate)!=null?l:jb,i=(c=t.calculateDefaultDateTime)!=null?c:Ol,s=(d=t.convertDefaultRemindersToReminders)!=null?d:IC,o={...n,customFrontmatter:n.customFrontmatter?{...n.customFrontmatter}:void 0};return o.due===void 0&&r.defaultDueDate!=="none"&&(o.due=i(r.defaultDueDate,r.defaultDueTime)),o.scheduled===void 0&&r.defaultScheduledDate!=="none"&&(o.scheduled=i(r.defaultScheduledDate,r.defaultScheduledTime)),!o.contexts&&r.defaultContexts&&(o.contexts=TH(r.defaultContexts)),!o.projects&&r.defaultProjects&&(o.projects=TH(r.defaultProjects)),!o.tags&&r.defaultTags&&(o.tags=TH(r.defaultTags)),!o.timeEstimate&&r.defaultTimeEstimate>0&&(o.timeEstimate=r.defaultTimeEstimate),!o.recurrence&&r.defaultRecurrence!=="none"&&(o.recurrence=yqe[r.defaultRecurrence]),!o.reminders&&r.defaultReminders&&r.defaultReminders.length>0&&(o.reminders=s(r.defaultReminders)),vqe(o,(u=e.userFields)!=null?u:[],a),o}function TH(n){return n.split(",").map(e=>e.trim()).filter(e=>e.length>0)}function vqe(n,e,t){if(e.length!==0){n.customFrontmatter||(n.customFrontmatter={});for(let r of e){let a=kqe(r);if(a!==void 0&&n.customFrontmatter[r.key]===void 0)if(r.type==="date"&&typeof a=="string"){let i=t(a);i&&(n.customFrontmatter[r.key]=i)}else n.customFrontmatter[r.key]=a}}}function kqe(n){if(n.defaultValue!==void 0)return n.defaultValue;if(n.type==="boolean")return!1}var yqe,sfe=y(()=>{yt();BM();yqe={none:void 0,daily:"FREQ=DAILY",weekly:"FREQ=WEEKLY",monthly:"FREQ=MONTHLY",yearly:"FREQ=YEARLY"}});function lfe(n){return n.replace(/./g,e=>{let t=e.charCodeAt(0);return t<=31||t>=127&&t<=159?"":e})}function cfe(n){return n.trim().replace(/\s+/g," ")}function dfe(n){return n.length>0?n:ux}function ufe(n){if(!n||typeof n!="string")return ux;try{let e=lfe(cfe(n)).replace(/[<>:"/\\|?*#[\]]/g,"").replace(/^\.+|\.+$/g,"").trim();return dfe(e)}catch(e){return ofe.error("Error sanitizing title:",{category:"validation",operation:"sanitizing-title",error:e}),ux}}function pfe(n){if(!n||typeof n!="string")return ux;try{return dfe(lfe(cfe(n)).trim())}catch(e){return ofe.error("Error sanitizing title:",{category:"validation",operation:"sanitizing-title",error:e}),ux}}var ofe,ux,mfe=y(()=>{q();ofe=M({tag:"Services/TaskService/TaskTitleSanitizer"}),ux="untitled"});function bH(n,e,t,r){return e!=="status"?null:{wasCompleted:n.statusManager.isCompletedStatus(n.normalizeStatusValue(t)),isCompleted:n.statusManager.isCompletedStatus(n.normalizeStatusValue(r))}}async function Tqe(n,e){try{n.cacheManager.waitForFreshTaskData&&await n.cacheManager.waitForFreshTaskData(e.file),n.cacheManager.updateTaskInfoInCache(e.originalTask.path,e.updatedTask)}catch(t){Zv.error("Error updating task cache:",{category:"stale-data",operation:"updating-task-cache",details:{taskPath:e.originalTask.path},error:t instanceof Error?t.message:String(t)})}}async function bqe(n,e){try{n.emitter.trigger(rt,{path:e.originalTask.path,originalTask:e.originalTask,updatedTask:e.updatedTask});let t=bH(n,e.property,e.oldValue,e.newValue);if(!t||t.wasCompleted===t.isCompleted)return;let r=n.cacheManager.getBlockedTaskPaths(e.originalTask.path);for(let a of r)try{let i=await n.cacheManager.getTaskInfo(a);i&&n.emitter.trigger(rt,{path:a,originalTask:i,updatedTask:i})}catch(i){Zv.error(`Error triggering update for dependent task ${a}:`,{category:"validation",operation:"triggering-update-dependent-task",error:i})}}catch(t){Zv.error("Error emitting task update event:",{category:"validation",operation:"emitting-task-update-event",details:{taskPath:e.originalTask.path},error:t instanceof Error?t.message:String(t)})}}async function wqe(n,e){if(n.webhookNotifier)try{let t=bH(n,e.property,e.oldValue,e.newValue);if(t&&!t.wasCompleted&&t.isCompleted){await n.webhookNotifier.triggerWebhook("task.completed",{task:e.updatedTask});return}await n.webhookNotifier.triggerWebhook("task.updated",{task:e.updatedTask,previous:e.originalTask})}catch(t){Zv.warn("Failed to trigger webhook for property update:",{category:"provider",operation:"trigger-webhook-property-update",error:t})}}function Sqe(n,e){var a;if(!((a=n.taskCalendarSyncService)!=null&&a.isEnabled()))return;let t=bH(n,e.property,e.oldValue,e.newValue);(t&&!t.wasCompleted&&t.isCompleted?n.taskCalendarSyncService.completeTaskInCalendar(e.updatedTask):n.taskCalendarSyncService.updateTaskInCalendar(e.updatedTask,e.originalTask)).catch(i=>{Zv.warn("Failed to sync task update to Google Calendar:",{category:"provider",operation:"sync-task-update-google-calendar",error:i})})}async function Cqe(n,e){if(!(!n.autoArchiveService||e.property!=="status"||e.newValue===e.oldValue))try{let t=n.statusManager.getStatusConfig(e.newValue);if(!t)return;t.autoArchive?await n.autoArchiveService.scheduleAutoArchive(e.updatedTask,t):await n.autoArchiveService.cancelAutoArchive(e.updatedTask.path)}catch(t){Zv.warn("Failed to handle auto-archive for status property change:",{category:"persistence",operation:"handle-auto-archive-status-property-change",error:t})}}async function ffe(n,e){await Tqe(n,e),await bqe(n,e),await wqe(n,e),Sqe(n,e),await Cqe(n,e)}var Zv,hfe=y(()=>{Pr();q();Zv=M({tag:"Services/TaskService/TaskPropertyChangeSideEffects"})});function Eqe(n,e){return typeof n=="string"&&Object.prototype.hasOwnProperty.call(e,n)}function ih(n,e="frontmatter field"){if(typeof n!="string")throw new Error(`${e} resolved to a non-string frontmatter field name`);if(n.trim().length===0)throw new Error(`${e} resolved to an invalid frontmatter field name: ${n}`);return n}function gfe(n,e){let t=n.getMapping();if(Eqe(e,t))return ih(n.toUserField(e),`field mapping for ${String(e)}`);let r=xqe[e];return r?ih(n.toUserField(r),`field mapping for ${String(e)}`):ih(String(e),`task property ${String(e)}`)}var xqe,wH=y(()=>{xqe={recurrence_anchor:"recurrenceAnchor",complete_instances:"completeInstances",skipped_instances:"skippedInstances",recurrence_parent:"recurrenceParent",occurrence_date:"occurrenceDate",occurrence_materialization:"occurrenceMaterialization",occurrence_next_trigger:"occurrenceNextTrigger",occurrence_template:"occurrenceTemplate",occurrence_past_horizon:"occurrencePastHorizon",occurrence_future_horizon:"occurrenceFutureHorizon"}});function Dqe(n,e,t){return n==="status"?t(e):n==="blockedBy"?Pqe(e):e}function Pqe(n){if(n==null)return;let t=(Array.isArray(n)?n:[n]).map(r=>Ai(r)).filter(r=>!!r);return t.length>0?t:void 0}function yfe({freshTask:n,property:e,value:t,currentTimestamp:r,currentDateString:a,normalizeStatusValue:i,isCompletedStatus:s}){let o=Dqe(e,t,i),l={...n};if(l[e]=o,l.dateModified=r,e==="status"&&!n.recurrence){let c=i(o);s(c)?l.completedDate=a:l.completedDate=void 0}return{updatedTask:l,normalizedValue:o,dateModified:r}}function Aqe(n){let e=n.toLowerCase();return e==="true"||e==="false"?e==="true":n}function SH(n,e,t,r,a,i){if(!t){if(a(e)){n[r]=i;return}n[r]&&delete n[r]}}function vfe({frontmatter:n,property:e,fieldName:t,rawValue:r,normalizedValue:a,dateModified:i,dateModifiedField:s,completedDateField:o,isRecurring:l,normalizeStatusValue:c,isCompletedStatus:d,currentDateString:u}){let p=ih(t,`task property ${String(e)}`),m=ih(s,"dateModified field mapping"),f=ih(o,"completedDate field mapping");if(e==="status"){let h=c(a);n[p]=Aqe(h),SH(n,h,l,f,d,u)}else if((e==="due"||e==="scheduled")&&!r)delete n[p];else if(e==="blockedBy"){let h=Array.isArray(a)?a:[];h.length>0?n[p]=sre(h):delete n[p]}else n[p]=a;n[m]=i}var kfe=y(()=>{Zs();wH()});function Tfe(n,e,t){let r=!!n.archived,a={...n};a.archived=!r,a.dateModified=t;let i=Array.isArray(a.tags)?a.tags:[];return r?a.tags=i.filter(s=>s!==e):i.includes(e)?a.tags=[...i]:a.tags=[...i,e],{updatedTask:a,isCurrentlyArchived:r,operation:r?"unarchiving":"archiving",dateModified:t}}function bfe({frontmatter:n,archiveTag:e,isCurrentlyArchived:t,dateModified:r,dateModifiedField:a}){if(t){let i=n.tags;if(Array.isArray(i)){let s=i.filter(o=>o!==e);s.length===0?delete n.tags:n.tags=s}}else n.tags?Array.isArray(n.tags)||(n.tags=[n.tags]):n.tags=[],n.tags.includes(e)||n.tags.push(e);n[a]=r}function wfe({isCurrentlyArchived:n,moveArchivedTasks:e,archiveFolderTemplate:t,tasksFolderTemplate:r,fileName:a,taskData:i,processFolderTemplate:s}){if(!e)return null;let o=n?r==null?void 0:r.trim():t==null?void 0:t.trim();if(!o)return null;let l=n?"tasks":"archive",c=s(o,{title:i.title||"",priority:i.priority,status:i.status,contexts:i.contexts,projects:i.projects});return{operation:n?"unarchiving":"archiving",destinationKind:l,destinationFolder:c,newPath:`${c}/${a}`}}var Sfe=y(()=>{});function sN(n){let e={...n};return delete e.duration,e}function oN(n){return Array.isArray(n)?n.map(sN):[]}function CH(n,e,t=e,r="Work session"){let a={startTime:t,description:r};return{updatedTask:{...n,dateModified:e,timeEntries:[...oN(n.timeEntries),a]},newEntry:a,dateModified:e}}function xH(n,e,t,r=t){let a={...n,dateModified:t},i=oN(n.timeEntries),s=i.findIndex(o=>o.startTime===e.startTime&&!o.endTime);return s!==-1&&(i[s]={...i[s],endTime:r},a.timeEntries=i),{updatedTask:a,stopTimestamp:r,dateModified:t}}function EH(n,e,t){if(!Array.isArray(n.timeEntries))throw new Error("Task has no time entries");if(e<0||e>=n.timeEntries.length)throw new Error("Invalid time entry index");return{updatedTask:{...n,dateModified:t,timeEntries:oN(n.timeEntries).filter((r,a)=>a!==e)},timeEntryIndex:e,dateModified:t}}var Cfe=y(()=>{});function xfe({frontmatter:n,timeEntriesField:e,dateModifiedField:t,newEntry:r,dateModified:a}){n[e]||(n[e]=[]),Array.isArray(n[e])&&(n[e]=n[e].map(sN)),n[e].push(r),n[t]=a}function Efe({frontmatter:n,timeEntriesField:e,dateModifiedField:t,timeEntryIndex:r,dateModified:a}){n[e]&&Array.isArray(n[e])&&(n[e]=n[e].filter((i,s)=>s!==r)),n[t]=a}function Dfe({frontmatter:n,timeEntriesField:e,dateModifiedField:t,activeSession:r,stopTimestamp:a,dateModified:i}){if(n[e]&&Array.isArray(n[e])){let s=n[e].map(sN),o=s.findIndex(l=>l.startTime===r.startTime&&!l.endTime);o!==-1&&(s[o].endTime=a),n[e]=s}n[t]=i}var Pfe=y(()=>{Cfe()});function Afe(n,e){return{uniqueAdditions:Array.from(new Set(n)),uniqueRemovals:Array.from(new Set(e))}}function Mfe({blockedTask:n,blockingTaskPath:e,action:t,rawEntry:r,useFrontmatterMarkdownLinks:a,resolveDependencyPath:i,formatDependencyLink:s}){var u;let o=Array.isArray(n.blockedBy)?n.blockedBy.map(p=>Ai(p)).filter(p=>!!p):[];if(o.length===0&&t==="remove")return null;let l=!1,c=!1,d=[];for(let p of o){if(i(n.path,p)===e&&(c=!0,t==="remove")){l=!0;continue}d.push(p)}if(t==="add"&&!c){let p=r?Ai(r):null,m={uid:s(n.path,e,a),reltype:(u=p==null?void 0:p.reltype)!=null?u:Pi};p!=null&&p.gap&&(m.gap=p.gap),d.push(m),l=!0}return l?d:null}function DH(n){return n===null?null:{blockedBy:n.length>0?n:void 0}}var Ife=y(()=>{Zs()});var Ln,qt,lN,Nfe=y(()=>{Pr();TU();Ln=require("obsidian");JI();yt();Zs();Cn();xe();pf();kH();Qme();Oi();afe();sfe();mfe();hfe();kfe();Sfe();Pfe();p2();uM();Ife();wH();ya();q();qt=M({tag:"Services/TaskService"}),lN=class{constructor(e){this.plugin=e;this.occurrenceMaterializations=new Map;this.taskCreationService=new rN({runtime:this.plugin,webhookNotifier:this.webhookNotifier,applyTaskCreationDefaults:t=>Promise.resolve(ife(t,this.plugin.settings)),applyTemplate:t=>this.applyTemplate(t),processFolderTemplate:(t,r,a)=>{var s;if(!/\{\{currentNote(?:Path|Title)\}\}/.test(t))return this.processFolderTemplate(t,r,a);let i=this.plugin.app.workspace.getActiveFile();return this.processFolderTemplate(t,r,a,{path:((s=i==null?void 0:i.parent)==null?void 0:s.path)||"",title:(i==null?void 0:i.basename)||""})},sanitizeTitleForFilename:ufe,sanitizeTitleForStorage:pfe}),this.taskUpdateService=new iN({runtime:this.plugin,webhookNotifier:this.webhookNotifier,autoArchiveService:this.autoArchiveService,updateCompletedDateInFrontmatter:(t,r,a)=>this.updateCompletedDateInFrontmatter(t,r,a)})}hasGoogleCalendarLinks(e){return!!(e.googleCalendarEventId||e.googleCalendarExceptionEventId)}createArchiveCalendarDeletionTask(e,t){return{...t,googleCalendarEventId:e.googleCalendarEventId,googleCalendarExceptionEventId:e.googleCalendarExceptionEventId,googleCalendarExceptionOriginalScheduled:e.googleCalendarExceptionOriginalScheduled,googleCalendarMovedOriginalDates:e.googleCalendarMovedOriginalDates?[...e.googleCalendarMovedOriginalDates]:void 0}}clearGoogleCalendarMetadata(e){e.googleCalendarEventId=void 0,e.googleCalendarExceptionEventId=void 0,e.googleCalendarExceptionOriginalScheduled=void 0,e.googleCalendarMovedOriginalDates=void 0}writeOptionalFrontmatterField(e,t,r){if(r==null||Array.isArray(r)&&r.length===0){delete e[t];return}e[t]=r}async deleteArchivedTaskFromCalendar(e){return!this.plugin.taskCalendarSyncService||await this.plugin.taskCalendarSyncService.deleteTaskFromCalendar(e)?!0:(qt.warn("Failed to delete archived task from Google Calendar during archive:",{category:"provider",operation:"delete-archived-task-google-calendar-archive",details:{taskPath:e.path,eventId:e.googleCalendarEventId}}),!1)}translate(e,t){return this.plugin.i18n.translate(e,t)}setWebhookNotifier(e){this.webhookNotifier=e,this.taskCreationService.setWebhookNotifier(e),this.taskUpdateService.setWebhookNotifier(e)}setAutoArchiveService(e){this.autoArchiveService=e,this.taskUpdateService.setAutoArchiveService(e)}normalizeStatusValue(e){return typeof e=="boolean"?e?"true":"false":typeof e=="string"?e:typeof e=="number"?String(e):""}getCompletionDateForTask(e){return Yo()}processFolderTemplate(e,t,r=new Date,a){let i=t?{title:t.title,priority:t.priority,status:t.status,contexts:t.contexts,projects:t.projects,due:t.due,scheduled:t.scheduled}:void 0;return eN(e,{date:r,taskData:i,currentNote:a,extractProjectBasename:s=>this.extractProjectBasename(s),extractProjectFilePath:s=>this.extractProjectFilePath(s)})}async createTask(e,t={}){let r=await this.taskCreationService.createTask(e,t);return await this.seedInitialOccurrence(r.taskInfo),r}async applyTemplate(e){var r,a,i,s;let t=this.plugin.settings.taskCreationDefaults;if(!t.useBodyTemplate||!((r=t.bodyTemplate)!=null&&r.trim()))return{frontmatter:{},body:((a=e.details)==null?void 0:a.trim())||""};try{let o=(0,Ln.normalizePath)(t.bodyTemplate.trim());o.endsWith(".md")||(o+=".md");let l=this.plugin.app.vault.getAbstractFileByPath(o);if(l instanceof Ln.TFile){let c=await this.plugin.app.vault.read(l),d={title:e.title||"",priority:e.priority||"",status:e.status||"",contexts:Array.isArray(e.contexts)?e.contexts:[],tags:Array.isArray(e.tags)?e.tags:[],timeEstimate:e.timeEstimate||0,dueDate:e.due||"",scheduledDate:e.scheduled||"",details:e.details||"",parentNote:e.parentNote||""};return dx(c,d)}else return qt.warn(`Task body template not found: ${o}`,{category:"persistence",operation:"task-body-template-not-found"}),ve(this.plugin.emitter,this.translate("services.task.notices.templateNotFound",{path:o})),{frontmatter:{},body:((i=e.details)==null?void 0:i.trim())||""}}catch(o){return qt.error("Error reading task body template:",{category:"persistence",operation:"reading-task-body-template",error:o}),ve(this.plugin.emitter,this.translate("services.task.notices.templateReadError",{template:t.bodyTemplate})),{frontmatter:{},body:((s=e.details)==null?void 0:s.trim())||""}}}getOccurrenceTemplateReference(e){var a,i;let t=(a=e.occurrence_template)==null?void 0:a.trim();if(t)return t;let r=this.plugin.settings.taskCreationDefaults;return r.useOccurrenceBodyTemplate&&((i=r.occurrenceBodyTemplate)!=null&&i.trim())?r.occurrenceBodyTemplate.trim():null}resolveTemplateFile(e,t){var o,l,c,d,u,p,m,f;let r=vt(e).trim();if(!r)return null;let a=(f=(u=(l=(o=this.plugin.app.metadataCache).getFirstLinkpathDest)==null?void 0:l.call(o,r,t))!=null?u:(d=(c=this.plugin.app.metadataCache).getFirstLinkpathDest)==null?void 0:d.call(c,r.replace(/\.md$/i,""),t))!=null?f:(m=(p=this.plugin.app.metadataCache).getFirstLinkpathDest)==null?void 0:m.call(p,r,"");if(a instanceof Ln.TFile)return a;let i=(0,Ln.normalizePath)(r),s=/\.md$/i.test(i)?[i]:[`${i}.md`,i];for(let h of s){let g=this.plugin.app.vault.getAbstractFileByPath(h);if(g instanceof Ln.TFile)return g}return null}buildOccurrenceTemplateData(e,t){return{title:e.title||t.title||"",priority:e.priority||t.priority||"",status:e.status||"",contexts:Array.isArray(e.contexts)?e.contexts:[],tags:Array.isArray(e.tags)?e.tags:[],timeEstimate:e.timeEstimate||0,dueDate:e.due||"",scheduledDate:e.scheduled||"",details:e.details||"",parentNote:this.buildOccurrenceParentReference(t)}}extractTemplateCustomFrontmatter(e){let t=new Set(this.plugin.fieldMapper.getUserFields().map(a=>a.key)),r={};for(let[a,i]of Object.entries(e))a==="tags"||t.has(a)||this.plugin.fieldMapper.lookupMappingKey(a)||(r[a]=i);return Object.keys(r).length>0?r:void 0}buildOccurrenceTemplateTask(e){let t=this.plugin.fieldMapper.mapFromFrontmatter(e.frontmatter,"",!1),r=e.body.replace(/\r\n/g,`
`).trimEnd(),a={...t};return r.trim().length>0&&(a.details=r),{templateTask:a,customFrontmatter:this.extractTemplateCustomFrontmatter(e.frontmatter)}}async resolveOccurrenceTemplate(e,t){let r=this.getOccurrenceTemplateReference(e);if(!r)return{configured:!1};let a=this.resolveTemplateFile(r,e.path);if(!a)return qt.warn(`Occurrence note template not found: ${r}`,{category:"persistence",operation:"occurrence-template-not-found"}),ve(this.plugin.emitter,this.translate("services.task.notices.occurrenceTemplateNotFound",{path:r})),{configured:!0};try{let i=await this.plugin.app.vault.read(a),s=dx(i,this.buildOccurrenceTemplateData(t,e));return{configured:!0,...this.buildOccurrenceTemplateTask(s)}}catch(i){return qt.error("Error reading occurrence note template:",{category:"persistence",operation:"reading-occurrence-template",error:i}),ve(this.plugin.emitter,this.translate("services.task.notices.occurrenceTemplateReadError",{template:r})),{configured:!0}}}async toggleStatus(e){try{let r=this.plugin.statusManager.isCompletedStatus(e.status)?this.plugin.settings.defaultTaskStatus:this.plugin.statusManager.getCompletedStatuses()[0]||"done";return await this.updateProperty(e,"status",r)}catch(t){let r=t instanceof Error?t.message:String(t);throw qt.error("Error toggling task status:",{category:"persistence",operation:"toggling-task-status",details:{stack:t instanceof Error?t.stack:void 0,taskPath:e.path,currentStatus:e.status},error:r}),new Error(`Failed to toggle task status: ${r}`)}}async updateProperty(e,t,r,a={}){var i,s,o;try{let l=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(l instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let c=await this.plugin.cacheManager.getTaskInfo(e.path)||e,d=(i=a.completionDate)!=null?i:this.getCompletionDateForTask(c),u=yfe({freshTask:c,property:t,value:r,currentTimestamp:qe(),currentDateString:d,normalizeStatusValue:m=>this.normalizeStatusValue(m),isCompletedStatus:m=>this.plugin.statusManager.isCompletedStatus(m)});t==="scheduled"&&dM(c,u.normalizedValue,u.updatedTask),(t==="recurrence"||t==="recurrence_anchor")&&Vf(u.updatedTask);let p=!1;if(t==="scheduled"&&c.recurrence&&typeof c.scheduled=="string"&&typeof u.normalizedValue=="string"&&u.normalizedValue.length>0){let m=re(c.scheduled),f=re(u.normalizedValue),h=m!==f,g=(s=c.complete_instances)!=null?s:[],v=(o=c.skipped_instances)!=null?o:[],k=g.filter(b=>b>=f),T=v.filter(b=>b>=f);if(h&&(k.length>0||T.length>0)){if(a.confirmClearInstances&&!await a.confirmClearInstances({complete:k,skipped:T}))return c;p=!0,u.updatedTask.complete_instances=g.filter(b=>b<f),u.updatedTask.skipped_instances=v.filter(b=>b<f)}}return await yr(this.plugin.app,l,m=>{let f=gfe(this.plugin.fieldMapper,t),h=this.plugin.fieldMapper.toUserField("dateModified"),g=this.plugin.fieldMapper.toUserField("completedDate");vfe({frontmatter:m,property:t,fieldName:f,rawValue:r,normalizedValue:u.normalizedValue,dateModified:u.dateModified,dateModifiedField:h,completedDateField:g,isRecurring:!!c.recurrence,normalizeStatusValue:v=>this.normalizeStatusValue(v),isCompletedStatus:v=>this.plugin.statusManager.isCompletedStatus(v),currentDateString:d}),this.writeOptionalFrontmatterField(m,this.plugin.fieldMapper.toUserField("googleCalendarExceptionOriginalScheduled"),u.updatedTask.googleCalendarExceptionOriginalScheduled),this.writeOptionalFrontmatterField(m,this.plugin.fieldMapper.toUserField("googleCalendarMovedOriginalDates"),u.updatedTask.googleCalendarMovedOriginalDates),p&&(this.writeOptionalFrontmatterField(m,this.plugin.fieldMapper.toUserField("completeInstances"),u.updatedTask.complete_instances),this.writeOptionalFrontmatterField(m,this.plugin.fieldMapper.toUserField("skippedInstances"),u.updatedTask.skipped_instances))}),await this.applyPropertyChangeSideEffects(l,c,u.updatedTask,t,c[t],u.normalizedValue),u.updatedTask}catch(l){let c=l instanceof Error?l.message:String(l);throw qt.error("Error updating task property:",{category:"persistence",operation:"updating-task-property",details:{stack:l instanceof Error?l.stack:void 0,taskPath:e.path,property:t,value:r},error:c}),new Error(`Failed to update task property: ${c}`)}}async applyPropertyChangeSideEffects(e,t,r,a,i,s){await ffe({cacheManager:this.plugin.cacheManager,emitter:this.plugin.emitter,statusManager:this.plugin.statusManager,taskCalendarSyncService:this.plugin.taskCalendarSyncService,webhookNotifier:this.webhookNotifier,autoArchiveService:this.autoArchiveService,normalizeStatusValue:o=>this.normalizeStatusValue(o)},{file:e,originalTask:t,updatedTask:r,property:a,oldValue:i,newValue:s}),await this.seedInitialOccurrence(r,t),await this.reconcileMaterializedOccurrenceStatusChange(t,r,a,i,s)}async seedInitialOccurrence(e,t){if(!e.recurrence||e.recurrence_parent||e.archived||e.occurrence_materialization!=="on_completion"||t!=null&&t.recurrence&&t.occurrence_materialization==="on_completion")return;let r=Fb(e);if(r)try{await this.materializeOccurrence(e,r)}catch(a){qt.warn("Failed to create first occurrence:",{category:"persistence",operation:"seed-initial-occurrence",error:a}),ve(this.plugin.emitter,"Task saved, but its first occurrence could not be created. Use Create occurrence to retry.")}}async materializeOccurrence(e,t,r={}){let a=typeof t=="string"?t.slice(0,10):ae(t),i=JSON.stringify([e.path,a]),s=this.occurrenceMaterializations.get(i);if(s)return s;let o=this.materializeOccurrenceUnlocked(e,t,r);this.occurrenceMaterializations.set(i,o);try{return await o}finally{this.occurrenceMaterializations.delete(i)}}async materializeOccurrenceUnlocked(e,t,r={}){let a=await this.plugin.cacheManager.getTaskInfo(e.path)||e;if(!a.recurrence)throw new Error("Task is not recurring");let i=await this.plugin.cacheManager.getAllTasks(),s={parentTask:a,targetDate:t,currentTimestamp:qe(),existingOccurrences:i,parentLink:this.buildOccurrenceParentReference(a),defaultStatus:this.plugin.settings.defaultTaskStatus,defaultPriority:this.plugin.settings.defaultTaskPriority,overrides:r},o=vU(s);if(!o.created&&o.existingOccurrence)return o.existingOccurrence;let l=await this.resolveOccurrenceTemplate(a,o.occurrenceTask),d={...(l.templateTask||l.customFrontmatter?vU({...s,templateTask:l.templateTask}):o).occurrenceTask,creationContext:"api",customFrontmatter:l.customFrontmatter,occurrenceFilenameTemplate:this.resolveOccurrenceFilenameTemplate(a)},{taskInfo:u}=await this.createTask(d,{applyDefaults:!1,applyTemplate:!l.configured});return u}resolveOccurrenceFilenameTemplate(e){var t,r,a;try{let i=((t=this.plugin.settings.occurrenceFilenameTemplateProperty)==null?void 0:t.trim())||"occurrenceFilenameTemplate",s=this.plugin.app.vault.getAbstractFileByPath(e.path),o=s instanceof Ln.TFile?(r=this.plugin.app.metadataCache.getFileCache(s))==null?void 0:r.frontmatter:void 0,l=o==null?void 0:o[i],c=typeof l=="string"&&l.trim()?l:this.plugin.settings.occurrenceFilenameTemplate;return typeof c=="string"&&c.trim()?c:void 0}catch(i){return qt.warn("Failed to resolve occurrence filename template:",{category:"persistence",operation:"resolving-occurrence-filename-template",error:i}),((a=this.plugin.settings.occurrenceFilenameTemplate)==null?void 0:a.trim())||void 0}}async findMaterializedOccurrence(e,t){let r=await this.plugin.cacheManager.getTaskInfo(e.path)||e;if(!r.recurrence)return;let a=typeof t=="string"?t.slice(0,10):ae(t),i=await this.plugin.cacheManager.getAllTasks();return yU(i,r,a,this.buildOccurrenceParentReference(r))}async toggleRecurringTaskCompleteWithOccurrenceNotes(e,t){let r=await this.plugin.cacheManager.getTaskInfo(e.path)||e;if(!r.recurrence)throw new Error("Task is not recurring");let a=this.getRecurringTaskActionDate(r,t),i=ae(a),s=await this.findMaterializedOccurrence(r,a);if(s)return this.toggleStatus(s);let o=Array.isArray(r.complete_instances)?r.complete_instances.filter(l=>typeof l=="string"):[];if(r.occurrence_materialization==="on_completion"&&!o.includes(i)){let l=await this.materializeOccurrence(r,a);return this.toggleStatus(l)}return this.toggleRecurringTaskComplete(r,a)}async getMaterializedOccurrenceParent(e){let t=await this.plugin.cacheManager.getTaskInfo(e.path)||e;return this.resolveOccurrenceParentTask(t)}async skipMaterializedOccurrence(e,t=this.getDefaultSkippedOccurrenceStatus()){let r=await this.plugin.cacheManager.getTaskInfo(e.path)||e,a=await this.resolveOccurrenceParentTask(r);if(!a)throw new Error("Cannot resolve occurrence parent");let i=bpe({occurrenceTask:r,parentTask:a,skippedStatus:t,currentTimestamp:qe(),maintainDueDateOffsetInRecurring:this.plugin.settings.maintainDueDateOffsetInRecurring}),s=await this.persistTaskInfoUpdates(r,i.occurrenceUpdates,"skip-materialized-occurrence"),o=await this.persistTaskInfoUpdates(a,i.parentUpdates,"reconcile-skipped-materialized-occurrence-parent");if(i.materializeNextDate)try{await this.materializeOccurrence(o,i.materializeNextDate)}catch(l){qt.warn("Failed to materialize next occurrence after skip:",{category:"persistence",operation:"materialize-next-occurrence-after-skip",details:{parentPath:o.path,nextDate:i.materializeNextDate},error:l})}return s}async unskipMaterializedOccurrence(e){let t=await this.plugin.cacheManager.getTaskInfo(e.path)||e,r=await this.resolveOccurrenceParentTask(t);if(!r)throw new Error("Cannot resolve occurrence parent");let a=wpe({occurrenceTask:t,parentTask:r,activeStatus:this.plugin.settings.defaultTaskStatus,currentTimestamp:qe()}),i=await this.persistTaskInfoUpdates(t,a.occurrenceUpdates,"unskip-materialized-occurrence");return await this.persistTaskInfoUpdates(r,a.parentUpdates,"reconcile-unskipped-materialized-occurrence-parent"),i}getDefaultSkippedOccurrenceStatus(){var e;return(e=this.plugin.settings.customStatuses.find(t=>t.isSkipped))==null?void 0:e.value}async reconcileMaterializedOccurrenceStatusChange(e,t,r,a,i){if(r!=="status"||!FC(t))return;let s=this.plugin.statusManager.isCompletedStatus(this.normalizeStatusValue(a)),o=this.plugin.statusManager.isCompletedStatus(this.normalizeStatusValue(i));if(s===o)return;let l=await this.resolveOccurrenceParentTask(t);if(!l){qt.warn("Could not resolve materialized occurrence parent:",{category:"persistence",operation:"resolve-materialized-occurrence-parent",details:{taskPath:t.path,parent:t.recurrence_parent}});return}let c=qe(),d=o?kpe({occurrenceTask:t,parentTask:l,completedStatus:this.normalizeStatusValue(i),currentTimestamp:c,completionDate:t.completedDate||Yo(),maintainDueDateOffsetInRecurring:this.plugin.settings.maintainDueDateOffsetInRecurring}):Tpe({occurrenceTask:e,parentTask:l,activeStatus:this.normalizeStatusValue(i),currentTimestamp:c});o&&(d=this.adjustRescheduledOccurrenceCompletionProgression(d,t,l,c));let u=await this.persistTaskInfoUpdates(l,d.parentUpdates,"reconcile-materialized-occurrence-parent");if(o&&this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("recurring.instance.completed",{task:u,occurrence:t,date:d.targetDate})}catch(p){qt.warn("Failed to trigger materialized occurrence webhook:",{category:"provider",operation:"trigger-materialized-occurrence-webhook",error:p})}if(o&&d.materializeNextDate)try{await this.materializeOccurrence(u,d.materializeNextDate)}catch(p){qt.warn("Failed to materialize next occurrence after completion:",{category:"persistence",operation:"materialize-next-occurrence-after-completion",details:{parentPath:u.path,nextDate:d.materializeNextDate},error:p})}}adjustRescheduledOccurrenceCompletionProgression(e,t,r,a){var p;let i=this.getRescheduledOccurrenceProgressionDate(t);if(!i||typeof r.recurrence!="string")return e;let s=typeof e.updatedParentTask.recurrence=="string"?e.updatedParentTask.recurrence:r.recurrence;if((e.updatedParentTask.recurrence_anchor||"scheduled")==="completion")return e;let l=Cd({...e.updatedParentTask,recurrence:s,scheduled:t.scheduled||i,due:(p=t.due)!=null?p:r.due},this.plugin.settings.maintainDueDateOffsetInRecurring,{minOccurrenceDate:i}),c={...e.parentUpdates,recurrence:s,dateModified:a};l.scheduled?c.scheduled=l.scheduled:delete c.scheduled,l.due?c.due=l.due:delete c.due;let d={...r,...c},u=e.materializeNextDate?re(d.scheduled||""):void 0;return{...e,updatedParentTask:d,parentUpdates:c,parentFields:xv(c),materializeNextDate:u||void 0,changed:!0}}getRescheduledOccurrenceProgressionDate(e){let t=this.getSafeDatePart(e.occurrence_date),r=this.getSafeDatePart(e.scheduled);return!t||!r||r<=t?null:r}getSafeDatePart(e){if(!e)return"";try{return re(e)}catch(t){return""}}async resolveOccurrenceParentTask(e){var i,s;if(!e.recurrence_parent)return null;let t=vt(e.recurrence_parent),r=new Set([t]);t&&!t.endsWith(".md")&&r.add(`${t}.md`);for(let o of r){let l=await this.plugin.cacheManager.getTaskInfo(o);if(l)return l}let a=(s=(i=this.plugin.app.metadataCache).getFirstLinkpathDest)==null?void 0:s.call(i,t,e.path);return a instanceof Ln.TFile?await this.plugin.cacheManager.getTaskInfo(a.path):null}buildOccurrenceParentReference(e){return this.plugin.settings.useFrontmatterMarkdownLinks?`[${e.title}](<${encodeURI(e.path).replace(/\(/g,"%28").replace(/\)/g,"%29")}>)`:`[[${e.path.replace(/\.md$/i,"")}]]`}applyModelTaskUpdatesToFrontmatter(e,t){let r=Spe(t,this.plugin.fieldMapper.getMapping());for(let a of r)a.op==="delete"?delete e[a.field]:e[a.field]=a.value}async persistTaskInfoUpdates(e,t,r){var s;if(Object.keys(t).length===0)return e;let a=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(a instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let i={...e,...t};await yr(this.plugin.app,a,o=>{this.applyModelTaskUpdatesToFrontmatter(o,t)});try{this.plugin.cacheManager.waitForFreshTaskData&&await this.plugin.cacheManager.waitForFreshTaskData(a),this.plugin.cacheManager.updateTaskInfoInCache(e.path,i)}catch(o){qt.error("Error updating cache for model task updates:",{category:"stale-data",operation:"persist-model-task-updates-cache",details:{taskPath:e.path,sourceOperation:r},error:o})}return this.plugin.emitter.trigger(rt,{path:e.path,originalTask:e,updatedTask:i}),(s=this.plugin.taskCalendarSyncService)!=null&&s.isEnabled()&&this.plugin.taskCalendarSyncService.updateTaskInCalendar(i,e).catch(o=>{qt.warn("Failed to sync model task update to Google Calendar:",{category:"provider",operation:"sync-model-task-update-google-calendar",details:{taskPath:e.path,sourceOperation:r},error:o})}),i}async toggleArchive(e){var u,p;let t=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(t instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let r=this.plugin.fieldMapper.getMapping().archiveTag,a=Tfe(e,r,qe()),{updatedTask:i,isCurrentlyArchived:s,dateModified:o}=a;await yr(this.plugin.app,t,m=>{let f=this.plugin.fieldMapper.toUserField("dateModified");bfe({frontmatter:m,archiveTag:r,isCurrentlyArchived:s,dateModified:o,dateModifiedField:f})});let l=t,c=wfe({isCurrentlyArchived:s,moveArchivedTasks:this.plugin.settings.moveArchivedTasks,archiveFolderTemplate:this.plugin.settings.archiveFolder,tasksFolderTemplate:this.plugin.settings.tasksFolder,fileName:t.name,taskData:{title:i.title||"",priority:i.priority,status:i.status,contexts:i.contexts,projects:i.projects},processFolderTemplate:(m,f)=>this.processFolderTemplate(m,f)});if(c)try{if(await qu(this.plugin.app.vault,c.destinationFolder),this.plugin.app.vault.getAbstractFileByPath(c.newPath))throw new Error(`A file named "${t.name}" already exists in the ${c.destinationKind} folder "${c.destinationFolder}". Cannot move task to avoid overwriting existing file.`);await this.plugin.app.fileManager.renameFile(t,c.newPath);let f=this.plugin.app.vault.getAbstractFileByPath(c.newPath);if(!(f instanceof Ln.TFile))throw new Error(`Failed to resolve moved task file: ${c.newPath}`);l=f,i.path=c.newPath,this.plugin.cacheManager.clearCacheEntry(e.path)}catch(m){let f=m instanceof Error?m.message:String(m),h=c.operation;qt.error(`Error moving ${h} task:`,{category:"persistence",operation:"moving",details:{value:f}}),ve(this.plugin.emitter,this.translate("services.task.notices.moveTaskFailed",{operation:h,error:f}))}let d=!0;if((u=this.plugin.taskCalendarSyncService)!=null&&u.isEnabled()&&i.archived&&this.hasGoogleCalendarLinks(e)){let m=this.createArchiveCalendarDeletionTask(e,i);d=await this.deleteArchivedTaskFromCalendar(m),d&&this.clearGoogleCalendarMetadata(i)}try{l instanceof Ln.TFile&&this.plugin.cacheManager.waitForFreshTaskData&&await this.plugin.cacheManager.waitForFreshTaskData(l),this.plugin.cacheManager.updateTaskInfoInCache(i.path,i)}catch(m){qt.error("Error updating cache for archived task:",{category:"stale-data",operation:"updating-cache-archived-task",error:m})}if(this.plugin.emitter.trigger(rt,{path:i.path,originalTask:e,updatedTask:i}),this.webhookNotifier)try{i.archived?await this.webhookNotifier.triggerWebhook("task.archived",{task:i}):await this.webhookNotifier.triggerWebhook("task.unarchived",{task:i})}catch(m){qt.warn("Failed to trigger webhook for task archive/unarchive:",{category:"provider",operation:"trigger-webhook-task-archive-unarchive",error:m})}return(p=this.plugin.taskCalendarSyncService)!=null&&p.isEnabled()&&(i.archived?!d&&this.hasGoogleCalendarLinks(i)&&qt.warn("Archived task still has Google Calendar links and will need retry cleanup:",{category:"provider",operation:"archived-task-still-has-google-calendar-links-and-will-need-retry-cleanup",details:{value:i.path}}):this.plugin.taskCalendarSyncService.updateTaskInCalendar(i,e).catch(m=>{qt.warn("Failed to sync unarchived task to Google Calendar:",{category:"provider",operation:"sync-unarchived-task-google-calendar",error:m})})),i}async startTimeTracking(e){var o;let t=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(t instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);if(this.plugin.getActiveTimeSession(e))throw new Error("Time tracking is already active for this task");let a=CH(e,qe(),new Date().toISOString()),{updatedTask:i,newEntry:s}=a;await yr(this.plugin.app,t,l=>{let c=this.plugin.fieldMapper.toUserField("timeEntries"),d=this.plugin.fieldMapper.toUserField("dateModified");xfe({frontmatter:l,timeEntriesField:c,dateModifiedField:d,newEntry:s,dateModified:a.dateModified})});try{this.plugin.cacheManager.waitForFreshTaskData&&await this.plugin.cacheManager.waitForFreshTaskData(t),this.plugin.cacheManager.updateTaskInfoInCache(e.path,i)}catch(l){qt.error("Error updating cache for time tracking start:",{category:"stale-data",operation:"updating-cache-time-tracking-start",error:l})}if(this.plugin.emitter.trigger(rt,{path:e.path,originalTask:e,updatedTask:i}),this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("time.started",{task:i,session:(o=i.timeEntries)==null?void 0:o[i.timeEntries.length-1]})}catch(l){qt.warn("Failed to trigger webhook for time tracking start:",{category:"provider",operation:"trigger-webhook-time-tracking-start",error:l})}return i}async stopTimeTracking(e){var s;let t=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(t instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let r=this.plugin.getActiveTimeSession(e);if(!r)throw new Error("No active time tracking session for this task");let a=xH(e,r,qe(),new Date().toISOString()),{updatedTask:i}=a;await yr(this.plugin.app,t,o=>{let l=this.plugin.fieldMapper.toUserField("timeEntries"),c=this.plugin.fieldMapper.toUserField("dateModified");Dfe({frontmatter:o,timeEntriesField:l,dateModifiedField:c,activeSession:r,stopTimestamp:a.stopTimestamp,dateModified:a.dateModified})});try{this.plugin.cacheManager.waitForFreshTaskData&&await this.plugin.cacheManager.waitForFreshTaskData(t),this.plugin.cacheManager.updateTaskInfoInCache(e.path,i)}catch(o){qt.error("Error updating cache for time tracking stop:",{category:"stale-data",operation:"updating-cache-time-tracking-stop",error:o})}if(this.plugin.emitter.trigger(rt,{path:e.path,originalTask:e,updatedTask:i}),this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("time.stopped",{task:i,session:(s=i.timeEntries)==null?void 0:s[i.timeEntries.length-1]})}catch(o){qt.warn("Failed to trigger webhook for time tracking stop:",{category:"provider",operation:"trigger-webhook-time-tracking-stop",error:o})}return i}async updateTask(e,t){let r=await this.taskUpdateService.updateTask(e,t);return await this.seedInitialOccurrence(r,e),r}async updateBlockingRelationships(e,t,r,a={}){let{uniqueAdditions:i,uniqueRemovals:s}=Afe(t,r);for(let o of s){let l=await this.plugin.cacheManager.getTaskInfo(o);if(!l)continue;let c=DH(this.computeBlockedByUpdate(l,e.path,"remove"));c&&await this.updateTask(l,c)}for(let o of i){let l=await this.plugin.cacheManager.getTaskInfo(o);if(!l)continue;let c=DH(this.computeBlockedByUpdate(l,e.path,"add",a[o]));c&&await this.updateTask(l,c)}}computeBlockedByUpdate(e,t,r,a){return Mfe({blockedTask:e,blockingTaskPath:t,action:r,rawEntry:a,useFrontmatterMarkdownLinks:this.plugin.settings.useFrontmatterMarkdownLinks,resolveDependencyPath:(i,s)=>{var o,l;return(l=(o=Jo(this.plugin.app,i,s))==null?void 0:o.path)!=null?l:null},formatDependencyLink:(i,s,o)=>Ks(this.plugin.app,i,s,o)})}async deleteTask(e){try{let t=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(t instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);if(this.plugin.taskCalendarSyncService&&this.hasGoogleCalendarLinks(e))try{await this.plugin.taskCalendarSyncService.deleteTaskFromCalendarByPath(e.path,e.googleCalendarEventId,e.googleCalendarExceptionEventId)}catch(r){qt.warn("Failed to delete task from Google Calendar:",{category:"provider",operation:"delete-task-google-calendar",error:r})}if(await this.plugin.app.fileManager.trashFile(t),this.plugin.cacheManager.clearCacheEntry(e.path),this.plugin.emitter.trigger(Di,{path:e.path,deletedTask:e}),this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("task.deleted",{task:e})}catch(r){qt.warn("Failed to trigger webhook for task deletion:",{category:"provider",operation:"trigger-webhook-task-deletion",error:r})}}catch(t){let r=t instanceof Error?t.message:String(t);throw qt.error("Error deleting task:",{category:"persistence",operation:"deleting-task",details:{stack:t instanceof Error?t.stack:void 0,taskPath:e.path},error:r}),new Error(`Failed to delete task: ${r}`)}}async resolveRecurringTaskActionDate(e,t){if(t)return t;let r=await this.plugin.cacheManager.getTaskInfo(e.path)||e;return this.getRecurringTaskActionDate(r)}getRecurringTaskActionDate(e,t){return mM(e,t)}async toggleRecurringTaskComplete(e,t){var d;let r=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(r instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let a=await this.plugin.cacheManager.getTaskInfo(e.path)||e;if(!a.recurrence)throw new Error("Task is not recurring");let i=fce({freshTask:a,targetDate:this.getRecurringTaskActionDate(a,t),currentTimestamp:qe(),maintainDueDateOffsetInRecurring:this.plugin.settings.maintainDueDateOffsetInRecurring}),{updatedTask:s,dateStr:o,newComplete:l,targetDate:c}=i;if(await yr(this.plugin.app,r,u=>{let p=this.plugin.fieldMapper.toUserField("completeInstances"),m=this.plugin.fieldMapper.toUserField("skippedInstances"),f=this.plugin.fieldMapper.toUserField("dateModified"),h=this.plugin.fieldMapper.toUserField("scheduled"),g=this.plugin.fieldMapper.toUserField("due"),v=this.plugin.fieldMapper.toUserField("recurrence"),k=this.plugin.fieldMapper.toUserField("googleCalendarExceptionOriginalScheduled"),T=this.plugin.fieldMapper.toUserField("googleCalendarMovedOriginalDates");hce({frontmatter:u,completeInstancesField:p,skippedInstancesField:m,dateModifiedField:f,scheduledField:h,dueField:g,recurrenceField:v,googleCalendarExceptionOriginalScheduledField:k,googleCalendarMovedOriginalDatesField:T,plan:i})}),l&&this.plugin.settings.resetCheckboxesOnRecurrence){let u=null;await Ob(this.plugin.app,r,p=>{let{frontmatter:m,body:f}=Gu(p),{content:h,changed:g}=Vte(f);if(!g)return p;let v=m!==null?`---
${m}
---
`:"",k=h.trimEnd();return u=h.replace(/\r\n/g,`
`).trimEnd(),k.length>0?`${v}${k}
`:v}),u!==null&&(s.details=u)}try{if(this.plugin.cacheManager.waitForFreshTaskData){let u={complete_instances:s.complete_instances};s.scheduled!==a.scheduled&&(u.scheduled=s.scheduled),s.due!==a.due&&(u.due=s.due),await this.plugin.cacheManager.waitForFreshTaskData(r)}this.plugin.cacheManager.updateTaskInfoInCache(a.path,s)}catch(u){qt.error("Error updating cache for recurring task:",{category:"stale-data",operation:"updating-cache-recurring-task",error:u})}if(this.plugin.emitter.trigger(rt,{path:a.path,originalTask:a,updatedTask:s}),l&&this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("recurring.instance.completed",{task:s,date:o,targetDate:c})}catch(u){qt.error("Error triggering recurring task completion webhook:",{category:"provider",operation:"triggering-recurring-task-completion-webhook",error:u})}return(d=this.plugin.taskCalendarSyncService)!=null&&d.isEnabled()&&this.plugin.taskCalendarSyncService.updateTaskInCalendar(s,a).catch(u=>{qt.warn("Failed to sync recurring task update to Google Calendar:",{category:"provider",operation:"sync-recurring-task-update-google-calendar",error:u})}),s}async toggleRecurringTaskSkipped(e,t){var d;let r=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(r instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let a=await this.plugin.cacheManager.getTaskInfo(e.path)||e;if(!a.recurrence)throw new Error("Task is not recurring");let i=gce({freshTask:a,targetDate:this.getRecurringTaskActionDate(a,t),currentTimestamp:qe(),maintainDueDateOffsetInRecurring:this.plugin.settings.maintainDueDateOffsetInRecurring}),{updatedTask:s,dateStr:o,newSkipped:l,targetDate:c}=i;await yr(this.plugin.app,r,u=>{let p=this.plugin.fieldMapper.toUserField("skippedInstances"),m=this.plugin.fieldMapper.toUserField("completeInstances"),f=this.plugin.fieldMapper.toUserField("dateModified"),h=this.plugin.fieldMapper.toUserField("scheduled"),g=this.plugin.fieldMapper.toUserField("due"),v=this.plugin.fieldMapper.toUserField("googleCalendarExceptionOriginalScheduled"),k=this.plugin.fieldMapper.toUserField("googleCalendarMovedOriginalDates");yce({frontmatter:u,skippedField:p,completeField:m,dateModifiedField:f,scheduledField:h,dueField:g,googleCalendarExceptionOriginalScheduledField:v,googleCalendarMovedOriginalDatesField:k,plan:i})});try{this.plugin.cacheManager.waitForFreshTaskData&&await this.plugin.cacheManager.waitForFreshTaskData(r),this.plugin.cacheManager.updateTaskInfoInCache(a.path,s)}catch(u){qt.error("Error updating cache for skipped recurring task:",{category:"stale-data",operation:"updating-cache-skipped-recurring-task",error:u})}if(this.plugin.emitter.trigger(rt,{path:a.path,originalTask:a,updatedTask:s}),l&&this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("recurring.instance.skipped",{task:s,date:o,targetDate:c})}catch(u){qt.error("Error triggering recurring task skip webhook:",{category:"provider",operation:"triggering-recurring-task-skip-webhook",error:u})}return(d=this.plugin.taskCalendarSyncService)!=null&&d.isEnabled()&&this.plugin.taskCalendarSyncService.updateTaskInCalendar(s,a).catch(u=>{qt.warn("Failed to sync recurring task skip to Google Calendar:",{category:"provider",operation:"sync-recurring-task-skip-google-calendar",error:u})}),s}async deleteTimeEntry(e,t){let r=this.plugin.app.vault.getAbstractFileByPath(e.path);if(!(r instanceof Ln.TFile))throw new Error(`Cannot find task file: ${e.path}`);let a=EH(e,t,qe()),{updatedTask:i}=a;await yr(this.plugin.app,r,s=>{let o=this.plugin.fieldMapper.toUserField("timeEntries"),l=this.plugin.fieldMapper.toUserField("dateModified");Efe({frontmatter:s,timeEntriesField:o,dateModifiedField:l,timeEntryIndex:a.timeEntryIndex,dateModified:a.dateModified})});try{this.plugin.cacheManager.waitForFreshTaskData&&await this.plugin.cacheManager.waitForFreshTaskData(r),this.plugin.cacheManager.updateTaskInfoInCache(e.path,i)}catch(s){qt.error("Error updating cache for time entry deletion:",{category:"stale-data",operation:"updating-cache-time-entry-deletion",error:s})}return this.plugin.emitter.trigger(rt,{path:e.path,originalTask:e,updatedTask:i}),i}updateCompletedDateInFrontmatter(e,t,r){if(r)return;let a=this.plugin.fieldMapper.toUserField("completedDate");SH(e,t,r,a,i=>this.plugin.statusManager.isCompletedStatus(i),Yo())}extractProjectBasename(e){return Zo(e,this.plugin.app)}extractProjectFilePath(e){var a,i,s;let t=vt(e),r=(i=(a=this.plugin.app.metadataCache).getFirstLinkpathDest)==null?void 0:i.call(a,t,"");return((s=r==null?void 0:r.path)!=null?s:t).replace(/\.md$/i,"")}}});var fc,px=y(()=>{fc=class{constructor(){this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{let r=this.events[e];if(!r)return;let a=r.filter(i=>i!==t);a.length>0?this.events[e]=a:delete this.events[e]}}emit(e,...t){this.events[e]&&this.events[e].forEach(r=>{r(...t)})}removeAllListeners(e){e?delete this.events[e]:this.events={}}}});var cN,Rfe=y(()=>{dr();xe();cN=class{constructor(e){this.deps=e;this.indexQueryCache=new Map;this.cacheTimers=new Map;this.cacheTimeout=3e4}getIndexOptimizedTaskPaths(e){let t=this.analyzeQueryOptimizationSafety(e);if(!t.canOptimize)return this.deps.cacheManager.getAllTaskPaths();if(t.strategy==="intersect"){let r=this.getPathsForIndexableCondition(t.conditions[0]);for(let a=1;a<t.conditions.length;a++){let i=this.getPathsForIndexableCondition(t.conditions[a]);r=this.intersectPathSets(r,i)}return r}return t.strategy==="single"?this.getPathsForIndexableCondition(t.conditions[0]):this.deps.cacheManager.getAllTaskPaths()}clearIndexQueryCache(){for(let e of this.cacheTimers.values())this.deps.timer.clearTimeout(e);this.indexQueryCache.clear(),this.cacheTimers.clear()}getCacheStats(){return{entryCount:this.indexQueryCache.size,cacheKeys:Array.from(this.indexQueryCache.keys()),timeoutMs:this.cacheTimeout}}analyzeQueryOptimizationSafety(e){let t=this.findIndexableConditions(e);return t.length===0?{canOptimize:!1,conditions:[],reason:"No indexable conditions found"}:this.isSimpleQuery(e,t)?{canOptimize:!0,strategy:t.length===1?"single":"intersect",conditions:t}:{canOptimize:!1,conditions:t,reason:"Complex query structure with OR conditions - optimization not safe"}}isSimpleQuery(e,t){return t.length===0||this.hasIndexableConditionInOrGroup(e,t)?!1:t.length===1||e.type==="group"&&e.conjunction==="and"&&e.children.filter(a=>a.type==="condition"&&this.isIndexableCondition(a)).length===t.length}hasIndexableConditionInOrGroup(e,t){return this.checkNodeForOrWithIndexable(e,t)}checkNodeForOrWithIndexable(e,t){if(e.type==="condition")return!1;if(e.type==="group"){if(e.conjunction==="or"&&e.children.some(a=>a.type==="condition"&&t.includes(a)))return!0;for(let r of e.children)if(this.checkNodeForOrWithIndexable(r,t))return!0}return!1}findIndexableConditions(e){let t=[];if(e.type==="condition")this.isIndexableCondition(e)&&t.push(e);else if(e.type==="group")for(let r of e.children)t.push(...this.findIndexableConditions(r));return t}isIndexableCondition(e){let{property:t,operator:r,value:a}=e;return!!(t==="status"&&r==="is"&&a||t==="priority"&&r==="is"&&a||t==="due"&&(r==="is"||r==="is-before"||r==="is-after")&&a||t==="scheduled"&&(r==="is"||r==="is-before"||r==="is-after")&&a)}getCachedIndexResult(e,t){let r=this.indexQueryCache.get(e);if(r)return new Set(r);let a=t();this.indexQueryCache.set(e,new Set(a));let i=this.cacheTimers.get(e);i&&this.deps.timer.clearTimeout(i);let s=this.deps.timer.setTimeout(()=>{this.indexQueryCache.delete(e),this.cacheTimers.delete(e)},this.cacheTimeout);return this.cacheTimers.set(e,s),a}getPathsForIndexableCondition(e){let{property:t,operator:r,value:a}=e,i=`${t}:${r}:${Y(a)}`;return this.getCachedIndexResult(i,()=>t==="status"&&r==="is"&&a&&typeof a=="string"?new Set(this.deps.cacheManager.getTaskPathsByStatus(a)):t==="priority"&&r==="is"&&a&&typeof a=="string"?new Set(this.deps.cacheManager.getTaskPathsByPriority(a)):(t==="due"||t==="scheduled")&&r==="is"&&a&&typeof a=="string"?new Set(this.deps.cacheManager.getTasksForDate(Fl(a))):(t==="due"||t==="scheduled")&&(r==="is-before"||r==="is-after")&&a&&typeof a=="string"?this.getTaskPathsForDateRange(t,r,Fl(a)):this.deps.cacheManager.getAllTaskPaths())}getTaskPathsForDateRange(e,t,r){return(e==="due"||e==="scheduled")&&(t==="is-before"||t==="is-after")?this.deps.cacheManager.getTaskPathsForDateRange(e,t,r):this.deps.cacheManager.getAllTaskPaths()}intersectPathSets(e,t){let r=new Set;for(let a of e)t.has(a)&&r.add(a);return r}}});function Ffe(n){return n.id||n.key}function dN(n,e){return n==null?1:e==null?-1:n.localeCompare(e)}function uN(n){if(typeof n=="boolean")return n;if(n==null)return;let e=Y(n).trim().toLowerCase();if(e==="true")return!0;if(e==="false")return!1}function Lfe(n){if(typeof n=="number")return String(n);if(typeof n!="string")return;let e=n.match(/^(\d+(?:\.\d+)?)/);return e?e[1]:void 0}function _fe(n){if(Array.isArray(n))return Qv(n)[0];if(typeof n=="string")return n.trim().length===0?"":Qv(n)[0]}function Qv(n){let e=[],t=i=>{if(!i)return;let s=String(i).trim();if(!s)return;let o=s.match(/^\[\[([^|\]]+)(?:\|([^\]]+))?\]\]$/);if(o){let l=o[1]||"",d=o[2]||l.split("#")[0].split("/").pop()||l;d&&e.push(d),e.push(s);return}e.push(s)};if(Array.isArray(n))for(let i of n)t(Y(i));else if(typeof n=="string"){let i=ms(n);for(let s of i)t(s)}else n!=null&&t(Y(n));let r=new Set,a=[];for(let i of e)r.has(i)||(r.add(i),a.push(i));return a}function sh(n,e){return n==null?void 0:n.find(t=>Ffe(t)===e)}function Ofe(n,e){return n==null?void 0:n.find(t=>Ffe(t)===e||t.key===e)}function zfe(n,e){switch(n.type){case"boolean":return typeof e=="boolean"?e:Y(e).toLowerCase()==="true";case"number":return typeof e=="number"?e:e!=null?parseFloat(Y(e)):void 0;case"list":return Qv(e);case"date":case"text":default:return e!=null?Y(e):void 0}}function Bfe(n,e,t){switch(n.type){case"number":{let r=typeof e=="number"?e:e!=null?parseFloat(Y(e)):NaN,a=typeof t=="number"?t:t!=null?parseFloat(Y(t)):NaN,i=!isNaN(r),s=!isNaN(a);return i&&s?r-a:i&&!s?-1:!i&&s?1:0}case"boolean":{let r=uN(e),a=uN(t);return r===a?0:r===!0?-1:a===!0?1:r===!1?-1:a===!1?1:0}case"date":{let r=e?Date.parse(Y(e)):NaN,a=t?Date.parse(Y(t)):NaN,i=!isNaN(r),s=!isNaN(a);return i&&s?r-a:i&&!s?-1:!i&&s?1:0}case"list":{let r=_fe(e),a=_fe(t);return(r==null||r==="")&&(a==null||a==="")?0:r==null||r===""?1:a==null||a===""?-1:r.localeCompare(a)}case"text":default:{let r=e!=null?Y(e):"",a=t!=null?Y(t):"";return r.localeCompare(a)}}}function jfe(n,e,t=Mqe){var r;if(!n)return t.unknownField;try{switch(n.type){case"boolean":{let a=uN(e);return a==null?t.noValue:a?"true":"false"}case"number":return(r=Lfe(e))!=null?r:typeof e=="string"?t.nonNumeric:t.noValue;case"date":return e?Y(e):t.noDate;case"list":{if(Array.isArray(e)){let a=Qv(e);return a.length>0?a[0]:t.empty}if(typeof e=="string"){if(e.trim().length===0)return t.empty;let a=Qv(e);return a.length>0?a[0]:t.empty}return t.noValue}case"text":default:return e?Y(e).trim()||t.empty:t.noValue}}catch(a){return t.error}}function $fe(n,e,t){if(!n)return[t];switch(n.type){case"boolean":{let r=uN(e);return r==null?[t]:[r?"true":"false"]}case"number":{let r=Lfe(e);return r?[r]:[t]}case"date":return e?[Y(e)]:[t];case"list":{let r=Qv(e).filter(a=>!/^\[\[/.test(a));return r.length>0?r:[t]}case"text":default:{let r=Y(e).trim();return r?[r]:[t]}}}function Ufe(n,e){let t=[...n];if(!e)return t.sort();switch(e.type){case"number":return t.sort((r,a)=>{let i=parseFloat(r),s=parseFloat(a),o=!isNaN(i),l=!isNaN(s);return o&&l?s-i:o&&!l?-1:!o&&l?1:dN(r,a)});case"boolean":return t.sort((r,a)=>r==="true"&&a==="false"?-1:r==="false"&&a==="true"?1:dN(r,a));case"date":return t.sort((r,a)=>{let i=Date.parse(r),s=Date.parse(a),o=!isNaN(i),l=!isNaN(s);return o&&l?i-s:o&&!l?-1:!o&&l?1:dN(r,a)});case"text":case"list":default:return t.sort(dN)}}var Mqe,mx=y(()=>{Ku();dr();Mqe={unknownField:"unknown-field",noValue:"no-value",noDate:"no-date",empty:"empty",nonNumeric:"non-numeric",error:"error"}});function Hfe(n,e){return!!n&&re(n)!==e}function Jv(n,e,t){return!!n&&ps(n,e,t)}function Vfe(n,e){if(n.recurrence)return F0(n,st(e.dateStr));if(n.due&&re(n.due)===e.dateStr||n.scheduled&&re(n.scheduled)===e.dateStr)return!0;if(e.includeOverdue&&e.isViewingToday){let t=e.isCompletedStatus(n.status);if(Hfe(n.due,e.dateStr)&&Jv(n.due,t,e.hideCompletedFromOverdue)||Hfe(n.scheduled,e.dateStr)&&Jv(n.scheduled,t,e.hideCompletedFromOverdue))return!0}return!1}function Wfe(n,e){let t=e.isCompletedStatus(n.status);return n.recurrence&&!(t&&e.hideCompletedFromOverdue)&&Iqe(n,e.todayString)?!0:Jv(n.due,t,e.hideCompletedFromOverdue)||Jv(n.scheduled,t,e.hideCompletedFromOverdue)}function Iqe(n,e=zr()){if(!n.recurrence)return!1;let t=st(e),r=new Date(t);r.setUTCDate(r.getUTCDate()-1);let a=Nqe(n,t);if(a>r)return!1;let i=new Set(n.complete_instances||[]),s=new Set(n.skipped_instances||[]);return ly(n,a,r).some(l=>{let c=ae(l);return c<e&&!i.has(c)&&!s.has(c)})}function Nqe(n,e){let t=new Date(e);return t.setUTCFullYear(t.getUTCFullYear()-2),[n.dateCreated,n.scheduled,n.due].map(a=>a?re(a):"").filter(a=>a.length>0).map(a=>st(a)).reduce((a,i)=>i<a?i:a,t)}var qfe=y(()=>{yt();xe()});function pN(n,e,t,r){return n.type==="condition"?_qe(n,e,t,r):n.type==="group"?Rqe(n,e,t,r):!0}function Rqe(n,e,t,r){if(n.children.length===0)return!0;let a=n.children.filter(i=>i.type==="condition"?ir.isFilterNodeComplete(i):!0);return a.length===0?!0:n.conjunction==="and"?a.every(i=>pN(i,e,t,r)):n.conjunction==="or"?a.some(i=>pN(i,e,t,r)):!0}function _qe(n,e,t,r){let{property:a,operator:i,value:s}=n;if(typeof a=="string"&&a.startsWith("user:"))return Fqe(n,e,t);let o=ir.getTaskPropertyValue(e,a);if(a==="hasSubtasks"&&t.projectSubtasksService&&(o=t.projectSubtasksService.isTaskUsedAsProjectSync(e.path)),a==="status.isCompleted"){let l=oy(e,r||new Date,t.getCompletedStatuses()[0]);o=t.isCompletedStatus(l)}return a==="projects"&&(i==="contains"||i==="does-not-contain")?Lqe(o,i,s,t.app):ir.applyOperator(o,i,s,n.id,a)}function Fqe(n,e,t){let{property:r,operator:a,value:i}=n,s=r.slice(5),o=sh(t.userFields,s),l=o?zfe(o,t.getUserFieldRawValue(e,o.key)):void 0;if((o==null?void 0:o.type)==="list"&&(a==="contains"||a==="does-not-contain")){let d=Array.isArray(l)?l:l!=null?[String(l)]:[],p=(Array.isArray(i)?i:[String(i!=null?i:"")]).some(m=>typeof m=="string"&&d.some(f=>typeof f=="string"&&f.toLowerCase().includes(m.toLowerCase())));return a==="contains"?p:!p}let c=(o==null?void 0:o.type)==="date"?"due":r;return ir.applyOperator(l,a,i,n.id,c)}function Lqe(n,e,t,r){if(!Array.isArray(n)||typeof t!="string")return!1;let a=Gfe(t,r);if(!a)return!1;let i=n.some(s=>{if(!s||typeof s!="string")return!1;let o=Gfe(s,r);return o?o===a?!0:Oqe(s,t,r):!1});return e==="contains"?i:!i}function Gfe(n,e){if(!n||typeof n!="string")return null;let t=Zo(n,e);return t||null}function Oqe(n,e,t){if(!t)return!1;let r=Yfe(n),a=Yfe(e);if(!r||!a)return!1;let i=t.metadataCache.getFirstLinkpathDest(r,""),s=t.metadataCache.getFirstLinkpathDest(a,"");return i&&s?i.path===s.path:!1}function Yfe(n){return!n||typeof n!="string"?null:n.startsWith("[[")&&n.endsWith("]]")?n.slice(2,-2):n}var Kfe=y(()=>{Ad();yt();Cn();mx()});function MH(n,e,t,r){var i;if(e==="none")return new Map([["all",n]]);let a=new Map;for(let s of n){let o=$qe(s,e,t,r);for(let l of o)a.has(l)||a.set(l,[]),(i=a.get(l))==null||i.push(s)}return zqe(a,e,t)}function zqe(n,e,t){let r=new Map,a=Uqe(n,e,t);for(let i of a){let s=n.get(i);s&&r.set(i,s)}return r}function Bqe(n,e,t){var s;let r=t||new Date;r.setHours(0,0,0,0);let a=e.isCompletedStatus(n.status),i=(s=e.hideCompletedFromOverdue)!=null?s:!0;if(n.recurrence){if(F0(n,r)){let o=D(r,"yyyy-MM-dd");return PH(o,e,a,i)}return n.due?PH(n.due,e,a,i):_p("none",e)}return n.due?PH(n.due,e,a,i):_p("none",e)}function jqe(n,e){var t;return n.scheduled?Vqe(n.scheduled,e,e.isCompletedStatus(n.status),(t=e.hideCompletedFromOverdue)!=null?t:!0):oh("none",e)}function $qe(n,e,t,r){if(e==="project"){let a=Ko(n.projects||[]);return a.length===0?[Qfe(t)]:a.map(i=>t.resolveProjectToAbsolutePath(i))}if(e==="tags"){let a=n.tags||[];return a.length>0?a:[Jfe(t)]}if(typeof e=="string"&&e.startsWith("user:"))return[Hqe(n,e,t)];switch(e){case"status":return[n.status||"no-status"];case"priority":return[n.priority||"unknown"];case"context":return[n.contexts&&n.contexts.length>0?n.contexts[0]:"none"];case"due":return[Bqe(n,t,r)];case"scheduled":return[jqe(n,t)];case"completedDate":return[Wqe(n,t)];default:return["unknown"]}}function Uqe(n,e,t){if(typeof e=="string"&&e.startsWith("user:")){let r=qqe(Array.from(n.keys()),e,t);return t.currentSortKey===e&&t.currentSortDirection==="desc"&&r.reverse(),r}switch(e){case"priority":return Array.from(n.keys()).sort((r,a)=>t.getPriorityWeight(a)-t.getPriorityWeight(r));case"status":return Array.from(n.keys()).sort((r,a)=>t.getStatusOrder(r)-t.getStatusOrder(a));case"due":{let r=["overdue","today","tomorrow","nextSevenDays","later","none"],a=new Map(r.map((i,s)=>[_p(i,t),s]));return Array.from(n.keys()).sort((i,s)=>{var c,d;let o=(c=a.get(i))!=null?c:r.length,l=(d=a.get(s))!=null?d:r.length;return o-l})}case"scheduled":{let r=["past","today","tomorrow","nextSevenDays","later","none"],a=new Map(r.map((i,s)=>[oh(i,t),s]));return Array.from(n.keys()).sort((i,s)=>{var c,d;let o=(c=a.get(i))!=null?c:r.length,l=(d=a.get(s))!=null?d:r.length;return o-l})}case"project":return Array.from(n.keys()).sort((r,a)=>Zfe(r,a,Qfe(t),t.getLocale()));case"tags":return Array.from(n.keys()).sort((r,a)=>Zfe(r,a,Jfe(t),t.getLocale()));case"completedDate":return Array.from(n.keys()).sort((r,a)=>{if(r==="Not completed")return 1;if(a==="Not completed")return-1;if(r==="Invalid date")return 1;if(a==="Invalid date")return-1;if(r==null||a==null){if(r==null)return 1;if(a==null)return-1}return a.localeCompare(r)});default:return Array.from(n.keys()).sort((r,a)=>r==null?1:a==null?-1:r.localeCompare(a,t.getLocale()))}}function Hqe(n,e,t){let r=e.slice(5),a=sh(t.userFields||[],r),i=a?t.getUserFieldRawValue(n,a.key):void 0;return jfe(a,i)}function PH(n,e,t,r){let a=zr();if(ps(n,t,r))return _p("overdue",e);let i=re(n);if(qs(i,a))return _p("today",e);try{let s=new Date;s.setDate(s.getDate()+1);let o=D(s,"yyyy-MM-dd");if(qs(i,o))return _p("tomorrow",e);let l=new Date;l.setDate(l.getDate()+7);let c=D(l,"yyyy-MM-dd");return cf(i,c)||qs(i,c)?_p("nextSevenDays",e):_p("later",e)}catch(s){return AH.error(`Error categorizing date ${n}:`,{category:"validation",operation:"categorizing-date",error:s}),fx(e)}}function Vqe(n,e,t,r){let a=zr();if(ps(n,t,r))return oh("past",e);let i=re(n);if(qs(i,a))return oh("today",e);try{let s=new Date;s.setDate(s.getDate()+1);let o=D(s,"yyyy-MM-dd");if(qs(i,o))return oh("tomorrow",e);let l=new Date;l.setDate(l.getDate()+7);let c=D(l,"yyyy-MM-dd");return cf(i,c)||qs(i,c)?oh("nextSevenDays",e):oh("later",e)}catch(s){return AH.error(`Error categorizing scheduled date ${n}:`,{category:"validation",operation:"categorizing-scheduled-date",error:s}),fx(e)}}function Wqe(n,e){if(!n.completedDate)return"Not completed";try{return D(Na(n.completedDate),"yyyy-MM-dd")}catch(t){return AH.error(`Error formatting completed date ${n.completedDate}:`,{category:"validation",operation:"formatting-completed-date",error:t}),fx(e)}}function qqe(n,e,t){let r=e.slice(5),a=sh(t.userFields||[],r);return Ufe(n,a)}function Zfe(n,e,t,r){return n===t?1:e===t?-1:n==null?1:e==null?-1:n.localeCompare(e,r)}function _p(n,e){switch(n){case"overdue":return e.translate("services.filter.groupLabels.due.overdue","Overdue");case"today":return e.translate("services.filter.groupLabels.due.today","Today");case"tomorrow":return e.translate("services.filter.groupLabels.due.tomorrow","Tomorrow");case"nextSevenDays":return e.translate("services.filter.groupLabels.due.nextSevenDays","Next seven days");case"later":return e.translate("services.filter.groupLabels.due.later","Later");case"none":return e.translate("services.filter.groupLabels.due.none","No due date");case"invalid":default:return fx(e)}}function oh(n,e){switch(n){case"past":return e.translate("services.filter.groupLabels.scheduled.past","Past scheduled");case"today":return e.translate("services.filter.groupLabels.scheduled.today","Today");case"tomorrow":return e.translate("services.filter.groupLabels.scheduled.tomorrow","Tomorrow");case"nextSevenDays":return e.translate("services.filter.groupLabels.scheduled.nextSevenDays","Next seven days");case"later":return e.translate("services.filter.groupLabels.scheduled.later","Later");case"none":return e.translate("services.filter.groupLabels.scheduled.none","No scheduled date");case"invalid":default:return fx(e)}}function Qfe(n){return n.translate("services.filter.groupLabels.noProject","No project")}function Jfe(n){return n.translate("services.filter.groupLabels.noTags","No tags")}function fx(n){return n.translate("services.filter.groupLabels.invalidDate","Invalid date")}var AH,Xfe=y(()=>{Cr();xe();yt();mx();q();AH=M({tag:"Services/FilterService/FilterTaskGrouping"})});function ehe(n,e,t,r){return n.sort((a,i)=>{let s=Yqe(a,i,e,r);return s!==0?t==="desc"?-s:s:Xqe(a,i,e,r)})}function Xv(n,e){if(!n&&!e)return 0;if(!n)return 1;if(!e)return-1;try{return Sd(n,e)?-1:Sd(e,n)?1:0}catch(t){return Gqe.error("Error comparing dates time-aware:",{category:"validation",operation:"comparing-dates-time-aware",details:{dateA:n,dateB:e},error:t}),n.localeCompare(e)}}function Yqe(n,e,t,r){if(typeof t=="string"&&t.startsWith("user:"))return e4e(n,e,t,r);switch(t){case"due":return Xv(n.due,e.due);case"scheduled":return Xv(n.scheduled,e.scheduled);case"priority":return Zqe(n.priority,e.priority,r);case"status":return Qqe(n.status,e.status,r);case"title":return n.title.localeCompare(e.title);case"dateCreated":return Xv(n.dateCreated,e.dateCreated);case"completedDate":return Xv(n.completedDate,e.completedDate);case"tags":return Jqe(n.tags,e.tags);default:return 0}}function Kqe(n,e,t){let r=t.getPriorityWeight(n);return t.getPriorityWeight(e)-r}function Zqe(n,e,t){let r=t.getPriorityWeight(n),a=t.getPriorityWeight(e);return r-a}function Qqe(n,e,t){return t.getStatusOrder(n)-t.getStatusOrder(e)}function Jqe(n,e){let t=n&&n.length>0?n:[],r=e&&e.length>0?e:[];return t.length===0&&r.length===0?0:t.length===0?1:r.length===0?-1:t[0].toLowerCase().localeCompare(r[0].toLowerCase())}function Xqe(n,e,t,r){let i=["due","scheduled","priority","title"].filter(s=>s!==t);for(let s of i){let o=0;switch(s){case"scheduled":o=Xv(n.scheduled,e.scheduled);break;case"due":o=Xv(n.due,e.due);break;case"priority":o=Kqe(n.priority,e.priority,r);break;case"title":o=n.title.localeCompare(e.title);break}if(o!==0)return o}return 0}function e4e(n,e,t,r){let a=t.slice(5),i=sh(r.userFields||[],a);return i?Bfe(i,r.getUserFieldRawValue(n,i.key),r.getUserFieldRawValue(e,i.key)):0}var Gqe,the=y(()=>{xe();mx();q();Gqe=M({tag:"Services/FilterService/FilterTaskSorting"})});function rhe(n){return{statuses:n.statuses,priorities:n.priorities,contexts:n.contexts,projects:n.projects,tags:n.tags,folders:t4e(n.taskPaths,n.rootFolderLabel),userProperties:r4e(n.userFields||[])}}function t4e(n,e){let t=new Set;for(let r of n){let a=r.lastIndexOf("/");a>0?t.add(r.substring(0,a)):a===-1&&t.add("")}return Array.from(t).sort().map(r=>r===""?e:r)}function r4e(n){let e=[];for(let t of n)!t||!t.key||!t.displayName||e.push({id:`user:${t.id||t.key}`,label:t.displayName,category:n4e(t.type),supportedOperators:i4e(t.type),valueInputType:a4e(t.type)});return e}function n4e(n){switch(n){case"boolean":return"boolean";case"number":return"numeric";case"date":return"date";case"list":case"text":default:return"text"}}function a4e(n){switch(n){case"number":return"number";case"date":return"date";case"boolean":return"none";case"list":case"text":default:return"text"}}function i4e(n){switch(n){case"number":return["is","is-not","is-greater-than","is-less-than","is-greater-than-or-equal","is-less-than-or-equal","is-empty","is-not-empty"];case"date":return["is","is-not","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty"];case"boolean":return["is-checked","is-not-checked"];case"list":return["contains","does-not-contain","is-empty","is-not-empty"];case"text":default:return["is","is-not","contains","does-not-contain","is-empty","is-not-empty"]}}var nhe=y(()=>{});function IH(n){return{type:"group",id:n(),conjunction:"and",children:[],sortKey:"due",sortDirection:"asc",groupKey:"none"}}function ihe(n,e,t,r){let a=o4e(n);if(s4e(a,e),!t){let i=ahe[e];a.children.push({type:"condition",id:r(),...i})}return a}function she(n,e){let t=IH(e);return{...t,...n,type:"group",id:n.id||t.id,conjunction:n.conjunction||t.conjunction,children:n.children||t.children,sortKey:n.sortKey||t.sortKey,sortDirection:n.sortDirection||t.sortDirection,groupKey:n.groupKey||t.groupKey}}function s4e(n,e){let t=ahe[e].property;n.children=n.children.filter(r=>r.type==="condition"?r.property!==t:!0)}function o4e(n){return JSON.parse(JSON.stringify(n))}var ahe,ohe=y(()=>{ahe={showCompleted:{property:"status.isCompleted",operator:"is-not-checked",value:null},showArchived:{property:"archived",operator:"is-not-checked",value:null},showRecurrent:{property:"recurrence",operator:"is-empty",value:null}}});var lhe={};Xe(lhe,{HierarchicalGroupingService:()=>RH});function NH(n){return n==null?"":typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):""}var RH,che=y(()=>{RH=class{constructor(e){this.resolveUserFieldValues=e}group(e,t,r,a="asc",i=[]){let s=new Map,o=(c,d)=>{var p,m,f,h,g,v,k,T;if(!d||d==="none")return["all"];let u=b=>{let w=b.map(NH).filter(S=>S!=="");return w.length?w:[]};if(d.startsWith("user:")){let b=d.slice(5);if(this.resolveUserFieldValues){let C=this.resolveUserFieldValues(c,b)||[],x=u(C);return x.length?x:[`No ${b}`]}let w=(p=c.customProperties)==null?void 0:p[b];if(Array.isArray(w)){let C=u(w);return C.length?C:[`No ${b}`]}let S=NH(w);return S!==""?[S]:[`No ${b}`]}switch(d){case"status":return[((m=c.status)!=null?m:"").trim()||"No Status"];case"priority":return[((f=c.priority)!=null?f:"").trim()||"No Priority"];case"context":{let b=u((h=c.contexts)!=null?h:[]);return b.length?b:["No Context"]}case"project":{let b=u((g=c.projects)!=null?g:[]).map(C=>{let x=C.match(/^\[\[([^|\]]+)(?:\|([^\]]+))?\]\]$/);if(x){let E=x[1]||"";return x[2]||E.split("#")[0].split("/").pop()||E||C}return C}),w=[],S=new Set;for(let C of b)S.has(C)||(S.add(C),w.push(C));return w.length?w:["No Project"]}case"tags":{let b=u((v=c.tags)!=null?v:[]);return b.length?b:["No Tag"]}case"due":{let b=((k=c.due)!=null?k:"").trim();return b?[b.split("T")[0]]:["No Due Date"]}case"scheduled":{let b=((T=c.scheduled)!=null?T:"").trim();return b?[b.split("T")[0]]:["No Scheduled Date"]}default:{let w=c[d];if(Array.isArray(w)){let C=u(w);return C.length?C:[`No ${d}`]}let S=NH(w);return S!==""?[S]:[`No ${d}`]}}};for(let c of e){let d=o(c,t),u=o(c,r);for(let p of d){s.has(p)||s.set(p,new Map);let m=s.get(p);for(let f of u)m.has(f)||m.set(f,[]),m.get(f).push(c)}}let l=new Map;for(let[c,d]of s){let u=this.sortSubgroups(d,r,a,i);l.set(c,u)}return l}sortSubgroups(e,t,r,a){let i=Array.from(e.keys()),s=this.sortSubgroupKeys(i,t,r,a),o=new Map;for(let l of s)o.set(l,e.get(l));return o}sortSubgroupKeys(e,t,r,a){let i=o=>/^No\s/i.test(o);if(typeof t=="string"&&t.startsWith("user:")){let o=t.slice(5),l=a.find(u=>(u.id||u.key)===o),c=(u,p)=>{if(i(u)&&!i(p))return-1;if(!i(u)&&i(p))return 1;if((l==null?void 0:l.type)==="number"){let m=parseFloat(u),f=parseFloat(p),h=isNaN(m)?Number.POSITIVE_INFINITY:m,g=isNaN(f)?Number.POSITIVE_INFINITY:f;if(h!==g)return h-g}else if((l==null?void 0:l.type)==="boolean"){let m=u==="true"?0:u==="false"?1:2,f=p==="true"?0:p==="false"?1:2;if(m!==f)return m-f}else if((l==null?void 0:l.type)==="date"){let m=Date.parse(u),f=Date.parse(p),h=isNaN(m)?Number.POSITIVE_INFINITY:m,g=isNaN(f)?Number.POSITIVE_INFINITY:f;if(h!==g)return h-g}return u.localeCompare(p)},d=e.slice().sort(c);return r==="desc"?d.reverse():d}let s=e.slice().sort((o,l)=>i(o)&&!i(l)?-1:!i(o)&&i(l)?1:o.localeCompare(l));return r==="desc"?s.reverse():s}}});var dhe,mN,ek,fN,uhe=y(()=>{dhe=require("obsidian");Cn();px();Ad();Cr();xe();Rfe();mx();qfe();Kfe();Xfe();the();nhe();ohe();q();mN=M({tag:"Services/FilterService"}),ek=class ek extends fc{constructor(t,r,a,i){super();this.runtime=i;this.filterOptionsCache=null;this.filterOptionsCacheTimestamp=0;this.filterOptionsCacheTTL=3e5;this.filterOptionsComputeCount=0;this.filterOptionsCacheHits=0;this.cacheManager=t,this.statusManager=r,this.priorityManager=a,this.queryPlanner=new cN({cacheManager:t,timer:{setTimeout:(s,o)=>window.setTimeout(s,o),clearTimeout:s=>window.clearTimeout(s)}}),ek.lastInstance=this}translate(t,r,a){var i;try{if((i=this.runtime)!=null&&i.i18n)return this.runtime.i18n.translate(t,a)}catch(s){mN.error("FilterService translation error:",{category:"internal",operation:"filterservice-translation",error:s})}return r}static translateStatic(t,r){let a=ek.lastInstance;return a?a.translate(t,r):r}getLocale(){var t,r,a;try{let i=(a=(r=(t=this.runtime)==null?void 0:t.i18n)==null?void 0:r.getCurrentLocale)==null?void 0:a.call(r);if(i)return i}catch(i){mN.error("FilterService locale error:",{category:"internal",operation:"filterservice-locale",error:i})}return"en"}getNoProjectLabel(){return this.translate("services.filter.groupLabels.noProject","No project")}async getGroupedTasks(t,r){try{ir.validateFilterNode(t,!1);let a=this.queryPlanner.getIndexOptimizedTaskPaths(t),s=(await this.pathsToTaskInfos(Array.from(a))).filter(l=>this.evaluateFilterNode(t,l,r)),o=this.sortTasks(s,t.sortKey||"due",t.sortDirection||"asc");return this.currentSortKey=t.sortKey||"due",this.currentSortDirection=t.sortDirection||"asc",MH(o,t.groupKey||"none",this.createTaskGroupingContext(),r)}catch(a){if(a instanceof ga||a instanceof Pd)return mN.error("Filter error:",{category:"internal",operation:"filter",details:{values:[a.message,{nodeId:a.nodeId,field:a.field}]}}),new Map;throw a}}async getHierarchicalGroupedTasks(t,r){var a,i;try{ir.validateFilterNode(t,!1);let s=this.queryPlanner.getIndexOptimizedTaskPaths(t),l=(await this.pathsToTaskInfos(Array.from(s))).filter(p=>this.evaluateFilterNode(t,p,r)),c=this.sortTasks(l,t.sortKey||"due",t.sortDirection||"asc");this.currentSortKey=t.sortKey||"due",this.currentSortDirection=t.sortDirection||"asc";let d=MH(c,t.groupKey||"none",this.createTaskGroupingContext(),r),u=t.subgroupKey;if(u&&u!=="none"&&t.groupKey&&t.groupKey!=="none"){let{HierarchicalGroupingService:p}=await Promise.resolve().then(()=>(che(),lhe)),m=(k,T)=>{var x,E;let b=((E=(x=this.runtime)==null?void 0:x.settings)==null?void 0:E.userFields)||[],w=Ofe(b,T),S=`No ${(w==null?void 0:w.displayName)||(w==null?void 0:w.key)||T}`,C=w?this.getUserFieldRawValue(k,w.key):void 0;return $fe(w,C,S)},h=new p(m).group(c,t.groupKey,u,this.currentSortDirection,((i=(a=this.runtime)==null?void 0:a.settings)==null?void 0:i.userFields)||[]),g=Array.from(d.keys()),v=new Map;for(let k of g){let T=h.get(k);T&&v.set(k,T)}for(let[k,T]of h)v.has(k)||v.set(k,T);return{groups:d,hierarchicalGroups:v}}return{groups:d}}catch(s){if(s instanceof ga||s instanceof Pd)return mN.error("Filter error (hierarchical):",{category:"internal",operation:"filter-hierarchical",details:{values:[s.message,{nodeId:s.nodeId}]}}),{groups:new Map};throw s}}getCacheStats(){return this.queryPlanner.getCacheStats()}async pathsToTaskInfos(t){let r=[];for(let i=0;i<t.length;i+=50){let s=t.slice(i,i+50),o=await Promise.all(s.map(l=>this.cacheManager.getCachedTaskInfo(l)));for(let l of o)l&&r.push(l)}return r}evaluateFilterNode(t,r,a){return pN(t,r,this.createPredicateEvaluationContext(),a)}createPredicateEvaluationContext(){var t,r,a,i;return{app:(t=this.runtime)==null?void 0:t.app,userFields:((a=(r=this.runtime)==null?void 0:r.settings)==null?void 0:a.userFields)||[],projectSubtasksService:(i=this.runtime)==null?void 0:i.projectSubtasksService,getUserFieldRawValue:(s,o)=>this.getUserFieldRawValue(s,o),getCompletedStatuses:()=>this.statusManager.getCompletedStatuses(),isCompletedStatus:s=>this.statusManager.isCompletedStatus(s)}}resolveProjectToAbsolutePath(t){var i;if(!t||typeof t!="string")return t||"";if(!((i=this.runtime)!=null&&i.app))return t;let r=this.parseLinkToPath(t),a=this.runtime.app.metadataCache.getFirstLinkpathDest(r,"");return a?a.path.replace(/\.md$/,""):r.replace(/\.md$/,"")}parseLinkToPath(t){return vt(t)}getPreferredProjectFormat(t){let r=this.getNoProjectLabel();return!t||t===r?t:t.includes("/")||t.endsWith(".md")?`[[${t}]]`:`[[${t}]]`}getOverdueTaskPaths(){return this.cacheManager.getOverdueTaskPaths()}sortTasks(t,r,a){return ehe(t,r,a,this.createTaskSortingContext())}createTaskGroupingContext(){var t,r,a,i;return{userFields:((r=(t=this.runtime)==null?void 0:t.settings)==null?void 0:r.userFields)||[],hideCompletedFromOverdue:(i=(a=this.runtime)==null?void 0:a.settings)==null?void 0:i.hideCompletedFromOverdue,currentSortKey:this.currentSortKey,currentSortDirection:this.currentSortDirection,isCompletedStatus:s=>this.statusManager.isCompletedStatus(s),getPriorityWeight:s=>this.priorityManager.getPriorityWeight(s),getStatusOrder:s=>this.statusManager.getStatusOrder(s),getUserFieldRawValue:(s,o)=>this.getUserFieldRawValue(s,o),resolveProjectToAbsolutePath:s=>this.resolveProjectToAbsolutePath(s),translate:(s,o,l)=>this.translate(s,o,l),getLocale:()=>this.getLocale()}}createTaskSortingContext(){var t,r;return{userFields:((r=(t=this.runtime)==null?void 0:t.settings)==null?void 0:r.userFields)||[],getPriorityWeight:a=>this.priorityManager.getPriorityWeight(a),getStatusOrder:a=>this.statusManager.getStatusOrder(a),getUserFieldRawValue:(a,i)=>this.getUserFieldRawValue(a,i)}}getUserFieldRawValue(t,r){var a;try{let i=this.cacheManager.getApp(),s=i.vault.getAbstractFileByPath(t.path),o=s instanceof dhe.TFile?(a=i.metadataCache.getFileCache(s))==null?void 0:a.frontmatter:void 0;return o?o[r]:void 0}catch(i){return}}async getFilterOptions(){var a,i;let t=Date.now();if(this.filterOptionsCache&&t-this.filterOptionsCacheTimestamp<this.filterOptionsCacheTTL)return this.filterOptionsCacheHits++,this.filterOptionsCache;let r=rhe({statuses:this.statusManager.getAllStatuses(),priorities:this.priorityManager.getAllPriorities(),contexts:this.cacheManager.getAllContexts(),projects:this.cacheManager.getAllProjects(),tags:this.cacheManager.getAllTags(),taskPaths:this.cacheManager.getAllTaskPaths(),rootFolderLabel:this.translate("services.filter.folders.root","(Root)"),userFields:((i=(a=this.runtime)==null?void 0:a.settings)==null?void 0:i.userFields)||[]});return this.filterOptionsComputeCount++,this.filterOptionsCache=r,this.filterOptionsCacheTimestamp=t,r}handleFilterIndexChanged(){this.queryPlanner.clearIndexQueryCache(),this.invalidateFilterOptionsCache()}invalidateFilterOptionsCache(){this.filterOptionsCache&&(this.filterOptionsCache=null)}refreshFilterOptions(){this.invalidateFilterOptionsCache()}getFilterOptionsCacheStats(){let t=Date.now(),r=this.filterOptionsCache?t-this.filterOptionsCacheTimestamp:0,a=this.filterOptionsCache?Math.max(0,this.filterOptionsCacheTTL-r):0,i=this.filterOptionsCacheHits+this.filterOptionsComputeCount,s=i>0?(this.filterOptionsCacheHits/i*100).toFixed(1)+"%":"0%";return{cacheHits:this.filterOptionsCacheHits,computeCount:this.filterOptionsComputeCount,hitRate:s,isCurrentlyCached:!!this.filterOptionsCache,cacheAge:r,ttlRemaining:a}}createDefaultQuery(){return IH(()=>ir.generateId())}addQuickToggleCondition(t,r,a){return ihe(t,r,a,()=>ir.generateId())}normalizeQuery(t){return she(t,()=>ir.generateId())}initialize(){this.cacheManager.on("file-updated",t=>{(t==null?void 0:t.filterIndexChanged)!==!1&&this.handleFilterIndexChanged(),this.emit("data-changed")}),this.cacheManager.on("file-added",()=>{this.handleFilterIndexChanged(),this.emit("data-changed")}),this.cacheManager.on("file-deleted",()=>{this.handleFilterIndexChanged(),this.emit("data-changed")}),this.cacheManager.on("file-renamed",()=>{this.handleFilterIndexChanged(),this.emit("data-changed")}),this.cacheManager.on("indexes-built",()=>{this.handleFilterIndexChanged(),this.emit("data-changed")})}cleanup(){this.queryPlanner.clearIndexQueryCache(),this.invalidateFilterOptionsCache(),this.removeAllListeners()}static createDateRangeFromDates(t){if(t.length===0)throw new Error(ek.translateStatic("services.filter.errors.noDatesProvided","No dates provided"));let r=t[0],a=t[t.length-1];return{start:D(r,"yyyy-MM-dd"),end:D(a,"yyyy-MM-dd")}}static shouldIncludeOverdueForRange(t,r){if(!r)return!1;let i=D(new Date,"yyyy-MM-dd");return t.some(s=>D(s,"yyyy-MM-dd")===i)}async getTasksForDate(t,r,a=!1){var p,m,f;let i=ae(t),s=_b(i),o=this.cacheManager.getAllTaskPaths(),c=(await this.pathsToTaskInfos(Array.from(o))).filter(h=>this.evaluateFilterNode(r,h)),d=(f=(m=(p=this.runtime)==null?void 0:p.settings)==null?void 0:m.hideCompletedFromOverdue)!=null?f:!0,u=c.filter(h=>Vfe(h,{dateStr:i,isViewingToday:s,includeOverdue:a,hideCompletedFromOverdue:d,isCompletedStatus:g=>this.statusManager.isCompletedStatus(g)}));return this.sortTasks(u,r.sortKey||"due",r.sortDirection||"asc")}async getOverdueTasks(t){var l,c,d;let r=this.cacheManager.getAllTaskPaths(),i=(await this.pathsToTaskInfos(Array.from(r))).filter(u=>this.evaluateFilterNode(t,u)),s=(d=(c=(l=this.runtime)==null?void 0:l.settings)==null?void 0:c.hideCompletedFromOverdue)!=null?d:!0,o=i.filter(u=>Wfe(u,{hideCompletedFromOverdue:s,isCompletedStatus:p=>this.statusManager.isCompletedStatus(p)}));return this.sortTasks(o,t.sortKey||"due",t.sortDirection||"asc")}async getAgendaDataWithOverdue(t,r,a=!1){let i=[];for(let o of t){let l=await this.getTasksForDate(o,r,!1);i.push({date:new Date(o),tasks:l})}let s=a?await this.getOverdueTasks(r):[];return{dailyData:i,overdueTasks:s}}async getAgendaData(t,r,a=!1){let i=[];for(let s of t){let o=await this.getTasksForDate(s,r,a&&Vz(s));i.push({date:new Date(s),tasks:o})}return i}async getFlatAgendaData(t,r,a=!1){let i=await this.getAgendaData(t,r,a),s=[];for(let o of i)for(let l of o.tasks)s.push({...l,agendaDate:o.date});return s}};ek.lastInstance=null;fN=ek});var tk,_H=y(()=>{tk=class{constructor(e,t){this.cache=e;this.statusManager=t}getStats(e){let t={},r={},a=0,i=0,s=0,o=0,l=0,c=0,d=new Date().toISOString().split("T")[0];for(let u of e){t[u.status]=(t[u.status]||0)+1,r[u.priority]=(r[u.priority]||0)+1;let p=this.statusManager.isCompletedStatus(u.status);u.archived&&o++,p&&a++,!p&&!u.archived&&i++,u.due&&u.due<d&&!p&&!u.archived&&s++,u.timeEntries&&u.timeEntries.length>0&&(l++,c+=u.totalTrackedTime||0)}return{total:e.length,statusCounts:t,priorityCounts:r,completed:a,active:i,overdue:s,archived:o,withTimeEntries:l,totalTrackedMinutes:c,totalTrackedHours:Math.round(c/60*100)/100}}async getAggregatedTimeEstimate(e){let t=this.cache.getAllTimeEstimates();if(t.size===0)return 0;let{start:r,end:a}=this.getDateRange(e),i=0;for(let[s,o]of t.entries()){let l=await this.cache.getTaskInfo(s);l&&this.isTaskInRange(l,r,a)&&(i+=o)}return i}isTaskInRange(e,t,r){let a=e.due||e.scheduled;if(!a)return!1;let i=new Date(a);return i>=t&&i<=r}getDateRange(e){if(typeof e!="string")return e;let t=new Date,r=new Date(t),a=new Date(t);switch(e){case"daily":r.setHours(0,0,0,0),a.setHours(23,59,59,999);break;case"weekly":{let i=t.getDay(),s=t.getDate()-i+(i===0?-6:1);r.setDate(s),r.setHours(0,0,0,0),a.setDate(r.getDate()+6),a.setHours(23,59,59,999);break}case"monthly":r.setDate(1),r.setHours(0,0,0,0),a.setMonth(r.getMonth()+1),a.setDate(0),a.setHours(23,59,59,999);break;case"yearly":r.setMonth(0,1),r.setHours(0,0,0,0),a.setFullYear(r.getFullYear()+1),a.setDate(0),a.setHours(23,59,59,999);break}return{start:r,end:a}}}});var Fp,hN,phe=y(()=>{px();Ad();q();Fp=M({tag:"Services/ViewStateManager"}),hN=class extends fc{constructor(t,r){super();this.filterState={};this.viewPreferences={};this.savedViews=[];this.storageKey="tasknotes-view-filter-state";this.preferencesStorageKey="tasknotes-view-preferences";this.savedViewsStorageKey="tasknotes-saved-views";this.app=t,this.plugin=r,this.loadFromStorage(),this.loadPreferencesFromStorage(),this.savedViews=[...this.plugin.settings.savedViews]}async initializeSavedViews(){await this.migrateAndLoadSavedViews()}getFilterState(t){let r=this.filterState[t];if(r){if(typeof r!="object"||r.type!=="group"||!Array.isArray(r.children)||typeof r.conjunction!="string"){Fp.warn(`ViewStateManager: Ignoring old format filter state for ${t}, will use default`,{category:"validation",operation:"viewstatemanager-ignoring-old-format-filter-state"}),delete this.filterState[t],this.saveToStorage();return}return ir.deepCloneFilterQuery(r)}}setFilterState(t,r){this.filterState[t]=ir.deepCloneFilterQuery(r),this.saveToStorage(),this.emit("filter-state-changed",{viewType:t,query:ir.deepCloneFilterQuery(r)})}clearFilterState(t){delete this.filterState[t],this.saveToStorage(),this.emit("filter-state-cleared",{viewType:t})}clearAllFilterStates(){this.filterState={},this.saveToStorage(),this.emit("all-filter-states-cleared")}getViewPreferences(t){return this.viewPreferences[t]}setViewPreferences(t,r){this.viewPreferences[t]={...r},this.savePreferencesToStorage(),this.emit("view-preferences-changed",{viewType:t,preferences:r})}clearViewPreferences(t){delete this.viewPreferences[t],this.savePreferencesToStorage(),this.emit("view-preferences-cleared",{viewType:t})}clearAllViewPreferences(){this.viewPreferences={},this.savePreferencesToStorage(),this.emit("all-view-preferences-cleared")}loadFromStorage(){try{let t=this.app.loadLocalStorage(this.storageKey);t&&typeof t=="string"&&(this.filterState=JSON.parse(t))}catch(t){Fp.warn("Failed to load view filter state from storage:",{category:"persistence",operation:"load-view-filter-state-storage",error:t}),this.filterState={}}}saveToStorage(){try{this.app.saveLocalStorage(this.storageKey,JSON.stringify(this.filterState))}catch(t){Fp.warn("Failed to save view filter state to storage:",{category:"persistence",operation:"save-view-filter-state-storage",error:t})}}loadPreferencesFromStorage(){try{let t=this.app.loadLocalStorage(this.preferencesStorageKey);t&&typeof t=="string"&&(this.viewPreferences=JSON.parse(t))}catch(t){Fp.warn("Failed to load view preferences from storage:",{category:"configuration",operation:"load-view-preferences-storage",error:t}),this.viewPreferences={}}}savePreferencesToStorage(){try{this.app.saveLocalStorage(this.preferencesStorageKey,JSON.stringify(this.viewPreferences))}catch(t){Fp.warn("Failed to save view preferences to storage:",{category:"configuration",operation:"save-view-preferences-storage",error:t})}}getAllFilterStates(){return{...this.filterState}}getSavedViews(){return this.savedViews.map(t=>({...t,query:ir.deepCloneFilterQuery(t.query),viewOptions:t.viewOptions?{...t.viewOptions}:void 0}))}saveView(t,r,a,i){let s={id:this.generateId(),name:t,query:ir.deepCloneFilterQuery(r),viewOptions:a?{...a}:void 0,visibleProperties:i?[...i]:void 0};return this.savedViews.push(s),this.saveSavedViewsToPluginData(),this.emit("saved-views-changed",this.getSavedViews()),s}updateView(t,r){let a=this.savedViews.findIndex(s=>s.id===t);if(a===-1)throw new Error(`Saved view with ID ${t} not found`);let i={...r};i.query&&(i.query=ir.deepCloneFilterQuery(i.query)),i.viewOptions&&(i.viewOptions={...i.viewOptions}),this.savedViews[a]={...this.savedViews[a],...i},this.saveSavedViewsToPluginData(),this.emit("saved-views-changed",this.getSavedViews())}deleteView(t){let r=this.savedViews.findIndex(a=>a.id===t);if(r===-1)throw new Error(`Saved view with ID ${t} not found`);this.savedViews.splice(r,1),this.saveSavedViewsToPluginData(),this.emit("saved-views-changed",this.getSavedViews())}getSavedView(t){let r=this.savedViews.find(a=>a.id===t);if(r)return{...r,query:ir.deepCloneFilterQuery(r.query),viewOptions:r.viewOptions?{...r.viewOptions}:void 0,visibleProperties:r.visibleProperties?[...r.visibleProperties]:void 0}}clearAllSavedViews(){this.savedViews=[],this.saveSavedViewsToPluginData(),this.emit("saved-views-changed",this.getSavedViews())}updateSavedViewProperties(t,r){let a=this.savedViews.find(i=>i.id===t);a&&(a.visibleProperties=r,this.saveSavedViewsToPluginData(),this.emit("saved-views-changed",this.getSavedViews()))}getSavedViewProperties(t){let r=this.savedViews.find(a=>a.id===t);return r==null?void 0:r.visibleProperties}reorderSavedViews(t,r){if(t<0||t>=this.savedViews.length||r<0||r>this.savedViews.length||t===r)return;r=Math.min(r,this.savedViews.length-1);let[a]=this.savedViews.splice(t,1);this.savedViews.splice(r,0,a),this.saveSavedViewsToPluginData(),this.emit("saved-views-changed",this.getSavedViews())}generateId(){return Date.now().toString(36)+Math.random().toString(36).slice(2,11)}async migrateAndLoadSavedViews(){try{this.savedViews=[...this.plugin.settings.savedViews];let t=this.app.loadLocalStorage(this.savedViewsStorageKey);if(t&&typeof t=="string"&&this.savedViews.length===0){let r=JSON.parse(t);this.savedViews=[...r],await this.saveSavedViewsToPluginData(),this.app.saveLocalStorage(this.savedViewsStorageKey,null)}}catch(t){Fp.warn("Failed to load/migrate saved views:",{category:"persistence",operation:"load-migrate-saved-views",error:t}),this.savedViews=[]}}async saveSavedViewsToPluginData(){try{this.plugin.settings.savedViews=[...this.savedViews],await this.plugin.saveSettings()}catch(t){Fp.warn("Failed to save saved views to plugin data:",{category:"persistence",operation:"save-saved-views-plugin-data",error:t})}}needsMigration(){let r=!!this.app.loadLocalStorage(this.savedViewsStorageKey),a=this.plugin.settings.savedViews&&this.plugin.settings.savedViews.length>0;return r&&!a}async performMigration(){try{this.clearAllFilterStates(),await this.migrateAndLoadSavedViews(),this.emit("migration-complete")}catch(t){Fp.error("Error during ViewStateManager migration:",{category:"configuration",operation:"viewstatemanager-migration",error:t}),this.savedViews=[],await this.saveSavedViewsToPluginData()}}cleanup(){this.removeAllListeners()}}});var mhe,FH,gN,fhe=y(()=>{mhe=require("obsidian");Cn();q();FH=M({tag:"Services/ProjectSubtasksService"}),gN=class{constructor(e){this.cacheEventRefs=[];this.projectIndex=new Map;this.indexLastBuilt=0;this.INDEX_TTL=3e4;this.stats={indexBuilds:0,indexHits:0,indexMisses:0};this.plugin=e,this.registerCacheInvalidation()}registerCacheInvalidation(){var t;if(!((t=this.plugin.cacheManager)!=null&&t.on))return;let e=()=>this.invalidateIndex();this.cacheEventRefs=[this.plugin.cacheManager.on("file-updated",e),this.plugin.cacheManager.on("file-renamed",e),this.plugin.cacheManager.on("file-deleted",e)]}getFilesLinkingToProject(e){let t=this.plugin.app.metadataCache.resolvedLinks,r=[];for(let[a,i]of Object.entries(t))i&&i[e]>0&&r.push(a);return r}getUnresolvedProjectReferences(e){let r=this.plugin.app.metadataCache.unresolvedLinks[e];return r?Object.keys(r).filter(a=>!a.includes("#")&&!a.includes("|")):[]}async getTasksLinkedToProject(e){try{let t=this.getFilesLinkingToProject(e.path),r=[];for(let a of t){let i=await this.plugin.cacheManager.getTaskInfo(a);i&&await this.isLinkFromProjectsField(a,e.path)&&r.push(i)}return r}catch(t){return FH.error("Error getting tasks linked to project:",{category:"persistence",operation:"getting-tasks-linked-project",error:t}),[]}}async isTaskUsedAsProject(e){return this.isTaskUsedAsProjectSync(e)}async isLinkFromProjectsField(e,t){var r;try{let a=this.plugin.app.vault.getAbstractFileByPath(e);if(!(a instanceof mhe.TFile))return!1;let i=this.plugin.app.metadataCache.getFileCache(a),s=this.plugin.fieldMapper.toUserField("projects");if(!((r=i==null?void 0:i.frontmatter)!=null&&r[s]))return!1;let o=i.frontmatter[s];if(!Array.isArray(o))return!1;for(let l of o){if(!l||typeof l!="string")continue;let c=vt(l);if(c===l&&!l.startsWith("[["))continue;let d=this.plugin.app.metadataCache.getFirstLinkpathDest(c,e);if(d&&d.path===t)return!0}return!1}catch(a){return FH.error("Error checking if link is from projects field:",{category:"persistence",operation:"checking-if-link-projects-field",error:a}),!1}}isTaskUsedAsProjectSync(e){return this.ensureIndexBuilt(),this.projectIndex.has(e)?(this.stats.indexHits++,this.projectIndex.get(e)):(this.stats.indexMisses++,!1)}buildProjectIndex(){this.projectIndex.clear(),this.stats.indexBuilds++;try{let e=this.plugin.app.metadataCache.resolvedLinks,t=new Set;for(let[r,a]of Object.entries(e)){if(!a)continue;let i=this.plugin.app.metadataCache.getCache(r);if(!(i!=null&&i.frontmatter)||!this.plugin.cacheManager.isTaskFile(i.frontmatter))continue;let s=this.plugin.fieldMapper.toUserField("projects"),o=i.frontmatter[s];if(Array.isArray(o))for(let l of o){if(!l||typeof l!="string")continue;let c=vt(l);if(c===l&&!l.startsWith("[["))continue;let d=this.plugin.app.metadataCache.getFirstLinkpathDest(c,r);d&&t.add(d.path)}}for(let r of t)this.projectIndex.set(r,!0);this.indexLastBuilt=Date.now()}catch(e){FH.error("Error building project index:",{category:"persistence",operation:"building-project-index",error:e})}}ensureIndexBuilt(){Date.now()-this.indexLastBuilt>this.INDEX_TTL&&this.buildProjectIndex()}invalidateIndex(){this.projectIndex.clear(),this.indexLastBuilt=0}destroy(){for(let e of this.cacheEventRefs)this.plugin.cacheManager.offref(e);this.cacheEventRefs=[],this.invalidateIndex(),this.stats={indexBuilds:0,indexHits:0,indexMisses:0}}sortTasks(e){return e.sort((t,r)=>{let a=this.plugin.statusManager.isCompletedStatus(t.status),i=this.plugin.statusManager.isCompletedStatus(r.status);if(a!==i)return a?1:-1;let s=this.plugin.priorityManager.getPriorityWeight(t.priority),o=this.plugin.priorityManager.getPriorityWeight(r.priority);return s!==o?o-s:t.due&&r.due?new Date(t.due).getTime()-new Date(r.due).getTime():t.due?-1:r.due?1:t.title.localeCompare(r.title)})}}});var yN,hhe=y(()=>{yN=class{constructor(e){this.expandedProjects=new Set;this.collapsedDefaultExpandedProjects=new Set;this.plugin=e}isExpanded(e,t=!1){return t?!this.collapsedDefaultExpandedProjects.has(e):this.expandedProjects.has(e)}toggle(e,t=!1){return t?this.collapsedDefaultExpandedProjects.has(e)?(this.collapsedDefaultExpandedProjects.delete(e),!0):(this.collapsedDefaultExpandedProjects.add(e),this.expandedProjects.delete(e),!1):(this.collapsedDefaultExpandedProjects.delete(e),this.expandedProjects.has(e)?(this.expandedProjects.delete(e),!1):(this.expandedProjects.add(e),!0))}setExpanded(e,t,r=!1){if(r){t?this.collapsedDefaultExpandedProjects.delete(e):(this.collapsedDefaultExpandedProjects.add(e),this.expandedProjects.delete(e));return}this.collapsedDefaultExpandedProjects.delete(e),t?this.expandedProjects.add(e):this.expandedProjects.delete(e)}renamePath(e,t){e!==t&&(this.expandedProjects.delete(e)&&this.expandedProjects.add(t),this.collapsedDefaultExpandedProjects.delete(e)&&this.collapsedDefaultExpandedProjects.add(t))}getExpandedProjects(){return Array.from(this.expandedProjects)}clearAll(){this.expandedProjects.clear(),this.collapsedDefaultExpandedProjects.clear()}collapseAll(){this.clearAll()}}});var rk,vN,ghe=y(()=>{q();rk=M({tag:"Services/AutoArchiveService"}),vN=class{constructor(e){this.processorTimer=null;this.isRunning=!1;this.PROCESSOR_INTERVAL_MS=6e4;this.plugin=e}hasGoogleCalendarLink(e){return!!e.googleCalendarEventId}normalizeStatusValue(e){return typeof e=="boolean"?e?"true":"false":String(e)}getCalendarCleanupState(){let e=this.plugin.settings.googleCalendarExport;return!(e!=null&&e.enabled)||!(e!=null&&e.syncOnTaskDelete)?"skip":this.plugin.taskCalendarSyncService&&this.plugin.taskCalendarSyncService.isEnabled()?"ready":"retry"}async start(){this.stop(),this.isRunning=!0,await this.processQueue(),this.scheduleNextProcess()}stop(){this.isRunning=!1,this.processorTimer!==null&&(window.clearTimeout(this.processorTimer),this.processorTimer=null)}scheduleNextProcess(){this.isRunning&&(this.processorTimer=window.setTimeout(()=>{this.processorTimer=null,this.processQueue().catch(e=>{rk.error("Error processing auto-archive queue:",{category:"persistence",operation:"processing-auto-archive-queue",error:e})}).finally(()=>{this.isRunning&&this.scheduleNextProcess()})},this.PROCESSOR_INTERVAL_MS))}async scheduleAutoArchive(e,t){if(!t.autoArchive)return;if(e.recurrence){await this.cancelAutoArchive(e.path);return}let r=Date.now(),a=r+t.autoArchiveDelay*60*1e3,i={taskPath:e.path,statusChangeTimestamp:r,archiveAfterTimestamp:a,statusValue:t.value};await this.cancelAutoArchive(e.path);let s=await this.getQueue();s.push(i),await this.saveQueue(s)}async cancelAutoArchive(e){let t=await this.getQueue(),r=t.filter(a=>a.taskPath!==e);r.length!==t.length&&await this.saveQueue(r)}async processQueue(){let e=await this.getQueue();if(e.length===0)return;let t=Date.now(),r=[],a=[];for(let o of e)t>=o.archiveAfterTimestamp?r.push(o):a.push(o);if(r.length===0)return;let i=[];for(let o of r)try{await this.processItem(o)||i.push(o)}catch(l){rk.error(`Error processing auto-archive for ${o.taskPath}:`,{category:"persistence",operation:"processing-auto-archive",error:l}),i.push(o)}let s=[...i,...a];await this.saveQueue(s)}async processItem(e){let t=await this.plugin.cacheManager.getTaskByPath(e.taskPath);if(!t||this.normalizeStatusValue(t.status)!==this.normalizeStatusValue(e.statusValue))return!0;if(t.archived){if(this.hasGoogleCalendarLink(t)){let r=this.getCalendarCleanupState();if(r==="skip")return!0;if(r==="retry")return rk.warn(`Auto-archive Google cleanup deferred until calendar sync is ready for ${e.taskPath}`,{category:"provider",operation:"auto-archive-google-cleanup-deferred-until-calendar-sync-ready"}),!1;let a=await this.plugin.taskCalendarSyncService.deleteTaskFromCalendar(t);return a||rk.warn(`Auto-archive Google cleanup still pending for ${e.taskPath}`,{category:"provider",operation:"auto-archive-google-cleanup-still-pending"}),a}return!0}try{let r=await this.plugin.taskService.toggleArchive(t);if(r.archived&&this.hasGoogleCalendarLink(r)){e.taskPath=r.path;let a=this.getCalendarCleanupState();return a==="skip"?!0:(a==="retry"&&rk.warn(`Auto-archive Google cleanup deferred until calendar sync is ready for ${e.taskPath}`,{category:"provider",operation:"auto-archive-google-cleanup-deferred-until-calendar-sync-ready"}),!1)}return!0}catch(r){return rk.error(`Failed to archive task ${e.taskPath}:`,{category:"persistence",operation:"archive-task",error:r}),!1}}async getQueue(){let e=await this.plugin.loadData();return(e==null?void 0:e.autoArchiveQueue)||[]}async saveQueue(e){let t=await this.plugin.loadPluginDataForSafeWrite("save-auto-archive-queue");t&&(t.autoArchiveQueue=e,await this.plugin.saveData(t))}async clearQueue(){await this.saveQueue([])}async getQueueStatus(){let e=await this.getQueue();return{count:e.length,items:e}}}});function Lp(n,e){for(var t in e)n[t]=e[t];return n}function xhe(n){var e=n.parentNode;e&&e.removeChild(n)}function P(n,e,t){var r,a,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?SN.call(arguments,2):t),typeof n=="function"&&n.defaultProps!=null)for(i in n.defaultProps)s[i]===void 0&&(s[i]=n.defaultProps[i]);return kN(n,s,r,a,null)}function kN(n,e,t,r,a){var i={type:n,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a==null?++bhe:a};return a==null&&Be.vnode!=null&&Be.vnode(i),i}function sn(){return{current:null}}function Ot(n){return n.children}function c4e(n,e,t,r,a){var i;for(i in t)i==="children"||i==="key"||i in e||bN(n,i,null,t[i],r);for(i in e)a&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||t[i]===e[i]||bN(n,i,e[i],t[i],r)}function vhe(n,e,t){e[0]==="-"?n.setProperty(e,t==null?"":t):n[e]=t==null?"":typeof t!="number"||l4e.test(e)?t:t+"px"}function bN(n,e,t,r,a){var i;e:if(e==="style")if(typeof t=="string")n.style.cssText=t;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(e in r)t&&e in t||vhe(n.style,e,"");if(t)for(e in t)r&&t[e]===r[e]||vhe(n.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in n?e.toLowerCase().slice(2):e.slice(2),n.l||(n.l={}),n.l[e+i]=t,t?r||n.addEventListener(e,i?The:khe,i):n.removeEventListener(e,i?The:khe,i);else if(e!=="dangerouslySetInnerHTML"){if(a)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in n)try{n[e]=t==null?"":t;break e}catch(s){}typeof t=="function"||(t==null||t===!1&&e.indexOf("-")==-1?n.removeAttribute(e):n.setAttribute(e,t))}}function khe(n){nk=!0;try{return this.l[n.type+!1](Be.event?Be.event(n):n)}finally{nk=!1}}function The(n){nk=!0;try{return this.l[n.type+!0](Be.event?Be.event(n):n)}finally{nk=!1}}function Ta(n,e){this.props=n,this.context=e}function hx(n,e){if(e==null)return n.__?hx(n.__,n.__.__k.indexOf(n)+1):null;for(var t;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null)return t.__e;return typeof n.type=="function"?hx(n):null}function Ehe(n){var e,t;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,e=0;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null){n.__e=n.__c.base=t.__e;break}return Ehe(n)}}function d4e(n){nk?setTimeout(n):whe(n)}function LH(n){(!n.__d&&(n.__d=!0)&&lh.push(n)&&!wN.__r++||yhe!==Be.debounceRendering)&&((yhe=Be.debounceRendering)||d4e)(wN)}function wN(){var n,e,t,r,a,i,s,o;for(lh.sort(function(l,c){return l.__v.__b-c.__v.__b});n=lh.shift();)n.__d&&(e=lh.length,r=void 0,a=void 0,s=(i=(t=n).__v).__e,(o=t.__P)&&(r=[],(a=Lp({},i)).__v=i.__v+1,zH(o,i,a,t.__n,o.ownerSVGElement!==void 0,i.__h!=null?[s]:null,r,s==null?hx(i):s,i.__h),Ihe(r,i),i.__e!=s&&Ehe(i)),lh.length>e&&lh.sort(function(l,c){return l.__v.__b-c.__v.__b}));wN.__r=0}function Dhe(n,e,t,r,a,i,s,o,l,c){var d,u,p,m,f,h,g,v=r&&r.__k||Che,k=v.length;for(t.__k=[],d=0;d<e.length;d++)if((m=t.__k[d]=(m=e[d])==null||typeof m=="boolean"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?kN(null,m,null,null,m):Array.isArray(m)?kN(Ot,{children:m},null,null,null):m.__b>0?kN(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=t,m.__b=t.__b+1,(p=v[d])===null||p&&m.key==p.key&&m.type===p.type)v[d]=void 0;else for(u=0;u<k;u++){if((p=v[u])&&m.key==p.key&&m.type===p.type){v[u]=void 0;break}p=null}zH(n,m,p=p||TN,a,i,s,o,l,c),f=m.__e,(u=m.ref)&&p.ref!=u&&(g||(g=[]),p.ref&&g.push(p.ref,null,m),g.push(u,m.__c||f,m)),f!=null?(h==null&&(h=f),typeof m.type=="function"&&m.__k===p.__k?m.__d=l=Phe(m,l,n):l=Ahe(n,m,p,v,f,l),typeof t.type=="function"&&(t.__d=l)):l&&p.__e==l&&l.parentNode!=n&&(l=hx(p))}for(t.__e=h,d=k;d--;)v[d]!=null&&(typeof t.type=="function"&&v[d].__e!=null&&v[d].__e==t.__d&&(t.__d=Mhe(r).nextSibling),Rhe(v[d],v[d]));if(g)for(d=0;d<g.length;d++)Nhe(g[d],g[++d],g[++d])}function Phe(n,e,t){for(var r,a=n.__k,i=0;a&&i<a.length;i++)(r=a[i])&&(r.__=n,e=typeof r.type=="function"?Phe(r,e,t):Ahe(t,r,r,a,r.__e,e));return e}function gx(n,e){return e=e||[],n==null||typeof n=="boolean"||(Array.isArray(n)?n.some(function(t){gx(t,e)}):e.push(n)),e}function Ahe(n,e,t,r,a,i){var s,o,l;if(e.__d!==void 0)s=e.__d,e.__d=void 0;else if(t==null||a!=i||a.parentNode==null)e:if(i==null||i.parentNode!==n)n.appendChild(a),s=null;else{for(o=i,l=0;(o=o.nextSibling)&&l<r.length;l+=1)if(o==a)break e;n.insertBefore(a,i),s=i}return s!==void 0?s:a.nextSibling}function Mhe(n){var e,t,r;if(n.type==null||typeof n.type=="string")return n.__e;if(n.__k){for(e=n.__k.length-1;e>=0;e--)if((t=n.__k[e])&&(r=Mhe(t)))return r}return null}function zH(n,e,t,r,a,i,s,o,l){var c,d,u,p,m,f,h,g,v,k,T,b,w,S,C,x=e.type;if(e.constructor!==void 0)return null;t.__h!=null&&(l=t.__h,o=e.__e=t.__e,e.__h=null,i=[o]),(c=Be.__b)&&c(e);try{e:if(typeof x=="function"){if(g=e.props,v=(c=x.contextType)&&r[c.__c],k=c?v?v.props.value:c.__:r,t.__c?h=(d=e.__c=t.__c).__=d.__E:("prototype"in x&&x.prototype.render?e.__c=d=new x(g,k):(e.__c=d=new Ta(g,k),d.constructor=x,d.render=p4e),v&&v.sub(d),d.props=g,d.state||(d.state={}),d.context=k,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),x.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Lp({},d.__s)),Lp(d.__s,x.getDerivedStateFromProps(g,d.__s))),p=d.props,m=d.state,d.__v=e,u)x.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(x.getDerivedStateFromProps==null&&g!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,k),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,k)===!1||e.__v===t.__v){for(e.__v!==t.__v&&(d.props=g,d.state=d.__s,d.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(E){E&&(E.__=e)}),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(g,d.__s,k),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,f)})}if(d.context=k,d.props=g,d.__P=n,b=Be.__r,w=0,"prototype"in x&&x.prototype.render){for(d.state=d.__s,d.__d=!1,b&&b(e),c=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do d.__d=!1,b&&b(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++w<25);d.state=d.__s,d.getChildContext!=null&&(r=Lp(Lp({},r),d.getChildContext())),u||d.getSnapshotBeforeUpdate==null||(f=d.getSnapshotBeforeUpdate(p,m)),C=c!=null&&c.type===Ot&&c.key==null?c.props.children:c,Dhe(n,Array.isArray(C)?C:[C],e,t,r,a,i,s,o,l),d.base=e.__e,e.__h=null,d.__h.length&&s.push(d),h&&(d.__E=d.__=null),d.__e=!1}else i==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=u4e(t.__e,e,t,r,a,i,s,l);(c=Be.diffed)&&c(e)}catch(E){e.__v=null,(l||i!=null)&&(e.__e=o,e.__h=!!l,i[i.indexOf(o)]=null),Be.__e(E,e,t)}}function Ihe(n,e){Be.__c&&Be.__c(e,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(r){r.call(t)})}catch(r){Be.__e(r,t.__v)}})}function u4e(n,e,t,r,a,i,s,o){var l,c,d,u=t.props,p=e.props,m=e.type,f=0;if(m==="svg"&&(a=!0),i!=null){for(;f<i.length;f++)if((l=i[f])&&"setAttribute"in l==!!m&&(m?l.localName===m:l.nodeType===3)){n=l,i[f]=null;break}}if(n==null){if(m===null)return document.createTextNode(p);n=a?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),i=null,o=!1}if(m===null)u===p||o&&n.data===p||(n.data=p);else{if(i=i&&SN.call(n.childNodes),c=(u=t.props||TN).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!o){if(i!=null)for(u={},f=0;f<n.attributes.length;f++)u[n.attributes[f].name]=n.attributes[f].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===n.innerHTML)||(n.innerHTML=d&&d.__html||""))}if(c4e(n,p,u,a,o),d)e.__k=[];else if(f=e.props.children,Dhe(n,Array.isArray(f)?f:[f],e,t,r,a&&m!=="foreignObject",i,s,i?i[0]:t.__k&&hx(t,0),o),i!=null)for(f=i.length;f--;)i[f]!=null&&xhe(i[f]);o||("value"in p&&(f=p.value)!==void 0&&(f!==n.value||m==="progress"&&!f||m==="option"&&f!==u.value)&&bN(n,"value",f,u.value,!1),"checked"in p&&(f=p.checked)!==void 0&&f!==n.checked&&bN(n,"checked",f,u.checked,!1))}return n}function Nhe(n,e,t){try{typeof n=="function"?n(e):n.current=e}catch(r){Be.__e(r,t)}}function Rhe(n,e,t){var r,a;if(Be.unmount&&Be.unmount(n),(r=n.ref)&&(r.current&&r.current!==n.__e||Nhe(r,null,e)),(r=n.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){Be.__e(i,e)}r.base=r.__P=null,n.__c=void 0}if(r=n.__k)for(a=0;a<r.length;a++)r[a]&&Rhe(r[a],e,t||typeof n.type!="function");t||n.__e==null||xhe(n.__e),n.__=n.__e=n.__d=void 0}function p4e(n,e,t){return this.constructor(n,t)}function Op(n,e,t){var r,a,i;Be.__&&Be.__(n,e),a=(r=typeof t=="function")?null:t&&t.__k||e.__k,i=[],zH(e,n=(!r&&t||e).__k=P(Ot,null,[n]),a||TN,TN,e.ownerSVGElement!==void 0,!r&&t?[t]:a?null:e.firstChild?SN.call(e.childNodes):null,i,!r&&t?t:a?a.__e:e.firstChild,r),Ihe(i,n)}function CN(n,e){var t={__c:e="__cC"+She++,__:n,Consumer:function(r,a){return r.children(a)},Provider:function(r){var a,i;return this.getChildContext||(a=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&a.some(function(o){o.__e=!0,LH(o)})},this.sub=function(s){a.push(s);var o=s.componentWillUnmount;s.componentWillUnmount=function(){a.splice(a.indexOf(s),1),o&&o.call(s)}}),r.children}};return t.Provider.__=t.Consumer.contextType=t}var SN,Be,bhe,OH,nk,lh,yhe,whe,She,TN,Che,l4e,Jd=y(()=>{TN={},Che=[],l4e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;SN=Che.slice,Be={__e:function(n,e,t,r){for(var a,i,s;e=e.__;)if((a=e.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(n)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(n,r||{}),s=a.__d),s)return a.__E=a}catch(o){n=o}throw n}},bhe=0,OH=function(n){return n!=null&&n.constructor===void 0},nk=!1,Ta.prototype.setState=function(n,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Lp({},this.state),typeof n=="function"&&(n=n(Lp({},t),this.props)),n&&Lp(t,n),n!=null&&this.__v&&(e&&this._sb.push(e),LH(this))},Ta.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),LH(this))},Ta.prototype.render=Ot,lh=[],whe=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wN.__r=0,She=0});function h4e(){for(var n;n=$he.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(xN),n.__H.__h.forEach($H),n.__H.__h=[]}catch(e){n.__H.__h=[],Be.__e(e,n.__v)}}function g4e(n){var e,t=function(){clearTimeout(r),jhe&&cancelAnimationFrame(e),setTimeout(n)},r=setTimeout(t,100);jhe&&(e=requestAnimationFrame(t))}function xN(n){var e=hc,t=n.__c;typeof t=="function"&&(n.__c=void 0,t()),hc=e}function $H(n){var e=hc;n.__c=n.__(),hc=e}var f4e,hc,BH,_he,$he,jH,Fhe,Lhe,Ohe,zhe,Bhe,jhe,UH=y(()=>{Jd();$he=[],jH=[],Fhe=Be.__b,Lhe=Be.__r,Ohe=Be.diffed,zhe=Be.__c,Bhe=Be.unmount;Be.__b=function(n){hc=null,Fhe&&Fhe(n)},Be.__r=function(n){Lhe&&Lhe(n),f4e=0;var e=(hc=n.__c).__H;e&&(BH===hc?(e.__h=[],hc.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=jH,t.__N=t.i=void 0})):(e.__h.forEach(xN),e.__h.forEach($H),e.__h=[])),BH=hc},Be.diffed=function(n){Ohe&&Ohe(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&($he.push(e)!==1&&_he===Be.requestAnimationFrame||((_he=Be.requestAnimationFrame)||g4e)(h4e)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==jH&&(t.__=t.__V),t.i=void 0,t.__V=jH})),BH=hc=null},Be.__c=function(n,e){e.some(function(t){try{t.__h.forEach(xN),t.__h=t.__h.filter(function(r){return!r.__||$H(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Be.__e(r,t.__v)}}),zhe&&zhe(n,e)},Be.unmount=function(n){Bhe&&Bhe(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{xN(r)}catch(a){e=a}}),t.__H=void 0,e&&Be.__e(e,t.__v))};jhe=typeof requestAnimationFrame=="function"});function y4e(n,e){for(var t in e)n[t]=e[t];return n}function Uhe(n,e){for(var t in n)if(t!=="__source"&&!(t in e))return!0;for(var r in e)if(r!=="__source"&&n[r]!==e[r])return!0;return!1}function Hhe(n){this.props=n}function Qhe(n,e,t){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=y4e({},n)).__c!=null&&(n.__c.__P===t&&(n.__c.__P=e),n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return Qhe(r,e,t)})),n}function Jhe(n,e,t){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return Jhe(r,e,t)}),n.__c&&n.__c.__P===e&&(n.__e&&t.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=t)),n}function HH(){this.__u=0,this.t=null,this.__b=null}function Xhe(n){var e=n.__.__c;return e&&e.__a&&e.__a(n)}function EN(){this.u=null,this.o=null}function k4e(n){return this.getChildContext=function(){return n.context},n.children}function T4e(n){var e=this,t=n.i;e.componentWillUnmount=function(){Op(null,e.l),e.l=null,e.i=null},e.i&&e.i!==t&&e.componentWillUnmount(),n.__v?(e.l||(e.i=t,e.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,a){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),Op(P(k4e,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function VH(n,e){var t=P(T4e,{__v:n,i:e});return t.containerInfo=e,t}function x4e(){}function E4e(){return this.cancelBubble}function D4e(){return this.defaultPrevented}var Vhe,hKt,v4e,Whe,qhe,b4e,w4e,S4e,C4e,Ghe,P4e,Yhe,Khe,Zhe,yx=y(()=>{Jd();Jd();UH();UH();(Hhe.prototype=new Ta).isPureReactComponent=!0,Hhe.prototype.shouldComponentUpdate=function(n,e){return Uhe(this.props,n)||Uhe(this.state,e)};Vhe=Be.__b;Be.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),Vhe&&Vhe(n)};hKt=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,v4e=Be.__e;Be.__e=function(n,e,t,r){if(n.then){for(var a,i=e;i=i.__;)if((a=i.__c)&&a.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),a.__c(n,e)}v4e(n,e,t,r)};Whe=Be.unmount;Be.unmount=function(n){var e=n.__c;e&&e.__R&&e.__R(),e&&n.__h===!0&&(n.type=null),Whe&&Whe(n)},(HH.prototype=new Ta).__c=function(n,e){var t=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(t);var a=Xhe(r.__v),i=!1,s=function(){i||(i=!0,t.__R=null,a?a(o):o())};t.__R=s;var o=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Jhe(c,c.__c.__P,c.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},l=e.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(s,s)},HH.prototype.componentWillUnmount=function(){this.t=[]},HH.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Qhe(this.__b,t,r.__O=r.__P)}this.__b=null}var a=e.__a&&P(Ot,null,n.fallback);return a&&(a.__h=null),[P(Ot,null,e.__a?null:n.children),a]};qhe=function(n,e,t){if(++t[1]===t[0]&&n.o.delete(e),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.o.size))for(t=n.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;n.u=t=t[2]}};(EN.prototype=new Ta).__a=function(n){var e=this,t=Xhe(e.__v),r=e.o.get(n);return r[0]++,function(a){var i=function(){e.props.revealOrder?(r.push(a),qhe(e,n,r)):a()};t?t(i):i()}},EN.prototype.render=function(n){this.u=null,this.o=new Map;var e=gx(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.o.set(e[t],this.u=[1,0,this.u]);return n.children},EN.prototype.componentDidUpdate=EN.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(e,t){qhe(n,t,e)})};b4e=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,w4e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,S4e=typeof document!="undefined",C4e=function(n){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(n)};Ta.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(Ta.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})});Ghe=Be.event;Be.event=function(n){return Ghe&&(n=Ghe(n)),n.persist=x4e,n.isPropagationStopped=E4e,n.isDefaultPrevented=D4e,n.nativeEvent=n};Yhe={configurable:!0,get:function(){return this.class}},Khe=Be.vnode;Be.vnode=function(n){var e=n.type,t=n.props,r=t;if(typeof e=="string"){var a=e.indexOf("-")===-1;for(var i in r={},t){var s=t[i];S4e&&i==="children"&&e==="noscript"||i==="value"&&"defaultValue"in t&&s==null||(i==="defaultValue"&&"value"in t&&t.value==null?i="value":i==="download"&&s===!0?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!C4e(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():a&&w4e.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():s===null&&(s=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),r[i]&&(i="oninputCapture")),r[i]=s)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=gx(t.children).forEach(function(o){o.props.selected=r.value.indexOf(o.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=gx(t.children).forEach(function(o){o.props.selected=r.multiple?r.defaultValue.indexOf(o.props.value)!=-1:r.defaultValue==o.props.value})),n.props=r,t.class!=t.className&&(Yhe.enumerable="className"in t,t.className!=null&&(r.class=t.className),Object.defineProperty(r,"className",Yhe))}n.$$typeof=b4e,Khe&&Khe(n)};Zhe=Be.__r;Be.__r=function(n){Zhe&&Zhe(n),P4e=n.__c}});function kc(n){mge.push(n),tV.forEach(e=>{gge(e,n)})}function fge(n){n.isConnected&&n.getRootNode&&hge(n.getRootNode())}function hge(n){let e=tV.get(n);if(!e||!e.isConnected){if(e=n.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");let t=M4e();t&&(e.nonce=t);let r=n===document?document.head:n,a=n===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,a)}tV.set(n,e),A4e(e)}}function A4e(n){for(let e of mge)gge(n,e)}function gge(n,e){let{sheet:t}=n,r=t.cssRules.length;e.split("}").forEach((a,i)=>{a=a.trim(),a&&t.insertRule(a+"}",r+i)})}function M4e(){return WH===void 0&&(WH=I4e()),WH}function I4e(){let n=document.querySelector('meta[name="csp-nonce"]');if(n&&n.hasAttribute("content"))return n.getAttribute("content");let e=document.querySelector("script[nonce]");return e&&e.nonce||""}function Rx(n){n.parentNode&&n.parentNode.removeChild(n)}function Yn(n,e){if(n.closest)return n.closest(e);if(!document.documentElement.contains(n))return null;do{if(HN(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}function HN(n,e){return(n.matches||n.matchesSelector||n.msMatchesSelector).call(n,e)}function yge(n,e){let t=n instanceof HTMLElement?[n]:n,r=[];for(let a=0;a<t.length;a+=1){let i=t[a].querySelectorAll(e);for(let s=0;s<i.length;s+=1)r.push(i[s])}return r}function wh(n,e){for(let t in e)uV(n,t,e[t])}function uV(n,e,t){t==null?n.style[e]="":typeof t=="number"&&R4e.test(e)?n.style[e]=`${t}px`:n.style[e]=t}function VN(n){var e,t;return(t=(e=n.composedPath)===null||e===void 0?void 0:e.call(n)[0])!==null&&t!==void 0?t:n.target}function Hi(){return ege+=1,"fc-dom-"+ege}function _x(n){n.preventDefault()}function _4e(n,e){return t=>{let r=Yn(t.target,n);r&&e.call(r,t,r)}}function pV(n,e,t,r){let a=_4e(t,r);return n.addEventListener(e,a),()=>{n.removeEventListener(e,a)}}function vge(n,e,t,r){let a;return pV(n,"mouseover",e,(i,s)=>{if(s!==a){a=s,t(i,s);let o=l=>{a=null,r(l,s),s.removeEventListener("mouseleave",o)};s.addEventListener("mouseleave",o)}})}function mV(n,e){let t=r=>{e(r),tge.forEach(a=>{n.removeEventListener(a,t)})};tge.forEach(r=>{n.addEventListener(r,t)})}function kge(n){return Object.assign({onClick:n},Tge(n))}function Tge(n){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(n(e),e.preventDefault())}}}function au(){return rge+=1,String(rge)}function ck(){document.body.classList.add("fc-not-allowed")}function dk(){document.body.classList.remove("fc-not-allowed")}function fV(n){n.style.userSelect="none",n.style.webkitUserSelect="none",n.addEventListener("selectstart",_x)}function hV(n){n.style.userSelect="",n.style.webkitUserSelect="",n.removeEventListener("selectstart",_x)}function gV(n){n.addEventListener("contextmenu",_x)}function yV(n){n.removeEventListener("contextmenu",_x)}function bge(n){let e=[],t=[],r,a;for(typeof n=="string"?t=n.split(/\s*,\s*/):typeof n=="function"?t=[n]:Array.isArray(n)&&(t=n),r=0;r<t.length;r+=1)a=t[r],typeof a=="string"?e.push(a.charAt(0)==="-"?{field:a.substring(1),order:-1}:{field:a,order:1}):typeof a=="function"&&e.push({func:a});return e}function wge(n,e,t){let r,a;for(r=0;r<t.length;r+=1)if(a=F4e(n,e,t[r]),a)return a;return 0}function F4e(n,e,t){return t.func?t.func(n,e):Sge(n[t.field],e[t.field])*(t.order||1)}function Sge(n,e){return!n&&!e?0:e==null?-1:n==null?1:typeof n=="string"||typeof e=="string"?String(n).localeCompare(String(e)):n-e}function dh(n,e){let t=String(n);return"000".substr(0,e-t.length)+t}function uk(n,e,t){return typeof n=="function"?n(...e):typeof n=="string"?e.reduce((r,a,i)=>r.replace("$"+i,a||""),n):t}function vV(n,e){return n-e}function vx(n){return n%1===0}function L4e(n){let e=n.querySelector(".fc-scrollgrid-shrink-frame"),t=n.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!t)throw new Error("needs fc-scrollgrid-shrink-cushion className");return n.getBoundingClientRect().width-e.getBoundingClientRect().width+t.getBoundingClientRect().width}function lt(n,e){return typeof n=="string"?z4e(n):typeof n=="object"&&n?age(n):typeof n=="number"?age({[e||"milliseconds"]:n}):null}function z4e(n){let e=O4e.exec(n);if(e){let t=e[1]?-1:1;return{years:0,months:0,days:t*(e[2]?parseInt(e[2],10):0),milliseconds:t*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function age(n){let e={years:n.years||n.year||0,months:n.months||n.month||0,days:n.days||n.day||0,milliseconds:(n.hours||n.hour||0)*60*60*1e3+(n.minutes||n.minute||0)*60*1e3+(n.seconds||n.second||0)*1e3+(n.milliseconds||n.millisecond||n.ms||0)},t=n.weeks||n.week;return t&&(e.days+=t*7,e.specifiedWeeks=!0),e}function B4e(n,e){return n.years===e.years&&n.months===e.months&&n.days===e.days&&n.milliseconds===e.milliseconds}function Fx(n,e){return{years:n.years+e.years,months:n.months+e.months,days:n.days+e.days,milliseconds:n.milliseconds+e.milliseconds}}function Cge(n,e){return{years:n.years-e.years,months:n.months-e.months,days:n.days-e.days,milliseconds:n.milliseconds-e.milliseconds}}function kV(n,e){return{years:n.years*e,months:n.months*e,days:n.days*e,milliseconds:n.milliseconds*e}}function j4e(n){return ak(n)/365}function $4e(n){return ak(n)/30}function ak(n){return Ps(n)/864e5}function Ps(n){return n.years*(365*864e5)+n.months*(30*864e5)+n.days*864e5+n.milliseconds}function Lx(n,e){let t=null;for(let r=0;r<nge.length;r+=1){let a=nge[r];if(e[a]){let i=n[a]/e[a];if(!vx(i)||t!==null&&t!==i)return null;t=i}else if(n[a])return null}return t}function kx(n){let e=n.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return n.days?n.specifiedWeeks&&n.days%7===0?{unit:"week",value:n.days/7}:{unit:"day",value:n.days}:n.months?{unit:"month",value:n.months}:n.years?{unit:"year",value:n.years}:{unit:"millisecond",value:0}}function Tc(n,e,t){if(n===e)return!0;let r=n.length,a;if(r!==e.length)return!1;for(a=0;a<r;a+=1)if(!(t?t(n[a],e[a]):n[a]===e[a]))return!1;return!0}function WN(n,e){let t=Bp(n);return t[2]+=e*7,ji(t)}function Kr(n,e){let t=Bp(n);return t[2]+=e,ji(t)}function gc(n,e){let t=Bp(n);return t[6]+=e,ji(t)}function TV(n,e){return bc(n,e)/7}function bc(n,e){return(e.valueOf()-n.valueOf())/(1e3*60*60*24)}function H4e(n,e){return(e.valueOf()-n.valueOf())/(1e3*60*60)}function V4e(n,e){return(e.valueOf()-n.valueOf())/(1e3*60)}function W4e(n,e){return(e.valueOf()-n.valueOf())/1e3}function xge(n,e){let t=nr(n),r=nr(e);return{years:0,months:0,days:Math.round(bc(t,r)),milliseconds:e.valueOf()-r.valueOf()-(n.valueOf()-t.valueOf())}}function Ege(n,e){let t=ik(n,e);return t!==null&&t%7===0?t/7:null}function ik(n,e){return jp(n)===jp(e)?Math.round(bc(n,e)):null}function nr(n){return ji([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()])}function q4e(n){return ji([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours()])}function G4e(n){return ji([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes()])}function Y4e(n){return ji([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()])}function K4e(n,e,t){let r=n.getUTCFullYear(),a=qH(n,r,e,t);if(a<1)return qH(n,r-1,e,t);let i=qH(n,r+1,e,t);return i>=1?Math.min(a,i):a}function qH(n,e,t,r){let a=ji([e,0,1+Z4e(e,t,r)]),i=nr(n),s=Math.round(bc(a,i));return Math.floor(s/7)+1}function Z4e(n,e,t){let r=7+e-t;return-((7+ji([n,0,r]).getUTCDay()-e)%7)+r-1}function ige(n){return[n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()]}function sge(n){return new Date(n[0],n[1]||0,n[2]==null?1:n[2],n[3]||0,n[4]||0,n[5]||0)}function Bp(n){return[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()]}function ji(n){return n.length===1&&(n=n.concat([0])),new Date(Date.UTC(...n))}function bV(n){return!isNaN(n.valueOf())}function jp(n){return n.getUTCHours()*1e3*60*60+n.getUTCMinutes()*1e3*60+n.getUTCSeconds()*1e3+n.getUTCMilliseconds()}function qN(n,e,t=!1){let r=n.toISOString();return r=r.replace(".000",""),t&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",SV(e,!0)))),r}function Wp(n){return n.toISOString().replace(/T.*$/,"")}function pk(n){return n.toISOString().match(/^\d{4}-\d{2}/)[0]}function wV(n){return dh(n.getUTCHours(),2)+":"+dh(n.getUTCMinutes(),2)+":"+dh(n.getUTCSeconds(),2)}function SV(n,e=!1){let t=n<0?"-":"+",r=Math.abs(n),a=Math.floor(r/60),i=Math.round(r%60);return e?`${t+dh(a,2)}:${dh(i,2)}`:`GMT${t}${a}${i?`:${dh(i,2)}`:""}`}function Ae(n,e,t){let r,a;return function(...i){if(!r)a=n.apply(this,i);else if(!Tc(r,i)){t&&t(a);let s=n.apply(this,i);(!e||!e(s,a))&&(a=s)}return r=i,a}}function mk(n,e,t){let r,a;return i=>{if(!r)a=n.call(this,i);else if(!Va(r,i)){t&&t(a);let s=n.call(this,i);(!e||!e(s,a))&&(a=s)}return r=i,a}}function oge(n,e,t){let r=Object.keys(n).length;return r===1&&n.timeZoneName==="short"?a=>SV(a.timeZoneOffset):r===0&&e.week?a=>i3e(t.computeWeekNumber(a.marker),t.weekText,t.weekTextLong,t.locale,e.week):t3e(n,e,t)}function t3e(n,e,t){n=Object.assign({},n),e=Object.assign({},e),r3e(n,e),n.timeZone="UTC";let r=new Intl.DateTimeFormat(t.locale.codes,n),a;if(e.omitZeroMinute){let i=Object.assign({},n);delete i.minute,a=new Intl.DateTimeFormat(t.locale.codes,i)}return i=>{let{marker:s}=i,o;a&&!s.getUTCMinutes()?o=a:o=r;let l=o.format(s);return n3e(l,i,n,e,t)}}function r3e(n,e){n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),n.timeZoneName==="long"&&(n.timeZoneName="short"),e.omitZeroMinute&&(n.second||n.millisecond)&&delete e.omitZeroMinute}function n3e(n,e,t,r,a){return n=n.replace(X4e,""),t.timeZoneName==="short"&&(n=a3e(n,a.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":SV(e.timeZoneOffset))),r.omitCommas&&(n=n.replace(Q4e,"").trim()),r.omitZeroMinute&&(n=n.replace(":00","")),r.meridiem===!1?n=n.replace(DN,"").trim():r.meridiem==="narrow"?n=n.replace(DN,(i,s)=>s.toLocaleLowerCase()):r.meridiem==="short"?n=n.replace(DN,(i,s)=>`${s.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(n=n.replace(DN,i=>i.toLocaleLowerCase())),n=n.replace(J4e," "),n=n.trim(),n}function a3e(n,e){let t=!1;return n=n.replace(e3e,()=>(t=!0,e)),t||(n+=` ${e}`),n}function i3e(n,e,t,r,a){let i=[];return a==="long"?i.push(t):(a==="short"||a==="narrow")&&i.push(e),(a==="long"||a==="short")&&i.push(" "),i.push(r.simpleNumberFormat.format(n)),r.options.direction==="rtl"&&i.reverse(),i.join("")}function s3e(n,e,t){return t.getMarkerYear(n)!==t.getMarkerYear(e)?5:t.getMarkerMonth(n)!==t.getMarkerMonth(e)?4:t.getMarkerDay(n)!==t.getMarkerDay(e)?2:jp(n)!==jp(e)?1:0}function o3e(n,e){let t={};for(let r in n)(!(r in _N)||_N[r]<=e)&&(t[r]=n[r]);return t}function l3e(n,e,t,r){let a=0;for(;a<n.length;){let i=n.indexOf(e,a);if(i===-1)break;let s=n.substr(0,i);a=i+e.length;let o=n.substr(a),l=0;for(;l<t.length;){let c=t.indexOf(r,l);if(c===-1)break;let d=t.substr(0,c);l=c+r.length;let u=t.substr(l);if(s===d&&o===u)return{before:s,after:o}}}return null}function lge(n,e){let t=e.markerToArray(n.marker);return{marker:n.marker,timeZoneOffset:n.timeZoneOffset,array:t,year:t[0],month:t[1],day:t[2],hour:t[3],minute:t[4],second:t[5],millisecond:t[6]}}function FN(n,e,t,r){let a=lge(n,t.calendarSystem),i=e?lge(e,t.calendarSystem):null;return{date:a,start:a,end:i,timeZone:t.timeZone,localeCodes:t.locale.codes,defaultSeparator:r||t.defaultSeparator}}function zt(n){return typeof n=="object"&&n?new rV(n):typeof n=="string"?new nV(n):typeof n=="function"?new aV(n):null}function ch(n,e){return typeof n=="object"&&typeof e=="object"&&n&&e?Va(n,e):n===e}function PN(n,e){return Array.isArray(n)&&Array.isArray(e)?Tc(n,e):n===e}function GN(n){return YN(n,qp)}function Ox(n,e){let t={},r={};for(let a in e)a in n&&(t[a]=e[a](n[a]));for(let a in n)a in e||(r[a]=n[a]);return{refined:t,extra:r}}function B(n){return n}function YN(n,e){let t={};if(e){for(let r in e)if(e[r]===ch){let a=[];for(let i=n.length-1;i>=0;i-=1){let s=n[i][r];if(typeof s=="object"&&s)a.unshift(s);else if(s!==void 0){t[r]=s;break}}a.length&&(t[r]=YN(a))}}for(let r=n.length-1;r>=0;r-=1){let a=n[r];for(let i in a)i in t||(t[i]=a[i])}return t}function Xd(n,e){let t={};for(let r in n)e(n[r],r)&&(t[r]=n[r]);return t}function To(n,e){let t={};for(let r in n)t[r]=e(n[r],r);return t}function DV(n){let e={};for(let t of n)e[t]=!0;return e}function KN(n){let e=[];for(let t in n)e.push(n[t]);return e}function Va(n,e){if(n===e)return!0;for(let t in n)if(LN.call(n,t)&&!(t in e))return!1;for(let t in e)if(LN.call(e,t)&&n[t]!==e[t])return!1;return!0}function d3e(n,e){let t=u3e(n,e);for(let r of t)if(!c3e.test(r))return!1;return!0}function u3e(n,e){let t=[];for(let r in n)LN.call(n,r)&&(r in e||t.push(r));for(let r in e)LN.call(e,r)&&n[r]!==e[r]&&t.push(r);return t}function NN(n,e,t={}){if(n===e)return!0;for(let r in e)if(!(r in n&&p3e(n[r],e[r],t[r])))return!1;for(let r in n)if(!(r in e))return!1;return!0}function p3e(n,e,t){return n===e||t===!0?!0:t?t(n,e):!1}function Pge(n,e=0,t,r=1){let a=[];t==null&&(t=Object.keys(n).length);for(let i=e;i<t;i+=r){let s=n[i];s!==void 0&&a.push(s)}return a}function m3e(n,e){Age[n]=e}function f3e(n){return new Age[n]}function Mge(n){let e=h3e.exec(n);if(e){let t=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(bV(t)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:t,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}function bx(n){n();let e=Be.debounceRendering,t=[];function r(a){t.push(a)}for(Be.debounceRendering=r,Op(P(sV,{}),document.createElement("div"));t.length;)t.shift()();Be.debounceRendering=e}function Ige(n){let e=CN(n),t=e.Provider;return e.Provider=function(){let r=!this.getChildContext,a=t.apply(this,arguments);if(r){let i=[];this.shouldComponentUpdate=s=>{this.props.value!==s.value&&i.forEach(o=>{o.context=s.value,o.forceUpdate()})},this.sub=s=>{i.push(s);let o=s.componentWillUnmount;s.componentWillUnmount=()=>{i.splice(i.indexOf(s),1),o&&o.call(s)}}}return a},e}function Nge(n,e,t,r,a,i,s,o,l,c,d,u,p,m){return{dateEnv:a,nowManager:i,options:t,pluginHooks:o,emitter:d,dispatch:l,getCurrentData:c,calendarApi:u,viewSpec:n,viewApi:e,dateProfileGenerator:r,theme:s,isRtl:t.direction==="rtl",addResizeHandler(f){d.on("_resize",f)},removeResizeHandler(f){d.off("_resize",f)},createScrollResponder(f){return new ON(f,d,lt(t.scrollTime),t.scrollTimeReset)},registerInteractiveComponent:p,unregisterInteractiveComponent:m}}function g3e(n){let e=Object.create(this.prototype.propEquality);Object.assign(e,n),this.prototype.propEquality=e}function y3e(n){let e=Object.create(this.prototype.stateEquality);Object.assign(e,n),this.prototype.stateEquality=e}function Ms(n,e){typeof n=="function"?n(e):n&&(n.current=e)}function oV(n,e){var t;return!!(e.handleCustomRendering&&n&&(!((t=e.customRenderingMetaMap)===null||t===void 0)&&t[n]))}function PV(n,e,t){let r=Object.assign(Object.assign({},n.elAttrs),{ref:t});return(n.elClasses||e)&&(r.className=(n.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),n.elStyle&&(r.style=n.elStyle),r}function v3e(n){return!!n}function k3e(n,e){let t=n.props;return P(wx,Object.assign({renderProps:t.renderProps,generatorName:t.generatorName,customGenerator:t.customGenerator,defaultGenerator:t.defaultGenerator,renderId:n.context},e))}function T3e(n,e){let t=typeof n=="function"?n(e):n||[];return typeof t=="string"?[t]:t}function MV(n){return[`fc-${n.type}-view`,"fc-view"]}function b3e(n,e){let t=null,r=null;return n.start&&(t=e.createMarker(n.start)),n.end&&(r=e.createMarker(n.end)),!t&&!r||t&&r&&r<t?null:{start:t,end:r}}function cge(n,e){let t=[],{start:r}=e,a,i;for(n.sort(w3e),a=0;a<n.length;a+=1)i=n[a],i.start>r&&t.push({start:r,end:i.start}),i.end>r&&(r=i.end);return r<e.end&&t.push({start:r,end:e.end}),t}function w3e(n,e){return n.start.valueOf()-e.start.valueOf()}function fi(n,e){let{start:t,end:r}=n,a=null;return e.start!==null&&(t===null?t=e.start:t=new Date(Math.max(t.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(t===null||r===null||t<r)&&(a={start:t,end:r}),a}function Rge(n,e){return(n.start===null?null:n.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(n.end===null?null:n.end.valueOf())===(e.end===null?null:e.end.valueOf())}function ZN(n,e){return(n.end===null||e.start===null||n.end>e.start)&&(n.start===null||e.end===null||n.start<e.end)}function fk(n,e){return(n.start===null||e.start!==null&&e.start>=n.start)&&(n.end===null||e.end!==null&&e.end<=n.end)}function ko(n,e){return(n.start===null||e>=n.start)&&(n.end===null||e<n.end)}function S3e(n,e){return e.start!=null&&n<e.start?e.start:e.end!=null&&n>=e.end?new Date(e.end.valueOf()-1):n}function _ge(n){let e=Math.floor(bc(n.start,n.end))||1,t=nr(n.start),r=Kr(t,e);return{start:t,end:r}}function QN(n,e=lt(0)){let t=null,r=null;if(n.end){r=nr(n.end);let a=n.end.valueOf()-r.valueOf();a&&a>=Ps(e)&&(r=Kr(r,1))}return n.start&&(t=nr(n.start),r&&r<=t&&(r=Kr(t,1))),{start:t,end:r}}function IV(n){let e=QN(n);return bc(e.start,e.end)>1}function $p(n,e,t,r){return r==="year"?lt(t.diffWholeYears(n,e),"year"):r==="month"?lt(t.diffWholeMonths(n,e),"month"):xge(n,e)}function hk(n,e,t,r){return{instanceId:au(),defId:n,range:e,forcedStartTzo:t==null?null:t,forcedEndTzo:r==null?null:r}}function C3e(n,e,t,r){for(let a=0;a<r.length;a+=1){let i=r[a].parse(n,t);if(i){let{allDay:s}=n;return s==null&&(s=e,s==null&&(s=i.allDayGuess,s==null&&(s=!1))),{allDay:s,duration:i.duration,typeData:i.typeData,typeId:a}}}return null}function mh(n,e,t){let{dateEnv:r,pluginHooks:a,options:i}=t,{defs:s,instances:o}=n;o=Xd(o,l=>!s[l.defId].recurringDef);for(let l in s){let c=s[l];if(c.recurringDef){let{duration:d}=c.recurringDef;d||(d=c.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);let u=x3e(c,d,e,r,a.recurringTypes);for(let p of u){let m=hk(l,{start:p,end:r.add(p,d)});o[m.instanceId]=m}}}return{defs:s,instances:o}}function x3e(n,e,t,r,a){let s=a[n.recurringDef.typeId].expand(n.recurringDef.typeData,{start:r.subtract(t.start,e),end:t.end},r);return n.allDay&&(s=s.map(nr)),s}function Lge(n,e,t,r,a=NV(t),i,s){let{refined:o,extra:l}=zx(n,t,a),c=P3e(e,t),d=C3e(o,c,t.dateEnv,t.pluginHooks.recurringTypes);if(d){let p=sk(o,l,e?e.sourceId:"",d.allDay,!!d.duration,t,i);return p.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:p,instance:null}}let u=D3e(o,c,t,r);if(u){let p=sk(o,l,e?e.sourceId:"",u.allDay,u.hasEnd,t,i),m=hk(p.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return s&&p.publicId&&s[p.publicId]&&(m.instanceId=s[p.publicId]),{def:p,instance:m}}return null}function zx(n,e,t=NV(e)){return Ox(n,t)}function NV(n){return Object.assign(Object.assign(Object.assign({},zN),E3e),n.pluginHooks.eventRefiners)}function sk(n,e,t,r,a,i,s){let o={title:n.title||"",groupId:n.groupId||"",publicId:n.id||"",url:n.url||"",recurringDef:null,defId:(s&&n.id?s[n.id]:"")||au(),sourceId:t,allDay:r,hasEnd:a,interactive:n.interactive,ui:gk(n,i),extendedProps:Object.assign(Object.assign({},n.extendedProps||{}),e)};for(let l of i.pluginHooks.eventDefMemberAdders)Object.assign(o,l(n));return Object.freeze(o.ui.classNames),Object.freeze(o.extendedProps),o}function D3e(n,e,t,r){let{allDay:a}=n,i,s=null,o=!1,l,c=null,d=n.start!=null?n.start:n.date;if(i=t.dateEnv.createMarkerMeta(d),i)s=i.marker;else if(!r)return null;return n.end!=null&&(l=t.dateEnv.createMarkerMeta(n.end)),a==null&&(e!=null?a=e:a=(!i||i.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),a&&s&&(s=nr(s)),l&&(c=l.marker,a&&(c=nr(c)),s&&c<=s&&(c=null)),c?o=!0:r||(o=t.options.forceEventDuration||!1,c=t.dateEnv.add(s,a?t.options.defaultAllDayEventDuration:t.options.defaultTimedEventDuration)),{allDay:a,hasEnd:o,range:{start:s,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:l?l.forcedTzo:null}}function P3e(n,e){let t=null;return n&&(t=n.defaultAllDay),t==null&&(t=e.options.defaultAllDay),t}function Sx(n,e,t,r,a,i){let s=Kn(),o=NV(t);for(let l of n){let c=Lge(l,e,t,r,o,a,i);c&&fh(c,s)}return s}function fh(n,e=Kn()){return e.defs[n.def.defId]=n.def,n.instance&&(e.instances[n.instance.instanceId]=n.instance),e}function Bx(n,e){let t=n.instances[e];if(t){let r=n.defs[t.defId],a=XN(n,i=>A3e(r,i));return a.defs[r.defId]=r,a.instances[t.instanceId]=t,a}return Kn()}function A3e(n,e){return!!(n.groupId&&n.groupId===e.groupId)}function Kn(){return{defs:{},instances:{}}}function JN(n,e){return{defs:Object.assign(Object.assign({},n.defs),e.defs),instances:Object.assign(Object.assign({},n.instances),e.instances)}}function XN(n,e){let t=Xd(n.defs,e),r=Xd(n.instances,a=>t[a.defId]);return{defs:t,instances:r}}function M3e(n,e){let{defs:t,instances:r}=n,a={},i={};for(let s in t)e.defs[s]||(a[s]=t[s]);for(let s in r)!e.instances[s]&&a[r[s].defId]&&(i[s]=r[s]);return{defs:a,instances:i}}function I3e(n,e){return Array.isArray(n)?Sx(n,null,e,!0):typeof n=="object"&&n?Sx([n],null,e,!0):n!=null?String(n):null}function lV(n){return Array.isArray(n)?n:typeof n=="string"?n.split(/\s+/):[]}function gk(n,e){let t=I3e(n.constraint,e);return{display:n.display||null,startEditable:n.startEditable!=null?n.startEditable:n.editable,durationEditable:n.durationEditable!=null?n.durationEditable:n.editable,constraints:t!=null?[t]:[],overlap:n.overlap!=null?n.overlap:null,allows:n.allow!=null?[n.allow]:[],backgroundColor:n.backgroundColor||n.color||"",borderColor:n.borderColor||n.color||"",textColor:n.textColor||"",classNames:(n.className||[]).concat(n.classNames||[])}}function RV(n){return n.reduce(R3e,N3e)}function R3e(n,e){return{display:e.display!=null?e.display:n.display,startEditable:e.startEditable!=null?e.startEditable:n.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:n.durationEditable,constraints:n.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:n.overlap,allows:n.allows.concat(e.allows),backgroundColor:e.backgroundColor||n.backgroundColor,borderColor:e.borderColor||n.borderColor,textColor:e.textColor||n.textColor,classNames:n.classNames.concat(e.classNames)}}function _V(n,e,t=FV(e)){let r;if(typeof n=="string"?r={url:n}:typeof n=="function"||Array.isArray(n)?r={events:n}:typeof n=="object"&&n&&(r=n),r){let{refined:a,extra:i}=Ox(r,t),s=F3e(a,e);if(s)return{_raw:n,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:a.defaultAllDay,eventDataTransform:a.eventDataTransform,success:a.success,failure:a.failure,publicId:a.id||"",sourceId:au(),sourceDefId:s.sourceDefId,meta:s.meta,ui:gk(a,e),extendedProps:i}}return null}function FV(n){return Object.assign(Object.assign(Object.assign({},zN),_3e),n.pluginHooks.eventSourceRefiners)}function F3e(n,e){let t=e.pluginHooks.eventSourceDefs;for(let r=t.length-1;r>=0;r-=1){let i=t[r].parseMeta(n);if(i)return{sourceDefId:r,meta:i}}return null}function Oge(n,e,t,r,a){switch(e.type){case"RECEIVE_EVENTS":return L3e(n,t[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,a);case"RESET_RAW_EVENTS":return O3e(n,t[e.sourceId],e.rawEvents,r.activeRange,a);case"ADD_EVENTS":return z3e(n,e.eventStore,r?r.activeRange:null,a);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return JN(n,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?mh(n,r.activeRange,a):n;case"REMOVE_EVENTS":return M3e(n,e.eventStore);case"REMOVE_EVENT_SOURCE":return Bge(n,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return XN(n,i=>!i.sourceId);case"REMOVE_ALL_EVENTS":return Kn();default:return n}}function L3e(n,e,t,r,a,i){if(e&&t===e.latestFetchId){let s=Sx(zge(a,e,i),e,i);return r&&(s=mh(s,r,i)),JN(Bge(n,e.sourceId),s)}return n}function O3e(n,e,t,r,a){let{defIdMap:i,instanceIdMap:s}=j3e(n),o=Sx(zge(t,e,a),e,a,!1,i,s);return mh(o,r,a)}function zge(n,e,t){let r=t.options.eventDataTransform,a=e?e.eventDataTransform:null;return a&&(n=dge(n,a)),r&&(n=dge(n,r)),n}function dge(n,e){let t;if(!e)t=n;else{t=[];for(let r of n){let a=e(r);a?t.push(a):a==null&&t.push(r)}}return t}function z3e(n,e,t,r){return t&&(e=mh(e,t,r)),JN(n,e)}function LV(n,e,t){let{defs:r}=n,a=To(n.instances,i=>r[i.defId].allDay?i:Object.assign(Object.assign({},i),{range:{start:t.createMarker(e.toDate(i.range.start,i.forcedStartTzo)),end:t.createMarker(e.toDate(i.range.end,i.forcedEndTzo))},forcedStartTzo:t.canComputeOffset?null:i.forcedStartTzo,forcedEndTzo:t.canComputeOffset?null:i.forcedEndTzo}));return{defs:r,instances:a}}function Bge(n,e){return XN(n,t=>t.sourceId!==e)}function B3e(n,e){return{defs:n.defs,instances:Xd(n.instances,t=>!e[t.instanceId])}}function j3e(n){let{defs:e,instances:t}=n,r={},a={};for(let i in e){let s=e[i],{publicId:o}=s;o&&(r[o]=i)}for(let i in t){let s=t[i],o=e[s.defId],{publicId:l}=o;l&&(a[l]=i)}return{defIdMap:r,instanceIdMap:a}}function $3e(n,e,t){(n[e]||(n[e]=[])).push(t)}function U3e(n,e,t){t?n[e]&&(n[e]=n[e].filter(r=>r!==t)):delete n[e]}function OV(n,e){return Sx(V3e(n),null,e)}function V3e(n){let e;return n===!0?e=[{}]:Array.isArray(n)?e=n.filter(t=>t.daysOfWeek):typeof n=="object"&&n?e=[n]:e=[],e=e.map(t=>Object.assign(Object.assign({},H3e),t)),e}function eR(n,e,t){t.emitter.trigger("select",Object.assign(Object.assign({},zV(n,t)),{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view}))}function W3e(n,e){e.emitter.trigger("unselect",{jsEvent:n?n.origEvent:null,view:e.viewApi||e.calendarApi.view})}function zV(n,e){let t={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(t,r(n,e));return Object.assign(t,n6e(n,e.dateEnv)),t}function Cx(n,e,t){let{dateEnv:r,options:a}=t,i=e;return n?(i=nr(i),i=r.add(i,a.defaultAllDayEventDuration)):i=r.add(i,a.defaultTimedEventDuration),i}function jx(n,e,t,r){let a=BN(n.defs,e),i=Kn();for(let s in n.defs){let o=n.defs[s];i.defs[s]=q3e(o,a[s],t,r)}for(let s in n.instances){let o=n.instances[s],l=i.defs[o.defId];i.instances[s]=G3e(o,l,a[o.defId],t,r)}return i}function q3e(n,e,t,r){let a=t.standardProps||{};a.hasEnd==null&&e.durationEditable&&(t.startDelta||t.endDelta)&&(a.hasEnd=!0);let i=Object.assign(Object.assign(Object.assign({},n),a),{ui:Object.assign(Object.assign({},n.ui),a.ui)});t.extendedProps&&(i.extendedProps=Object.assign(Object.assign({},i.extendedProps),t.extendedProps));for(let s of r.pluginHooks.eventDefMutationAppliers)s(i,t,r);return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function G3e(n,e,t,r,a){let{dateEnv:i}=a,s=r.standardProps&&r.standardProps.allDay===!0,o=r.standardProps&&r.standardProps.hasEnd===!1,l=Object.assign({},n);return s&&(l.range=_ge(l.range)),r.datesDelta&&t.startEditable&&(l.range={start:i.add(l.range.start,r.datesDelta),end:i.add(l.range.end,r.datesDelta)}),r.startDelta&&t.durationEditable&&(l.range={start:i.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&t.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,r.endDelta)}),o&&(l.range={start:l.range.start,end:Cx(e.allDay,l.range.start,a)}),e.allDay&&(l.range={start:nr(l.range.start),end:nr(l.range.end)}),l.range.end<l.range.start&&(l.range.end=Cx(e.allDay,l.range.start,a)),l}function jge(n){let e=n._def,t=n._instance;return{defs:{[e.defId]:e},instances:t?{[t.instanceId]:t}:{}}}function Sc(n,e,t){let{defs:r,instances:a}=n,i=[],s=t?t.instanceId:"";for(let o in a){let l=a[o],c=r[l.defId];l.instanceId!==s&&i.push(new vr(e,c,l))}return i}function ok(n,e,t,r){let a={},i={},s={},o=[],l=[],c=BN(n.defs,e);for(let d in n.defs){let u=n.defs[d];c[u.defId].display==="inverse-background"&&(u.groupId?(a[u.groupId]=[],s[u.groupId]||(s[u.groupId]=u)):i[d]=[])}for(let d in n.instances){let u=n.instances[d],p=n.defs[u.defId],m=c[p.defId],f=u.range,h=!p.allDay&&r?QN(f,r):f,g=fi(h,t);g&&(m.display==="inverse-background"?p.groupId?a[p.groupId].push(g):i[u.defId].push(g):m.display!=="none"&&(m.display==="background"?o:l).push({def:p,ui:m,instance:u,range:g,isStart:h.start&&h.start.valueOf()===g.start.valueOf(),isEnd:h.end&&h.end.valueOf()===g.end.valueOf()}))}for(let d in a){let u=a[d],p=cge(u,t);for(let m of p){let f=s[d],h=c[f.defId];o.push({def:f,ui:h,instance:null,range:m,isStart:!1,isEnd:!1})}}for(let d in i){let u=i[d],p=cge(u,t);for(let m of p)o.push({def:n.defs[d],ui:c[d],instance:null,range:m,isStart:!1,isEnd:!1})}return{bg:o,fg:l}}function BV(n){return n.ui.display==="background"||n.ui.display==="inverse-background"}function uge(n,e){n.fcSeg=e}function iu(n){return n.fcSeg||n.parentNode.fcSeg||null}function BN(n,e){return To(n,t=>$ge(t,e))}function $ge(n,e){let t=[];return e[""]&&t.push(e[""]),e[n.defId]&&t.push(e[n.defId]),t.push(n.ui),RV(t)}function Sh(n,e){let t=n.map(Y3e);return t.sort((r,a)=>wge(r,a,e)),t.map(r=>r._seg)}function Y3e(n){let{eventRange:e}=n,t=e.def,r=e.instance?e.instance.range:e.range,a=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},t.extendedProps),t),{id:t.publicId,start:a,end:i,duration:i-a,allDay:Number(t.allDay),_seg:n})}function K3e(n,e){let{pluginHooks:t}=e,r=t.isDraggableTransformers,{def:a,ui:i}=n.eventRange,s=i.startEditable;for(let o of r)s=o(s,a,i,e);return s}function Z3e(n,e){return n.isStart&&n.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function Q3e(n,e){return n.isEnd&&n.eventRange.ui.durationEditable}function Gp(n,e,t,r,a,i,s){let{dateEnv:o,options:l}=t,{displayEventTime:c,displayEventEnd:d}=l,u=n.eventRange.def,p=n.eventRange.instance;c==null&&(c=r!==!1),d==null&&(d=a!==!1);let m=p.range.start,f=p.range.end,h=i||n.start||n.eventRange.range.start,g=s||n.end||n.eventRange.range.end,v=nr(m).valueOf()===nr(h).valueOf(),k=nr(gc(f,-1)).valueOf()===nr(gc(g,-1)).valueOf();return c&&!u.allDay&&(v||k)?(h=v?m:h,g=k?f:g,d&&u.hasEnd?o.formatRange(h,g,e,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:s?null:p.forcedEndTzo}):o.format(h,e,{forcedTzo:i?null:p.forcedStartTzo})):""}function Is(n,e,t){let r=n.eventRange.range;return{isPast:r.end<=(t||e.start),isFuture:r.start>=(t||e.end),isToday:e&&ko(e,r.start)}}function J3e(n){let e=["fc-event"];return n.isMirror&&e.push("fc-event-mirror"),n.isDraggable&&e.push("fc-event-draggable"),(n.isStartResizable||n.isEndResizable)&&e.push("fc-event-resizable"),n.isDragging&&e.push("fc-event-dragging"),n.isResizing&&e.push("fc-event-resizing"),n.isSelected&&e.push("fc-event-selected"),n.isStart&&e.push("fc-event-start"),n.isEnd&&e.push("fc-event-end"),n.isPast&&e.push("fc-event-past"),n.isToday&&e.push("fc-event-today"),n.isFuture&&e.push("fc-event-future"),e}function $x(n){return n.instance?n.instance.instanceId:`${n.def.defId}:${n.range.start.toISOString()}`}function yk(n,e){let{def:t,instance:r}=n.eventRange,{url:a}=t;if(a)return{href:a};let{emitter:i,options:s}=e,{eventInteractive:o}=s;return o==null&&(o=t.interactive,o==null&&(o=!!i.hasHandlers("eventClick"))),o?Tge(l=>{i.trigger("eventClick",{el:l.target,event:new vr(e,t,r),jsEvent:l,view:e.viewApi})}):{}}function e6e(n,e,t){let r=t6e(n,e),{range:a}=r;if(!a.start)return null;if(!a.end){if(t==null)return null;a.end=e.add(a.start,t)}return r}function t6e(n,e){let{refined:t,extra:r}=Ox(n,X3e),a=t.start?e.createMarkerMeta(t.start):null,i=t.end?e.createMarkerMeta(t.end):null,{allDay:s}=t;return s==null&&(s=a&&a.isTimeUnspecified&&(!i||i.isTimeUnspecified)),Object.assign({range:{start:a?a.marker:null,end:i?i.marker:null},allDay:s},r)}function jV(n,e){return Rge(n.range,e.range)&&n.allDay===e.allDay&&r6e(n,e)}function r6e(n,e){for(let t in e)if(t!=="range"&&t!=="allDay"&&n[t]!==e[t])return!1;for(let t in n)if(!(t in e))return!1;return!0}function n6e(n,e){return Object.assign(Object.assign({},Uge(n.range,e,n.allDay)),{allDay:n.allDay})}function $V(n,e,t){return Object.assign(Object.assign({},Uge(n,e,t)),{timeZone:e.timeZone})}function Uge(n,e,t){return{start:e.toDate(n.start),end:e.toDate(n.end),startStr:e.formatIso(n.start,{omitTime:t}),endStr:e.formatIso(n.end,{omitTime:t})}}function a6e(n,e,t){let r=zx({editable:!1},t),a=sk(r.refined,r.extra,"",n.allDay,!0,t);return{def:a,ui:$ge(a,e),instance:hk(a.defId,n.range),range:n.range,isStart:!0,isEnd:!0}}function UV(n,e,t){let r=!1,a=function(o){r||(r=!0,e(o))},i=function(o){r||(r=!0,t(o))},s=n(a,i);s&&typeof s.then=="function"&&s.then(a,i)}function HV(n,e,t){n=n.toUpperCase();let r={method:n};return n==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(t):(r.body=new URLSearchParams(t),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(a=>{if(a.ok)return a.json().then(i=>[i,a],()=>{throw new jN("Failure parsing JSON",a)});throw new jN("Request failed",a)})}function VV(){return YH==null&&(YH=i6e()),YH}function i6e(){if(typeof document=="undefined")return!0;let n=document.createElement("div");n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.innerHTML="<table><tr><td><div></div></td></tr></table>",n.querySelector("table").style.height="100px",n.querySelector("div").style.height="100%",document.body.appendChild(n);let t=n.querySelector("div").offsetHeight>0;return document.body.removeChild(n),t}function Hge(n,e){return{component:n,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function Ux(n){return{[n.component.uid]:n}}function s6e(n){let e=nr(n),t=Kr(e,1);return{start:e,end:t}}function WV(n,e){return n.left>=e.left&&n.left<e.right&&n.top>=e.top&&n.top<e.bottom}function tR(n,e){let t={left:Math.max(n.left,e.left),right:Math.min(n.right,e.right),top:Math.max(n.top,e.top),bottom:Math.min(n.bottom,e.bottom)};return t.left<t.right&&t.top<t.bottom?t:!1}function qV(n,e){return{left:Math.min(Math.max(n.left,e.left),e.right),top:Math.min(Math.max(n.top,e.top),e.bottom)}}function GV(n){return{left:(n.left+n.right)/2,top:(n.top+n.bottom)/2}}function YV(n,e){return{left:n.left-e.left,top:n.top-e.top}}function o6e(n,e,t){let r=[];n&&r.push(n),e&&r.push(e);let a={"":RV(r)};return t&&Object.assign(a,t),a}function Hx(n,e,t,r){return{dow:n.getUTCDay(),isDisabled:!!(r&&(!r.activeRange||!ko(r.activeRange,n))),isOther:!!(r&&!ko(r.currentRange,n)),isToday:!!(e&&ko(e,n)),isPast:!!(t?n<t:e&&n<e.start),isFuture:!!(t?n>t:e&&n>=e.end)}}function vk(n,e){let t=["fc-day",`fc-day-${U4e[n.dow]}`];return n.isDisabled?t.push("fc-day-disabled"):(n.isToday&&(t.push("fc-day-today"),t.push(e.getClass("today"))),n.isPast&&t.push("fc-day-past"),n.isFuture&&t.push("fc-day-future"),n.isOther&&t.push("fc-day-other")),t}function Cc(n,e,t="day",r=!0){let{dateEnv:a,options:i,calendarApi:s}=n,o=a.format(e,t==="week"?c6e:l6e);if(i.navLinks){let l=a.toDate(e),c=d=>{let u=t==="day"?i.navLinkDayClick:t==="week"?i.navLinkWeekClick:null;typeof u=="function"?u.call(s,a.toDate(e),d):(typeof u=="string"&&(t=u),s.zoomTo(e,t))};return Object.assign({title:uk(i.navLinkHint,[o,l],o),"data-navlink":""},r?kge(c):{onClick:c})}return{"aria-label":o}}function Vge(){return ZH===null&&(ZH=d6e()),ZH}function d6e(){let n=document.createElement("div");wh(n,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),n.innerHTML="<div></div>",document.body.appendChild(n);let t=n.firstChild.getBoundingClientRect().left>n.getBoundingClientRect().left;return Rx(n),t}function Wge(){return QH||(QH=u6e()),QH}function u6e(){let n=document.createElement("div");n.style.overflow="scroll",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",document.body.appendChild(n);let e=qge(n);return document.body.removeChild(n),e}function qge(n){return{x:n.offsetHeight-n.clientHeight,y:n.offsetWidth-n.clientWidth}}function Gge(n,e=!1){let t=window.getComputedStyle(n),r=parseInt(t.borderLeftWidth,10)||0,a=parseInt(t.borderRightWidth,10)||0,i=parseInt(t.borderTopWidth,10)||0,s=parseInt(t.borderBottomWidth,10)||0,o=qge(n),l=o.y-r-a,c=o.x-i-s,d={borderLeft:r,borderRight:a,borderTop:i,borderBottom:s,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return Vge()&&t.direction==="rtl"?d.scrollbarLeft=l:d.scrollbarRight=l,e&&(d.paddingLeft=parseInt(t.paddingLeft,10)||0,d.paddingRight=parseInt(t.paddingRight,10)||0,d.paddingTop=parseInt(t.paddingTop,10)||0,d.paddingBottom=parseInt(t.paddingBottom,10)||0),d}function KV(n,e=!1,t){let r=t?n.getBoundingClientRect():Vx(n),a=Gge(n,e),i={left:r.left+a.borderLeft+a.scrollbarLeft,right:r.right-a.borderRight-a.scrollbarRight,top:r.top+a.borderTop,bottom:r.bottom-a.borderBottom-a.scrollbarBottom};return e&&(i.left+=a.paddingLeft,i.right-=a.paddingRight,i.top+=a.paddingTop,i.bottom-=a.paddingBottom),i}function Vx(n){let e=n.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function p6e(n){let e=rR(n),t=n.getBoundingClientRect();for(let r of e){let a=tR(t,r.getBoundingClientRect());if(a)t=a;else return null}return t}function rR(n){let e=[];for(;n instanceof HTMLElement;){let t=window.getComputedStyle(n);if(t.position==="fixed")break;/(auto|scroll)/.test(t.overflow+t.overflowY+t.overflowX)&&e.push(n),n=n.parentNode}return e}function AN(n,e){let t=n.length;if(t!==e.length)return!1;for(let r=0;r<t;r++)if(Math.round(n[r])!==Math.round(e[r]))return!1;return!0}function Mx(n){return n.span.end}function vc(n){return n.index+":"+n.span.start}function ZV(n){let e=[];for(let t of n){let r=[],a={span:t.span,entries:[t]};for(let i of e)Wx(i.span,a.span)?a={entries:i.entries.concat(a.entries),span:m6e(i.span,a.span)}:r.push(i);r.push(a),e=r}return e}function m6e(n,e){return{start:Math.min(n.start,e.start),end:Math.max(n.end,e.end)}}function Wx(n,e){let t=Math.max(n.start,e.start),r=Math.min(n.end,e.end);return t<r?{start:t,end:r}:null}function JH(n,e,t){n.splice(e,0,t)}function Ix(n,e,t){let r=0,a=n.length;if(!a||e<t(n[r]))return[0,0];if(e>t(n[a-1]))return[a,0];for(;r<a;){let i=Math.floor(r+(a-r)/2),s=t(n[i]);if(e<s)a=i;else if(e>s)r=i+1;else return[i,1]}return[r,0]}function qx(n){let{refined:e,extra:t}=Ox(n,f6e);return{startTime:e.startTime||null,duration:e.duration||null,create:e.create!=null?e.create:!0,sourceId:e.sourceId,leftoverProps:t}}function Yge(n,e){return!n||e>10?zt({weekday:"short"}):e>1?zt({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):zt({weekday:"long"})}function Zge(n){return n.text}function g6e(n,e,t){return n||Yge(e,t)}function MN(n,e){let t=n.activeRange;return e?t:{start:gc(t.start,n.slotMinTime.milliseconds),end:gc(t.end,n.slotMaxTime.milliseconds-864e5)}}function Gx(n,e,t){let{instances:r}=n.mutatedEvents;for(let a in r)if(!fk(e.validRange,r[a].range))return!1;return Qge({eventDrag:n},t)}function QV(n,e,t){return fk(e.validRange,n.range)?Qge({dateSelection:n},t):!1}function Qge(n,e){let t=e.getCurrentData(),r=Object.assign({businessHours:t.businessHours,dateSelection:"",eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},n);return(e.pluginHooks.isPropsValid||Jge)(r,e)}function Jge(n,e,t={},r){return!(n.eventDrag&&!y6e(n,e,t,r)||n.dateSelection&&!v6e(n,e,t,r))}function y6e(n,e,t,r){let a=e.getCurrentData(),i=n.eventDrag,s=i.mutatedEvents,o=s.defs,l=s.instances,c=BN(o,i.isEvent?n.eventUiBases:{"":a.selectionConfig});r&&(c=To(c,r));let d=B3e(n.eventStore,i.affectedEvents.instances),u=d.defs,p=d.instances,m=BN(u,n.eventUiBases);for(let f in l){let h=l[f],g=h.range,v=c[h.defId],k=o[h.defId];if(!Xge(v.constraints,g,d,n.businessHours,e))return!1;let{eventOverlap:T}=e.options,b=typeof T=="function"?T:null;for(let S in p){let C=p[S];if(ZN(g,C.range)&&(m[C.defId].overlap===!1&&i.isEvent||v.overlap===!1||b&&!b(new vr(e,u[C.defId],C),new vr(e,k,h))))return!1}let w=a.eventStore;for(let S of v.allows){let C=Object.assign(Object.assign({},t),{range:h.range,allDay:k.allDay}),x=w.defs[k.defId],E=w.instances[f],_;if(x?_=new vr(e,x,E):_=new vr(e,k),!S(zV(C,e),_))return!1}}return!0}function v6e(n,e,t,r){let a=n.eventStore,i=a.defs,s=a.instances,o=n.dateSelection,l=o.range,{selectionConfig:c}=e.getCurrentData();if(r&&(c=r(c)),!Xge(c.constraints,l,a,n.businessHours,e))return!1;let{selectOverlap:d}=e.options,u=typeof d=="function"?d:null;for(let p in s){let m=s[p];if(ZN(l,m.range)&&(c.overlap===!1||u&&!u(new vr(e,i[m.defId],m),null)))return!1}for(let p of c.allows){let m=Object.assign(Object.assign({},t),o);if(!p(zV(m,e),null))return!1}return!0}function Xge(n,e,t,r,a){for(let i of n)if(!T6e(k6e(i,e,t,r,a),e))return!1;return!0}function k6e(n,e,t,r,a){return n==="businessHours"?XH(mh(r,e,a)):typeof n=="string"?XH(XN(t,i=>i.groupId===n)):typeof n=="object"&&n?XH(mh(n,e,a)):[]}function XH(n){let{instances:e}=n,t=[];for(let r in e)t.push(e[r].range);return t}function T6e(n,e){for(let t of n)if(fk(t,e))return!0;return!1}function eye(n){let e=yge(n,".fc-scrollgrid-shrink"),t=0;for(let r of e)t=Math.max(t,L4e(r));return Math.ceil(t)}function JV(n,e){return n.liquid&&e.liquid}function tye(n,e){return e.maxHeight!=null||JV(n,e)}function rye(n,e,t,r){let{expandRows:a}=t;return typeof e.content=="function"?e.content(t):P("table",{role:"presentation",className:[e.tableClassName,n.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:t.tableMinWidth,width:t.clientWidth,height:a?t.clientHeight:""}},t.tableColGroupNode,P(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(t):e.rowContent))}function nye(n,e){return Tc(n,e,Va)}function aye(n,e){let t=[];for(let r of n){let a=r.span||1;for(let i=0;i<a;i+=1)t.push(P("col",{style:{width:r.width==="shrink"?iye(e):r.width||"",minWidth:r.minWidth||""}}))}return P("colgroup",{},...t)}function iye(n){return n==null?4:n}function sye(n){for(let e of n)if(e.width==="shrink")return!0;return!1}function oye(n,e){let t=["fc-scrollgrid",e.theme.getClass("table")];return n&&t.push("fc-scrollgrid-liquid"),t}function lye(n,e){let t=["fc-scrollgrid-section",`fc-scrollgrid-section-${n.type}`,n.className];return e&&n.liquid&&n.maxHeight==null&&t.push("fc-scrollgrid-section-liquid"),n.isSticky&&t.push("fc-scrollgrid-section-sticky"),t}function Tk(n){return P("div",{className:"fc-scrollgrid-sticky-shim",style:{width:n.clientWidth,minWidth:n.tableMinWidth}})}function xh(n){let{stickyHeaderDates:e}=n;return(e==null||e==="auto")&&(e=n.height==="auto"||n.viewHeight==="auto"),e}function Yx(n){let{stickyFooterScrollbar:e}=n;return(e==null||e==="auto")&&(e=n.height==="auto"||n.viewHeight==="auto"),e}function b6e(n,e){for(let t of n)if(t.key===e)return t;return null}function w6e(n){return P("div",{className:"fc-event-main-frame"},n.timeText&&P("div",{className:"fc-event-time"},n.timeText),P("div",{className:"fc-event-title-container"},P("div",{className:"fc-event-title fc-sticky"},n.event.title||P(Ot,null," "))))}function bk(n){return!!(n.dayCellContent||oV("dayCellContent",n))}function C6e(n){let{date:e,dateEnv:t,dateProfile:r,isMonthStart:a}=n,i=Hx(e,n.todayRange,null,r),s=n.showDayNumber?t.format(e,a?n.monthStartFormat:S6e):"";return Object.assign(Object.assign(Object.assign({date:t.toDate(e),view:n.viewApi},i),{isMonthStart:a,dayNumberText:s}),n.extraRenderProps)}function x6e(n){let{title:e}=n.event;return e&&P("div",{className:"fc-event-title"},n.event.title)}function Zx(n){return P("div",{className:`fc-${n}`})}function E6e(n){return n.text}function D6e(n){return n.text}function pge(n){if(n.allDayDate)return{start:n.allDayDate,end:Kr(n.allDayDate,1)};let{hiddenSegs:e}=n;return{start:nR(e),end:A6e(e)}}function nR(n){return n.reduce(P6e).eventRange.range.start}function P6e(n,e){return n.eventRange.range.start<e.eventRange.range.start?n:e}function A6e(n){return n.reduce(M6e).eventRange.range.end}function M6e(n,e){return n.eventRange.range.end>e.eventRange.range.end?n:e}var mge,tV,WH,N4e,uh,R4e,ege,tge,rge,nge,O4e,U4e,GH,_N,DN,Q4e,J4e,X4e,e3e,rV,nV,aV,CV,wc,xV,EV,qp,Dge,LN,c3e,Age,iV,h3e,Tx,eu,sV,ON,bo,yc,Tt,wx,AV,gn,As,ph,RN,Fge,E3e,zN,N3e,_3e,tu,H3e,zp,vr,X3e,jN,YH,xx,hl,Ch,$i,Ex,KH,Dx,l6e,c6e,ZH,QH,gl,hh,Px,Ax,On,gh,Nx,kk,f6e,Kge,$N,h6e,UN,ru,yh,vh,kh,IN,lk,Ui,Up,nu,Hp,Kx,S6e,Vp,Th,Qx,eV,cV,dV,bh,XV=y(()=>{Jd();Jd();yx();mge=[],tV=new Map;typeof document!="undefined"&&hge(document);N4e=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';kc(N4e);uh=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:r}=this;e in r&&(t?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}};R4e=/(top|left|right|bottom|width|height)$/i;ege=0;tge=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];rge=0;nge=["years","months","days","milliseconds"],O4e=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;U4e=["sun","mon","tue","wed","thu","fri","sat"];GH={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},_N={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},DN=/\s*([ap])\.?m\.?/i,Q4e=/,/g,J4e=/\s+/g,X4e=/\u200e/g,e3e=/UTC|GMT/,rV=class{constructor(e){let t={},r={},a=9;for(let i in e)i in GH?(r[i]=e[i],GH[i]<9&&(a=Math.min(GH[i],a))):(t[i]=e[i],i in _N&&(a=Math.min(_N[i],a)));this.standardDateProps=t,this.extendedSettings=r,this.smallestUnitNum=a,this.buildFormattingFunc=Ae(oge)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,r,a){let{standardDateProps:i,extendedSettings:s}=this,o=s3e(e.marker,t.marker,r.calendarSystem);if(!o)return this.format(e,r);let l=o;l>1&&(i.year==="numeric"||i.year==="2-digit")&&(i.month==="numeric"||i.month==="2-digit")&&(i.day==="numeric"||i.day==="2-digit")&&(l=1);let c=this.format(e,r),d=this.format(t,r);if(c===d)return c;let u=o3e(i,l),p=oge(u,s,r),m=p(e),f=p(t),h=l3e(c,m,d,f),g=s.separator||a||r.defaultSeparator||"";return h?h.before+m+g+f+h.after:c+g+d}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}};nV=class{constructor(e){this.cmdStr=e}format(e,t,r){return t.cmdFormatter(this.cmdStr,FN(e,null,t,r))}formatRange(e,t,r,a){return r.cmdFormatter(this.cmdStr,FN(e,t,r,a))}},aV=class{constructor(e){this.func=e}format(e,t,r){return this.func(FN(e,null,t,r))}formatRange(e,t,r,a){return this.func(FN(e,t,r,a))}};CV={navLinkDayClick:B,navLinkWeekClick:B,duration:lt,bootstrapFontAwesome:B,buttonIcons:B,customButtons:B,defaultAllDayEventDuration:lt,defaultTimedEventDuration:lt,nextDayThreshold:lt,scrollTime:lt,scrollTimeReset:Boolean,slotMinTime:lt,slotMaxTime:lt,dayPopoverFormat:zt,slotDuration:lt,snapDuration:lt,headerToolbar:B,footerToolbar:B,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:zt,dayHeaderClassNames:B,dayHeaderContent:B,dayHeaderDidMount:B,dayHeaderWillUnmount:B,dayCellClassNames:B,dayCellContent:B,dayCellDidMount:B,dayCellWillUnmount:B,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:B,weekNumbers:Boolean,weekNumberClassNames:B,weekNumberContent:B,weekNumberDidMount:B,weekNumberWillUnmount:B,editable:Boolean,viewClassNames:B,viewDidMount:B,viewWillUnmount:B,nowIndicator:Boolean,nowIndicatorSnap:B,nowIndicatorClassNames:B,nowIndicatorContent:B,nowIndicatorDidMount:B,nowIndicatorWillUnmount:B,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:B,locale:B,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:B,eventOrder:bge,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:B,contentHeight:B,direction:String,weekNumberFormat:zt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:B,initialDate:B,now:B,eventDataTransform:B,stickyHeaderDates:B,stickyFooterScrollbar:B,viewHeight:B,defaultAllDay:Boolean,eventSourceFailure:B,eventSourceSuccess:B,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:B,eventConstraint:B,eventAllow:B,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:B,eventContent:B,eventDidMount:B,eventWillUnmount:B,selectConstraint:B,selectOverlap:B,selectAllow:B,droppable:Boolean,unselectCancel:String,slotLabelFormat:B,slotLaneClassNames:B,slotLaneContent:B,slotLaneDidMount:B,slotLaneWillUnmount:B,slotLabelClassNames:B,slotLabelContent:B,slotLabelDidMount:B,slotLabelWillUnmount:B,dayMaxEvents:B,dayMaxEventRows:B,dayMinWidth:Number,slotLabelInterval:lt,allDayText:String,allDayClassNames:B,allDayContent:B,allDayDidMount:B,allDayWillUnmount:B,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:zt,rerenderDelay:Number,moreLinkText:B,moreLinkHint:B,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:B,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:lt,hiddenDays:B,fixedWeekCount:Boolean,validRange:B,visibleRange:B,titleFormat:B,eventInteractive:Boolean,noEventsText:String,viewHint:B,navLinkHint:B,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:B,moreLinkClassNames:B,moreLinkContent:B,moreLinkDidMount:B,moreLinkWillUnmount:B,monthStartFormat:zt,handleCustomRendering:B,customRenderingMetaMap:B,customRenderingReplaces:Boolean},wc={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},nowIndicatorSnap:"auto"},xV={datesSet:B,eventsSet:B,eventAdd:B,eventChange:B,eventRemove:B,windowResize:B,eventClick:B,eventMouseEnter:B,eventMouseLeave:B,select:B,unselect:B,loading:B,_unmount:B,_beforeprint:B,_afterprint:B,_noEventDrop:B,_noEventResize:B,_resize:B,_scrollRequest:B},EV={buttonText:B,buttonHints:B,views:B,plugins:B,initialEvents:B,events:B,eventSources:B},qp={headerToolbar:ch,footerToolbar:ch,buttonText:ch,buttonHints:ch,buttonIcons:ch,dateIncrement:ch,plugins:PN,events:PN,eventSources:PN,resources:PN};Dge={type:String,component:B,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:B,usesMinMaxTime:Boolean,classNames:B,content:B,didMount:B,willUnmount:B};({hasOwnProperty:LN}=Object.prototype);c3e=/^on[A-Z]/;Age={};iV=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return ji(e)}markerToArray(e){return Bp(e)}};m3e("gregory",iV);h3e=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;Tx=class{constructor(e){let t=this.timeZone=e.timeZone,r=t!=="local"&&t!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=f3e(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):ji(ige(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let t=null;return typeof e=="number"?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=ji(e)),t===null||!bV(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=Mge(e);if(t===null)return null;let{marker:r}=t,a=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-t.timeZoneOffset*60*1e3):a=t.timeZoneOffset),{marker:r,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:a}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let r=this.calendarSystem.markerToArray(e);return r[0]+=t.years,r[1]+=t.months,r[2]+=t.days,r[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,t){let r=this.calendarSystem.markerToArray(e);return r[0]-=t.years,r[1]-=t.months,r[2]-=t.days,r[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,t){let r=this.calendarSystem.markerToArray(e);return r[0]+=t,this.calendarSystem.arrayToMarker(r)}addMonths(e,t){let r=this.calendarSystem.markerToArray(e);return r[1]+=t,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,t){let{calendarSystem:r}=this;return jp(e)===jp(t)&&r.getMarkerDay(e)===r.getMarkerDay(t)&&r.getMarkerMonth(e)===r.getMarkerMonth(t)?r.getMarkerYear(t)-r.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:r}=this;return jp(e)===jp(t)&&r.getMarkerDay(e)===r.getMarkerDay(t)?r.getMarkerMonth(t)-r.getMarkerMonth(e)+(r.getMarkerYear(t)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let r=this.diffWholeYears(e,t);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,t),r!==null?{unit:"month",value:r}:(r=Ege(e,t),r!==null?{unit:"week",value:r}:(r=ik(e,t),r!==null?{unit:"day",value:r}:(r=H4e(e,t),vx(r)?{unit:"hour",value:r}:(r=V4e(e,t),vx(r)?{unit:"minute",value:r}:(r=W4e(e,t),vx(r)?{unit:"second",value:r}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,r){let a;return r.years&&(a=this.diffWholeYears(e,t),a!==null)?a/j4e(r):r.months&&(a=this.diffWholeMonths(e,t),a!==null)?a/$4e(r):r.days&&(a=ik(e,t),a!==null)?a/ak(r):(t.valueOf()-e.valueOf())/Ps(r)}startOf(e,t){return t==="year"?this.startOfYear(e):t==="month"?this.startOfMonth(e):t==="week"?this.startOfWeek(e):t==="day"?nr(e):t==="hour"?q4e(e):t==="minute"?G4e(e):t==="second"?Y4e(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):K4e(e,this.weekDow,this.weekDoy)}format(e,t,r={}){return t.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,r,a={}){return a.isEndExclusive&&(t=gc(t,-1)),r.formatRange({marker:e,timeZoneOffset:a.forcedStartTzo!=null?a.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:a.forcedEndTzo!=null?a.forcedEndTzo:this.offsetForMarker(t)},this,a.defaultSeparator)}formatIso(e,t={}){let r=null;return t.omitTimeZoneOffset||(t.forcedTzo!=null?r=t.forcedTzo:r=this.offsetForMarker(e)),qN(e,r,t.omitTime)}timestampToMarker(e){return this.timeZone==="local"?ji(ige(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):ji(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-sge(Bp(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Bp(e)):null}toDate(e,t){return this.timeZone==="local"?sge(Bp(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Bp(e))*1e3*60):new Date(e.valueOf()-(t||0))}},eu=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,r;if(typeof e=="object"&&e){t=Object.assign({},this.iconClasses);for(r in e)t[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let r;return t&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}};eu.prototype.classes={};eu.prototype.iconClasses={};eu.prototype.baseIconClass="";eu.prototype.iconOverridePrefix="";sV=class extends Ta{render(){return P("div",{})}componentDidMount(){this.setState({})}};ON=class{constructor(e,t,r,a){this.execFunc=e,this.emitter=t,this.scrollTime=r,this.scrollTimeReset=a,this.handleScrollRequest=i=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},i),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},bo=Ige({});yc=class extends Ta{shouldComponentUpdate(e,t){return!NN(this.props,e,this.propEquality)||!NN(this.state,t,this.stateEquality)}safeSetState(e){NN(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};yc.addPropsEquality=g3e;yc.addStateEquality=y3e;yc.contextType=bo;yc.prototype.propEquality={};yc.prototype.stateEquality={};Tt=class extends yc{};Tt.contextType=bo;wx=class extends Tt{constructor(){super(...arguments),this.id=au(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:r}=this.props;(!t.customRenderingReplaces||!oV(r,t))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Ms(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:r}=t,{customGenerator:a,defaultGenerator:i,renderProps:s}=e,o=PV(e,[],this.handleEl),l=!1,c,d=[],u;if(a!=null){let p=typeof a=="function"?a(s,P):a;if(p===!0)l=!0;else{let m=p&&typeof p=="object";m&&"html"in p?o.dangerouslySetInnerHTML={__html:p.html}:m&&"domNodes"in p?d=Array.prototype.slice.call(p.domNodes):(m?OH(p):typeof p!="function")?c=p:u=p}}else l=!oV(e.generatorName,r);return l&&i&&(c=i(s)),this.queuedDomNodes=d,this.currentGeneratorMeta=u,P(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;let{props:r,context:a}=this,{handleCustomRendering:i,customRenderingMetaMap:s}=a.options;if(i){let o=(t=this.currentGeneratorMeta)!==null&&t!==void 0?t:s==null?void 0:s[r.generatorName];o&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:o},r),{elClasses:(r.elClasses||[]).filter(v3e)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,r=this.base;if(!Tc(e,t)){t.forEach(Rx);for(let a of e)r.appendChild(a);this.currentDomNodes=e}}};wx.addPropsEquality({elClasses:Tc,elStyle:Va,elAttrs:d3e,renderProps:Va});AV=Ige(0),gn=class extends Ta{constructor(){super(...arguments),this.InnerContent=k3e.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Ms(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=T3e(e.classNameGenerator,e.renderProps);if(e.children){let r=PV(e,t,this.handleEl),a=e.children(this.InnerContent,e.renderProps,r);return e.elTag?P(e.elTag,r,a):a}else return P(wx,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)===null||t===void 0||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)===null||t===void 0||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};gn.contextType=AV;As=class extends Tt{render(){let{props:e,context:t}=this,{options:r}=t,a={view:t.viewApi};return P(gn,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...MV(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:a,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount},()=>e.children)}};ph=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,r){let{dateEnv:a}=this.props,i=a.subtract(a.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,r)}buildNext(e,t,r){let{dateEnv:a}=this.props,i=a.add(a.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,r)}build(e,t,r=!0){let{props:a}=this,i,s,o,l,c,d;return i=this.buildValidRange(),i=this.trimHiddenDays(i),r&&(e=S3e(e,i)),s=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(s.unit),l=this.buildRenderRange(this.trimHiddenDays(s.range),s.unit,o),l=this.trimHiddenDays(l),c=l,a.showNonCurrentDates||(c=fi(c,s.range)),c=this.adjustActiveRange(c),c=fi(c,i),d=ZN(s.range,i),ko(l,e)||(e=l.start),{currentDate:e,validRange:i,currentRange:s.range,currentRangeUnit:s.unit,isRangeAllDay:o,activeRange:c,renderRange:l,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,isValid:d,dateIncrement:this.buildDateIncrement(s.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e=="function"?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:r}=this,a=null,i=null,s=null,o;return r.duration?(a=r.duration,i=r.durationUnit,s=this.buildRangeFromDuration(e,t,a,i)):(o=this.props.dayCount)?(i="day",s=this.buildRangeFromDayCount(e,t,o)):(s=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(a=this.getFallbackDuration(),i=kx(a).unit,s=this.buildRangeFromDuration(e,t,a,i)),{duration:a,unit:i,range:s}}getFallbackDuration(){return lt({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:r,slotMinTime:a,slotMaxTime:i}=this.props,{start:s,end:o}=e;return r&&(ak(a)<0&&(s=nr(s),s=t.add(s,a)),ak(i)>1&&(o=nr(o),o=Kr(o,-1),o=t.add(o,i))),{start:s,end:o}}buildRangeFromDuration(e,t,r,a){let{dateEnv:i,dateAlignment:s}=this.props,o,l,c;if(!s){let{dateIncrement:u}=this.props;u&&Ps(u)<Ps(r)?s=kx(u).unit:s=a}ak(r)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=nr(o));function d(){o=i.startOf(e,s),l=i.add(o,r),c={start:o,end:l}}return d(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),d()),c}buildRangeFromDayCount(e,t,r){let{dateEnv:a,dateAlignment:i}=this.props,s=0,o=e,l;i&&(o=a.startOf(o,i)),o=nr(o),o=this.skipHiddenDays(o,t),l=o;do l=Kr(l,1),this.isHiddenDay(l)||(s+=1);while(s<r);return{start:o,end:l}}buildCustomVisibleRange(e){let{props:t}=this,r=t.visibleRangeInput,a=typeof r=="function"?r.call(t.calendarApi,t.dateEnv.toDate(e)):r,i=this.refineRange(a);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,r){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,r;return t||((r=this.props.dateAlignment)?lt(1,r):e||lt({days:1}))}refineRange(e){if(e){let t=b3e(e,this.props.dateEnv);return t&&(t=QN(t)),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],r=0,a;for(this.props.weekends===!1&&e.push(0,6),a=0;a<7;a+=1)(t[a]=e.indexOf(a)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:r}=e;return t&&(t=this.skipHiddenDays(t)),r&&(r=this.skipHiddenDays(r,-1,!0)),t==null||r==null||t<r?{start:t,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?t:0)+7)%7];)e=Kr(e,t);return e}};RN={id:String,groupId:String,title:String,url:String,interactive:Boolean},Fge={start:B,end:B,date:B,allDay:Boolean},E3e=Object.assign(Object.assign(Object.assign({},RN),Fge),{extendedProps:B});zN={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:B,overlap:B,allow:B,className:lV,classNames:lV,color:String,backgroundColor:String,borderColor:String,textColor:String},N3e={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};_3e={id:String,defaultAllDay:Boolean,url:String,format:String,events:B,eventDataTransform:B,success:B,failure:B};tu=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){$3e(this.handlers,e,t)}off(e,t){U3e(this.handlers,e,t)}trigger(e,...t){let r=this.handlers[e]||[],a=this.options&&this.options[e],i=[].concat(a||[],r);for(let s of i)s.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};H3e={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};zp=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},vr=class n{constructor(e,t,r){this._context=e,this._def=t,this._instance=r||null}setProp(e,t){if(e in Fge)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")t=RN[e](t),this.mutate({standardProps:{publicId:t}});else if(e in RN)t=RN[e](t),this.mutate({standardProps:{[e]:t}});else if(e in zN){let r=zN[e](t);e==="color"?r={backgroundColor:t,borderColor:t}:e==="editable"?r={startEditable:t,durationEditable:t}:r={[e]:t},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:r}=this._context,a=r.createMarker(e);if(a&&this._instance){let i=this._instance.range,s=$p(i.start,a,r,t.granularity);t.maintainDuration?this.mutate({datesDelta:s}):this.mutate({startDelta:s})}}setEnd(e,t={}){let{dateEnv:r}=this._context,a;if(!(e!=null&&(a=r.createMarker(e),!a))&&this._instance)if(a){let i=$p(this._instance.range.end,a,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,r={}){let{dateEnv:a}=this._context,i={allDay:r.allDay},s=a.createMarker(e),o;if(s&&!(t!=null&&(o=a.createMarker(t),!o))&&this._instance){let l=this._instance.range;r.allDay===!0&&(l=_ge(l));let c=$p(l.start,s,a,r.granularity);if(o){let d=$p(l.end,o,a,r.granularity);B4e(c,d)?this.mutate({datesDelta:c,standardProps:i}):this.mutate({startDelta:c,endDelta:d,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:c,standardProps:i})}}moveStart(e){let t=lt(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=lt(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=lt(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let r={allDay:e},{maintainDuration:a}=t;a==null&&(a=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=a),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:t}=this._context,r=this._instance,a=zt(e);return this._def.hasEnd?t.formatRange(r.range.start,r.range.end,a,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):t.format(r.range.start,a,{forcedTzo:r.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let r=this._def,a=this._context,{eventStore:i}=a.getCurrentData(),s=Bx(i,t.instanceId);s=jx(s,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,a);let l=new n(a,r,t);this._def=s.defs[r.defId],this._instance=s.instances[t.instanceId],a.dispatch({type:"MERGE_EVENTS",eventStore:s}),a.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:Sc(s,a,t),revert(){a.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=jge(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new zp(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:r}=t,{startStr:a,endStr:i}=this,s={allDay:t.allDay};return t.title&&(s.title=t.title),a&&(s.start=a),i&&(s.end=i),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),r.display&&r.display!=="auto"&&(s.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?s.color=r.backgroundColor:(r.backgroundColor&&(s.backgroundColor=r.backgroundColor),r.borderColor&&(s.borderColor=r.borderColor)),r.textColor&&(s.textColor=r.textColor),r.classNames.length&&(s.classNames=r.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(s,t.extendedProps):s.extendedProps=t.extendedProps),s}toJSON(){return this.toPlainObject()}};X3e={start:B,end:B,allDay:Boolean};jN=class extends Error{constructor(e,t){super(e),this.response=t}};xx=class extends Tt{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{bx(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{bx(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:r}=this.state,a=r||t.height==="auto"||t.contentHeight==="auto",i=!a&&t.height!=null?t.height:"",s=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return VV()||s.push("fc-liquid-hack"),e.children(s,i,a,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}},hl=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};Ch={},$i=class extends Ta{constructor(e,t){super(e,t),this.handleRefresh=()=>{let r=this.computeTiming();r.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(r.state),this.clearTimeout(),this.setTimeout(r.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,r=t.nowManager.getDateMarker(),{nowIndicatorSnap:a}=t.options;a==="auto"&&(a=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,s;return a?(i=t.dateEnv.startOf(r,e.unit),s=t.dateEnv.add(i,lt(1,e.unit)).valueOf()-r.valueOf()):(i=r,s=1e3*60),s=Math.min(1e3*60*60*24,s),{state:{nowDate:i,todayRange:s6e(i)},waitMs:s}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let t=this.computeTiming();this.setState(t.state,()=>{this.setTimeout(t.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};$i.contextType=bo;Ex=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,t){let r=this.getCurrentData(),a;t=t||"day",a=r.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),a?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:a.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:r}=this.getCurrentData(),a=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),i,s;for(let o in t)a.push(o);for(i=0;i<a.length;i+=1)if(s=t[a[i]],s&&s.singleUnit===e)return s;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),r=lt(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),zt(t))}formatRange(e,t,r){let{dateEnv:a}=this.getCurrentData();return a.formatRange(a.createMarker(e),a.createMarker(t),zt(r),r)}formatIso(e,t){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:t})}select(e,t){let r;t==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:t};let a=this.getCurrentData(),i=e6e(r,a.dateEnv,lt({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),eR(i,null,a))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),W3e(e,t))}addEvent(e,t){if(e instanceof vr){let s=e._def,o=e._instance;return this.getCurrentData().eventStore.defs[s.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:fh({def:s,instance:o})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),a;if(t instanceof zp)a=t.internalEventSource;else if(typeof t=="boolean")t&&([a]=KN(r.eventSources));else if(t!=null){let s=this.getEventSourceById(t);if(!s)return console.warn(`Could not find an event source with ID "${t}"`),null;a=s.internalEventSource}let i=Lge(e,a,r,!1);if(i){let s=new vr(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:fh(i)}),this.triggerEventAdd(s),s}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:jge(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:r,instances:a}=t.eventStore;e=String(e);for(let i in r){let s=r[i];if(s.publicId===e){if(s.recurringDef)return new vr(t,s,null);for(let o in a){let l=a[o];if(l.defId===s.defId)return new vr(t,s,l)}}}return null}getEvents(){let e=this.getCurrentData();return Sc(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,r=[];for(let a in t)r.push(new zp(e,t[a]));return r}getEventSourceById(e){let t=this.getCurrentData(),r=t.eventSources;e=String(e);for(let a in r)if(r[a].publicId===e)return new zp(t,r[a]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof zp)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=_V(e,t);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new zp(t,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=lt(e);t&&this.trigger("_scrollRequest",{time:t})}};KH=Kn(),Dx=class{constructor(){this.getKeysForEventDefs=Ae(this._getKeysForEventDefs),this.splitDateSelection=Ae(this._splitDateSpan),this.splitEventStore=Ae(this._splitEventStore),this.splitIndividualUi=Ae(this._splitIndividualUi),this.splitEventDrag=Ae(this._splitInteraction),this.splitEventResize=Ae(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),a=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),o=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=To(t,(d,u)=>this.eventUiBuilders[u]||Ae(o6e));for(let d in t){let u=t[d],p=s[d]||KH,m=this.eventUiBuilders[d];c[d]={businessHours:u.businessHours||e.businessHours,dateSelection:a[d]||null,eventStore:p,eventUiBases:m(e.eventUiBases[""],u.ui,i[d]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[d]||null,eventResize:l[d]||null}}return c}_splitDateSpan(e){let t={};if(e){let r=this.getKeysForDateSpan(e);for(let a of r)t[a]=e}return t}_getKeysForEventDefs(e){return To(e.defs,t=>this.getKeysForEventDef(t))}_splitEventStore(e,t){let{defs:r,instances:a}=e,i={};for(let s in r)for(let o of t[s])i[o]||(i[o]=Kn()),i[o].defs[s]=r[s];for(let s in a){let o=a[s];for(let l of t[o.defId])i[l]&&(i[l].instances[s]=o)}return i}_splitIndividualUi(e,t){let r={};for(let a in e)if(a)for(let i of t[a])r[i]||(r[i]={}),r[i][a]=e[a];return r}_splitInteraction(e){let t={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),a=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,a),s=o=>{t[o]||(t[o]={affectedEvents:r[o]||KH,mutatedEvents:i[o]||KH,isEvent:e.isEvent})};for(let o in r)s(o);for(let o in i)s(o)}return t}};l6e=zt({year:"numeric",month:"long",day:"numeric"}),c6e=zt({week:"long"});ZH=null;gl=class{constructor(e,t,r,a){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(i.left),a&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],r=[];for(let a of this.els){let i=a.getBoundingClientRect();t.push(i.left-e),r.push(i.right-e)}this.lefts=t,this.rights=r}buildElVerticals(e){let t=[],r=[];for(let a of this.els){let i=a.getBoundingClientRect();t.push(i.top-e),r.push(i.bottom-e)}this.tops=t,this.bottoms=r}leftToIndex(e){let{lefts:t,rights:r}=this,a=t.length,i;for(i=0;i<a;i+=1)if(e>=t[i]&&e<r[i])return i}topToIndex(e){let{tops:t,bottoms:r}=this,a=t.length,i;for(i=0;i<a;i+=1)if(e>=t[i]&&e<r[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return AN(this.tops||[],e.tops||[])&&AN(this.bottoms||[],e.bottoms||[])&&AN(this.lefts||[],e.lefts||[])&&AN(this.rights||[],e.rights||[])}};hh=class{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}},Px=class extends hh{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}},Ax=class extends hh{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}},On=class extends Tt{constructor(){super(...arguments),this.uid=au()}prepareHits(){}queryHit(e,t,r,a){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!Yn(e,".fc-event-mirror")}isValidDateDownEl(e){return!Yn(e,".fc-event:not(.fc-bg-event)")&&!Yn(e,".fc-more-link")&&!Yn(e,"a[data-navlink]")&&!Yn(e,".fc-popover")}},gh=class{constructor(e=t=>t.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let r of e)this.insertEntry(r,t);return t}insertEntry(e,t){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,r){if(this.allowReslicing&&e.touchingEntry){let a=Object.assign(Object.assign({},t),{span:Wx(t.span,e.touchingEntry.span)});r.push(a),this.splitEntry(t,e.touchingEntry,r)}else r.push(t)}splitEntry(e,t,r){let a=e.span,i=t.span;a.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:a.start,end:i.start}},r),a.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:a.end}},r)}insertEntryAt(e,t){let{entriesByLevel:r,levelCoords:a}=this;t.lateral===-1?(JH(a,t.level,t.levelCoord),JH(r,t.level,[e])):JH(r[t.level],t.lateral,e),this.stackCnts[vc(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:r,strictOrder:a,stackCnts:i}=this,s=t.length,o=0,l=-1,c=-1,d=null,u=0;for(let f=0;f<s;f+=1){let h=t[f];if(!a&&h>=o+this.getEntryThickness(e))break;let g=r[f],v,k=Ix(g,e.span.start,Mx),T=k[0]+k[1];for(;(v=g[T])&&v.span.start<e.span.end;){let b=h+this.getEntryThickness(v);b>o&&(o=b,d=v,l=f,c=T),b===o&&(u=Math.max(u,i[vc(v)]+1)),T+=1}}let p=0;if(d)for(p=l+1;p<s&&t[p]<o;)p+=1;let m=-1;return p<s&&t[p]===o&&(m=Ix(r[p],e.span.end,Mx)[0]),{touchingLevel:l,touchingLateral:c,touchingEntry:d,stackCnt:u,levelCoord:o,level:p,lateral:m}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,r=e.length,a=[];for(let i=0;i<r;i+=1){let s=e[i],o=t[i];for(let l of s)a.push(Object.assign(Object.assign({},l),{thickness:this.getEntryThickness(l),levelCoord:o}))}return a}};Nx=class{constructor(e,t){this.emitter=new tu}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}},kk={},f6e={startTime:lt,duration:lt,create:Boolean,sourceId:String};Kge="fc-col-header-cell";$N=class extends Tt{render(){let{dateEnv:e,options:t,theme:r,viewApi:a}=this.context,{props:i}=this,{date:s,dateProfile:o}=i,l=Hx(s,i.todayRange,null,o),c=[Kge].concat(vk(l,r)),d=e.format(s,i.dayHeaderFormat),u=!l.isDisabled&&i.colCnt>1?Cc(this.context,s):{},p=e.toDate(s);e.namedTimeZoneImpl&&(p=gc(p,36e5));let m=Object.assign(Object.assign(Object.assign({date:p,view:a},i.extraRenderProps),{text:d}),l);return P(gn,{elTag:"th",elClasses:c,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":l.isDisabled?void 0:Wp(s)},i.extraDataAttrs),renderProps:m,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Zge,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},f=>P("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&P(f,{elTag:"a",elAttrs:u,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]})))}},h6e=zt({weekday:"long"}),UN=class extends Tt{render(){let{props:e}=this,{dateEnv:t,theme:r,viewApi:a,options:i}=this.context,s=Kr(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=t.format(s,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:s},o),{view:a}),e.extraRenderProps),{text:l});return P(gn,{elTag:"th",elClasses:[Kge,...vk(o,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Zge,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},d=>P("div",{className:"fc-scrollgrid-sync-inner"},P(d,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(s,h6e)}})))}},ru=class extends Tt{constructor(){super(...arguments),this.createDayHeaderFormatter=Ae(g6e)}render(){let{context:e}=this,{dates:t,dateProfile:r,datesRepDistinctDays:a,renderIntro:i}=this.props,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,a,t.length);return P($i,{unit:"day"},(o,l)=>P("tr",{role:"row"},i&&i("day"),t.map(c=>a?P($N,{key:c.toISOString(),date:c,dateProfile:r,todayRange:l,colCnt:t.length,dayHeaderFormat:s}):P(UN,{key:c.getUTCDay(),dow:c.getUTCDay(),dayHeaderFormat:s}))))}};yh=class{constructor(e,t){let r=e.start,{end:a}=e,i=[],s=[],o=-1;for(;r<a;)t.isHiddenDay(r)?i.push(o+.5):(o+=1,i.push(o),s.push(r)),r=Kr(r,1);this.dates=s,this.indices=i,this.cnt=s.length}sliceRange(e){let t=this.getDateDayIndex(e.start),r=this.getDateDayIndex(Kr(e.end,-1)),a=Math.max(0,t),i=Math.min(this.cnt-1,r);return a=Math.ceil(a),i=Math.floor(i),a<=i?{firstIndex:a,lastIndex:i,isStart:t===a,isEnd:r===i}:null}getDateDayIndex(e){let{indices:t}=this,r=Math.floor(bc(this.dates[0],e));return r<0?t[0]-1:r>=t.length?t[t.length-1]+1:t[r]}},vh=class{constructor(e,t){let{dates:r}=e,a,i,s;if(t){for(i=r[0].getUTCDay(),a=1;a<r.length&&r[a].getUTCDay()!==i;a+=1);s=Math.ceil(r.length/a)}else s=1,a=r.length;this.rowCnt=s,this.colCnt=a,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let r=[];for(let a=0;a<this.colCnt;a+=1)r.push(this.buildCell(t,a));e.push(r)}return e}buildCell(e,t){let r=this.daySeries.dates[e*this.colCnt+t];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,r=this.daySeries.sliceRange(e),a=[];if(r){let{firstIndex:i,lastIndex:s}=r,o=i;for(;o<=s;){let l=Math.floor(o/t),c=Math.min((l+1)*t,s+1);a.push({row:l,firstCol:o%t,lastCol:(c-1)%t,isStart:r.isStart&&o===i,isEnd:r.isEnd&&c-1===s}),o=c}}return a}},kh=class{constructor(){this.sliceBusinessHours=Ae(this._sliceBusinessHours),this.sliceDateSelection=Ae(this._sliceDateSpan),this.sliceEventStore=Ae(this._sliceEventStore),this.sliceEventDrag=Ae(this._sliceInteraction),this.sliceEventResize=Ae(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,r,a,...i){let{eventUiBases:s}=e,o=this.sliceEventStore(e.eventStore,s,t,r,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,r,s,a,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,r,a,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,s,t,r,...i),eventResize:this.sliceEventResize(e.eventResize,s,t,r,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,r,a,...i){return this._sliceDateSpan({range:{start:e,end:gc(e,1)},allDay:!1},t,r,{},a,...i)}_sliceBusinessHours(e,t,r,a,...i){return e?this._sliceEventStore(mh(e,MN(t,!!r),a),{},t,r,...i).bg:[]}_sliceEventStore(e,t,r,a,...i){if(e){let s=ok(e,t,MN(r,!!a),a);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,r,a,...i){if(!e)return null;let s=ok(e.mutatedEvents,t,MN(r,!!a),a);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,r,a,i,...s){if(!e)return[];let o=MN(t,!!r),l=fi(e.range,o);if(l){e=Object.assign(Object.assign({},e),{range:l});let c=a6e(e,a,i),d=this.sliceRange(e.range,...s);for(let u of d)u.eventRange=c;return d}return[]}sliceEventRanges(e,t){let r=[];for(let a of e)r.push(...this.sliceEventRange(a,t));return r}sliceEventRange(e,t){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:Kr(r.start,1)});let a=this.sliceRange(r,...t);for(let i of a)i.eventRange=e,i.isStart=e.isStart&&i.isStart,i.isEnd=e.isEnd&&i.isEnd;return a}};IN=/^(visible|hidden)$/,lk=class extends Tt{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:r}=e,a=t&&r,i=["fc-scroller"];return t&&(r?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),P("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:a&&-(e.overcomeLeft||0)||"",right:a&&-(e.overcomeRight||0)||"",bottom:a&&-(e.overcomeBottom||0)||"",marginLeft:!a&&-(e.overcomeLeft||0)||"",marginRight:!a&&-(e.overcomeRight||0)||"",marginBottom:!a&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(IN.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let a=0;a<r.length;a+=1)if(r[a].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(IN.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let a=0;a<r.length;a+=1)if(r[a].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return IN.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return IN.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},Ui=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(t,r)=>{let{depths:a,currentMap:i}=this,s=!1,o=!1;t!==null?(s=r in i,i[r]=t,a[r]=(a[r]||0)+1,o=!0):(a[r]-=1,a[r]||(delete i[r],delete this.callbackMap[r],s=!0)),this.masterCallback&&(s&&this.masterCallback(null,String(r)),o&&this.masterCallback(t,String(r)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),t}collect(e,t,r){return Pge(this.currentMap,e,t,r)}getAll(){return KN(this.currentMap)}};Up=class extends Tt{constructor(){super(...arguments),this.processCols=Ae(e=>e,nye),this.renderMicroColGroup=Ae(aye),this.scrollerRefs=new Ui,this.scrollerElRefs=new Ui(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:r}=this,a=e.sections||[],i=this.processCols(e.cols),s=this.renderMicroColGroup(i,t.shrinkWidth),o=oye(e.liquid,r);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let l=a.length,c=0,d,u=[],p=[],m=[];for(;c<l&&(d=a[c]).type==="header";)u.push(this.renderSection(d,s,!0)),c+=1;for(;c<l&&(d=a[c]).type==="body";)p.push(this.renderSection(d,s,!1)),c+=1;for(;c<l&&(d=a[c]).type==="footer";)m.push(this.renderSection(d,s,!0)),c+=1;let f=!VV(),h={role:"rowgroup"};return P("table",{role:"grid",className:o.join(" "),style:{height:e.height}},!!(!f&&u.length)&&P("thead",h,...u),!!(!f&&p.length)&&P("tbody",h,...p),!!(!f&&m.length)&&P("tfoot",h,...m),f&&P("tbody",h,...u,...p,...m))}renderSection(e,t,r){return"outerContent"in e?P(Ot,{key:e.key},e.outerContent):P("tr",{key:e.key,role:"presentation",className:lye(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,r))}renderChunkTd(e,t,r,a){if("outerContent"in r)return r.outerContent;let{props:i}=this,{forceYScrollbars:s,scrollerClientWidths:o,scrollerClientHeights:l}=this.state,c=tye(i,e),d=JV(i,e),u=i.liquid?s?"scroll":c?"auto":"hidden":"visible",p=e.key,m=rye(e,r,{tableColGroupNode:t,tableMinWidth:"",clientWidth:!i.collapsibleWidth&&o[p]!==void 0?o[p]:null,clientHeight:l[p]!==void 0?l[p]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},a);return P(a?"th":"td",{ref:r.elRef,role:"presentation"},P("div",{className:`fc-scroller-harness${d?" fc-scroller-harness-liquid":""}`},P(lk,{ref:this.scrollerRefs.createRef(p),elRef:this.scrollerElRefs.createRef(p),overflowY:u,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:d,liquidIsAbsolute:!0},m)))}_handleScrollerEl(e,t){let r=b6e(this.props.sections,t);r&&Ms(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return sye(this.props.cols)?eye(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=Wge(),{scrollerRefs:t,scrollerElRefs:r}=this,a=!1,i={},s={};for(let o in t.currentMap){let l=t.currentMap[o];if(l&&l.needsYScrolling()){a=!0;break}}for(let o of this.props.sections){let l=o.key,c=r.currentMap[l];if(c){let d=c.parentNode;i[l]=Math.floor(d.getBoundingClientRect().width-(a?e.y:0)),s[l]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:a,scrollerClientWidths:i,scrollerClientHeights:s}}};Up.addStateEquality({scrollerClientWidths:Va,scrollerClientHeights:Va});nu=class extends Tt{constructor(){super(...arguments),this.buildPublicEvent=Ae((e,t,r)=>new vr(e,t,r)),this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e),e&&uge(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:r}=t,{seg:a}=e,{eventRange:i}=a,{ui:s}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!e.disableDragging&&K3e(a,t),isStartResizable:!e.disableResizing&&Z3e(a,t),isEndResizable:!e.disableResizing&&Q3e(a),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!a.isStart,isEnd:!!a.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return P(gn,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...J3e(o),...a.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&uge(this.el,this.props.seg)}},Hp=class extends Tt{render(){let{props:e,context:t}=this,{options:r}=t,{seg:a}=e,{ui:i}=a.eventRange,s=r.eventTimeFormat||e.defaultTimeFormat,o=Gp(a,s,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return P(nu,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:yk(a,t),defaultGenerator:w6e,timeText:o}),(l,c)=>P(Ot,null,P(l,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:c.textColor}}),!!c.isStartResizable&&P("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!c.isEndResizable&&P("div",{className:"fc-event-resizer fc-event-resizer-end"})))}};Hp.addPropsEquality({seg:Va});Kx=n=>P(bo.Consumer,null,e=>{let{options:t}=e,r={isAxis:n.isAxis,date:e.dateEnv.toDate(n.date),view:e.viewApi};return P(gn,{elRef:n.elRef,elTag:n.elTag||"div",elAttrs:n.elAttrs,elClasses:n.elClasses,elStyle:n.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:t.nowIndicatorContent,classNameGenerator:t.nowIndicatorClassNames,didMount:t.nowIndicatorDidMount,willUnmount:t.nowIndicatorWillUnmount},n.children)}),S6e=zt({day:"numeric"}),Vp=class extends Tt{constructor(){super(...arguments),this.refineRenderProps=mk(C6e)}render(){let{props:e,context:t}=this,{options:r}=t,a=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:r.monthStartFormat});return P(gn,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),a.isDisabled?{}:{"data-date":Wp(e.date)}),elClasses:[...vk(a,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:a,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:a.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount},e.children)}};Th=class extends Tt{render(){let{props:e}=this,{seg:t}=e;return P(nu,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:x6e,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};Qx=n=>P(bo.Consumer,null,e=>{let{dateEnv:t,options:r}=e,{date:a}=n,i=r.weekNumberFormat||n.defaultFormat,s=t.computeWeekNumber(a),o=t.format(a,i),l={num:s,text:o,date:a};return P(gn,{elRef:n.elRef,elTag:n.elTag,elAttrs:n.elAttrs,elClasses:n.elClasses,elStyle:n.elStyle,renderProps:l,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:E6e,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},n.children)});eV=10,cV=class extends Tt{constructor(){super(...arguments),this.state={titleId:Hi()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Ms(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=VN(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:r,state:a}=this,i=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return VH(P("div",Object.assign({},r.extraAttrs,{id:r.id,className:i.join(" "),"aria-labelledby":a.titleId,ref:this.handleRootEl}),P("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},P("span",{className:"fc-popover-title",id:a.titleId},r.title),P("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),P("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:r}=this.props,{rootEl:a}=this,i=p6e(t);if(i){let s=a.getBoundingClientRect(),o=r?Yn(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,l=e?i.right-s.width:i.left;o=Math.max(o,eV),l=Math.min(l,document.documentElement.clientWidth-eV-s.width),l=Math.max(l,eV);let c=a.offsetParent.getBoundingClientRect();wh(a,{top:o-c.top,left:l-c.left})}}},dV=class extends On{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:r}=this,{startDate:a,todayRange:i,dateProfile:s}=r,o=t.format(a,e.dayPopoverFormat);return P(Vp,{elRef:this.handleRootEl,date:a,dateProfile:s,todayRange:i},(l,c,d)=>P(cV,{elRef:d.ref,id:r.id,title:o,extraClassNames:["fc-more-popover"].concat(d.className||[]),extraAttrs:d,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},bk(e)&&P(l,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,t,r,a){let{rootEl:i,props:s}=this;return e>=0&&e<r&&t>=0&&t<a?{dateProfile:s.dateProfile,dateSpan:Object.assign({allDay:!s.forceTimed,range:{start:s.startDate,end:s.endDate}},s.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:r,bottom:a},layer:1}:null}},bh=class extends Tt{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Hi()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Ms(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:r}=this,{moreLinkClick:a}=r.options,i=pge(t).start;function s(o){let{def:l,instance:c,range:d}=o.eventRange;return{event:new vr(r,l,c),start:r.dateEnv.toDate(d.start),end:r.dateEnv.toDate(d.end),isStart:o.isStart,isEnd:o.isEnd}}typeof a=="function"&&(a=a({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(s),hiddenSegs:t.hiddenSegs.map(s),jsEvent:e,view:r.viewApi})),!a||a==="popover"?this.setState({isPopoverOpen:!0}):typeof a=="string"&&r.calendarApi.zoomTo(i,a)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return P(bo.Consumer,null,r=>{let{viewApi:a,options:i,calendarApi:s}=r,{moreLinkText:o}=i,{moreCnt:l}=e,c=pge(e),d=typeof o=="function"?o.call(s,l):`+${l} ${o}`,u=uk(i.moreLinkHint,[l],d),p={num:l,shortText:`+${l}`,text:d,view:a};return P(Ot,null,!!e.moreCnt&&P(gn,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),kge(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:p,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||D6e,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&P(dV,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=Yn(this.linkEl,".fc-view-harness"))}}});function N6e(n){let e=n.length>0?n[0].code:"en",t=I6e.concat(n),r={en:gye};for(let a of t)r[a.code]=a;return{map:r,defaultCode:e}}function yye(n,e){return typeof n=="object"&&!Array.isArray(n)?vye(n.code,[n.code],n):R6e(n,e)}function R6e(n,e){let t=[].concat(n||[]),r=_6e(t,e)||gye;return vye(n,t,r)}function _6e(n,e){for(let t=0;t<n.length;t+=1){let r=n[t].toLocaleLowerCase().split("-");for(let a=r.length;a>0;a-=1){let i=r.slice(0,a).join("-");if(e[i])return e[i]}}return null}function vye(n,e,t){let r=YN([hye,t],["buttonText"]);delete r.code;let{week:a}=r;return delete r.week,{codeArg:n,codes:e,week:a,simpleNumberFormat:new Intl.NumberFormat(n),options:r}}function Wa(n){return{id:au(),name:n.name,premiumReleaseDate:n.premiumReleaseDate?new Date(n.premiumReleaseDate):void 0,deps:n.deps||[],reducers:n.reducers||[],isLoadingFuncs:n.isLoadingFuncs||[],contextInit:[].concat(n.contextInit||[]),eventRefiners:n.eventRefiners||{},eventDefMemberAdders:n.eventDefMemberAdders||[],eventSourceRefiners:n.eventSourceRefiners||{},isDraggableTransformers:n.isDraggableTransformers||[],eventDragMutationMassagers:n.eventDragMutationMassagers||[],eventDefMutationAppliers:n.eventDefMutationAppliers||[],dateSelectionTransformers:n.dateSelectionTransformers||[],datePointTransforms:n.datePointTransforms||[],dateSpanTransforms:n.dateSpanTransforms||[],views:n.views||{},viewPropsTransformers:n.viewPropsTransformers||[],isPropsValid:n.isPropsValid||null,externalDefTransforms:n.externalDefTransforms||[],viewContainerAppends:n.viewContainerAppends||[],eventDropTransformers:n.eventDropTransformers||[],componentInteractions:n.componentInteractions||[],calendarInteractions:n.calendarInteractions||[],themeClasses:n.themeClasses||{},eventSourceDefs:n.eventSourceDefs||[],cmdFormatter:n.cmdFormatter,recurringTypes:n.recurringTypes||[],namedTimeZonedImpl:n.namedTimeZonedImpl,initialView:n.initialView||"",elementDraggingImpl:n.elementDraggingImpl,optionChangeHandlers:n.optionChangeHandlers||{},scrollGridImpl:n.scrollGridImpl||null,listenerRefiners:n.listenerRefiners||{},optionRefiners:n.optionRefiners||{},propSetHandlers:n.propSetHandlers||{}}}function F6e(n,e){let t={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function a(i){for(let s of i){let o=s.name,l=t[o];l===void 0?(t[o]=s.id,a(s.deps),r=O6e(r,s)):l!==s.id&&console.warn(`Duplicate plugin '${o}'`)}}return n&&a(n),a(e),r}function L6e(){let n=[],e=[],t;return(r,a)=>((!t||!Tc(r,n)||!Tc(a,e))&&(t=F6e(r,a)),n=r,e=a,t)}function O6e(n,e){return{premiumReleaseDate:z6e(n.premiumReleaseDate,e.premiumReleaseDate),reducers:n.reducers.concat(e.reducers),isLoadingFuncs:n.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:n.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},n.eventRefiners),e.eventRefiners),eventDefMemberAdders:n.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},n.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:n.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:n.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:n.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:n.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:n.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:n.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},n.views),e.views),viewPropsTransformers:n.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||n.isPropsValid,externalDefTransforms:n.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:n.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:n.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:n.calendarInteractions.concat(e.calendarInteractions),componentInteractions:n.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},n.themeClasses),e.themeClasses),eventSourceDefs:n.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||n.cmdFormatter,recurringTypes:n.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||n.namedTimeZonedImpl,initialView:n.initialView||e.initialView,elementDraggingImpl:n.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},n.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||n.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},n.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},n.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},n.propSetHandlers),e.propSetHandlers)}}function z6e(n,e){return n===void 0?e:e===void 0?n:new Date(Math.max(n.valueOf(),e.valueOf()))}function B6e(n,e){let t={},r;for(r in n)tW(r,t,n,e);for(r in e)tW(r,t,n,e);return t}function tW(n,e,t,r){if(e[n])return e[n];let a=j6e(n,e,t,r);return a&&(e[n]=a),a}function j6e(n,e,t,r){let a=t[n],i=r[n],s=d=>a&&a[d]!==null?a[d]:i&&i[d]!==null?i[d]:null,o=s("component"),l=s("superType"),c=null;if(l){if(l===n)throw new Error("Can't have a custom view type that references itself");c=tW(l,e,t,r)}return!o&&c&&(o=c.component),o?{type:n,component:o,defaults:Object.assign(Object.assign({},c?c.defaults:{}),a?a.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),i?i.rawOptions:{})}:null}function cye(n){return To(n,$6e)}function $6e(n){let e=typeof n=="function"?{component:n}:n,{component:t}=e;return e.content?t=dye(e):t&&!(t.prototype instanceof Tt)&&(t=dye(Object.assign(Object.assign({},e),{content:t}))),{superType:e.type,component:t,rawOptions:e}}function dye(n){return e=>P(bo.Consumer,null,t=>P(gn,{elTag:"div",elClasses:MV(t.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:t.options.nextDayThreshold}),generatorName:void 0,customGenerator:n.content,classNameGenerator:n.classNames,didMount:n.didMount,willUnmount:n.willUnmount}))}function U6e(n,e,t,r){let a=cye(n),i=cye(e.views),s=B6e(a,i);return To(s,o=>H6e(o,i,e,t,r))}function H6e(n,e,t,r,a){let i=n.overrides.duration||n.defaults.duration||r.duration||t.duration,s=null,o="",l="",c={};if(i&&(s=V6e(i),s)){let p=kx(s);o=p.unit,p.value===1&&(l=o,c=e[o]?e[o].rawOptions:{})}let d=p=>{let m=p.buttonText||{},f=n.defaults.buttonTextKey;return f!=null&&m[f]!=null?m[f]:m[n.type]!=null?m[n.type]:m[l]!=null?m[l]:null},u=p=>{let m=p.buttonHints||{},f=n.defaults.buttonTextKey;return f!=null&&m[f]!=null?m[f]:m[n.type]!=null?m[n.type]:m[l]!=null?m[l]:null};return{type:n.type,component:n.component,duration:s,durationUnit:o,singleUnit:l,optionDefaults:n.defaults,optionOverrides:Object.assign(Object.assign({},c),n.overrides),buttonTextOverride:d(r)||d(t)||n.overrides.buttonText,buttonTextDefault:d(a)||n.defaults.buttonText||d(wc)||n.type,buttonTitleOverride:u(r)||u(t)||n.overrides.buttonHint,buttonTitleDefault:u(a)||n.defaults.buttonHint||u(wc)}}function V6e(n){let e=JSON.stringify(n),t=uye[e];return t===void 0&&(t=lt(n),uye[e]=t),t}function W6e(n,e){switch(e.type){case"CHANGE_VIEW_TYPE":n=e.viewType}return n}function q6e(n,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return n}}function G6e(n,e,t){let r=n.initialDate;return r!=null?e.createMarker(r):t.getDateMarker()}function Y6e(n,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},n),{[e.optionName]:e.rawOptionValue});default:return n}}function K6e(n,e,t,r){let a;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||t);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(a=r.buildPrev(n,t),a.isValid)return a;break;case"NEXT":if(a=r.buildNext(n,t),a.isValid)return a;break}return n}function Z6e(n,e,t){let r=e?e.activeRange:null;return Tye({},n9e(n,t),r,t)}function Q6e(n,e,t,r){let a=t?t.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return Tye(n,e.sources,a,r);case"REMOVE_EVENT_SOURCE":return X6e(n,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return t?bye(n,a,r):n;case"FETCH_EVENT_SOURCES":return dW(n,e.sourceIds?DV(e.sourceIds):wye(n,r),a,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return r9e(n,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return n}}function J6e(n,e,t){let r=e?e.activeRange:null;return dW(n,wye(n,t),r,!0,t)}function kye(n){for(let e in n)if(n[e].isFetching)return!0;return!1}function Tye(n,e,t,r){let a={};for(let i of e)a[i.sourceId]=i;return t&&(a=bye(a,t,r)),Object.assign(Object.assign({},n),a)}function X6e(n,e){return Xd(n,t=>t.sourceId!==e)}function bye(n,e,t){return dW(n,Xd(n,r=>e9e(r,e,t)),e,!1,t)}function e9e(n,e,t){return Sye(n,t)?!t.options.lazyFetching||!n.fetchRange||n.isFetching||e.start<n.fetchRange.start||e.end>n.fetchRange.end:!n.latestFetchId}function dW(n,e,t,r,a){let i={};for(let s in n){let o=n[s];e[s]?i[s]=t9e(o,t,r,a):i[s]=o}return i}function t9e(n,e,t,r){let{options:a,calendarApi:i}=r,s=r.pluginHooks.eventSourceDefs[n.sourceDefId],o=au();return s.fetch({eventSource:n,range:e,isRefetch:t,context:r},l=>{let{rawEvents:c}=l;a.eventSourceSuccess&&(c=a.eventSourceSuccess.call(i,c,l.response)||c),n.success&&(c=n.success.call(i,c,l.response)||c),r.dispatch({type:"RECEIVE_EVENTS",sourceId:n.sourceId,fetchId:o,fetchRange:e,rawEvents:c})},l=>{let c=!1;a.eventSourceFailure&&(a.eventSourceFailure.call(i,l),c=!0),n.failure&&(n.failure(l),c=!0),c||console.warn(l.message,l),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:n.sourceId,fetchId:o,fetchRange:e,error:l})}),Object.assign(Object.assign({},n),{isFetching:!0,latestFetchId:o})}function r9e(n,e,t,r){let a=n[e];return a&&t===a.latestFetchId?Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},a),{isFetching:!1,fetchRange:r})}):n}function wye(n,e){return Xd(n,t=>Sye(t,e))}function n9e(n,e){let t=FV(e),r=[].concat(n.eventSources||[]),a=[];n.initialEvents&&r.unshift(n.initialEvents),n.events&&r.unshift(n.events);for(let i of r){let s=_V(i,e,t);s&&a.push(s)}return a}function Sye(n,e){return!e.pluginHooks.eventSourceDefs[n.sourceDefId].ignoreRange}function a9e(n,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return n}}function i9e(n,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return n}}function s9e(n,e){let t;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return t=e.state,{affectedEvents:t.affectedEvents,mutatedEvents:t.mutatedEvents,isEvent:t.isEvent};default:return n}}function o9e(n,e){let t;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return t=e.state,{affectedEvents:t.affectedEvents,mutatedEvents:t.mutatedEvents,isEvent:t.isEvent};default:return n}}function l9e(n,e,t,r,a){let i=n.headerToolbar?pye(n.headerToolbar,n,e,t,r,a):null,s=n.footerToolbar?pye(n.footerToolbar,n,e,t,r,a):null;return{header:i,footer:s}}function pye(n,e,t,r,a,i){let s={},o=[],l=!1;for(let c in n){let d=n[c],u=c9e(d,e,t,r,a,i);s[c]=u.widgets,o.push(...u.viewsWithButtons),l=l||u.hasTitle}return{sectionWidgets:s,viewsWithButtons:o,hasTitle:l}}function c9e(n,e,t,r,a,i){let s=e.direction==="rtl",o=e.customButtons||{},l=t.buttonText||{},c=e.buttonText||{},d=t.buttonHints||{},u=e.buttonHints||{},p=n?n.split(" "):[],m=[],f=!1;return{widgets:p.map(g=>g.split(",").map(v=>{if(v==="title")return f=!0,{buttonName:v};let k,T,b,w,S,C;if(k=o[v])b=x=>{k.click&&k.click.call(x.target,x,x.target)},(w=r.getCustomButtonIconClass(k))||(w=r.getIconClass(v,s))||(S=k.text),C=k.hint||k.text;else if(T=a[v]){m.push(v),b=()=>{i.changeView(v)},(S=T.buttonTextOverride)||(w=r.getIconClass(v,s))||(S=T.buttonTextDefault);let x=T.buttonTextOverride||T.buttonTextDefault;C=uk(T.buttonTitleOverride||T.buttonTitleDefault||e.viewHint,[x,v],x)}else if(i[v])if(b=()=>{i[v]()},(S=l[v])||(w=r.getIconClass(v,s))||(S=c[v]),v==="prevYear"||v==="nextYear"){let x=v==="prevYear"?"prev":"next";C=uk(d[x]||u[x],[c.year||"year","year"],c[v])}else C=x=>uk(d[v]||u[v],[c[x]||x,x],c[v]);return{buttonName:v,buttonClick:b,buttonIcon:w,buttonText:S,buttonHint:C}})),viewsWithButtons:m,hasTitle:f}}function y9e(n,e,t){let{dateEnv:r,options:a}=t,i,s,o,l,c={};return i=n.startParam,i==null&&(i=a.startParam),s=n.endParam,s==null&&(s=a.endParam),o=n.timeZoneParam,o==null&&(o=a.timeZoneParam),typeof n.extraParams=="function"?l=n.extraParams():l=n.extraParams||{},Object.assign(c,l),c[i]=r.formatIso(e.start),c[s]=r.formatIso(e.end),r.timeZone!=="local"&&(c[o]=r.timeZone),c}function b9e(n,e,t,r,a){let i=n?DV(n):null,s=nr(a.start),o=a.end,l=[];for(e&&(e.milliseconds<0?o=Kr(o,1):e.milliseconds>=1e3*60*60*24&&(s=Kr(s,-1)));s<o;){let c;(!i||i[s.getUTCDay()])&&(e?c=r.add(s,e):c=s,l.push(r.createMarker(t.toDate(c)))),s=Kr(s,1)}return l}function mye(n,e){let t=KN(e.getCurrentData().eventSources);if(t.length===1&&n.length===1&&Array.isArray(t[0]._raw)&&Array.isArray(n[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:t[0].sourceId,rawEvents:n[0]});return}let r=[];for(let a of n){let i=!1;for(let s=0;s<t.length;s+=1)if(t[s]._raw===a){t.splice(s,1),i=!0;break}i||r.push(a)}for(let a of t)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:a.sourceId});for(let a of r)e.calendarApi.addEventSource(a)}function S9e(n,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},$V(n.activeRange,e.dateEnv)),{view:e.viewApi}))}function C9e(n,e){let{emitter:t}=e;t.hasHandlers("eventsSet")&&t.trigger("eventsSet",Sc(n,e))}function E9e(n,e,t){let r;return/^(year|month)$/.test(n.currentRangeUnit)?r=n.currentRange:r=n.activeRange,t.formatRange(r.start,r.end,zt(e.titleFormat||D9e(n)),{isEndExclusive:n.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function D9e(n){let{currentRangeUnit:e}=n;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let t=ik(n.currentRange.start,n.currentRange.end);return t!==null&&t>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}function P9e(n,e,t,r,a,i,s,o){let l=yye(e||s.defaultCode,s.map);return new Tx({calendarSystem:"gregory",timeZone:n,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:t,firstDay:r,weekText:a,cmdFormatter:i.cmdFormatter,defaultSeparator:o})}function A9e(n,e){let t=e.themeClasses[n.themeSystem]||xc;return new t(n)}function M9e(n){let e=n.dateProfileGeneratorClass||ph;return new e(n)}function I9e(n,e,t){return new rW(n,e,t)}function N9e(n){return To(n,e=>e.ui)}function R9e(n,e,t){let r={"":e};for(let a in n){let i=n[a];i.sourceId&&t[i.sourceId]&&(r[a]=t[i.sourceId])}return r}function _9e(n){let{options:e}=n;return{eventUiSingleBase:gk({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},n),selectionConfig:gk({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},n)}}function eW(n,e){for(let t of e.pluginHooks.isLoadingFuncs)if(t(n))return!0;return!1}function F9e(n){return OV(n.options.businessHours,n)}function fye(n,e){for(let t in n)console.warn(`Unknown option '${t}'`+(e?` for view '${e}'`:""))}function L9e(n,e,t,r,a,i){let s=t.build(a,void 0,!1),o=t.buildPrev(e,r,!1),l=t.buildNext(e,r,!1);return{title:i,activeButton:n.type,navUnit:n.singleUnit,isTodayEnabled:s.isValid&&!ko(e.currentRange,a),isPrevEnabled:o.isValid,isNextEnabled:l.isValid}}function O9e(n){return n.map(e=>new e)}var I6e,hye,gye,xc,uye,rW,d9e,u9e,p9e,m9e,f9e,h9e,g9e,v9e,k9e,T9e,w9e,x9e,nW,aR,aW,iW,iR,sW,oW,lW,cW,sR,Eh=y(()=>{XV();Jd();yx();I6e=[],hye={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},gye=Object.assign(Object.assign({},hye),{buttonHints:{prev:"Previous $0",next:"Next $0",today(n,e){return e==="day"?"Today":`This ${n}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(n){return`Show ${n} more event${n===1?"":"s"}`}});xc=class extends eu{};xc.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};xc.prototype.baseIconClass="fc-icon";xc.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"};xc.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};xc.prototype.iconOverrideOption="buttonIcons";xc.prototype.iconOverrideCustomButtonOption="icon";xc.prototype.iconOverridePrefix="fc-icon-";uye={};rW=class{constructor(e,t,r){this.type=e,this.getCurrentData=t,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},d9e={ignoreRange:!0,parseMeta(n){return Array.isArray(n.events)?n.events:null},fetch(n,e){e({rawEvents:n.eventSource.meta})}},u9e=Wa({name:"array-event-source",eventSourceDefs:[d9e]}),p9e={parseMeta(n){return typeof n.events=="function"?n.events:null},fetch(n,e,t){let{dateEnv:r}=n.context,a=n.eventSource.meta;UV(a.bind(null,$V(n.range,r)),i=>e({rawEvents:i}),t)}},m9e=Wa({name:"func-event-source",eventSourceDefs:[p9e]}),f9e={method:String,extraParams:B,startParam:String,endParam:String,timeZoneParam:String},h9e={parseMeta(n){return n.url&&(n.format==="json"||!n.format)?{url:n.url,format:"json",method:(n.method||"GET").toUpperCase(),extraParams:n.extraParams,startParam:n.startParam,endParam:n.endParam,timeZoneParam:n.timeZoneParam}:null},fetch(n,e,t){let{meta:r}=n.eventSource,a=y9e(r,n.range,n.context);HV(r.method,r.url,a).then(([i,s])=>{e({rawEvents:i,response:s})},t)}},g9e=Wa({name:"json-event-source",eventSourceRefiners:f9e,eventSourceDefs:[h9e]});v9e={daysOfWeek:B,startTime:lt,endTime:lt,duration:lt,startRecur:B,endRecur:B},k9e={parse(n,e){if(n.daysOfWeek||n.startTime||n.endTime||n.startRecur||n.endRecur){let t={daysOfWeek:n.daysOfWeek||null,startTime:n.startTime||null,endTime:n.endTime||null,startRecur:n.startRecur?e.createMarker(n.startRecur):null,endRecur:n.endRecur?e.createMarker(n.endRecur):null,dateEnv:e},r;return n.duration&&(r=n.duration),!r&&n.startTime&&n.endTime&&(r=Cge(n.endTime,n.startTime)),{allDayGuess:!n.startTime&&!n.endTime,duration:r,typeData:t}}return null},expand(n,e,t){let r=fi(e,{start:n.startRecur,end:n.endRecur});return r?b9e(n.daysOfWeek,n.startTime,n.dateEnv,t,r):[]}},T9e=Wa({name:"simple-recurring-event",recurringTypes:[k9e],eventRefiners:v9e});w9e=Wa({name:"change-handler",optionChangeHandlers:{events(n,e){mye([n],e)},eventSources:mye}});x9e=[u9e,m9e,g9e,T9e,w9e,Wa({name:"misc",isLoadingFuncs:[n=>kye(n.eventSources)],propSetHandlers:{dateProfile:S9e,eventStore:C9e}})],nW=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new uh(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],r;for(;r=e.shift();)this.runTask(r),t.push(r);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};aR=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let r=this.dateEnv;if(e!==r&&(typeof t=="function"?this.nowFn=t:r||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,r))for(let a of this.resetListeners.values())a()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},aW=class{constructor(e){this.computeCurrentViewData=Ae(this._computeCurrentViewData),this.organizeRawLocales=Ae(N6e),this.buildLocale=Ae(yye),this.buildPluginHooks=L6e(),this.buildDateEnv=Ae(P9e),this.buildTheme=Ae(A9e),this.parseToolbars=Ae(l9e),this.buildViewSpecs=Ae(U6e),this.buildDateProfileGenerator=mk(M9e),this.buildViewApi=Ae(I9e),this.buildViewUiProps=mk(_9e),this.buildEventUiBySource=Ae(N9e,Va),this.buildEventUiBases=Ae(R9e),this.parseContextBusinessHours=mk(F9e),this.buildTitle=Ae(E9e),this.nowManager=new aR,this.emitter=new tu,this.actionRunner=new nW(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=p=>{this.actionRunner.request(p)},this.props=e,this.actionRunner.pause(),this.nowManager=new aR;let t={},r=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),a=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(a,r,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let s={nowManager:this.nowManager,dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=G6e(r.calendarOptions,r.dateEnv,this.nowManager),l=i.dateProfileGenerator.build(o);ko(l.activeRange,o)||(o=l.currentRange.start);for(let p of r.pluginHooks.contextInit)p(s);let c=Z6e(r.calendarOptions,l,s),d={dynamicOptionOverrides:t,currentViewType:a,currentDate:o,dateProfile:l,businessHours:this.parseContextBusinessHours(s),eventSources:c,eventUiBases:{},eventStore:Kn(),renderableEventStore:Kn(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(s).selectionConfig},u=Object.assign(Object.assign({},s),d);for(let p of r.pluginHooks.reducers)Object.assign(d,p(null,null,u));eW(d,s)&&this.emitter.trigger("loading",!0),this.state=d,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:r}=this;t===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:r,emitter:a}=this,i=Y6e(r.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=W6e(r.currentViewType,e),l=this.computeCurrentViewData(o,s,t.optionOverrides,i);t.calendarApi.currentDataManager=this,a.setThisContext(t.calendarApi),a.setOptions(l.options);let c={nowManager:this.nowManager,dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:a,getCurrentData:this.getCurrentData},{currentDate:d,dateProfile:u}=r;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(u=l.dateProfileGenerator.build(d)),d=q6e(d,e),u=K6e(u,e,d,l.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!ko(u.currentRange,d))&&(d=u.currentRange.start);let p=Q6e(r.eventSources,e,u,c),m=Oge(r.eventStore,e,p,u,c),h=kye(p)&&!l.options.progressiveEventRendering&&r.renderableEventStore||m,{eventUiSingleBase:g,selectionConfig:v}=this.buildViewUiProps(c),k=this.buildEventUiBySource(p),T=this.buildEventUiBases(h.defs,g,k),b={dynamicOptionOverrides:i,currentViewType:o,currentDate:d,dateProfile:u,eventSources:p,eventStore:m,renderableEventStore:h,selectionConfig:v,eventUiBases:T,businessHours:this.parseContextBusinessHours(c),dateSelection:a9e(r.dateSelection,e),eventSelection:i9e(r.eventSelection,e),eventDrag:s9e(r.eventDrag,e),eventResize:o9e(r.eventResize,e)},w=Object.assign(Object.assign({},c),b);for(let x of s.pluginHooks.reducers)Object.assign(b,x(r,e,w));let S=eW(r,c),C=eW(b,c);!S&&C?a.trigger("loading",!0):S&&!C&&a.trigger("loading",!1),this.state=b,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,r=this.data,a=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,a,e.optionOverrides,t.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,a.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},a),i),t),o=a.pluginHooks.optionChangeHandlers,l=r&&r.calendarOptions,c=a.calendarOptions;if(l&&l!==c){l.timeZone!==c.timeZone&&(t.eventSources=s.eventSources=J6e(s.eventSources,t.dateProfile,s),t.eventStore=s.eventStore=LV(s.eventStore,r.dateEnv,s.dateEnv),t.renderableEventStore=s.renderableEventStore=LV(s.renderableEventStore,r.dateEnv,s.dateEnv));for(let d in o)(this.optionsForHandling.indexOf(d)!==-1||l[d]!==c[d])&&o[d](c[d],s)}this.optionsForHandling=[],e.onData&&e.onData(s)}computeOptionsData(e,t,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:a,pluginHooks:i,localeDefaults:s,availableLocaleData:o,extra:l}=this.processRawCalendarOptions(e,t);fye(l);let c=this.buildDateEnv(a.timeZone,a.locale,a.weekNumberCalculation,a.firstDay,a.weekText,i,o,a.defaultRangeSeparator),d=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),u=this.buildTheme(a,i),p=this.parseToolbars(a,this.stableOptionOverrides,u,d,r);return this.stableCalendarOptionsData={calendarOptions:a,pluginHooks:i,dateEnv:c,viewSpecs:d,theme:u,toolbarConfig:p,localeDefaults:s,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:r,locale:a}=GN([wc,e,t]),i=this.organizeRawLocales(r),s=i.map,o=this.buildLocale(a||i.defaultCode,s).options,l=this.buildPluginHooks(e.plugins||[],x9e),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},CV),xV),EV),l.listenerRefiners),l.optionRefiners),d={},u=GN([wc,o,e,t]),p={},m=this.currentCalendarOptionsInput,f=this.currentCalendarOptionsRefined,h=!1;for(let g in u)this.optionsForRefining.indexOf(g)===-1&&(u[g]===m[g]||qp[g]&&g in m&&qp[g](m[g],u[g]))?p[g]=f[g]:c[g]?(p[g]=c[g](u[g]),h=!0):d[g]=m[g];return h&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=p,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:i,localeDefaults:o,extra:d}}_computeCurrentViewData(e,t,r,a){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,r,a);fye(o),this.nowManager.handleInput(t.dateEnv,s.now);let l=this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),c=this.buildViewApi(e,this.getCurrentData,t.dateEnv);return{viewSpec:i,options:s,dateProfileGenerator:l,viewApi:c}}processRawViewOptions(e,t,r,a,i){let s=GN([wc,e.optionDefaults,r,a,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},CV),xV),EV),Dge),t.listenerRefiners),t.optionRefiners),l={},c=this.currentViewOptionsInput,d=this.currentViewOptionsRefined,u=!1,p={};for(let m in s)s[m]===c[m]||qp[m]&&qp[m](s[m],c[m])?l[m]=d[m]:(s[m]===this.currentCalendarOptionsInput[m]||qp[m]&&qp[m](s[m],this.currentCalendarOptionsInput[m])?m in this.currentCalendarOptionsRefined&&(l[m]=this.currentCalendarOptionsRefined[m]):o[m]?l[m]=o[m](s[m]):p[m]=s[m],u=!0);return u&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}}};iW=class extends Tt{render(){let e=this.props.widgetGroups.map(t=>this.renderWidgetGroup(t));return P("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:t}=this,{theme:r}=this.context,a=[],i=!0;for(let s of e){let{buttonName:o,buttonClick:l,buttonText:c,buttonIcon:d,buttonHint:u}=s;if(o==="title")i=!1,a.push(P("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let p=o===t.activeButton,m=!t.isTodayEnabled&&o==="today"||!t.isPrevEnabled&&o==="prev"||!t.isNextEnabled&&o==="next",f=[`fc-${o}-button`,r.getClass("button")];p&&f.push(r.getClass("buttonActive")),a.push(P("button",{type:"button",title:typeof u=="function"?u(t.navUnit):u,disabled:m,"aria-pressed":p,className:f.join(" "),onClick:l},c||(d?P("span",{className:d,role:"img"}):"")))}}if(a.length>1){let s=i&&r.getClass("buttonGroup")||"";return P("div",{className:s},...a)}return a[0]}},iR=class extends Tt{render(){let{model:e,extraClassName:t}=this.props,r=!1,a,i,s=e.sectionWidgets,o=s.center;return s.left?(r=!0,a=s.left):a=s.start,s.right?(r=!0,i=s.right):i=s.end,P("div",{className:[t||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",a||[]),this.renderSection("center",o||[]),this.renderSection("end",i||[]))}renderSection(e,t){let{props:r}=this;return P(iW,{key:e,widgetGroups:t,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}},sW=class extends Tt{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:r}=e,a=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",s="";return r?t.availableWidth!==null?i=t.availableWidth/r:s=`${1/r*100}%`:i=e.height||"",P("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:a.join(" "),style:{height:i,paddingBottom:s}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},oW=class extends hl{constructor(e){super(e),this.handleSegClick=(t,r)=>{let{component:a}=this,{context:i}=a,s=iu(r);if(s&&a.isValidSegDownEl(t.target)){let o=Yn(t.target,".fc-event-forced-url"),l=o?o.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:r,event:new vr(a.context,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:i.viewApi}),l&&!t.defaultPrevented&&(window.location.href=l)}},this.destroy=pV(e.el,"click",".fc-event",this.handleSegClick)}},lW=class extends hl{constructor(e){super(e),this.handleEventElRemove=t=>{t===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(t,r)=>{iu(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",t,r))},this.handleSegLeave=(t,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",t,r))},this.removeHoverListeners=vge(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,r){let{component:a}=this,{context:i}=a,s=iu(r);(!t||a.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:r,event:new vr(i,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:i.viewApi})}},cW=class extends yc{constructor(){super(...arguments),this.buildViewContext=Ae(Nge),this.buildViewPropTransformers=Ae(O9e),this.buildToolbarProps=Ae(L9e),this.headerRef=sn(),this.footerRef=sn(),this.interactionsStore={},this.state={viewLabelId:Hi()},this.registerInteractiveComponent=(e,t)=>{let r=Hge(e,t),s=[oW,lW].concat(this.props.pluginHooks.componentInteractions).map(o=>new o(r));this.interactionsStore[e.uid]=s,Ch[e.uid]=r},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let r of t)r.destroy();delete this.interactionsStore[e.uid]}delete Ch[e.uid]},this.resizeRunner=new uh(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:r}=e,a=!1,i="",s;e.isHeightAuto||e.forPrint?i="":r.height!=null?a=!0:r.contentHeight!=null?i=r.contentHeight:s=Math.max(r.aspectRatio,.5);let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return P(bo.Provider,{value:o},P($i,{unit:"day"},c=>{let d=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,c,e.viewTitle);return P(Ot,null,t.header&&P(iR,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:t.header,titleId:l},d)),P(sW,{liquid:a,height:i,aspectRatio:s,labeledById:l},this.renderView(e),this.buildAppendContent()),t.footer&&P(iR,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:t.footer,titleId:""},d)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let r in t)t[r](e[r],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:r}=t.pluginHooks;for(let a in r)t[a]!==e[a]&&r[a](t[a],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,t=e.pluginHooks.viewContainerAppends.map(r=>r(e));return P(Ot,{},...t)}renderView(e){let{pluginHooks:t}=e,{viewSpec:r}=e,a={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let o of i)Object.assign(a,o.transform(a,e));let s=r.component;return P(s,Object.assign({},a))}};sR=class extends Ex{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;bx(()=>{Op(P(xx,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(a,i,s,o)=>(this.setClassNames(a),this.setHeight(i),P(AV.Provider,{value:this.customContentRenderId},P(cW,Object.assign({isHeightAuto:s,forPrint:o},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Op(null,this.el),this.setClassNames([]),this.setHeight(""))},fge(e),this.el=e,this.renderRunner=new uh(this.handleRenderRequest),new aW({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){bx(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!Tc(e,this.currentClassNames)){let{classList:t}=this.el;for(let r of this.currentClassNames)t.remove(r);for(let r of e)t.add(r);this.currentClassNames=e}}setHeight(e){uV(this.el,"height",e)}}});var Dh=y(()=>{XV();Jd();yx()});function z9e(n){return n.button===0&&!n.ctrlKey}function B9e(){uW+=1,setTimeout(()=>{uW-=1},kk.touchMouseIgnoreWait)}function j9e(){oR+=1,oR===1&&window.addEventListener("touchmove",xye,{passive:!1})}function $9e(){oR-=1,oR||window.removeEventListener("touchmove",xye,{passive:!1})}function xye(n){pW&&n.preventDefault()}function U9e(n){let e=n.tagName;return e==="HTML"||e==="BODY"}function pR(n,e){return!n&&!e?!0:!!n!=!!e?!1:jV(n.dateSpan,e.dateSpan)}function wW(n,e){let t={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(t,r(n,e));return Object.assign(t,H9e(n,e.dateEnv)),t}function H9e(n,e){return{date:e.toDate(n.range.start),dateStr:e.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay}}function V9e(n){let{options:e}=n.context,t=e.selectLongPressDelay;return t==null&&(t=e.longPressDelay),t}function W9e(n,e,t){let r=n.dateSpan,a=e.dateSpan,i=[r.range.start,r.range.end,a.range.start,a.range.end];i.sort(vV);let s={};for(let o of t){let l=o(n,e);if(l===!1)return null;l&&Object.assign(s,l)}return s.range={start:i[0],end:i[3]},s.allDay=r.allDay,s}function q9e(n,e,t,r){let a=n.dateSpan,i=e.dateSpan,s=a.range.start,o=i.range.start,l={};a.allDay!==i.allDay&&(l.allDay=i.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,i.allDay?s=nr(t):s=t);let c=$p(s,o,n.context.dateEnv,n.componentId===e.componentId?n.largeUnit:null);c.milliseconds&&(l.allDay=!1);let d={datesDelta:c,standardProps:l};for(let u of r)u(d,n,e);return d}function G9e(n){let{options:e}=n.context,t=e.eventLongPressDelay;return t==null&&(t=e.longPressDelay),t}function Y9e(n,e,t,r){let a=n.context.dateEnv,i=n.dateSpan.range.start,s=e.dateSpan.range.start,o=$p(i,s,a,n.largeUnit);if(t){if(a.add(r.start,o)<r.end)return{startDelta:o}}else if(a.add(r.end,o)>r.start)return{endDelta:o};return null}function Q9e(n,e,t){let r=Object.assign({},e.leftoverProps);for(let d of t.pluginHooks.externalDefTransforms)Object.assign(r,d(n,e));let{refined:a,extra:i}=zx(r,t),s=sk(a,i,e.sourceId,n.allDay,t.options.forceEventDuration||!!e.duration,t),o=n.range.start;n.allDay&&e.startTime&&(o=t.dateEnv.add(o,e.startTime));let l=e.duration?t.dateEnv.add(o,e.duration):Cx(n.allDay,o,t),c=hk(s.defId,{start:o,end:l});return{def:s,instance:c}}function J9e(n){let e=X9e(n,"event"),t=e?JSON.parse(e):{create:!1};return qx(t)}function X9e(n,e){let t=kk.dataAttrPrefix,r=(t?t+"-":"")+e;return n.getAttribute("data-"+r)||""}var uW,oR,pW,lR,mW,cR,dR,fW,Cye,hW,Yp,gW,Ph,yW,vW,Jx,kW,TW,K9e,Z9e,bW,uR,Eye,SW=y(()=>{Eh();Dh();kk.touchMouseIgnoreWait=500;uW=0,oR=0,pW=!1,lR=class{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=t=>{if(!this.shouldIgnoreMouse()&&z9e(t)&&this.tryStart(t)){let r=this.createEventFromMouse(t,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=t=>{let r=this.createEventFromMouse(t);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=t=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(t)),this.cleanup()},this.handleTouchStart=t=>{if(this.tryStart(t)){this.isTouchDragging=!0;let r=this.createEventFromTouch(t,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let a=t.target;this.shouldIgnoreMove||a.addEventListener("touchmove",this.handleTouchMove),a.addEventListener("touchend",this.handleTouchEnd),a.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=t=>{let r=this.createEventFromTouch(t);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=t=>{if(this.isDragging){let r=t.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(t)),this.cleanup(),this.isTouchDragging=!1,B9e()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=t=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,a=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:t,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:a,deltaX:r-this.origPageX,deltaY:a-this.origPageY})}},this.containerEl=e,this.emitter=new tu,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),j9e()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),$9e()}tryStart(e){let t=this.querySubjectEl(e),r=e.target;return t&&(!this.handleSelector||Yn(r,this.handleSelector))?(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){pW=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?Yn(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return uW||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(pW=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,t){let r=0,a=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,a=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:a}}createEventFromTouch(e,t){let r=e.touches,a,i,s=0,o=0;return r&&r.length?(a=r[0].pageX,i=r[0].pageY):(a=e.pageX,i=e.pageY),t?(this.origPageX=a,this.origPageY=i):(s=a-this.origPageX,o=i-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:a,pageY:i,deltaX:s,deltaY:o}}};mW=class{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=t-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,t){let r=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,t){let r=this.mirrorEl,a=this.sourceEl.getBoundingClientRect();r.style.transition="top "+t+"ms,left "+t+"ms",wh(r,{left:a.left,top:a.top}),mV(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Rx(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&wh(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.pointerEvents="none",t.classList.add("fc-event-dragging"),wh(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t}},cR=class extends hh{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}},dR=class extends cR{constructor(e,t){super(new Px(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return KV(this.scrollController.el)}},fW=class extends cR{constructor(e){super(new Ax,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}},Cye=typeof performance=="function"?performance.now:Date.now,hW=class{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let t=Cye();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let r=e-window.scrollX,a=t-window.scrollY,i=this.pointerScreenY===null?0:a-this.pointerScreenY,s=this.pointerScreenX===null?0:r-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),s<0?this.everMovedLeft=!0:s>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=a,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Cye()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:r}=e,{edgeThreshold:a}=this,i=a-e.distance,s=i*i/(a*a)*this.maxVelocity*t,o=1;switch(e.name){case"left":o=-1;case"right":r.setScrollLeft(r.getScrollLeft()+s*o);break;case"top":o=-1;case"bottom":r.setScrollTop(r.getScrollTop()+s*o);break}}computeBestEdge(e,t){let{edgeThreshold:r}=this,a=null,i=this.scrollCaches||[];for(let s of i){let o=s.clientRect,l=e-o.left,c=o.right-e,d=t-o.top,u=o.bottom-t;l>=0&&c>=0&&d>=0&&u>=0&&(d<=r&&this.everMovedUp&&s.canScrollUp()&&(!a||a.distance>d)&&(a={scrollCache:s,name:"top",distance:d}),u<=r&&this.everMovedDown&&s.canScrollDown()&&(!a||a.distance>u)&&(a={scrollCache:s,name:"bottom",distance:u}),l<=r&&this.everMovedLeft&&s.canScrollLeft()&&(!a||a.distance>l)&&(a={scrollCache:s,name:"left",distance:l}),c<=r&&this.everMovedRight&&s.canScrollRight()&&(!a||a.distance>c)&&(a={scrollCache:s,name:"right",distance:c}))}return a}buildCaches(e){return this.queryScrollEls(e).map(t=>t===window?new fW(!1):new dR(t,!1))}queryScrollEls(e){let t=[];for(let r of this.scrollQuery)typeof r=="object"?t.push(r):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return t}},Yp=class extends Nx{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=a=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,fV(document.body),gV(document.body),a.isTouch||a.origEvent.preventDefault(),this.emitter.trigger("pointerdown",a),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(a.subjectEl,a.pageX,a.pageY),this.startDelay(a),this.minDistance||this.handleDistanceSurpassed(a)))},this.onPointerMove=a=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",a),!this.isDistanceSurpassed){let i=this.minDistance,s,{deltaX:o,deltaY:l}=a;s=o*o+l*l,s>=i*i&&this.handleDistanceSurpassed(a)}this.isDragging&&(a.origEvent.type!=="scroll"&&(this.mirror.handleMove(a.pageX,a.pageY),this.autoScroller.handleMove(a.pageX,a.pageY)),this.emitter.trigger("dragmove",a))}},this.onPointerUp=a=>{this.isInteracting&&(this.isInteracting=!1,hV(document.body),yV(document.body),this.emitter.trigger("pointerup",a),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(a)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new lR(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),t&&(r.selector=t),this.mirror=new mW,this.autoScroller=new hW}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}},gW=class{constructor(e){this.el=e,this.origRect=Vx(e),this.scrollCaches=rR(e).map(t=>new dR(t,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let r={left:e,top:t};for(let a of this.scrollCaches)if(!U9e(a.getEventTarget())&&!WV(r,a.clientRect))return!1;return!0}};Ph=class{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:a}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(a.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):a.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new tu}processFirstCoord(e){let t={left:e.pageX,top:e.pageY},r=t,a=e.subjectEl,i;a instanceof HTMLElement&&(i=Vx(a),r=qV(r,i));let s=this.initialHit=this.queryHitForOffset(r.left,r.top);if(s){if(this.useSubjectCenter&&i){let o=tR(i,s.rect);o&&(r=GV(o))}this.coordAdjust=YV(r,t)}else this.coordAdjust={left:0,top:0}}handleMove(e,t){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(t||!pR(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=To(this.droppableStore,e=>(e.component.prepareHits(),new gW(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:r,offsetTrackers:a}=this,i=null;for(let s in r){let o=r[s].component,l=a[s];if(l&&l.isWithinClipping(e,t)){let c=l.computeLeft(),d=l.computeTop(),u=e-c,p=t-d,{origRect:m}=l,f=m.right-m.left,h=m.bottom-m.top;if(u>=0&&u<f&&p>=0&&p<h){let g=o.queryHit(u,p,f,h);g&&fk(g.dateProfile.activeRange,g.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(u+c-window.scrollX,p+d-window.scrollY)))&&(!i||g.layer>i.layer)&&(g.componentId=s,g.context=o.context,g.rect.left+=c,g.rect.right+=c,g.rect.top+=d,g.rect.bottom+=d,i=g)}}}return i}};yW=class extends hl{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:a}=this,i=r.origEvent.target;a.setIgnoreMove(!this.component.isValidDateDownEl(i))},this.handleDragEnd=r=>{let{component:a}=this,{pointer:i}=this.dragging;if(!i.wasTouchScroll){let{initialHit:s,finalHit:o}=this.hitDragging;if(s&&o&&pR(s,o)){let{context:l}=a,c=Object.assign(Object.assign({},wW(s.dateSpan,l)),{dayEl:s.dayEl,jsEvent:r.origEvent,view:l.viewApi||l.calendarApi.view});l.emitter.trigger("dateClick",c)}}},this.dragging=new Yp(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new Ph(this.dragging,Ux(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}},vW=class extends hl{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=s=>{let{component:o,dragging:l}=this,{options:c}=o.context,d=c.selectable&&o.isValidDateDownEl(s.origEvent.target);l.setIgnoreMove(!d),l.delay=s.isTouch?V9e(o):null},this.handleDragStart=s=>{this.component.context.calendarApi.unselect(s)},this.handleHitUpdate=(s,o)=>{let{context:l}=this.component,c=null,d=!1;if(s){let u=this.hitDragging.initialHit;s.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,s)||(c=W9e(u,s,l.pluginHooks.dateSelectionTransformers)),(!c||!QV(c,s.dateProfile,l))&&(d=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):o||l.dispatch({type:"UNSELECT_DATES"}),d?ck():dk(),o||(this.dragSelection=c)},this.handlePointerUp=s=>{this.dragSelection&&(eR(this.dragSelection,s,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:r}=t.context,a=this.dragging=new Yp(e.el);a.touchScrollAllowed=!1,a.minDistance=r.selectMinDistance||0,a.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Ph(this.dragging,Ux(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}};Jx=class n extends hl{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let o=s.origEvent.target,{component:l,dragging:c}=this,{mirror:d}=c,{options:u}=l.context,p=l.context;this.subjectEl=s.subjectEl;let m=this.subjectSeg=iu(s.subjectEl),h=(this.eventRange=m.eventRange).instance.instanceId;this.relevantEvents=Bx(p.getCurrentData().eventStore,h),c.minDistance=s.isTouch?0:u.eventDragMinDistance,c.delay=s.isTouch&&h!==l.props.eventSelection?G9e(l):null,u.fixedMirrorParent?d.parentNode=u.fixedMirrorParent:d.parentNode=Yn(o,".fc"),d.revertDuration=u.dragRevertDuration;let g=l.isValidSegDownEl(o)&&!Yn(o,".fc-event-resizer");c.setIgnoreMove(!g),this.isDragging=g&&s.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=s=>{let o=this.component.context,l=this.eventRange,c=l.instance.instanceId;s.isTouch?c!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(s),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new vr(o,l.def,l.instance),jsEvent:s.origEvent,view:o.viewApi}))},this.handleHitUpdate=(s,o)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,d=this.component.context,u=null,p=null,m=null,f=!1,h={affectedEvents:l,mutatedEvents:Kn(),isEvent:!0};if(s){u=s.context;let g=u.options;d===u||g.editable&&g.droppable?(p=q9e(c,s,this.eventRange.instance.range.start,u.getCurrentData().pluginHooks.eventDragMutationMassagers),p&&(m=jx(l,u.getCurrentData().eventUiBases,p,u),h.mutatedEvents=m,Gx(h,s.dateProfile,u)||(f=!0,p=null,m=null,h.mutatedEvents=Kn()))):u=null}this.displayDrag(u,h),f?ck():dk(),o||(d===u&&pR(c,s)&&(p=null),this.dragging.setMirrorNeedsRevert(!p),this.dragging.setMirrorIsVisible(!s||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=u,this.validMutation=p,this.mutatedRelevantEvents=m)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=s=>{if(this.isDragging){let o=this.component.context,l=o.viewApi,{receivingContext:c,validMutation:d}=this,u=this.eventRange.def,p=this.eventRange.instance,m=new vr(o,u,p),f=this.relevantEvents,h=this.mutatedRelevantEvents,{finalHit:g}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:m,jsEvent:s.origEvent,view:l}),d){if(c===o){let v=new vr(o,h.defs[u.defId],p?h.instances[p.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:h});let k={oldEvent:m,event:v,relatedEvents:Sc(h,o,p),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:f})}},T={};for(let b of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(T,b(d,o));o.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},k),T),{el:s.subjectEl,delta:d.datesDelta,jsEvent:s.origEvent,view:l})),o.emitter.trigger("eventChange",k)}else if(c){let v={event:m,relatedEvents:Sc(f,o,p),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:f})}};o.emitter.trigger("eventLeave",Object.assign(Object.assign({},v),{draggedEl:s.subjectEl,view:l})),o.dispatch({type:"REMOVE_EVENTS",eventStore:f}),o.emitter.trigger("eventRemove",v);let k=h.defs[u.defId],T=h.instances[p.instanceId],b=new vr(c,k,T);c.dispatch({type:"MERGE_EVENTS",eventStore:h});let w={event:b,relatedEvents:Sc(h,c,T),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};c.emitter.trigger("eventAdd",w),s.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:p.instanceId}),c.emitter.trigger("drop",Object.assign(Object.assign({},wW(g.dateSpan,c)),{draggedEl:s.subjectEl,jsEvent:s.origEvent,view:g.context.viewApi})),c.emitter.trigger("eventReceive",Object.assign(Object.assign({},w),{draggedEl:s.subjectEl,view:g.context.viewApi}))}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:r}=t.context,a=this.dragging=new Yp(e.el);a.pointer.selector=n.SELECTOR,a.touchScrollAllowed=!1,a.autoScroller.isEnabled=r.dragScroll;let i=this.hitDragging=new Ph(this.dragging,Ch);i.useSubjectCenter=e.useEventCenter,i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("pointerup",this.handlePointerUp),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let r=this.component.context,a=this.receivingContext;a&&a!==e&&(a===r?a.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:Kn(),isEvent:!0}}):a.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}};Jx.SELECTOR=".fc-event-draggable, .fc-event-resizable";kW=class extends hl{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=i=>{let{component:s}=this,o=this.querySegEl(i),l=iu(o),c=this.eventRange=l.eventRange;this.dragging.minDistance=s.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(i.origEvent.target)||i.isTouch&&this.component.props.eventSelection!==c.instance.instanceId)},this.handleDragStart=i=>{let{context:s}=this.component,o=this.eventRange;this.relevantEvents=Bx(s.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(i);this.draggingSegEl=l,this.draggingSeg=iu(l),s.calendarApi.unselect(),s.emitter.trigger("eventResizeStart",{el:l,event:new vr(s,o.def,o.instance),jsEvent:i.origEvent,view:s.viewApi})},this.handleHitUpdate=(i,s,o)=>{let{context:l}=this.component,c=this.relevantEvents,d=this.hitDragging.initialHit,u=this.eventRange.instance,p=null,m=null,f=!1,h={affectedEvents:c,mutatedEvents:Kn(),isEvent:!0};i&&(i.componentId===d.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(d,i)||(p=Y9e(d,i,o.subjectEl.classList.contains("fc-event-resizer-start"),u.range))),p&&(m=jx(c,l.getCurrentData().eventUiBases,p,l),h.mutatedEvents=m,Gx(h,i.dateProfile,l)||(f=!0,p=null,m=null,h.mutatedEvents=null)),m?l.dispatch({type:"SET_EVENT_RESIZE",state:h}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),f?ck():dk(),s||(p&&pR(d,i)&&(p=null),this.validMutation=p,this.mutatedRelevantEvents=m)},this.handleDragEnd=i=>{let{context:s}=this.component,o=this.eventRange.def,l=this.eventRange.instance,c=new vr(s,o,l),d=this.relevantEvents,u=this.mutatedRelevantEvents;if(s.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:i.origEvent,view:s.viewApi}),this.validMutation){let p=new vr(s,u.defs[o.defId],l?u.instances[l.instanceId]:null);s.dispatch({type:"MERGE_EVENTS",eventStore:u});let m={oldEvent:c,event:p,relatedEvents:Sc(u,s,l),revert(){s.dispatch({type:"MERGE_EVENTS",eventStore:d})}};s.emitter.trigger("eventResize",Object.assign(Object.assign({},m),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||lt(0),endDelta:this.validMutation.endDelta||lt(0),jsEvent:i.origEvent,view:s.viewApi})),s.emitter.trigger("eventChange",m)}else s.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,r=this.dragging=new Yp(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=t.context.options.dragScroll;let a=this.hitDragging=new Ph(this.dragging,Ux(e));a.emitter.on("pointerdown",this.handlePointerDown),a.emitter.on("dragstart",this.handleDragStart),a.emitter.on("hitupdate",this.handleHitUpdate),a.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return Yn(e.subjectEl,".fc-event")}};TW=class{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let a=this.context.options.unselectCancel,i=VN(r.origEvent);this.matchesCancel=!!Yn(i,a),this.matchesEvent=!!Yn(i,Jx.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:a}=this,{documentPointer:i}=this,s=a.getCurrentData();if(!i.wasTouchScroll){if(s.dateSelection&&!this.isRecentPointerDateSelect){let o=a.options.unselectAuto;o&&(!o||!this.matchesCancel)&&a.calendarApi.unselect(r)}s.eventSelection&&!this.matchesEvent&&a.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new lR(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on("pointerdown",this.onDocumentPointerDown),t.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}},K9e={fixedMirrorParent:B},Z9e={dateClick:B,eventDragStart:B,eventDragStop:B,eventDrop:B,eventResizeStart:B,eventResizeStop:B,eventResize:B,drop:B,eventReceive:B,eventLeave:B},bW=class{constructor(e,t){this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=a=>{this.dragMeta=this.buildDragMeta(a.subjectEl)},this.handleHitUpdate=(a,i,s)=>{let{dragging:o}=this.hitDragging,l=null,c=null,d=!1,u={affectedEvents:Kn(),mutatedEvents:Kn(),isEvent:this.dragMeta.create};a&&(l=a.context,this.canDropElOnCalendar(s.subjectEl,l)&&(c=Q9e(a.dateSpan,this.dragMeta,l),u.mutatedEvents=fh(c),d=!Gx(u,a.dateProfile,l),d&&(u.mutatedEvents=Kn(),c=null))),this.displayDrag(l,u),o.setMirrorIsVisible(i||!c||!document.querySelector(".fc-event-mirror")),d?ck():dk(),i||(o.setMirrorNeedsRevert(!c),this.receivingContext=l,this.droppableEvent=c)},this.handleDragEnd=a=>{let{receivingContext:i,droppableEvent:s}=this;if(this.clearDrag(),i&&s){let o=this.hitDragging.finalHit,l=o.context.viewApi,c=this.dragMeta;if(i.emitter.trigger("drop",Object.assign(Object.assign({},wW(o.dateSpan,i)),{draggedEl:a.subjectEl,jsEvent:a.origEvent,view:l})),c.create){let d=fh(s);i.dispatch({type:"MERGE_EVENTS",eventStore:d}),a.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:s.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new vr(i,s.def,s.instance),relatedEvents:[],revert(){i.dispatch({type:"REMOVE_EVENTS",eventStore:d})},draggedEl:a.subjectEl,view:l})}}this.receivingContext=null,this.droppableEvent=null};let r=this.hitDragging=new Ph(e,Ch);r.requireInitial=!1,r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}buildDragMeta(e){return typeof this.suppliedDragMeta=="object"?qx(this.suppliedDragMeta):typeof this.suppliedDragMeta=="function"?qx(this.suppliedDragMeta(e)):J9e(e)}displayDrag(e,t){let r=this.receivingContext;r&&r!==e&&r.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})}canDropElOnCalendar(e,t){let r=t.options.dropAccept;return typeof r=="function"?r.call(t.calendarApi,e):typeof r=="string"&&r?!!HN(e,r):!0}};kk.dataAttrPrefix="";uR=class{constructor(e,t={}){this.handlePointerDown=a=>{let{dragging:i}=this,{minDistance:s,longPressDelay:o}=this.settings;i.minDistance=s!=null?s:a.isTouch?0:wc.eventDragMinDistance,i.delay=a.isTouch?o!=null?o:wc.longPressDelay:0},this.handleDragStart=a=>{a.isTouch&&this.dragging.delay&&a.subjectEl.classList.contains("fc-event")&&this.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;let r=this.dragging=new Yp(e);r.touchScrollAllowed=!1,t.itemSelector!=null&&(r.pointer.selector=t.itemSelector),t.appendTo!=null&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new bW(r,t.eventData)}destroy(){this.dragging.destroy()}},Eye=Wa({name:"@fullcalendar/interaction",componentInteractions:[yW,vW,Jx,kW],calendarInteractions:[TW],elementDraggingImpl:Yp,optionRefiners:K9e,listenerRefiners:Z9e})});var mR,Dye=y(()=>{SW();mR=class{constructor(e){this.draggableInstances=new Map;this.plugin=e}makeTaskCardDraggable(e,t){if(this.draggableInstances.has(e))return;e.dataset.taskPath=t;let r=new uR(e);this.draggableInstances.set(e,r),e.classList.remove("tn-static-cursor-pointer-2723efcc","tn-static-cursor-pointer-3b6a3a65"),e.classList.add("tn-static-cursor-grab-dad79857"),e.addEventListener("dragstart",a=>{e.classList.add("task-card--dragging"),a.dataTransfer&&(a.dataTransfer.setData("text/plain",t),a.dataTransfer.setData("application/x-task-path",t),a.dataTransfer.effectAllowed="copy")}),e.addEventListener("dragend",()=>{e.classList.remove("task-card--dragging")})}removeDraggable(e){let t=this.draggableInstances.get(e);t&&(t.destroy(),this.draggableInstances.delete(e))}destroy(){this.draggableInstances.forEach(e=>{e.destroy()}),this.draggableInstances.clear()}}});function fR(n){if(!n)return null;let e=Date.parse(n);return Number.isFinite(e)?e:null}function Kp(n){return Number.isFinite(n)?Math.max(1,Math.min(7200,Math.floor(n))):60}function hR(n){return Kp(n.plannedDuration*60)}function CW(n,e=Date.now()){var r;let t=((r=n.activePeriods)!=null?r:[]).reduce((a,i)=>{var c;let s=fR(i.startTime);if(s===null)return a;let o=(c=fR(i.endTime))!=null?c:e,l=Math.max(0,o-s);return a+l},0);return Math.floor(t/1e3)}function wk(n,e=Date.now()){let t=hR(n),r=CW(n,e);return Math.max(0,t-r)}function Pye(n,e=Date.now()){let t=Number.isFinite(n)?Math.max(0,Math.floor(n)):0;return e+t*1e3}function Aye(n,e=Date.now()){var r,a;let t=hR(n)*1e3;for(let i of(r=n.activePeriods)!=null?r:[]){let s=fR(i.startTime);if(s===null)continue;let o=(a=fR(i.endTime))!=null?a:e,l=Math.max(0,o-s);if(l>=t)return s+t;t-=l}return null}function Mye(n){let e=new Date(n),t=-e.getTimezoneOffset(),r=t>=0?"+":"-",a=(o,l=2)=>String(Math.abs(o)).padStart(l,"0"),i=a(Math.floor(Math.abs(t)/60)),s=a(Math.abs(t)%60);return`${e.getFullYear()}-${a(e.getMonth()+1)}-${a(e.getDate())}T${a(e.getHours())}:${a(e.getMinutes())}:${a(e.getSeconds())}.${a(e.getMilliseconds(),3)}${r}${i}:${s}`}function Sk(n,e={}){var c;let t=Math.max(0,Math.floor(n)),r=Math.floor(t/60),a=t%60,i=Math.floor(r/60),s=r%60,o=(c=e.padMinutes)!=null?c:!0;return i>0?`${i}:${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`:`${o?r.toString().padStart(2,"0"):r.toString()}:${a.toString().padStart(2,"0")}`}function Iye(n){let e=n.trim();if(!e)return null;let t=e.split(":");if(t.length<1||t.length>3||!t.every(i=>/^\d+$/.test(i)))return null;let r=t.map(i=>Number(i));if(r.some(i=>!Number.isSafeInteger(i)))return null;let a;if(r.length===1)a=r[0]*60;else if(r.length===2){let[i,s]=r;if(s>59)return null;a=i*60+s}else{let[i,s,o]=r;if(s>59||o>59)return null;a=i*3600+s*60+o}return a<=0?null:Kp(a)}var gR=y(()=>{});var Ec,Nye,yR,Rye=y(()=>{Pr();uU();Ec=require("obsidian");co();gR();q();Nye=M({tag:"Services/StatusBarService"}),yR=class{constructor(e){this.statusBarElement=null;this.pomodoroStatusBarElement=null;this.updateTimeout=null;this.pomodoroUpdateTimeout=null;this.elapsedUpdateInterval=null;this.currentTrackedTasks=[];this.pomodoroEventRefs=[];this.plugin=e,this.requestDeduplicator=new wv}initialize(){this.ensureTrackedStatusBarElement(),this.ensurePomodoroStatusBarElement(),this.registerPomodoroEvents(),this.updateStatusBar(),this.updatePomodoroStatusBar()}ensureTrackedStatusBarElement(){this.statusBarElement||!this.plugin.settings.showTrackedTasksInStatusBar||(this.statusBarElement=this.plugin.addStatusBarItem(),this.statusBarElement.addClass("tasknotes-status-bar"),this.statusBarElement.classList.remove("tn-static-cursor-grab-dad79857","tn-static-cursor-pointer-2723efcc"),this.statusBarElement.classList.add("tn-static-cursor-pointer-3b6a3a65"),this.statusBarElement.addEventListener("click",()=>{this.handleStatusBarClick()}))}ensurePomodoroStatusBarElement(){this.pomodoroStatusBarElement||!this.plugin.settings.showPomodoroInStatusBar||(this.pomodoroStatusBarElement=this.plugin.addStatusBarItem(),this.pomodoroStatusBarElement.addClass("tasknotes-status-bar"),this.pomodoroStatusBarElement.addClass("tasknotes-pomodoro-status"),this.pomodoroStatusBarElement.classList.remove("tn-static-cursor-grab-dad79857","tn-static-cursor-pointer-2723efcc"),this.pomodoroStatusBarElement.classList.add("tn-static-cursor-pointer-3b6a3a65"),this.pomodoroStatusBarElement.addEventListener("click",()=>{this.plugin.activatePomodoroView()}))}registerPomodoroEvents(){var t;if(this.pomodoroEventRefs.length>0||!((t=this.plugin.emitter)!=null&&t.on))return;let e=()=>this.requestPomodoroUpdate();this.pomodoroEventRefs=[this.plugin.emitter.on(cd,e),this.plugin.emitter.on(ai,e),this.plugin.emitter.on(dd,e),this.plugin.emitter.on(ud,e)]}async updateStatusBar(){if(!this.statusBarElement){this.stopElapsedTicker();return}if(!this.plugin.settings.showTrackedTasksInStatusBar){this.hide();return}try{let e=await this.requestDeduplicator.execute("update-status-bar",()=>this.getTrackedTasks());this.renderStatusBar(e)}catch(e){Nye.error("Error updating status bar:",{category:"internal",operation:"updating-status-bar",error:e})}}updatePomodoroStatusBar(){if(!this.plugin.settings.showPomodoroInStatusBar){this.hidePomodoroStatusBar();return}if(this.ensurePomodoroStatusBarElement(),!this.pomodoroStatusBarElement||!this.plugin.pomodoroService)return;let e=this.plugin.pomodoroService.getState();if(!e.currentSession){this.hidePomodoroStatusBar();return}this.showElement(this.pomodoroStatusBarElement),this.renderPomodoroStatusBar(e)}async getTrackedTasks(){return this.plugin.cacheManager.getAllCachedTasks().filter(t=>t.archived?!1:this.plugin.getActiveTimeSession(t)!==null)}renderStatusBar(e){if(!this.statusBarElement)return;this.currentTrackedTasks=[...e];let t=e.length;if(t===0){this.stopElapsedTicker(),this.statusBarElement.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.statusBarElement.classList.add("tn-static-display-none-6b99de8b");return}this.startElapsedTicker(),this.statusBarElement.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),this.statusBarElement.style.removeProperty("display"),this.statusBarElement.empty();let r=this.statusBarElement.createSpan({cls:"tasknotes-status-icon"});(0,Ec.setIcon)(r,"timer");let a=this.statusBarElement.createSpan({cls:"tasknotes-status-text"});if(t===1){let i=e[0],s=i.title.length>30?i.title.substring(0,30)+"...":i.title,o=this.formatElapsedDuration(this.getActiveElapsedMs(i));a.setText(`Tracking: ${s} (${o})`),(0,Ec.setTooltip)(this.statusBarElement,`Currently tracking: ${i.title}
Elapsed: ${o}`,{placement:"top"})}else{let i=this.formatElapsedDuration(e.reduce((l,c)=>l+this.getActiveElapsedMs(c),0));a.setText(`Tracking ${t} tasks (${i} total)`);let s=e.slice(0,5).map(l=>`${l.title} - ${this.formatElapsedDuration(this.getActiveElapsedMs(l))}`).join(`
`),o=t>5?`${s}
... and ${t-5} more`:s;(0,Ec.setTooltip)(this.statusBarElement,`Currently tracking:
${o}`,{placement:"top"})}}renderPomodoroStatusBar(e){if(!this.pomodoroStatusBarElement||!e.currentSession)return;this.pomodoroStatusBarElement.empty();let t=this.pomodoroStatusBarElement.createSpan({cls:"tasknotes-status-icon"});(0,Ec.setIcon)(t,e.currentSession.type==="work"?"timer":"coffee");let r=this.pomodoroStatusBarElement.createSpan({cls:"tasknotes-status-text"}),a=Sk(e.timeRemaining),i=this.getPomodoroSessionLabel(e.currentSession.type),s=e.isRunning?i:`${i} paused`;r.setText(`${s}: ${a}`),(0,Ec.setTooltip)(this.pomodoroStatusBarElement,`${s}
Remaining: ${a}
Click to open Pomodoro`,{placement:"top"})}getPomodoroSessionLabel(e){return e==="work"?"Focus":e==="short-break"?"Short break":"Long break"}showElement(e){e.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),e.style.removeProperty("display")}getActiveElapsedMs(e){let t=this.plugin.getActiveTimeSession(e);if(!(t!=null&&t.startTime))return 0;let r=Date.parse(t.startTime);return Number.isFinite(r)?Math.max(0,Date.now()-r):0}formatElapsedDuration(e){let t=Math.floor(e/1e3),r=t%60,a=Math.floor(t/60),i=a%60,s=Math.floor(a/60);return s>0?`${s}:${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${i}:${r.toString().padStart(2,"0")}`}startElapsedTicker(){this.elapsedUpdateInterval===null&&(this.elapsedUpdateInterval=window.setInterval(()=>{if(this.currentTrackedTasks.length===0){this.stopElapsedTicker();return}this.renderStatusBar(this.currentTrackedTasks)},1e3))}stopElapsedTicker(){this.elapsedUpdateInterval!==null&&(window.clearInterval(this.elapsedUpdateInterval),this.elapsedUpdateInterval=null),this.currentTrackedTasks=[]}async handleStatusBarClick(){try{let e=await this.getTrackedTasks();if(e.length===0)return;if(e.length===1){let t=e[0],r=this.plugin.app.vault.getAbstractFileByPath(t.path);r instanceof Ec.TFile&&await this.plugin.app.workspace.getLeaf(!1).openFile(r)}else fn(this.plugin,e,t=>{(async()=>{if(t){let r=this.plugin.app.vault.getAbstractFileByPath(t.path);r instanceof Ec.TFile&&await this.plugin.app.workspace.getLeaf(!1).openFile(r)}})()})}catch(e){Nye.error("Error handling status bar click:",{category:"internal",operation:"handling-status-bar-click",error:e})}}requestUpdate(){this.updateTimeout&&window.clearTimeout(this.updateTimeout),this.updateTimeout=window.setTimeout(()=>{this.updateStatusBar()},100)}requestPomodoroUpdate(){this.pomodoroUpdateTimeout&&window.clearTimeout(this.pomodoroUpdateTimeout),this.pomodoroUpdateTimeout=window.setTimeout(()=>{this.updatePomodoroStatusBar()},100)}updateVisibility(){this.plugin.settings.showTrackedTasksInStatusBar?this.statusBarElement?this.updateStatusBar():this.ensureTrackedStatusBarElement():this.hide(),this.plugin.settings.showPomodoroInStatusBar?(this.ensurePomodoroStatusBarElement(),this.updatePomodoroStatusBar()):this.hidePomodoroStatusBar()}hide(){this.stopElapsedTicker(),this.statusBarElement&&(this.statusBarElement.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.statusBarElement.classList.add("tn-static-display-none-6b99de8b"))}hidePomodoroStatusBar(){this.pomodoroStatusBarElement&&(this.pomodoroStatusBarElement.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.pomodoroStatusBarElement.classList.add("tn-static-display-none-6b99de8b"))}destroy(){var e;this.updateTimeout&&(window.clearTimeout(this.updateTimeout),this.updateTimeout=null),this.pomodoroUpdateTimeout&&(window.clearTimeout(this.pomodoroUpdateTimeout),this.pomodoroUpdateTimeout=null),this.stopElapsedTicker(),(e=this.plugin.emitter)!=null&&e.offref&&this.pomodoroEventRefs.forEach(t=>this.plugin.emitter.offref(t)),this.pomodoroEventRefs=[],this.requestDeduplicator&&this.requestDeduplicator.cancelAll(),this.statusBarElement=null,this.pomodoroStatusBarElement=null}}});var _ye,xW,vR,Fye=y(()=>{_ye=require("obsidian");Pr();xe();q();Wd();xW=M({tag:"Services/NotificationService"}),vR=class{constructor(e){this.notificationQueue=[];this.processedReminders=new Set;this.activeAudioContexts=new Set;this.audioCleanupTimeouts=new Set;this.lastBroadScanTime=Date.now();this.lastQuickCheckTime=Date.now();this.BROAD_SCAN_INTERVAL=300*1e3;this.QUICK_CHECK_INTERVAL=30*1e3;this.QUEUE_WINDOW=300*1e3;this.plugin=e}async initialize(){this.plugin.settings.enableNotifications&&(this.plugin.settings.notificationType==="system"&&typeof Notification!="undefined"&&Notification.permission==="default"&&await Notification.requestPermission(),this.setupTaskUpdateListener(),this.setupFileUpdateListener(),this.startBroadScan(),this.startQuickCheck(),await this.scanTasksAndBuildQueue())}destroy(){this.broadScanInterval&&window.clearInterval(this.broadScanInterval),this.quickCheckInterval&&window.clearInterval(this.quickCheckInterval),this.taskUpdateListener&&this.plugin.emitter.offref(this.taskUpdateListener),this.fileUpdateListener&&this.plugin.emitter.offref(this.fileUpdateListener);for(let e of this.audioCleanupTimeouts)window.clearTimeout(e);this.audioCleanupTimeouts.clear();for(let e of this.activeAudioContexts)e.state!=="closed"&&e.close().catch(()=>{});this.activeAudioContexts.clear(),this.notificationQueue=[],this.processedReminders.clear()}startBroadScan(){this.broadScanInterval=window.setInterval(()=>{(async()=>{let e=Date.now();e-this.lastBroadScanTime>this.BROAD_SCAN_INTERVAL+6e4&&await this.handleSystemWakeUp(),await this.scanTasksAndBuildQueue(),this.lastBroadScanTime=e})()},this.BROAD_SCAN_INTERVAL)}startQuickCheck(){this.quickCheckInterval=window.setInterval(()=>{let e=Date.now();e-this.lastQuickCheckTime>this.QUICK_CHECK_INTERVAL+6e4,this.checkNotificationQueue(),this.lastQuickCheckTime=e},this.QUICK_CHECK_INTERVAL)}async scanTasksAndBuildQueue(){this.notificationQueue=[];let e=this.plugin.cacheManager.getAllCachedTasks(),t=Date.now(),r=t+this.QUEUE_WINDOW;for(let a of e)if(!(!a.reminders||a.reminders.length===0))for(let i of a.reminders){let s=`${a.path}-${i.id}`;if(this.processedReminders.has(s))continue;let o=this.calculateNotificationTime(a,i);o!==null&&o>t&&o<=r&&this.notificationQueue.push({taskPath:a.path,reminder:i,notifyAt:o})}this.notificationQueue.sort((a,i)=>a.notifyAt-i.notifyAt)}calculateNotificationTime(e,t){try{if(t.type==="absolute")return t.absoluteTime?et(t.absoluteTime).getTime():null;if(t.type==="relative"){if(!t.relatedTo||!t.offset)return null;let r=t.relatedTo==="due"?e.due:e.scheduled;if(!r)return null;let a=et(r),i=this.parseISO8601Duration(t.offset);return i===null?null:a.getTime()+i}}catch(r){return xW.error("Error calculating notification time:",{category:"provider",operation:"calculating-notification-time",error:r}),null}return null}parseISO8601Duration(e){let t=e.match(/^(-?)P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/);if(!t)return null;let[,r,a,i,s,o,l,c,d]=t,u=0;return a&&(u+=parseInt(a)*365*24*60*60*1e3),i&&(u+=parseInt(i)*30*24*60*60*1e3),s&&(u+=parseInt(s)*7*24*60*60*1e3),o&&(u+=parseInt(o)*24*60*60*1e3),l&&(u+=parseInt(l)*60*60*1e3),c&&(u+=parseInt(c)*60*1e3),d&&(u+=parseInt(d)*1e3),r==="-"?-u:u}checkNotificationQueue(){let e=Date.now(),t=[];for(let r=0;r<this.notificationQueue.length;r++){let a=this.notificationQueue[r];if(a.notifyAt<=e){this.triggerNotification(a),t.push(r);let i=`${a.taskPath}-${a.reminder.id}`;this.processedReminders.add(i)}else break}for(let r=t.length-1;r>=0;r--)this.notificationQueue.splice(t[r],1)}async triggerNotification(e){let t=this.plugin.app.vault.getAbstractFileByPath(e.taskPath);if(!(t instanceof _ye.TFile))return;let r=this.plugin.app.metadataCache.getFileCache(t);if(!r||!r.frontmatter)return;let a=this.plugin.fieldMapper.mapFromFrontmatter(r.frontmatter,e.taskPath,this.plugin.settings.storeTitleInFilename),i=e.reminder.description||this.generateDefaultMessage(a,e.reminder);if(this.playNotificationSound(),this.plugin.settings.notificationType==="system")if("Notification"in window&&Notification.permission==="granted"){let s=new Notification(a.title||"TaskNotes Reminder",{body:i,tag:`tasknotes-${e.taskPath}-${e.reminder.id}`});s.onclick=()=>{this.plugin.app.workspace.openLinkText(e.taskPath,"",!1),s.close()}}else this.showInAppNotice(i,e.taskPath);else this.showInAppNotice(i,e.taskPath);this.plugin.apiService&&await this.plugin.apiService.triggerWebhook("reminder.triggered",{task:a,reminder:e.reminder,notificationTime:new Date(e.notifyAt).toISOString(),message:i,notificationType:this.plugin.settings.notificationType})}playNotificationSound(){if(!this.plugin.settings.notificationSoundEnabled)return;let e=window.AudioContext||window.webkitAudioContext;if(e)try{let t=new e,r=t.createGain(),a=Math.max(0,Math.min(1,this.plugin.settings.notificationSoundVolume/100));r.gain.value=a*.3,r.connect(t.destination);let i=(l,c)=>{let d=t.createOscillator();d.connect(r),d.frequency.value=l,d.type="sine",d.start(),d.stop(t.currentTime+c)};i(880,.12),this.activeAudioContexts.add(t);let s=window.setTimeout(()=>{try{i(1175,.12)}catch(l){xW.error("Failed to play notification sound tone:",{category:"provider",operation:"play-notification-sound-tone",error:l})}},140);this.audioCleanupTimeouts.add(s);let o=window.setTimeout(()=>{this.activeAudioContexts.delete(t),this.audioCleanupTimeouts.delete(s),this.audioCleanupTimeouts.delete(o),t.close().catch(()=>{})},320);this.audioCleanupTimeouts.add(o)}catch(t){xW.error("Failed to play notification sound:",{category:"provider",operation:"play-notification-sound",error:t})}}async sendTestReminderNotification(){let e="TaskNotes Reminder",t="This is a test reminder from TaskNotes.";if(this.playNotificationSound(),this.plugin.settings.notificationType==="system"&&typeof Notification!="undefined"&&(Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission==="granted")){new Notification(e,{body:t,tag:"tasknotes-test-reminder"});return}Ze(t,5e3)}showInAppNotice(e,t){let r=Ze(e,0),a=r.noticeEl;a.addEventListener("click",()=>{this.plugin.app.workspace.openLinkText(t,"",!1),r.hide()}),a.classList.remove("tn-static-cursor-grab-dad79857","tn-static-cursor-pointer-2723efcc"),a.classList.add("tn-static-cursor-pointer-3b6a3a65")}generateDefaultMessage(e,t){if(t.type==="absolute")return`Reminder: ${e.title}`;{let r=t.relatedTo==="due"?"due":"scheduled",a=this.formatDurationForDisplay(t.offset||"");return a.startsWith("-")?`${e.title} is ${r} in ${a.substring(1)}`:a==="PT0S"||a==="PT0M"?`${e.title} is ${r} now`:`${e.title} was ${r} ${a} ago`}}formatDurationForDisplay(e){let t=this.parseISO8601Duration(e);if(t===null)return e;let r=Math.abs(t),a=Math.floor(r/(60*1e3)),i=Math.floor(r/(3600*1e3)),s=Math.floor(r/(1440*60*1e3)),o="";return s>0?o=`${s} day${s>1?"s":""}`:i>0?o=`${i} hour${i>1?"s":""}`:a>0?o=`${a} minute${a>1?"s":""}`:o="now",t<0?`-${o}`:o}async refreshReminders(){await this.scanTasksAndBuildQueue()}queueRemindersForTask(e,t){let r=Date.now(),a=r+this.QUEUE_WINDOW;if(!(!t.reminders||t.reminders.length===0)){for(let i of t.reminders){let s=`${e}-${i.id}`;if(this.processedReminders.has(s))continue;let o=this.calculateNotificationTime(t,i);o!==null&&o>r&&o<=a&&this.notificationQueue.push({taskPath:e,reminder:i,notifyAt:o})}this.notificationQueue.sort((i,s)=>i.notifyAt-s.notifyAt)}}async refreshTaskReminders(e,t){this.removeNotificationsForTask(e),this.clearProcessedRemindersForTask(e);let r=t===void 0?await this.plugin.cacheManager.getTaskInfo(e):t;r&&this.queueRemindersForTask(e,r)}clearProcessedRemindersForTask(e){let t=[];for(let r of this.processedReminders)r.startsWith(`${e}-`)&&t.push(r);t.forEach(r=>this.processedReminders.delete(r))}setupTaskUpdateListener(){this.taskUpdateListener=this.plugin.emitter.on(rt,async({path:e,updatedTask:t})=>{!e||!t||await this.refreshTaskReminders(e,t)})}setupFileUpdateListener(){this.fileUpdateListener=this.plugin.emitter.on("file-updated",async({path:e})=>{e&&await this.refreshTaskReminders(e)})}removeNotificationsForTask(e){this.notificationQueue=this.notificationQueue.filter(t=>t.taskPath!==e)}async handleSystemWakeUp(){let e=Date.now(),t=[];for(let r of this.processedReminders){let[a,i]=r.split("-",2);if(!(!a||!i))try{let s=await this.plugin.cacheManager.getTaskInfo(a);if(s&&s.reminders){let o=s.reminders.find(l=>l.id===i);if(o){let l=this.calculateNotificationTime(s,o);l&&l<=e&&t.push(r)}}}catch(s){t.push(r)}}t.forEach(r=>this.processedReminders.delete(r)),await this.scanTasksAndBuildQueue()}}});var EW,kR,Lye=y(()=>{Pr();q();EW=M({tag:"Services/ViewPerformanceService"}),kR=class{constructor(e){this.globalTaskVersionCache=new Map;this.lastGlobalRefreshTime=0;this.globalTaskCount=0;this.viewHandlers=new Map;this.viewDebounceTimers=new Map;this.viewPendingUpdates=new Map;this.viewConfigs=new Map;this.updateInProgress=new Set;this.eventListener=null;this.plugin=e,this.setupGlobalEventListener()}registerView(e,t){this.viewConfigs.set(e.viewId,{debounceDelay:100,maxBatchSize:5,changeDetectionEnabled:!0,...e}),this.viewHandlers.set(e.viewId,t),this.viewPendingUpdates.set(e.viewId,new Set)}unregisterView(e){let t=this.viewDebounceTimers.get(e);t&&(window.clearTimeout(t),this.viewDebounceTimers.delete(e)),this.viewConfigs.delete(e),this.viewHandlers.delete(e),this.viewPendingUpdates.delete(e),this.updateInProgress.delete(e)}setupGlobalEventListener(){this.eventListener=this.plugin.emitter.on(rt,async({path:e,originalTask:t,updatedTask:r})=>{if(!e||!r){await this.triggerFullRefreshForAllViews();return}r.path||(r.path=e),this.hasTaskChanged(r)&&await this.handleTaskUpdateForAllViews(r,t)})}async handleTaskUpdateForAllViews(e,t){let r=[];for(let[a,i]of this.viewHandlers)i.shouldRefreshForTask&&!i.shouldRefreshForTask(t,e)||r.push(this.scheduleViewUpdate(a,e.path));await Promise.all(r),Math.random()<.1&&await this.cleanupTaskVersionCache()}async scheduleViewUpdate(e,t){let r=this.viewConfigs.get(e);if(!r)return;let a=this.viewPendingUpdates.get(e);a&&a.add(t);let i=this.viewDebounceTimers.get(e);i&&window.clearTimeout(i);let s=window.setTimeout(()=>{this.processPendingUpdatesForView(e)},r.debounceDelay);this.viewDebounceTimers.set(e,s)}async processPendingUpdatesForView(e){if(this.updateInProgress.has(e))return;let t=this.viewConfigs.get(e),r=this.viewHandlers.get(e),a=this.viewPendingUpdates.get(e);if(!(!t||!r||!a||a.size===0)){this.updateInProgress.add(e);try{let i=Array.from(a);if(a.clear(),i.length>t.maxBatchSize)await r.refresh();else{let s=i.map(o=>r.updateForTask(o,"update").catch(l=>{EW.error(`[ViewPerformanceService] Error updating task ${o} in ${e}:`,{category:"persistence",operation:"updating-task",error:l})}));await Promise.all(s)}}catch(i){EW.error(`[ViewPerformanceService] Error processing updates for ${e}:`,{category:"validation",operation:"processing-updates",error:i}),await r.refresh()}finally{this.updateInProgress.delete(e),this.viewDebounceTimers.delete(e)}}}async triggerFullRefreshForAllViews(){let e=[];for(let[t,r]of this.viewHandlers)this.updateInProgress.has(t)||e.push(r.refresh(!0));await Promise.all(e),this.lastGlobalRefreshTime=Date.now()}hasTaskChanged(e){let t=this.globalTaskVersionCache.get(e.path),r=e.dateModified||Date.now().toString();return t!==r?(this.globalTaskVersionCache.set(e.path,r),!0):!1}shouldDoFullRefresh(){let e=Date.now()-this.lastGlobalRefreshTime,t=this.globalTaskVersionCache.size;return e>600*1e3||Math.abs(t-this.globalTaskCount)>20||t===0}async cleanupTaskVersionCache(){try{let e=this.plugin.cacheManager.getAllTaskPaths(),t=new Set(e);for(let r of this.globalTaskVersionCache.keys())t.has(r)||this.globalTaskVersionCache.delete(r);this.globalTaskCount=t.size,this.globalTaskVersionCache.size>2e3&&(this.globalTaskVersionCache.clear(),this.lastGlobalRefreshTime=0)}catch(e){EW.error("[ViewPerformanceService] Error during cache cleanup:",{category:"stale-data",operation:"cache-cleanup",error:e})}}async forceRefreshAll(){this.globalTaskVersionCache.clear(),await this.triggerFullRefreshForAllViews()}getStats(){return{registeredViews:Array.from(this.viewConfigs.keys()),cacheSize:this.globalTaskVersionCache.size,activeUpdates:Array.from(this.updateInProgress),totalPendingUpdates:Array.from(this.viewPendingUpdates.values()).reduce((e,t)=>e+t.size,0),lastGlobalRefresh:new Date(this.lastGlobalRefreshTime).toISOString()}}destroy(){this.eventListener&&(this.plugin.emitter.offref(this.eventListener),this.eventListener=null);for(let e of this.viewDebounceTimers.values())window.clearTimeout(e);this.viewHandlers.clear(),this.viewDebounceTimers.clear(),this.viewPendingUpdates.clear(),this.viewConfigs.clear(),this.updateInProgress.clear(),this.globalTaskVersionCache.clear()}}});function eGe(n){return n.width>0&&n.height>0}function tGe(n){let e=n.cacheManager.getAllTaskPaths(),t=[];for(let r of e){let a=n.cacheManager.getCachedTaskInfoSync(r);a&&!a.archived&&t.push(a)}return t}function rGe(n,e){return eGe(n)?n:e}var Zp,Xx,TR,Oye=y(()=>{Zp=require("obsidian");Pr();co();Ua();Yl();hM();gR();xe();q();Xx=M({tag:"Views/PomodoroView"});TR=class extends Zp.ItemView{constructor(t,r){super(t);this.timerDisplay=null;this.timerInput=null;this.statusDisplay=null;this.sessionMetaDisplay=null;this.progressCircle=null;this.progressContainer=null;this.startButton=null;this.pauseButton=null;this.stopButton=null;this.taskDisplay=null;this.statsDisplay=null;this.taskSelectButton=null;this.taskClearButton=null;this.currentSelectedTask=null;this.taskCardContainer=null;this.addTimeButton=null;this.subtractTimeButton=null;this.skipBreakButton=null;this.isEditingTimer=!1;this.isTaskSelectorOpen=!1;this.todaysPomodoros=0;this.statElements={pomodoros:null};this.resizeObserver=null;this.resizeTimeout=null;this.resizeWindow=null;this.functionListeners=[];this.currentCircleSize=300;this.currentCircumference=0;this.lastLayoutSize=null;this.responsiveClass=null;this.workspaceListeners=[];this.visibilityObserver=null;this.wasVisible=!1;this.isClosed=!1;this.openGeneration=0;this.displayStateKey=null;this.taskCardDirty=!1;this.listeners=[];this.plugin=r,this.registerEvents()}refreshStats(){this.updateStats().catch(t=>{Xx.error("Failed to update stats:",{category:"validation",operation:"update-stats",error:t})})}getViewType(){return ld}getDisplayText(){return this.plugin.i18n.translate("views.pomodoro.title")}getIcon(){return"clock"}t(t,r){return this.plugin.i18n.translate(t,r)}registerEvents(){this.listeners.forEach(o=>this.plugin.emitter.offref(o)),this.listeners=[];let t=this.plugin.emitter.on(cd,({session:o,task:l})=>{this.updateDisplay(o,l)});this.listeners.push(t);let r=this.plugin.emitter.on(dd,({session:o,nextType:l})=>{this.onPomodoroComplete(o,l)});this.listeners.push(r);let a=this.plugin.emitter.on(ud,()=>{this.updateDisplay(void 0,void 0,{refreshStats:!0})});this.listeners.push(a);let i=this.plugin.emitter.on(ai,({session:o})=>{this.updateDisplay(o)});this.listeners.push(i);let s=this.plugin.emitter.on(rt,async({path:o,originalTask:l,updatedTask:c})=>{if(!o||!c)return;if(this.currentSelectedTask&&(this.currentSelectedTask.path===o||l&&this.currentSelectedTask.path===l.path)){this.currentSelectedTask=c,this.updateTaskCardDisplay(c);let u=this.plugin.pomodoroService.getState();u.currentSession&&l&&l.path!==c.path&&u.currentSession.taskPath===l.path&&await this.plugin.pomodoroService.assignTaskToCurrentSession(c)}});this.listeners.push(s)}async onOpen(){this.isClosed=!1;let t=++this.openGeneration;await this.plugin.onReady(),!(this.isClosed||t!==this.openGeneration)&&(this.registerEvents(),await this.render(),!(this.isClosed||t!==this.openGeneration)&&this.setupResizeHandling())}onResize(){if(this.resizeWindow&&this.resizeWindow!==this.contentEl.ownerDocument.defaultView){this.setupResizeHandling();return}this.handleVisibilityChange(),this.updateResponsiveLayout()}isViewVisible(){return!this.isClosed&&this.contentEl.ownerDocument.visibilityState!=="hidden"&&this.contentEl.isShown()}handleVisibilityChange(){var r;if(this.isClosed)return;let t=this.isViewVisible();t!==this.wasVisible&&(this.wasVisible=t,(r=this.contentEl.querySelector(".pomodoro-view"))==null||r.classList.toggle("pomodoro-view--rendering-paused",!t),t&&(this.displayStateKey=null,this.updateDisplay(),this.taskCardDirty&&this.updateTaskCardDisplay(this.currentSelectedTask)))}async onClose(){var t;this.isClosed=!0,this.openGeneration++,this.wasVisible=!1,this.displayStateKey=null,this.lastLayoutSize=null,this.responsiveClass=null,this.currentCircleSize=300,this.currentCircumference=0,this.taskCardDirty=!1,(t=this.visibilityObserver)==null||t.disconnect(),this.visibilityObserver=null,this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.resizeTimeout!==null&&((this.resizeWindow||window).clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.resizeWindow=null,this.listeners.forEach(r=>this.plugin.emitter.offref(r)),this.listeners=[],this.workspaceListeners.forEach(r=>this.plugin.app.workspace.offref(r)),this.workspaceListeners=[],this.functionListeners.forEach(r=>r()),this.functionListeners=[],this.timerDisplay=null,this.timerInput=null,this.statusDisplay=null,this.sessionMetaDisplay=null,this.progressCircle=null,this.progressContainer=null,this.startButton=null,this.pauseButton=null,this.stopButton=null,this.taskDisplay=null,this.statsDisplay=null,this.taskSelectButton=null,this.taskClearButton=null,this.currentSelectedTask=null,this.taskCardContainer=null,this.addTimeButton=null,this.subtractTimeButton=null,this.skipBreakButton=null,this.isEditingTimer=!1,this.statElements={pomodoros:null},this.contentEl.empty()}async render(){let t=this.contentEl.createDiv({cls:"tasknotes-plugin pomodoro-view"}),r=t.createDiv({cls:"pomodoro-view__timer-section"}),a=r.createDiv({cls:"pomodoro-view__timer-header"});this.statusDisplay=a.createDiv({cls:"pomodoro-view__status",text:this.t("views.pomodoro.status.ready")}),this.sessionMetaDisplay=a.createDiv({cls:"pomodoro-view__session-meta"}),this.progressContainer=r.createDiv({cls:"pomodoro-view__progress-container"});let i=activeWindow.createSvg("svg");i.setAttribute("class","pomodoro-view__progress-svg"),i.setAttribute("width","300"),i.setAttribute("height","300"),i.setAttribute("viewBox","0 0 300 300"),this.progressContainer.appendChild(i);let s=activeWindow.createSvg("circle");s.setAttributeNS(null,"cx","150"),s.setAttributeNS(null,"cy","150"),s.setAttributeNS(null,"r","140"),s.setAttributeNS(null,"fill","none"),s.setAttributeNS(null,"stroke","var(--tn-border-color)"),s.setAttributeNS(null,"stroke-width","2"),i.appendChild(s),this.progressCircle=activeWindow.createSvg("circle"),this.progressCircle.setAttributeNS(null,"cx","150"),this.progressCircle.setAttributeNS(null,"cy","150"),this.progressCircle.setAttributeNS(null,"r","140"),this.progressCircle.setAttributeNS(null,"fill","none"),this.progressCircle.setAttributeNS(null,"stroke","var(--tn-interactive-accent)"),this.progressCircle.setAttributeNS(null,"stroke-width","4"),this.progressCircle.setAttributeNS(null,"stroke-linecap","round");let l=2*Math.PI*140;this.progressCircle.setAttributeNS(null,"stroke-dasharray",l.toString()),this.progressCircle.setAttributeNS(null,"stroke-dashoffset",l.toString()),this.progressCircle.addClass("pomodoro-view__progress-circle"),i.appendChild(this.progressCircle);let c=this.progressContainer.createDiv({cls:"pomodoro-view__timer-overlay"}),u=`${this.plugin.settings.pomodoroWorkDuration.toString().padStart(2,"0")}:00`;this.timerDisplay=c.createDiv({cls:"pomodoro-view__timer-display",text:u}),this.timerDisplay.tabIndex=0,this.timerDisplay.setAttribute("role","button"),this.timerDisplay.setAttribute("aria-label",this.t("views.pomodoro.timer.editLabel")),this.timerInput=c.createEl("input",{cls:"pomodoro-view__timer-input pomodoro-view__timer-input--hidden",attr:{type:"text",inputmode:"numeric","aria-label":this.t("views.pomodoro.timer.inputLabel")}});let p=c.createDiv({cls:"pomodoro-view__time-controls"});this.subtractTimeButton=p.createEl("button",{cls:"pomodoro-view__time-adjust-button pomodoro-view__subtract-time",text:"-1m"}),this.subtractTimeButton.setAttribute("aria-label",this.t("views.pomodoro.buttons.subtractMinute")),this.addTimeButton=p.createEl("button",{cls:"pomodoro-view__time-adjust-button pomodoro-view__add-time",text:"+1m"}),this.addTimeButton.setAttribute("aria-label",this.t("views.pomodoro.buttons.addMinute")),this.taskDisplay=t.createDiv({cls:"pomodoro-view__task-display"});let m=t.createDiv({cls:"pomodoro-view__task-selector"}),f=m.createDiv({cls:"pomodoro-view__task-buttons"});this.taskSelectButton=f.createEl("button",{cls:"pomodoro-view__task-select-button",text:this.t("views.pomodoro.buttons.chooseTask")}),this.taskClearButton=f.createEl("button",{cls:"pomodoro-view__task-clear-button pomodoro-view__task-clear-button--hidden",text:this.t("views.pomodoro.buttons.clearTask")}),this.taskCardContainer=m.createDiv({cls:"pomodoro-view__task-card-container"});let h=t.createDiv({cls:"pomodoro-view__control-section"}),g=h.createDiv({cls:"pomodoro-view__primary-controls"});this.startButton=g.createEl("button",{text:this.t("views.pomodoro.buttons.startFocus"),cls:"pomodoro-view__start-button"}),this.pauseButton=g.createEl("button",{text:this.t("views.pomodoro.buttons.pause"),cls:"pomodoro-view__pause-button"}),this.pauseButton.addClass("pomodoro-view__pause-button--hidden"),this.stopButton=g.createEl("button",{text:this.t("views.pomodoro.buttons.stop"),cls:"pomodoro-view__stop-button"}),this.stopButton.addClass("pomodoro-view__stop-button--hidden"),this.skipBreakButton=h.createEl("button",{cls:"pomodoro-view__skip-break-button",text:this.t("views.pomodoro.buttons.skipBreak")}),this.skipBreakButton.addClass("pomodoro-view__skip-break-button--hidden");let v=t.createDiv({cls:"pomodoro-view__stats-section"});this.statsDisplay=v.createDiv({cls:"pomodoro-view__stats"});let k=this.statsDisplay.createDiv({cls:"pomodoro-view__stat pomodoro-view__stat--clickable"});this.statElements.pomodoros=k.createSpan({cls:"pomodoro-view__stat-value",text:"0"}),k.createSpan({cls:"pomodoro-view__stat-label",text:this.t("views.pomodoro.statsLabel")}),this.registerDomEvent(k,"click",()=>{this.plugin.activatePomodoroStatsView()}),this.registerDomEvent(this.startButton,"click",async()=>{var T,b,w;if(!((T=this.startButton)!=null&&T.hasClass("is-loading"))){(b=this.startButton)==null||b.addClass("pomodoro-view__start-button--loading");try{let S=this.plugin.pomodoroService.getState();S.currentSession&&!S.isRunning?await this.plugin.pomodoroService.resumePomodoro():S.nextSessionType==="short-break"?await this.plugin.pomodoroService.startBreak(!1):S.nextSessionType==="long-break"?await this.plugin.pomodoroService.startBreak(!0):await this.plugin.pomodoroService.startPomodoro(this.currentSelectedTask||void 0)}finally{(w=this.startButton)==null||w.removeClass("pomodoro-view__start-button--loading")}}}),this.registerDomEvent(this.pauseButton,"click",()=>{this.plugin.pomodoroService.pausePomodoro()}),this.registerDomEvent(this.stopButton,"click",()=>{this.plugin.pomodoroService.stopPomodoro()}),this.registerDomEvent(this.skipBreakButton,"click",()=>{let T=this.plugin.pomodoroService.getState();T.currentSession?this.plugin.pomodoroService.stopPomodoro():(T.nextSessionType==="short-break"||T.nextSessionType==="long-break")&&this.plugin.pomodoroService.skipBreak()}),this.registerDomEvent(this.addTimeButton,"click",()=>{this.adjustSessionTime(60)}),this.registerDomEvent(this.subtractTimeButton,"click",()=>{this.adjustSessionTime(-60)}),this.registerDomEvent(this.timerDisplay,"click",()=>{this.beginTimerEdit()}),this.registerDomEvent(this.timerDisplay,"keydown",T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),this.beginTimerEdit())}),this.registerDomEvent(this.timerInput,"keydown",T=>{T.key==="Enter"?(T.preventDefault(),this.commitTimerEdit()):T.key==="Escape"&&(T.preventDefault(),this.cancelTimerEdit())}),this.registerDomEvent(this.timerInput,"blur",()=>{this.commitTimerEdit()}),this.registerDomEvent(this.taskSelectButton,"click",async()=>{await this.openTaskSelector()}),this.registerDomEvent(this.taskClearButton,"click",async()=>{await this.selectTask(null)}),this.restoreLastSelectedTask(),this.updateDisplay(),this.refreshStats()}setupResizeHandling(){var i,s;if(this.isClosed)return;let t=this.contentEl.ownerDocument.defaultView||window;(i=this.resizeObserver)==null||i.disconnect(),(s=this.visibilityObserver)==null||s.disconnect(),this.resizeTimeout!==null&&((this.resizeWindow||t).clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.resizeWindow=t,this.lastLayoutSize=null,this.workspaceListeners.forEach(o=>this.plugin.app.workspace.offref(o)),this.workspaceListeners=[],this.functionListeners.forEach(o=>o()),this.functionListeners=[];let r=()=>{this.isClosed||this.resizeWindow!==t||(this.handleVisibilityChange(),this.resizeTimeout!==null&&t.clearTimeout(this.resizeTimeout),this.resizeTimeout=t.setTimeout(()=>{this.resizeTimeout=null,this.handleVisibilityChange(),this.updateResponsiveLayout()},150))};t.ResizeObserver&&(this.resizeObserver=new t.ResizeObserver(r),this.resizeObserver.observe(this.contentEl)),t.IntersectionObserver&&(this.visibilityObserver=new t.IntersectionObserver(r),this.visibilityObserver.observe(this.contentEl)),this.workspaceListeners.push(this.plugin.app.workspace.on("layout-change",r),this.plugin.app.workspace.on("active-leaf-change",r));let a=this.contentEl.ownerDocument;a.addEventListener("visibilitychange",r),t.addEventListener("resize",r),this.functionListeners.push(()=>a.removeEventListener("visibilitychange",r),()=>t.removeEventListener("resize",r)),this.handleVisibilityChange(),this.updateResponsiveLayout()}updateResponsiveLayout(){var m,f,h;if(!this.isViewVisible())return;let t=this.contentEl.querySelector(".pomodoro-view");if(!t)return;let r=t.getBoundingClientRect(),a=this.contentEl.getBoundingClientRect(),{width:i,height:s}=rGe({width:a.width,height:a.height},{width:r.width,height:r.height});if(i<=0||s<=0||((m=this.lastLayoutSize)==null?void 0:m.width)===i&&this.lastLayoutSize.height===s)return;this.lastLayoutSize={width:i,height:s};let o=Math.min(i/600,1),l=Math.min(s/800,1),c=Math.min(o*.7+l*.3,1),p=`pomodoro-view--${(h=(f=[[200,"tiny"],[250,"extra-narrow"],[300,"very-narrow"],[350,"narrow"],[400,"small"],[500,"medium-small"],[600,"medium"]].find(([g])=>i<=g))==null?void 0:f[1])!=null?h:"wide"}`;p!==this.responsiveClass&&(this.responsiveClass&&t.classList.remove(this.responsiveClass),t.classList.add(p),this.responsiveClass=p),t.style.setProperty("--pomodoro-scale",c.toString()),this.updateProgressCircleSize(i,s)}updateProgressCircleSize(t,r){if(!this.progressContainer)return;let a=this.progressContainer.querySelector(".pomodoro-view__progress-svg");if(!a)return;let i=Math.min(t*.8,r*.4),s;if(t<=200?s=Math.max(120,Math.min(i,t-40)):t<=250?s=Math.max(150,Math.min(i,t-50)):t<=300?s=Math.max(180,Math.min(i,t-60)):t<=350?s=Math.max(200,Math.min(i,t-70)):t<=400?s=Math.max(230,Math.min(i,t-80)):t<=500?s=Math.max(250,Math.min(i,t-100)):t<=600?s=Math.max(280,Math.min(i,300)):s=Math.max(300,Math.min(i,t*.5,400)),s===this.currentCircleSize)return;this.currentCircleSize=s,a.setAttribute("width",s.toString()),a.setAttribute("height",s.toString()),a.setAttribute("viewBox",`0 0 ${s} ${s}`),this.progressContainer.style.width=`${s}px`,this.progressContainer.style.height=`${s}px`;let o=s/2,l=o-20;if(a.querySelectorAll("circle").forEach(d=>{d.setAttribute("cx",o.toString()),d.setAttribute("cy",o.toString()),d.setAttribute("r",l.toString())}),this.progressCircle){let d=2*Math.PI*l;if(this.currentCircumference=d,this.progressCircle.setAttribute("stroke-dasharray",d.toString()),this.progressCircle.setAttribute("stroke-dashoffset",d.toString()),this.plugin.pomodoroService){let u=this.plugin.pomodoroService.getState();this.updateProgress(u)}}}async openTaskSelector(){if(!this.isTaskSelectorOpen){this.isTaskSelectorOpen=!0;try{let t=tGe(this.plugin),r=new Date;if(t.length===0){new Zp.Notice(this.t("views.pomodoro.notices.noTasks")),this.isTaskSelectorOpen=!1;return}fn(this.plugin,t,a=>{this.isTaskSelectorOpen=!1,this.selectTask(a)},{targetDate:r})}catch(t){this.isTaskSelectorOpen=!1,Xx.error("Error opening task selector:",{category:"persistence",operation:"opening-task-selector",error:t}),new Zp.Notice(this.t("views.pomodoro.notices.loadFailed"))}}}async selectTask(t){if(this.isClosed||(this.currentSelectedTask=t,this.updateTaskCardDisplay(t),await this.plugin.pomodoroService.saveLastSelectedTask(t==null?void 0:t.path),this.isClosed))return;let r=this.plugin.pomodoroService.getState();r.currentSession&&r.currentSession.type==="work"&&await this.plugin.pomodoroService.assignTaskToCurrentSession(t||void 0)}updateTaskCardDisplay(t){if(!this.isViewVisible()){this.taskCardDirty=!0;return}if(this.taskCardContainer)if(this.taskCardDirty=!1,this.taskSelectButton&&(t?(this.taskSelectButton.textContent=this.t("views.pomodoro.buttons.changeTask"),(0,Zp.setTooltip)(this.taskSelectButton,this.t("views.pomodoro.buttons.selectDifferentTask"),{placement:"top"}),this.taskSelectButton.removeClass("pomodoro-view__task-select-button--no-task")):(this.taskSelectButton.textContent=this.t("views.pomodoro.buttons.chooseTask"),this.taskSelectButton.removeAttribute("title"),this.taskSelectButton.addClass("pomodoro-view__task-select-button--no-task"))),this.taskClearButton&&(t?this.taskClearButton.removeClass("pomodoro-view__task-clear-button--hidden"):this.taskClearButton.addClass("pomodoro-view__task-clear-button--hidden")),this.taskCardContainer.empty(),t){let r=this.plugin.settings.defaultVisibleProperties?di(this.plugin.settings.defaultVisibleProperties,this.plugin):void 0,a=new Date,i=fM(t,a,this.plugin.statusManager,this.plugin.settings.defaultTaskStatus),s=pr(i,this.plugin,r,{targetDate:a});this.taskCardContainer.appendChild(s),this.taskCardContainer.removeClass("pomodoro-view__task-card-container--empty")}else this.taskCardContainer.addClass("pomodoro-view__task-card-container--empty")}async restoreLastSelectedTask(){let t=this.openGeneration;try{if(!this.plugin.pomodoroService)return;let r=await this.plugin.pomodoroService.getLastSelectedTaskPath();if(r&&!this.isClosed&&t===this.openGeneration){let a=await this.plugin.cacheManager.getTaskByPath(r);!this.isClosed&&t===this.openGeneration&&a&&!Wf(a,new Date,this.plugin.statusManager,this.plugin.settings.defaultTaskStatus)&&!a.archived&&await this.selectTask(a)}}catch(r){Xx.error("Error restoring last selected task:",{category:"persistence",operation:"restoring-last-selected-task",error:r})}}async updateTaskButtonFromPath(t){var a;let r=this.openGeneration;try{let i=await this.plugin.cacheManager.getTaskInfo(t);if(this.isClosed||r!==this.openGeneration||((a=this.plugin.pomodoroService.getState().currentSession)==null?void 0:a.taskPath)!==t)return;this.currentSelectedTask=i!=null?i:null,this.updateTaskCardDisplay(this.currentSelectedTask)}catch(i){Xx.error("Error updating task button from path:",{category:"persistence",operation:"updating-task-button-path",error:i})}}updateDisplay(t,r,a={}){var l,c,d,u,p,m,f;if(this.isClosed)return;if(a.refreshStats&&this.refreshStats(),!this.isViewVisible()){this.displayStateKey=null;return}if(!this.plugin.pomodoroService){this.statusDisplay&&(this.statusDisplay.textContent=this.t("views.pomodoro.status.ready"),this.statusDisplay.className="pomodoro-status pomodoro-view__status");return}let i=Date.now(),s=this.plugin.pomodoroService.getState();s.isRunning&&s.currentSession&&(s.timeRemaining=wk(s.currentSession,i)),this.updateTimer(s.timeRemaining),this.updateProgress(s),this.updateSessionMeta(s,i);let o=JSON.stringify([s.isRunning,(l=s.currentSession)==null?void 0:l.id,(c=s.currentSession)==null?void 0:c.type,(d=s.currentSession)==null?void 0:d.taskPath,s.nextSessionType]);if(o!==this.displayStateKey){if(this.displayStateKey=o,this.statElements.pomodoros&&this.statElements.pomodoros.textContent!==this.todaysPomodoros.toString()&&(this.statElements.pomodoros.textContent=this.todaysPomodoros.toString()),(u=this.contentEl.querySelector(".pomodoro-view"))==null||u.classList.toggle("pomodoro-view--rendering-paused",!s.isRunning),this.statusDisplay)if(s.isRunning&&s.currentSession){let h=s.currentSession.type==="work"?this.t("views.pomodoro.status.focus"):s.currentSession.type==="short-break"?this.t("views.pomodoro.status.shortBreak"):this.t("views.pomodoro.status.longBreak");this.statusDisplay.textContent=h,this.statusDisplay.className=`pomodoro-status pomodoro-view__status pomodoro-status-${s.currentSession.type} pomodoro-view__status--${s.currentSession.type}`}else s.currentSession&&!s.isRunning?(this.statusDisplay.textContent=this.t("views.pomodoro.status.paused"),this.statusDisplay.className="pomodoro-status pomodoro-view__status pomodoro-status-paused pomodoro-view__status--paused"):(this.statusDisplay.textContent=this.t("views.pomodoro.status.ready"),this.statusDisplay.className="pomodoro-status pomodoro-view__status");if(this.taskDisplay){let h=(p=s.currentSession)==null?void 0:p.taskPath,g=this.taskDisplay.dataset.currentTaskPath;h!==g&&(this.taskDisplay.empty(),this.taskDisplay.dataset.currentTaskPath=h||"")}if(this.taskSelectButton&&(m=s.currentSession)!=null&&m.taskPath&&s.currentSession.taskPath!==((f=this.currentSelectedTask)==null?void 0:f.path)&&this.updateTaskButtonFromPath(s.currentSession.taskPath),this.startButton&&this.pauseButton&&this.stopButton&&(s.isRunning?(this.startButton.addClass("pomodoro-view__start-button--hidden"),this.pauseButton.removeClass("pomodoro-view__pause-button--hidden"),this.stopButton.removeClass("pomodoro-view__stop-button--hidden")):s.currentSession?(this.startButton.removeClass("pomodoro-view__start-button--hidden"),this.startButton.textContent=this.t("views.pomodoro.buttons.resume"),this.pauseButton.addClass("pomodoro-view__pause-button--hidden"),this.stopButton.removeClass("pomodoro-view__stop-button--hidden")):(this.startButton.removeClass("pomodoro-view__start-button--hidden"),s.nextSessionType==="short-break"?this.startButton.textContent=this.t("views.pomodoro.buttons.startShortBreak"):s.nextSessionType==="long-break"?this.startButton.textContent=this.t("views.pomodoro.buttons.startLongBreak"):this.startButton.textContent=this.t("views.pomodoro.buttons.startFocus"),this.pauseButton.addClass("pomodoro-view__pause-button--hidden"),this.stopButton.addClass("pomodoro-view__stop-button--hidden"))),this.skipBreakButton){let h=s.currentSession&&(s.currentSession.type==="short-break"||s.currentSession.type==="long-break"),g=!s.currentSession&&(s.nextSessionType==="short-break"||s.nextSessionType==="long-break");h||g?(this.skipBreakButton.removeClass("pomodoro-view__skip-break-button--hidden"),this.skipBreakButton.textContent=this.t("views.pomodoro.buttons.skipBreak")):this.skipBreakButton.addClass("pomodoro-view__skip-break-button--hidden")}this.addTimeButton&&this.subtractTimeButton&&(this.addTimeButton.removeClass("pomodoro-view__time-adjust-button--hidden"),this.subtractTimeButton.removeClass("pomodoro-view__time-adjust-button--hidden")),this.timerDisplay&&(this.canEditTimer()?(this.timerDisplay.addClass("pomodoro-view__timer-display--editable"),this.timerDisplay.setAttribute("aria-disabled","false")):(this.timerDisplay.removeClass("pomodoro-view__timer-display--editable"),this.timerDisplay.setAttribute("aria-disabled","true")))}}updateSessionMeta(t,r=Date.now()){if(!this.sessionMetaDisplay)return;let a=Sk(t.timeRemaining,{padMinutes:!1}),i;if(t.currentSession){let s=this.getSessionTypeLabel(t.currentSession.type);if(t.isRunning){let o=Wu(new Date(Pye(t.timeRemaining,r)),this.plugin.settings.calendarViewSettings.timeFormat);i=this.t("views.pomodoro.meta.running",{time:a,endTime:o})}else i=this.t("views.pomodoro.meta.paused",{type:s,time:a})}else t.nextSessionType==="short-break"||t.nextSessionType==="long-break"?i=this.t("views.pomodoro.meta.breakReady",{type:this.getSessionTypeLabel(t.nextSessionType),time:a}):i=this.t("views.pomodoro.meta.ready",{time:a,count:this.todaysPomodoros});this.sessionMetaDisplay.textContent!==i&&(this.sessionMetaDisplay.textContent=i)}getSessionTypeLabel(t){return t==="work"?this.t("views.pomodoro.status.focus"):t==="short-break"?this.t("views.pomodoro.status.shortBreak"):this.t("views.pomodoro.status.longBreak")}canEditTimer(){var r;let t=(r=this.plugin.pomodoroService)==null?void 0:r.getState();return!!(t&&!t.isRunning)}beginTimerEdit(){if(!this.timerDisplay||!this.timerInput||!this.plugin.pomodoroService||!this.canEditTimer())return;let t=this.plugin.pomodoroService.getState();this.isEditingTimer=!0,this.timerInput.value=Sk(t.timeRemaining,{padMinutes:!1}),this.timerDisplay.addClass("pomodoro-view__timer-display--hidden"),this.timerInput.removeClass("pomodoro-view__timer-input--hidden"),this.timerInput.focus(),this.timerInput.select()}commitTimerEdit(){var a,i;if(!this.isEditingTimer||!this.timerInput||!this.timerDisplay)return;let t=Iye(this.timerInput.value);if(this.isEditingTimer=!1,this.timerInput.addClass("pomodoro-view__timer-input--hidden"),this.timerDisplay.removeClass("pomodoro-view__timer-display--hidden"),t===null){new Zp.Notice(this.t("views.pomodoro.notices.invalidDuration"));let s=(a=this.plugin.pomodoroService)==null?void 0:a.getState();s&&this.isViewVisible()&&this.updateTimer(s.timeRemaining);return}let r=(i=this.plugin.pomodoroService)==null?void 0:i.getState();r&&(r.currentSession?this.plugin.pomodoroService.setCurrentSessionRemainingTime(t):this.plugin.pomodoroService.adjustPreparedTimer(t),this.updateDisplay())}cancelTimerEdit(){var r;if(!this.timerInput||!this.timerDisplay)return;this.isEditingTimer=!1,this.timerInput.addClass("pomodoro-view__timer-input--hidden"),this.timerDisplay.removeClass("pomodoro-view__timer-display--hidden");let t=(r=this.plugin.pomodoroService)==null?void 0:r.getState();t&&this.isViewVisible()&&this.updateTimer(t.timeRemaining)}updateTimer(t){if(this.timerDisplay){if(this.isEditingTimer)return;let r=Math.max(0,Math.floor(t)),a=Sk(r);this.timerDisplay.textContent!==a&&(this.timerDisplay.textContent=a),this.timerDisplay.classList.toggle("pomodoro-view__timer-display--warning",r<=60&&r>0)}}updateProgress(t){var s;if(!this.progressCircle)return;let r=this.currentCircumference;if(r===0){let o=this.progressCircle.getAttribute("r"),l=o?parseInt(o):140;r=2*Math.PI*l,this.currentCircumference=r}let a=t.currentSession?Math.max(0,Math.min(1,1-t.timeRemaining/hR(t.currentSession))):0,i=r-a*r;this.progressCircle.getAttribute("stroke-dashoffset")!==i.toString()&&this.progressCircle.setAttributeNS(null,"stroke-dashoffset",i.toString());for(let o of["work","short-break","long-break"])this.progressCircle.classList.toggle(`pomodoro-view__progress-circle--${o}`,o===((s=t.currentSession)==null?void 0:s.type));this.progressCircle.classList.toggle("pomodoro-view__progress-circle--warning",!!t.currentSession&&t.timeRemaining<=60&&t.timeRemaining>0)}async updateStats(){let t=this.openGeneration;try{if(!this.plugin.pomodoroService){this.isViewVisible()&&this.statElements.pomodoros&&(this.statElements.pomodoros.textContent="0");return}let r=await this.plugin.pomodoroService.getTodayStats();if(this.isClosed||t!==this.openGeneration)return;this.todaysPomodoros=r.pomodorosCompleted,this.isViewVisible()&&this.statElements.pomodoros&&this.statElements.pomodoros.textContent!==r.pomodorosCompleted.toString()&&(this.statElements.pomodoros.textContent=r.pomodorosCompleted.toString()),this.updateDisplay()}catch(r){Xx.error("Failed to update stats:",{category:"validation",operation:"update-stats",error:r}),this.isViewVisible()&&this.statElements.pomodoros&&(this.statElements.pomodoros.textContent="0")}}adjustSessionTime(t){if(!this.plugin.pomodoroService)return;let r=this.plugin.pomodoroService.getState();if(r.currentSession)this.plugin.pomodoroService.adjustSessionTime(t);else{let a=Math.max(60,r.timeRemaining+t);this.plugin.pomodoroService.adjustPreparedTimer(a)}this.updateDisplay()}onPomodoroComplete(t,r){if(this.updateDisplay(void 0,void 0,{refreshStats:!0}),this.statusDisplay)if(t.type==="work"){let a=r==="long-break",i=this.t(a?"views.pomodoro.status.breakLength.long":"views.pomodoro.status.breakLength.short");this.statusDisplay.textContent=this.t("views.pomodoro.status.breakPrompt",{length:i})}else this.statusDisplay.textContent=this.t("views.pomodoro.status.breakComplete")}}});function bR(n){if(n.activePeriods&&Array.isArray(n.activePeriods))return n.activePeriods.filter(e=>e.endTime).reduce((e,t)=>{let r=new Date(t.startTime),i=new Date(t.endTime).getTime()-r.getTime();return e+Math.round(i/(1e3*60))},0);if(n.duration!==void 0)return n.duration;if(n.startTime&&n.endTime){let e=new Date(n.startTime),r=new Date(n.endTime).getTime()-e.getTime();return Math.round(r/(1e3*60))}return 0}var DW=y(()=>{});function eE(n){return[...n].sort((e,t)=>new Date(e.startTime).getTime()-new Date(t.startTime).getTime())}function nGe(n){var r;let e=(r=n.match(/^(\d{4}-\d{2}-\d{2})(?:[T\s]|$)/))==null?void 0:r[1];if(e)return e;let t=new Date(n);return isNaN(t.getTime())?"":ae(t)}function Ck(n){return nGe(n.startTime)}function zye(n,e){return e?n.filter(t=>Ck(t)===e):[]}function Bye(n,e,t){let r=ae(e),a=ae(t);if(!r||!a)return[];let[i,s]=r<=a?[r,a]:[a,r];return n.filter(o=>{let l=Ck(o);return l>=i&&l<=s})}function jye(n,e){let t=ae(n),r=ae(e);if(!t||!r)return[];let[a,i]=t<=r?[t,r]:[r,t],[s,o,l]=a.split("-").map(Number),[c,d,u]=i.split("-").map(Number),p=new Date(Date.UTC(s,o-1,l)),m=new Date(Date.UTC(c,d-1,u)),f=[];for(;p<=m;)f.push(ae(p)),p.setUTCDate(p.getUTCDate()+1);return f}function xk(n){let e=eE(n).filter(o=>o.type==="work"),t=e.filter(o=>o.completed),r=0;for(let o=e.length-1;o>=0&&e[o].completed;o--)r++;let a=t.reduce((o,l)=>o+bR(l),0),i=t.length>0?a/t.length:0,s=e.length>0?t.length/e.length*100:0;return{pomodorosCompleted:t.length,currentStreak:r,totalMinutes:a,averageSessionLength:Math.round(i),completionRate:Math.round(s)}}var PW=y(()=>{xe();DW()});function iGe(n){return Number.isInteger(n)&&n>=0&&n<=6}var Zn,aGe,wR,$ye=y(()=>{Zn=require("obsidian");Cr();Pr();Fi();xe();DW();PW();q();aGe=M({tag:"Views/PomodoroStatsView"});wR=class extends Zn.ItemView{constructor(t,r){super(t);this.overviewStatsEl=null;this.todayStatsEl=null;this.weekStatsEl=null;this.recentSessionsEl=null;this.overallStatsEl=null;this.plugin=r}getViewType(){return Kg}getDisplayText(){return this.plugin.i18n.translate("views.pomodoroStats.title")}getIcon(){return"bar-chart"}t(t,r){return this.plugin.i18n.translate(t,r)}async onOpen(){await this.plugin.onReady(),await this.waitForPomodoroService(),await this.render()}async onClose(){this.contentEl.empty()}async render(){this.contentEl.empty();let t=this.contentEl.createDiv({cls:"tasknotes-plugin tasknotes-container pomodoro-stats-container pomodoro-stats-view"}),r=t.createDiv({cls:"pomodoro-stats-header pomodoro-stats-view__header"});new Zn.Setting(r).setName(this.t("views.pomodoroStats.heading")).setHeading();let a=r.createDiv({cls:"pomodoro-stats-view__header-actions"});this.renderBasesMigrationHelp(a);let i=a.createEl("button",{cls:"pomodoro-stats-refresh-button pomodoro-stats-view__refresh-button",text:this.t("views.pomodoroStats.refresh")});this.registerDomEvent(i,"click",()=>{this.refreshStats()});let s=t.createDiv({cls:"pomodoro-stats-section pomodoro-stats-view__section"});new Zn.Setting(s).setName(this.t("views.pomodoroStats.sections.overview")).setHeading(),this.overviewStatsEl=s.createDiv({cls:"pomodoro-overview-grid pomodoro-stats-view__overview-grid"});let o=t.createDiv({cls:"pomodoro-stats-section pomodoro-stats-view__section"});new Zn.Setting(o).setName(this.t("views.pomodoroStats.sections.today")).setHeading(),this.todayStatsEl=o.createDiv({cls:"pomodoro-stats-grid pomodoro-stats-view__stats-grid"});let l=t.createDiv({cls:"pomodoro-stats-section pomodoro-stats-view__section"});new Zn.Setting(l).setName(this.t("views.pomodoroStats.sections.week")).setHeading(),this.weekStatsEl=l.createDiv({cls:"pomodoro-stats-grid pomodoro-stats-view__stats-grid"});let c=t.createDiv({cls:"pomodoro-stats-section pomodoro-stats-view__section"});new Zn.Setting(c).setName(this.t("views.pomodoroStats.sections.allTime")).setHeading(),this.overallStatsEl=c.createDiv({cls:"pomodoro-stats-grid pomodoro-stats-view__stats-grid"});let d=t.createDiv({cls:"pomodoro-stats-section pomodoro-stats-view__section"});new Zn.Setting(d).setName(this.t("views.pomodoroStats.sections.recent")).setHeading(),this.recentSessionsEl=d.createDiv({cls:"pomodoro-recent-sessions pomodoro-stats-view__recent-sessions"}),await this.refreshStats()}renderBasesMigrationHelp(t){if(this.plugin.settings.pomodoroStorageLocation==="daily-notes")return;let r=t.createEl("button",{cls:"pomodoro-stats-view__bases-help"}),a=this.t("views.pomodoroStats.basesMigration.title"),i=this.t("views.pomodoroStats.basesMigration.description");(0,Zn.setIcon)(r,"help-circle"),r.setAttr("aria-label",`${a}: ${i}`),(0,Zn.setTooltip)(r,i,{placement:"bottom"})}async waitForPomodoroService(){let t=Date.now();for(;!this.plugin.pomodoroService&&Date.now()-t<5e3;)await new Promise(r=>window.setTimeout(r,50))}async refreshStats(){try{if(!this.plugin.pomodoroService)return;let t=Xt(),r=Br(t),a=new Date(t);a.setDate(a.getDate()-1);let i=Br(a),s=this.plugin.settings.calendarViewSettings.firstDay||0,l={weekStartsOn:iGe(s)?s:0},c=ni(r,l),d=Bg(r,l),[u,p,m,f]=await Promise.all([this.plugin.pomodoroService.getTodayStats(),this.plugin.pomodoroService.getStatsForDate(i),this.plugin.pomodoroService.getStatsForDateRange(c,d),this.plugin.pomodoroService.getSessionHistory()]),h=xk(f);this.overviewStatsEl&&this.renderOverviewStats(this.overviewStatsEl,u,h,p),this.todayStatsEl&&this.renderStatsGrid(this.todayStatsEl,u),this.weekStatsEl&&this.renderStatsGrid(this.weekStatsEl,m),this.overallStatsEl&&this.renderStatsGrid(this.overallStatsEl,h),this.recentSessionsEl&&this.renderRecentSessions(this.recentSessionsEl,f)}catch(t){aGe.error("Failed to refresh stats:",{category:"stale-data",operation:"refresh-stats",error:t})}}renderRecentSessions(t,r){var i;let a=r.filter(s=>s.type==="work").slice(-10).reverse();if(t.empty(),a.length===0){t.createDiv({cls:"pomodoro-no-sessions pomodoro-stats-view__no-sessions",text:this.t("views.pomodoroStats.recents.empty")});return}for(let s of a){let o=t.createDiv({cls:"pomodoro-session-item pomodoro-stats-view__session-item"});this.registerDomEvent(o,"contextmenu",f=>{f.preventDefault(),this.showSessionContextMenu(f,s)});let l=o.createSpan({cls:"session-date pomodoro-stats-view__session-date"}),c=this.plugin.settings.calendarViewSettings.timeFormat;l.textContent=D(new Date(s.startTime),c==="12"?"MMM d, h:mm a":"MMM d, HH:mm");let d=o.createSpan({cls:"session-duration pomodoro-stats-view__session-duration"}),u=bR(s);d.textContent=this.t("views.pomodoroStats.recents.duration",{minutes:u});let p=o.createSpan({cls:"session-status pomodoro-stats-view__session-status"});if(p.textContent=this.t(s.completed?"views.pomodoroStats.recents.status.completed":"views.pomodoroStats.recents.status.interrupted"),p.addClass(s.completed?"status-completed":"status-interrupted"),p.addClass(s.completed?"pomodoro-stats-view__session-status--completed":"pomodoro-stats-view__session-status--interrupted"),s.taskPath){let f=o.createSpan({cls:"session-task pomodoro-stats-view__session-task"}),h=((i=s.taskPath.split("/").pop())==null?void 0:i.replace(".md",""))||"";f.textContent=h}let m=o.createEl("button",{cls:"pomodoro-stats-view__session-delete-button",attr:{type:"button","aria-label":this.t("views.pomodoroStats.recents.deleteAria")}});(0,Zn.setIcon)(m,"trash-2"),(0,Zn.setTooltip)(m,this.t("views.pomodoroStats.recents.delete"),{placement:"top"}),this.registerDomEvent(m,"click",f=>{f.preventDefault(),f.stopPropagation(),this.confirmDeleteSession(s)})}}showSessionContextMenu(t,r){let a=new Zn.Menu;a.addItem(i=>{i.setTitle(this.t("views.pomodoroStats.recents.delete")),i.setIcon("trash"),i.onClick(()=>{this.confirmDeleteSession(r)})}),a.showAtMouseEvent(t)}async confirmDeleteSession(t){if(!await ur(this.plugin.app,{title:this.t("views.pomodoroStats.recents.deleteConfirmTitle"),message:this.t("views.pomodoroStats.recents.deleteConfirmMessage"),confirmText:this.t("views.pomodoroStats.recents.deleteConfirmButton"),cancelText:this.t("common.cancel"),isDestructive:!0})||!this.plugin.pomodoroService)return;let a=await this.plugin.pomodoroService.deleteSessionFromHistory(t);new Zn.Notice(this.t(a?"views.pomodoroStats.recents.deleteSuccess":"views.pomodoroStats.recents.deleteNotFound")),a&&await this.refreshStats()}renderOverviewStats(t,r,a,i){t.empty();let s=v=>{if(v<60)return`${v}m`;let k=Math.floor(v/60),T=v%60;return T>0?`${k}h${T}m`:`${k}h`},o=r.pomodorosCompleted-i.pomodorosCompleted,l=r.totalMinutes-i.totalMinutes,c=t.createDiv({cls:"pomodoro-overview-card pomodoro-stats-view__overview-card"}),d=c.createDiv({cls:"overview-value pomodoro-stats-view__overview-value"});if(d.textContent=r.pomodorosCompleted.toString(),c.createDiv({cls:"overview-label pomodoro-stats-view__overview-label",text:this.t("views.pomodoroStats.overviewCards.todayPomos.label")}),o!==0){let v=c.createDiv({cls:"overview-change pomodoro-stats-view__overview-change"});v.textContent=o>0?this.t("views.pomodoroStats.overviewCards.todayPomos.change.more",{count:o}):this.t("views.pomodoroStats.overviewCards.todayPomos.change.less",{count:Math.abs(o)}),v.addClass(o>0?"positive":"negative")}let u=t.createDiv({cls:"pomodoro-overview-card pomodoro-stats-view__overview-card"}),p=u.createDiv({cls:"overview-value pomodoro-stats-view__overview-value"});p.textContent=a.pomodorosCompleted.toString(),u.createDiv({cls:"overview-label pomodoro-stats-view__overview-label",text:this.t("views.pomodoroStats.overviewCards.totalPomos.label")});let m=t.createDiv({cls:"pomodoro-overview-card pomodoro-stats-view__overview-card"}),f=m.createDiv({cls:"overview-value pomodoro-stats-view__overview-value"});if(f.textContent=s(r.totalMinutes),m.createDiv({cls:"overview-label pomodoro-stats-view__overview-label",text:this.t("views.pomodoroStats.overviewCards.todayFocus.label")}),l!==0){let v=m.createDiv({cls:"overview-change pomodoro-stats-view__overview-change"});v.textContent=l>0?this.t("views.pomodoroStats.overviewCards.todayFocus.change.more",{duration:s(Math.abs(l))}):this.t("views.pomodoroStats.overviewCards.todayFocus.change.less",{duration:s(Math.abs(l))}),v.addClass(l>0?"positive":"negative")}let h=t.createDiv({cls:"pomodoro-overview-card pomodoro-stats-view__overview-card"}),g=h.createDiv({cls:"overview-value pomodoro-stats-view__overview-value"});g.textContent=s(a.totalMinutes),h.createDiv({cls:"overview-label pomodoro-stats-view__overview-label",text:this.t("views.pomodoroStats.overviewCards.totalFocus.label")})}renderStatsGrid(t,r){t.empty();let a=t.createDiv({cls:"pomodoro-stat-card pomodoro-stats-view__stat-card"});a.createDiv({cls:"stat-value pomodoro-stats-view__stat-value",text:r.pomodorosCompleted.toString()}),a.createDiv({cls:"stat-label pomodoro-stats-view__stat-label",text:this.t("views.pomodoroStats.stats.pomodoros")});let i=t.createDiv({cls:"pomodoro-stat-card pomodoro-stats-view__stat-card"});i.createDiv({cls:"stat-value pomodoro-stats-view__stat-value",text:r.currentStreak.toString()}),i.createDiv({cls:"stat-label pomodoro-stats-view__stat-label",text:this.t("views.pomodoroStats.stats.streak")});let s=t.createDiv({cls:"pomodoro-stat-card pomodoro-stats-view__stat-card"});s.createDiv({cls:"stat-value pomodoro-stats-view__stat-value",text:r.totalMinutes.toString()}),s.createDiv({cls:"stat-label pomodoro-stats-view__stat-label",text:this.t("views.pomodoroStats.stats.minutes")});let o=t.createDiv({cls:"pomodoro-stat-card pomodoro-stats-view__stat-card"});o.createDiv({cls:"stat-value pomodoro-stats-view__stat-value",text:r.averageSessionLength.toString()}),o.createDiv({cls:"stat-label pomodoro-stats-view__stat-label",text:this.t("views.pomodoroStats.stats.average")});let l=t.createDiv({cls:"pomodoro-stat-card pomodoro-stats-view__stat-card"});l.createDiv({cls:"stat-value pomodoro-stats-view__stat-value",text:`${r.completionRate}%`}),l.createDiv({cls:"stat-label pomodoro-stats-view__stat-label",text:this.t("views.pomodoroStats.stats.completion")})}}});function sGe(n){return Number.isInteger(n)&&n>=0&&n<=6}function Ek(){return{dateRange:"all",selectedProjects:[],minTimeSpent:0}}function lGe(n){return typeof n=="string"&&oGe.has(n)}function Hye(n){return typeof n=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(n)}function cGe(n){if(!n||typeof n!="object")return Ek();let e=n,t=Ek();lGe(e.dateRange)&&(t.dateRange=e.dateRange),Hye(e.customStartDate)&&(t.customStartDate=e.customStartDate),Hye(e.customEndDate)&&(t.customEndDate=e.customEndDate),Array.isArray(e.selectedProjects)&&(t.selectedProjects=e.selectedProjects.filter(a=>typeof a=="string"));let r=typeof e.minTimeSpent=="number"?e.minTimeSpent:Number(e.minTimeSpent);return Number.isFinite(r)&&r>0&&(t.minTimeSpent=Math.floor(r)),t}function dGe(n){return n.filter(e=>!e.archived)}function uGe(n,e){if(!Array.isArray(n))return[e.noProjectLabel];let t=Ko(n);return t.length===0?[e.noProjectLabel]:t.filter(r=>{var a;return!((a=e.isArchivedProjectReference)!=null&&a.call(e,r))}).map(r=>e.consolidateProjectName(r)).filter(r=>typeof r=="string"&&r.length>0)}var wo,tE,Uye,oGe,SR,Vye=y(()=>{wo=require("obsidian");Cr();Pr();yt();xe();Ua();Yl();Cn();q();tE=M({tag:"Views/StatsView"});Uye="tasknotes-stats-view-filters",oGe=new Set(["all","7days","30days","90days","custom"]);SR=class extends wo.ItemView{constructor(t,r){super(t);this.overviewStatsEl=null;this.todayStatsEl=null;this.weekStatsEl=null;this.monthStatsEl=null;this.projectsStatsEl=null;this.filtersEl=null;this.currentFilters=Ek();this.drilldownModal=null;this.currentDrilldownData=null;this.listeners=[];this.statsCache=new Map;this.lastCacheTime=0;this.CACHE_DURATION=6e4;this.debounceTimeout=null;this.plugin=r}getViewType(){return Zg}getDisplayText(){return this.plugin.i18n.translate("views.stats.title")}getIcon(){return"bar-chart-4"}async onOpen(){await this.plugin.onReady(),this.currentFilters=this.loadPersistedFilters();let t=this.plugin.emitter.on(rt,async({path:r,originalTask:a,updatedTask:i})=>{if(!r||!i||!this.drilldownModal||!this.currentDrilldownData)return;this.currentDrilldownData.tasks.some(o=>o.path===r||a&&o.path===a.path)&&await this.refreshDrilldownModal()});this.listeners.push(t),await this.render()}async onClose(){this.contentEl.empty(),this.listeners.forEach(t=>this.plugin.emitter.offref(t)),this.listeners=[]}loadPersistedFilters(){try{let t=this.plugin.app.loadLocalStorage(Uye);return typeof t!="string"||t.length===0?Ek():cGe(JSON.parse(t))}catch(t){return tE.warn("[TaskNotes] Failed to load Stats view filters:",{category:"persistence",operation:"load-stats-view-filters",error:t}),Ek()}}savePersistedFilters(){try{this.plugin.app.saveLocalStorage(Uye,JSON.stringify(this.currentFilters))}catch(t){tE.warn("[TaskNotes] Failed to save Stats view filters:",{category:"persistence",operation:"save-stats-view-filters",error:t})}}async render(){let t=this.contentEl.createDiv({cls:"tasknotes-plugin tasknotes-container stats-container stats-view"}),r=t.createDiv({cls:"stats-header stats-view__header"});new wo.Setting(r).setName(this.plugin.i18n.translate("views.stats.taskProjectStats")).setHeading();let a=r.createEl("button",{cls:"stats-refresh-button stats-view__refresh-button",text:this.plugin.i18n.translate("views.stats.refreshButton")});this.registerDomEvent(a,"click",()=>{this.refreshStats()});let i=t.createDiv({cls:"stats-section stats-view__section"});new wo.Setting(i).setName(this.plugin.i18n.translate("views.stats.sections.filters")).setHeading(),this.filtersEl=i.createDiv({cls:"stats-filters stats-view__filters"}),this.renderFilters();let s=t.createDiv({cls:"stats-section stats-view__section"});new wo.Setting(s).setName(this.plugin.i18n.translate("views.stats.sections.overview")).setHeading(),this.overviewStatsEl=s.createDiv({cls:"stats-overview-grid stats-view__overview-grid"});let o=t.createDiv({cls:"stats-section stats-view__section"});new wo.Setting(o).setName(this.plugin.i18n.translate("views.stats.sections.today")).setHeading(),this.todayStatsEl=o.createDiv({cls:"stats-grid stats-view__stats-grid"});let l=t.createDiv({cls:"stats-section stats-view__section"});new wo.Setting(l).setName(this.plugin.i18n.translate("views.stats.sections.thisWeek")).setHeading(),this.weekStatsEl=l.createDiv({cls:"stats-grid stats-view__stats-grid"});let c=t.createDiv({cls:"stats-section stats-view__section"});new wo.Setting(c).setName(this.plugin.i18n.translate("views.stats.sections.thisMonth")).setHeading(),this.monthStatsEl=c.createDiv({cls:"stats-grid stats-view__stats-grid"});let d=t.createDiv({cls:"stats-section stats-view__section"});new wo.Setting(d).setName(this.plugin.i18n.translate("views.stats.sections.projectBreakdown")).setHeading(),this.projectsStatsEl=d.createDiv({cls:"stats-projects stats-view__projects"}),await this.refreshStats()}async refreshStats(){try{this.clearCache();let t=await Promise.allSettled([this.updateOverviewStats(),this.updateTodayStats(),this.updateWeekStats(),this.updateMonthStats(),this.updateProjectStats()])}catch(t){}}async getAllTasks(){let t=`all-tasks-${JSON.stringify(this.currentFilters)}`;if(this.isCacheValid()&&this.statsCache.has(t)){let i=this.statsCache.get(t);if(i)return i}let r=this.plugin.cacheManager.getAllTaskPaths(),a=[];for(let i of r)try{let s=await this.plugin.cacheManager.getTaskInfo(i);s&&a.push(s)}catch(s){}return a=dGe(a),a=this.applyTaskFilters(a),this.statsCache.set(t,a),this.lastCacheTime=Date.now(),a}applyTaskFilters(t){let r=t,a=this.getFilterDateRange();return(a.start||a.end)&&(r=r.filter(i=>{if(i.timeEntries&&i.timeEntries.length>0)return i.timeEntries.some(s=>{if(!s.startTime)return!1;let o=new Date(s.startTime);return!(a.start&&o<a.start||a.end&&o>a.end)});if(i.completedDate){let s=new Date(i.completedDate);return!(a.start&&s<a.start||a.end&&s>a.end)}if(i.dateCreated){let s=new Date(i.dateCreated);return!(a.start&&s<a.start||a.end&&s>a.end)}return!(a.start||a.end)})),this.currentFilters.minTimeSpent>0&&(r=r.filter(i=>oi(i.timeEntries||[])>=this.currentFilters.minTimeSpent)),r}async updateOverviewStats(){if(!this.overviewStatsEl)return;let t=await this.getAllTasks(),r=this.calculateOverallStats(t);this.renderOverviewStats(this.overviewStatsEl,r)}async updateTodayStats(){if(!this.todayStatsEl)return;let t=Xt(),r=await this.calculateStatsForRange(Vo(t),sb(t));this.renderTimeRangeStats(this.todayStatsEl,r)}async updateWeekStats(){if(!this.weekStatsEl)return;let t=Xt(),r=this.plugin.settings.calendarViewSettings.firstDay||0,i={weekStartsOn:sGe(r)?r:0},s=ni(t,i),o=Bg(t,i),l=await this.calculateStatsForRange(s,o);this.renderTimeRangeStats(this.weekStatsEl,l)}async updateMonthStats(){if(!this.monthStatsEl)return;let t=Xt(),r=YP(t),a=GP(t),i=await this.calculateStatsForRange(r,a);this.renderTimeRangeStats(this.monthStatsEl,i)}async updateProjectStats(){if(!this.projectsStatsEl)return;let t=await this.getAllTasks(),r=this.calculateProjectStats(t);await this.renderProjectStats(this.projectsStatsEl,r)}consolidateProjectName(t){var a,i;if(!t||typeof t!="string")return t;let r=Zo(t,(a=this.plugin)==null?void 0:a.app);if(r&&r!==t)return r;if(t.startsWith("[[")&&t.endsWith("]]")){let s=this.extractWikilinkPath(t);if(s&&((i=this.plugin)!=null&&i.app)){let o=this.plugin.app.metadataCache.getFirstLinkpathDest(s,"");if(o)return o.basename;let l=this.extractProjectName(t);if(l)return l}}if(t.includes("|")){let s=t.split("|");return s[s.length-1]||t}if(t.includes("/")){let s=t.split("/");return s[s.length-1]||t}return t}extractWikilinkPath(t){if(!t||typeof t!="string"||!t.startsWith("[[")||!t.endsWith("]]"))return null;let r=t.slice(2,-2);return(0,wo.parseLinktext)(r).path}extractProjectName(t){var a;return t&&Zo(t,(a=this.plugin)==null?void 0:a.app)||null}isArchivedProjectReference(t){var r;return((r=this.getProjectReferenceTask(t))==null?void 0:r.archived)===!0}getProjectReferenceTask(t){let r=t.trim();if(!this.isProjectNoteReference(r))return null;let a=vt(r);if(!a)return null;let i=a.replace(/\.md$/i,""),s=this.plugin.app.metadataCache.getFirstLinkpathDest(i,"");if(s){let l=this.plugin.cacheManager.getCachedTaskInfoSync(s.path);if(l)return l}let o=/\.md$/i.test(a)?[a]:[a,`${a}.md`];for(let l of o){let c=this.plugin.cacheManager.getCachedTaskInfoSync(l);if(c)return c}return null}isProjectNoteReference(t){return t.startsWith("[[")&&t.endsWith("]]")||/^\[[^\]]*\]\(.+\)$/.test(t)||t.startsWith("<")&&t.endsWith(">")||t.includes("/")||/\.md$/i.test(t)}calculateOverallStats(t){let r=0,a=0,i=0,s=new Set;for(let o of t){r+=oi(o.timeEntries||[]),a+=o.timeEstimate||0,this.plugin.statusManager.isCompletedStatus(o.status)&&i++;let l=this.getTaskProjects(o);for(let c of l)s.add(c)}return{totalTimeSpent:r,totalTimeEstimate:a,totalTasks:t.length,completedTasks:i,activeProjects:s.size,completionRate:t.length>0?i/t.length*100:0,avgTimePerTask:t.length>0?r/t.length:0}}async calculateStatsForRange(t,r){let i=(await this.getAllTasks()).filter(l=>{if(l.timeEntries&&l.timeEntries.length>0)return l.timeEntries.some(c=>{if(!c.startTime)return!1;let d=new Date(c.startTime);return d>=t&&d<=r});if(l.completedDate){let c=new Date(l.completedDate);return c>=t&&c<=r}if(l.dateCreated){let c=new Date(l.dateCreated);return c>=t&&c<=r}return!1}),s=this.calculateOverallStats(i),o=this.calculateProjectStats(i);return{overall:s,projects:o}}calculateProjectStats(t){let r=new Map;for(let s of t){let o=oi(s.timeEntries||[]),l=s.timeEstimate||0,c=this.plugin.statusManager.isCompletedStatus(s.status),d;s.timeEntries&&s.timeEntries.length>0?d=[...s.timeEntries].sort((m,f)=>new Date(f.startTime).getTime()-new Date(m.startTime).getTime())[0].startTime:s.completedDate?d=s.completedDate:s.dateModified&&(d=s.dateModified);let u=this.getTaskProjects(s);for(let p of u){r.has(p)||r.set(p,{tasks:[],totalTime:0,totalTimeEstimate:0,completedCount:0,lastActivity:void 0});let m=r.get(p);m&&(m.tasks.push(s),m.totalTime+=o,m.totalTimeEstimate+=l,c&&m.completedCount++,d&&(!m.lastActivity||new Date(d)>new Date(m.lastActivity))&&(m.lastActivity=d))}}let a=[];for(let[s,o]of r.entries())a.push({projectName:s,totalTimeSpent:o.totalTime,totalTimeEstimate:o.totalTimeEstimate,taskCount:o.tasks.length,completedTaskCount:o.completedCount,avgTimePerTask:o.tasks.length>0?o.totalTime/o.tasks.length:0,lastActivity:o.lastActivity});let i=this.plugin.i18n.translate("views.stats.noProject");return a.sort((s,o)=>s.projectName===i?1:o.projectName===i?-1:o.totalTimeSpent-s.totalTimeSpent),a}renderFilters(){if(!this.filtersEl)return;this.filtersEl.empty();let t=this.filtersEl.createDiv({cls:"stats-view__filter-grid"}),r=t.createDiv({cls:"stats-view__filter-item"}),a=r.createDiv({cls:"stats-view__filter-label"});a.textContent=this.plugin.i18n.translate("views.stats.sections.dateRange");let i=r.createEl("select",{cls:"stats-view__filter-select"}),s=[{value:"all",text:this.plugin.i18n.translate("views.stats.timeRanges.allTime")},{value:"7days",text:this.plugin.i18n.translate("views.stats.timeRanges.last7Days")},{value:"30days",text:this.plugin.i18n.translate("views.stats.timeRanges.last30Days")},{value:"90days",text:this.plugin.i18n.translate("views.stats.timeRanges.last90Days")},{value:"custom",text:this.plugin.i18n.translate("views.stats.timeRanges.customRange")}];for(let m of s){let f=i.createEl("option",{value:m.value,text:m.text});m.value===this.currentFilters.dateRange&&(f.selected=!0)}this.registerDomEvent(i,"change",()=>{this.currentFilters.dateRange=i.value,this.renderCustomDateInputs(),this.applyFilters()});let o=t.createDiv({cls:"stats-view__custom-dates"});this.currentFilters.dateRange==="custom"&&this.renderCustomDateInputs(o);let l=t.createDiv({cls:"stats-view__filter-item"}),c=l.createDiv({cls:"stats-view__filter-label"});c.textContent=this.plugin.i18n.translate("views.stats.filters.minTime");let d=l.createEl("input",{cls:"stats-view__filter-input",type:"number",value:this.currentFilters.minTimeSpent.toString(),placeholder:"0"});this.registerDomEvent(d,"input",()=>{this.currentFilters.minTimeSpent=parseInt(d.value)||0,this.applyFilters()});let p=t.createDiv({cls:"stats-view__filter-buttons"}).createEl("button",{cls:"stats-view__filter-button stats-view__filter-button--reset",text:this.plugin.i18n.translate("views.stats.resetFiltersButton")});this.registerDomEvent(p,"click",()=>{this.currentFilters=Ek(),this.renderFilters(),this.applyFilters()})}renderCustomDateInputs(t){var a;let r=t||((a=this.filtersEl)==null?void 0:a.querySelector(".stats-view__custom-dates"));if(r&&(r.empty(),this.currentFilters.dateRange==="custom")){let i=r.createDiv({cls:"stats-view__date-input-container"});i.createDiv({cls:"stats-view__date-label",text:this.plugin.i18n.translate("views.stats.dateRangeFrom")});let s=i.createEl("input",{cls:"stats-view__date-input",type:"date",value:this.currentFilters.customStartDate||""}),o=r.createDiv({cls:"stats-view__date-input-container"});o.createDiv({cls:"stats-view__date-label",text:this.plugin.i18n.translate("views.stats.dateRangeTo")});let l=o.createEl("input",{cls:"stats-view__date-input",type:"date",value:this.currentFilters.customEndDate||""});this.registerDomEvent(s,"change",()=>{this.currentFilters.customStartDate=s.value,this.applyFilters()}),this.registerDomEvent(l,"change",()=>{this.currentFilters.customEndDate=l.value,this.applyFilters()})}}async applyFilters(){this.savePersistedFilters(),this.debounceTimeout&&window.clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout(()=>{(async()=>(await this.refreshStats(),this.debounceTimeout=null))()},300)}isCacheValid(){return Date.now()-this.lastCacheTime<this.CACHE_DURATION}clearCache(){this.statsCache.clear(),this.lastCacheTime=0}getTaskProjects(t){try{return uGe(t.projects,{noProjectLabel:this.plugin.i18n.translate("views.stats.noProject"),consolidateProjectName:r=>this.consolidateProjectName(r),isArchivedProjectReference:r=>this.isArchivedProjectReference(r)})}catch(r){return[this.plugin.i18n.translate("views.stats.noProject")]}}getFilterDateRange(){let t=Xt();switch(this.currentFilters.dateRange){case"7days":return{start:Vo(Hg(t,7)),end:sb(t)};case"30days":return{start:Vo(Hg(t,30)),end:sb(t)};case"90days":return{start:Vo(Hg(t,90)),end:sb(t)};case"custom":return{start:this.currentFilters.customStartDate?new Date(`${this.currentFilters.customStartDate}T00:00:00`):void 0,end:this.currentFilters.customEndDate?new Date(`${this.currentFilters.customEndDate}T23:59:59.999`):void 0};case"all":default:return{}}}renderOverviewStats(t,r){t.empty();let a=h=>{if(h<60)return`${Math.round(h)}m`;let g=Math.floor(h/60),v=Math.round(h%60);return v>0?`${g}h ${v}m`:`${g}h`},i=t.createDiv({cls:"stats-overview-card stats-view__overview-card"}),s=i.createDiv({cls:"overview-value stats-view__overview-value"});s.textContent=`${a(r.totalTimeSpent)} / ${a(r.totalTimeEstimate)}`,i.createDiv({cls:"overview-label stats-view__overview-label",text:this.plugin.i18n.translate("views.stats.cards.timeTrackedEstimated")});let o=t.createDiv({cls:"stats-overview-card stats-view__overview-card"}),l=o.createDiv({cls:"overview-value stats-view__overview-value"});l.textContent=r.totalTasks.toString(),o.createDiv({cls:"overview-label stats-view__overview-label",text:this.plugin.i18n.translate("views.stats.cards.totalTasks")});let c=t.createDiv({cls:"stats-overview-card stats-view__overview-card"}),d=c.createDiv({cls:"overview-value stats-view__overview-value"});d.textContent=`${Math.round(r.completionRate)}%`,c.createDiv({cls:"overview-label stats-view__overview-label",text:this.plugin.i18n.translate("views.stats.cards.completionRate")});let u=t.createDiv({cls:"stats-overview-card stats-view__overview-card"}),p=u.createDiv({cls:"overview-value stats-view__overview-value"});p.textContent=r.activeProjects.toString(),u.createDiv({cls:"overview-label stats-view__overview-label",text:this.plugin.i18n.translate("views.stats.cards.activeProjects")});let m=t.createDiv({cls:"stats-overview-card stats-view__overview-card"}),f=m.createDiv({cls:"overview-value stats-view__overview-value"});f.textContent=a(r.avgTimePerTask),m.createDiv({cls:"overview-label stats-view__overview-label",text:this.plugin.i18n.translate("views.stats.cards.avgTimePerTask")})}renderTimeRangeStats(t,r){t.empty();let a=c=>{if(c<60)return`${Math.round(c)}m`;let d=Math.floor(c/60),u=Math.round(c%60);return u>0?`${d}h ${u}m`:`${d}h`},i=t.createDiv({cls:"stats-stat-card stats-view__stat-card"});i.createDiv({cls:"stat-value stats-view__stat-value",text:`${a(r.overall.totalTimeSpent)} / ${a(r.overall.totalTimeEstimate)}`}),i.createDiv({cls:"stat-label stats-view__stat-label",text:this.plugin.i18n.translate("views.stats.cards.timeTrackedEstimated")});let s=t.createDiv({cls:"stats-stat-card stats-view__stat-card"});s.createDiv({cls:"stat-value stats-view__stat-value",text:r.overall.totalTasks.toString()}),s.createDiv({cls:"stat-label stats-view__stat-label",text:this.plugin.i18n.translate("views.stats.labels.tasks")});let o=t.createDiv({cls:"stats-stat-card stats-view__stat-card"});o.createDiv({cls:"stat-value stats-view__stat-value",text:r.overall.completedTasks.toString()}),o.createDiv({cls:"stat-label stats-view__stat-label",text:this.plugin.i18n.translate("views.stats.labels.completed")});let l=t.createDiv({cls:"stats-stat-card stats-view__stat-card"});l.createDiv({cls:"stat-value stats-view__stat-value",text:r.overall.activeProjects.toString()}),l.createDiv({cls:"stat-label stats-view__stat-label",text:this.plugin.i18n.translate("views.stats.labels.projects")})}async renderProjectStats(t,r){if(t.empty(),r.length===0){t.createDiv({cls:"stats-no-data stats-view__no-data",text:this.plugin.i18n.translate("views.stats.noProjectData")});return}let a=s=>{if(s<60)return`${Math.round(s)}m`;let o=Math.floor(s/60),l=Math.round(s%60);return l>0?`${o}h ${l}m`:`${o}h`},i=s=>{if(!s)return this.plugin.i18n.translate("views.stats.notAvailable");try{let o=new Date(s);return D(o,"MMM d, yyyy")}catch(o){return this.plugin.i18n.translate("views.stats.notAvailable")}};for(let s of r){let o=["stats-project-item","stats-view__project-item","stats-view__project-item--clickable"];s.projectName===this.plugin.i18n.translate("views.stats.noProject")&&o.push("stats-view__project-item--no-project");let l=t.createDiv({cls:o.join(" ")});this.registerDomEvent(l,"click",()=>{this.openProjectDrilldown(s.projectName)});let c=l.createDiv({cls:"stats-view__project-header"}),d=c.createDiv({cls:"project-name stats-view__project-name"});d.textContent=s.projectName,c.createDiv({cls:"stats-view__click-indicator",text:"→"});let u=s.taskCount>0?s.completedTaskCount/s.taskCount*100:0,p=l.createDiv({cls:"stats-view__project-content-grid"}),m=p.createDiv({cls:"stats-view__progress-container"});this.renderProgressCircle(m,u,s.completedTaskCount,s.taskCount);let f=p.createDiv({cls:"stats-view__stats-container"});if(s.totalTimeSpent>0||s.totalTimeEstimate>0){let k=f.createDiv({cls:"stats-view__time-bar"}),b=k.createDiv({cls:"stats-view__time-bar-visual"}).createDiv({cls:"stats-view__time-bar-fill"}),w=0;s.totalTimeEstimate>0?w=s.totalTimeSpent/s.totalTimeEstimate*100:s.totalTimeSpent>0&&(w=100,b.classList.remove("tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-red-134bc721","tn-static-background-color-var-text-accent-a954c70f"),b.classList.add("tn-static-background-color-var-color-base-40-ef5f175e")),b.style.width=`${Math.min(w,100)}%`,w>100&&(b.classList.remove("tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-text-accent-a954c70f"),b.classList.add("tn-static-background-color-var-color-red-134bc721"));let S=k.createDiv({cls:"stats-view__time-bar-label"});S.textContent=`${a(s.totalTimeSpent)} / ${a(s.totalTimeEstimate)}`}let h=f.createDiv({cls:"project-stats stats-view__project-stats"});if(s.lastActivity){let k=h.createDiv({cls:"project-stat stats-view__project-stat"});k.textContent=`Last activity: ${i(s.lastActivity)}`}if(s.avgTimePerTask>0){let k=h.createDiv({cls:"project-stat stats-view__project-stat"});k.textContent=`Avg: ${a(s.avgTimePerTask)}/task`}let g=f.createDiv({cls:"stats-view__trend-container"}),v=g.createDiv({cls:"stats-view__sparkline"});try{let k=await this.calculateProjectTrend(s.projectName);k.length>0&&k.some(T=>T.value>0)?this.renderSparkline(v,k):g.remove()}catch(k){g.remove()}}}renderProgressCircle(t,r,a,i){let c=2*Math.PI*27.5,d=c-r/100*c,u=activeWindow.createSvg("svg");u.setAttribute("width","60"),u.setAttribute("height","60"),u.setAttribute("viewBox","0 0 60 60"),u.classList.add("stats-view__progress-circle-svg");let p=activeWindow.createSvg("circle");p.setAttribute("cx",(60/2).toString()),p.setAttribute("cy",(60/2).toString()),p.setAttribute("r",27.5.toString()),p.classList.add("stats-view__progress-circle-bg");let m=activeWindow.createSvg("circle");m.setAttribute("cx",(60/2).toString()),m.setAttribute("cy",(60/2).toString()),m.setAttribute("r",27.5.toString()),m.setAttribute("stroke-dasharray",`${c} ${c}`),m.setAttribute("stroke-dashoffset",d.toString()),m.classList.add("stats-view__progress-circle-fg");let f=activeWindow.createSvg("text");f.setAttribute("x","50%"),f.setAttribute("y","50%"),f.setAttribute("dy","0.3em"),f.setAttribute("text-anchor","middle"),f.classList.add("stats-view__progress-circle-text"),f.textContent=`${Math.round(r)}%`,u.appendChild(p),u.appendChild(m),u.appendChild(f),t.appendChild(u);let h=t.createDiv({cls:"stats-view__progress-label"});h.textContent=`${a}/${i} tasks`}async calculateProjectTrend(t){try{let r=this.plugin.cacheManager.getAllTaskPaths(),a=[];for(let o of r)try{let l=await this.plugin.cacheManager.getTaskInfo(o);l&&!l.archived&&this.getTaskProjects(l).includes(t)&&a.push(l)}catch(l){}let i=[],s=Xt();for(let o=29;o>=0;o--){let l=Hg(s,o),c=D(l,"yyyy-MM-dd"),d=0;for(let u of a)if(u.timeEntries)for(let p of u.timeEntries)p.startTime&&D(new Date(p.startTime),"yyyy-MM-dd")===c&&(d+=oi([p]));i.push({date:c,value:d})}return i}catch(r){return[]}}renderSparkline(t,r){if(t.empty(),r.length===0)return;let a=100,i=20,s=Math.max(...r.map(d=>d.value));if(s===0)return;let o=activeWindow.createSvg("svg");o.setAttribute("width",a.toString()),o.setAttribute("height",i.toString()),o.setAttribute("viewBox",`0 0 ${a} ${i}`),o.classList.add("stats-view__sparkline-svg");let l=activeWindow.createSvg("path"),c="";r.forEach((d,u)=>{let p=u/(r.length-1)*a,m=i-d.value/s*i;u===0?c+=`M ${p} ${m}`:c+=` L ${p} ${m}`}),l.setAttribute("d",c),l.setAttribute("fill","none"),l.setAttribute("stroke","currentColor"),l.setAttribute("stroke-width","1.5"),l.setAttribute("opacity","0.7"),o.appendChild(l),t.appendChild(o)}async openProjectDrilldown(t){this.closeDrilldownModal();let r=this.contentEl.ownerDocument,a=r.body.createDiv({cls:"stats-view__modal-backdrop"});this.drilldownModal=a;let i=a.createDiv({cls:"stats-view__modal tasknotes-plugin"}),s=i.createDiv({cls:"stats-view__modal-header"}),o=s.createDiv({cls:"stats-view__modal-title"});o.textContent=`${t} - Detailed View`;let l=s.createEl("button",{cls:"stats-view__modal-close",text:"×"}),c=i.createDiv({cls:"stats-view__modal-content"});c.textContent=this.plugin.i18n.translate("views.stats.loading"),this.registerDomEvent(l,"click",()=>this.closeDrilldownModal()),this.registerDomEvent(a,"click",u=>{u.target===a&&this.closeDrilldownModal()});let d=u=>{u.key==="Escape"&&(this.closeDrilldownModal(),r.removeEventListener("keydown",d))};r.addEventListener("keydown",d);try{let u=await this.getProjectDrilldownData(t);this.currentDrilldownData=u,this.renderDrilldownContent(c,u)}catch(u){tE.error("Error loading drill-down data:",{category:"persistence",operation:"loading-drill-down-data",error:u}),c.textContent=this.plugin.i18n.translate("notices.statsLoadingFailed")}}closeDrilldownModal(){this.drilldownModal&&(this.drilldownModal.remove(),this.drilldownModal=null,this.currentDrilldownData=null)}async refreshDrilldownModal(){if(!this.drilldownModal||!this.currentDrilldownData)return;let t=this.drilldownModal.querySelector(".stats-view__modal-content");if(t)try{let r=await this.getProjectDrilldownData(this.currentDrilldownData.projectName);this.currentDrilldownData=r,this.renderDrilldownContent(t,r)}catch(r){tE.error("Error refreshing drill-down modal:",{category:"stale-data",operation:"refreshing-drill-down-modal",error:r})}}async getProjectDrilldownData(t){var p;let r=this.plugin.cacheManager.getAllTaskPaths(),a=[];for(let m of r)try{let f=await this.plugin.cacheManager.getTaskInfo(m);f&&!f.archived&&this.getTaskProjects(f).includes(t)&&a.push(f)}catch(f){tE.error(`Failed to get task for drill-down: ${m}`,{category:"persistence",operation:"get-task-drill-down",error:f})}let i=a.reduce((m,f)=>m+oi(f.timeEntries||[]),0),s=a.reduce((m,f)=>m+(f.timeEstimate||0),0),o=a.filter(m=>this.plugin.statusManager.isCompletedStatus(m.status)).length,l=a.length>0?o/a.length*100:0,c=a.filter(m=>{var f;return((f=m.timeEntries)==null?void 0:f.length)||m.completedDate}).sort((m,f)=>{var v,k;let h=(v=m.timeEntries)!=null&&v.length?Math.max(...m.timeEntries.map(T=>new Date(T.startTime).getTime())):m.completedDate?new Date(m.completedDate).getTime():0;return((k=f.timeEntries)!=null&&k.length?Math.max(...f.timeEntries.map(T=>new Date(T.startTime).getTime())):f.completedDate?new Date(f.completedDate).getTime():0)-h}).slice(0,10),d=[],u=Xt();for(let m=29;m>=0;m--){let f=Hg(u,m),h=D(f,"yyyy-MM-dd"),g=0,v=0,k=0;for(let T of a){if(T.timeEntries){let b=T.timeEntries.filter(w=>D(new Date(w.startTime),"yyyy-MM-dd")===h);b.length>0&&(g+=oi(b),v++)}T.completedDate&&D(new Date(T.completedDate),"yyyy-MM-dd")===h&&(k++,(p=T.timeEntries)!=null&&p.some(b=>D(new Date(b.startTime),"yyyy-MM-dd")===h)||v++)}d.push({date:h,timeSpent:g,taskCount:v,completedTasks:k})}return{projectName:t,tasks:a,totalTimeSpent:i,totalTimeEstimate:s,completionRate:l,timeByDay:d,recentActivity:c}}renderDrilldownContent(t,r){t.empty();let a=w=>{if(w<60)return`${Math.round(w)}m`;let S=Math.floor(w/60),C=Math.round(w%60);return C>0?`${S}h ${C}m`:`${S}h`},s=t.createDiv({cls:"stats-view__drilldown-overview"}).createDiv({cls:"stats-view__drilldown-stats"}),o=s.createDiv({cls:"stats-view__drilldown-card"});o.createDiv({cls:"stats-view__drilldown-value",text:`${a(r.totalTimeSpent)} / ${a(r.totalTimeEstimate)}`}),o.createDiv({cls:"stats-view__drilldown-label",text:"Total Time"});let l=s.createDiv({cls:"stats-view__drilldown-card"});l.createDiv({cls:"stats-view__drilldown-value",text:r.tasks.length.toString()}),l.createDiv({cls:"stats-view__drilldown-label",text:"Total Tasks"});let c=s.createDiv({cls:"stats-view__drilldown-card"});c.createDiv({cls:"stats-view__drilldown-value",text:`${Math.round(r.completionRate)}%`}),c.createDiv({cls:"stats-view__drilldown-label",text:"Completed"});let d=s.createDiv({cls:"stats-view__drilldown-card"}),u=r.tasks.length>0?r.totalTimeSpent/r.tasks.length:0,p=r.tasks.length>0?r.totalTimeEstimate/r.tasks.length:0;d.createDiv({cls:"stats-view__drilldown-value",text:`${a(u)} / ${a(p)}`}),d.createDiv({cls:"stats-view__drilldown-label",text:"Avg per Task"});let m=t.createDiv({cls:"stats-view__drilldown-section"});m.createDiv({cls:"stats-view__drilldown-heading",text:"Activity Over Time (Last 30 Days)"});let f=m.createDiv({cls:"stats-view__activity-chart"});this.renderActivityChart(f,r.timeByDay);let h=t.createDiv({cls:"stats-view__drilldown-section"}),g=h.createDiv({cls:"stats-view__section-header"});g.createDiv({cls:"stats-view__drilldown-heading",text:"All Project Tasks"});let k=g.createDiv({cls:"stats-view__task-filters"}).createEl("select",{cls:"stats-view__filter-select"});k.createEl("option",{value:"all",text:this.plugin.i18n.translate("views.stats.filters.allTasks")}),k.createEl("option",{value:"active",text:this.plugin.i18n.translate("views.stats.filters.activeOnly")}),k.createEl("option",{value:"completed",text:this.plugin.i18n.translate("views.stats.filters.completedOnly")});let T=h.createDiv({cls:"stats-view__task-list"}),b=(w="all")=>{T.empty();let S=r.tasks;if(w==="active"?S=r.tasks.filter(x=>!this.plugin.statusManager.isCompletedStatus(x.status)):w==="completed"&&(S=r.tasks.filter(x=>this.plugin.statusManager.isCompletedStatus(x.status))),S.sort((x,E)=>{let _=this.plugin.statusManager.isCompletedStatus(x.status),F=this.plugin.statusManager.isCompletedStatus(E.status);if(_!==F)return _?1:-1;let I=A=>{var R;return(R=A.timeEntries)!=null&&R.length?Math.max(...A.timeEntries.map(O=>new Date(O.startTime).getTime())):A.dateModified?new Date(A.dateModified).getTime():0};return I(E)-I(x)}),S.length===0){T.createDiv({cls:"stats-view__no-data",text:this.plugin.i18n.translate("views.stats.noTasks")});return}let C=T.createDiv({cls:"stats-view__task-count"});C.textContent=`Showing ${S.length} task${S.length!==1?"s":""}`;for(let x of S){let E=this.plugin.settings.defaultVisibleProperties?di(this.plugin.settings.defaultVisibleProperties,this.plugin):void 0,_=pr(x,this.plugin,E);T.appendChild(_)}};b("all"),this.registerDomEvent(k,"change",()=>{b(k.value)})}renderActivityChart(t,r){if(t.empty(),r.length===0)return;let a=Math.max(...r.map(s=>s.timeSpent));if(a===0){t.createDiv({cls:"stats-view__no-data",text:"No time tracking data"});return}let i=t.createDiv({cls:"stats-view__bar-chart"});for(let s of r){let l=i.createDiv({cls:"stats-view__bar-container"}).createDiv({cls:"stats-view__bar"}),c=s.timeSpent/a*40;l.style.height=`${c}px`;let d=`${D(new Date(s.date),"MMM d")}: ${Math.round(s.timeSpent)}m`;l.setAttribute("title",d)}}}});var Wye,qye=y(()=>{Wye=`## TaskNotes v5 and the TaskNotes app — join the beta
**TaskNotes v5** introduces portable collections that you can use in both Obsidian and the new **TaskNotes app**. Your tasks remain ordinary Markdown files in your vault, with [mdbase Connect](https://mdbase.dev/connect/) providing access from the app.
Available to try now:
- **[Try the TaskNotes v5 plugin beta](https://github.com/callumalpass/tasknotes/releases/tag/5.0.0-beta.2)**
- **[Try the TaskNotes web app](https://app.tasknotes.dev/)**
- **[Download TaskNotes for iOS](https://apps.apple.com/app/tasknotes/id6797168033)**
These are early releases under active development. Please back up your vault before trying them and [report any problems](https://github.com/callumalpass/tasknotes/issues). TaskNotes 4.13 remains the recommended stable plugin release.
### Help bring TaskNotes to Android
**We need at least 12 testers for the TaskNotes Android app before we can apply for a public Google Play release.**
If you have an Android device and would like to help:
1. **[Join the tester Google Group](https://groups.google.com/g/tasknotes-android-testers)** using the Google account you use for Google Play.
2. **[Opt in to the Google Play test](https://play.google.com/apps/testing/dev.tasknotes.app)** with that same account and install TaskNotes.
3. Stay opted in for **at least 14 consecutive days**, use the app regularly during that time, and let us know how it goes.
You don’t need to be a developer—using TaskNotes for your everyday tasks and sharing anything confusing or broken is valuable feedback. Your participation will help make the Android release possible.
`});function pGe(n,e=AW){return n.replace(/\(((?:#\d+\s*)(?:,\s*#\d+\s*)*)\)/g,(t,r)=>`(${r.split(",").map(i=>i.trim()).filter(Boolean).map(i=>{let s=i.slice(1);return`[#${s}](${e}/issues/${s})`}).join(", ")})`)}var rE,nE,Gye,AW,CR,MW=y(()=>{rE=require("obsidian");Cr();qye();nE="tasknotes-release-notes",Gye="https://github.com/callumalpass/tasknotes/releases",AW="https://github.com/callumalpass/tasknotes";CR=class extends rE.ItemView{constructor(e,t,r,a){super(e),this.plugin=t,this.releaseNotesBundle=r,this.version=a}getViewType(){return nE}getDisplayText(){return this.plugin.i18n.translate("views.releaseNotes.title",{version:this.version})}getIcon(){return"book-open"}transformIssueLinks(e){return pGe(e)}formatDate(e){if(!e)return"";try{let t=Na(e);return D(t,"MMMM d, yyyy")}catch(t){return""}}async renderVersionContent(e,t){let r=t.content.replace(/^> \[!info\] TaskNotes v5 beta\r?\n(?:>[^\n]*(?:\n|$))*/gm,""),a=this.transformIssueLinks(r),i=t.isCurrent?`${this.plugin.i18n.translate("views.releaseNotes.baseFilesNotice")}
${a}`:a;await rE.MarkdownRenderer.render(this.plugin.app,i,e,"",this)}async createVersionSection(e,t,r){let a=e.createDiv({cls:"release-notes-version-section"});a.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-8px-fdf33f23"),a.classList.add("tn-static-margin-bottom-20px-49f14f8f"),a.classList.remove("tn-static-border-none-2eda1daa","tn-static-padding-12px-43bef435"),a.classList.add("tn-static-border-1px-solid-var-background-mo-b65b5121"),a.classList.remove("tn-static-border-radius-4px-c290c56e","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),a.classList.add("tn-static-border-radius-6px-0dc8408c"),a.classList.remove("tn-static-flex-1-14e3b769"),a.classList.add("tn-static-overflow-hidden-69824400");let i=a.createDiv({cls:"release-notes-version-header"});i.classList.remove("tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),i.classList.add("tn-static-padding-16px-287f770e"),i.classList.remove("tn-static-cursor-grab-dad79857","tn-static-cursor-pointer-2723efcc"),i.classList.add("tn-static-cursor-pointer-3b6a3a65"),i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-flex-75816cae"),i.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-flex-end-455f8cca"),i.classList.add("tn-static-justify-content-space-between-a562f4fd"),i.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),i.classList.add("tn-static-align-items-center-7c619740"),i.style.backgroundColor=t.isCurrent?"var(--background-secondary)":"var(--background-primary)",i.classList.add("tn-static-transition-background-color-0-2s-8142f01e"),i.addEventListener("mouseenter",()=>{i.classList.remove("tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-color-red-134bc721","tn-static-background-color-var-text-accent-a954c70f"),i.classList.add("tn-static-background-color-var-background-se-9087a23e")}),i.addEventListener("mouseleave",()=>{i.style.backgroundColor=t.isCurrent?"var(--background-secondary)":"var(--background-primary)"});let s=i.createDiv({cls:"release-notes-version-info"});s.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),s.classList.add("tn-static-display-flex-75816cae"),s.classList.remove("tn-static-align-items-center-7c619740","tn-static-align-items-flex-start-0486f781"),s.classList.add("tn-static-align-items-baseline-4b95b5c7"),s.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-10px-f3d7ce77","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),s.classList.add("tn-static-gap-12px-ed7b3d87");let o=s.createEl("h2",{text:t.version});if(o.classList.remove("tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),o.classList.add("tn-static-margin-0-11696618"),o.classList.remove("tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-0-9em-65025e95","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-font-size-var-tn-font-size-sm-0274a31d","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),o.classList.add("tn-static-font-size-1-2em-3a352995"),o.classList.remove("tn-static-cursor-pointer-2723efcc","tn-static-font-weight-500-02a2d333","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd"),o.classList.add("tn-static-font-weight-600-eed0f8fb"),t.isCurrent){let p=s.createSpan({text:"Current"});p.classList.remove("tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-0-9em-65025e95","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-font-size-var-tn-font-size-sm-0274a31d","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),p.classList.add("tn-static-font-size-0-75em-948e16e5"),p.classList.remove("tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2rem-42aa6d9c"),p.classList.add("tn-static-padding-2px-8px-c8eea84a"),p.classList.remove("tn-static-border-radius-6px-0dc8408c","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),p.classList.add("tn-static-border-radius-4px-c290c56e"),p.classList.remove("tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-color-red-134bc721"),p.classList.add("tn-static-background-color-var-text-accent-a954c70f"),p.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),p.classList.add("tn-static-color-var-text-on-accent-f3e1679d"),p.classList.remove("tn-static-cursor-pointer-2723efcc","tn-static-font-weight-600-eed0f8fb","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd"),p.classList.add("tn-static-font-weight-500-02a2d333")}if(t.date){let p=s.createSpan({text:this.formatDate(t.date)});p.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),p.classList.add("tn-static-color-var-text-muted-5872de20"),p.classList.remove("tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-font-size-var-tn-font-size-sm-0274a31d","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),p.classList.add("tn-static-font-size-0-9em-65025e95")}let l=i.createSpan({text:r?"▼":"▶"});l.classList.remove("tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-9em-65025e95","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-font-size-var-tn-font-size-sm-0274a31d","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),l.classList.add("tn-static-font-size-0-8em-19dc7c13"),l.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),l.classList.add("tn-static-color-var-text-muted-5872de20");let c=a.createDiv({cls:"release-notes-version-content"});c.classList.remove("tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),c.classList.add("tn-static-padding-0-16px-16px-16px-f1aa998c"),c.style.display=r?"block":"none";let d=null,u=()=>(d||(d=this.renderVersionContent(c,t)),d);r&&await u(),i.addEventListener("click",()=>{let p=c.style.display!=="none";c.style.display=p?"none":"block",l.textContent=p?"▶":"▼",p||u()})}async onOpen(){let{contentEl:e}=this;e.empty(),e.addClass("tasknotes-release-notes-view");let t=e.createDiv({cls:"tasknotes-release-notes-container"});t.classList.remove("tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),t.classList.add("tn-static-padding-20px-769fed37"),t.classList.add("tn-static-max-width-900px-1d34c094"),t.classList.remove("tn-static-margin-0-11696618","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),t.classList.add("tn-static-margin-0-auto-266e9b04");let r=t.createDiv({cls:"release-notes-header"});r.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-8px-fdf33f23"),r.classList.add("tn-static-margin-bottom-20px-49f14f8f"),r.createEl("h1",{text:this.plugin.i18n.translate("views.releaseNotes.header",{version:this.version})});let a=t.createEl("p");a.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-8px-fdf33f23"),a.classList.add("tn-static-margin-bottom-20px-49f14f8f"),a.classList.remove("tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-font-size-var-tn-font-size-sm-0274a31d","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),a.classList.add("tn-static-font-size-0-9em-65025e95"),a.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),a.classList.add("tn-static-color-var-text-muted-5872de20");let i=this.plugin.i18n.translate("views.releaseNotes.starMessage"),s=i.toLowerCase().lastIndexOf("github");if(s!==-1){a.appendText(i.substring(0,s));let u=a.createEl("a",{text:i.substring(s,s+6),href:AW});u.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),u.classList.add("tn-static-color-var-text-accent-65b47ee3"),u.addEventListener("click",p=>{p.preventDefault(),window.open(AW,"_blank")}),a.appendText(i.substring(s+6))}else a.appendText(i);let o=t.createEl("section",{cls:"release-notes-announcement"});await rE.MarkdownRenderer.render(this.plugin.app,Wye,o,"",this);let l=t.createDiv({cls:"release-notes-versions"});for(let u=0;u<this.releaseNotesBundle.length;u++){let p=this.releaseNotesBundle[u],m=p.isCurrent||u===0;await this.createVersionSection(l,p,m)}let c=t.createDiv({cls:"release-notes-footer"});c.classList.add("tn-static-border-top-1px-solid-var-backgroun-aab7c2ca"),c.classList.add("tn-static-padding-top-20px-49826953"),c.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),c.classList.add("tn-static-margin-top-30px-2fbbbcd4"),c.classList.remove("tn-static-padding-20px-7a035d95"),c.classList.add("tn-static-text-align-center-91a87015");let d=c.createEl("a",{text:this.plugin.i18n.translate("views.releaseNotes.viewAllLink"),href:Gye});d.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),d.classList.add("tn-static-color-var-text-accent-65b47ee3"),d.classList.remove("tn-static-text-decoration-line-through-7059a4e5"),d.classList.add("tn-static-text-decoration-none-80d654f9"),d.addEventListener("click",u=>{u.preventDefault(),window.open(Gye,"_blank")})}async onClose(){let{contentEl:e}=this;e.empty()}}});var Yye,Kye=y(()=>{Yye=`# TaskNotes 4.13.5
## Fixed
- (#2360) Preserve expanded and collapsed settings cards when the settings interface is rebuilt. Thanks to @pankevely for reporting the loss of expanded sections.
- (#2364) Fixed the calendar creation menu opening off-screen after selecting a time range by touch. Thanks to @saschaobsidian for reporting the iPad issue.
- (#2361) Fixed Kanban formula swimlanes showing **None** when first opening a view. Thanks to @iantierney for reporting and recording the issue.
- (#2362) Show every configured priority swimlane when empty swimlanes are visible, including priorities assigned only to hidden subtasks. Thanks to @iantierney for reporting. See [Kanban View](https://tasknotes.dev/views/kanban-view/).
- (#2359) Fixed task list cards retaining outdated metadata after property changes, including contexts, tags, and displayed Bases formula values. Thanks to @maks-io for reporting and investigating.
## Changed
- Clarified that dependencies store \`blockedBy\` and derive “Blocking”, separately from project/subtask membership. Thanks to @Dual1r for raising this in [discussion #2357](https://github.com/callumalpass/tasknotes/discussions/2357), and @Dani-8 for confirming the clarification. See [Dependencies](https://tasknotes.dev/features/task-management/#dependencies).
`});var Zye,Qye=y(()=>{Zye=`# TaskNotes 4.13.4
## Fixed
- ([Discussion #2355](https://github.com/callumalpass/tasknotes/discussions/2355)) Fixed Live Preview task links remaining as task widgets after removing a note's task-identifying tag or property, and links to the same task incorrectly sharing a heading label during cache refreshes. Inline task links now retain heading and block targets when opening the note. Thanks to @ZedLeb for reporting and providing the reproduction, and @identity-wael for helping investigate.
- (#2356) Reduced unnecessary Pomodoro timer rendering by removing progress-ring animation and redundant display updates. Hidden timers skip rendering, and warning pulses stop while paused. Improved view cleanup and timing accuracy across repeated pauses. Thanks to @akseliekseli for reporting the CPU usage issue.
- Corrected the desktop calendar sign-in dependency declaration. Electron remains provided by Obsidian and is not bundled with TaskNotes.
`});var Jye,Xye=y(()=>{Jye=`# TaskNotes 4.13.3
## Fixed
- (#2352) Fixed the task description editor being obscured by the mobile keyboard when creating a task. Thanks to @kmalakoff for reporting.
- (#2210, #2207) Fixed Task List manual drag-to-reorder failing to start or save the new order. Thanks to @dong-jichen and @mgrecar for reporting, and @kemalguvenc, @MatthiasSoell, and @bravely for confirming and helping narrow down the issue.
`});var eve,tve=y(()=>{eve=`# TaskNotes 4.13.2
## Added
- (#2349, #2127) Recurring tasks now create their first available occurrence note when “Create next after completion” is enabled. Completing the parent in the UI also uses occurrence notes, and new occurrence notes use unambiguous parent links across folders. Thanks to @raphaelfaouakhiri for the requests and investigation. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/#materialized-occurrence-notes).
- (#296) Added commands to start and stop time tracking for the current task note, usable from the Command Palette, hotkeys, and plugins such as Buttons. Thanks to @schosch-iteratec for the request and for sharing the Quick Actions workaround. See [Time Management](https://tasknotes.dev/features/time-management/).
## Security
- Updated dependencies to address reported security vulnerabilities.
## Fixed
- Fixed task dialogs falling back to plain text inputs when opened without an active note, including from release notes or in an empty vault.
- (#2347) Fixed subtasks created from the edit task modal ignoring the parent project when choosing their folder. Thanks to @iantierney for reporting.
`});var rve,nve=y(()=>{rve=`# TaskNotes 4.13.1
## Added
- (#2223, #2224) Added \`task-card__metadata-date--today\` and \`task-card__metadata-date--future\` CSS classes for due and scheduled dates. Completed past dates are not classified as future when overdue styling is hidden. Thanks to @chmac for the suggestion and contribution.
## Fixed
- (#2313) Fixed ICS meetings disappearing when another guest declined. Declined meetings are hidden only when the feed identifies the calendar owner's response; otherwise they remain visible. Refresh subscriptions after updating. See [Calendar Integration](https://tasknotes.dev/features/calendar-integration/#ics-calendar-subscriptions). Thanks to @benschifman for reporting and providing the reproduction.
- (#2203) Completing or skipping a recurring instance in the edit modal no longer creates a duplicate Google Calendar event when the scheduled date advances. Manual rescheduling still creates the appropriate moved occurrence. Thanks to @christenbc for the fix.
- (#2336) Reduced the plugin bundle below Obsidian Sync Standard's 5 MB per-file limit so it can sync between devices again, and removed duplicate bundled dependencies to leave more room for future updates. Thanks to @kmalakoff for reporting and @CyberBlaed for confirming.
- (#2335) Fixed date-like text in the current note’s folder or title being replaced when choosing a task folder with \`{{currentNotePath}}\` or \`{{currentNoteTitle}}\`. Date tokens written in the folder template still work. Thanks to @hikatamika for reporting.
- (#2301) Fixed clicking the Pomodoro timer display to edit its duration. Thanks to @minnyee for reporting and identifying the cause.
- (#2328) Fixed direct status edits on occurrence notes not updating the recurring parent’s completion history or creating the next occurrence when configured. Thanks to @mudnug for reporting this.
## Changed
- (#2329) Clarified how to generate a TaskNotes API token and configure Claude Desktop's MCP bearer authentication, including restart and token replacement instructions. See [HTTP API](https://tasknotes.dev/HTTP_API/#connecting-claude-desktop-with-mcp). Thanks to @kmaustral for reporting the setup confusion and confirming the solution.
`});var ave,ive=y(()=>{ave=`# TaskNotes 4.13.0
## Before updating
**HTTP API and MCP clients now require authentication.** If you previously connected without a token, copy the API token from **Settings → TaskNotes → Integrations** into your client's authentication settings. Requests must include \`Authorization: Bearer <token>\`. If the token is empty when the server starts, TaskNotes generates and saves one; leaving it empty no longer disables authentication. See [HTTP API](https://tasknotes.dev/HTTP_API/).
## Security
- (#2292) Required authentication for local API/MCP listeners. OAuth callbacks now use an OS-assigned loopback port, accept each authorization state only once, and return fixed pages without reflecting callback text. Thanks to @martin-forge for the hardening.
## Added
- Added a dedicated TaskNotes v5 and app beta section to the plugin's release notes, including instructions for joining the Android test. The announcement appears once rather than repeating inside individual versions.
- (#2147) Added context-menu actions for recording task completion today, on the scheduled date, on the due date, or on a chosen date. The actions can be grouped in a submenu from Appearance settings. See [Completing Tasks](https://tasknotes.dev/features/task-management/#completing-tasks).
- Rescheduling a recurring task can reactivate affected completed or skipped instances after confirmation. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/).
- Completion-date actions, submenu settings, and rescheduling confirmations are translated into all supported languages.
- Thanks to @renatomen for the contribution.
## Fixed
- (#2291) Preserved background task updates when saving an older task edit window, including recurring completion history and properties changed or removed elsewhere. Thanks to @martin-forge for the fix.
- (#2294) Stopped plugin startup when an existing settings file cannot be read, preserving it for recovery instead of starting services with default settings. Thanks to @GGlider for reporting settings loss in #1591 and @martin-forge for the fix.
- (#2322) Fixed metadata edits deleting the saved title when a filename cannot represent it, such as for long titles. Existing title properties are preserved on unrelated edits; this does not recover previously deleted titles. Thanks to @1dezer1 for reporting.
- (#2255, #2300) Fixed task cards repeatedly disappearing and being restored while scrolling in Reading mode, which could pull the note down to the bottom. Thanks to @logicelf for the diagnosis and @nelsonlove for the fix.
- (#2318) Kept calendar events chronological when a Base sort is configured, using Base order for tasks at the same time. Thanks to @ky1ejs for reporting #1411 and @martin-forge for the fix.
- (#2319) Avoided duplicate recurring-task projections when TaskNotes has recorded the original occurrence date of a calendar move. Completion and skip history remain visible when requested. Other move cases are unchanged. Thanks to @martin-forge for the fix.
- (#2309) Fixed Google calendars enabled through the \`primary\` alias using the wrong color, ignoring visibility toggles, or losing their calendar name on event cards and linked notes. Thanks to @martin-forge for the fix.
- (#2279) Fixed Google Calendar authorization stalling when the system browser opens but does not report back that it launched. Authorization now completes or times out independently, and overlapping attempts cannot stop the active connection attempt. Thanks to @DamienDLR for the diagnosis.
- (#2298, #2299) Kept timed recurrence anchors when saving custom recurrence or completing a completion-anchored instance. Timed anchors are written with \`Z\` and retain their time, including seconds, without a device-timezone conversion. Date-only rules and scheduled-anchor completion are unchanged. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/). Thanks to @wellsbk1 for reporting.
- (#2043, #2055) Fixed tasks created with the default Subtasks view's **+** button missing their project and immediately disappearing from the view. Thanks to @kudrmax for reporting and @ther12k for the initial fix.
- (#2284) Prevented repeated activation of instant checkbox conversion from creating duplicate TaskNotes while the first conversion is still in progress. Thanks to @doyoonear for reporting.
- (#2314) Fixed rescheduled ICS recurring events appearing at their original time and cancelled occurrences remaining visible. Thanks to @benschifman for reporting.
- (#1849) Fixed context menus stacking on top of each other. Only one menu stays open at a time, and clicking the same indicator again closes its menu. This previously applied to date fields only, and now covers priority, status, recurrence, reminders, task, ICS event, and batch menus. Thanks to @3zra47 for reporting and @YBKF for the contribution.
- (#2303) Removed the extra space after inline task links on desktop while retaining the task menu on touch devices. Thanks to @nelsonlove for the fix.
## Changed
- (#2316) Clarified the Google OAuth Desktop app setup and redirect-mismatch troubleshooting, including why fixed Web application redirect URLs are not reliable with dynamic callback ports. See [Calendar Setup](https://tasknotes.dev/calendar-setup/). Thanks to @TomaszGaweda for reporting and following up.
`});var sve,ove=y(()=>{sve=`# TaskNotes 4.12.5
## Fixed
- (#2255) Notes with an in-note task card no longer jump while scrolling in reading mode. The card is now restored only after scrolling settles instead of being re-injected every frame against Obsidian's virtualised reading view. Thanks to @logicelf for the detailed diagnosis.
- (#2256) Kanban swimlane order now follows the view's sort configuration again: with a formula or property sort applied, the swimlane holding the top-sorted task floats to the top of the board as it did before the swimlane ordering option was introduced. Thanks to @tsweezy for reporting this.
- (#2222) The TaskNotes settings tab bar now wraps to a second line instead of clipping the Integrations tab beside the documentation link on narrow settings panes. Thanks to @nextstitch and @YongcaiHuang for reporting this.
`});var lve,cve=y(()=>{lve=`# TaskNotes 4.12.4
> [!info] TaskNotes v5 beta
>
> [TaskNotes v5](https://github.com/callumalpass/tasknotes/releases/tag/5.0.0-beta.0) is available as an opt-in beta alongside TaskNotes 4.12. TaskNotes 4.12 remains the recommended stable release.
>
> The major change in v5 is support for portable TaskNotes collections. These collections can be used in both Obsidian and the [TaskNotes app](https://app.tasknotes.dev/), which is also available in beta, so the same tasks can be managed through either interface.
>
> TaskNotes collections are built on [mdbase](https://mdbase.dev/), a Markdown-native collection format. [mdbase Connect](https://mdbase.dev/connect/) provides the permissioned bridge that makes those collections available to the TaskNotes app. Your tasks remain ordinary Markdown files in your vault; mdbase adds a shared structure that compatible tools can understand.
>
> TaskNotes v5, mdbase Connect, and the TaskNotes app are all under active development. Please use a backed-up vault, expect some rough edges, and [report any problems you encounter](https://github.com/callumalpass/tasknotes/issues).
## Changed
- (#2187) Improved TaskNotes startup performance by allowing Bases registration to finish asynchronously. Thanks to @tgrosinger for the contribution.
## Fixed
- (#2232) Opening an occurrence note from a completion-anchored recurring task now
uses the task's scheduled occurrence date instead of defaulting to today. Thanks
to @chmac for reporting this.
- (#2247) Creating a new inline task now removes nested wikilink and Markdown-link
markup from the inserted task link's display text. Thanks to @bgk0018 for
reporting this.
- (#2231) Fixed Agenda views with \`showOverdueOnToday\` showing the same task twice
when both its scheduled and due dates were overdue. Thanks to @takashit16833 for
reporting this.
- (#2206) The time entry editor now opens much faster for tasks with many tracked
sessions by delaying the heavier description editor setup until a description
field is focused. Thanks to @Sapere-Kyle for reporting this.
- (#2239) Fixed Task List Bases embedded in mobile notes leaving a large blank gap
after the final task card. Thanks to @same774 for reporting this and @prethrive
for sharing a workaround.
- (#2238) The Relationships widget now stays below long Live Preview Dataview
tables and no longer appears twice after switching to Reading mode. Thanks to
@Romek1769 for reporting this.
- (#2250) Hardened Google Calendar task metadata updates: duplicate Google
Calendar fields are now repaired atomically without replacing concurrent task
edits, and synchronization finishing after a disconnect no longer writes stale
event metadata. Thanks to @3zra47 for reporting the corrupted task data that
prompted this review.
- (#2229) Google Calendar OAuth authorization now opens in the system browser
instead of Obsidian's Web Viewer, avoiding Google's 401 malformed-request
page in the in-app browser. Thanks to @prethrive for reporting this and
confirming the workaround.
- Skipping a recurring task instance from Task List or Kanban now records the
task's occurrence date instead of the view's current date. Thanks to
@renatomen for the contribution.
- (#2130) Tasks added by external sync while Obsidian is closed are now exported
to Google Calendar after TaskNotes starts. Thanks to @seththepeacock for
reporting this and @raphaelfaouakhiri for the contribution.
- (#2246) Fixed materialized recurring occurrences hiding occurrence-template filename suffixes in TaskNotes views. Thanks to @raphaelfaouakhiri for reporting and fixing this issue.
- (#2221) Fixed \`PUT /api/tasks/:id\` ignoring empty arrays for \`contexts\` and \`blockedBy\`: sending \`{"contexts": []}\` or \`{"blockedBy": []}\` now clears the corresponding frontmatter field instead of silently leaving the previous value in place. The deletion pass previously fired only on a literal \`undefined\`, which JSON cannot express, so HTTP clients had no way to clear these fields. Thanks to @tgrosinger for the contribution.
- (#2191) Completing or skipping a recurring occurrence that was moved earlier
than its original date no longer schedules that original date again. Thanks to
@martin-forge for the contribution.
- (#2193) Google Calendar event descriptions written with formatting now read as
plain text in event details, copied text, and generated notes, instead of
showing raw HTML tags. Paragraph breaks, list structure, and link addresses are
kept. Thanks to @martin-forge for the contribution.
- (#2192) Agenda and list cards for Google and Microsoft calendar events now
show the name of the calendar the event belongs to, instead of the generic
"Calendar" label. Thanks to @martin-forge for the contribution.
`});var dve,uve=y(()=>{dve=`# TaskNotes 4.12.3
> [!info] TaskNotes v5 beta
>
> [TaskNotes v5](https://github.com/callumalpass/tasknotes/releases/tag/5.0.0-beta.0) is available as an opt-in beta alongside TaskNotes 4.12. TaskNotes 4.12 remains the recommended stable release.
>
> The major change in v5 is support for portable TaskNotes collections. These collections can be used in both Obsidian and the [TaskNotes app](https://app.tasknotes.dev/), which is also available in beta, so the same tasks can be managed through either interface.
>
> TaskNotes collections are built on [mdbase](https://mdbase.dev/), a Markdown-native collection format. [mdbase Connect](https://mdbase.dev/connect/) provides the permissioned bridge that makes those collections available to the TaskNotes app. Your tasks remain ordinary Markdown files in your vault; mdbase adds a shared structure that compatible tools can understand.
>
> TaskNotes v5, mdbase Connect, and the TaskNotes app are all under active development. Please use a backed-up vault, expect some rough edges, and [report any problems you encounter](https://github.com/callumalpass/tasknotes/issues).
## Fixed
- (#2212) Fixed TaskNotes settings sections appearing offscreen or blank on
Obsidian 1.13 desktop. Thanks to @RafaQNunes for reporting this, and to
@m4to-3pe and @matthewrishii for confirming it remained in 4.12.2.
- (#2213) Runtime plugin-data updates now avoid writing when Obsidian cannot
safely read an existing TaskNotes \`data.json\`, preventing calendar sync,
Pomodoro, ICS, or auto-archive state writes from replacing saved settings.
Thanks to @3zra47 for the follow-up details and file-history evidence.
- (#2216) Fixed updated default Kanban Bases grouping every task into the
\`None\` column when grouping by status. The generated Kanban templates now use
the real status property, and existing Kanban files using \`task.status\` keep
grouping from TaskNotes task data. Thanks to @Esvorst for reporting this.
- (#2120, #2135) Long all-day event titles in Calendar week and day views now
truncate in the all-day row instead of stretching it vertically. Thanks to
@same774 and @ks-studio-net for reporting this, and to @Admorei for confirming
it remained in 4.12.2.
`});var pve,mve=y(()=>{pve=`# TaskNotes 4.12.2
> [!info] TaskNotes v5 beta
>
> [TaskNotes v5](https://github.com/callumalpass/tasknotes/releases/tag/5.0.0-beta.0) is available as an opt-in beta alongside TaskNotes 4.12. TaskNotes 4.12 remains the recommended stable release.
>
> The major change in v5 is support for portable TaskNotes collections. These collections can be used in both Obsidian and the [TaskNotes app](https://app.tasknotes.dev/), which is also available in beta, so the same tasks can be managed through either interface.
>
> TaskNotes collections are built on [mdbase](https://mdbase.dev/), a Markdown-native collection format. [mdbase Connect](https://mdbase.dev/connect/) provides the permissioned bridge that makes those collections available to the TaskNotes app. Your tasks remain ordinary Markdown files in your vault; mdbase adds a shared structure that compatible tools can understand.
>
> TaskNotes v5, mdbase Connect, and the TaskNotes app are all under active development. Please use a backed-up vault, expect some rough edges, and [report any problems you encounter](https://github.com/callumalpass/tasknotes/issues).
## Fixed
- (#2212) Fixed TaskNotes settings sections appearing pushed across the Obsidian settings pane on desktop. Thanks to @RafaQNunes for reporting this.
`});var fve,hve=y(()=>{fve=`# TaskNotes 4.12.1
> [!info] TaskNotes v5 beta
>
> [TaskNotes v5](https://github.com/callumalpass/tasknotes/releases/tag/5.0.0-beta.0) is available as an opt-in beta alongside TaskNotes 4.12. TaskNotes 4.12 remains the recommended stable release.
>
> The major change in v5 is support for portable TaskNotes collections. These collections can be used in both Obsidian and the [TaskNotes app](https://app.tasknotes.dev/), which is also available in beta, so the same tasks can be managed through either interface.
>
> TaskNotes collections are built on [mdbase](https://mdbase.dev/), a Markdown-native collection format. [mdbase Connect](https://mdbase.dev/connect/) provides the permissioned bridge that makes those collections available to the TaskNotes app. Your tasks remain ordinary Markdown files in your vault; mdbase adds a shared structure that compatible tools can understand.
>
> TaskNotes v5, mdbase Connect, and the TaskNotes app are all under active development. Please use a backed-up vault, expect some rough edges, and [report any problems you encounter](https://github.com/callumalpass/tasknotes/issues).
## Changed
- (#2204) Public documentation is now published from the dedicated \`tasknotes.dev\` repository. Plugin release notes and internal documentation remain in this repository.
- Updated compatibility with Obsidian's current plugin review and settings search.
## Fixed
- Fixed TaskNotes interface elements sometimes appearing in the wrong window when using Obsidian pop-out windows.
- Improved confirmation dialogs, icons, and modal styling to use Obsidian's current interface APIs.
`});var gve,yve=y(()=>{gve=`# TaskNotes 4.12.0
> [!info] TaskNotes v5 beta
>
> [TaskNotes v5](https://github.com/callumalpass/tasknotes/releases/tag/5.0.0-beta.0) is available as an opt-in beta alongside TaskNotes 4.12. TaskNotes 4.12 remains the recommended stable release.
>
> The major change in v5 is support for portable TaskNotes collections. These collections can be used in both Obsidian and the [TaskNotes app](https://app.tasknotes.dev/), which is also available in beta, so the same tasks can be managed through either interface.
>
> TaskNotes collections are built on [mdbase](https://mdbase.dev/), a Markdown-native collection format. [mdbase Connect](https://mdbase.dev/connect/) provides the permissioned bridge that makes those collections available to the TaskNotes app. Your tasks remain ordinary Markdown files in your vault; mdbase adds a shared structure that compatible tools can understand.
>
> TaskNotes v5, mdbase Connect, and the TaskNotes app are all under active development. Please use a backed-up vault, expect some rough edges, and [report any problems you encounter](https://github.com/callumalpass/tasknotes/issues).
## Security
- Calendar OAuth credentials and account tokens are now stored in Obsidian Secret Storage instead of TaskNotes' \`data.json\`, with automatic migration for existing connections. See [Calendar Integration](https://tasknotes.dev/features/calendar-integration/).
- Thanks to @mcuste for the contribution
- Updated bundled HTTP, address parsing, and schema validation dependencies to
versions containing their current security fixes.
## Added
- Added portable task attachment references. Attachments now round-trip as an
ordered \`attachments\` link list in task frontmatter and are exposed through
the TaskNotes model and runtime API. These are collection-file references
only; attachment bytes and binary metadata remain owned by the host.
- (#2142) MCP \`tasknotes_create_task\` and \`tasknotes_update_task\` now accept
\`customProperties\` for configured TaskNotes user fields. Thanks to
@phillipadsmith for suggesting this.
- (#2126, #2134) Added optional filename templates for materialized recurring
occurrence notes, with explicit date, ISO week, month, year, and month-name
variables plus per-parent overrides. Existing naming remains unchanged until a
template is configured. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/#occurrence-filenames).
Thanks to @raphaelfaouakhiri for reporting and implementing this.
- (#2105) Added \`{{projectFolder}}\` and \`{{projectFolders}}\` folder template
variables for storing tasks alongside linked project notes. See
[Template Variables](https://tasknotes.dev/features/template-variables/).
Thanks to @carypruitt for this contribution.
## Changed
- Generated TaskNotes type contracts now include configured natural-language
capture triggers, allowing compatible clients to offer the same field
suggestions.
- Rebuilt the TaskNotes documentation with
reorganized navigation, full-text search, mobile and accessibility
improvements, and references generated from the current commands, settings,
compatibility metadata, HTTP routes, and default Bases. Added practical
guides for adopting TaskNotes in an existing vault, mobile use, custom Bases,
and backup and recovery. See the
[TaskNotes documentation](https://tasknotes.dev/).
- (#2088) Convert current note to task now uses your default scheduled date when
the note does not already have \`scheduled\` frontmatter, while the **None**
default still leaves converted notes unscheduled. See
[Task Properties](https://tasknotes.dev/settings/task-properties/#scheduled-date).
Thanks to @e-zz for suggesting this.
## Fixed
- Plugin settings now recover when Obsidian briefly returns no data while
reloading an externally changed settings file, preventing a post-reload error
without overwriting the existing settings.
- (#2194) Pomodoro task selection suggestions now keep rich task cards at the
menu width, preventing task titles from wrapping one letter per line. Thanks
to @Evilgenee for reporting this.
- (#2196) Drag-to-reorder now works for Task List Bases embedded in Live Preview
notes, matching the behavior of directly opened Bases and Reading mode embeds.
Thanks to @jimbo108108 for reporting this.
- (#2198) Agenda Bases can now show overdue scheduled or due tasks on today's
row with \`showOverdueOnToday\`, and regenerated default Agenda files enable
that behavior by default. Thanks to @vicrdguez for reporting this.
- (#2182) Checklist progress on task cards now excludes cancelled markdown
checklist items such as \`[-]\` from the completed/total count. Thanks to
@ctrl-q for reporting this.
- (#2180) Inline task cards in Live Preview now keep their click and context menu
handlers active on Obsidian 1.13, so clicking a rendered task link opens the
edit modal instead of revealing the raw wikilink. Thanks to @npondel for the
detailed diagnosis and @minchinweb for confirming the issue.
- (#2171) Stopped recurring
notification and status-bar scans from reading unindexed notes directly from
disk while preserving the fallback for direct task lookups. Thanks to
@tgrosinger for identifying and diagnosing the excessive vault reads.
- (#2174) **Open or create occurrence note** from Quick Actions now uses the
recurring task's scheduled occurrence date, preventing duplicate occurrence
notes keyed to the day the action was run. Thanks to @chmac for reporting
this.
- (#2169) Regenerated default Base views now include tasks whose identifying
property is stored as a list containing the configured task value. Thanks to
@GlebYavorski for reporting this.
- (#2166) Fixed Task List views configured to start collapsed so the first
chevron click expands only the selected group instead of expanding every
other group. Thanks to @renatomen for reporting and fixing this.
- (#2165) **Convert current note to task** now reads configured field mappings,
including list-valued title fields such as \`aliases\`, and preserves an
existing aliases list when the title is unchanged. Thanks to @jkuball for
reporting this.
- (#2164) Flat Kanban boards now clear stale swimlane layout state when they
rerender, preventing columns from occasionally stacking into one vertical
strip after switching tabs. Thanks to @brienna for reporting this.
- (#2160, #2161) Generated Kanban Bases now use the correct TaskNotes status
property and configuration block. Rich Bases status values render as their
configured labels, while pinned columns and saved column order are honored.
Thanks to @kevin-4c for the detailed reports and diagnosis.
- (#2111, #2159) Recurring task instances now remain visible through the final
day of Calendar and Agenda ranges in positive-offset time zones, regardless
of the configured first day of the week. Thanks to @Arachnidai and @odxn0803
for reporting this.
- (#2155) Regenerated default Calendar Bases now inherit the app-level time slot
duration instead of hardcoding 30 minutes. Existing per-Base time settings
remain intentional overrides. Thanks to @SZZ504232 for reporting this.
- (#2154) Timed ICS events without a \`TZID\` now preserve their floating wall
time in the user's local timezone instead of being interpreted as UTC. Thanks
to @cloesophia for the reproducible calendar sample.
- (#2152) Fixed paginated Google Calendar refreshes for calendars with many
events so secondary calendars do not disappear after Google returns a second
page. Thanks to @wobafett for reporting and diagnosing this.
- (#2141) Fixed Task List groups for tasks without scheduled or due dates showing
a raw Bases icon object instead of **None**. Thanks to @ks-studio-net for
reporting this.
- (#2140) The edit task modal now shows saved task-identification tags when
hiding identification tags is disabled. Thanks to @3zra47 for reporting this.
- (#2148) Empty list-like frontmatter values no longer become literal \`"null"\`
entries when tasks are edited. Thanks to @minchinweb for reporting this.
- (#2120, #2135) Long all-day event titles in Calendar week and day views now
truncate instead of stretching the all-day row. Thanks to @same774 and
@ks-studio-net for reporting this.
- (#2124) Fixed a Kanban crash when opening or closing the edit modal immediately
after moving a task between list-valued swimlanes such as contexts. Thanks to
@Decia-C for reporting this.
- (#2114) Completing a rescheduled occurrence for a scheduled-anchored recurring
task now advances the parent from the moved occurrence date instead of an
earlier original occurrence date. Thanks to @chrabia for reporting this.
- (#2113) Failed Google Calendar manual refreshes no longer make the next
immediate refresh show a misleading success notice. Thanks to @JohWQ for
reporting this.
- (#2109) TaskNotes no longer injects instant-conversion controls into embedded
or detached Markdown editors, preventing checkbox notes opened from unrelated
Bases from freezing Obsidian on mobile. Thanks to @jmartinmcfly for the clear
reproduction and recording.
- (#2107, #2108) Creating tasks with **Store title in filename** enabled now
handles duplicate or case-variant titles without failing or replacing the task
title with a suffixed filename. Thanks to @AdmiralClackington for reporting and
diagnosing this.
- (#2106) Regenerated default Calendar Base files now use your configured first
day of the week instead of forcing Sunday. Thanks to @atos2212-blip, @cweekly,
@idontcode34, and @hikatamika for reporting this.
- (#2100) Tags added while creating a task now keep the same frontmatter order as
tags added later from the task context menu. Thanks to @mgrecar for reporting
this.
- (#2092) New non-recurring tasks created directly in a completed status now get
a completed date, so completed-date views can find them immediately. Thanks
to @Crell for reporting this.
- (#2096) Fixed TaskNotes Kanban swimlanes falling back to **None** when the
swimlane used a Bases formula that was not already cached by Bases. Thanks to
@ddevaal for reporting this.
- (#2093) TaskNotes now retries custom Bases view registration when the Bases
core plugin is enabled after TaskNotes, preventing default views from showing
**Unknown view type** until TaskNotes is reloaded. Thanks to @yaye-work for
reporting this.
- (#2084) The Relationships widget no longer prevents editor text selection from
autoscrolling when dragging below the bottom edge of a task note. Thanks to
@lostwildland for reporting this.
- (#2081, #2103) Kept task card and relationships widgets visible in reading mode
when Obsidian scroll or preview updates remove their DOM, and refreshed visible
widgets promptly after metadata changes. Thanks to @mukhozhuk for reporting and
debugging this and @martin-forge for fixing it.
- (#2064, #2066) Recurring tasks now advance correctly after their next
scheduled date is manually adjusted, preserving due-date offsets and times
without jumping back to an earlier occurrence. Thanks to @chmac for reporting
and fixing this.
- (#2018) Fixed **Hide empty columns** in Kanban views with swimlanes so columns
with no visible tasks are hidden while pinned columns remain. Thanks to
@scottTomaszewski for reporting and fixing this.
- Fixed recurring all-day ICS subscription events keeping the original end date
on later instances, which could cause calendar list views to show events under
the wrong day. Thanks to @abbiefalls90.
- (#2033) Fixed the project folder badge on task cards so, when expandable
subtasks are enabled, it expands or collapses inline subtasks instead of
showing an unavailable-action notice. Thanks to @abbiefalls90 for the fix and
@scottkodai for the follow-up feedback.
- (#2040, #2041) Stopped newly created tasks from filling the Google Calendar
retry queue when calendar export is disabled. Thanks to @chmac for reporting
and fixing this.
- (#2046, #2051) The date and time picker now focuses the natural-language input
when it is enabled, making keyboard-driven quick actions ready for immediate
typing. Thanks to @DevOps-Toast for reporting this and @ther12k for fixing it.
- (#2125, #2129) Materialized recurring occurrence notes now record the date
they were actually completed, while the parent recurring task continues to
track the occurrence date. Thanks to @raphaelfaouakhiri for reporting and
fixing this.
- (#2173, #2175) Completion-anchored recurring tasks with materialized
occurrence notes now schedule the next occurrence from the day the occurrence
was actually completed. Thanks to @chmac for reporting and fixing this.
- (#1982) Preserved the Task List's own scroll position during Bases refreshes so
long mobile lists do not jump back to the top after task updates. Thanks to
@3zra47 for the follow-up report.
- (#1863) Microsoft Calendar event updates now accept opaque Exchange calendar
IDs instead of failing local validation before contacting Microsoft Graph.
Thanks to @fmacondray for reporting this and providing the follow-up stack
trace.
`});var vve,kve=y(()=>{vve=`# TaskNotes 4.11.1
## Added
- (#2024) Added materialized occurrence notes to the Relationships widget, so recurring parent task notes can show their occurrence notes in an **Occurrences** tab. See [Relationships Widget](https://tasknotes.dev/features/inline-tasks/#relationships-widget). Thanks to @3zra47 for requesting this.
- (#2022) Added a **Skip instance** / **Unskip instance** action to the recurring task edit modal's completion calendar, so skipped dates can be adjusted from the same date menu as completions. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/#completion-tracking). Thanks to @AmonAmarthFTW for requesting this.
- (#2048) Added current due and scheduled dates to the edit modal's task information. Thanks to @1activegeek for requesting this.
- (#2058, #2059) Added natural-language parsing and the full date picker to date-type custom fields. Thanks to @chmac for requesting this.
- (#2060) Added date-type custom fields to the task right-click menu under **Custom dates**. Thanks to @chmac for requesting this.
- (#2067) Added an **Edit task** action to the task card context menu, including inline task cards. Thanks to @DarkCellar for requesting this.
- (#2068) Added \`reminders\` input support to the MCP \`tasknotes_create_task\` and \`tasknotes_update_task\` tools. Thanks to @Spirit597 for requesting this.
- (#2069) Added an **Add project** action to the Quick Actions palette. Thanks to @chmac for requesting this.
## Fixed
- (#2007) Fixed a remaining task creation autocomplete case where a status value containing another status label could leave status fragments in the task title. Thanks to @prepare4robots for the follow-up report.
- (#2031) Fixed quick task creation failing when natural language input created a recurring task with a scheduled time. Thanks to @rdefaccio for reporting this.
- (#2034) Fixed Advanced Calendar timed events switching to a high-contrast mobile fill when Obsidian is narrowed or split on desktop. Thanks to @RumiaKitinari for reporting this.
- (#2039) Fixed broken images on the Workflows and Calendar Setup documentation pages. Thanks to @chmac for reporting this.
- (#2045) Fixed custom modal fields assigned to Basic Information not appearing in task creation or edit modals. Thanks to @chmac for reporting this.
- (#2063) Fixed project autocomplete storing ambiguous project links without the selected note's folder path. Thanks to @chmac for reporting this.
- (#2072) Fixed inline task links to headings so they show both the task title and heading instead of only the heading. Thanks to @spasche for reporting this.
- (#2075) Fixed multiday Calendar events being clipped to one day when a Base is embedded in Reading view. Thanks to @ddevaal for reporting this.
- (#2079) Fixed the reminder modal's **Absolute** tab so it switches from relative fields to absolute date and time fields. Thanks to @JunwonYoon for reporting this and identifying the CSS specificity issue.
## Changed
- Improved local review checks so unsafe direct \`Object.prototype\` method access is caught before submission.
`});var Tve,bve=y(()=>{Tve=`# TaskNotes 4.11.0
## Added
- (#730, #1897, #1942, #1998) Added [Canvas Bases](https://github.com/callumalpass/canvas-bases), an optional companion plugin that turns Obsidian Bases views into canvas-style boards and reusable JSON Canvas snapshots, with TaskNotes badges, task menus, dependency and subtask edges, and assignment zones for supported TaskNotes actions. See [Canvas Bases](https://tasknotes.dev/companion-plugins/canvas-bases/) for setup details. Thanks to @DillPickle80, @BradGaddis, @Hyadhuad, and @AlinaWithAFace for the visual planning requests, and to @renatomen, @prayidae, and @maranqz for the related discussion.
- Added a TaskNotes starter note that is created and opened automatically on first install to introduce task creation, inline conversion, and embedded Bases views.
- Added a runtime API surface for companion plugins to show or populate the standard TaskNotes task context menu.
- (#2000) Added separate settings for using the active note as a project during normal task creation and during inline task creation or instant conversion. Thanks to @BlueScreen32 for suggesting the split.
- (#1303, #2001) Added separate templates for materialized occurrence notes, including parent-level \`occurrence_template\` support and a global fallback setting. Thanks to @BrucePlumb for suggesting a separate occurrence-note template and @ak-42 for the related per-recurrence template request.
- (#2006) Added the projected local finish time beside the remaining duration while a Pomodoro is running. See [Pomodoro View](https://tasknotes.dev/views/pomodoro-view/) for the timer behavior. Thanks to @abbiefalls90 for suggesting this.
- (#2016) Added a setting for recurring external calendar event related notes, so Google, Microsoft, and ICS recurrences can either share notes across the series or keep notes limited to the selected instance. See [Integrations Settings](https://tasknotes.dev/settings/integrations/#calendar-subscriptions-ics) for the setting. Thanks to @akhtsang for reporting this, and to @cathywu and @mdbraber for the earlier series-linking discussion.
## Changed
- (#1737) Clarified that changing the task tag does not automatically update existing Base view filters. Thanks to @goldorak00 for reporting this, and to @Domcoppinger and @imsuck for the first-time setup feedback.
- (#2005) Excluded archived task notes and archived project-note references from Task & Project Statistics. Thanks to @Xiarno for suggesting this.
- Added a local review-type lint check that catches dependency-resolution warnings from Obsidian's online review before submission.
- Improved dependency and project relationship cache updates so ordinary note edits avoid unnecessary relationship recalculation, while blocked and blocking state stays current when dependency status changes.
- Improved filter and view query caching so filter options update immediately after relevant task-field changes while large Task List, Kanban, and Calendar queries avoid repeated vault scans.
- Extended the in-app release notes bundle to include the current major release, with collapsed versions rendered only when opened.
## Fixed
- (#2015) Fixed Google Calendar events from the previous six months disappearing from Calendar and Mini Calendar views after a fresh sync. Thanks to @akhtsang for reporting this.
- (#2013) Fixed task-card status and priority dots becoming oversized on touch-capable desktop devices. Thanks to @RumiaKitinari for reporting this.
- (#2009) Restored Tab and Shift+Tab focus movement in the Create new task modal's natural language input instead of letting the markdown editor indent the title. Thanks to @prepare4robots for reporting this.
- (#2007) Fixed status autocomplete in the task creation modal leaving status value fragments in the task title when the editor auto-paired the status trigger. Thanks to @prepare4robots for reporting this.
- (#2004) Fixed the Pomodoro start command forgetting the selected task after it was completed, so reopening the task lets it be picked up again. Thanks to @MPourjam for reporting this.
- (#1996) Made Kanban card drag-and-drop show a clear drop slot marker while cards are being repositioned, so the landing position remains visible during sorting. Thanks to @phillipadsmith for reporting this.
- Fixed runtime API dependency removal so removing the last dependency from a task also clears the mapped \`blockedBy\` property from the note.
`});var wve,Sve=y(()=>{wve=`# TaskNotes 4.10.2
## Fixed
- (#1995) Fixed Bases Calendar views showing both a materialized occurrence note and its matching virtual recurring task instance. Thanks to @rdefaccio for reporting this.
- (Discussion #1994) Fixed timed recurring tasks failing to advance their due dates when due-date offset preservation is enabled. Thanks to @mgrecar for raising this.
`});var Cve,xve=y(()=>{Cve=`# TaskNotes 4.10.1
## Added
- Added a startup check for new compatible TaskNotes releases. When a new release is available, TaskNotes shows a notice that opens the TaskNotes entry in Obsidian's Community Plugins browser.
- (#1989) Added a command-palette action plus runtime and HTTP API actions for updating configured default \`.base\` files from the current TaskNotes templates. Thanks to @businessBoris for the request.
- (#1115) Added API and MCP support for creating materialized occurrence notes from recurring tasks, and made headless recurring-instance completion respect occurrence notes when the parent uses Create next after completion. Thanks to @gsssr for the original request, @slipstyle for the follow-up, and @martin-forge for identifying the API/MCP gap.
## Fixed
- (#1985) Fixed embedded Calendar and Agenda time-grid views drifting out of alignment inside callouts and Reading mode. Thanks to @matesvecenik for reporting and sharing screenshots.
- (#1986) Fixed the local HTTP API rejecting requests from the TaskNotes browser extension's Chrome extension origin. Thanks to @n1njaznutz for reporting this.
- (#1980) Added mobile bottom spacing to Agenda Calendar views so the last visible tasks can scroll above Obsidian's bottom navigation bar. Thanks to @Jomo94 for reporting and sharing the screenshot.
- (#1984) Fixed mobile task link overlays hiding configured inline task card properties such as scheduled date, due date, contexts, and projects. Thanks to @stil-sudo for reporting.
- (#1979) Kept the left-positioned subtask chevron from overlapping the task status control on mobile task cards. Thanks to @Jomo94 for reporting and sharing the screenshot.
- (#1903) Reduced the Edit Task modal's mobile action-button footer so Open note, Archive, Delete, Save, and Cancel take two rows instead of three on iPhone-sized screens. Thanks to @3zra47 for the original report and @krzyfu for the follow-up about the button area crowding the editor.
- (#1982) Preserved scroll position in TaskNotes Bases after task edits and data refreshes, avoiding jumps back to the top on mobile. Thanks to @3zra47 for reporting.
- (#1978) Restored Obsidian editor shortcuts such as insert link, headings, and list toggles inside the Edit Task modal's Details editor. Thanks to @krzyfu for reporting this.
`});var Eve,Dve=y(()=>{Eve=`# TaskNotes 4.10.0
## Added
- **New companion plugin:** TaskNotes Workflows adds Markdown-defined automation for TaskNotes tasks, events, schedules, and manual commands. It keeps automation workflows outside TaskNotes core while using the runtime API for safe task reads, writes, queries, events, and relationship resolution. See [TaskNotes Workflows](https://tasknotes.dev/companion-plugins/tasknotes-workflows/).
- (#1530) \`Auto-start time tracking\` starts a timer when a task moves into active work. Thanks to @Jendrik0 and @benmartinek for the request and follow-up.
- (#222, #184) \`Stop time tracking on complete\` stops active timers when a task is completed. Thanks to @bcohen44 and @cathywu for the requests, and @amarjt for the follow-up.
- (#265) \`Stamp started timestamp\` records a custom started timestamp when a task first moves into active work. Thanks to @cathywu, @digitaldoctors, and @Leo310 for the request and discussion.
- (#1703) \`Clear scheduled when started\` clears the scheduled date when a task moves into active work. Thanks to @kmaustral for the request.
- (#1293) \`Rollover overdue scheduled tasks\` moves incomplete tasks with past scheduled dates back to today. Thanks to @grosserfrank for the request.
- (#1896) \`Escalate upcoming due tasks\` raises priority as due dates approach. Thanks to @Neptune-Illusion for the request.
- (#214, #518, #1785, #1855) The subtask inheritance workflows can copy parent contexts, tags, priority, planning dates, and dependencies into new subtasks. Thanks to @timfidd, @bepolymathe, @AndyEveritt, @lindsaylearns, @tomsymonds, @wedgen, @poulpoulsen, and @misolex for the related requests and discussion.
- (#1166) \`Blocked task review\` provides a reminder-style review for blocked tasks without automatically deleting dependency links. Thanks to @jpmoo and @jortscity for the request and follow-up.
- Added a versioned TaskNotes JavaScript runtime API for companion plugins, with namespaced model validation, canonical task query validation/normalization/explain helpers, catalogs, query/support helpers, lifecycle events, typed errors/results, task, time-tracking, Pomodoro, recurring-task, settings, NLP, event, and extension-registry surfaces. Runtime API mutations carry source and correlation metadata so companion plugins can debug and coordinate workflow runs. See [JavaScript API](https://tasknotes.dev/javascript-api/).
- Added documentation for the companion-plugin model. See [Companion Plugins](https://tasknotes.dev/companion-plugins/).
- (#288, #345, #361, #523, #573, #703, #925, #929, #1115, #1137, #1260, #1303, #1324, #1394, #1445, #1509, #1735, #1736, #1743, #1780, #1874, #1951, #1974) Added support for TaskNotes spec 0.2.0 materialized occurrences, including recurrence parent/date fields, generated mdbase schema roles, parent reconciliation when occurrence notes are completed, occurrence notes that inherit parent planning metadata without copying history, occurrence note controls in task, calendar, and edit-modal completion menus, and visible occurrence identity on task cards. This gives recurring tasks a concrete occurrence-note path for per-instance state, related notes, subtasks, templates, scheduling changes, completion history, and calendar behavior without forcing every recurring task to create files. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/#materialized-occurrence-notes) and [Property Types Reference](https://tasknotes.dev/settings/property-types-reference/#materialized-occurrence-properties). Thanks to @LuxBetancourt, @jerzy-dudzic, @luciolebrillante, @BryanWall, @jhedlund, @kazerniel, @nschenone, @realJohnDoe, @cathywu, @Lorite, @EllenGYY, @JcMinarro, @gsssr, @slipstyle, @3zra47, @Leonard-44, @ak-42, @RumiaKitinari, @atos2212-blip, @kmaustral, @eugenedefox, @notDavid, @zitongcharliedeng, and @Jomo94 for the related recurrence, occurrence, completion, and calendar requests.
- (#1951) Added Calendar support for recurring tasks stretched between scheduled and due dates when the existing stretch option is enabled. Date-only ranges stay as all-day spans, and timed ranges render once per day in the range. Thanks to @atos2212-blip for the request.
- (#1751, #1792, #1969) Added a Task List and Kanban view option to hide top-level subtasks when their parent task is also in the filtered view, while still allowing inherited expanded relationships to show the subtasks under the parent. Thanks to @Glint-Eye and @Proxybat for the request and follow-up, and @stanley-910 and @Spencerduran for the earlier PRs.
## Changed
- Moved core TaskNotes model behavior for field mapping, dates, recurrence, time-tracking, and adapter operation planning into a shared package used by the plugin and companion tooling.
- Calendar views now coalesce materialized occurrence notes with their matching virtual recurring instances. Dragging a materialized occurrence reschedules that occurrence note without changing the parent recurrence rule or the note's \`occurrence_date\` identity. See [Recurring Tasks](https://tasknotes.dev/features/recurring-tasks/#calendar-drag-and-drop).
- Improved the Calendar Bases View Options menu by splitting settings into clearer groups and hiding view-specific controls until they apply to the selected calendar mode.
## Fixed
- (#1976) Fixed embedded Calendar and Agenda Bases so "Navigate to date from property" can use the containing note's date property when the Base rows do not have that property. Thanks to @matesvecenik for reporting this.
- (#1977) Fixed Calendar and Agenda views showing duplicate all-day entries when a task's scheduled date and due date are the same day. Timed due dates on the same day still show as separate deadline markers. Thanks to @pdgBC for reporting this.
- Fixed the release notes view using cramped interface typography instead of regular reading typography.
- (#216) Improved inline conversion for Tasks plugin task lines, including Dataview-style fields, priority markers, recurrence text, date aliases, block links, and safer trailing-field parsing. Thanks to @ksdavidc for the request, @natleahh for the Dataview example, and @hangryscribe3 and @nayatiuh for the discussion.
- (#1974) Stopped Calendar and Agenda property-based events from logging date parse errors for entries that do not have the selected date property. Thanks to @Jomo94 for suggesting completed-date Agenda events.
- (#1973) Reduced unnecessary Calendar view recreations when external calendar providers are reported in a different order, and preserved Calendar scroll position when a config-driven refresh has to recreate the view. Thanks to @e-zz for reporting this.
- (#1972) Fixed ICS calendar event related notes so standalone events with similar numeric IDs no longer show unrelated notes or tasks on every event. Thanks to @ks-studio-net for reporting this.
- (#1970) Fixed generated default Base filters so updating default files applies configured excluded folders to TaskNotes task views. Thanks to @henrim01 for reporting that templates could still appear in regenerated views.
- (#1968) Fixed inline task link overlays collapsing on Obsidian mobile, which could hide the task title and leave a tall empty gap after the widget. Thanks to @renatomen for reporting and diagnosing the containment issue.
`});var Pve,Ave=y(()=>{Pve=`# TaskNotes 4.9.2
## Added
- (#1791) Added collapse and expand controls for grouped Bases Task List views, including a default collapsed state option.
- Thanks to @renatomen for the contribution.
## Fixed
- Fixed Pomodoro storage migration so existing plugin-data history is written to daily notes before switching storage, and clarified that daily notes can come from either the core Daily Notes plugin or Periodic Notes.
- (#1964) Fixed Microsoft Calendar OAuth so connecting no longer forces a fresh consent prompt every time, and clarified the Microsoft desktop app setup steps.
- Thanks to @thechonta for reporting.
- (#1966) Fixed custom priority icons so they render as icons instead of filled squares on task cards.
- Thanks to @sruiz-savia for reporting.
- (#1963) Fixed Google Calendar sync so duplicate event ID fields are repaired when saving task calendar metadata.
- Thanks to @christenbc for reporting.
- (#1961) Fixed the default custom filename template so it uses the recommended double-brace syntax and no longer warns on first use.
- Thanks to @chmac for reporting.
- (#1962) Fixed task tag normalization so tags entered with spaces are saved with hyphens for Obsidian tag compatibility.
- Thanks to @christenbc for reporting.
- (#1959) Fixed the MCP \`tasknotes_list_tasks\` tool so circular internal task data and live Obsidian object references no longer break task-list responses.
- Thanks to @kmaustral for reporting.
- (#1957) Fixed the Pomodoro timer layout in vertically split panes so the timer header and progress circle remain reachable when the pane is short.
- Thanks to @sumiyalairu03 for reporting.
- (#1956) Fixed Google Calendar sync so completing a recurring task updates the linked event title with the completion checkmark.
- Thanks to @jacksoluke for reporting.
- (#1953) Fixed inline task conversion so source-line wikilinks no longer create nested wikilinks in the replacement link text.
- Thanks to @bgk0018 for reporting.
- (#1952) Fixed Pomodoro task picker search results so matching task titles are ranked and sorted ahead of due-date ordering.
- Thanks to @KFrancoD for reporting.
- (#1392, #1949) Fixed due and scheduled date picker fields so typed or pasted date edits stay open until you choose Select, including compact \`YYYYMMDD\` entry when a date is already set.
- Thanks to @kazerniel for reporting and following up.
- (#982, #1947) Restored larger mobile task-card typography and let secondary card icons wrap below the task details when they no longer fit comfortably on mobile.
- Thanks to @3zra47 for reporting the font-size regression, @chrsdk and @scottaltham-payroc for confirming the mobile font-size issue, and @Jomo94 for reporting the mobile card layout problem.
`});var Mve,Ive=y(()=>{Mve=`# TaskNotes 4.9.1
## Added
- (#1885) Added Shift+arrow keyboard range selection while bulk task selection mode is active.
- Thanks to @chrabia for suggesting bulk selection improvements and @sumiyalairu03 for the keyboard selection idea.
## Fixed
- (#781, #1085) Fixed Outlook-published ICS calendar events appearing at the wrong time when their feed used Windows timezone names without matching timezone definitions.
- Thanks to @chrlaney for reporting and @mjkrasny for confirming the Outlook timezone case.
- (#1696) Fixed Google Calendar export for scheduled recurring tasks when a single occurrence is moved to a different date.
- Keeps the recurring master event on its original rule, excludes the original occurrence date, and syncs the moved occurrence as a detached event.
- Thanks to @martin-forge for reporting and contributing the fix.
- (#1912) Fixed "Create subtask" inserting the full path of the parent task in the Projects field instead of using the normal Obsidian link text.
- Thanks to @pkuehne for reporting and @benmartinek for confirming.
- (#1921) Fixed Google Calendar and auto-archive updates not running after direct task file edits.
- TaskNotes now picks up status, completion, and date changes made directly in a task file without triggering a large one-time Google Calendar rewrite at startup.
- Recovery also removes stale Google Calendar links when task files were deleted or replaced outside TaskNotes.
- Thanks to @martin-forge for reporting and contributing the fix.
- (#1938) Fixed partial HTTP API task updates rewriting native tags with \`#\` prefixes or duplicate task tags.
- Thanks to @joseluisgonzalezdelgado-ctrl for reporting.
- (#1939) Fixed the task Details field rendering as a small nested textarea when the embedded editor falls back.
- Thanks to @g-arthurvanderbilt for reporting and @cookbr for confirming the desktop impact.
- Fixed tag and modal preview edge cases found during validation: double-hash tags no longer match the task tag, empty tag lists stay empty when read back, and natural-language previews remain visible when enabled.
- (#1941) Fixed mobile Kanban boards scrolling the whole board vertically instead of keeping each list independently scrollable.
- Thanks to @pxxush for reporting.
- (#1943) Fixed MCP task-query tool instructions so filter operators match the operators TaskNotes actually accepts.
- Thanks to @jordankbartos for reporting and proposing a fix in #1944.
- (#1945) Fixed Google Calendar export so overlapping sync services do not create duplicate events for the same task while the saved event ID is still catching up.
- Thanks to @martin-forge for reporting and contributing the fix.
- (#1946) Fixed the bottom task in virtualized Task List Bases being partially hidden behind Obsidian's mobile bottom bar.
- Thanks to @3zra47 for reporting.
- (#1947) Fixed mobile Task List cards with left-positioned subtask chevrons so the chevron remains visible and project/detail badges stay on the main row.
- Thanks to @Jomo94 for reporting.
- (#1948) Fixed Agenda Calendar Bases so completed recurring instances can appear on their recorded completion dates, even when recurring task projections are hidden or the completion date is outside the recurrence pattern.
- Thanks to @Jomo94 for reporting.
`});var Nve,Rve=y(()=>{Nve=`# TaskNotes 4.9.0
## Security
- (#1923) Restricted the HTTP API server to loopback and limited browser CORS access to loopback origins.
- Thanks to @martin-forge for reporting.
## Added
- (#1932) Added middle-click support for opening task cards in a new tab.
- Thanks to @imsuck for the request.
## Fixed
- (#1934) Fixed custom priority colors being overridden by default task-card priority styles in views.
- Thanks to @KittehBit for reporting.
- (#1933) Added the note path to fallback frontmatter parse warnings so malformed task YAML is easier to find.
- Thanks to @rayvermey for reporting.
- (#1931) Made the Pomodoro task chooser open from cached task data and ignore repeated clicks while it is already opening.
- Thanks to @sumiyalairu03 for reporting.
- (#1930) Fixed starting the Pomodoro timer from its hotkey without starting time tracking for the selected Pomodoro task.
- Thanks to @sumiyalairu03 for reporting.
- (#1929) Fixed the bottom Relationships widget overlapping embedded content such as Bases/Kanban views in task notes.
- Thanks to @rchaklashiya for reporting and following up with the embed case.
- (#1922) Restored the native color picker alongside manual color text entry in Create/Edit Timeblock fields.
- Thanks to @AndreMonthy for reporting.
- (#1921) Fixed direct frontmatter edits to lifecycle-relevant task fields not triggering Google Calendar sync or auto-archive side effects.
- Thanks to @martin-forge for reporting and verifying the direct-edit reproduction.
- (#1919) Fixed the Pomodoro view rapidly resizing at certain sidebar sizes.
- Thanks to @RumiaKitinari for reporting.
- (#1898, #1907) Fixed Calendar time labels shifting into the middle of Day and sidebar calendar grids after switching views.
- Thanks to @ddevaal for reporting and confirming the regression, and to @kmaustral for confirming the sidebar case in 4.8.1.
- (#1936) Added a Calendar Base drag/drop resolution option so events can snap to smaller increments than the visible time slot grid.
- Thanks to @benmartinek for suggesting this.
- Improved mobile task cards, inline widgets, modals, and settings layouts so dense controls and long labels fit more comfortably on small screens.
- (#1916) Fixed Markdown task links using Obsidian's generated filename label instead of the TaskNote title in the task link overlay.
- Thanks to @minchinweb for reporting.
- (#1911) Fixed recurrence choices starting from today instead of the selected calendar date when creating a task from Calendar view.
- Thanks to @mikhailmarka for reporting.
- (#1912) Fixed "Create subtask" pre-filling the parent task's full folder path in the Projects field instead of using the normal Obsidian link text.
- Thanks to @pkuehne for reporting and @benmartinek for confirming.
`});var _ve,Fve=y(()=>{_ve=`# TaskNotes 4.8.1
## Fixed
- (#1903) Improved the Edit Task modal on iPhone-sized screens so opening a task no longer automatically focuses the title field, and the mobile layout gives the title, fields, and action buttons more usable space.
- Thanks to @3zra47 for reporting the issue and sharing the screen recording.
- (#1909) Fixed compact Kanban task cards showing oversized status and priority indicators on touch devices.
- Thanks to @pxxush for reporting the issue.
- (#1908) Restored newly generated Calendar Bases to show the full day by default and inherit the calendar start/end settings instead of hard-coding 06:00-22:00.
- Thanks to @AndreMonthy for the report.
- (#1907) Fixed calendar time labels drifting away from the left axis in narrow sidebar calendar views.
- Thanks to @kmaustral for reporting the issue.
- (#1906) Fixed NLP priority shortcuts leaving partial text in task titles when custom priority values include words like \`high\` or \`low\`.
- Thanks to @RumiaKitinari for reporting the issue.
- (#1904, #1905) Fixed long tags in task cards wrapping instead of forcing horizontal scrolling in TaskNotes Bases views and note cards.
- Long tag pills can now wrap across lines and break within very long tag names on narrow screens.
- Thanks to @3zra47 for reporting the issue and to @zhouzhou626 for the contribution.
- (#1901) Fixed the task context menu creating an \`undefined\` property when adding or removing tags.
- Hardened task property updates so invalid frontmatter property names are rejected instead of written.
- Thanks to @mgrecar for reporting the issue.
- (#1902) Fixed Markdown-style project links in task frontmatter not appearing as subtasks on project pages.
- Thanks to @minchinweb for reporting the issue.
## Changed
- Improved the internal structure around service notifications, vault writes, and shared utilities to make future fixes easier to test and maintain.
`});var Lve,Ove=y(()=>{Lve=`# TaskNotes 4.8.0
## Added
- (#353) Added a \`Has Subtasks\` filter for task queries, so views and API clients can show only project-style tasks or direct tasks. Thanks to @mdbraber for suggesting this.
- (#380) Added a test-reminder button in notification settings, so reminder setup can be checked without creating a real task reminder. Thanks to @mdbraber for suggesting this.
- (#711, #168) Added an optional task-creation setting to open the new task note after saving, either in the current tab or a new tab. Thanks to @phortx and @23426356587 for suggesting this, and to @edward-peters and @obsilover for the follow-up.
- (#1041, #1800) Added copy-drag support for timeblocks: hold Ctrl, Cmd, or Alt/Option while dragging an existing timeblock to duplicate it at the new date and time. Thanks to @0-BSCode and @cweekly for suggesting this.
- (#1052) Added a public JavaScript API for in-vault scripts at \`app.plugins.plugins.tasknotes.api.parseNaturalLanguage(text)\`, so Templater, QuickAdd, and MetaBind workflows can use TaskNotes' natural-language parser without running the HTTP API. Thanks to @edakimling for suggesting this.
- (#1235) Added a task-card toggle for blocked tasks, so you can expand a blocked task to see the tasks it is waiting on. Thanks to @craziedde for suggesting this.
- (#1254) Added \`../\` and \`./\` normalization for folder templates after variables are expanded, so instant task conversion can target sibling folders such as \`{{currentNotePath}}/../Tasks\`. Thanks to @rdick for suggesting this.
- (#1267) Added Daily Notes-style date tokens such as \`YYYY\`, \`MM\`, \`DD\`, \`MMMM\`, and \`dddd\` to TaskNotes folder templates. Thanks to @paulsen-it for suggesting this.
- (#1380) Added tag actions to task context menus, including add/remove actions for individual tasks and batch-selected tasks. Thanks to @Chuhtra for suggesting this.
- (#1377) Added right-click Mini Calendar actions for opening daily notes from day cells and weekly notes from week numbers. Thanks to @hasanyilmaz for suggesting this.
- (#1151) Added a Mini Calendar max color note count option, so one-note days can use the strongest heatmap color when that better fits the view. Thanks to @arreme for suggesting this.
- (#1376) Added backslash escapes for NLP trigger tokens, so text like \`\\@context\`, \`\\*done\`, or \`\\tomorrow\` can stay in the task title. Thanks to @JerryLu086 for suggesting this.
- (#1366) Added CSS variables for compacting nested task-card indentation, with smaller defaults on mobile and documented snippets for tighter task-link lists. Thanks to @rk-kontur for suggesting this.
- (#1502, #603) Added calendar indicators for external events that have linked notes or tasks, and showed loaded event titles in task-card calendar metadata instead of only the linked event count. Thanks to @Robubble and @mdbraber for suggesting this, and to @ubidev for the follow-up.
- (#1522) Added a per-status option to skip rarely used statuses when cycling task-card status indicators. Thanks to @Glint-Eye for suggesting this.
- (#144) Added an "Open note in new tab" action to the task context menu. Thanks to @cathywu for suggesting this and @macbikegeek for the follow-up feedback.
- (#167) Added an optional next-status override for each status, so forward cycling can jump to a configured status instead of always following the status order. Thanks to @DanBrazelton for suggesting this, and to @michelebugio, @Moyf, @anareaty, and @vorrermid for the follow-up feedback.
- (#1520) Made tag and context fields show available suggestions as soon as the field is focused. Thanks to @Glint-Eye for suggesting this, and to @craziedde for the follow-up.
- (#1541) Added \`{{currentNotePath}}\` and \`{{currentNoteTitle}}\` support to the default tasks folder, so normal task creation can place new tasks beside the active note without creating an inline link. Thanks to @ChristianAnyanwu for suggesting this, and to @abbasou and @ttlaylor for the follow-up feedback.
- (#648, #1605) Added clickable links in task-card contexts for note links, markdown links, and web URLs while keeping plain contexts as tag-search buttons. Thanks to @trdischat and @Glint-Eye for suggesting this, and to @renatomen for the follow-up feedback.
- (#1482) Added clickable custom-field links on task cards for wikilinks, markdown links, autolinks, and bare web URLs. Thanks to @ptbosch-figueiredorj for suggesting this, and to @Soleone for the follow-up use case.
- (#1471) Added Kanban column and swimlane-cell add buttons that open the TaskNotes creation modal with the grouped values already filled in. Thanks to @byheaven for suggesting this and @Davincible for the project-board use case.
- (#933) Added non-Markdown vault files such as canvases to project suggestions, using extension-qualified link targets so those files can be selected as task projects. Thanks to @Alvin21Bon for suggesting this.
- (#1475, #725) Added quote/backtick escapes for NLP input, so literal course codes or date words can stay in task titles without being parsed as estimates or dates. Thanks to @RumiaKitinari and @gavingwebb for suggesting this.
- (#1462) Added natural-language date entry to the task date picker, so existing due and scheduled dates can be changed with phrases such as "tomorrow at 3pm" when NLP is enabled. Thanks to @Ruboks-Cube for suggesting this.
- (#1526) Added a native date field to the task date picker, so scheduled and due dates can be changed with the device date picker while keeping optional times visible. Thanks to @jmartinmcfly for suggesting this and @23426356587 for the follow-up feedback.
- (#1603) Added Calendar view toggles for hiding completed or skipped recurring task instances while keeping future outstanding instances visible. Thanks to @wandererovertheseaofpiss for suggesting this.
- (#287, #273, #274) Added linked hover highlighting for Calendar and Agenda events that come from the same task note, so scheduled, due, and recurring entries are easier to connect. Thanks to @girisumit for suggesting this.
- (#280) Added project-specific CSS hooks to task cards and Calendar events, so project-based visual styling can be handled with user snippets. Thanks to @girisumit for suggesting this.
- (#1625) Added \`Shift\` + \`Cmd\`/\`Ctrl\` + \`Enter\` in the Create Task modal to save the current task and reopen the modal for the next one. Thanks to @tcb678 for suggesting this.
- (#1353) Focused the Create Task modal's natural-language input when the modal opens, with a longer mobile delay so the keyboard can open after layout. Thanks to @GiovanH for suggesting this.
- (#1664) Added project-based custom filename template variables, including the first project, all projects, and a short \`projectId\`. Thanks to @bendavis987 for the contribution.
- (#923) Added \`{{projectFilePath}}\` and \`{{projectFilePaths}}\` folder template variables, so task folders can mirror project note locations in the vault. Thanks to @PacoTaco2 for suggesting this.
- (#1697) Added cached Google Calendar, Microsoft Calendar, and ICS events to Mini Calendar days, with compact colored dots and event details from the existing calendar connection. Thanks to @RPGArchivist for suggesting this.
- (#1754) Added optional icons for priority values, so task cards can show a configured priority icon instead of only a colored dot. Thanks to @BrucePlumb for suggesting this and @prepare4robots for the follow-up feedback.
- (#1761) Added TaskNotes edit and task-action submenu entries to Obsidian's native file context menu for recognized task notes. Thanks to @delzero for suggesting this.
- (#1771) Added mobile drag handles to manually sorted Task List Bases views, so dragging can start from the handle without disabling normal text interaction on the rest of the card. Thanks to @PatrickGolz for suggesting this.
- (#1776) Allowed calendar timeline end times after midnight, such as \`26:00\` for a 2 AM next-day end. Thanks to @chrabia for suggesting this.
- (#1784, #1833) Added a per-view \`pinnedColumns\` option for TaskNotes Kanban views, so selected empty columns can stay visible as drop targets while other empty columns remain hidden. Thanks to @loukandr for suggesting and prototyping this.
- (#1794) Added context updates to the task card context menu, so contexts can be added, toggled, or cleared without opening the task edit modal. Thanks to @m13ntrpn for suggesting this.
- (#315, #1356, #1748, #1809) Added a subtle task-card indicator and CSS hooks for tasks with note body details, including existing task bodies read through Obsidian's metadata cache. Thanks to @volodxyz, @Karut, @yeHHH1g, and @aliceinwaterdeep for suggesting this, and to @minchinweb for the follow-up.
- (#1808) Added advanced Kanban swimlane ordering through \`swimLaneOrder\`, so swimlane rows can stay in a stable configured order. Thanks to @rookledookle for suggesting this, and to @benmartinek and @chrabia for the follow-up feedback.
- (#1805) Added an ICS export option to omit completed tasks from generated calendar files. Thanks to @bepolymathe for suggesting this.
- (#659) Added Obsidian links to ICS export descriptions, so exported calendar events can open their source task notes. Thanks to @bepolymathe for suggesting this.
- (#589) Added an Appearance toggle to turn off strikethrough styling on completed task card titles. Thanks to @BrucePlumb for suggesting this.
- (#561) Added a "Last day" option to the custom recurrence month-day picker for month-end repeating tasks. Thanks to @TonyAtlas for suggesting this and @BrucePlumb for the follow-up.
- (#217) Added weekday selection to daily custom recurrence rules, so interval rules such as every three days can skip weekends from the recurrence modal. Thanks to @kmaustral for suggesting this.
- (#1818) Added an auto-height mode for TaskNotes Calendar Bases views so embedded agenda/list sections can size to their content instead of forcing an inner scroller. Thanks to @martin-forge for suggesting this.
- (#1201) Added a Calendar Bases toggle to hide the hourly breakdown in week, custom-days, and day views while keeping the all-day planning row visible. Thanks to @PacoTaco2 for suggesting this.
- (#1176) Added advanced Kanban WIP limits through \`wipLimits\`, so column headers can show \`(current/limit)\` counts and highlight exceeded limits. Thanks to @williamcheuk03 for suggesting this.
- (#914) Added a generated \`Due in\` countdown to the default Agenda Base and allowed Calendar Bases list agendas to span up to 365 days. Thanks to @williamcheuk03 for suggesting this.
- (#900) Added an instant-conversion setting to keep the original Markdown checkbox marker when converting a checkbox into a TaskNote link. Thanks to @dsebastien for suggesting this.
- (#898) Added a mobile-only calendar integration opt-out, so synced desktop calendar settings no longer have to trigger external calendar loading on Obsidian Mobile. Thanks to @cathywu for suggesting this.
- (#887) Added built-in scheduled and due date presets to the Quick actions palette for current tasks. Thanks to @willgraham345 for suggesting this and @anrie for the related preset feedback.
- (#819) Added a command to open Quick actions for the inline task link under the cursor. Thanks to @rlolingo for suggesting this.
- (#798, #1732, #1835) Added hotkeyable commands to edit the current task, add a project to the current task, and add an existing task as a subtask of the current note. Thanks to @xorander00 and @prepare4robots for requesting this, and to @musta-code and @ubidev for the follow-up suggestions.
- (#791) Added a UUID v4 task filename format and \`{{uuid}}\` custom filename template variable. Thanks to @bangbangbanggit for suggesting this.
- (#932) Added hotkeyable commands to cycle the current task's status and priority. Thanks to @rxunique for suggesting this and @luckb0x for the follow-up feedback.
- (#1655) Added live elapsed time to the optional active time tracking status bar item. Thanks to @connradolisboa for suggesting this.
- (#1622) Allowed multiple comma-separated default reminder offsets for timed Google Calendar task exports. Thanks to @solidabstract for suggesting this.
- (#706, #820, #1040) Added direct Pomodoro duration editing, hour-aware timer formatting, clearer one-minute controls, and an optional active Pomodoro status bar countdown. Thanks to @SublunarSage, @lj1446615403-cloud, @0-BSCode, and @thestrike72 for the suggestions and feedback.
- (#873) Added an optional built-in sound for task reminder notifications, with volume and preview controls in Settings. Thanks to @berzernberg for suggesting this.
- Added a generated Pomodoro statistics Base with daily and monthly summary views for Pomodoro history stored in daily notes.
## Changed
- Expanded the bug report template to ask for Obsidian "Show debug info" output, affected task frontmatter, relevant Bases file contents, reproduction steps, and related logs or screenshots.
- Release notes now show the default \`.base\` file regeneration reminder only on the current version section, keeping older bundled sections focused on their own changes.
- Updated the release notes GitHub prompt to invite feedback while still asking satisfied users to star the project.
- (#239) Ordered Kanban status and priority columns by the configured status order and priority weights when no manual column order is saved. Thanks to @ScumbagScalawag for asking about this, and to @nightroman, @lavir, and @elvarb for the follow-up discussion.
- (#269) Marked Kanban status columns that come from values outside the configured TaskNotes statuses, so manually edited or external status values are visible as non-standard instead of blending into the board. Thanks to @cstelmach for suggesting this and @digitaldoctors for the follow-up.
- Refined Kanban empty columns, swimlane rows, and column drag handles, and added a per-view compact card layout option for denser boards.
- Kept Kanban swimlane rows from shrinking to share the viewport so the Max Swimlane Height setting is respected.
- Added guidance in Pomodoro statistics and Base file settings explaining that Pomodoro Base views require daily notes storage.
- (#323) Reordered task modal action buttons to match the right-click task menu order. Thanks to @23426356587 for suggesting this.
- (#1189) Made the Create/Edit Task modal priority picker follow the priority order configured in Settings. Thanks to @n1njaznutz for suggesting this.
- Made task-card priority dots and configured priority icons slightly larger for better visibility.
- (#1244) Clarified the Task Properties documentation for custom property keys and status values in Bases filters and sorting. Thanks to @Arachnidai for suggesting this.
- (#1234) Kept right-aligned subtask chevrons visible on task cards instead of only showing them on hover. Thanks to @n1njaznutz for suggesting this.
- (#1237) Made today's date more visible in the Mini Calendar view when another day is selected. Thanks to @riekusr for suggesting this.
- (#1348) Let long task titles wrap inside the Create/Edit Task modal title field while keeping saved titles single-line, and widened the contexts and tags fields in the modal details area. Thanks to @hasanyilmaz for suggesting this.
- (#1392) Made TaskNotes date fields accept compact \`YYYYMMDD\` typing and pasted dates. Thanks to @kazerniel for suggesting this.
- (#1431) Showed the year on task-card due and scheduled dates when the date is outside the current year. Thanks to @kazerniel for suggesting this.
- (#1429) Opened TaskNotes view commands in a new tab when they load configured Base files, so they do not replace the active note. Thanks to @Ruboks-Cube for suggesting this.
- (#1426) Added copy actions for TaskNotes Bases views, including current-view filenames, links, and titles from the result count menu, plus selected-task copy actions in the batch menu, while keeping the native Bases copy and CSV export actions available. Thanks to @kmaustral for suggesting this.
- Improved keyboard access, mobile layout, and theme color consistency across task cards, TaskNotes Kanban, Bases Kanban, calendar controls, stats, settings, and filter popovers.
- (#1526) Made the Create/Edit Task modal due and scheduled date buttons open a calendar-first picker where clicking a date saves immediately, with time entry still available in the picker. Thanks to @jmartinmcfly for suggesting this and @23426356587 for the follow-up feedback.
- (#1642) Made completion-based custom recurrence use flexible weekly, monthly, and yearly intervals without forcing a fixed weekday, month day, or month. Thanks to @Volker-brdb for suggesting this.
- (#1724) Moved recurring task complete/skip instance actions into the date area of the task context menu. Thanks to @prepare4robots for suggesting this.
- (#1762) Used the configured Google Calendar task export target as the default calendar when creating manual external calendar events. Thanks to @chrabia for suggesting this.
- (#1774) Made expandable project chevrons visible and easier to tap on mobile. Thanks to @sh0nuff for suggesting this.
- (#190) Made task-card and inline task-link action controls easier to tap on mobile, including always-visible task options on touch layouts. Thanks to @Poly-0000 for suggesting this.
- (#518, #1710, #1785) Added an opt-in setting for Create subtask to inherit the parent task's projects, contexts, priority, and non-identifying tags while always keeping the parent-task project link. Thanks to @bepolymathe, @Jalpara, and @poulpoulsen for reporting this, and to @tomsymonds, @AndyEveritt, @wedgen, @lindsaylearns, and @hokfujow for the follow-up feedback.
- (#1790) Extended the identifying-tag hiding setting to task modal tag suggestions, and kept hidden identifying tag children in place when editing other tags. Thanks to @loukandr for suggesting this.
- (#1804) Made the inline-created task folder setting visible even when instant conversion is disabled, and clarified that leaving it empty uses the default tasks folder. Thanks to @CaFeZn for suggesting this.
- (#1822) Matched the Task Edit Modal subtask list order to the existing relationship sort, so active and higher-priority subtasks appear ahead of completed ones. Thanks to @Glint-Eye for suggesting this.
- (#1233, #1339) Added an Appearance setting to expand project subtasks by default in task cards, while still letting individual cards be collapsed. Thanks to @n1njaznutz and @hasanyilmaz for suggesting this and @kazerniel and @benmartinek for the follow-up.
- (#763) Made the Relationships widget appear on project notes that match Project Autosuggest tag or property filters, even before any tasks link to the project. Thanks to @ChadHattabaugh for suggesting this.
- (#732) Remembered the Task & Project Statistics filters between openings, including the selected date range, custom dates, and minimum time filter. Thanks to @RumiaKitinari for suggesting this.
- (#1335) Added optional default times for new task scheduled and due dates, so default-dated tasks can appear as timed calendar events instead of all-day events. Thanks to @echo-saurav for suggesting this.
- (#1327) Made TaskNotes Bases search match any word in a multi-word search instead of requiring the whole phrase. Thanks to @craziedde for suggesting this.
- (#1318) Made aliased inline task links use the alias text inside the task widget, so \`[[Task title|short label]]\` can display as \`short label\`. Thanks to @3zra47 for suggesting this and @kazerniel for the follow-up.
- (#1325) Added \`./\` and \`../\` support to Include folders filters for project and file autosuggest, resolved from the active note's folder. Thanks to @EpolPers for suggesting this.
- (#1313) Added generated \`llms.txt\` and \`llms-full.txt\` files to the documentation site, so the primary docs can be shared with LLM tools more easily. Thanks to @JacksonMcDonaldDev for suggesting this.
- (#1308) Added a Calendar view option to stop date links from creating missing daily notes, while still opening existing daily notes. Thanks to @Arachnidai for suggesting this.
- (#1300) Allowed priority, status, calendar subscription, and timeblock color settings to use Obsidian theme color names such as \`red\`, \`blue\`, and \`cyan\`. Thanks to @thestrike72 for suggesting this.
- (#1299) Added a command that creates or opens a task and immediately starts time tracking for it. Thanks to @slipstyle for suggesting this.
- (#1284) Added an exact-match option for hiding task identification tags, so \`#task\` can be hidden while nested tags such as \`#task/project\` remain visible. Thanks to @3zra47 for suggesting this.
- (#1009) Added a confirmed Delete button to the Edit Task modal, so unwanted task notes can be removed without first opening the note file. Thanks to @jalooc for suggesting this.
- Improved the internal structure of Calendar, Kanban, Bases, task cards, and task modals to make future changes easier to test and maintain.
## Fixed
- (#697, #1374) Recognized manually authored task notes that use a single scalar tag such as \`tags: task\`, so they appear in TaskNotes views and menus like notes using YAML list tags. Thanks to @aubreyz and @phortx for reporting this, and to @jleewastaken for the follow-up.
- Removed the upward hover shift from calendar events while keeping the hover shadow feedback.
- Made same-column manual-order drops in TaskNotes Kanban settle immediately when the local order patch is safe, including virtual columns through a stable reorder path that avoids layout jumps.
- Made single-card cross-column drops in TaskNotes Kanban settle through a local state patch when the move is safe, reducing the wait for the full Bases refresh.
- Fixed Calendar timeblocks created from a selected time range so they appear as soon as Obsidian indexes the daily note update, instead of waiting for a later refresh.
- Replaced the external calendar event emoji marker with the calendar icon and kept it in the same top-right event corner.
- Restored Task List group toggles and recurring calendar month controls to compact icon buttons instead of inherited boxed theme buttons.
- Refined the settings tab navigation styling so tabs read as quieter inline navigation instead of default buttons.
- (#263) Made the instant inline task conversion button respond to touch/pointer activation, so mobile multi-line selections can be converted into TaskNotes. Thanks to @cathywu for reporting this.
- (#216) Preserved \`@context\` markers when converting Tasks-plugin-style checkbox tasks into TaskNotes, while keeping those contexts out of the created task title. Thanks to @ksdavidc for suggesting this, and to @hangryscribe3, @nayatiuh, and @natleahh for the follow-up feedback.
- (#508) Showed project note names instead of full project paths in grouped Kanban and Task List headings, while keeping the headings linked to the project note. Thanks to @elvarb for reporting this and @dmodify for confirming it in Task List.
- (#408) Used the task title as the native system notification title for task reminders instead of always showing \`TaskNotes Reminder\`. Thanks to @DudeThatsErin for reporting this and @phillipadsmith for the follow-up.
- (#385) Let Mini Calendar month controls shrink and wrap cleanly in narrow sidebars. Thanks to @iholston for reporting this.
- Fixed Calendar List view task cards so they use the available row width without duplicate list cells, row-hover backgrounds, or linked-hover styling.
- (#552) Made instant task convert buttons appear for checkbox tasks inside callouts, and kept converted links inside the callout list. Thanks to @Oblique82 for reporting this and @ksdavidc for the follow-up.
- (#559) Treated notes linked to one loaded recurring calendar event instance as related to the other instances in that series. Thanks to @cathywu for reporting this and @mdbraber for the implementation notes.
- (#685) Made Calendar list views respect the All-day slot option by hiding all-day events from the list when that option is turned off. Thanks to @RumiaKitinari for reporting this.
- (#643) Stopped custom filename templates such as \`task-{year}{month}{day}{hour}{minute}\` from incorrectly showing the "filename shortened" notice when creating tasks. Thanks to @minchinweb for reporting this.
- (#722) Made Skip Break reset a queued Pomodoro break back to the next focus timer without starting a session. Thanks to @Goossiii for reporting this and @YIRU69 for the follow-up.
- (#782) Made recurrence weekday choices follow the configured first day of week, and made the quick "Weekdays only" recurrence use locale weekend data instead of assuming Monday through Friday everywhere. Thanks to @BKSalman for reporting this.
- (#872) Made note-level task cards appear immediately, and stay visible while editing, when a task note is embedded as a Canvas file node. Thanks to @bangbangbanggit for reporting this and @benmartinek for the follow-up.
- (#856) Fixed filters for number custom fields so numeric task values match equivalent filter values entered as text. Thanks to @thoughtcipher for reporting this.
- (#1039) Restored clearer TaskNotes Bases grouping for nested project paths, and made the Calendar refresh control an icon button again. Thanks to @dblinnikov for reporting this.
- (#1034) Let embedded TaskNotes Calendar views size to their content by default, so month, week, and day embeds no longer reserve full-pane proportions inside notes. Thanks to @same774 for reporting this.
- (#1023) Kept task modal custom fields scrollable above the iPhone keyboard while creating or editing tasks. Thanks to @3zra47 for reporting this.
- (#1019) Kept active Pomodoro and time-tracking task references working after the tracked task file is renamed. Thanks to @AndreMonthy for reporting this.
- (#1037) Let embedded TaskNotes Calendar year views size to their content and kept the year title from wrapping vertically. Thanks to @same774 for reporting this.
- (#1047) Wrapped long file paths in the Edit Task modal metadata section, so narrow mobile screens no longer get a sideways scrollbar from the File row. Thanks to @3zra47 for reporting this.
- (#1051) Preserved extra values on a property-based task identification field when saving a task, so list properties such as \`class: [task, habit]\` no longer get collapsed to only the identifying value. Thanks to @WhoIsSeanGalt for reporting this.
- (#1060) Reused and revealed an already-open Calendar/Base view when running view commands, so a view kept in the sidebar no longer reopens in a new main tab. Thanks to @kmaustral for reporting this.
- (#1075) Hid the native WebKit date-input label that could appear as \`Label\` when editing scheduled dates on macOS. Thanks to @3zra47 for reporting this.
- (#1076) Allowed timeblocks to end at midnight using \`00:00\`, and accepted \`24:00\` as an explicit end-of-day value in timeblock validation. Thanks to @skoove for reporting this and @gregor202 for the follow-up.
- (#1086) Fixed the Calendar \`+ more\` control in dark mode so expanded all-day task groups stay readable. Thanks to @same774 for reporting this.
- (#1100) Applied Advanced Calendar View search and title filters to the tasks used for calendar rendering, so filtering controls affect which tasks appear on the calendar. Thanks to @quiet-coder-io for reporting this.
- (#1147) Added a delete action for recent Pomodoro statistics sessions, so erroneous Pomodoro history can be removed without editing plugin storage or daily-note frontmatter manually. Thanks to @RumiaKitinari for reporting this and @BrucePlumb for the follow-up.
- (#1150) Kept recurring tasks' due dates visible in Calendar Bases views, and showed their scheduled date when recurrence instances are hidden. Thanks to @thomatino for reporting this and @BrucePlumb for the follow-up.
- (#1159) Softened Calendar time-entry styling so recorded time blocks no longer visually outweigh task events. Thanks to @hatespinach for reporting this.
- (#1191) Aligned the task-card and relationships widgets inside notes with Obsidian's editor margins, including readable-line-width layouts. Thanks to @minchinweb for reporting this.
- (#1183) Kept the Calendar create menu open after drag-selecting a time range, so the selected duration can be used when creating a task. Thanks to @randomness42 for reporting this.
- (#1179) Stopped Calendar Bases views from repainting after unrelated note updates when the visible calendar data has not changed. Thanks to @same774 for reporting this.
- (#1156) Kept property-based task identification through the \`tags\` property from rewriting task tags as a plain text value, and generated default Bases now use tag membership for that setting. Thanks to @seepage87 for the detailed migration report and @chrsdk for the follow-up.
- (#1232) Fixed generated Task List Base date filters so recurring tasks scheduled for today appear in the Today view, and today's completed recurring instances stay hidden. Thanks to @mvichosfm for reporting this and @ArthurGideon and @VarunNikam22 for the follow-up.
- (#1231) Fixed the generated Task List Base Overdue view so tasks with scheduled dates in the past appear alongside tasks with due dates in the past. Thanks to @Lorite for reporting this and @dictionarymouse for the follow-up.
- (#1228) Matched the task details editor's Markdown heading colors to the active Obsidian theme, including themes that customize heading colors. Thanks to @BrucePlumb for requesting this.
- (#1227) Refreshed the relationships widget when project references are indexed or updated so project notes can show related tasks automatically again. Thanks to @luckb0x for reporting this.
- (#1219) Fixed Kanban drags that start on an expanded subtask card so they move that subtask instead of dragging the parent card. Thanks to @craziedde for reporting this.
- (#990) Treated one-item status lists written by Obsidian Properties as the same status value in TaskNotes Kanban, so they no longer create duplicate columns. Thanks to @mlevison for reporting this.
- (#983) Let Agenda Calendar views wrap their header controls and task titles inside narrow sidebars, so Today and refresh controls and task icons remain visible without sideways scrolling. Thanks to @3zra47 for reporting this.
- (#982) Made TaskNotes task-card typography scale from Obsidian's text font size setting, so Bases and Agenda task text follows larger mobile font settings. Thanks to @3zra47 for suggesting this and @chrsdk and @scottaltham-payroc for the follow-up.
- (#966) Made reminder delete buttons larger and always visible on mobile, so reminders can be removed from the Manage All Reminders modal on iPad. Thanks to @PSG2017 for reporting this.
- (#964) Made Pomodoro and time-tracking task selection use the current recurring instance status, so a recurring task can still be selected after an earlier instance was completed. Thanks to @lomarcanys for reporting this.
- (#944) Preserved number and boolean custom field values when moving tasks between grouped Kanban or Task List columns, and when creating a task from a grouped Kanban column. Thanks to @thoughtcipher for reporting this.
- (#935) Fixed Task List priority sorting so descending order puts higher-weighted priorities first, and due dates are used before scheduled dates when priority values tie. Thanks to @Glint-Eye for reporting this and @kacoroski for the follow-up.
- (#922) Made the \`Blocked\` task-card pill expand the blocker tasks, and rendered \`blockedBy\` dependencies as clickable links when that property is shown on cards. Thanks to @prayidae for reporting this and following up.
- (#919) Fixed exported ICS task events so they use valid calendar event statuses and can be imported by stricter calendar apps. Thanks to @benoitjadinon for reporting this.
- (#1213) Fixed embedded Task List Bases in Obsidian pop-out windows so typing below the embed no longer leaves a large blank gap. Thanks to @same774 for reporting this.
- (#1243) Removed quoted multi-word custom field NLP expressions from created task titles after saving the custom field value. Thanks to @Arachnidai for reporting this.
- (#1252) Hardened the calendar-first task date picker for iPad taps so date buttons use direct touch manipulation. Thanks to @alxandrharris for reporting this.
- (#1261) Removed the extra Task List Base scrollbar when an embedded task list note is placed in a sidebar, while keeping normal embedded task lists scrollable in the main note area. Thanks to @cathywu for reporting this.
- (#1347) Lowered TaskNotes task-card tag CSS specificity so hierarchical tag colors from Obsidian themes and tag-color plugins can apply correctly. Thanks to @3Fish for reporting this.
- (#1374) Recognized status and priority labels entered through Obsidian Properties or Bases as their configured TaskNotes values. Thanks to @phortx for reporting this.
- (#1373) Parsed numeric natural-language dates with the configured calendar locale, so \`en-GB\` treats \`11/06/2026\` as 11 June instead of November 6, and \`YYYY/MM/DD\` works consistently. Thanks to @AleMunin for reporting this and @imsuck for the follow-up.
- (#1370) Prevented recurring task series from being queued for auto-archive when their parent status uses auto-archive, so ongoing recurring tasks are not moved away after completing an occurrence. Thanks to @Jomo94 for reporting this and @martin-forge for the follow-up discussion.
- (#1367) Made recurring task completion counts use the total expected instances for finite \`COUNT\` or \`UNTIL\` recurrences, and stopped showing a made-up percentage for unbounded recurrences. Thanks to @saurinni for reporting this.
- (#1365) Preserved email and other URI links from converted inline task titles by moving the original links into the new task body, and rendered \`message:\`/\`mailto:\` markdown links as external links in TaskNotes surfaces. Thanks to @phillipadsmith for reporting this and @hasanyilmaz for the follow-up.
- (#1350) Refreshed inline task widgets in Reading mode after task property edits, so changed dates and other visible properties no longer stay stale until the note is reopened. Thanks to @tmsbn for reporting this.
- (#1329) Pulled the relationships widget up to the end of the note content without removing its normal spacing, and kept that placement updated while editing and on load so it no longer covers the editor. Thanks to @Volker-brdb for reporting this.
- (#1326) Treated empty task frontmatter values as missing, so empty titles fall back to the filename and blank date, priority, and recurrence fields are ignored. Thanks to @craziedde for suggesting this.
- (#1316) Stopped stale Workspace state from overriding the configured Calendar view mode, so switching Workspaces no longer forces an old Day/Week/List choice over the view default. Thanks to @kmaustral for reporting this and following up.
- (#1302) Read task frontmatter directly from the task file when Obsidian has not indexed its metadata yet, so visible tasks can still be opened, updated, and selected instead of reporting "Task not found". Thanks to @WorldTeacher for reporting this and @Steven-AA for confirming it.
- Kept just-written task data available while Obsidian's metadata cache catches up, so immediate reads after task edits no longer briefly return stale values.
- (#1297) Made the Create or open task footer tappable, so mobile users can create the typed task without needing the Shift+Enter shortcut. Thanks to @slipstyle for reporting this.
- (#1288) Allowed formula properties to appear in Calendar property-based event start and end date selectors. Thanks to @hasanyilmaz for reporting this.
- Made TaskNotes Kanban drags show a lightweight held-card preview, so the dragged card remains easy to track while the source column opens the drop slot.
- (#1423) Refreshed TaskNotes Bases views when subtasks are deleted, so expanded project cards drop removed subtasks and stop showing project controls when the last subtask is gone. Thanks to @normenmueller for reporting this.
- (#1419) Kept custom user field name, key, and default-value edits in Task Properties settings when closing settings without first blurring the field. Thanks to @s33a for reporting this and @kacoroski for the follow-up.
- Reduced redundant settings writes by coalescing overlapping saves, so settings changes made in quick succession finish with the latest values without repeating every intermediate save cycle.
- (#1331, #1411) Made Agenda Calendar Bases respect the Base sort order within each day instead of falling back to alphabetical title order. Thanks to @bane73 and @ky1ejs for reporting this.
- (#1383) Made task modal markdown editors expose the active editor API expected by plugins such as Templater. Thanks to @tomsymonds for reporting this.
- Fixed the first-run Create/Edit Task modal so the default fields appear immediately after installing TaskNotes, without needing to open Modal Fields settings or restart Obsidian.
- (#1895) Restored the natural-language preview in the Create Task modal. Thanks to @ssonhub for reporting this.
- (#1898) Cleared stale Calendar time-axis column widths when switching views, so Day, Week, and 3-day views keep the time labels anchored on the left. Thanks to @ddevaal for reporting this.
- (#1439) Fixed generated Bases dependency filters so \`blockedBy\` entries stored as links, strings, or dependency objects are handled consistently in Not Blocked and Relationships views. Thanks to @prayidae for reporting this and following up.
- (#1435) Prevented malformed task dependency, status, or priority values from breaking the task context menu. Thanks to @23maverick23 for reporting this.
- (#1434) Kept older filename-titled tasks readable after turning off "Store title in filename" by falling back to the filename when a task has no usable title property. Thanks to @hujuDev for reporting this.
- (#1433) Made the Due date and Scheduled date weekday picker follow the configured first day of week. Thanks to @sandchipper for reporting this.
- (#1430) Showed custom user-field property keys in Modal Fields settings instead of internal field IDs. Thanks to @JerryLu086 for reporting this.
- (#1427) Fixed project autosuggest Required Tags filters so frontmatter tags parsed by Obsidian are handled the same way as direct tag-property filters. Thanks to @ProHaller for reporting this.
- (#1495) Added an Update default files action for generated Bases views, so task-tag or task-identification setting changes can refresh existing \`.base\` filters without deleting files manually. Thanks to @Liya430 for reporting this.
- (#1512) Prevented the split Create/Edit Task modal details pane from collapsing to a one-character-wide column under the Minimal theme. Thanks to @willfanguy for reporting this and sharing detailed CSS notes.
- (#1524) Fixed task-card font sizes shrinking when a Bases view is opened in an Obsidian pop-out window. Thanks to @Glint-Eye for reporting this.
- (#1535) Fixed the generated Relationships Base Subtasks filter so single project links do not trigger a Bases \`contains\` error. Thanks to @DanaKyle for reporting this.
- (#1102) Refreshed task cards when a task status is edited directly in Obsidian frontmatter, so the card no longer stays on the old status until it is clicked. Thanks to @Wayment9504 for reporting this.
- (#1105) Added an explicit Close action to the mobile task options menu, so iPhone users do not need to tap near the top system bar to dismiss it. Thanks to @J-R-Troutman for reporting this.
- (#1550) Prevented mobile Calendar event drags from opening the task context menu before the drag can begin. Thanks to @stil-sudo for suggesting this.
- (#1563) Removed duplicate entries from Calendar event related notes when the same linked file is also a TaskNote. Thanks to @VarunNikam22 for reporting this.
- (#1566) Rendered grouped multi-project values as individual links when a Bases group title contains multiple project links. Thanks to @ptsouchlos for suggesting this.
- (#1569) Allowed local ICS calendar paths inside the vault to be pasted as absolute filesystem paths, and showed a clearer error when the file is outside the vault. Thanks to @Photon89 for reporting this and following up.
- (#1584) Sanitized task-card status and priority class names, so custom values with spaces no longer create invalid CSS classes. Thanks to @omber for reporting this.
- (#1587) Stored dependencies added from the task context menu as wikilinks, matching the Edit Task modal. Thanks to @mgrecar for reporting this.
- (#1590) Clarified HTTP API task creation docs and OpenAPI schema for writable \`blockedBy\` dependencies, and marked \`blocking\` as a read-only derived relationship. Thanks to @hGriff0n for reporting this.
- (#1591) Added a startup guard that avoids saving default settings over an existing settings file if Obsidian temporarily returns no plugin data during an update. Thanks to @GGlider for reporting this.
- (#1593) Made the New button in TaskNotes Bases views open the TaskNotes create task modal again, so new tasks respect the configured default tasks folder. Thanks to @katlandreth for reporting this.
- (#1594) Made task cards inside recurring task notes complete the task's current scheduled occurrence instead of today's date when no calendar or view date is supplied. Thanks to @ngraham20 for reporting this.
- (#1601) Prevented overlapping Live Preview relationship-widget injections from leaving duplicate subtask/relationship sections in a note. Thanks to @wealthychef1 for reporting this and @benmartinek for confirming it.
- (#1610) Made expanded subtasks in TaskNotes Bases views follow the current view's sorted task order instead of a fixed fallback order. Thanks to @MrZzard for reporting this and @slipstyle for confirming it.
- (#1609) Restored scrolling in wide split-layout task edit modals when the form content is taller than the modal. Thanks to @3zra47 for reporting this.
- (#1614) Wrote unchecked boolean custom user-field defaults to new task frontmatter, including tasks created through instant conversion. Thanks to @kobalteule for reporting this.
- (#1611) Made generated default Bases urgency scores fall back safely when the next-date distance is missing. Thanks to @benoitjadinon for reporting this and suggesting the formula fix.
- (#1623) Honored "Store title in filename" across task creation and edits, so the mapped title property is omitted from frontmatter and stale title fields are removed on save. Thanks to @VenturaNotes for reporting this, and to @Ender367, @slipstyle, and @loukandr for confirming and tracing affected paths.
- (#1621) Made Kanban swimlane labels stop freezing on mobile and kept their label column compact, leaving more room for task cards while horizontally scrolling. Thanks to @karenchoe428 for reporting this.
- (#1615) Detected Obsidian custom multi-text properties exposed through \`widget: "multitext"\` as list properties, so Kanban can split those values into multiple columns. Thanks to @konton71 for reporting this.
- (#1626) Expanded recurring ICS subscription events through the one-year subscription window for high-frequency recurring calendars. Thanks to @pib for reporting this.
- (#1628) Refreshed Calendar Bases views promptly when switching between filtered Agenda views, so the previous view's task set does not stay visible until the delayed refresh. Thanks to @Lanalangz for reporting this.
- (#1629) Saved \`blockedBy\` dependencies selected in the Create Task modal. Thanks to @obsilover for reporting this.
- (#1634) Aligned custom status icons in inline tasks with the default inline status circle. Thanks to @ttlaylor for reporting this and @basbarten for confirming it.
- (#1636) Restored the active styling for the Calendar list-view toolbar button. Thanks to @vroablec for reporting this.
- (#1493, #1638) Kept task time tracking consistent when switching or clearing tasks during an active Pomodoro. Thanks to @ROS-SDN and @katonapng for reporting this, and to @anomatomato for confirming it.
- (#1639) Respected the aliased-link overlay exclusion in Reading mode even when the alias text matches the task title. Thanks to @MiracleXYZ for reporting this.
- Fixed actively tracked task cards so the blue time-tracking outline stays visible along the card edges.
- (#1657) Preserved Bases view defaults when creating tasks from the TaskNotes Kanban/List view New button, so project-scoped views can pass their project assignment into the create task modal. Thanks to @casualQuads122 for reporting this.
- (#728, #1831) Preserved frontmatter defaults supplied by Obsidian's Bases New action when opening the TaskNotes create task modal from custom Bases views, so filtered views can prefill matching tags, projects, contexts, and custom fields. Thanks to @DillPickle80 and @echo-saurav for suggesting this, and to @prayidae and @renatomen for the detailed follow-up.
- (#726) Added an instant-conversion option to use the closest heading above the converted line as a project, so checkbox tasks under project headings can inherit that project automatically. Thanks to @ghelton for suggesting this.
- (#1662) Preserved frontmatter from ICS event note templates when quoted event variables or Templater expressions are used. Thanks to @victorhg for reporting this.
- (#1663) Fixed Japanese and other Unicode tags on task cards so Kanban tag pills keep the same rounded styling as ASCII tags. Thanks to @kutty-1119 for reporting this.
- (#1649) Restored daily-note navigation from the Calendar Day view date header. Thanks to @BaccanoMob for reporting this.
- (#1648, #1665) Fixed the API endpoint list in Integrations settings so it uses the configured bearer token when API authentication is enabled, instead of reporting the running local server as inaccessible. Thanks to @npondel and @warm-july for reporting this.
- (#1668) Fixed the Create Task magic wand so NLP-triggered custom field values are copied into the custom property inputs before saving. Thanks to @hokfujow for reporting this.
- (#1669) Stopped the startup settings migration check from rewriting \`data.json\` just because saved calendar defaults are \`false\`, \`0\`, empty, or \`null\`, reducing unnecessary sync churn. Thanks to @thehyperadvisor for reporting this.
- (#1674) Improved the timeblock creation error when Daily Notes cannot read its configured folder, so the modal notice points to the Daily Notes core plugin settings instead of only logging the folder lookup failure. Thanks to @Ender367 for reporting this.
- (#1680) Fixed TaskNotes Calendar Bases options stored under \`options\`, so Agenda views respect \`showPropertyBasedEvents: false\` and no longer show duplicate property-based rows for the same task. Thanks to @xiaoyaozhu1991 for reporting this and @KondrotM for confirming it.
- (#1681) Reduced the cost of inline checkbox convert buttons by only scanning the visible editor range instead of the full document. Thanks to @en-ot for reporting this and @hokfujow for the follow-up.
- (#1689) Fixed task reminders added or rescheduled through direct frontmatter edits so the notification queue refreshes immediately and relative reminders recalculate from the latest task dates. Thanks to @garzonjav for reporting this.
- (#1693) Fixed generated default Bases formulas so empty due and scheduled dates are checked with \`.isEmpty()\` instead of date-field truthiness. Thanks to @benoitjadinon for reporting this.
- (#1702) Removed the forced bottom gap under TaskNotes custom Bases views, so calendar and other TaskNotes views can fill the available pane height. Thanks to @AudreyLooby for reporting this.
- (#1719) Fixed task cards in reading mode so Obsidian 1.12.x header changes no longer place the card above the title and properties or drop it after returning to a tab. Thanks to @tholbrook9 for reporting this and tracing the DOM change.
- (#1722) Saved the source note immediately after converting an inline checkbox task to a TaskNote, so Kanban views do not keep showing the stale inline task alongside the new task file. Thanks to @literallydope for reporting this and sharing screenshots.
- (#1750) Fixed generated default Bases filters for property-based task identification when the identifying property name contains spaces. Thanks to @Igorgro for reporting this.
- (#1745) Clarified the inline task documentation so \`Create new inline task\` is distinguished from current-line conversion. Thanks to @yvos for reporting the mismatch.
- (#1485) Stopped Google Calendar manual refresh from showing a success notice after token refresh or calendar-list failures. Thanks to @ebanDev for reporting this.
- (#1474) Made priority-based Kanban swimlanes follow the configured priority order instead of alphabetical task data order. Thanks to @kanzaki1201 for reporting this and @SoTHISIsFitness for the follow-up investigation.
- (#1470) Restored pointer cursors on TaskNotes interactive elements under Obsidian themes that set \`--cursor\` to the default cursor. Thanks to @TheFrostedDev for reporting this.
- (#1463) Documented the supported \`FilterQuery\` payload for \`POST /api/tasks/query\`, including context filtering examples and generated API schema details. Thanks to @tcb678 for reporting this and @soloidx for sharing a working query example.
- (#1464) Made \`context\` on \`GET /api/tasks\` follow the same filtering guidance as \`project\`, so the API now points clients to \`POST /api/tasks/query\` instead of ignoring the parameter. Thanks to @tcb678 for suggesting this.
- (#1457) Rendered scheduled-to-due calendar spans with scheduled times as daily timed events instead of moving them to the all-day section. Thanks to @atos2212-blip for reporting this and @rayvermey for confirming it.
- (#1450) Returned configured user fields in HTTP API task responses under \`customProperties\`, while keeping the configured frontmatter keys available on each task. Thanks to @Admorei for reporting this and @nschenone for the follow-up.
- (#1449) Let embedded Agenda views use auto-height sizing by default, so one-day list embeds no longer reserve a large empty calendar block. Thanks to @GlebYavorski for reporting this.
- (#1446) Kept custom Kanban columns from \`columnOrder\` available when they are empty, so \`hideEmptyColumns: false\` can show drop targets for custom grouped values. Thanks to @akhtsang for reporting this.
- (#1459) Avoided double "Failed to create task" prefixes in task creation error notices. Thanks to @Sineapple for reporting this, and to @slipstyle and @Stockemer for the follow-up investigation.
- (#1469) Fixed Convert current note to task so saving the untouched edit modal writes the task frontmatter instead of reporting no changes. Thanks to @slipstyle for reporting this, and to @jhoogeboom and @ngraham20 for confirming it.
- (#1466) Prefilled the current note as the project when creating a task from an embedded Subtasks/Relationships Base filtered with \`this.file.asLink()\`. Thanks to @jhoogeboom for reporting this, and to @cybersader, @fsmontenegro, and @benmartinek for the follow-up discussion.
- (#1476) Showed linked parent-task project titles instead of timestamp filenames in project stats and grouped task views when the linked task has a frontmatter title. Thanks to @RumiaKitinari for reporting this.
- (#1487) Let Calendar task event titles wrap instead of clipping long names, and removed the redundant due-date prefix from due task events. Thanks to @Alexander-Bergmann for reporting this.
- (#1488, #1739) Enabled Kanban touch dragging on touch-capable desktop and convertible devices, not only mobile Obsidian. Thanks to @tmoyland001 and @mgsima for reporting the drag failures, and @SoTHISIsFitness for investigating related task-property cases.
- (#1738) Fixed Outlook calendar subscriptions whose event timezones reference the base Windows timezone name while the feed defines a suffixed timezone name. Thanks to @Mirrimo for reporting this, @rafavital for confirming it, and @rogerfsh for tracing the ICS timezone mismatch.
- (#1734) Fixed dependency picker search when task priority values are stored as non-string frontmatter values. Thanks to @MatthewClarkeDev for reporting this and identifying the stack trace.
- (#1733) Preserved wikilinks in task titles and rendered them as clickable links on task cards. Thanks to @bitscorch for suggesting this.
- (#1728) Applied the "Use parent note as project" default when creating a new task from the command palette or ribbon. Thanks to @greatEmily for reporting this.
- (#1759) Advanced stale due dates when recurring tasks move to their next scheduled occurrence, so work-window tasks do not remain overdue after completion. Thanks to @MattPryze for reporting this.
- (#1766) Fixed Calendar Bases date navigation from custom note properties, so embedded calendar views can open on the date stored in the selected property instead of falling back to today. Thanks to @chrabia for reporting this.
- (#1767) Aligned the start and end time rows in the timeblock creation modal. Thanks to @loiveli for reporting this.
- (#1783) Replaced the default browser drag ghost for Kanban cards so dragging a card no longer makes the next card look semi-transparent. Thanks to @loukandr for reporting this and tracing the drag image behavior.
- (#1796) Restored expanded subtasks immediately after renaming a parent task file and updating links. Thanks to @bung69 for reporting this.
- (#1797) Improved manual ordering so long Kanban columns remain scrollable while dragging, mobile Kanban drops can place a card relative to another card, Kanban/Task List drops resolve the final drop position more reliably, generated manual-order ranks match Bases sorting, and manual-order properties such as \`sort_order\` render on task cards when enabled. Thanks to @SKIERZZ for reporting this and sharing videos.
- (#1812) Separated Microsoft OAuth token status from calendar sync status, and surfaced Microsoft calendar fetch errors in the integrations settings card instead of leaving them console-only. Thanks to @henninger80 for the detailed report.
- (#1814) Restored NLP project autosuggest in the Create or Open Task command, so \`+\` project suggestions use the same filtered project lookup as the Create Task modal. Thanks to @adammahad for reporting this.
- (#1820) Kept API-created tasks readable immediately after creation even if Obsidian has not finished indexing the new file metadata yet. Thanks to @vadminas for reporting and tracing the cache desync.
- (#1823) Prevented zero-duration timed external calendar events from rendering under more than one day in list-style calendar views. Thanks to @martin-forge for reporting and tracing the Google Calendar case.
- (#1841) Prevented Kanban boards from duplicating columns when wikilinked status values are grouped through Bases. Thanks to @lendamico for reporting and sharing the screen recording.
- (#1846) Saved NLP-triggered boolean custom fields as real booleans instead of quoted strings, so they match checkbox-created values and Bases filters. Thanks to @DevOps-Toast for reporting and sharing screenshots.
- (#1849) Prevented repeated clicks on task-card scheduled and due date labels from stacking duplicate date menus when Obsidian native menus are disabled. Thanks to @3zra47 for reporting.
- (#1850) Added mobile bottom spacing to TaskNotes list views so the final task can scroll above Obsidian's floating mobile controls. Thanks to @AlejandroRigau for reporting and sharing the iPhone screenshot.
- (#1852) Improved mobile timed calendar event rendering with shorter time labels, tighter spacing, and event-colored task/calendar blocks. Thanks to @redrumthebum for reporting and sharing screenshots.
- (#1757, #1853, #1775) Respected an existing \`mdbase.yaml\` \`types_folder\` when regenerating mdbase task type definitions, so the generated \`task.md\` can live outside the vault-root \`_types\` folder. Thanks to @aldrichtr for the original request and implementation exploration, and @hangryscribe3 for the follow-up request.
- (#1858) Included task body details in single-task HTTP API and MCP reads. Thanks to @vanillaflava for reporting and outlining the expected behavior.
- (#1859) Clarified the Google Calendar setup guide for OAuth testing-mode \`access_denied\` errors. Thanks to @PE-Boy for reporting and @tiagoarroz for the workaround.
- (#1860) Preserved accented characters in tags when converting checkbox tasks to TaskNotes. Thanks to @e-zz for reporting.
- (#1869) Preserved Calendar Month View scroll position after task updates. Thanks to @sisyowo for reporting and linking the earlier Kanban fix.
- (#1873) Prevented Calendar Bases from rendering in Obsidian pop-out windows because restoring FullCalendar there can freeze Obsidian. Thanks to @misolex for reporting.
- (#1497, #1870) Fixed NLP file suggestions for custom fields so selected wikilinks are captured as custom field values, including list-type fields. Thanks to @Naesue and @Sineapple for reporting this, and to @bradleyed and @Xananax for the follow-up details.
- (#1888) Allowed project autosuggest required property filters to match any comma-separated value, such as \`project, area\`. Thanks to @BrianHicks for suggesting.
- (#1886) Added a command to postpone active overdue scheduled tasks to today. Thanks to @chrabia for the suggestion.
- (#1889) Fixed Kanban swimlanes for list-valued properties so tags and contexts use individual list items instead of comma-joined values. Thanks to @pkropotin for reporting.
- (#1890) Fixed scheduled-date Kanban columns dropping tasks when date-only and timed tasks on the same day are sorted by a scheduled-time formula. Thanks to @chrabia for reporting and investigating.
- (#773) Added ICS export filters for archived tasks, completed tasks, due dates, and scheduled dates. Thanks to @ras0q for suggesting this and @slipstyle for the scheduled-date follow-up.
- (#765) Reduced side-pane gutters around embedded TaskNotes Bases views, so embedded task lists use about the same horizontal space as directly opened Bases views. Thanks to @TonyAtlas for suggesting this.
- (#1892) Fixed nested Markdown list indentation in the Task Edit Modal details editor. Thanks to @Glint-Eye for reporting.
- (#1891) Fixed TaskNotes modal markdown editors collapsing to one-character-wide lines when Pretty Properties is installed. Thanks to @bkennedy-improving for reporting.
- (#1499) Respected excluded folders when opening tasks directly from view results and when building dependency/project indexes, so template-folder tasks no longer appear through TaskNotes views. Thanks to @Liya430 for reporting.
- (#136, #1500) Made the Pomodoro countdown derive remaining time from the session clock instead of from counted interval ticks, so delayed, backgrounded, or screen-off ticks catch up cleanly without over-recording a completed session. Thanks to @Poly-0000 for reporting and documenting the original background timer issue, @Totobal5 for the earlier worker-based fix, and @CoffeaUrbana for the Android screen-off report.
- Restored padding in task modal Markdown editors.
- Made the markdown editor areas in task modals easier to click and focus.
- Strengthened local CSS linting to catch unscoped selectors, unknown CSS, and fixed-position overlays before review.
- Reduced false-positive plugin review warnings by making background auto-export and auto-archive schedulers non-overlapping and tightening type/string conversion paths.
- (#1882) Made Google Calendar task descriptions use mobile-friendly plain text for Obsidian links and display labels for wiki-style project/context links. Thanks to @martin-forge for the contribution.
- (#1883) Improved Google Calendar task sync recovery so failed deletions, offline sync requests, reconnects, and quick create/update races are retried more reliably. Thanks to @martin-forge for the contribution.
`});var zve,Bve=y(()=>{zve=`# TaskNotes 4.7.2
## Changed
- Improved local lint checks so package and CSS issues reported by Obsidian's online review can be caught before submission.
- Cleaned up stylesheet compatibility issues reported by Obsidian's online review without changing the intended TaskNotes appearance.
- Improved spacing and alignment in task, timeblock, and webhook modals after the stylesheet cleanup.
- Reworked optional calendar and ICS subscription refresh scheduling to avoid interval-based network polling while preserving the same refresh intervals.
- Cleaned up additional source patterns reported by Obsidian's online review, including unsafe default object stringification and redundant external type unions.
- Prevented a console error when plugin listeners are cleaned up after reloads.
- Added a local lint check to prevent interval-based polling in files that also perform network requests.
`});var jve,$ve=y(()=>{jve="# TaskNotes 4.7.1\n\n## Changed\n\n- Release assets are now built with GitHub artifact attestations so users and reviewers can verify the provenance of `main.js`, `manifest.json`, and `styles.css`.\n"});var Uve,Hve=y(()=>{Uve=`# TaskNotes 4.7.0
## Changed
- Enabled lint checks that mirror Obsidian community plugin review findings, including dynamic code execution, Promise handling, deprecated APIs, unsafe stringification, directive comments, Node built-in imports, and explicit \`any\` usage.
- Clarified privacy documentation for optional integrations that make periodic background network refreshes.
- Cleaned up internal Obsidian and Bases compatibility adapters used by search and grouped views.
- (#1839, #1881) Updated default Base urgency scoring so timed tasks earlier in the day sort above later tasks with the same priority and date
- Thanks to @loukandr for the contribution
## Fixed
- Fixed project autocomplete searches so non-empty \`+\` queries only return files matching the query in the basename, title, aliases, or explicitly searchable metadata rows.
- (#1713) Fixed all-tasks ICS export when a task uses a space-separated scheduled datetime such as \`2025-08-12 18:00\`
- Thanks to @bepolymathe for requesting this and @m4to-3pe for following up
- Fixed Pomodoro stats reopening immediately after a plugin reload before the Pomodoro service has finished initializing.
- (#1872) Fixed unarchiving moved tasks so the destination task folder processes template variables such as \`{{project}}\` before moving the file
- Thanks to @OXI-717 for reporting
- (#1870) Fixed custom user field NLP triggers with file autosuggest so selecting a wikilink suggestion stores the link in the user field instead of leaving it in the task title
- Thanks to @Sineapple for reporting
- (#1878) Fixed completed tasks still appearing as active blockers for dependent tasks
- Thanks to @macbikegeek for reporting
- (#1880) Fixed the status bar time-tracking label for task titles that contain a dash
- Thanks to @ubidev for reporting
- (#1854) Fixed modal task completion so completed tasks receive a completed date consistently
- Thanks to @misolex for reporting
- (#1124, #1838, #1881) Fixed default Base views and formulas excluding tasks scheduled or due today at a non-midnight time from day-level comparisons
- Thanks to @kmaustral for reporting and @loukandr for the fix
## Removed
- Removed JavaScript webhook transform support and examples. JSON webhook transform templates remain supported.
`});var Vve,Wve=y(()=>{Vve=`# TaskNotes 4.6.0
## Changed
- TaskNotes now requires Obsidian 1.12.2 or later, matching the Obsidian APIs used by the plugin.
- Improved internal code quality by resolving lint warnings, moving static inline styles into CSS utilities, and extending sentence-case lint coverage to English localization strings, with no intended behavior changes.
## Fixed
- Fixed TaskNotes failing to load when Obsidian opened without an active Markdown file.
`});var qve,Gve=y(()=>{qve=`# TaskNotes 4.5.3
## Fixed
- (#1834, #1847) Fixed empty Bases formula and custom properties showing \`null\` or \`undefined\` on TaskNotes task cards.
- A big thanks to @Glint-Eye and @3zra47 for reporting.
- (#1836) Fixed TaskNotes Bases views not refreshing task cards after status, archive, and auto-archive updates.
- A big thanks to @kmaustral for reporting.
`});var Yve,Kve=y(()=>{Yve=`# TaskNotes 4.5.2
## Added
- (#1342, #1793) Added native tag autocomplete to time entry descriptions by using the embedded markdown editor in the time entry editor modal.
- Thanks to @fastrick for the request and @renatomen for the PR.
- (#1756, #1798) Added HTTP API support for configured custom user fields so task responses include them and create/update requests can round-trip their values.
- Thanks to @Treygec for the request and PR.
- (#1777) Added a Modal Fields setting to choose whether Tab/Shift+Tab move focus out of the task details editor or use the markdown editor's indentation behavior.
- Thanks to @P-Sc for the PR.
## Changed
- Updated the Obsidian API dependency to 1.12.3 and switched the Bases integration to the official API type declarations.
- Bases task cards and property-event cards now render metadata values through Obsidian's native Bases value renderer so links, dates, lists, icons, and formula values display more faithfully.
## Fixed
- (#1778) Fixed MCP initialize requests using newer protocol versions such as \`2025-11-25\` failing instead of negotiating down to TaskNotes' supported MCP version.
- Thanks to @SakulaPor for reporting.
- (#1781) Fixed duplicate metadata properties on Bases task cards when bare and \`note.\`-prefixed property IDs map to the same TaskNotes field.
- Thanks to @loukandr for reporting and tracing the issue.
- (#1787) Removed the "(click to change)" helper text from recurrence tooltips on task cards.
- Thanks to @kazerniel for reporting.
- (#1828) Fixed subtask creation from a task card dropping the parent task project when natural-language input also adds projects.
- Thanks to @prepare4robots for reporting.
- (#1786) Fixed TaskNotes task cards and relationships/subtasks widgets appearing inside embedded task-note heading or block sections.
- Skips note-level widget injection in detached or embedded Markdown editor contexts used by plugins such as Block Link Plus.
- Thanks to @3zra47 for reporting.
- (#1815) Fixed the Priority property settings so the NLP trigger character field is visible and editable even when priority NLP parsing is disabled.
- Thanks to @spiv for reporting.
- (#1035) Fixed the task modal title field causing the modal to jump to the bottom when focused on iPhone.
- Thanks to @3zra47 for reporting and following up.
- (#1045) Fixed inline linked recurring tasks keeping the previous day's completed state after the calendar day changes.
- Thanks to @3zra47 for reporting and following up.
- (#1788) Fixed Task List subgroup headers and cards rendering without clear indentation.
- Thanks to @renatomen for the PR.
- (#1810) Updated Japanese Kanban terminology to use the more natural katakana spelling.
- Thanks to @sigma7863 for the PR.
- (#1633) Fixed Bases task cards using fallback labels instead of Bases display names for mapped task fields and file properties.
- Thanks to @Sarryaz for reporting the Bases task card i18n and field-mapping issue.
- (#884) Fixed untranslated strings and English placeholder examples across non-English interface translations.
- Thanks to @berzernberg for reporting Russian translation gaps.
- (#1765, #1769) Fixed auto-archived tasks leaving stale Google Calendar events when cleanup runs before calendar sync is ready or after the task moves into the archive folder.
- Thanks to @martin-forge for reporting and the PR.
- (#1764) Fixed Google Calendar sync using stale task metadata after rapid task updates, and fixed late recurring completions/skips recording the completion day instead of the scheduled occurrence date.
- Thanks to @martin-forge for the PR and to @jpmoo for reporting the recurring completion issues.
- (#1782) Fixed CI test runs resolving the NLP parser package from a local sibling checkout instead of the published dependency.
- Thanks to @martin-forge for reporting.
- Published [\`mdbase-tasknotes\`](https://github.com/callumalpass/mdbase-tasknotes) 0.1.3 with compatibility fixes for TaskNotes-generated mdbase schemas.
- Includes clearer create-path diagnostics, natural-language \`mtn list --due\` filters, timer log datetime filters, home-directory path expansion, project wikilink preservation, and correct \`mtn --version\` reporting.
- Thanks to @tparsons9, @anomatomato, @npondel, @plashal, and @waspeer for the reports and PR.
- (#1667) Fixed NLP scheduled-date parsing so standalone \`scheduled\` and \`start\` triggers can set scheduled dates alongside due dates.
- Thanks to @hokfujow for reporting and @UniqueClone for the NLP core PR.
- Fixed NLP parser title cleanup for explicit date triggers and Japanese/Chinese priority phrases.
- (#1658) Fixed Pomodoro stats date bucketing for sessions near local midnight.
- Pomodoro session stats now compare the recorded session calendar date against UTC-anchored target days without shifting through UTC or the reader's current timezone.
- Pomodoro daily-note storage now writes sessions to the daily note matching the recorded session date.
- Thanks to @ewgdg for reporting, @AntonIlinykh and @dkchacha for follow-up discussion, and @ITblacksheep for PR #1758.
- (#1813) Fixed Pomodoro timer UI stalls caused by refreshing session statistics on every timer tick.
- Pomodoro stats now refresh on initial render and session completion instead of once per second.
- Pomodoro daily-note stats now read the relevant date/range instead of routing through all history.
- Native Pomodoro notifications now respect the notification setting and granted permission before showing.
- Thanks to @Szu-Szu for reporting and @its-thex for confirming.
- (#1744) Fixed Bases Task List views so changing the per-view \`Expanded relationships\` option takes effect on re-render.
- Restores the expected \`show-all\` behavior for setups that hide subtasks at the top level with \`note.projects.isEmpty()\`.
- Thanks to @minol-dev for reporting, @Glint-Eye for follow-up discussion, and @stanley-910 for PR #1792 exploring the related standalone-subtask workflow.
- Fixed tag clicks in task cards opening the task edit modal in addition to the tag search panel, and kept rendered tag metadata on a single row inside task cards.
`});var Zve,Qve=y(()=>{Zve=`# TaskNotes 4.5.1
## Fixed
- (#1672) Fixed custom date ranges in the MCP time summary tool so \`from\` and \`to\` dates work as expected
- Thanks to @pib for the fix
- (#1742) Fixed calendar week and day views so the time scale stays aligned on the left instead of drifting inward
- Thanks to @ysafonov for the report and screenshot
`});var Jve,Xve=y(()=>{Jve=`# TaskNotes 4.5.0
## Fixed
- (#1652) Fixed API, MCP, and NLP task creation so it respects your configured filename format when title storage in filenames is disabled
- Thanks to @36mimu36 for reporting, and @rafavital and @warm-july for follow-up discussion and reports
- (#1601, #1709) Fixed reading-mode relationship widgets sometimes rendering multiple times during startup
- Applied the same protection to task cards so overlapping refreshes are coalesced there too
- Thanks to @wealthychef1 and @CarlJohnson99 for reporting, and @benmartinek for confirming the behavior
- (#1713) Fixed ICS export so date-only scheduled tasks are written as all-day events instead of midnight events
- Thanks to @bepolymathe for the request and interoperability details
- (#267, #948, #1682, #1717, #1725) Fixed expanded subtasks and dependency cards in Bases Task List and Kanban views so related items can inherit the current view's filters instead of always showing every linked task
- Added a per-view "Expanded relationships" option so you can switch between inherited filters and showing all related tasks
- Thanks to @mdbraber, @GardarikanetS, @Glint-Eye, @prepare4robots, and @robmcphers0n for the original reports and feature requests, and @marblebyte for follow-up discussion
- Improved custom view and search-pane activation when reopening deferred tabs
- (#1720) Fixed Bases Task List cards showing icon tokens such as \`clock\` instead of readable date-like values, and fixed property labels to use Bases display names instead of raw property IDs
- Thanks to @Sirnii for reporting
- (#1633) Fixed interactive task-card labels and ribbon labels so Bases-backed cards use translations and configured display names instead of hardcoded English or raw property IDs
- Thanks to @Sarryaz for reporting
- (#1651) Fixed date \`is\` query filtering so date-only searches also match timed \`scheduled\` and \`due\` values during prefiltering
- Thanks to @36mimu36 for reporting
- (#1644) Fixed generated default task views so recurring tasks without a \`complete_instances\` property still appear as incomplete where appropriate
- Thanks to @bkennedy-improving for reporting, and @SandroK for follow-up discussion on related default-view behavior
- (#1513, #1686) Fixed a calendar issue where creating or editing events and timeblocks could reset the visible date back to today
- In-place calendar recreation now preserves the visible date unless you explicitly navigate elsewhere
- Thanks to @owenoxen for opening #1513, and @Lorite for opening #1686 and contributing the fix
- Fixed documentation deployment CI failures caused by \`docs-builder/src/js/main.js\` being excluded by a broad \`.gitignore\` rule
- Reduced background calendar-sync overhead when persisting sync tokens
- Prevented duplicate auto-stop time-tracking listeners from accumulating after settings reloads
- Fixed a settings-lifecycle issue that could accumulate calendar update callbacks while the Integrations tab is repeatedly opened
- (#1630) Fixed TaskNote inline task cards ignoring centered "Readable line length" layout in the Minimal theme
- Thanks to @martin-forge for reporting
- Fixed a broken docs cross-reference from Property Types Reference to Task Properties settings
- Fixed docs site links so internal Markdown links resolve to app routes instead of broken \`.md\` paths
- Fixed docs release-note links by building Markdown pages even when they are not listed directly in the sidebar
## Added
- (#1704) Added an option to widen the current day column in multi-day calendar time-grid views
- You can control the width multiplier and choose whether it applies to week view, custom multi-day view, or both
- Thanks to @dictionarymouse for the feature request
- Added TaskNotes Obsidian CLI commands for task creation, time tracking, and Pomodoro control
- Includes shared NLP-to-task conversion across the CLI, modal, and API capture flows, plus new user documentation for the built-in CLI commands
- (#1716) Added roomier subtask and dependency cards inside the task modal while keeping the task options menu available
- Thanks to @hokfujow for the feature request
- (#1619, #386, #621) Added drag-to-reorder for Kanban and Task List views
- Supports grouped Task List moves, manual ordering via the \`tasknotes_manual_order\` property, and improved drag/drop behavior for swimlanes, filtered views, and interactive task controls
- To use it, sort the view by the Manual Order field (\`tasknotes_manual_order\` by default), or regenerate the built-in \`.base\` templates from **Settings → TaskNotes → General → Create Default Files**
- Thanks to @ac8318740 for the original contribution in PR #1619, @iholston and @dsebastien for opening #386 and #621, and @mdbraber, @elvarb, @LucidToday, @craziedde, @kmaustral, @SKIERZZ, @sookochoff, and @kanzaki1201 for follow-up discussion and testing across the linked issues and PR
- Added a standalone [TaskNotes Specification](https://github.com/callumalpass/tasknotes-spec) repo and docs section covering the data model, field mapping, recurrence behavior, validation rules, and conformance tests
- Added [tasknotes-tui](https://github.com/callumalpass/tasknotes-tui), a terminal UI for working with TaskNotes vaults
- Includes keyboard-driven views, date navigation, time tracking, recurring task support, and a command palette
## Changed
- Refactored several internal modules to reduce coupling and make maintenance safer
- Updated generated \`_types/task.md\` output so \`dateCreated\` and \`dateModified\` include generated timestamp values, and \`recurrence_anchor\` defaults to \`scheduled\`
- Cleaned up API, webhook, NLP, privacy, settings, and view documentation for clarity and accuracy
- Expanded Task List and Kanban documentation for drag-to-reorder, including manual-order sorting, grouped and swimlane scope, and filtered-view limitations
`});var eke,tke=y(()=>{eke="# TaskNotes 4.4.0\n\n## Added\n\n- [Mdbase](https://mdbase.dev) type generation now includes `tn_role` annotations so external tools can identify each field's role even when frontmatter names are customized\n- (#1618) Mdbase type matching now follows your task identification settings (tag or frontmatter property), with fallback to tag matching when needed\n - Thanks to @jimbo108108 for reporting\n- Mdbase type status fields now include `tn_completed_values` so external tools can reliably identify which status values count as completed\n- (#1576) Added an optional `Checklist Progress` task-card property that renders a compact progress bar and `completed/total` count from top-level markdown checkboxes\n - Uses metadata cache list items and excludes nested checklist entries so progress reflects top-level task steps\n - In Bases views, map `tasks` (`file.tasks`) to `Checklist Progress`\n - Existing `.base` files need `file.tasks` added to the view `order` YAML manually\n - Newly generated `.base` templates now include `file.tasks` in view `order` by default\n - Thanks to @phortx for opening #1576 and for the earlier implementation PR, and @piyushaswani55 for feedback in the issue discussion\n\n## Changed\n\n- Mdbase type generation no longer overwrites `mdbase.yaml` if the file already exists, preserving user customisations\n- Webhooks now fire consistently regardless of whether updates come from the UI, HTTP API, or MCP\n- Webhook runtime state now syncs automatically when plugin settings change\n- Shared HTTP response/body parsing utilities are now consolidated in a dedicated `httpUtils` module\n- Release notes now include a reminder on every release page that default generated `.base` template changes never overwrite existing user `.base` files, and that users can regenerate templates from Settings to pick up updates\n\n## Fixed\n\n- (#1608) Fixed task title frontmatter being removed when `storeTitleInFilename` is enabled\n - `title` is now retained in frontmatter while filename derivation from title remains unchanged\n - Thanks to @victoraraujo105 for the PR\n- (#1602) Fixed time tracking statistics showing incorrect or zero values for Today/Week/Month due to UTC-anchored date range boundaries in Stats View\n - Updated range calculations to use local calendar-day boundaries consistently\n- (#1602) Fixed inconsistent `timeEntries` timestamp formats across create/edit/drag/resize flows\n - Time entry timestamps are now written in canonical UTC ISO format (`toISOString()` with `Z`) across all write paths\n- (#1602) Fixed denormalized `timeEntries.duration` drift after edits\n - Time tracking calculations now derive duration from `startTime`/`endTime`\n - Time entry save paths now strip legacy `duration` values instead of persisting them\n - Thanks to @dy66 for opening #1602\n"});var rke,nke=y(()=>{rke=`# TaskNotes 4.3.3
## Changed
- Published [\`mdbase-tasknotes\`](https://github.com/callumalpass/mdbase-tasknotes) (\`mtn\`), a standalone CLI for managing tasks in markdown files via mdbase
- Works on the same vault and \`_types/task.md\` schema that TaskNotes generates, without requiring the plugin or HTTP API
- Preferable over [tasknotes-cli](https://github.com/callumalpass/tasknotes-cli) as a lighter-weight alternative and when Obsidian is not running, on remote machines, or in scripts and CI environments
- Supports natural language task creation, time tracking, project aggregation, statistics, and an interactive REPL
- Extracted shared natural language parsing logic into the standalone npm package [\`tasknotes-nlp-core\`](https://github.com/callumalpass/tasknotes-nlp-core)
- The NLP parser and related language configuration are now shared through this package
- This keeps behavior consistent between the plugin and CLI tools
## Added
- (#1549) Added setting to reset markdown checkboxes when recurring tasks are completed
- When enabled, all checked checkboxes (\`- [x]\`) in the task body are reset to unchecked when a recurring task instance is completed and rescheduled
- Useful for recurring tasks with subtask checklists that need to be repeated each instance
- Configurable via Settings > Features > Recurring Tasks > "Reset checkboxes on recurrence"
- Thanks to @phortx for the feature request
- (#1548) Added ability to create calendar events on connected external calendars directly from the calendar view
- When clicking or dragging to select a time slot, a new "Create calendar event" option appears in the context menu
- Opens a modal to enter event title, description, location, and select which calendar to create on
- Supports both Google Calendar and Microsoft Calendar providers
- Thanks to @Robubble for the feature request
- (#1597) Added MCP server for AI agent integration
- Exposes TaskNotes tools at \`/mcp\` endpoint, gated behind \`enableMCP\` setting
- Supports tasks (CRUD, query, toggle status/archive, parse from text), time tracking, pomodoro, calendar events, and task statistics
- Thanks to @dstotijn for the contribution
## Fixed
- Fixed generated [mdbase](https://mdbase.dev) type definitions for task dependencies using the wrong field type
- In \`_types/task.md\`, \`blockedBy[].uid\` now uses \`type: link\` (was \`type: string\`)
- Better matches how dependency links are serialized in task frontmatter (\`[[...]]\`)
- Fixed generated mdbase reminder type definitions to better match TaskNotes reminder data
- In \`_types/task.md\`, \`reminders[].type\` now uses enum values \`absolute|relative\`
- \`reminders[].relatedTo\` now uses enum values \`due|scheduled\`
- \`reminders[].absoluteTime\` now uses \`type: datetime\` (was \`type: string\`)
- (#1597) Fixed webhook payloads for time tracking start-with-description containing stale data
- Thanks to @dstotijn for the fix
- (#1581) Fixed Pomodoro starting break instead of work session after app restart
- After completing a work session and restarting, pressing Start would incorrectly start a break
- Now properly resets \`nextSessionType\` when clearing stale sessions or stopping the timer
- Thanks to @Sirnii for the detailed bug report and root cause analysis
- (#1577) Fixed Edit Note/Task modal hiding action buttons when content exceeds viewport height
- Added vertical scroll to modal content area while keeping buttons pinned at bottom
- Thanks to @hossam-elshabory for reporting and @ivannin for helping in discussion
- (#1600) Fixed kanban view grouping not working when more than 20 views exist
- The \`getGroupByPropertyId()\` method had a hardcoded loop limit of 20 iterations
- Views at index 20 or higher would not be found, causing groupBy to return null
- Thanks to @IHaveNoShame for reporting
- (#1595) Fixed task modal floating buttons blocking content on mobile
- Added mobile-specific (\`body.is-mobile\`) CSS to ensure proper flex layout
- Button container now stays pinned at bottom without overlapping scrollable content
- Thanks to @Jomo94 for reporting
- (#1590) Fixed HTTP API not allowing \`blockedBy\` dependencies when creating tasks
- Added \`blockedBy\` field support to \`TaskService.createTask()\`
- Updated API documentation with \`blockedBy\`, \`recurrence\`, and \`reminders\` fields
- Thanks to @hGriff0n for reporting
- (#1582) Fixed recurring tasks not appearing at end of visible calendar range for non-UTC timezones
- Daily/weekly recurring tasks with times after ~1pm would disappear on the last day of the visible range for users in positive UTC offsets (e.g., UTC+11)
- Fixed date boundary comparisons in both \`generateRecurringInstances()\` and \`generateRecurringTaskInstances()\` to compare dates only, not timestamps
- Thanks to @benefitbug for reporting
- (#1580) Fixed Google Calendar sync failing after OAuth token expires with unhelpful error message
- When refresh tokens expire or are revoked (e.g., Google Cloud project in Testing mode, user revoked access), the error message was confusing: "Failed to refresh google token: Request failed, status 400"
- Now detects irrecoverable token errors (\`invalid_grant\`, \`invalid_client\`) and automatically disconnects the OAuth connection
- Shows actionable error message: "Google Calendar connection expired. Please reconnect in Settings > Integrations."
- Prevents repeated failed refresh attempts and error message spam
- Thanks to @osxisl for reporting and @Naesue for helping in discussion
- (#1584) Fixed DOMTokenList error when task status values contain spaces
- Clicking the status ring on a task card threw an error when status contained spaces (e.g., "In Progress")
- Status and priority values are now sanitized before being used as CSS class names
- Thanks to @omber for reporting
`});var ake,ike=y(()=>{ake=`# TaskNotes 4.3.2
## Added
- (#1520) Tag and Context fields in Edit Task modal now show all available suggestions immediately on focus
- Previously required typing at least one character before suggestions appeared
- Already-selected values are excluded from the suggestion list
- Thanks to @Glint-Eye for the suggestion
- (#1506) Added setting to configure the default color for new timeblocks
- New color picker in Settings > Features > Timeblocking
- Previously hardcoded to indigo; now user-configurable
- Thanks to @phillipadsmith for the suggestion
## Fixed
- Fixed [mdbase-spec](https://mdbase.dev) type definition generation not triggering when settings change
- (#1456) Fixed inline tasks jumping visually when marked as completed
- Thanks to @3zra47 for reporting
- (#1364) Fixed auto-stop time tracking not triggering when completing recurring task instances
- Thanks to @slipstyle for reporting
- (#1465) Fixed all-day events synced to Google Calendar receiving wrong notification time
- All-day events now use Google Calendar's configured all-day notification defaults instead of a minutes-based reminder
- Thanks to @Jomo94 for reporting
- (#1470) Fixed cursor showing as default instead of pointer on interactive elements
- Thanks to @TheFrostedDev for reporting
- (#1491) Fixed boolean property values being quoted as strings in Bases filter generation
- When using a boolean property (e.g. \`tasknote: true\`) for task identification, the filter now correctly handles the value
- Thanks to @denisgorod for reporting
- (#1494) Fixed Kanban swimlane resetting to "None" on initial load and after navigation
- Thanks to @tnguyen2018 for reporting
- (#1555) Fixed "Folder already exists" error when creating tasks or converting inline tasks
- Thanks to @jkune5 for reporting
- (#1532) Fixed expanded task modal buttons being cut off when content exceeds viewport height
- Thanks to @willfanguy for reporting
- (#1542) Fixed declined and cancelled events from ICS calendar subscriptions appearing in calendar view
- Thanks to @karenchoe428 for reporting
- (#1556) Fixed completion-based recurring tasks not rescheduling when the recurrence interval is large
- Thanks to @kazerniel for reporting
- (#1492) Fixed hardcoded "open" status leaking into filenames, recurring task displays, and parsing fallbacks
- Users with custom default statuses (e.g. "inbox") no longer see "open" where their configured default should appear
- Recurring tasks now show their actual configured status instead of always displaying "open" when not completed
- Thanks to @macdrifter for reporting
- (#1501) Fixed Google/Microsoft Calendar event colors not showing in agenda/list view
- Per-event and calendar-level colors now display correctly in the list view, matching grid view behavior
- Added today indicator highlighting to list view day headers
- Thanks to @Robubble for the suggestion
`});var ske,oke=y(()=>{ske=`# TaskNotes 4.3.1
## Added
- (#1546) Added sticky kanban column headers that remain visible while scrolling
- Thanks to @normenmueller for the contribution
- (#1458) Added CSS color classes to context tags for custom styling
- Each context tag now receives a unique CSS class based on its name (e.g., \`context-tag--color-0\` through \`context-tag--color-19\`)
- Enables styling individual contexts via CSS snippets
- Thanks to @phortx for the contribution
- Added [mdbase-spec](https://mdbase.dev) type definition generation
- New setting in Integrations tab to generate mdbase-spec v0.2.0 type definition files (\`mdbase.yaml\` and \`_types/task.md\`) at the vault root
- Type definitions are derived from TaskNotes settings (statuses, priorities, field mappings, user fields) and regenerated automatically when settings change
- Enables interoperability with other tools that support the mdbase-spec format
## Fixed
- (#1472) Fixed task dependencies not being stored as wikilinks in frontmatter
- Dependencies now retain their \`[[wikilink]]\` format when saved, preventing them from breaking on file rename
- Thanks to @renekalff for reporting
- (#1443) Fixed default status/priority not updating when the referenced custom value is deleted
- Deleting a custom status or priority that was set as the default now resets the default to the first available value
- Thanks to @l-mb for the contribution
- (#1448) Fixed project removals not persisting from the task edit modal
- Removing all projects from a task now correctly clears the projects field
- Different link formats (e.g., markdown links vs wikilinks) no longer cause false change detection
- Thanks to @normenmueller for the contribution
- (#1514), (#1517) Fixed task reminders not syncing to Google Calendar
- Task-specific reminders (both relative and absolute) now sync to Google Calendar
- Previously only the global default reminder setting was used, ignoring per-task reminders
- Thanks to @christenbc for the contribution
- (#1525), (#1531) Fixed subtask status dot not refreshing visually when clicked
- Status dot, checkbox, and card styling now update instantly when cycling status
- Thanks to @christenbc for the contribution
- (#1537) Fixed Google Calendar errors during bulk sync
- Added rate limiting to space out API calls, preventing errors when syncing many tasks at once
- Thanks to @Lorite for the contribution
- (#1515), (#1540) Fixed time loss when setting recurrence and recurrence not clearing from Google Calendar
- Setting recurrence on a task with a scheduled time now preserves the time, preventing Google Calendar events from appearing as all-day
- Clearing recurrence from a task now also removes it from the synced Google Calendar event
- Thanks to @christenbc for the contribution
- (#1428), (#1559) Fixed hierarchical tags with slashes (e.g., \`#project/sub-project\`) being truncated in link text
- Tags containing slashes, hyphens, and Unicode characters now render correctly
- Thanks to @normenmueller for the contribution and @ysafonov for reporting
- (#1565) Fixed Google Calendar target calendar dropdown appearing empty after app restart
- The dropdown now re-populates once calendars are fetched during startup
- Thanks to @N-HEDGER for reporting
- (#1567) Fixed inline task card widgets disappearing momentarily
- When the task cache is temporarily cleared (e.g., during Smart Connections processing), the previously-rendered widget is now preserved instead of reverting to a plain wiki link
- Thanks to @scztt for reporting
- (#1568) Fixed deleted tasks not being removed from Google Calendar
- When a task file is deleted outside of TaskNotes (e.g., via Obsidian's file manager), the synced Google Calendar event is now cleaned up automatically
- Thanks to @kmaustral for reporting
- Fixed Integrations tab spacing and layout issues
- Improved positioning of buttons and status indicators across Google Calendar, ICS, and Webhooks sections
`});var lke,cke=y(()=>{lke=`# TaskNotes 4.3.0
## Changed
- (#1437) Unified template variable syntax and available variables across filename and body templates
- Both systems now use double-brace \`{{variable}}\` syntax consistently
- Single-brace \`{variable}\` syntax remains supported for backwards compatibility but is deprecated
- Settings UI shows a warning when deprecated single-brace syntax is detected
- Filename templates gain body template variables: \`{{contexts}}\`, \`{{tags}}\`, \`{{hashtags}}\`, \`{{timeEstimate}}\`, \`{{details}}\`, \`{{parentNote}}\`
- Body templates gain filename template variables: \`{{zettel}}\`, \`{{nano}}\`, and all extended date/time variables
- Thanks to @23maverick23 for reporting
## Added
- (#1361) Option to disable inline task overlay for aliased wikilinks
- New setting in Features → Inline Tasks: "Disable overlay for aliased links"
- When enabled, links with aliases like \`[[Task|Check Status]]\` render as plain links
- Links without aliases continue to show the interactive task widget
- Useful when embedding tasks in prose where the widget would be disruptive
- Thanks to @diegomarzaa for the contribution and @jldiaz for proposing this feature in #1117
- (#1199, #1205) Google Calendar export for tasks
- Sync tasks to Google Calendar based on scheduled or due dates
- Automatic sync on task create, update, complete, and delete
- Configurable event title templates with placeholders (\`{{title}}\`, \`{{status}}\`, \`{{priority}}\`, etc.)
- Event descriptions include task metadata and optional Obsidian deep link
- Support for all-day or timed events with customizable duration
- Event color customization using Google Calendar's color palette
- Default reminder setting for popup notifications
- Bulk sync and unlink actions in settings
- Task-event linking stored in frontmatter (\`googleCalendarEventId\`)
- Recurring tasks sync as Google Calendar recurring events
- Completed or skipped recurring instances are automatically excluded
- Thanks to @someromans and @Leonard-44 for requesting this feature, and @dmantisk, @farangkao, @rayvermey, and @rdpr for their input
## Fixed
- (#1413) Fixed angle-bracket links and project title display
- Angle-bracket links like \`[Spec](<Projects/Client X/Spec.md>)\` now resolve correctly
- Project links display frontmatter \`title\` instead of raw filename/path when available
- Dependency values normalize consistently across wikilinks, markdown links, and angle-bracket variants
- Many thanks to @normenmueller for the contribution
- (#1414) Kanban column headers now display configured priority labels instead of raw values
- Many thanks to @normenmueller for the contribution
- (#1416) Fixed property-based task identification mutating tags unexpectedly
- Tags are only written when explicitly changed by the user
- Task tag is only added in tag-based identification mode
- Fixes #1391
- Thanks to @loukandr for reporting and @normenmueller for the fix
- (#1187) Fixed "Unknown view types" error when opening Bases views after upgrading from pre-V4
- Users who had disabled Bases support in earlier versions could not open Bases views after upgrading
- Settings migration now automatically re-enables Bases support since the toggle was removed in V4
- Thanks to @MiracleXYZ for reporting
- (#1144) Fixed relationships.base showing empty views for Projects, Blocked By, and Blocking tabs
- The top-level task filter was excluding non-task files from the Projects view
- Projects can be any file type (not just tasks), so the filter is now applied per-view
- Subtasks, Blocked By, and Blocking views retain the task filter; Projects view does not
- Users with existing relationships.base files should delete and regenerate them to get the fix
- Thanks to @needo37 for reporting, and @n1njaznutz, @nestor50, and @IvyDliu for investigating and confirming the solution
- Fixed calendar view type not persisting or applying when changed
- View type changes via header buttons (week/day/month) are now saved to the .base file
- View type changes via Bases settings panel now apply immediately without reload
- (#1441) Fixed task dragging broken with "Span tasks between scheduled and due dates" enabled
- Span events can now be dragged to move tasks in time
- Dragging shifts both scheduled and due dates proportionally, preserving the span duration
- Previously, dragging span events would cause a visual/data mismatch where the calendar showed the wrong position
- Thanks to @Peeeet for reporting
`});var dke,uke=y(()=>{dke=`# TaskNotes 4.2.1
## Added
- New Calendars API endpoint for access to calendar data
- Access calendar provider information and connection status
- Query events from Google Calendar, Microsoft Calendar, and ICS subscriptions
- Filter events by date range
- [\`tasknotes-cli\`](https://github.com/callumalpass/tasknotes-cli) has been updated to make use of this endpoint
## Fixed
- (#1424) Fixed "Create New Task" command creating tasks in active folder instead of default folder
- "Create New Task" now correctly uses the configured default task folder
- "Create New Inline Task" continues to use the inline task folder setting
- Thanks to @Gogo-XD for reporting and @TonyAtlas for confirming
- (#1421), (#1042) Fixed natural language parser only setting one date when both scheduled and due dates are specified
- Entering something like "task due Jan 9 at Jan 9" now correctly sets both the due date and scheduled date
- Thanks to @wealthychef1 and @dblinnikov for reporting
- (#1410) Fixed vim insert mode not activating in task creation modal
- The modal now correctly enters insert mode when vim keybindings are enabled
- Thanks to @Leo310 for the feature request
- (#1422) Fixed tags with dashes not being parsed correctly
- Tags like \`#my-tag\` were being truncated to \`#my\`
- Thanks to @JerryLu086 for reporting
- (#1419) Fixed custom statuses and priorities not saving in settings
- Values entered in text fields were sometimes lost when closing the settings modal
- Thanks to @s33a for reporting
`});var pke,mke=y(()=>{pke=`# TaskNotes 4.2.0
## Added
- Added Korean (한국어) language support
- Full translation of all 1911 localization keys
- Korean language option now available in Settings → General → Language
- Adopted Obsidian 1.11.0 API features with backwards compatibility
- Settings tab now displays TaskNotes icon in the sidebar (Obsidian 1.11.0+)
- Settings sections now use native \`SettingGroup\` for improved visual grouping (Obsidian 1.11.0+)
- Falls back gracefully to traditional section headers on older Obsidian versions
- (#59) Added \`shortYear\` template variable for custom filename and folder templates
- Use \`{shortYear}\` in filename templates (e.g., "25" for 2025)
- Use \`{{shortYear}}\` in folder templates
- Thanks to @Pixeltica for the feature request
- (#1393) Option to prevent auto-creation of default Base view files on startup
- New "Auto-create default files" toggle in Settings → Integrations → Bases Integration
- When disabled, deleted sample Base files will not be recreated on plugin load
- The manual "Create Default Files" button remains available for on-demand recreation
- Thanks to @wealthychef1 for the feature request
- (#1408) Shift+click on status icon to cycle backwards through statuses
- Normal click cycles forward through status order
- Shift+click cycles in reverse order
- Thanks to @JerryLu086 for the feature request
- (#1410) Task creation modal now starts in vim insert mode when vim keybindings are enabled
- Previously required pressing 'i' before typing when Obsidian vim mode was active
- The modal now automatically enters insert mode on focus, allowing immediate typing
- Thanks to @Leo310 for the feature request
- Added button tooltips to calendar view toolbar
- Hovering over navigation and view buttons now shows descriptive hints
- Buttons include: Today, Previous, Next, Month, Week, Day, Year, List
- Added tooltips to task modal action icons
- Icon buttons for status, date, project, priority, recurrence, and reminder now show tooltips on hover
- Improves discoverability for new users
- (#503) Settings now sync automatically across devices via Obsidian Sync
- Changes to custom statuses, priorities, and other settings apply immediately without restart
- Thanks to @jhedlund for the feature request and @l-mb for the implementation
- (#1403) Kanban view option to consolidate status icons in column headers
- New "Show status icon in column header only" toggle in Kanban view settings (disabled by default)
- When enabled and grouped by status, shows the icon in the column header and hides it on cards
- Reduces visual redundancy when the column already indicates the status
- Thanks to @l-mb for the feature request and implementation
- (#1401) Calendar view option to span tasks between scheduled and due dates
- New "Span tasks between scheduled and due dates" toggle in Calendar view Layout settings
- When enabled, tasks with both scheduled and due dates display as multi-day bars
- Provides Gantt chart-style visualization for project planning
- Thanks to @0atman for the feature request
- (#1334) \`{{currentNotePath}}\` now works for "Create new inline task" command
- The inline task folder setting with \`{{currentNotePath}}\` previously only worked for checkbox conversion
- Now also applies when using the "Create new inline task" command from the command palette
- Thanks to @kmaustral for the feature request
- (#1264) Option to open Pomodoro timer in mobile sidebar instead of note panel
- New "Mobile sidebar" setting in Settings → Features → Pomodoro Timer
- Choose between: Note panel (default tab behavior), Left sidebar, or Right sidebar
- Allows quick swipe access to the timer without switching notes on mobile devices
- Thanks to @Evthestrike for the feature request
- (#1220) Option to use ICS event end time as task due date
- New "Use ICS event end time as task due date" toggle in Settings → Integrations → Calendar Subscriptions
- When enabled, tasks created from calendar events will have their due date set to the event's end time
- For all-day events, uses the event date (not the ICS container end date which is the next day per ICS spec)
- For timed events, includes the exact end time
- Defaults to disabled to preserve existing behavior
- Thanks to @MiserMagus for the feature request
- (#1108) Option to use task duration instead of due date for ICS calendar export
- New "Use task duration for event length" toggle in Settings → Integrations → Automatic ICS Export
- When enabled, exported calendar events use scheduled date + time estimate as DTSTART/DTEND
- This aligns with GTD workflows where scheduled + duration represents work planning, while due date represents deadlines
- When disabled (default), preserves existing behavior using due date as DTEND
- Thanks to @bepolymathe for the feature request
## Fixed
- (#1421) Fixed natural language parser only capturing one date when both scheduled and due dates are specified
- Input like "Task scheduled for tomorrow due next week" now correctly sets both scheduled and due dates
- Previously the parser would return early after finding the first date trigger, ignoring any subsequent triggers
- Thanks to @wealthychef1 for reporting
- (#1384) Fixed title being sanitized even when "Store Task Title in Filename" is disabled
- Characters like \`?\`, \`<\`, \`>\`, \`:\`, etc. are now preserved in task titles when they won't be used in filenames
- When \`storeTitleInFilename\` is false, only minimal sanitization (whitespace normalization, control character removal) is applied
- Thanks to @allison-casey for reporting
- (#1028), (#1140), (#1152), (#1354), (#1362) Fixed duplicate task entries appearing in Agenda view
- Tasks were shown twice: once as TaskNotes events and again as property-based events with a file icon
- Changed default Agenda template to disable property-based events (\`showPropertyBasedEvents: false\`)
- Users can re-enable property-based events in view settings if needed for non-task date properties
- Thanks to @YIRU69, @jhedlund, @dblinnikov, @Snakiest, @WeiYiAcc, @JacksonMcDonaldDev, @jimbo108108, and @krelltunez for reporting
- (#1386) Fixed \`timeEstimateCategory\` formula showing "Long (>2h)" instead of "No estimate" for new tasks
- The condition didn't properly handle null values when \`timeEstimate\` property is unset
- Also fixed the same issue in \`trackingStatus\` formula
- Thanks to @nicou for reporting and @osxisl for the PR
- (#1397) Fixed Bases views (Kanban, Calendar, Task List) resetting to Calendar view after a few minutes
- Also fixed CalendarView corrupting other view files when saving state on unload
- Thanks to @music-soul1-1 for reporting
- (#1398) Fixed overdue strikethrough showing on completed tasks
- Completed tasks with past due dates no longer display overdue styling
- Respects the "Hide completed from overdue" setting which defaults to true
- (#1363) Fixed calendar view showing nothing when a task has an invalid date format
- Tasks with malformed dates (e.g., "262025-12-16" instead of "2025-12-16") no longer crash the entire calendar
- Invalid tasks are now skipped with a console warning, allowing other events to display normally
- Thanks to @Erelen for reporting
- Fixed today column in week/day calendar views using FullCalendar's default yellow instead of theme accent
- Today's column now uses a tint of the theme accent color for consistent styling
- (#1399) Fixed drag-and-drop not working in Kanban view on mobile
- Cards and columns can now be dragged using long-press gesture on touch devices
- Includes haptic feedback and auto-scroll when dragging near edges
- Thanks to @l-mb for reporting and the fix
- (#1381) Fixed Pomodoro "Change Task" menu not showing newly created tasks
- Tasks created while the Pomodoro view was open would not appear in the task selector
- Improved metadata cache synchronization to properly wait for new files to be indexed
- Thanks to @Ghosthael for reporting
- (#1344) Fixed "Unsaved Changes" popup appearing randomly when closing task edit modal
- The popup would appear even when no changes were made to the task
- Caused by inconsistent trailing whitespace normalization when comparing details content
- Thanks to @hasanyilmaz for reporting
- (#1402) Fixed Kanban swimlane view showing tasks in wrong column when grouped by formula
- After editing task metadata, cards would jump to "None" column until Obsidian reload
- Column assignment now uses Bases' computed grouping instead of cached formula outputs
- Thanks to @bailob for the fix
- (#1352) Fixed date context menu not preserving time when using increment options
- Using +1 day, -1 day, +1 week, or -1 week on a task with a time (e.g., \`2025-12-10T16:00\`) now preserves the time
- Previously the time would be stripped, changing \`2025-12-10T16:00\` to \`2025-12-11\` instead of \`2025-12-11T16:00\`
- Thanks to @cathywu for the feature request
- Fixed v3 saved views exporting incorrectly to Bases format
- Title filters now correctly use \`file.name\` instead of \`note.title\`
- Archived filters now generate valid boolean expressions instead of malformed comparisons
- "Is Blocked" filters now generate correct expressions with proper operator precedence
- (#1036) Due dates can now be dragged in the calendar view
- Previously only scheduled dates were draggable; due dates were locked in place
- Dragging a due event now updates the task's due date property
- Thanks to @same774 for reporting
- Improved calendar view responsiveness for user interactions
- Task creation, editing, timeblock changes, and view option toggles now update immediately
- Previously these actions waited 5 seconds due to the debounce intended for external file changes
- The 5-second debounce is now bypassed for direct user actions while still preventing flicker during typing
- Improved visual affordance for Pomodoro timer duration adjustment buttons
- The +/- buttons below the timer now have visible backgrounds and borders
- Hover states show accent color border for clearer interactivity feedback
- Previously buttons were nearly invisible with transparent backgrounds
- (#1409), (#1214), (#979) Improved Calendar, Agenda, Kanban, and Stats views in pop-out windows
- Drag-and-drop in Kanban view now works correctly when the view is in a new window
- Context menus (status, priority, task) now work correctly in pop-out windows
- Stats view drill-down modal now appears in the correct window
- Search boxes, task cards, and grouped task lists render correctly
- Root cause: Code was using global \`document\` and standard \`instanceof\` checks which fail across windows
- Solution: Use \`ownerDocument\` for DOM operations and Obsidian's cross-window \`instanceOf()\` method
- **Known limitation**: Calendar event dragging does not work in pop-out windows due to FullCalendar library using global \`document\` for mouse event listeners. Use context menus or edit modals as a workaround.
- Updated FullCalendar to v6.1.20
- Thanks to @Snakiest, @same774, and @3zra47 for reporting
- (#1337) Fixed "Convert current note to task" hotkey not applying default values from settings
- When user configured default status/priority as "None", the modal would show "Open" and "Normal" instead
- Root cause: Task edit modal was refreshing data from file and overwriting user-configured defaults
- Now preserves constructor-provided task data when converting non-task files
- Thanks to @guihasparyk for reporting
- (#1304) Fixed "Cannot find function map on type Link" error in Blocking view
- Error occurred when embedding the Relationships base and opening the Blocking view
- Root cause: When \`blockedBy\` contained a single dependency, Bases returned it as a Link object without a \`.map()\` method
- Fixed by wrapping \`blockedBy\` with \`list()\` before calling \`.map()\`, consistent with the Blocked By view
- Thanks to @prayidae for reporting
- (#1295) Fixed missing navigation link to Default Base Templates page on tasknotes.dev
- The page existed but was not accessible from the site navigation
- Thanks to @Arachnidai for reporting
- (#1223) Fixed "Go to today's note" command opening wrong date in positive UTC offset timezones
- In timezones like Japan (UTC+9), early morning use of this command opened yesterday's note
- Root cause: Incorrectly extracting UTC date components instead of local timezone date
- Thanks to @BrucePlumb for reporting
`});var fke,hke=y(()=>{fke=`# TaskNotes 4.1.3
This patch fixes a critical performance issue affecting the Calendar views. As a bonus, it adds a configurable "split" view to the task creation/edit modals.
## Added
- Split layout for task modals on wide screens (900px+)
- Details editor appears in a dedicated right column when the modal is expanded
- New setting "Split layout on wide screens" in Modal Fields settings tab to toggle this behavior
- Improves usability by showing form fields and details side-by-side
## Fixed
- (#1330) Fixed calendar view regression taking 5 seconds to load and respond to user interactions
- Initial calendar load is now immediate again
- User interactions (drag/drop, creating timeblocks, etc.) respond instantly
- Removed redundant date filtering (FullCalendar handles this more efficiently)
- Thanks to @ysafonov, @kmaustral, @sunjiawe, @Мизгирь, and @FiliusIcari for reporting
`});var gke,yke=y(()=>{gke=`# TaskNotes 4.1.2
## Fixed
- Significant performance improvements for Bases views (TaskList, Kanban, Calendar)
- Reduced \`extractDataItems\` time from ~4 seconds to ~5-10ms for large vaults (6000+ tasks)
- Computed file properties (\`file.backlinks\`, \`file.links\`, etc.) are now fetched lazily during render instead of upfront
- Only visible items (with virtualization) trigger expensive property computations
- Added debouncing to \`onDataUpdated\` to prevent UI freezes during typing
- Timeblock generation now uses Obsidian's metadataCache instead of file reads
- Added date range filtering for calendar events to skip events outside visible range
- (#1285) Calendar view uses 5-second debounce to prevent flickering while typing
- Thanks to @steven-murray for reporting
- Calendar view switching (month/week/day/list) is now much faster
- View type is now saved on unload instead of on every change
- Fixed task edit modal archive button being too narrow on mobile devices
- (#1319) Added missing properties to Field Mapping settings
- \`recurrence_anchor\` - now in Settings > Task Properties > Task Details
- \`skipped_instances\` - now in Settings > Task Properties > Metadata Properties
- Thanks to @kazerniel for reporting
- (#1310) Fixed inline task conversion deleting text when task title exceeds filename limits
- Text that cannot fit in the filename is now preserved in the task note's body
- Thanks to @prayidae for reporting
- (#1301) Fixed inline task wikilinks leaving blank space when no metadata properties are visible
- Thanks to @Richard-UMPV for reporting
- (#1317) Fixed project autosuggest filters not working correctly when only "Required Property Key" is configured
- NLP \`+\` trigger now properly filters by property existence when no property value is specified
- Modal "Add to project" button now shows consistent results with inline autosuggest
- Thanks to @JacksonMcDonaldDev for reporting
- (#1287), (#1307) The "New" button in Bases views now opens the TaskNotes creation modal
- Tasks created from Bases views now respect default properties (status, priority, etc.)
- Tasks are now created in the configured default folder instead of the views folder
- Thanks to @anareaty and @sylvainfct-dot for reporting
- (#1291) Fixed Microsoft Calendar OAuth documentation using wrong redirect URI
- Added instructions for configuring via Azure manifest editor
- Thanks to @PlecotusAustriacus for reporting
## Added
- (#803) New command "Convert current note to task" to add task properties to an existing note
- Thanks to @GardarikanetS and @diegomarzaa for suggesting
- (#1080) Custom user fields now support default values
- Each field type has an appropriate input: text field, number input, toggle, date preset dropdown, or comma-separated list
- Defaults are applied when creating tasks via modal, instant conversion, "Create or open task" command, or HTTP API
- Thanks to @bradyrx for suggesting
## Changed
- Added documentation link to settings panel (links to tasknotes.dev)
- Reorganized settings panel for improved discoverability
- Removed "Defaults" tab - default values are now configured alongside each property in the Task Properties tab
- Moved task filename format settings to the Title property section
- Moved project autosuggest settings to the Projects property section
- Body template setting moved to the Features tab
- Added descriptions to each property explaining its purpose
- Moved "Folder for converted tasks" setting to General tab under Task Storage for better discoverability
- Updated setting description to clarify that leaving empty uses the default tasks folder
`});var vke,kke=y(()=>{vke='# TaskNotes 4.1.1\n\n## Added\n\n- (#1277) Icon autosuggestion for custom status settings\n - Type to search through all available Lucide icons\n - Thanks to @Arachnidai for the suggestion\n- New formula properties in default Base templates\n - **Date calculations**: `daysUntilDue`, `daysUntilScheduled`, `daysSinceCreated`, `daysSinceModified`\n - **Boolean helpers**: `isOverdue`, `isDueToday`, `isDueThisWeek`, `isScheduledToday`, `isRecurring`, `hasTimeEstimate`\n - **Time tracking**: `timeRemaining`, `efficiencyRatio`, `timeTrackedThisWeek`, `timeTrackedToday`, `timeTrackedFormatted`\n - **Grouping**: `dueMonth`, `dueWeek`, `scheduledMonth`, `scheduledWeek`, `dueDateCategory`, `timeEstimateCategory`, `ageCategory`, `createdMonth`, `modifiedMonth`, `priorityCategory`, `projectCount`, `contextCount`, `trackingStatus`\n - **Combined due/scheduled**: `nextDate`, `daysUntilNext`, `hasDate`, `isToday`, `isThisWeek`, `nextDateCategory`, `nextDateMonth`, `nextDateWeek` - work with whichever date comes first\n - **Sorting**: `priorityWeight`, `urgencyScore` (combines priority with date proximity)\n - **Display**: `dueDateDisplay` (relative dates like "Today", "Tomorrow", "3d ago")\n - Action-oriented views (Not Blocked, Today, Overdue, This Week) now sort by urgency score, showing most important tasks first\n - See [Default Base Templates documentation](https://tasknotes.dev/views/default-base-templates) for full details\n - **Note**: To get these new formulas, either copy them from the documentation, or delete your `.base` files in `TaskNotes/Views/` and restart Obsidian to regenerate them\n\n## Changed\n\n- (#1282) Added spacing between task title and metadata in inline task widgets for improved readability\n - Thanks to @3zra47 for the suggestion\n- Custom status icons now display in all context menus (task context menu, batch operations menu, and task creation/edit modals)\n- Added embedded video guide for Google Calendar OAuth setup in documentation\n - Thanks to [@antoneheyward](https://www.youtube.com/@antoneheyward) for the tutorial\n\n## Fixed\n\n- (#1279) Fixed Kanban column width setting not being respected on mobile devices\n - Thanks to @guncav for reporting\n- (#1026), (#1177) Fixed recurring task completion from Base views recording the wrong date for users in negative UTC offset timezones (e.g., PST/PDT) when completing tasks in the evening\n - The bug caused `complete_instances` to record the next day instead of the user\'s current calendar day\n - Thanks to @3zra47 and @nslee123 for reporting and providing detailed reproduction steps\n\n'});var Tke,bke=y(()=>{Tke=`# TaskNotes 4.1.0
## Added
- (#1245), (#793) Added custom icon support for task statuses
- Configure a Lucide icon name (e.g., \`check\`, \`circle\`, \`clock\`) per status in Settings → Task Properties → Task Statuses
- Icons display instead of the colored dot, inheriting the status color
- Browse available icons at [lucide.dev](https://lucide.dev)
- Improves accessibility by allowing shape-based status differentiation
- Thanks to @3Fish for the feature request and @Raonmir2, @aubreyz, @prayidae, and @anareaty for the discussion on accessibility and icon-based indicators
- (#1259) Added [Property Types Reference](../settings/property-types-reference.md) documentation
- Documents expected data types (text, list, date, number) for all frontmatter properties
- Includes format specifications, examples, and a complete YAML reference
- Thanks to @Oblique82 for the suggestion
- (#1248) Added formula property support for sub-grouping in Bases Task List view
- Formula properties (e.g., \`formula.myFormula\`) now appear in the Sub-group by dropdown
- Supports all Bases Value types including strings, numbers, booleans, dates, and lists
- Thanks to @prayidae for the feature request
- (#1070) Added formula property support for swimlanes in Bases Kanban view
- Formula properties now appear in the Swim Lane dropdown
- Fixed swimlanes displaying empty when grouping by formula properties
- Note: Dragging tasks between formula-based columns/swimlanes is disabled (formulas are computed values)
- Thanks to @cathywu for reporting
- (#1010), (#1126) Added batch task selection and editing in Task List and Kanban views
- Shift+click to select multiple tasks
- Right-click selected tasks to open batch context menu
- Batch operations: change status, priority, due date, scheduled date, archive, delete
- Drag multiple selected cards in Kanban to move them together
- Click the selection count indicator to clear selection
- Thanks to @jalooc and @solidabstract for the feature requests
- (#1207) Added inline search box to Bases views (Task List, Kanban, Calendar)
- Enable via "Enable search box" toggle in view settings
- Searches across title, status, priority, tags, contexts, projects, and visible custom properties
- Press Escape or click × to clear search
- Thanks to @renatomen for the PR
- (#363) Added "Create or open task" command with NLP-based quick task creation
- Open via command palette or assign a hotkey
- Search existing tasks or type natural language to create new tasks (e.g., "Buy groceries tomorrow #shopping")
- Press Enter to select an existing task, Shift+Enter to create a new task
- Real-time preview shows parsed title, due date, priority, tags, and other metadata
- Can be used when adding sub-tasks to create sub-tasks on-the-fly
- Thanks to @luciolebrillante for the feature request
- (#1044), (#1222) Added unsaved changes confirmation when closing task edit modal
- Detects modifications to any field (title, dates, priority, tags, etc.)
- Shows confirmation dialog with Save/Discard/Keep Editing options
- Prevents accidental data loss from clicking outside the modal or pressing Escape
- Thanks to @renatomen for the PR and @0-BSCode for the feature request
- (#904) Added visual highlighting for overdue and past dates on task cards
- Overdue due dates now display in red text
- Past scheduled dates now display in blue text
- Thanks to @ras0q for the suggestion
- (#1164) Added \`priorityWeight\` formula to all default Bases templates for priority-based sorting
- Formula maps each priority value to a numeric weight based on your custom priority configuration
- Sort by \`formula.priorityWeight\` in ascending order to get highest priority tasks first
- Example: \`if(priority=="high",0,if(priority=="normal",1,if(priority=="low",2,999)))\`
- Thanks to @jhedlund for the suggestion
- (#1257), (#1064) Added configurable event stacking options for Bases Calendar view
- **Allow events to overlap**: Toggle whether timed events visually overlap or display side-by-side in week/day views
- **Max stacked events**: Limit horizontal event stacking in week/day views (0 = unlimited)
- **Max events per day**: Limit events shown per day cell in month view (0 = auto based on cell height)
- **Max event rows per day**: Limit event rows per day cell in month view (0 = unlimited)
- Configure per-view in the Bases Calendar view settings under Layout
- Thanks to @3zra47 and @hasanyilmaz for the feature requests
## Changed
- Improved inline task conversion to merge TasksPlugin and NLP parsing results
- Previously, if a task had hashtags (e.g., \`- [ ] Buy milk tomorrow #groceries\`), NLP parsing was skipped entirely
- Now NLP always parses the clean title to extract dates/times, then merges with TasksPlugin-extracted metadata
- TasksPlugin explicit values (emoji dates like 📅) take priority over NLP-inferred values
- Tags, contexts, and projects from both sources are combined and deduplicated
- Polished task card styling for a more native Obsidian look
- Simplified hover and focus states to use native Obsidian colors
- Removed blur filter and shadows from metadata pills
- Fixed subtask chevron vertical alignment with status dot
- Reduced swimlane label column width in Kanban view
- (#1151) Increased mini calendar heatmap color intensity for better visibility
- Days with notes now show more noticeable colors, especially with low note counts
- Intensity levels increased from 10/25/45/65% to 25/40/55/70%
- Thanks to @arreme for the suggestion
## Fixed
- (#1271) Fixed custom user fields not appearing in task modals after creation
- New custom fields are now automatically added to both creation and edit modals
- Deleting a custom field also removes it from modal configuration
- Updating a field's display name syncs to the modal configuration
- Thanks to @craziedde for reporting
- (#1256) Fixed links in custom properties not rendering as clickable in task cards
- Wikilinks (\`[[Note]]\`) now render correctly in Bases views
- Markdown links (\`[text](url)\`) now render correctly in all views
- Links in list-type properties are also properly rendered
- Thanks to @3zra47 for reporting
- (#1157) Fixed inline task embeds breaking layout when placed in indented bullet lists
- Task titles now wrap naturally within line boundaries instead of forcing the entire card to a new line
- Metadata (dates, tags, etc.) stays inline when space permits, with horizontal scrolling on hover when needed
- Thanks to @3zra47 for reporting
- (#1241) Fixed deleting custom priorities in settings removing the wrong priority when multiple priorities exist
- Thanks to @Anthonyhunter100 for reporting
- (#1165) Fixed Kanban view grouping by list properties (contexts, tags, projects) treating multiple values as a single combined column
- Tasks with multiple values now appear in each individual column (e.g., a task with \`contexts: [work, call]\` appears in both "work" and "call" columns)
- Added "Show items in multiple columns" option (enabled by default) to control this behavior
- Fixed drag-and-drop to properly add/remove individual values instead of replacing the entire list
- Fixed swimlane mode to also respect list property explosion
- Thanks to @dictionarymouse for reporting
- (#1217) Fixed inconsistent Ctrl+Click/Cmd+Click behavior for opening notes in new tabs
- Note cards and internal links now properly support Ctrl/Cmd+Click to open in new tab
- Added middle-click support for opening in new tab
- Thanks to @diegomarzaa for reporting
- (#1265) Fixed task edit modal corrupting markdown-style project links on save
- Links like \`[Project Name](path.md)\` were being wrapped in extra brackets: \`[[[Project Name](path.md)]]\`
- Plain text project names are now preserved as-is instead of being converted to wikilinks
- Markdown-style project links now resolve properly and display as linked (not orange/unresolved)
- Thanks to @minchinweb for reporting
- (#1266) Fixed Kanban view scroll position resetting to top of column after any change
- Clicking status dots, priority, or other task properties no longer jumps the column back to top
- Scroll position is now preserved for both regular columns and swimlane cells
- Thanks to @essouflenfer for reporting
- (#485), (#1221), (#1262) Fixed NLP parser not recognizing non-ASCII characters in tags, contexts, and projects
- Tags like \`#investigación\` were being truncated at accented characters (e.g., \`#investigaci\`)
- Non-Latin scripts (Chinese, Cyrillic, Japanese, etc.) were not recognized at all (e.g., \`@家\`, \`#杂事\`, \`@ознакомиться\`)
- Parser now uses Unicode-aware regex patterns to support all languages and scripts
- Thanks to @Arachnidai, @fidelaznar, and @qian1ing for reporting
- (#1249) Fixed project preview in task creation modal showing quadruple brackets (\`[[[[Project]]]]\`)
- Projects selected from autocomplete were being wrapped in extra wikilink brackets in the preview display
- Thanks to @2vzqwz8tvg-png for reporting
- (#1249) Fixed custom priority ordering in settings being unclear and non-intuitive
- Priority cards are now draggable to reorder (like statuses)
- Priorities are displayed in weight order (lowest to highest priority)
- New priorities are added at the end (highest priority) instead of with a fixed weight
- Thanks to @2vzqwz8tvg-png for reporting
- (#1272) Fixed recurrence anchor not being saved when set to "completion" during task creation
- Selecting "completion" as the recurrence anchor now correctly persists to the task frontmatter
- Thanks to @blaxcky for reporting
- (#1128) Fixed NLP parser not allowing slashes in context names
- Contexts like \`@shopping/groceries\` were being split into \`@shopping\` and \`/groceries\`
- Hierarchical context names now work the same as tags and projects
- Thanks to @wealthychef1 for reporting
- (#1170) Fixed \`dateCreated\` and \`dateModified\` not using custom property names when creating notes from calendar events
- Notes created from ICS events now respect the field mapping configured in settings
- Thanks to @maddie-m for reporting
- (#1171) Fixed calendar event toggles not responding to changes after initial load
- Toggling "Show scheduled tasks", "Show due tasks", and other event filters now correctly updates the calendar
- Previously, changing these toggles had no effect until the view was reloaded
- Thanks to @hangryscribe3 for reporting
- (#1198) Fixed project links being created relative to the wrong file when editing from Bases views
- Relative paths in project links are now correctly resolved relative to the task note file
- Previously, editing a task from a Bases view would create project links relative to the \`.base\` file
- Thanks to @minchinweb for reporting
`});var wke,Ske=y(()=>{wke=`# TaskNotes 4.0.5
## Changed
- (#790) Task edit modal now shows unresolved project links with appropriate styling
- Similar to how dependencies are displayed, unresolved projects now appear with visual indication
- Hovering over an unresolved project shows a tooltip explaining it couldn't be resolved
- Thanks to @aubreyz for reporting
## Fixed
- (#1011) Fixed chevrons incorrectly showing on tasks with no subtasks
- Project index was incorrectly adding all linked files instead of only files referenced in the projects field
- Now properly parses the projects field and only indexes those specific files as projects
- Also fixed alias handling in project and dependency links - aliases are now correctly stripped before link resolution
- Thanks to @craziedde for reporting
- (#1200) Fixed kanban drag & drop not updating task properties correctly
- Dragging tasks to different columns now properly triggers business logic (completedDate, auto-archive, webhooks)
- Previously, kanban updates bypassed \`updateProperty\` and directly modified frontmatter
- Thanks very much to @tvoklov for the PR
- (#1203) Fixed autocomplete dropdown being clipped inside NLP field boundaries
- Configure CodeMirror tooltips to render in document.body instead of constrained editor container
- Prevents suggestion dropdown from being hidden when it extends beyond the NLP field height
- Thanks to @Andrei-Ioda for reporting
- (#1172) Fixed task lists and checkboxes rendering incorrectly in task details editor
- Remove padding-left override on \`.cm-line\` to allow CodeMirror decorations (checkboxes, indentation) to render properly
- Content padding is now handled by \`.cm-content\` while \`.cm-line\` uses natural spacing
- Thanks to @nightroman for reporting
- Fixed relationships widget not appearing on project notes without frontmatter
- Widget now correctly shows on any note referenced as a project by tasks, regardless of whether the note has frontmatter
- Fixed task card and relationships widgets not appearing when opening notes in source mode
- Removed live preview mode restriction to allow widgets to render in both source and live preview modes
- (#901) Fixed calendar view toolbar buttons overflowing on narrow screens
- Added \`flex-wrap: wrap\` to calendar header toolbar to allow buttons to wrap to multiple lines
- Thanks to @RumiaKitinari for reporting
- (#1193), (#1194), (#1185) Fixed new calendar views not respecting user's default calendar settings
- Previously, new Bases calendar views used hardcoded inline defaults instead of user-configured preferences
- Calendar view initialization now correctly uses \`plugin.settings.calendarViewSettings\` as the fallback
- Thanks @ki5ck, @minchinweb and @ThamirysOlv for reporting
- Fixed calendar to ensure that it respects user's locale
- Tries to use calendar locale, then tries UI language, then system language, then falls back to English
- (#1043) Fixed default reminders with "at time of event" (0 offset) not being applied to tasks
- UI was displaying "1" instead of "0" for zero-offset reminders in settings
- Thanks to @dblinnikov for reporting
- (#1206) Fixed NLP status parsing regressions with trigger prefixes and temporal keywords
- Manually typing status trigger + label now correctly parses (e.g., \`*Done\` when label is \`Done\`)
- Status values containing temporal keywords no longer misparsed as dates (e.g., \`Expedite = Now\`)
- Thanks very much to @renatomen for the PR
- (#1212) Fixed "Show release notes on update" toggle not saving correctly
- Thanks to @Jon-dog for reporting
- (#1197) Add Portuguese language to list of translations in general tab settings
- Allows users to select the Portuguese translation option
- Thanks to @andysteel for the PR
- Fixed file properties displaying incorrectly in Bases views
- File properties like \`file.name\`, \`file.basename\`, \`file.size\`, etc. were showing as "Title" or returning null
- Now correctly extracts and displays all file properties from Obsidian's file metadata
- Supports both direct TFile properties (name, basename, extension, path, size, ctime, mtime) and computed properties (links, embeds, tags, backlinks, aliases)
`});var Cke,xke=y(()=>{Cke=`# TaskNotes 4.0.4
## Added
- (#1134, #779) Added CMD+Enter (Mac) / Ctrl+Enter (Windows/Linux) keyboard shortcut support for saving in all modals
- Works from any input field in task creation, task edit, time entry, timeblock, and property selector modals
- Thanks to @luckb0x, @hamlim and @nightroman for the feature requests
## Fixed
- (#1181) Fixed vertical overflow in Kanban view columns with fewer than 15 tasks
- Prevents cards from extending beyond column boundaries before virtualization activates
- Thanks to @lomarcanys for reporting
- (#1177) Bases views now anchor recurring completion and calendar navigation to the right date
- Recurring completion from Bases Task List/Kanban uses the task's scheduled/due date instead of "today" (fixes complete_instances)
- Bases calendar navigation and property-based events use UTC anchors to avoid previous-day jumps
- Thanks to @nslee123 for flagging the issue
- Bases calendar navigation now respects UTC-anchored dates to avoid landing on the previous day
- Corrected all-day end date calculation to prevent off-by-one spans
- Added regression test for the UTC anchor behavior
- Thanks to KaCii for [flagging the issue](https://discord.com/channels/686053708261228577/1433165116702199880/1439757826380660767)
## Changed
- Refactored plugin styling to better align with Obsidian's native UI conventions
- Replaced all \`cursor: pointer\` with \`cursor: var(--cursor)\` (100+ instances) to follow Obsidian's cursor convention
- Removed forced \`border: none; box-shadow: none\` rules that were fighting against Obsidian's native button styling
- Scoped custom \`.tn-btn\` button system to settings modal only (\`.mod-settings\`), allowing Obsidian's native button styles to work elsewhere
- Thanks to @kepano for guidance
`});var Eke,Dke=y(()=>{Eke=`# TaskNotes 4.0.3
## Fixed
- (#1157) Fixed task embeds appearing on new line instead of inline with bullets in lists
- Changed inline task cards to use span elements instead of divs for proper inline flow
- Added max-width constraint to prevent wrapping when tasks are wider than editor
- Task embeds now display correctly inline with bullet points during live preview
- Thanks to @3zra47 for reporting
- (#1168) Fixed mini calendar stealing focus every few seconds when pinned to sidebar
- Thanks to @DearHaruHaru for reporting
- (#1161, #1162) Fixed "unexpected scalar" YAML parsing error in generated tasks-default.base template
- Changed nested quotes in "Not Blocked" filter from double to single quotes
- Thanks to @benschifman and @InterstellarRaccoon for reporting, @GarrettKaupp for identifying the fix
## Changed
- Updated task modal UI to use native Obsidian patterns for better theme compatibility
- Thanks to @kepano for feedback
`});var Pke,Ake=y(()=>{Pke=`# TaskNotes 4.0.2
This release fixes some of the more urgent (and easy-to-fix) bugs that were introduced in the v4 major release. Thanks to everyone for your patience, and to those who have reported issues, for taking the time to do so. There will be more releases over the coming weeks to iron out some of v4's kinks.
## Added
- Added "Not Blocked" view to default task list template
- Shows incomplete tasks that are ready to work on (not blocked by incomplete dependencies)
- Uses Bases \`list.filter()\` to check completion status of each blocking task
- This new view can be accessed by regenerating the Task List view, or by copying the filters from the [default base templates documentation](https://tasknotes.dev/views/default-base-templates)
## Fixed
- (#1145, #1156) Fixed default Kanban view requiring manual 'Group by' configuration
- Default Kanban template now automatically includes \`groupBy\` property set to status
- Resolves "Kanban requires a 'Group by' property to be configured" error on first use
- Users no longer need to manually configure grouping through the Sort menu
- Thanks to @randomness42 and @seepage87 for reporting
- Fixed user-defined custom fields appearing as \`user:field_xxx\` in generated base templates
- Custom fields now use their actual property names (e.g., \`effort\` instead of \`user:field_1761435303709\`)
- Ensures Bases can properly query user-defined properties
- Also fixed \`totalTrackedTime\` to correctly map to the configured \`timeEntries\` property name
- (#1145) Improved Kanban error message when no 'Group by' property is configured
- Now includes instructions: "Click the 'Sort' button and select a property under 'Group by'"
- Thanks to @randomness42 for the suggestion
- (#1139, #1141) Fixed relationships widget not appearing in project notes
- Project references are now resolved to full file paths when indexing
- Uses Obsidian's link resolution API to handle wikilinks, markdown links, and relative paths
- Restores v3.x behavior where subtasks appear in parent project notes
- Thanks to @jhedlund, @n1njaznutz, and @luckb0x for reporting and testing
- Fixed dependency blocking status to be status-aware
- "Blocked (x)" pill now only appears when tasks have **incomplete** blocking dependencies
- Tasks with all completed blocking dependencies no longer show as blocked
- Fixed cache invalidation bug causing blocking/blocked pills to disappear when editing tasks
- When a task is modified, only forward dependencies are cleared (stored in its frontmatter)
- Reverse dependencies are preserved (stored in other tasks' frontmatter)
## Changed
- Removed custom TaskNotes icon from task modals
- Task creation and edit modals now use Obsidian's standard title styling
- Thanks to @kepano for the suggestion
- Moved default base templates documentation to \`docs/views/\`
- Location: \`docs/views/default-base-templates.md\`
- Added cross-references to official Obsidian Bases documentation
- Updated code comments to reference new documentation path
- Fixed incorrect quote escaping in default base templates documentation
- YAML examples now use proper single quotes for strings containing double quotes
`});var Mke,Ike=y(()=>{Mke=`# TaskNotes 4
TaskNotes 4.0.1 is a stability-focused major release that finishes the migration to Obsidian's Bases core plugin. Every task-facing view (Task List, Kanban, Calendar, Agenda, Mini Calendar, and the embedded Relationships widget) now runs on \`.base\` files. This refactor simplifies the plugin codebase, removes bespoke UI logic, and lets workflows feel native to Obsidian—views are just files in your vault.
## Highlights
**New features and improvements:**
- Performance improvements
- Virtual scrolling in Task List and Kanban views handles **30,000+ tasks** without performance degradation
- **OAuth calendar integration**
- Google Calendar and Microsoft Outlook bi-directional sync
- Drag calendar events in the TaskNotes calendar to update them online
- **Configurable modals and NLP**
- New Modal Fields settings tab for moving, hiding, or requiring fields in create/edit modals
- Rich markdown editor and customizable NLP triggers, including autocomplete for user fields
- **Time management features**
- Time Entry Editor Modal
- Improved Timeblock creation and management
- Completion-based recurrence with \`recurrence_anchor\` field
- Skippable recurrence instances
**Bases architecture changes:**
- **Bases-first architecture**
- Task views ship as \`.base\` files inside \`TaskNotes/Views/\`
- Commands and ribbon buttons now open files you control
- Filtering/grouping/sorting uses Bases YAML instead of TaskNotes-specific UI
- Agenda is a dedicated list-mode calendar \`.base\` file for fast daily/weekly reviews
- **Inline workflows stay in sync**
- Unified Relationships widget embeds a Bases view so project subtasks, dependencies, and blocking tasks stay in one place
- Task cards inside notes honor the same Bases filtering/grouping rules as standalone views
## Why Bases?
Moving everything to Bases allowed us to delete thousands of lines of bespoke filtering logic, state management, and widget code. The plugin now leans on Obsidian's supported API, which:
- Reduces maintenance overhead and improves reliability
- Lets advanced users version-control and audit their view definitions
- Makes saved views portable between vaults
- Keeps TaskNotes behavior consistent with other Obsidian-native workflows
## Upgrade Notes
- Obsidian **1.10.1 or later** is required (Bases public API with group-by support)
- Enable the **Bases** core plugin before opening TaskNotes views
- Run **Settings → TaskNotes → General → Create Default Files** if you need fresh \`.base\` files
- Use **Export All Saved Views to Bases** to convert any legacy FilterBar saved views into \`.base\` files
- The Relationships widget uses \`TaskNotes/Views/relationships.base\`; adjust that file to change what appears inside notes
## Breaking Changes
- The old FilterBar UI has been removed—all filtering and saved views live in \`.base\` files
- Legacy widget settings (\`showProjectSubtasks\`, \`showTaskDependencies\`, etc.) were replaced with \`showRelationships\` and \`relationshipsPosition\`
- Task view commands now fail if their mapped \`.base\` file is missing; configure paths under **Settings → TaskNotes → General → View Commands**
- **Priority sorting now uses alphabetical order instead of custom weights**
- In v3, TaskNotes used priority "weights" to determine sort order (higher weight = higher priority)
- In v4, Obsidian's Bases plugin sorts priorities alphabetically by their value
- The weight field has been removed from the settings UI
- **Workaround**: Name your priority values to sort alphabetically in your desired order
- Example: \`1-urgent\`, \`2-high\`, \`3-medium\`, \`4-normal\`, \`5-low\`
- Or: \`a-urgent\`, \`b-high\`, \`c-medium\`, \`d-normal\`, \`e-low\`
- Agenda view has been replaced by the list view in Calendar
- Grouping is not supported in this view, so the "Overdue" group is no longer provided
- A separate "Overdue" view is available in the "Task List" base file
## Known Issues
- Users upgrading from versions prior to 3.x should export saved views to Bases before deleting old plugin data
- Embedded Bases views still require the Bases plugin to remain enabled; disabling Bases will hide TaskNotes task views
## Details
### Added
- Virtual scrolling and lazy rendering to Bases views for handling thousands of notes without performance degradation - Thanks to @aubreyz and @turingexmachina for reporting performance issues and help with diagnosis
- Google Calendar and Microsoft Outlook integration via OAuth 2.0 with automatic syncing
- Time Entry Editor Modal for managing time entries (Alt-drag on calendar to create)
- Kanban Swimlane Layout with horizontal grouping and configurable column widths
- Saved View Converter button in settings to convert v3 saved filter views to \`.base\` files
- Context menus for time entries and ICS events in calendar views
- Calendar icon to ICS event titles for better visual distinction
- Hover tooltips for timeblocks in calendar views
- MiniCalendar view for Bases integration with monthly grid and dot indicators - Thanks to @aubreyz and @turingexmachina for reporting performance issues and help with diagnosis
- (#1090) Portuguese (Brazil) translation - Thanks to @andysteel for the contribution
- Configurable task modal fields with drag-and-drop reordering in new "Modal Fields" settings tab
- Rich markdown editor for NLP task creation with syntax highlighting and wikilink support
- Customizable NLP triggers with autocomplete and keyboard navigation
- Inline task link overlay enhancements with configurable visible properties
- Kanban column reordering via drag and drop with saved order per grouping property
- Mini calendar enhancements including week numbers, heat map visualization, note preview tooltips, and keyboard navigation
- Unified Relationships widget consolidating project subtasks, dependencies, and blocking relationships with automatic tabs
- Updated task card styling with improved hover effects, shadows, and gradient accents
- (#361) Completion-based recurrence support with \`recurrence_anchor\` field for tasks that recur based on completion date - Thanks to @luciolebrillante for the original feature request, and @jhedlund, @nschenone, @BryanWall, @realJohnDoe, and @kazerniel for additional input and interest
- (#416) Support for skipped recurrence instances with \`skipped_instances\` field and right-click skip/unskip in calendar - Thanks to @mdbraber for suggesting the array approach and @jerzy-dudzic for reporting the issue
- Sub-grouping support to Bases Task List view with nested grouping by any property and collapsible groups
- Documentation for default Bases templates showing all default \`.base\` file templates with examples
### Changed
- All views (Calendar, MiniCalendar, Kanban, Tasks, Agenda, Project Subtasks) now use Bases architecture with \`.base\` files
- Calendar sources (Google, Microsoft, ICS events) can be toggled independently with improved timezone handling
- Reorganized settings tabs with OAuth calendar settings in Integrations tab
- Refactored Bases integration to use public API and trust pre-sorted data
- Refactored calendar modules to use ES6 imports instead of lazy require() calls
- Time entry events now show task context menu on right-click
- Replaced MinimalNativeCache with just-in-time TaskManager for zero startup time and always-fresh task data
- Completed internationalization with 100% translation coverage across all 6 supported languages
- Migrated to i18n-state-manager CLI tool for improved translation management
- Bases view templates now generate dynamically based on user settings with adaptive task filters
- Updated Bases CalendarView to show TaskNotes in property-based events
- NLP system overhaul with consolidated trigger configuration and direct NaturalLanguageParser usage
- Simplified TaskCard interface and refactored TaskLinkWidget for consistency
- Settings UI enhancements with NLP triggers configurable through Features tab
- Refactored Bases views to use Component lifecycle properly with automatic cleanup
- Improved development experience by converting ESLint errors to warnings
- Renamed "Advanced Calendar" to "Calendar" throughout the UI
- Improved timeblock visual styling in calendar views with reduced border width and softer shadows
- Updated "Export All Views" button to "Export V3 Views" to clarify it migrates v3 saved views
- Improved internationalization (i18n) support in General settings tab with all Bases integration settings using translation keys
- Changed default Tasks List template view order with "All Tasks" first and added "Unscheduled" view
### Fixed
- (#843) Fixed task tag being added when "Identify tasks by" is set to "Property" - Thanks to @jack2game for reporting
- Fixed dark mode calendar borders
- Fixed Bases Kanban column ordering - Thanks to @mweichert for reporting
- Fixed state management bug in FilterSettingsComponent
- Fixed timezone handling for recurring events
- (#1022, #684) Fixed tasks randomly disappearing when Smart Connections plugin is enabled by eliminating race condition - Thanks to @alejandrospoz, @seepage87, @amarjt, @luckb0x, and camara-tech for reporting and help debugging
- (#992) Fixed "Failed to resolve module specifier 'obsidian'" error when moving recurring task instances in calendar - Thanks to @jalooc for reporting
- Fixed task dependencies not displaying on task cards with proper isBlocked and isBlocking flags
- Fixed Bases property mapping for user-configured field names
- Fixed Bases views not respecting user-configured visible properties
- Fixed MiniCalendar UTC anchoring for consistent timezone-independent date handling
- Fixed DateValue conversion in BasesDataAdapter for property-based events in CalendarView
- (#1084) Fixed word wrapping in NLP preview items - Thanks to @maybetm for the fix
- (#975) Fixed advanced calendar list headers not respecting theme colors - Thanks to @hugohil for the fix
- (#1089) Fixed embedded task list bases growing unbounded and leaving large empty space - Thanks to @same774 for reporting with screenshot
- Fixed "Highlight today" toggle and calendar view type persistence in Bases Calendar view options
- (#1050) Fixed task modal adding unwanted empty contexts and projects arrays - Thanks to @nightroman for reporting
- Fixed inline task link overlay layout prioritization and horizontal scrolling for metadata
- Fixed group collapse/expand functionality in TaskListView
- Fixed config loading race condition in KanbanView and CalendarView
- Fixed MiniCalendarView to use direct Bases API like other views
- (#893) Fixed yearly recurring tasks not always updating scheduled date to next occurrence when completed - Thanks to @VenturaNotes for reporting
- (#951) Fixed yearly recurring tasks not showing up in calendar's weekly, 3-day, or day views - Thanks to @bespokecomp for reporting
- (#889) Fixed git merge conflicts in calendar subscription metadata by storing in memory instead of disk - Thanks to @karlfrohlich for reporting
- Fixed recurrence modal not loading DTSTART date/time when editing existing recurrence rules
- (#1097) Fixed custom properties and formulas not displaying in Bases views using getValue() method - Thanks to @cathywu for reporting
- (#1099) Fixed issues with default Bases file creation including double-prefix bug and race condition - Thanks to @kmaustral for reporting
- (#1110) Fixed open recurring tasks appearing crossed out in Tasks view by using UTC-anchored dates - Thanks to @kmaustral for reporting
- (#1118) Fixed user-defined fields not working in inline task conversion to TaskNote - Thanks to @guncav for reporting
- Fixed kanban column width CSS constraints not matching settings slider range
- Fixed Kanban view showing empty columns for all user-defined statuses when grouping by status - Thanks to @williamcheuk03 for reporting
- (#1103) Fixed TaskNotes/Views folder being created unnecessarily on startup - Thanks to @Wayment9504 for reporting
- (#1133) Fixed empty priority columns not showing in Kanban view when "Hide empty columns" is disabled - Thanks to @luckb0x for reporting
- Fixed OAuth calendar cards showing "Unknown account" by removing non-functional Account field - Thanks to @Oblique for reporting
- Fixed incorrect Bases syntax in default template files with correct parameter naming
- Fixed incorrect Bases syntax in "Export V3 Views" feature with correct YAML structure
- (#1127) Fixed custom priority colors not being respected in Task List and Subtasks sections - Thanks to @HPmattsloper for reporting
- (#1043) Fixed inability to set "at time of event" (0 offset) as default reminder in settings - Thanks to @dblinnikov for reporting
- (#1055) Fixed break sessions being logged as \`type: work\` when started via command/hotkey - Thanks to @0-BSCode for reporting and debugging
- (#1024) Fixed date/time picker immediately closing when selecting time on iPhone by refactoring to native Modal components - Thanks to @3zra47 for reporting
- (#1122) Fixed inline task titles being truncated too aggressively with increased max-width - Thanks to @jacorvillo for reporting
- Fixed Obsidian crashes when invalid time values entered in Bases calendar view configuration
- (#1120) Fixed custom field mappings not being respected throughout the application - Thanks to @kmaustral for reporting
- (#1121) Fixed custom user fields being saved with auto-generated IDs instead of user-defined property keys - Thanks to @guncav for reporting
- (#1123) Fixed relationships widget only displaying on task notes, now appears on both task and project notes - Thanks to @dblinnikov for reporting
- Fixed time entries not showing in calendar view for tasks without scheduled or due dates
- (#1091) Fixed task card and relationships widgets appearing inside footnote editors - Thanks to @3zra47 for reporting
- (#1086) Fixed calendar "+more" popover showing white text on white background in dark mode - Thanks to @same774 for reporting
- (#1076) Fixed inability to create timeblocks ending at midnight (00:00) - Thanks to @skoove for reporting
- (#958) Fixed cursor jumping and layout shifts when typing near task card or relationships widgets in live preview - Thanks to @thesmithmode for detailed debugging information
- (#513) Fixed task card and relationships widgets not appearing in reading mode and fixed critical memory leak - Thanks to @berzernberg for reporting
### Removed
- Removed StatusSuggestionService (functionality consolidated into NaturalLanguageParser)
- Removed legacy FilterBar UI - all filtering now lives in \`.base\` files
- Removed legacy views
`});var Nke,Rke=y(()=>{Nke=`# TaskNotes 4.0.0-beta.3
> **Beta Release**
>
> You may encounter issues. Report problems on [GitHub Issues](https://github.com/callumalpass/tasknotes/issues).
## Added
- Updated task card styling
- Increased status dot size from 16px to 18px
- Added subtle shadows and transitions to card hover states
- Updated hover effects on status and priority dots with scaling and removed glow
- Modified metadata pills with backdrop blur and adjusted spacing
- Added box shadows to interactive elements (dates, projects, tags) on hover
- Updated animations to use cubic-bezier easing
- Added gradient accents to subtask and blocking task borders
- Fixed subtasks appearing behind parent card hover backgrounds
- Fixed subtask click and context menu events bubbling to parent cards
- Fixed subtasks inheriting parent priority and status colors
- (#361) Added completion-based recurrence support with \`recurrence_anchor\` field
- Tasks can now recur based on completion date instead of scheduled date
- Set \`recurrence_anchor: completion\` in task frontmatter to enable this behavior
- When completing a recurring task, the next occurrence will be scheduled relative to the completion date
- The DTSTART in the RRULE automatically updates to the completion date, ensuring calendar views show future occurrences at the correct dates
- Defaults to \`scheduled\` (original behavior) if not specified
- Useful for tasks like "Exercise weekly" where you want the next occurrence 7 days after you actually complete it, not 7 days after it was scheduled
- Example: Complete a weekly task 2 days late, and the next occurrence will be 7 days from the completion date (not the original scheduled date)
- Thanks to @luciolebrillante for the original feature request, and @jhedlund, @nschenone, @BryanWall, @realJohnDoe, and @kazerniel for additional input and interest
- (#416) Added support for skipped recurrence instances with \`skipped_instances\` field
- Recurring tasks can now have individual instances marked as "skipped" without completing them
- Skipped instances are stored in the \`skipped_instances\` frontmatter array (e.g., \`["2025-11-15", "2025-11-22"]\`)
- Right-click on a recurring task instance in calendar views to skip/unskip it
- Visual styling differentiates skipped instances:
- Calendar views: Gray background with muted appearance
- Task cards: Strike-through text with gray styling
- Skipped instances don't affect the recurrence pattern - future instances continue as scheduled
- Useful for holidays, vacations, or other planned exceptions to recurring tasks
- Thanks to @mdbraber for the suggestion to use an array similar to \`complete_instances\`, and @jerzy-dudzic for reporting the issue
## Fixed
- (#893) Fixed yearly recurring tasks not always updating scheduled date to next occurrence when completed
- Increased look-ahead period for yearly recurrence from 365 days to 800 days (~2.2 years)
- Also optimized look-ahead periods for other frequencies: daily (30 days), weekly (90 days), monthly (400 days)
- Ensures the next occurrence is always found when completing recurring task instances
- Thanks to @VenturaNotes for reporting
- (#951) Fixed yearly recurring tasks not showing up in calendar's weekly, 3-day, or day views
- Extended the look-ahead period for yearly recurring tasks when generating calendar instances
- Calendar views now look ahead ~2.2 years for yearly tasks to ensure occurrences appear even in short date ranges
- Only displays instances that fall within the actual visible calendar range
- Weekly recurring tasks were unaffected and continued to work correctly
- Thanks to @bespokecomp for reporting
- (#889) Fixed git merge conflicts in calendar subscription metadata
- Calendar subscription \`lastFetched\` and \`lastError\` fields are now stored in memory instead of being saved to disk
- Prevents git conflicts when syncing vaults across multiple computers that independently fetch calendar subscriptions
- The "last synced" timestamp in settings will reset on plugin reload, but subscriptions will re-fetch automatically
- Thanks to @karlfrohlich for reporting
- Fixed recurrence modal not loading DTSTART date/time when editing existing recurrence rules
- The custom recurrence modal now correctly parses and displays the start date and time fields
- Fixed parser that was splitting on \`=\` instead of \`:\` for DTSTART values
- (#1097) Fixed custom properties and formulas not displaying in Bases views
- Updated TaskCard to use Bases API's getValue() method for formulas and custom note properties
- Formulas now work correctly using \`formula.NAME\` syntax
- Custom note properties now work correctly using \`note.PROPERTY\` syntax
- Thanks to @cathywu for reporting
- (#1099) Fixed issues with default Bases file creation
- Fixed double-prefix bug in relationships template that generated invalid filter expressions like \`note.note.projects\`
- Fixed race condition where files created during plugin load wouldn't appear in file explorer
- Default Bases files now generate with correct property paths and appear reliably in the file explorer
- Thanks to @kmaustral for reporting
- (#1110) Fixed open recurring tasks appearing crossed out in Tasks view
- Removed stale \`selectedDate\` property that was never updated in v4
- Tasks view now uses fresh UTC-anchored "today" for correct recurring task completion status
- Fixes issue where tasks completed yesterday would appear crossed out today for users in positive UTC offset timezones
- Also fixed KanbanView to use UTC-anchored dates for consistency
- Thanks to @kmaustral for reporting
- (#1118) Fixed user-defined fields not working in inline task conversion
- User-defined fields like \`>customfield value\` now properly convert to frontmatter when using the "TaskNote: Convert task to TaskNote" command
- Fixed fields appearing with internal IDs (e.g., \`field_1761435101864\`) instead of configured frontmatter key names
- Array values are now properly joined with commas
- Added \`userFields\` property to \`ParsedTaskData\` interface to support custom fields throughout the conversion flow
- Thanks to @guncav for reporting
- Fixed kanban column width CSS constraints not matching settings
- Updated CSS min-width from 280px to 200px and max-width from 350px to 500px to match slider range
- Column width slider now works correctly across the full 200-500px range
- Kanban view now shows empty columns for all user-defined statuses when grouping by status
- Empty columns appear for custom statuses defined in settings, even when no tasks have that status
- Allows users to drag tasks into empty status columns
- Works in both flat kanban view and swimlane mode
- Respects the existing "Hide empty columns" setting
- Thanks to @williamcheuk03 for reporting this issue
`});var _ke,Fke=y(()=>{_ke=`# TaskNotes 4.0.0-beta.2
> **Beta Release**
>
> You may encounter issues. Report problems on [GitHub Issues](https://github.com/callumalpass/tasknotes/issues).
## Added
- (#1090) Portuguese (Brazil) translation
- Full Portuguese (pt-BR) localization support
- A big thanks to @andysteel for the contribution
- **Configurable task modal fields**
- New "Modal Fields" settings tab for complete control over task creation and edit modals
- Configure which fields appear in creation vs edit modals independently
- Drag-and-drop reordering of fields within groups (metadata, organization, dependencies, custom)
- Enable/disable individual fields (including core fields like contexts, tags, time estimate)
- Organize fields into groups
- Automatic migration of existing user-defined fields
- Title and details fields support visibility toggling (ordering fixed for consistency)
- **Rich markdown editor for NLP task creation**
- Replaced plain textarea with full CodeMirror markdown editor
- Live preview, syntax highlighting, and wikilink support
- Ctrl/Cmd+Enter keyboard shortcut to save task
- Esc/Tab keyboard shortcuts for modal control
- **Customizable NLP triggers with autocomplete**
- Configure custom trigger characters/strings for each property type (tags, contexts, projects, status, priority)
- Supports user-defined field triggers
- CodeMirror-based autocomplete with keyboard navigation (arrow keys, Enter, Tab)
- Quote support for multi-word values in user fields
- Native tag suggester integration when using # trigger
- **Inline task link overlay enhancements**
- Configurable visible properties for inline task cards
- PropertySelectorModal for selecting which properties to display
- Improved layout: title prioritized, horizontal scrolling for metadata
- Real-time updates when task data changes
- **New utility services**
- \`TriggerConfigService\` - manages NLP trigger configurations
- \`PropertySelectorModal\` - reusable multi-select property picker
- Property helpers for consistent property handling across views
- Kanban column reordering via drag and drop
- Drag column headers to reorder columns
- Column order is saved per grouping property
- Visual feedback during drag operations
- Mini calendar enhancements (in progress)
- Week numbers column
- Heat map intensity visualization
- Note preview tooltips on hover
- Keyboard navigation
- **Unified Relationships widget**
- Consolidated project subtasks, task dependencies, and blocking relationships into a single dynamic widget
- Four automatic tabs: Subtasks (Kanban), Projects (List), Blocked By (List), Blocking (Kanban)
- Tabs automatically show/hide based on available relationship data
- Bases views handle all data updates reactively - no manual refresh needed
- Single configuration setting: show/hide and position (top/bottom)
- Significantly reduced code complexity (430 fewer lines)
## Fixed
- (#1084) Fixed word wrapping in NLP preview items
- Thanks to @maybetm for the fix
- (#975) Fixed advanced calendar list headers not respecting theme colors
- Thanks to @hugohil for the fix
- (#1089) Fixed embedded task list bases growing unbounded and leaving large empty space
- Embedded bases now scroll internally instead of expanding to show all tasks
- Consistent behavior between task list and kanban embedded views
- Thanks to @same774 for reporting with screenshot
- **Bases Calendar view options now working correctly**
- Fixed "Highlight today" toggle not applying - now properly adds/removes CSS class when toggled
- Fixed calendar view type (month/week/day/etc) not being saved when changed via calendar buttons
- View type is now persisted when users click month/week/day buttons in the calendar UI
- (#1050) Task modal no longer adds unwanted empty contexts and projects arrays
- FieldMapper now checks if arrays are empty before writing to frontmatter
- Thanks to @nightroman for reporting this issue
- **Inline task link overlay fixes**
- Fixed layout prioritization: title now prioritized over metadata
- Added horizontal scrolling for metadata to prevent overflow
- Fixed real-time update listeners for task data changes
- Fixed group collapse/expand functionality in TaskListView
- Re-registered click event listener for group headers using Component API
- Groups can now be properly collapsed and expanded
- Fixed config loading race condition in KanbanView and CalendarView
- Config is now properly loaded in onload() lifecycle method
- Views wait for config before rendering options
- Fixed MiniCalendarView to use direct Bases API like other views
- Consistent use of Component lifecycle methods
- Proper cleanup in onunload()
## Changed
- **NLP system overhaul**
- Replaced \`StatusSuggestionService\` wrapper with direct \`NaturalLanguageParser\` usage
- Consolidated trigger configuration into unified \`TriggerConfigService\`
- Enhanced \`NaturalLanguageParser\` with full trigger and user field support
- Removed custom # tag autocomplete in favor of Obsidian's native tag suggester (when using # trigger)
- **Task card and editor improvements**
- Simplified \`TaskCard\` interface - removed unused options (showCheckbox, showArchiveButton, groupByDate)
- Refactored \`TaskLinkWidget\` to use unified \`TaskCard\` component for consistency
- Added support for inline vs. block layout modes in task cards
- Improved task card BEM CSS with better styling for inline mode
- **Settings UI enhancements**
- NLP triggers now configurable through Settings > Features tab
- Added settings for inline task card visible properties
- Improved appearance tab with property selector integration
- Better organization of NLP-related settings
- Refactored Bases views to use Component lifecycle properly
- Views now extend Component and use onload()/onunload()
- Automatic cleanup of event listeners via Component.registerDomEvent()
- Improved state management and ephemeral state handling
- Improved development experience
- Converted ESLint errors to warnings for non-blocking development
- Fixed various linting issues and unused imports
## Removed
- Removed \`StatusSuggestionService\` (functionality consolidated into \`NaturalLanguageParser\`)
## Breaking Changes
- **Relationships widget settings consolidated** (automatic migration)
- Old settings removed: \`showProjectSubtasks\`, \`projectSubtasksPosition\`, \`showTaskDependencies\`, \`taskDependenciesPosition\`
- New unified settings: \`showRelationships\`, \`relationshipsPosition\`
- Widget now appears on ALL notes (tasks, projects, regular notes) - Bases filtering controls which tabs are visible
- **Migration**: Existing users will see the new unified widget automatically. If you had project subtasks enabled, relationships widget will be enabled by default
- **Bases file change**: The command mapping changed from \`'project-subtasks': 'TaskNotes/Views/project-subtasks.base'\` to \`'relationships': 'TaskNotes/Views/relationships.base'\`
- Run "Create Default Files" in Settings > General to create the new \`relationships.base\` file
`});var Lke,Oke=y(()=>{Lke=`# TaskNotes 4.0.0-beta.1
> **Beta Release**
>
> You may encounter issues. Report problems on [GitHub Issues](https://github.com/callumalpass/tasknotes/issues).
## Added
- Added context menus for time entries and ICS events in calendar
- Time entries: Right-click shows task context menu, left-click opens time entry editor modal
- ICS/Google/Microsoft Calendar events: Right-click shows ICS event context menu with options to show details, create task/note, link note, and copy info
- Added calendar icon to ICS event titles for better visual distinction
- Added hover tooltips for timeblocks in calendar views
- Added **MiniCalendar view** for Bases integration
- Monthly calendar grid with dot indicators on days with notes
- Configurable date property (file.ctime, note.dateCreated, etc.)
- Fuzzy selector modal for selecting notes on clicked days
- Ctrl+click (or Cmd+click on Mac) on any day opens/creates daily note
- Added virtual scrolling and lazy rendering to Bases views for high-performance handling of large datasets
- TaskListView: Virtual scrolling for 100+ tasks in flat and grouped views with collapsible groups
- KanbanView: Virtual scrolling for regular columns (30+ tasks) and swimlane cells (30+ tasks per cell)
- Tested with up to **30,000 notes** with no performance degradation
- Thanks to @aubreyz and @turingexmachina for their reports of performance issues and diagnosis help
## Changed
- Refactored Bases integration to use public API and trust pre-sorted data
- Migrated all three views (Task List, Kanban, Calendar) to clean class-based architecture
- Removed legacy view files and ~500 lines of redundant sorting/grouping logic
- Introduced BasesDataAdapter, PropertyMappingService, and BasesViewBase abstractions
- Trusts Bases plugin to provide pre-sorted and pre-grouped data via public API
- Reduced code duplication by 40% while maintaining full feature parity
- Refactored calendar modules to use ES6 imports instead of lazy require() calls
- Removed all dynamic require() calls from calendar-core.ts and calendar-view.ts
- Consolidated all imports at module top level
- Improves code maintainability, makes dependencies explicit, and follows modern TypeScript best practices
- Time entry events now show task context menu on right-click (previously had no context menu)
- Replaced MinimalNativeCache with just-in-time TaskManager for improved reliability
- Removed complex index synchronization in favor of direct MetadataCache queries
- Eliminated 7 internal indexes (tasksByDate, tasksByStatus, overdueTasks, etc.)
- Added minimal DependencyCache for task dependencies and project references only
- Zero startup time (no index building required)
- Always provides fresh, accurate task data from Obsidian's MetadataCache
- Completed internationalization with 100% translation coverage across all supported languages
- Added 90 missing translation keys to English base
- Completed 829 translations across 6 languages (German, Spanish, French, Japanese, Russian, Chinese)
- All locales now have complete coverage (1745/1745 keys)
- Improved translation quality for migration system, calendar settings, statistics, ICS events, and filter components
- Migrated to i18n-state-manager CLI tool for translation management
- Replaced custom scripts with more robust i18n-state-manager package
- Added i18n-state.config.json for project-specific patterns
- New features: find-unused, check-duplicates, improved stale detection
- Hash-based state tracking and ripgrep-based scanning for performance
- Bases view templates now generate dynamically based on user settings
- Task filters adapt to user's task identification method (tag or property)
- Property ordering reflects defaultVisibleProperties setting
- Uses correct YAML object notation for Bases filters
- Maintains backward compatibility with legacy static templates
- Updated Bases CalendarView to show TaskNotes in property-based events
- Tasks can now be visualized on calendar via any date property (dateCreated, scheduled, due, etc.)
- Previously all TaskNotes were filtered out from property-based events
## Fixed
- (#1022, #684) Fixed tasks randomly disappearing when Smart Connections plugin is enabled
- Eliminated race condition caused by index synchronization delays
- TaskManager now reads directly from Obsidian's MetadataCache instead of maintaining separate indexes
- No more timing-sensitive code that could conflict with other plugins' metadata processing
- Tasks will always be visible regardless of other plugins' processing times
- Thanks to @alejandrospoz, @seepage87, @amarjt, @luckb0x, camara-tech for reporting and help debugging.
- (#992) Fixed "Failed to resolve module specifier 'obsidian'" error when moving recurring task instances in calendar
- Removed unnecessary dynamic imports that were causing module resolution failures
- Consolidated imports at top of calendar-core.ts module
- Thanks to @jalooc for reporting this issue
- Fixed task dependencies not displaying on task cards
- TaskManager now properly calculates isBlocked and isBlocking flags from dependency data
- Added missing property extractors and renderers in TaskCard for all dependency-related fields
- Dependency information now shows correctly in Bases views, task note widgets, and other views
- Shows "Blocked (n)" and "Blocking (n)" pills, plus detailed task links
- Fixed Bases property mapping for user-configured field names
- PropertyMappingService now correctly strips prefixes and applies FieldMapper transformations
- Example: User configures "state" → "status", Bases provides "note.state", now correctly maps to "status"
- Ensures TaskCard properly recognizes and renders user-configured properties
- Fixed Bases views not respecting user-configured visible properties
- Now prioritizes Bases 1.10.0+ public API config.getOrder() method
- Removed reliance on internal API paths that no longer work
- Filters out blocked/blocking properties when using defaults (only shown when explicitly requested via blockedBy)
- Fixed MiniCalendar UTC anchoring for consistent timezone-independent date handling
- Fixed DateValue conversion in BasesDataAdapter
- DateValue objects have {date: Date, time: boolean} structure
- Now properly checks for value.date instanceof Date before legacy conversion methods
- Fixes property-based events in CalendarView
`});var zke,Bke=y(()=>{zke=`# TaskNotes 4.0.0-beta.0
> **Beta Release**
>
> You may encounter issues. Report problems on [GitHub Issues](https://github.com/callumalpass/tasknotes/issues).
## What's New in v4
TaskNotes v4 migrates all views to the Bases system.
### Breaking Changes
- **Minimum Obsidian version: 1.10.1**
- **View commands now use Bases files** - Ribbon icons and command palette commands (Calendar, Kanban, Tasks, Agenda, Project Subtasks) now open \`.base\` files created automatically in your vault
- **Saved filter views** - Custom saved views can be converted to \`.base\` files using a conversion button in settings
## Added
### OAuth Calendar Integration
- Google Calendar and Microsoft Outlook integration via OAuth 2.0
- View and sync calendar events in Bases calendar
- Drag events in the TaskNotes bases calendar to change the event's time online
- Events sync every 15 minutes or upon local change
- Requires creating your own OAuth application (approximately 15 minutes)
- See [Calendar Setup Guide](https://tasknotes.dev/calendar-setup)
### Time Entry Editor Modal
- Dedicated interface for managing time entries
- Alt-drag on Bases calendar to create time entries
- View total tracked time per task
- Edit and delete time entries
- Access via Task Action Palette (Alt/Opt + Enter)
### Kanban Swimlane Layout
- Horizontal swimlane grouping option for Bases Kanban
- Group tasks by status, priority, or other fields
- Hide empty columns
- Configurable column widths
- Improved drag-and-drop in swimlane mode
### Saved View Converter
- Conversion button in settings to convert saved filter views to \`.base\` files
- Original settings preserved
- Converted views created in \`TaskNotes/Views/\`
## Changed
### View System Architecture
- All views now use Bases architecture
- Calendar, Kanban, Tasks, Agenda, and Project Subtasks are \`.base\` files
- Views stored in \`TaskNotes/Views/\`
- Keyboard shortcuts and ribbon icons map to \`.base\` files
- Configure file paths in Settings → Integrations → Bases Integration
### Calendar
- Control which calendar sources display
- Toggle Google Calendar, Microsoft Calendar, and ICS events independently
- Configurable list view with custom day count (2-10 days)
- Improved timezone handling for recurring events
### Settings
- Reorganized settings tabs
- OAuth calendar settings in Integrations tab
- Updated help text
## Fixed
- (#843) Fixed task tag being added when "Identify tasks by" is set to "Property"
- TaskCreationModal, TaskEditModal, and InstantTaskConvertService now respect taskIdentificationMethod setting
- Thanks to @jack2game
- Fixed dark mode calendar borders
- Fixed Bases Kanban column ordering - Thanks to @mweichert
- Fixed state management bug in FilterSettingsComponent
- Fixed timezone handling for recurring events
## Migration Guide
### First Launch
1. Default view files are created automatically in \`TaskNotes/Views/\`
2. Ribbon and command palette commands now open \`.base\` files
3. Review Settings → General to customize view file paths
### Converting Saved Filter Views
1. Go to Settings → General
2. Click the conversion button to convert saved filter views to \`.base\` files
3. Converted views appear in a file in \`TaskNotes/Views/\`
### Calendar Integration (Optional)
1. Go to Settings → Integrations → OAuth Calendar Integration
2. Follow the [Calendar Setup Guide](https://tasknotes.dev/calendar-setup)
3. Create OAuth applications with Google and/or Microsoft (approximately 15 minutes)
4. Enter Client ID and Secret in calendar cards
5. Click Connect
## Known Limitations
- Quick OAuth setup is disabled - only advanced setup (your own credentials) is available
- Saved filter views require manual conversion using the button in settings
- Migration is one-way - downgrading to v3 may require manual reconfiguration
- OAuth setup requires creating applications with Google/Microsoft
## Feedback
Report issues on [GitHub](https://github.com/callumalpass/tasknotes/issues). Include:
- Obsidian version
- Steps to reproduce
- Console errors (Ctrl/Cmd + Shift + I)
- Whether issue occurs after migration or fresh install
`});var jke,$ke,Uke=y(()=>{Kye();Qye();Xye();tve();nve();ive();ove();cve();uve();mve();hve();yve();kve();bve();Sve();xve();Dve();Ave();Ive();Rve();Fve();Ove();Bve();$ve();Hve();Wve();Gve();Kve();Qve();Xve();tke();nke();ike();oke();cke();uke();mke();hke();yke();kke();bke();Ske();xke();Dke();Ake();Ike();Rke();Fke();Oke();Bke();jke="4.13.5",$ke=[{version:"4.13.5",content:Yye,date:"2026-09-24T07:11:25+10:00",isCurrent:!0},{version:"4.13.4",content:Zye,date:"2026-09-22T09:10:49+10:00",isCurrent:!1},{version:"4.13.3",content:Jye,date:"2026-09-21T20:07:07+10:00",isCurrent:!1},{version:"4.13.2",content:eve,date:"2026-09-19T15:31:36+10:00",isCurrent:!1},{version:"4.13.1",content:rve,date:"2026-09-15T20:58:32+10:00",isCurrent:!1},{version:"4.13.0",content:ave,date:"2026-09-13T21:51:00+10:00",isCurrent:!1},{version:"4.12.5",content:sve,date:"2026-08-26T12:59:44+10:00",isCurrent:!1},{version:"4.12.4",content:lve,date:"2026-08-24T00:23:43+10:00",isCurrent:!1},{version:"4.12.3",content:dve,date:"2026-08-10T08:08:05+10:00",isCurrent:!1},{version:"4.12.2",content:pve,date:"2026-08-09T15:41:43+10:00",isCurrent:!1},{version:"4.12.1",content:fve,date:"2026-08-08T13:02:07+10:00",isCurrent:!1},{version:"4.12.0",content:gve,date:"2026-08-07T18:42:18+10:00",isCurrent:!1},{version:"4.11.1",content:vve,date:"2026-06-26T08:38:30+10:00",isCurrent:!1},{version:"4.11.0",content:Tve,date:"2026-06-10T08:09:52+10:00",isCurrent:!1},{version:"4.10.2",content:wve,date:"2026-06-05T22:52:07+10:00",isCurrent:!1},{version:"4.10.1",content:Cve,date:"2026-06-05T10:16:05+10:00",isCurrent:!1},{version:"4.10.0",content:Eve,date:"2026-06-01T21:50:12+10:00",isCurrent:!1},{version:"4.9.2",content:Pve,date:"2026-05-30T05:43:04+10:00",isCurrent:!1},{version:"4.9.1",content:Mve,date:"2026-05-26T18:40:45+10:00",isCurrent:!1},{version:"4.9.0",content:Nve,date:"2026-05-24T09:35:31+10:00",isCurrent:!1},{version:"4.8.1",content:_ve,date:"2026-05-20T17:46:40+10:00",isCurrent:!1},{version:"4.8.0",content:Lve,date:"2026-05-19T18:47:44+10:00",isCurrent:!1},{version:"4.7.2",content:zve,date:"2026-05-14T22:13:36+10:00",isCurrent:!1},{version:"4.7.1",content:jve,date:"2026-05-14T08:02:31+10:00",isCurrent:!1},{version:"4.7.0",content:Uve,date:"2026-05-14T06:40:12+10:00",isCurrent:!1},{version:"4.6.0",content:Vve,date:"2026-05-13T08:24:23+10:00",isCurrent:!1},{version:"4.5.3",content:qve,date:"2026-04-30T22:32:11+10:00",isCurrent:!1},{version:"4.5.2",content:Yve,date:"2026-04-26T20:11:43+10:00",isCurrent:!1},{version:"4.5.1",content:Zve,date:"2026-03-31T20:39:11+11:00",isCurrent:!1},{version:"4.5.0",content:Jve,date:"2026-03-31T08:48:09+11:00",isCurrent:!1},{version:"4.4.0",content:eke,date:"2026-02-17T21:53:32+11:00",isCurrent:!1},{version:"4.3.3",content:rke,date:"2026-02-15T15:09:21+11:00",isCurrent:!1},{version:"4.3.2",content:ake,date:"2026-02-08T19:22:37+11:00",isCurrent:!1},{version:"4.3.1",content:ske,date:"2026-02-08T14:06:51+11:00",isCurrent:!1},{version:"4.3.0",content:lke,date:"2026-01-07T20:31:36+11:00",isCurrent:!1},{version:"4.2.1",content:dke,date:"2026-01-04T11:51:59+11:00",isCurrent:!1},{version:"4.2.0",content:pke,date:"2026-01-02T08:38:48+11:00",isCurrent:!1},{version:"4.1.3",content:fke,date:"2025-12-08T21:28:48+11:00",isCurrent:!1},{version:"4.1.2",content:gke,date:"2025-12-07T16:22:44+11:00",isCurrent:!1},{version:"4.1.1",content:vke,date:"2025-12-01T21:44:07+11:00",isCurrent:!1},{version:"4.1.0",content:Tke,date:"2025-11-30T18:58:10+11:00",isCurrent:!1},{version:"4.0.5",content:wke,date:"2025-11-23T20:27:09+11:00",isCurrent:!1},{version:"4.0.4",content:Cke,date:"2025-11-20T23:38:28+11:00",isCurrent:!1},{version:"4.0.3",content:Eke,date:"2025-11-20T08:16:00+11:00",isCurrent:!1},{version:"4.0.2",content:Pke,date:"2025-11-19T21:50:00+11:00",isCurrent:!1},{version:"4.0.1",content:Mke,date:"2025-11-18T22:29:23+11:00",isCurrent:!1},{version:"4.0.0-beta.3",content:Nke,date:"2025-11-17T07:51:37+11:00",isCurrent:!1},{version:"4.0.0-beta.2",content:_ke,date:"2025-11-09T20:36:35+11:00",isCurrent:!1},{version:"4.0.0-beta.1",content:Lke,date:"2025-11-04T20:05:28+11:00",isCurrent:!1},{version:"4.0.0-beta.0",content:zke,date:"2025-10-30T00:02:44+11:00",isCurrent:!1}]});function IW(n){try{return decodeURIComponent(n)}catch(e){return n}}function Vke(n){let e=n.trim();return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1).trim():e}function xR(n){var a;if(!n)return"";let e=IW(Vke(n));return((a=e.split(/[#!^]/)[0])!=null?a:e).replace(/^\/+/,"").replace(/\.md$/i,"").trim()}function NW(n){return n?IW(n).trim().replace(/^[#^]+/,"").trim():""}function Hke(n){var r;let e=xR(n),t=e.split("/").filter(Boolean);return(r=t[t.length-1])!=null?r:e}function aE(n){if(!n)return;let e=IW(Vke(n)),t=e.search(/[#^]/);if(t!==-1)return NW(e.slice(t))||void 0}function Dc(n,e){let t=NW(e);if(!t)return;let r=n==null?void 0:n.trim();return r?`${r} > ${t}`:t}function RW(n,e,t,r){let a=xR(n)||NW(n);if(!a||!e)return!1;let i=xR(e),s=xR(t),o=new Set([i,Hke(i)]);s&&(o.add(s),o.add(Hke(s)));let l=aE(t);if(l){o.add(l);let c=Dc(r,l);c&&o.add(c)}return o.has(a)}function Dk(n,e,t){let r=n==null?void 0:n.trim();if(r&&!RW(r,e,t))return r}var ER=y(()=>{});var _W={};Xe(_W,{TaskLinkDetectionService:()=>iE});var Ah,iE,DR=y(()=>{Ah=require("obsidian");q();ER();iE=class{constructor(e,t){this.linkCache=new Map;this.plugin=e,this.logger=t!=null?t:M({tag:"TaskLinkDetectionService",isDebugEnabled:()=>e.settings.enableDebugLogging})}async detectTaskLink(e,t,r="wikilink"){let a=r==="wikilink"?this.parseWikilink(e):this.parseMarkdownLink(e);if(!a)return{isValidTaskLink:!1};let{linkPath:i,displayText:s}=a,o=`${t}:${i}`,l=this.linkCache.get(o);if(l){let p=this.plugin.app.vault.getAbstractFileByPath(i);if(p instanceof Ah.TFile&&p.stat.mtime===l.lastModified)return l.result}let c=this.resolveLinkPath(i,t);if(!c){let p={isValidTaskLink:!1};return this.cacheResult(o,p,0),p}let d=this.plugin.app.vault.getAbstractFileByPath(c);if(!(d instanceof Ah.TFile)){let p={isValidTaskLink:!1};return this.cacheResult(o,p,0),p}try{let p=await this.plugin.cacheManager.getTaskInfo(c);if(p){let m=this.resolveDisplayText(a,r,p,i,s),f={isValidTaskLink:!0,taskPath:c,taskInfo:p,displayText:m};return this.cacheResult(o,f,d.stat.mtime),f}}catch(p){this.logger.debug("Error checking task info for link",{category:"stale-data",operation:"detect-task-link",details:{resolvedPath:c},error:p})}let u={isValidTaskLink:!1};return this.cacheResult(o,u,d.stat.mtime),u}resolveDisplayText(e,t,r,a,i){return t==="markdown"?i?Dk(i,r.path,a):Dc(r.title,e.subpath):e.hasExplicitAlias?i:Dc(r.title,e.subpath)}parseWikilink(e){let t=e.slice(2,-2).trim();if(!t)return null;let r=t.indexOf("|");if(r!==-1){let i=t.slice(0,r).trim(),s=t.slice(r+1).trim();if(!i||!s)return null;let o=(0,Ah.parseLinktext)(i);return{linkPath:o.path,displayText:s,subpath:o.subpath||void 0,hasExplicitAlias:!0}}let a=(0,Ah.parseLinktext)(t);return{linkPath:a.path,subpath:a.subpath||void 0,hasExplicitAlias:!1}}parseMarkdownLink(e){let t=e.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!t)return null;let r=t[1].trim(),a=t[2].trim();if(a.startsWith("<")&&a.endsWith(">")&&(a=a.slice(1,-1).trim()),!a)return null;try{a=decodeURIComponent(a)}catch(s){this.logger.debug("Failed to decode URI component",{category:"validation",operation:"parse-markdown-link",details:{linkPath:a},error:s})}let i=(0,Ah.parseLinktext)(a);return{linkPath:i.path,displayText:r||void 0,subpath:i.subpath||void 0,hasExplicitAlias:!!r}}resolveLinkPath(e,t){try{let r=this.plugin.app.metadataCache.getFirstLinkpathDest(e,t);return(r==null?void 0:r.path)||null}catch(r){return this.logger.debug("Error resolving link path",{category:"provider",operation:"resolve-link-path",details:{linkPath:e,sourcePath:t},error:r}),null}}cacheResult(e,t,r){if(this.linkCache.set(e,{result:t,lastModified:r}),this.linkCache.size>1e3){let a=this.linkCache.keys().next().value;this.linkCache.delete(a)}}clearCacheForFile(e){for(let[t]of this.linkCache)t.includes(e)&&this.linkCache.delete(t)}clearCache(){this.linkCache.clear()}findWikilinks(e){let t=[],r=/\[\[([^\]]+)\]\]/g,a;for(;(a=r.exec(e))!==null;)t.push({match:a[0],start:a.index,end:a.index+a[0].length,type:"wikilink"});let i=/\[([^\]]*)\]\(([^)]+)\)/g;for(r.lastIndex=0;(a=i.exec(e))!==null;)t.push({match:a[0],start:a.index,end:a.index+a[0].length,type:"markdown"});return t.sort((s,o)=>s.start-o.start)}cleanup(){this.linkCache.clear()}}});var Wke,Mh,FW=y(()=>{Wke=require("@codemirror/view");PR();Ua();Yl();xe();Mh=class n extends Wke.WidgetType{constructor(t,r,a,i,s=Br(new Date),o){super();this.subpath=o;this.taskInfo=t,this.plugin=r,this.originalText=a,this.displayText=i,this.targetDate=s,this.targetDateKey=ae(s)}toDOM(t){let r=this.plugin.settings.inlineVisibleProperties||["status","priority","due","scheduled","recurrence"],a=di(r,this.plugin),i=activeWindow.createSpan();i.className="tasknotes-plugin tasknotes-inline-widget",i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-inline-cccfa456"),i.classList.add("tn-static-vertical-align-baseline-657d9c46"),i.addEventListener("pointerdown",o=>{o.stopPropagation()}),i.addEventListener("mousedown",o=>{o.stopPropagation(),o.button===0&&o.preventDefault()}),i.addEventListener("mouseup",o=>{o.stopPropagation()});let s=pr(this.taskInfo,this.plugin,a,{layout:"inline",targetDate:this.targetDate,displayText:this.displayText,navigationSubpath:this.subpath});return i.appendChild(s),s.dataset.originalText=this.originalText,s.addEventListener("tasknotes:task-updated",()=>{window.setTimeout(()=>{t&&typeof t.dispatch=="function"&&Qp(t,this.taskInfo.path)},50)}),i}eq(t){return t instanceof n?this.taskInfo.path===t.taskInfo.path&&this.taskInfo.status===t.taskInfo.status&&this.taskInfo.title===t.taskInfo.title&&this.taskInfo.priority===t.taskInfo.priority&&this.taskInfo.archived===t.taskInfo.archived&&this.taskInfo.due===t.taskInfo.due&&this.taskInfo.scheduled===t.taskInfo.scheduled&&this.taskInfo.recurrence===t.taskInfo.recurrence&&this.displayText===t.displayText&&this.subpath===t.subpath&&this.originalText===t.originalText&&this.targetDateKey===t.targetDateKey&&JSON.stringify(this.taskInfo.complete_instances)===JSON.stringify(t.taskInfo.complete_instances)&&JSON.stringify(this.taskInfo.skipped_instances)===JSON.stringify(t.taskInfo.skipped_instances)&&this.taskInfo.dateModified===t.taskInfo.dateModified:!1}ignoreEvent(t){return t.type==="mousedown"||t.type==="click"}get estimatedHeight(){return-1}get block(){return!1}}});function mGe(n){return Pc.ViewPlugin.fromClass(class{constructor(e){this.eventListeners=[];this.activeWidgets=new Map;this.lastKnownTasks=new Map;this.view=e,this.decorations=this.buildDecorations(e),this.setupEventListeners()}destroy(){this.eventListeners.forEach(e=>{n.emitter.offref(e)}),this.eventListeners=[],this.activeWidgets.clear(),this.lastKnownTasks.clear()}setupEventListeners(){let e=n.emitter.on(Ra,()=>{this.refreshDecorations()}),t=n.emitter.on(rt,()=>{this.refreshDecorations()}),r=n.emitter.on(Di,s=>{s!=null&&s.path&&this.lastKnownTasks.delete(s.path),this.refreshDecorations()}),a=n.emitter.on(Ou,()=>{this.lastKnownTasks.clear(),this.refreshDecorations()}),i=n.emitter.on("settings-changed",()=>{this.refreshDecorations()});this.eventListeners.push(e,t,r,a,i)}refreshDecorations(){this.view&&typeof this.view.dispatch=="function"&&queueMicrotask(()=>{try{this.activeWidgets.clear(),this.view.dispatch({effects:[AR.of({})]})}catch(e){sE.error("Error dispatching task link update:",{category:"validation",operation:"dispatching-task-link-update",error:e})}})}update(e){var r,a;if(this.view=e.view,!((r=n==null?void 0:n.settings)!=null&&r.enableTaskLinkOverlay)){this.decorations=Pc.Decoration.none;return}try{if(!e.state.field(Vi.editorLivePreviewField)){this.decorations=Pc.Decoration.none;return}}catch(i){this.decorations=Pc.Decoration.none;return}let t=e.transactions.some(i=>i.effects.some(s=>s.is(AR)));if(e.docChanged||e.selectionSet||t){if(t){let i=(a=e.transactions.flatMap(s=>s.effects).find(s=>s.is(AR)))==null?void 0:a.value;if(i!=null&&i.taskPath)for(let[s]of this.activeWidgets.entries())s.includes(i.taskPath)&&this.activeWidgets.delete(s);else this.activeWidgets.clear()}this.decorations=this.buildDecorations(e.view)}}buildDecorations(e){var t,r;try{if(!((t=n==null?void 0:n.settings)!=null&&t.enableTaskLinkOverlay))return Pc.Decoration.none;if(!e.state.field(Vi.editorLivePreviewField))return Pc.Decoration.none;let i=e.state.field(Vi.editorInfoField,!1),s=(r=i==null?void 0:i.file)==null?void 0:r.path;return fGe(e.state,n,this.activeWidgets,s,this.lastKnownTasks)}catch(a){return sE.error("Error building task link decorations:",{category:"persistence",operation:"building-task-link-decorations",error:a}),Pc.Decoration.none}}},{decorations:e=>e.decorations})}function fGe(n,e,t,r,a){var l,c,d;let i=new MR.RangeSetBuilder;if(!n||!e||!t)return i.finish();let s=n.doc;if(!s||!e.app||!e.app.workspace)return i.finish();let o=e.taskLinkDetectionService||new iE(e);if(!r){let u=e.app.workspace.getActiveViewOfType(Vi.MarkdownView);if(!u)return i.finish();r=(l=u.file)==null?void 0:l.path}if(!r||typeof r!="string"||r.length===0)return i.finish();try{let u=s.toString();if(typeof u!="string"||u.length>1e5)return i.finish();let p=(c=n.selection)==null?void 0:c.main.head,m=o.findWikilinks(u);if(!Array.isArray(m))return i.finish();for(let f of m)try{if(!f||typeof f.match!="string"||typeof f.start!="number"||typeof f.end!="number"||f.start<0||f.end<=f.start||f.start>=u.length||f.end>u.length||e.settings.disableOverlayOnAlias&&f.type==="wikilink"&&f.match.includes("|"))continue;let h=f.type==="wikilink"?hGe(f.match):gGe(f.match);if(!h)continue;let{linkPath:g}=h;if(!g||typeof g!="string"||g.trim().length===0)continue;let v=yGe(g,r,e);if(!v)continue;let k=vGe(v,e);if(k)a==null||a.set(v,k);else if(a!=null&&a.has(v)){let T=e.app.vault.getAbstractFileByPath(v),b=T instanceof Vi.TFile?e.app.metadataCache.getFileCache(T):null;!(T instanceof Vi.TFile)||!e.cacheManager.isValidFile(v)||b!=null&&!e.cacheManager.isTaskFile(b.frontmatter)?(a.delete(v),t.clear()):k=(d=a.get(v))!=null?d:null}if(k){if(!k.title||typeof k.title!="string"||p!==void 0&&p>=f.start&&p<f.end)continue;let T=`${v}-${f.start}-${f.end}`,b;f.type==="markdown"?b=h.displayText?Dk(h.displayText,k.path,g):Dc(k.title,h.subpath):h.hasExplicitAlias?b=h.displayText:b=Dc(k.title,h.subpath);let w=new Mh(k,e,f.match,b,void 0,h.subpath),S=t.get(T);(!S||!S.eq(w))&&t.set(T,w);let C=Pc.Decoration.replace({widget:t.get(T),inclusive:!0});i.add(f.start,f.end,C)}}catch(h){continue}}catch(u){sE.error("Error in buildTaskLinkDecorations:",{category:"persistence",operation:"buildtasklinkdecorations",error:u})}return i.finish()}function hGe(n){if(!n||typeof n!="string"||n.length<4||!n.startsWith("[[")||!n.endsWith("]]"))return null;let e=n.slice(2,-2).trim();if(!e||e.length===0||e.length>500)return null;let t=e.indexOf("|");if(t!==-1){let a=e.slice(0,t).trim(),i=e.slice(t+1).trim();if(!a||!i)return null;let s=(0,Vi.parseLinktext)(a);return s.path?{linkPath:s.path,displayText:i,subpath:s.subpath||void 0,hasExplicitAlias:!0}:null}let r=(0,Vi.parseLinktext)(e);return r.path?{linkPath:r.path,subpath:r.subpath||void 0,hasExplicitAlias:!1}:null}function gGe(n){if(!n||typeof n!="string")return null;let e=n.match(/^\[([^\]]*)\]\(([^)]+)\)$/);if(!e)return null;let t=e[1].trim(),r=e[2].trim();if(r.startsWith("<")&&r.endsWith(">")&&(r=r.slice(1,-1).trim()),!r||r.length===0||r.length>500)return null;try{r=decodeURIComponent(r)}catch(i){}let a=(0,Vi.parseLinktext)(r);return a.path?{linkPath:a.path,displayText:t||void 0,subpath:a.subpath||void 0,hasExplicitAlias:!!t}:null}function yGe(n,e,t){if(!n||typeof n!="string"||n.trim().length===0||!e||typeof e!="string"||!t||!t.app||!t.app.metadataCache)return null;try{let r=t.app.metadataCache.getFirstLinkpathDest(n,e);return!r||!r.path||typeof r.path!="string"?null:r.path}catch(r){return null}}function vGe(n,e){if(!n||typeof n!="string"||n.trim().length===0||!e)return null;try{let t=/[<>:"|?*]/,r=n.split("").some(s=>{let o=s.charCodeAt(0);return o<=31||o===127});if(t.test(n)||r)return null;let a=e.cacheManager;if(!a||!a.getCachedTaskInfoSync)return null;let i=a.getCachedTaskInfoSync(n);return i&&typeof i=="object"&&i.title?i:null}catch(t){return null}}function qke(n){return mGe(n)}function Qp(n,e){if(!n||typeof n.dispatch!="function"){sE.warn("Invalid EditorView passed to dispatchTaskUpdate:",{category:"validation",operation:"invalid-editorview-passed-dispatchtaskupdate",details:{value:n}});return}try{n.dispatch({effects:[AR.of({taskPath:e})]})}catch(t){sE.error("Error dispatching task update:",{category:"validation",operation:"dispatching-task-update",error:t})}}var MR,Pc,Vi,sE,AR,PR=y(()=>{MR=require("@codemirror/state"),Pc=require("@codemirror/view"),Vi=require("obsidian");Pr();DR();FW();q();ER();sE=M({tag:"Editor/TaskLinkOverlay"}),AR=MR.StateEffect.define()});var Pk,LW=y(()=>{Pk=class{constructor(){this.states=new WeakMap;this.disposed=!1}schedule(e,t){if(this.disposed)return;let r=this.getState(e);if(r.version+=1,r.running){r.rerun=!0;return}r.running=!0,this.runLoop(e,t)}dispose(){this.disposed=!0}getState(e){let t=this.states.get(e);return t||(t={running:!1,rerun:!1,version:0},this.states.set(e,t)),t}async runLoop(e,t){let r=this.getState(e);try{do{r.rerun=!1;let a=r.version;await t({isCurrent:()=>{var i;return!this.disposed&&((i=this.states.get(e))==null?void 0:i.version)===a}})}while(r.rerun&&!this.disposed)}finally{r.running=!1,r.rerun&&!this.disposed&&(r.running=!0,this.runLoop(e,t))}}}});function Gke(n){return!!(n!=null&&n.closest(".canvas-node-content"))}function Kke(n){if(!n||typeof n!="object")return!1;let e=n;return"parent"in e&&e.parent==null}function OW(n){return!!(n!=null&&n.closest(kGe))}function Ak(n,e=TGe){var t,r,a;if(Gke(n.dom))return!1;if(OW(n.dom))return!0;try{let i=n.state.field(Yke.editorInfoField,!1);return((a=(r=(t=i==null?void 0:i.leaf)==null?void 0:t.view)==null?void 0:r.getMode)==null?void 0:a.call(r))==="preview"||Kke(i==null?void 0:i.leaf)?!0:Gke(i==null?void 0:i.containerEl)?!1:OW(i==null?void 0:i.containerEl)}catch(i){return e.debug("Error checking markdown widget editor context",{category:"provider",operation:"check-editor-context",error:i}),!1}}function Mk(n){var t;if(Kke(n))return!0;let e=(t=n.view)==null?void 0:t.containerEl;return OW(e)}var Yke,kGe,TGe,oE=y(()=>{Yke=require("obsidian");q();kGe=[".blp-inline-edit-root",".internal-embed.markdown-embed",".markdown-embed",".popover.hover-popover"].join(", "),TGe=M({tag:"MarkdownWidgetContext"})});function bGe(n,e){let t=e;for(;t!=null&&t.parentElement&&t.parentElement!==n;)t=t.parentElement;return(t==null?void 0:t.parentElement)===n?t:null}function zW(n){for(let e=0;e<n.children.length;e++){let t=n.children.item(e);if(t!=null&&t.classList.contains("mod-header")&&t.classList.contains("mod-ui"))return t}return null}function wGe(n,e){for(let t=0;t<n.children.length;t++){let r=n.children.item(t);if(r!=null&&r.classList.contains(e))return r}return null}function SGe(n){var a;let e=n.querySelector(".metadata-container");if(e){let i=bGe(n,e);return(a=i==null?void 0:i.nextSibling)!=null?a:null}let t=zW(n);if(t)return t.nextSibling;let r=wGe(n,"markdown-preview-pusher");return r?r.nextSibling:n.firstChild}function Zke(n,e){let t=zW(n);if(!t)return!1;let r=t.querySelector(".metadata-container");return r?(r.insertAdjacentElement("afterend",e),!0):!1}function Qke(n){let e=zW(n);return e!==null&&e.querySelector(".metadata-container")!==null}function Ik(n,e){n.insertBefore(e,SGe(n))}function IR(n,e){let t=n.parentNode;return t?(t.insertBefore(e,n.nextSibling),!0):!1}var NR=y(()=>{});function xGe(n,e){if(typeof n.requestAnimationFrame=="function"){let r=n.requestAnimationFrame(e);return{id:r,cancel:()=>n.cancelAnimationFrame(r)}}let t=n.setTimeout(e,0);return{id:t,cancel:()=>n.clearTimeout(t)}}function Jke(n){var e;return typeof((e=n.performance)==null?void 0:e.now)=="function"?n.performance.now():Date.now()}function Xke(n,e){if(n.nodeType!==Node.ELEMENT_NODE)return!1;let t=n;return t.matches(e)||!!t.querySelector(e)}function EGe(n,e){return[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].some(r=>Xke(r,e)||Xke(r,".markdown-preview-sizer"))}function DGe(n){let e=n.view;return!(e instanceof eTe.MarkdownView)||e.getMode()!=="preview"||Mk(n)?null:e.previewMode.containerEl}function RR(n,e,t,r,a,i,s={}){var h,g;let o=DGe(n);if(!o||r.has(o))return;let l=(h=s.scrollQuietPeriodMs)!=null?h:CGe,c=(g=s.requireHeaderAnchor)!=null?g:!1,d=null,u=Number.NEGATIVE_INFINITY,p=()=>{var v;u=Jke((v=o.ownerDocument.defaultView)!=null?v:window)};o.addEventListener("scroll",p,{capture:!0,passive:!0});let m=()=>{var k;if(d)return;let v=(k=o.ownerDocument.defaultView)!=null?k:window;d=xGe(v,()=>{if(d=null,!o.isConnected||!i(n))return;let T=o.querySelector(".markdown-preview-sizer");if(!(!T||T.querySelector(e))&&!(c&&!Qke(T))){if(l>0&&Jke(v)-u<l){m();return}t(n)}})},f=new MutationObserver(v=>{v.some(k=>EGe(k,e))&&m()});f.observe(o,{childList:!0,subtree:!0}),r.add(o),a.push(()=>{d==null||d.cancel(),o.removeEventListener("scroll",p,{capture:!0}),f.disconnect()})}var eTe,CGe,BW=y(()=>{eTe=require("obsidian");oE();NR();CGe=200});function aTe(n){let e=new Set,t=n.previewMode.containerEl.querySelector(".markdown-preview-sizer"),r=n.containerEl.querySelector(".cm-sizer");return t&&e.add(t),r&&e.add(r),Array.from(e).flatMap(a=>Nk(a).filter(i=>i.classList.contains(lE)))}function iTe(n){aTe(n).forEach(e=>{var t;(t=e.component)==null||t.unload(),e.remove()})}function Nk(n){return Array.from(n.children).filter(e=>e.instanceOf(HTMLElement))}function AGe(n,e){var s;let t=n.settings.projectAutosuggest;if(!t)return!1;let r=(s=t.requiredTags)!=null?s:[];if(r.some(o=>!o.trim().startsWith("-"))&&ir.matchesTagConditions(uy(e),r))return!0;let i=cy(t);return i.enabled&&dy(e==null?void 0:e.frontmatter,i)}function _R(n,e,t){var r;return!!((r=n.dependencyCache)!=null&&r.isFileUsedAsProject(e.path)||AGe(n,t))}function MGe(n){var r;let e=n.querySelector(".cm-content");if(e)return(r=e.closest(".cm-contentContainer"))!=null?r:e;let t=Nk(n).filter(a=>!a.classList.contains(lE)&&!a.classList.contains("embedded-backlinks")&&!a.classList.contains("markdown-preview-pusher")&&!a.classList.contains("mod-footer"));return t.length>0?t[t.length-1]:null}function tTe(n){let e=Number.parseFloat(n);return Number.isFinite(e)?e:null}function IGe(n){var i;let t=((i=n.ownerDocument.defaultView)!=null?i:window).getComputedStyle(n),r=tTe(t.marginTop);if(r!==null)return r;let a=tTe(t.fontSize);return a!==null?a*1.5:24}function rTe(n){let e=n.getBoundingClientRect();return e.width<=0&&e.height<=0?null:e.bottom}function NGe(n){let e=rTe(n);return n.querySelectorAll("*").forEach(t=>{let r=rTe(t);r!==null&&(e===null||r>e)&&(e=r)}),e}function RGe(n){let e=null;for(let t of n){let r=NGe(t);r!==null&&(e===null||r>e)&&(e=r)}return e}function sTe(n,e){e.style.removeProperty("--tn-relationships-widget-margin-top");let t=n.querySelector(".cm-content");if(!t)return;let r=RGe(Nk(t)),a=t.closest(".cm-contentContainer");if(r===null||!a)return;let i=Math.max(0,Math.round(a.getBoundingClientRect().bottom-r));if(i>0){let s=IGe(e),o=Math.round(s-i);e.style.setProperty("--tn-relationships-widget-margin-top",`${o}px`)}}function oTe(n,e){let t=MGe(n);t?IR(t,e):n.appendChild(e),sTe(n,e)}async function lTe(n,e){let t=activeWindow.createDiv();t.className=`tasknotes-plugin ${lE}`,t.setAttribute("contenteditable","false"),t.setAttribute("spellcheck","false"),t.setAttribute("data-widget-type","relationships"),t.setAttribute("data-note-path",e);let r=activeWindow.createDiv();r.className="relationships__bases-container",t.appendChild(r);let a=new ba.Component;a.load(),t.component=a;try{let i=n.settings.commandFileMapping.relationships;if(!i){let o=activeWindow.createDiv();return o.className="relationships__error",o.textContent="Relationships view not configured",r.appendChild(o),t}let s=`![[${i}]]`;await ba.MarkdownRenderer.render(n.app,s,r,e,a)}catch(i){Ac.error("[TaskNotes] Error rendering Bases view in relationships widget:",{category:"internal",operation:"rendering-bases-view-relationships-widget",error:i});let s=activeWindow.createDiv();s.className="relationships__error",s.textContent="Failed to load relationships view",r.appendChild(s)}return t}function cTe(n){return nTe.ViewPlugin.fromClass(class extends jW{constructor(e){super(e,n)}destroy(){super.destroy()}})}async function _Ge(n,e,t){var c,d,u;let r=n.view;if(!(r instanceof ba.MarkdownView)||r.getMode()!=="preview"||Mk(n))return;let a=r.file;if(!a||!e.settings.showRelationships)return;let i=!1,s=!1,o=e.app.metadataCache.getFileCache(a);if(o!=null&&o.frontmatter&&(i=e.cacheManager.isTaskFile(o.frontmatter)),s=_R(e,a,o),!i&&!s){try{let p=aTe(r);(p.some(h=>h.dataset.notePath!==a.path)||o!==null)&&p.forEach(h=>{var g;(g=h.component)==null||g.unload(),h.remove()})}catch(p){Ac.debug("[TaskNotes] Error cleaning up relationships widget in reading mode:",{category:"persistence",operation:"cleaning-up-relationships-widget-reading-mode",error:p})}return}let l=null;try{let m=r.previewMode.containerEl;iTe(r);let f=e.settings.relationshipsPosition||"bottom",h=a.path;if(l=await lTe(e,h),t&&!t.isCurrent()){(c=l.component)==null||c.unload(),l.remove();return}let g=m.querySelector(".markdown-preview-sizer");if(!g){(d=l.component)==null||d.unload(),l.remove(),Ac.warn("[TaskNotes] Could not find .markdown-preview-sizer for relationships in reading mode",{category:"stale-data",operation:"find-markdown-preview-sizer-relationships-reading-mode"});return}if(f==="top"){let v=Nk(g).find(k=>k.classList.contains("tasknotes-task-card-note-widget"));v?IR(v,l):Ik(g,l)}else oTe(g,l)}catch(p){(u=l==null?void 0:l.component)==null||u.unload(),l==null||l.remove(),Ac.error("[TaskNotes] Error injecting relationships widget in reading mode:",{category:"persistence",operation:"injecting-relationships-widget-reading-mode",error:p})}}function dTe(n){var S;let e=[],t=[],r=[],a=[],i=new WeakSet,s=new Pk,o=C=>{s.schedule(C,x=>_Ge(C,n,x))},l=C=>{let x=C.view;return n.settings.showRelationships&&x instanceof ba.MarkdownView&&x.getMode()==="preview"&&!!x.file},c=C=>{RR(C,`.${lE}`,o,i,a,l)},d=()=>{n.app.workspace.getLeavesOfType("markdown").forEach(C=>{c(C)})},u=(C,x)=>{var _;let E=C.view;return E instanceof ba.MarkdownView&&(!x||((_=E.file)==null?void 0:_.path)===x.path)},p=C=>{n.app.workspace.getLeavesOfType("markdown").forEach(E=>{u(E,C)&&(o(E),c(E))})},m=null,f=()=>{m&&window.clearTimeout(m),m=window.setTimeout(()=>{n.app.workspace.getLeavesOfType("markdown").forEach(x=>{o(x)}),d()},100)},h=n.app.workspace.on("layout-change",f);e.push(h);let g=n.app.workspace.on("active-leaf-change",C=>{C&&(o(C),c(C))});e.push(g);let v=n.app.workspace.on("file-open",C=>{p(C instanceof ba.TFile?C:null)});e.push(v);let k=new Map,T=n.app.metadataCache.on("changed",C=>{let x=k.get(C.path);x&&window.clearTimeout(x);let E=n.app.workspace.getLeavesOfType("markdown"),_=E.filter(I=>{var R;let A=I.view;return A instanceof ba.MarkdownView&&((R=A.file)==null?void 0:R.path)===C.path&&A.getMode()==="preview"});if(_.length>0){k.delete(C.path),_.forEach(I=>{o(I),c(I)});return}let F=window.setTimeout(()=>{k.delete(C.path),E.forEach(I=>{var R;let A=I.view;A instanceof ba.MarkdownView&&((R=A.file)==null?void 0:R.path)===C.path&&(o(I),c(I))})},500);k.set(C.path,F)});t.push(T);let b=(S=n.dependencyCache)==null?void 0:S.on(bp,f);return b&&r.push(b),n.app.workspace.getLeavesOfType("markdown").forEach(C=>{o(C)}),d(),()=>{s.dispose(),m&&window.clearTimeout(m),k.forEach(C=>window.clearTimeout(C)),k.clear(),a.forEach(C=>C()),e.forEach(C=>n.app.workspace.offref(C)),t.forEach(C=>n.app.metadataCache.offref(C)),r.forEach(C=>{var x;return(x=n.dependencyCache)==null?void 0:x.offref(C)}),n.app.workspace.getLeavesOfType("markdown").forEach(C=>{C.view instanceof ba.MarkdownView&&iTe(C.view)})}}var nTe,ba,Ac,lE,PGe,jW,uTe=y(()=>{nTe=require("@codemirror/view"),ba=require("obsidian");mU();LW();BW();oE();NR();Ad();B0();z0();q();Ac=M({tag:"Editor/RelationshipsDecorations"}),lE="tasknotes-relationships-widget",PGe="task-card-injected";jW=class{constructor(e,t){this.plugin=t;this.currentFile=null;this.currentWidget=null;this.widgetContainer=null;this.debounceTimer=null;this.eventListeners=[];this.dependencyCacheEventListeners=[];this.injectionRunId=0;this.bottomOffsetFrame=null;this.view=e,this.currentFile=this.getFileFromView(e),this.setupEventListeners(),this.debouncedInjectWidget(e)}update(e){this.view=e.view;let t=this.getFileFromView(e.view);t!==this.currentFile?(this.currentFile=t,this.debouncedInjectWidget(e.view)):(e.docChanged||e.geometryChanged||e.viewportChanged)&&this.scheduleBottomOffsetRefresh()}destroy(){this.injectionRunId++,this.debounceTimer&&(window.clearTimeout(this.debounceTimer),this.debounceTimer=null),this.bottomOffsetFrame!==null&&(window.cancelAnimationFrame(this.bottomOffsetFrame),this.bottomOffsetFrame=null),this.removeWidget(),this.eventListeners.forEach(e=>{this.plugin.emitter.offref(e)}),this.eventListeners=[],this.dependencyCacheEventListeners.forEach(e=>{var t;(t=this.plugin.dependencyCache)==null||t.offref(e)}),this.dependencyCacheEventListeners=[]}setupEventListeners(){var a;let e=this.plugin.emitter.on(PGe,()=>{this.debouncedInjectWidget(this.view)});this.eventListeners.push(e);let t=this.plugin.emitter.on("settings-changed",()=>{this.debouncedInjectWidget(this.view)});this.eventListeners.push(t);let r=(a=this.plugin.dependencyCache)==null?void 0:a.on(bp,()=>{this.debouncedInjectWidget(this.view)});r&&this.dependencyCacheEventListeners.push(r)}debouncedInjectWidget(e){this.debounceTimer&&window.clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{this.debounceTimer=null,this.injectWidget(e)},100)}scheduleBottomOffsetRefresh(){!this.currentWidget||!this.widgetContainer||(this.plugin.settings.relationshipsPosition||"bottom")!=="bottom"||(this.bottomOffsetFrame!==null&&window.cancelAnimationFrame(this.bottomOffsetFrame),this.bottomOffsetFrame=window.requestAnimationFrame(()=>{var e,t;this.bottomOffsetFrame=null,(e=this.currentWidget)!=null&&e.isConnected&&((t=this.widgetContainer)!=null&&t.isConnected)&&sTe(this.widgetContainer,this.currentWidget)}))}getFileFromView(e){try{let t=e.state.field(ba.editorInfoField,!1);return(t==null?void 0:t.file)||null}catch(t){return Ac.debug("[TaskNotes] Error getting file from editor view:",{category:"persistence",operation:"getting-file-editor-view",error:t}),null}}isTableCellEditor(e){try{let t=e.dom;if(!t)return!1;if(Ak(e)||t.closest("td, th")||t.closest(".cm-table-widget")||t.closest(".popover.hover-popover")||t.closest(".markdown-embed[data-type='footnote']"))return!0;let o=e.state.field(ba.editorInfoField,!1);if(!(o!=null&&o.file)){let l=t.parentElement,c=0,d=20;for(;l&&l!==activeDocument.body&&c<d;){if(l.tagName==="TABLE"||l.tagName==="TD"||l.tagName==="TH"||l.classList.contains("markdown-rendered")||l.classList.contains("popover")||l.classList.contains("hover-popover")||l.classList.contains("markdown-embed")&&l.getAttribute("data-type")==="footnote")return!0;l=l.parentElement,c++}}return!1}catch(t){return Ac.debug("[TaskNotes] Error detecting table cell editor:",{category:"internal",operation:"detecting-table-cell-editor",error:t}),!1}}removeWidget(){var e;this.bottomOffsetFrame!==null&&(window.cancelAnimationFrame(this.bottomOffsetFrame),this.bottomOffsetFrame=null),this.currentWidget&&((e=this.currentWidget.component)==null||e.unload(),this.currentWidget.remove(),this.currentWidget=null),this.widgetContainer=null}cleanupOrphanedWidgets(e){var t;try{let r=(t=e.dom.closest(".markdown-source-view"))==null?void 0:t.querySelector(".cm-sizer");if(!r){Ac.debug("[TaskNotes] Could not find .cm-sizer for orphan cleanup",{category:"stale-data",operation:"find-cm-sizer-orphan-cleanup"});return}Nk(r).filter(a=>a.classList.contains(lE)).forEach(a=>{var s;(s=a.component)==null||s.unload(),a.remove()}),this.currentWidget=null,this.widgetContainer=null}catch(r){Ac.error("[TaskNotes] Error cleaning up orphaned relationships widgets:",{category:"stale-data",operation:"cleaning-up-orphaned-relationships-widgets",error:r})}}async injectWidget(e){var r,a;let t=++this.injectionRunId;if(this.removeWidget(),!this.isTableCellEditor(e)){this.cleanupOrphanedWidgets(e);try{if(!this.plugin.settings.showRelationships)return;let i=this.currentFile||this.getFileFromView(e);if(!(i instanceof ba.TFile))return;let s=!1,o=!1,l=this.plugin.app.metadataCache.getFileCache(i);if(l!=null&&l.frontmatter?(s=this.plugin.cacheManager.isTaskFile(l.frontmatter),o=_R(this.plugin,i,l)):o=_R(this.plugin,i,l),!s&&!o)return;let c=i.path,d=this.plugin.settings.relationshipsPosition||"bottom",u=(r=e.dom.closest(".markdown-source-view"))==null?void 0:r.querySelector(".cm-sizer");if(!u){Ac.warn("[TaskNotes] Could not find .cm-sizer container for relationships widget",{category:"stale-data",operation:"find-cm-sizer-container-relationships-widget"});return}let p=await lTe(this.plugin,c);if(t!==this.injectionRunId){(a=p.component)==null||a.unload(),p.remove();return}if(this.cleanupOrphanedWidgets(e),this.currentWidget=p,this.widgetContainer=u,d==="top"){let m=Nk(u).find(f=>f.classList.contains("tasknotes-task-card-note-widget"));m?IR(m,p):Ik(u,p)}else oTe(u,p),this.scheduleBottomOffsetRefresh()}catch(i){Ac.error("[TaskNotes] Error injecting relationships widget:",{category:"internal",operation:"injecting-relationships-widget",error:i}),this.removeWidget()}}}}});function HW(n,e){let t=activeWindow.createDiv();t.className=`tasknotes-plugin task-card-note-widget ${Ih}`,t.setAttribute("contenteditable","false"),t.setAttribute("spellcheck","false"),t.setAttribute("data-widget-type","task-card"),t.setAttribute("data-task-path",e.path);let r=new hi.Component;r.load(),t.component=r;let a=n.settings.defaultVisibleProperties?di(n.settings.defaultVisibleProperties,n):void 0,i=pr(e,n,a);return i.classList.add("task-card-note-widget__card"),t.appendChild(i),t}function $W(n){n.querySelectorAll(`.${Ih}`).forEach(e=>{var r;(r=e.component)==null||r.unload(),e.remove()})}function mTe(n){return n.querySelector(".markdown-preview-sizer")}function LGe(n){let e=n,t=n.ownerDocument.defaultView;for(;e;){let r=t==null?void 0:t.getComputedStyle(e);if(e.style.display==="none"||(r==null?void 0:r.display)==="none"||(r==null?void 0:r.visibility)==="hidden")return!0;e=e.parentElement}return!1}function fTe(n,e){if(n.isEditing||e.querySelector(".markdown-source-view, .cm-editor"))return!0;let t=mTe(e);return!!(t&&LGe(t))}function OGe(n,e){let t=Array.from(e.querySelectorAll(`.${Ih}`));if(t.length===0)return!0;let r=t.some(i=>i.parentElement===e),a=t.some(i=>!!i.closest(".markdown-preview-sizer"));return fTe(n,e)?!r:r||!a}function zGe(n){var a;let e=(a=n.view)==null?void 0:a.canvas,t=e==null?void 0:e.nodes,r=t==null?void 0:t.values;return typeof r!="function"?[]:Array.from(r.call(t))}function BGe(n){return typeof n.filePath=="string"&&n.filePath.trim()?n.filePath:typeof n.file=="string"&&n.file.trim()?n.file:n.file instanceof hi.TFile?n.file.path:null}function hTe(n){return pTe.ViewPlugin.fromClass(class extends UW{constructor(e){super(e,n)}destroy(){super.destroy()}})}async function jGe(n,e,t){var s,o;let r=n.view;if(!(r instanceof hi.MarkdownView)||r.getMode()!=="preview"||Mk(n))return;let a=r.file;if(!a||!e.settings.showTaskCardInNote)return;let i=e.cacheManager.getCachedTaskInfoSync(a.path);if(!i){try{let c=r.previewMode.containerEl,u=Array.from(c.querySelectorAll(`.${Ih}`)).some(f=>f.dataset.taskPath!==a.path),p=e.app.metadataCache.getFileCache(a),m=p!==null&&(!p.frontmatter||!e.cacheManager.isTaskFile(p.frontmatter));(u||m)&&$W(c)}catch(l){Mc.debug("[TaskNotes] Error cleaning up task card in reading mode:",{category:"persistence",operation:"cleaning-up-task-card-reading-mode",error:l})}return}try{let c=r.previewMode.containerEl;$W(c);let d=HW(e,i);if(t&&!t.isCurrent()){(s=d.component)==null||s.unload(),d.remove();return}let u=c.querySelector(".markdown-preview-sizer");if(!u){Mc.warn("[TaskNotes] Could not find .markdown-preview-sizer for task card in reading mode",{category:"stale-data",operation:"find-markdown-preview-sizer-task-card-reading-mode"});return}if(!Zke(u,d)){(o=d.component)==null||o.unload(),d.remove();return}}catch(l){Mc.error("[TaskNotes] Error injecting task card widget in reading mode:",{category:"persistence",operation:"injecting-task-card-widget-reading-mode",error:l})}}function gTe(n,e={}){if(n.settings.showTaskCardInNote)for(let t of n.app.workspace.getLeavesOfType("canvas"))for(let r of zGe(t)){let a=BGe(r),i=r.contentEl;if(!a||!i)continue;let s=fTe(r,i),o=i.querySelector(".markdown-source-view, .cm-editor");if(o!=null&&o.querySelector(`.${Ih}`))continue;let l=mTe(i);if(!s&&!l||!e.force&&!OGe(r,i))continue;let c=n.cacheManager.getCachedTaskInfoSync(a);if($W(i),!c)continue;let d=HW(n,c);s?i.insertBefore(d,i.firstChild):l&&Ik(l,d)}}function yTe(n){let e=[],t=[],r=[],a=[],i=[],s=new WeakSet,o=[],l=new WeakSet,c=new Pk,d=A=>{c.schedule(A,R=>jGe(A,n,R))},u=A=>{let R=A.view;return n.settings.showTaskCardInNote&&R instanceof hi.MarkdownView&&R.getMode()==="preview"&&!!R.file},p=A=>{RR(A,`.${Ih}`,d,l,o,u,{requireHeaderAnchor:!0})},m=()=>{n.app.workspace.getLeavesOfType("markdown").forEach(A=>{p(A)})},f=(A,R)=>{var U;let O=A.view;return O instanceof hi.MarkdownView&&(!R||((U=O.file)==null?void 0:U.path)===R.path)},h=A=>{n.app.workspace.getLeavesOfType("markdown").forEach(O=>{f(O,A)&&(d(O),p(O))})},g=null,v=null,k=(A={})=>{v&&window.clearTimeout(v),v=window.setTimeout(()=>{gTe(n,A),v=null},100)},T=()=>{for(let A of n.app.workspace.getLeavesOfType("canvas")){let R=A.view.containerEl;if(!R||s.has(R))continue;let O=new MutationObserver(()=>{k()});O.observe(R,{attributes:!0,attributeFilter:["class","style"],childList:!0,subtree:!0});let U=()=>{k({force:!0})};R.addEventListener("pointerdown",U,!0),R.addEventListener("focusin",U,!0),i.push(()=>{R.removeEventListener("pointerdown",U,!0),R.removeEventListener("focusin",U,!0)}),s.add(R),a.push(O)}},b=()=>{g&&window.clearTimeout(g),g=window.setTimeout(()=>{n.app.workspace.getLeavesOfType("markdown").forEach(R=>{d(R)}),m(),T(),k({force:!0})},100)},w=n.app.workspace.on("layout-change",b);e.push(w);let S=n.app.workspace.on("active-leaf-change",A=>{A&&(d(A),p(A),T(),k())});e.push(S);let C=n.app.workspace.on("file-open",A=>{h(A instanceof hi.TFile?A:null),T(),k({force:!0})});e.push(C);let x=new Map,E=n.app.metadataCache.on("changed",A=>{let R=x.get(A.path);R&&window.clearTimeout(R);let O=n.app.workspace.getLeavesOfType("markdown"),U=O.filter(oe=>{var de;let X=oe.view;return X instanceof hi.MarkdownView&&((de=X.file)==null?void 0:de.path)===A.path&&X.getMode()==="preview"});if(U.length>0){x.delete(A.path),U.forEach(oe=>{d(oe),p(oe)}),k({force:!0});return}let pe=window.setTimeout(()=>{x.delete(A.path),O.forEach(oe=>{var de;let X=oe.view;X instanceof hi.MarkdownView&&((de=X.file)==null?void 0:de.path)===A.path&&(d(oe),p(oe))}),k({force:!0})},500);x.set(A.path,pe)});t.push(E);let _=n.emitter.on(rt,b);r.push(_);let F=n.emitter.on(Ra,b);return r.push(F),n.app.workspace.getLeavesOfType("markdown").forEach(A=>{d(A)}),m(),T(),k({force:!0}),()=>{g&&window.clearTimeout(g),v&&window.clearTimeout(v),x.forEach(A=>window.clearTimeout(A)),x.clear(),c.dispose(),o.forEach(A=>A()),a.forEach(A=>A.disconnect()),i.forEach(A=>A()),e.forEach(A=>n.app.workspace.offref(A)),t.forEach(A=>n.app.metadataCache.offref(A)),r.forEach(A=>n.emitter.offref(A))}}var pTe,hi,Mc,Ih,FGe,UW,vTe=y(()=>{pTe=require("@codemirror/view");Pr();hi=require("obsidian");Ua();Yl();LW();BW();oE();NR();q();Mc=M({tag:"Editor/TaskCardNoteDecorations"}),Ih="tasknotes-task-card-note-widget",FGe="task-card-injected";UW=class{constructor(e,t){this.plugin=t;this.cachedTask=null;this.currentFile=null;this.eventListeners=[];this.currentWidget=null;this.widgetContainer=null;this.debounceTimer=null;this.view=e,this.currentFile=this.getFileFromView(e),this.setupEventListeners(),this.loadTaskForCurrentFile(e)}update(e){this.view=e.view;let t=this.getFileFromView(e.view);t!==this.currentFile&&(this.currentFile=t,this.loadTaskForCurrentFile(e.view))}destroy(){this.debounceTimer&&(window.clearTimeout(this.debounceTimer),this.debounceTimer=null),this.removeWidget(),this.eventListeners.forEach(e=>{this.plugin.emitter.offref(e)}),this.eventListeners=[]}setupEventListeners(){let e=()=>{this.debounceTimer&&window.clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{this.loadTaskForCurrentFile(this.view)},100)},t=this.plugin.emitter.on(Ra,e),r=this.plugin.emitter.on(rt,e),a=this.plugin.emitter.on(Di,e),i=this.plugin.emitter.on(Ou,e),s=this.plugin.emitter.on("settings-changed",e);this.eventListeners.push(t,r,a,i,s)}removeWidget(){var e;this.currentWidget&&((e=this.currentWidget.component)==null||e.unload(),this.currentWidget.remove(),this.currentWidget=null),this.widgetContainer=null}cleanupOrphanedWidgets(e){var t;try{let r=(t=e.dom.closest(".canvas-node-content"))!=null?t:e.dom.closest(".workspace-leaf-content");if(!r){Mc.debug("[TaskNotes] Could not find workspace-leaf-content for orphan cleanup",{category:"stale-data",operation:"find-workspace-leaf-content-orphan-cleanup"});return}r.querySelectorAll(`.${Ih}`).forEach(a=>{var i;a!==this.currentWidget&&((i=a.component)==null||i.unload(),a.remove())})}catch(r){Mc.error("[TaskNotes] Error cleaning up orphaned task card widgets:",{category:"stale-data",operation:"cleaning-up-orphaned-task-card-widgets",error:r})}}loadTaskForCurrentFile(e){var r,a,i,s,o,l,c,d,u,p,m,f,h;let t=this.getFileFromView(e);if(t instanceof hi.TFile)try{let g=this.plugin.cacheManager.getCachedTaskInfoSync(t.path),v=T=>!(T!=null&&T.timeEntries)||T.timeEntries.length===0?!1:!T.timeEntries[T.timeEntries.length-1].endTime;(((r=this.cachedTask)==null?void 0:r.title)!==(g==null?void 0:g.title)||((a=this.cachedTask)==null?void 0:a.status)!==(g==null?void 0:g.status)||((i=this.cachedTask)==null?void 0:i.priority)!==(g==null?void 0:g.priority)||((s=this.cachedTask)==null?void 0:s.due)!==(g==null?void 0:g.due)||((o=this.cachedTask)==null?void 0:o.scheduled)!==(g==null?void 0:g.scheduled)||((l=this.cachedTask)==null?void 0:l.path)!==(g==null?void 0:g.path)||((c=this.cachedTask)==null?void 0:c.archived)!==(g==null?void 0:g.archived)||((d=this.cachedTask)==null?void 0:d.timeEstimate)!==(g==null?void 0:g.timeEstimate)||((u=this.cachedTask)==null?void 0:u.recurrence)!==(g==null?void 0:g.recurrence)||v(this.cachedTask)!==v(g)||JSON.stringify(((p=this.cachedTask)==null?void 0:p.tags)||[])!==JSON.stringify((g==null?void 0:g.tags)||[])||JSON.stringify(((m=this.cachedTask)==null?void 0:m.contexts)||[])!==JSON.stringify((g==null?void 0:g.contexts)||[])||JSON.stringify(((f=this.cachedTask)==null?void 0:f.projects)||[])!==JSON.stringify((g==null?void 0:g.projects)||[])||JSON.stringify(((h=this.cachedTask)==null?void 0:h.complete_instances)||[])!==JSON.stringify((g==null?void 0:g.complete_instances)||[]))&&(this.cachedTask=g,this.injectWidget(e))}catch(g){Mc.error("[TaskNotes] Error loading task for task note:",{category:"persistence",operation:"loading-task-task-note",error:g})}else this.cachedTask!==null&&(this.cachedTask=null,this.injectWidget(e))}getFileFromView(e){try{let t=e.state.field(hi.editorInfoField,!1);return(t==null?void 0:t.file)||null}catch(t){return Mc.debug("[TaskNotes] Error getting file from editor view:",{category:"persistence",operation:"getting-file-editor-view",error:t}),null}}isTableCellEditor(e){try{let t=e.dom;if(!t)return!1;if(Ak(e)||t.closest("td, th")||t.closest(".cm-table-widget")||t.closest(".popover.hover-popover")||t.closest(".markdown-embed[data-type='footnote']"))return!0;let o=e.state.field(hi.editorInfoField,!1);if(!(o!=null&&o.file)){let l=t.parentElement,c=0,d=20;for(;l&&l!==activeDocument.body&&c<d;){if(l.tagName==="TABLE"||l.tagName==="TD"||l.tagName==="TH"||l.classList.contains("markdown-rendered")||l.classList.contains("popover")||l.classList.contains("hover-popover")||l.classList.contains("markdown-embed")&&l.getAttribute("data-type")==="footnote")return!0;l=l.parentElement,c++}}return!1}catch(t){return Mc.debug("[TaskNotes] Error detecting table cell editor:",{category:"persistence",operation:"detecting-table-cell-editor",error:t}),!1}}injectWidget(e){var t;if(this.removeWidget(),this.isTableCellEditor(e)){e.dom.closest(".canvas-node-content")&&window.setTimeout(()=>{gTe(this.plugin,{force:!0})},0);return}this.cleanupOrphanedWidgets(e);try{if(!this.plugin.settings.showTaskCardInNote||!this.cachedTask)return;let r=(t=e.dom.closest(".markdown-source-view"))==null?void 0:t.querySelector(".cm-sizer");if(!r){Mc.warn("[TaskNotes] Could not find .cm-sizer container for task card widget",{category:"stale-data",operation:"find-cm-sizer-container-task-card-widget"});return}let a=HW(this.plugin,this.cachedTask);this.currentWidget=a,this.widgetContainer=r,Ik(r,a),this.plugin.emitter.trigger(FGe,{container:r})}catch(r){Mc.error("[TaskNotes] Error injecting task card widget:",{category:"persistence",operation:"injecting-task-card-widget",error:r}),this.removeWidget()}}}});function $Ge(n){try{return decodeURIComponent(n)}catch(e){return n}}function cE(n){let e=$Ge(n).trim();if(!e)return"";if(e.startsWith("app://"))try{e=new URL(e).pathname}catch(t){}return e=e.replace(/^\/+/,""),e=e.split("#")[0].trim(),e.endsWith(".md")&&(e=e.slice(0,-3)),e}function kTe(n){var r;let e=cE(n),t=e.split("/");return(r=t[t.length-1])!=null?r:e}function UGe(n,e){let t=cE(n),r=cE(e);return!t||!r?!1:t===r?!0:kTe(t)===kTe(r)}function HGe(n){let e=[],t=/!?\[\[([^\]]+)\]\]/g,r;for(;(r=t.exec(n))!==null;){if(r[0].startsWith("!"))continue;let a=r[1].trim();if(!a)continue;let i=a.indexOf("|"),s=i===-1?a:a.slice(0,i),o=cE(s);o&&e.push({target:o,hasAlias:i!==-1,subpath:aE(s)})}return e}function VGe(n,e,t){let r=cE(t);if(!r)return null;let a=()=>{for(let s=e.index;s<n.length;s++){let o=n[s];if(UGe(o.target,r))return e.index=s+1,o}return null},i=a();return i||(e.index>0?(e.index=0,a()):null)}function WGe(n,e){return`${n}\0${e}`}function qGe(){return{index:0}}function YGe(n){var r;if(!n.disableOverlayOnAlias)return!1;if(n.hasExplicitAlias)return!0;let e=n.linkText.trim(),t=Dc(n.taskTitle,(r=n.taskSubpath)!=null?r:aE(n.originalLinkPath));return t&&e===t||RW(e,n.taskPath,n.originalLinkPath,n.taskTitle)?!1:e!==n.originalLinkPath&&e!==n.taskTitle}function KGe(n,e){var t,r,a;try{return(a=(r=(t=n.getSectionInfo)==null?void 0:t.call(n,e))==null?void 0:r.text)!=null?a:""}catch(i){return""}}function TTe(n){return new VW(n).createPostProcessor()}var LR,FR,GGe,VW,bTe=y(()=>{LR=require("obsidian");Pr();FW();q();ER();FR=M({tag:"Editor/ReadingModeTaskLinkProcessor"});GGe=".task-inline-preview--reading-mode[data-task-path]";VW=class{constructor(e){this.sourceLinkCursors=new Map;this.refreshTimer=null;this.pendingRefreshAll=!1;this.pendingRefreshTaskPaths=new Set;this.plugin=e,this.setupEventListeners()}createPostProcessor(){return(e,t)=>{var l,c,d;if(!this.plugin.settings.enableTaskLinkOverlay)return;let r=e.querySelectorAll("a"),a=KGe(t,e),i=HGe(a),s=WGe(t.sourcePath,a),o=(l=this.sourceLinkCursors.get(s))!=null?l:qGe();this.sourceLinkCursors.set(s,o);for(let u of Array.from(r)){let p=u,m=p.getAttribute("href"),f=p.getAttribute("data-href")||m||"",h=i.length>0?VGe(i,o,f):null;p.classList.contains("internal-link")?this.processLink(p,t.sourcePath,"internal",(c=h==null?void 0:h.hasAlias)!=null?c:!1,h==null?void 0:h.subpath):m&&!m.startsWith("http://")&&!m.startsWith("https://")&&!m.includes("://")&&this.processLink(p,t.sourcePath,"external",(d=h==null?void 0:h.hasAlias)!=null?d:!1,h==null?void 0:h.subpath)}}}async processLink(e,t,r,a,i){try{let s=e.getAttribute("href");if(!s)return;let o=s;if(r==="internal"){if(s.startsWith("app://")){let d=new URL(s);o=decodeURIComponent(d.pathname),o.startsWith("/")&&(o=o.substring(1))}}else{if(s.startsWith("http://")||s.startsWith("https://")||s.includes("://"))return;o=s}let l=this.resolveLinkPath(o,t);if(!l)return;let c=this.getTaskInfo(l);if(!c)return;await this.replaceWithTaskWidget(e,c,o,a,i)}catch(s){FR.debug("Error processing link in reading mode:",{category:"persistence",operation:"processing-link-reading-mode",error:s})}}setupEventListeners(){this.plugin.registerEvent(this.plugin.emitter.on(rt,e=>{var t,r,a,i;this.scheduleReadingModeWidgetRefresh((i=(r=e==null?void 0:e.path)!=null?r:(t=e==null?void 0:e.updatedTask)==null?void 0:t.path)!=null?i:(a=e==null?void 0:e.task)==null?void 0:a.path)})),this.plugin.registerEvent(this.plugin.emitter.on(Di,e=>{this.scheduleReadingModeWidgetRefresh(e==null?void 0:e.path)})),this.plugin.registerEvent(this.plugin.emitter.on(Ra,()=>{this.scheduleReadingModeWidgetRefresh()})),this.plugin.registerEvent(this.plugin.emitter.on(Ou,()=>{this.scheduleReadingModeWidgetRefresh()})),this.plugin.registerEvent(this.plugin.emitter.on("settings-changed",()=>{this.scheduleReadingModeWidgetRefresh()})),this.plugin.register(()=>{this.refreshTimer!==null&&(window.clearTimeout(this.refreshTimer),this.refreshTimer=null)})}scheduleReadingModeWidgetRefresh(e){e?this.pendingRefreshAll||this.pendingRefreshTaskPaths.add(e):(this.pendingRefreshAll=!0,this.pendingRefreshTaskPaths.clear()),this.refreshTimer!==null&&window.clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout(()=>{this.refreshTimer=null;let t=this.pendingRefreshAll?void 0:new Set(this.pendingRefreshTaskPaths);this.pendingRefreshAll=!1,this.pendingRefreshTaskPaths.clear(),this.refreshReadingModeWidgets(t)},100)}refreshReadingModeWidgets(e){let t=this.getReadingModeContainers();if(t.length!==0)for(let r of t){let a=Array.from(r.querySelectorAll(GGe));for(let i of a){let s=i.dataset.taskPath;if(!s||e&&!e.has(s))continue;if(!this.plugin.settings.enableTaskLinkOverlay){this.replaceWidgetWithOriginalLink(i);continue}let o=this.getTaskInfo(s);if(!o){this.replaceWidgetWithOriginalLink(i);continue}let l=i.dataset.originalLinkPath||o.path,c=i.dataset.originalText||o.title,d=i.dataset.displayText||void 0,u=new Mh(o,this.plugin,c,d,void 0,(0,LR.parseLinktext)(l).subpath||void 0),p=this.createReadingModeWidget(u,o,l,c,d);i.replaceWith(p)}}}getReadingModeContainers(){var r,a,i,s,o;let e=(i=(a=(r=this.plugin.app.workspace).getLeavesOfType)==null?void 0:a.call(r,"markdown"))!=null?i:[],t=[];for(let l of e){let c=l.view;if(typeof c.getMode=="function"&&c.getMode()!=="preview")continue;let d=(o=(s=c.previewMode)==null?void 0:s.containerEl)!=null?o:c.containerEl;d&&t.push(d)}return t}replaceWidgetWithOriginalLink(e){let t=e.dataset.originalLinkPath;if(!t){e.remove();return}let r=activeWindow.createEl("a");r.className="internal-link",r.setAttribute("href",t),r.setAttribute("data-href",t),r.textContent=e.dataset.originalText||t,e.replaceWith(r)}resolveLinkPath(e,t){try{let r=this.plugin.app.metadataCache.getFirstLinkpathDest((0,LR.parseLinktext)(e).path,t);return(r==null?void 0:r.path)||null}catch(r){return FR.debug("Error resolving link path:",{category:"persistence",operation:"resolving-link-path",details:{value:e},error:r}),null}}getTaskInfo(e){try{if(!e||typeof e!="string"||e.trim().length===0)return null;let t=this.plugin.cacheManager;if(!t||!t.getCachedTaskInfoSync)return null;let r=t.getCachedTaskInfoSync(e);return r&&typeof r=="object"&&r.title?r:null}catch(t){return FR.debug("Error getting task info for:",{category:"persistence",operation:"getting-task-info",details:{value:e},error:t}),null}}async replaceWithTaskWidget(e,t,r,a,i){var s;try{let o=e.textContent||`[[${r}]]`,l=Dc(t.title,i!=null?i:aE(r));if(YGe({disableOverlayOnAlias:this.plugin.settings.disableOverlayOnAlias,hasExplicitAlias:a,linkText:e.textContent||"",originalLinkPath:r,taskSubpath:i,taskPath:t.path,taskTitle:t.title}))return;let c,d=e.textContent||"";a?c=d.trim()||void 0:l?c=l:d!==r&&d!==t.title&&(c=Dk(d,t.path,r));let u=new Mh(t,this.plugin,o,c,void 0,(0,LR.parseLinktext)(r).subpath||void 0),p=this.createReadingModeWidget(u,t,r,o,c);(s=e.parentNode)==null||s.replaceChild(p,e)}catch(o){FR.error("Error replacing wikilink with task widget:",{category:"persistence",operation:"replacing-wikilink-task-widget",error:o})}}createReadingModeWidget(e,t,r,a,i){let s={},o=e.toDOM(s);return o.classList.add("task-inline-preview--reading-mode"),o.dataset.taskPath=t.path,o.dataset.originalLinkPath=r,o.dataset.originalText=a,i&&(o.dataset.displayText=i),o}}});function JGe(n,e,t){let r;switch(n){case"P":e&&e==="-"?t.isNegative=!0:t.isNegative=!1;break;case"D":r="days";break;case"W":r="weeks";break;case"H":r="hours";break;case"M":r="minutes";break;case"S":r="seconds";break;default:return 0}if(r){if(!e&&e!==0)throw new Error('invalid duration value: Missing number before "'+n+'"');let a=parseInt(e,10);if(pE(a))throw new Error('invalid duration value: Invalid number "'+e+'" before "'+n+'"');t[r]=a}return 1}function lr(n){let e={},t=e.component=[];if(e.stack=[t],lr._eachLine(n,function(r,a){lr._handleContentLine(a,e)}),e.stack.length>1)throw new cu("invalid ical body. component began but did not end");return e=null,t.length==1?t[0]:t}function i5e(n){let e,t,r,a,i;if(!n||n.name!=="vcalendar")return n;for(e=n.getAllSubcomponents(),t=[],r={},i=0;i<e.length;i++)if(e[i].name==="vtimezone"){let s=e[i].getFirstProperty("tzid").getFirstValue();r[s]=e[i]}else t=t.concat(e[i].getAllProperties());for(a={},i=0;i<t.length;i++){let s=t[i].getParameter("tzid");s&&(a[s]=!0)}for(let[s,o]of Object.entries(r))a[s]||n.removeSubcomponent(o);for(let s of Object.keys(a))!r[s]&&WR.has(s)&&n.addSubcomponent(WR.get(s).component);return n}function pE(n){return typeof n=="number"&&isNaN(n)}function qa(n){let e=parseInt(n,10);if(pE(e))throw new Error('Could not extract integer from "'+n+'"');return e}function ou(n,e){if(typeof n!="undefined")return n instanceof e?n:new e(n)}function RTe(n,e,t){for(;(t=n.indexOf(e,t))!==-1;)if(t>0&&n[t-1]==="\\")t+=1;else return t;return-1}function Rh(n,e,t){if(!n.length)return 0;let r=0,a=n.length-1,i,s;for(;r<=a;)if(i=r+Math.floor((a-r)/2),s=t(e,n[i]),s<0)a=i-1;else if(s>0)r=i+1;else break;return s<0?i:s>0?i+1:i}function Fh(n,e){if(!n||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if("clone"in n)return n.clone();if(Array.isArray(n)){let t=[];for(let r=0;r<n.length;r++)t.push(e?Fh(n[r],!0):n[r]);return t}else{let t={};for(let[r,a]of Object.entries(n))e?t[r]=Fh(a,!0):t[r]=a;return t}}function _Te(n){let e="",t=n||"",r=0,a=0;for(;t.length;){let i=t.codePointAt(r);i<128?++a:i<2048?a+=2:i<65536?a+=3:a+=4,a<Yi.foldLength+1?r+=i>65535?2:1:(e+=Yi.newLineChar+" "+t.slice(0,Math.max(0,r)),t=t.slice(Math.max(0,r)),r=a=0)}return e.slice(Yi.newLineChar.length+1)}function Gi(n){switch(typeof n!="string"&&(typeof n=="number"&&(n=parseInt(n)),n=String(n)),n.length){case 0:return"00";case 1:return"0"+n;default:return n}}function la(n){return n<0?Math.ceil(n):Math.floor(n)}function Lh(n,e){for(let t in n){let r=Object.getOwnPropertyDescriptor(n,t);r&&!Object.getOwnPropertyDescriptor(e,t)&&Object.defineProperty(e,t,r)}return e}function Jp(n,e,t,r){let a=r;if(r[0]==="+"&&(a=r.slice(1)),a=qa(a),e!==void 0&&r<e)throw new Error(n+': invalid value "'+r+'" must be > '+e);if(t!==void 0&&r>t)throw new Error(n+': invalid value "'+r+'" must be < '+e);return a}function YW(n,e){return{matches:/.*/,fromICAL:function(r,a){return m5e(r,n,a)},toICAL:function(r,a){let i=e;return a&&(i=new RegExp(i.source+"|"+a,i.flags)),r.replace(i,function(s){switch(s){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case`
`:return"\\n";default:return s}})}}}function p5e(n){switch(n){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return`
`;default:return n}}function m5e(n,e,t){return n.indexOf("\\")===-1?n:(t&&(e=new RegExp(e.source+"|\\\\"+t,e.flags)),n.replace(e,p5e))}function on(n){typeof n[0]=="string"&&(n=[n]);let e=0,t=n.length,r="";for(;e<t;e++)r+=on.component(n[e])+UR;return r}function NTe(n,e){return n[0]>e[0]?1:e[0]>n[0]?-1:0}var HR,ZGe,QGe,Rs,uE,_k,be,Me,XGe,VR,GW,e5e,t5e,r5e,n5e,cu,a5e,Fk,Lk,Kt,mr,gi,WR,s5e,lu,Nh,qi,mE,Rk,o5e,l5e,FTe,c5e,wTe,yl,WW,qW,d5e,u5e,STe,CTe,Zt,fE,qR,OR,zR,BR,Wi,xTe,ETe,DTe,ZW,QW,f5e,zn,h5e,Ns,g5e,y5e,v5e,k5e,T5e,su,PTe,ATe,fr,UR,MTe,b5e,ITe,jR,$R,Xp,_h,em,Ic,tm,w5e,S5e,So,GR,dE,YR,KW,Yi,LTe=y(()=>{HR=class n{constructor(e){z(this,"icaltype","binary");this.value=e}static fromString(e){return new n(e)}decodeValue(){return this._b64_decode(this.value)}setEncodedValue(e){this.value=this._b64_encode(e)}_b64_encode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,a,i,s,o,l,c,d,u=0,p=0,m="",f=[];if(!e)return e;do r=e.charCodeAt(u++),a=e.charCodeAt(u++),i=e.charCodeAt(u++),d=r<<16|a<<8|i,s=d>>18&63,o=d>>12&63,l=d>>6&63,c=d&63,f[p++]=t.charAt(s)+t.charAt(o)+t.charAt(l)+t.charAt(c);while(u<e.length);m=f.join("");let h=e.length%3;return(h?m.slice(0,h-3):m)+"===".slice(h||3)}_b64_decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,a,i,s,o,l,c,d,u=0,p=0,m="",f=[];if(!e)return e;e+="";do s=t.indexOf(e.charAt(u++)),o=t.indexOf(e.charAt(u++)),l=t.indexOf(e.charAt(u++)),c=t.indexOf(e.charAt(u++)),d=s<<18|o<<12|l<<6|c,r=d>>16&255,a=d>>8&255,i=d&255,l==64?f[p++]=String.fromCharCode(r):c==64?f[p++]=String.fromCharCode(r,a):f[p++]=String.fromCharCode(r,a,i);while(u<e.length);return m=f.join(""),m}toString(){return this.value}},ZGe=/([PDWHMTS]{1,1})/,QGe=["weeks","days","hours","minutes","seconds","isNegative"],Rs=class n{constructor(e){z(this,"weeks",0);z(this,"days",0);z(this,"hours",0);z(this,"minutes",0);z(this,"seconds",0);z(this,"isNegative",!1);z(this,"icalclass","icalduration");z(this,"icaltype","duration");this.wrappedJSObject=this,this.fromData(e)}static fromSeconds(e){return new n().fromSeconds(e)}static isValueString(e){return e[0]==="P"||e[1]==="P"}static fromString(e){let t=0,r=Object.create(null),a=0;for(;(t=e.search(ZGe))!==-1;){let i=e[t],s=e.slice(0,Math.max(0,t));e=e.slice(t+1),a+=JGe(i,s,r)}if(a<2)throw new Error('invalid duration value: Not enough duration components in "'+e+'"');return new n(r)}static fromData(e){return new n(e)}clone(){return n.fromData(this)}toSeconds(){let e=this.seconds+60*this.minutes+3600*this.hours+86400*this.days+604800*this.weeks;return this.isNegative?-e:e}fromSeconds(e){let t=Math.abs(e);return this.isNegative=e<0,this.days=la(t/86400),this.days%7==0?(this.weeks=this.days/7,this.days=0):this.weeks=0,t-=(this.days+7*this.weeks)*86400,this.hours=la(t/3600),t-=this.hours*3600,this.minutes=la(t/60),t-=this.minutes*60,this.seconds=t,this}fromData(e){for(let t of QGe)e&&t in e?this[t]=e[t]:this[t]=0}reset(){this.isNegative=!1,this.weeks=0,this.days=0,this.hours=0,this.minutes=0,this.seconds=0}compare(e){let t=this.toSeconds(),r=e.toSeconds();return(t>r)-(t<r)}normalize(){this.fromSeconds(this.toSeconds())}toString(){if(this.toSeconds()==0)return"PT0S";{let e="";this.isNegative&&(e+="-"),e+="P";let t=!1;return this.weeks?this.days||this.hours||this.minutes||this.seconds?e+=this.weeks*7+this.days+"D":(e+=this.weeks+"W",t=!0):this.days&&(e+=this.days+"D"),t||(this.hours||this.minutes||this.seconds)&&(e+="T",this.hours&&(e+=this.hours+"H"),this.minutes&&(e+=this.minutes+"M"),this.seconds&&(e+=this.seconds+"S")),e}}toICALString(){return this.toString()}};uE=class n{constructor(e){z(this,"start",null);z(this,"end",null);z(this,"duration",null);z(this,"icalclass","icalperiod");z(this,"icaltype","period");if(this.wrappedJSObject=this,e&&"start"in e){if(e.start&&!(e.start instanceof Me))throw new TypeError(".start must be an instance of ICAL.Time");this.start=e.start}if(e&&e.end&&e.duration)throw new Error("cannot accept both end and duration");if(e&&"end"in e){if(e.end&&!(e.end instanceof Me))throw new TypeError(".end must be an instance of ICAL.Time");this.end=e.end}if(e&&"duration"in e){if(e.duration&&!(e.duration instanceof Rs))throw new TypeError(".duration must be an instance of ICAL.Duration");this.duration=e.duration}}static fromString(e,t){let r=e.split("/");if(r.length!==2)throw new Error('Invalid string value: "'+e+'" must contain a "/" char.');let a={start:Me.fromDateTimeString(r[0],t)},i=r[1];return Rs.isValueString(i)?a.duration=Rs.fromString(i):a.end=Me.fromDateTimeString(i,t),new n(a)}static fromData(e){return new n(e)}static fromJSON(e,t,r){function a(i,s){return r?Me.fromString(i,s):Me.fromDateTimeString(i,s)}return Rs.isValueString(e[1])?n.fromData({start:a(e[0],t),duration:Rs.fromString(e[1])}):n.fromData({start:a(e[0],t),end:a(e[1],t)})}clone(){return n.fromData({start:this.start?this.start.clone():null,end:this.end?this.end.clone():null,duration:this.duration?this.duration.clone():null})}getDuration(){return this.duration?this.duration:this.end.subtractDate(this.start)}getEnd(){if(this.end)return this.end;{let e=this.start.clone();return e.addDuration(this.duration),e}}compare(e){return e.compare(this.start)<0?1:e.compare(this.getEnd())>0?-1:0}toString(){return this.start+"/"+(this.end||this.duration)}toJSON(){return[this.start.toString(),(this.end||this.duration).toString()]}toICALString(){return this.start.toICALString()+"/"+(this.end||this.duration).toICALString()}},be=class be{constructor(e,t){z(this,"icalclass","icaltime");z(this,"_cachedUnixTime",null);z(this,"zone",null);z(this,"_pendingNormalization",!1);this.wrappedJSObject=this,this._time=Object.create(null),this._time.year=0,this._time.month=1,this._time.day=1,this._time.hour=0,this._time.minute=0,this._time.second=0,this._time.isDate=!1,this.fromData(e,t)}static daysInMonth(e,t){let r=[0,31,28,31,30,31,30,31,31,30,31,30,31],a=30;return e<1||e>12||(a=r[e],e==2&&(a+=be.isLeapYear(t))),a}static isLeapYear(e){return e<=1752?e%4==0:e%4==0&&e%100!=0||e%400==0}static fromDayOfYear(e,t){let r=t,a=e,i=new be;i.auto_normalize=!1;let s=be.isLeapYear(r)?1:0;if(a<1)return r--,s=be.isLeapYear(r)?1:0,a+=be.daysInYearPassedMonth[s][12],be.fromDayOfYear(a,r);if(a>be.daysInYearPassedMonth[s][12])return s=be.isLeapYear(r)?1:0,a-=be.daysInYearPassedMonth[s][12],r++,be.fromDayOfYear(a,r);i.year=r,i.isDate=!0;for(let o=11;o>=0;o--)if(a>be.daysInYearPassedMonth[s][o]){i.month=o+1,i.day=a-be.daysInYearPassedMonth[s][o];break}return i.auto_normalize=!0,i}static fromStringv2(e){return new be({year:parseInt(e.slice(0,4),10),month:parseInt(e.slice(5,7),10),day:parseInt(e.slice(8,10),10),isDate:!0})}static fromDateString(e){return new be({year:qa(e.slice(0,4)),month:qa(e.slice(5,7)),day:qa(e.slice(8,10)),isDate:!0})}static fromDateTimeString(e,t){if(e.length<19)throw new Error('invalid date-time value: "'+e+'"');let r,a;e.slice(-1)==="Z"?r=mr.utcTimezone:t&&(a=t.getParameter("tzid"),t.parent&&(t.parent.name==="standard"||t.parent.name==="daylight"?r=mr.localTimezone:a&&(r=t.parent.getTimeZoneByID(a))));let i={year:qa(e.slice(0,4)),month:qa(e.slice(5,7)),day:qa(e.slice(8,10)),hour:qa(e.slice(11,13)),minute:qa(e.slice(14,16)),second:qa(e.slice(17,19))};return a&&!r&&(i.timezone=a),new be(i,r)}static fromString(e,t){return e.length>10?be.fromDateTimeString(e,t):be.fromDateString(e)}static fromJSDate(e,t){return new be().fromJSDate(e,t)}static now(){return be.fromJSDate(new Date,!1)}static weekOneStarts(e,t){let r=be.fromData({year:e,month:1,day:1,isDate:!0}),a=r.dayOfWeek(),i=t||be.DEFAULT_WEEK_START;return a>be.THURSDAY&&(r.day+=7),i>be.THURSDAY&&(r.day-=7),r.day-=a-i,r}static getDominicalLetter(e){let t="GFEDCBA",r=(e+(e/4|0)+(e/400|0)-(e/100|0)-1)%7;return be.isLeapYear(e)?t[(r+6)%7]+t[r]:t[r]}static get epochTime(){return un(this,_k)||Us(this,_k,be.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"})),un(this,_k)}static _cmp_attr(e,t,r){return e[r]>t[r]?1:e[r]<t[r]?-1:0}get icaltype(){return this.isDate?"date":"date-time"}get year(){return this._getTimeAttr("year")}set year(e){this._setTimeAttr("year",e)}get month(){return this._getTimeAttr("month")}set month(e){this._setTimeAttr("month",e)}get day(){return this._getTimeAttr("day")}set day(e){this._setTimeAttr("day",e)}get hour(){return this._getTimeAttr("hour")}set hour(e){this._setTimeAttr("hour",e)}get minute(){return this._getTimeAttr("minute")}set minute(e){this._setTimeAttr("minute",e)}get second(){return this._getTimeAttr("second")}set second(e){this._setTimeAttr("second",e)}get isDate(){return this._getTimeAttr("isDate")}set isDate(e){this._setTimeAttr("isDate",e)}_getTimeAttr(e){return this._pendingNormalization&&(this._normalize(),this._pendingNormalization=!1),this._time[e]}_setTimeAttr(e,t){e==="isDate"&&t&&!this._time.isDate&&this.adjust(0,0,0,0),this._cachedUnixTime=null,this._pendingNormalization=!0,this._time[e]=t}clone(){return new be(this._time,this.zone)}reset(){this.fromData(be.epochTime),this.zone=mr.utcTimezone}resetTo(e,t,r,a,i,s,o){this.fromData({year:e,month:t,day:r,hour:a,minute:i,second:s,zone:o})}fromJSDate(e,t){return e?t?(this.zone=mr.utcTimezone,this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()):(this.zone=mr.localTimezone,this.year=e.getFullYear(),this.month=e.getMonth()+1,this.day=e.getDate(),this.hour=e.getHours(),this.minute=e.getMinutes(),this.second=e.getSeconds()):this.reset(),this._cachedUnixTime=null,this}fromData(e,t){if(e)for(let[r,a]of Object.entries(e))r!=="icaltype"&&(this[r]=a);if(t&&(this.zone=t),e&&!("isDate"in e)?this.isDate=!("hour"in e):e&&"isDate"in e&&(this.isDate=e.isDate),e&&"timezone"in e){let r=WR.get(e.timezone);this.zone=r||mr.localTimezone}return e&&"zone"in e&&(this.zone=e.zone),this.zone||(this.zone=mr.localTimezone),this._cachedUnixTime=null,this}dayOfWeek(e){let t=e||be.SUNDAY,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+t;if(r in be._dowCache)return be._dowCache[r];let a=this.day,i=this.month+(this.month<3?12:0),s=this.year-(this.month<3?1:0),o=a+s+la((i+1)*26/10)+la(s/4);return o+=la(s/100)*6+la(s/400),o=(o+7-t)%7+1,be._dowCache[r]=o,o}dayOfYear(){let e=be.isLeapYear(this.year)?1:0;return be.daysInYearPassedMonth[e][this.month-1]+this.day}startOfWeek(e){let t=e||be.SUNDAY,r=this.clone();return r.day-=(this.dayOfWeek()+7-t)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r}endOfWeek(e){let t=e||be.SUNDAY,r=this.clone();return r.day+=(7-this.dayOfWeek()+t-be.SUNDAY)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r}startOfMonth(){let e=this.clone();return e.day=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e}endOfMonth(){let e=this.clone();return e.day=be.daysInMonth(e.month,e.year),e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e}startOfYear(){let e=this.clone();return e.day=1,e.month=1,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e}endOfYear(){let e=this.clone();return e.day=31,e.month=12,e.isDate=!0,e.hour=0,e.minute=0,e.second=0,e}startDoyWeek(e){let t=e||be.SUNDAY,r=this.dayOfWeek()-t;return r<0&&(r+=7),this.dayOfYear()-r}getDominicalLetter(){return be.getDominicalLetter(this.year)}nthWeekDay(e,t){let r=be.daysInMonth(this.month,this.year),a,i=t,s=0,o=this.clone();if(i>=0){o.day=1,i!=0&&i--,s=o.day;let l=o.dayOfWeek(),c=e-l;c<0&&(c+=7),s+=c,s-=e,a=e}else{o.day=r;let l=o.dayOfWeek();i++,a=l-e,a<0&&(a+=7),a=r-a}return a+=i*7,s+a}isNthWeekDay(e,t){let r=this.dayOfWeek();return t===0&&r===e||this.nthWeekDay(e,t)===this.day}weekNumber(e){let t=(this.year<<12)+(this.month<<8)+(this.day<<3)+e;if(t in be._wnCache)return be._wnCache[t];let r,a=this.clone();a.isDate=!0;let i=this.year;a.month==12&&a.day>25?(r=be.weekOneStarts(i+1,e),a.compare(r)<0?r=be.weekOneStarts(i,e):i++):(r=be.weekOneStarts(i,e),a.compare(r)<0&&(r=be.weekOneStarts(--i,e)));let s=a.subtractDate(r).toSeconds()/86400,o=la(s/7)+1;return be._wnCache[t]=o,o}addDuration(e){let t=e.isNegative?-1:1,r=this.second,a=this.minute,i=this.hour,s=this.day;r+=t*e.seconds,a+=t*e.minutes,i+=t*e.hours,s+=t*e.days,s+=t*7*e.weeks,this.second=r,this.minute=a,this.hour=i,this.day=s,this._cachedUnixTime=null}subtractDate(e){let t=this.toUnixTime()+this.utcOffset(),r=e.toUnixTime()+e.utcOffset();return Rs.fromSeconds(t-r)}subtractDateTz(e){let t=this.toUnixTime(),r=e.toUnixTime();return Rs.fromSeconds(t-r)}compare(e){if(e instanceof uE)return-1*e.compare(this);{let t=this.toUnixTime(),r=e.toUnixTime();return t>r?1:r>t?-1:0}}compareDateOnlyTz(e,t){let r=this.convertToZone(t),a=e.convertToZone(t),i=0;return(i=be._cmp_attr(r,a,"year"))!=0||(i=be._cmp_attr(r,a,"month"))!=0||(i=be._cmp_attr(r,a,"day"))!=0,i}convertToZone(e){let t=this.clone(),r=this.zone.tzid==e.tzid;return!this.isDate&&!r&&mr.convert_time(t,this.zone,e),t.zone=e,t}utcOffset(){return this.zone==mr.localTimezone||this.zone==mr.utcTimezone?0:this.zone.utcOffset(this)}toICALString(){let e=this.toString();return e.length>10?fr.icalendar.value["date-time"].toICAL(e):fr.icalendar.value.date.toICAL(e)}toString(){let e=this.year+"-"+Gi(this.month)+"-"+Gi(this.day);return this.isDate||(e+="T"+Gi(this.hour)+":"+Gi(this.minute)+":"+Gi(this.second),this.zone===mr.utcTimezone&&(e+="Z")),e}toJSDate(){return this.zone==mr.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(this.toUnixTime()*1e3)}_normalize(){return this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this}adjust(e,t,r,a,i){let s,o,l=0,c=0,d,u,p,m,f,h=i||this._time;if(h.isDate||(d=h.second+a,h.second=d%60,s=la(d/60),h.second<0&&(h.second+=60,s--),u=h.minute+r+s,h.minute=u%60,o=la(u/60),h.minute<0&&(h.minute+=60,o--),p=h.hour+t+o,h.hour=p%24,l=la(p/24),h.hour<0&&(h.hour+=24,l--)),h.month>12?c=la((h.month-1)/12):h.month<1&&(c=la(h.month/12)-1),h.year+=c,h.month-=12*c,m=h.day+e+l,m>0)for(;f=be.daysInMonth(h.month,h.year),!(m<=f);)h.month++,h.month>12&&(h.year++,h.month=1),m-=f;else for(;m<=0;)h.month==1?(h.year--,h.month=12):h.month--,m+=be.daysInMonth(h.month,h.year);return h.day=m,this._cachedUnixTime=null,this}fromUnixTime(e){this.zone=mr.utcTimezone;let t=new Date(e*1e3);this.year=t.getUTCFullYear(),this.month=t.getUTCMonth()+1,this.day=t.getUTCDate(),this._time.isDate?(this.hour=0,this.minute=0,this.second=0):(this.hour=t.getUTCHours(),this.minute=t.getUTCMinutes(),this.second=t.getUTCSeconds()),this._cachedUnixTime=null}toUnixTime(){if(this._cachedUnixTime!==null)return this._cachedUnixTime;let e=this.utcOffset(),t=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-e);return this._cachedUnixTime=t/1e3,this._cachedUnixTime}toJSON(){let e=["year","month","day","hour","minute","second","isDate"],t=Object.create(null),r=0,a=e.length,i;for(;r<a;r++)i=e[r],t[i]=this[i];return this.zone&&(t.timezone=this.zone.tzid),t}};_k=new WeakMap,z(be,"_dowCache",{}),z(be,"_wnCache",{}),z(be,"fromData",function(t,r){return new be().fromData(t,r)}),Al(be,_k,null),z(be,"daysInYearPassedMonth",[[0,31,59,90,120,151,181,212,243,273,304,334,365],[0,31,60,91,121,152,182,213,244,274,305,335,366]]),z(be,"SUNDAY",1),z(be,"MONDAY",2),z(be,"TUESDAY",3),z(be,"WEDNESDAY",4),z(be,"THURSDAY",5),z(be,"FRIDAY",6),z(be,"SATURDAY",7),z(be,"DEFAULT_WEEK_START",2);Me=be,XGe=/[^ \t]/,VR=":",GW=";",e5e="=",t5e="unknown",r5e="text",n5e={"^'":'"',"^n":`
`,"^^":"^"};lr.property=function(n,e){let t={component:[[],[]],designSet:e||fr.defaultSet};return lr._handleContentLine(n,t),t.component[1][0]};lr.component=function(n){return lr(n)};cu=class extends Error{constructor(){super(...arguments);z(this,"name",this.constructor.name)}};lr.ParserError=cu;lr._handleContentLine=function(n,e){let t=n.indexOf(VR),r=n.indexOf(GW),a,i,s,o,l={};r!==-1&&t!==-1&&r>t&&(r=-1);let c;if(r!==-1){if(s=n.slice(0,Math.max(0,r)).toLowerCase(),c=lr._parseParameters(n.slice(Math.max(0,r)),0,e.designSet),c[2]==-1)throw new cu("Invalid parameters in '"+n+"'");l=c[0];let v;if(typeof c[1]=="string"?v=c[1].length:v=c[1].reduce((k,T)=>k+T.length,0),a=v+c[2]+r,(i=n.slice(Math.max(0,a)).indexOf(VR))!==-1)o=n.slice(Math.max(0,a+i+1));else throw new cu("Missing parameter value in '"+n+"'")}else if(t!==-1){if(s=n.slice(0,Math.max(0,t)).toLowerCase(),o=n.slice(Math.max(0,t+1)),s==="begin"){let v=[o.toLowerCase(),[],[]];e.stack.length===1?e.component.push(v):e.component[2].push(v),e.stack.push(e.component),e.component=v,e.designSet||(e.designSet=fr.getDesignSet(e.component[0]));return}else if(s==="end"){e.component=e.stack.pop();return}}else throw new cu('invalid line (no token ";" or ":") "'+n+'"');let d,u=!1,p=!1,m,f,h;e.designSet.propertyGroups&&s.indexOf(".")!==-1?(f=s.split("."),l.group=f[0],h=f[1]):h=s,h in e.designSet.property&&(m=e.designSet.property[h],"multiValue"in m&&(u=m.multiValue),"structuredValue"in m&&(p=m.structuredValue),o&&"detectType"in m&&(d=m.detectType(o))),d||("value"in l?d=l.value.toLowerCase():m?d=m.defaultType:d=t5e),delete l.value;let g;u&&p?(o=lr._parseMultiValue(o,p,d,[],u,e.designSet,p),g=[h,l,d,o]):u?(g=[h,l,d],lr._parseMultiValue(o,u,d,g,null,e.designSet,!1)):p?(o=lr._parseMultiValue(o,p,d,[],null,e.designSet,p),g=[h,l,d,o]):(o=lr._parseValue(o,d,e.designSet,!1),g=[h,l,d,o]),e.component[0]==="vcard"&&e.component[1].length===0&&!(s==="version"&&o==="4.0")&&(e.designSet=fr.getDesignSet("vcard3")),e.component[1].push(g)};lr._parseValue=function(n,e,t,r){return e in t.value&&"fromICAL"in t.value[e]?t.value[e].fromICAL(n,r):n};lr._parseParameters=function(n,e,t){let r=e,a=0,i=e5e,s={},o,l,c,d=-1,u,p,m;for(;a!==!1&&(a=n.indexOf(i,a+1))!==-1;){if(o=n.slice(r+1,a),o.length==0)throw new cu("Empty parameter name in '"+n+"'");if(l=o.toLowerCase(),m=!1,p=!1,l in t.param&&t.param[l].valueType?u=t.param[l].valueType:u=r5e,l in t.param&&(p=t.param[l].multiValue,t.param[l].multiValueSeparateDQuote&&(m=lr._rfc6868Escape('"'+p+'"'))),n[a+1]==='"'){if(d=a+2,a=n.indexOf('"',d),p&&a!=-1){let v=!0;for(;v;)n[a+1]==p&&n[a+2]=='"'?a=n.indexOf('"',a+3):v=!1}if(a===-1)throw new cu('invalid line (no matching double quote) "'+n+'"');c=n.slice(d,a),r=n.indexOf(GW,a);let g=n.indexOf(VR,a);(r===-1||g!==-1&&r>g)&&(a=!1)}else{d=a+1;let g=n.indexOf(GW,d),v=n.indexOf(VR,d);v!==-1&&g>v?(g=v,a=!1):g===-1?(v===-1?g=n.length:g=v,a=!1):(r=g,a=g),c=n.slice(d,g)}let h=c.length;if(c=lr._rfc6868Escape(c),d+=h-c.length,p){let g=m||p;c=lr._parseMultiValue(c,g,u,[],null,t)}else c=lr._parseValue(c,u,t);p&&l in s?Array.isArray(s[l])?s[l].push(c):s[l]=[s[l],c]:s[l]=c}return[s,c,d]};lr._rfc6868Escape=function(n){return n.replace(/\^['n^]/g,function(e){return n5e[e]})};lr._parseMultiValue=function(n,e,t,r,a,i,s){let o=0,l=0,c;if(e.length===0)return n;for(;(o=RTe(n,e,l))!==-1;)c=n.slice(l,o),a?c=lr._parseMultiValue(c,a,t,[],null,i,s):c=lr._parseValue(c,t,i,s),r.push(c),l=o+e.length;return c=n.slice(l),a?c=lr._parseMultiValue(c,a,t,[],null,i,s):c=lr._parseValue(c,t,i,s),r.push(c),r.length==1?r[0]:r};lr._eachLine=function(n,e){let t=n.length,r=n.search(XGe),a=r,i,s,o;do a=n.indexOf(`
`,r)+1,a>1&&n[a-2]==="\r"?o=2:o=1,a===0&&(a=t,o=0),s=n[r],s===" "||s===" "?i+=n.slice(r+1,a-o):(i&&e(null,i),i=n.slice(r,a-o)),r=a;while(a!==t);i=i.trim(),i.length&&e(null,i)};a5e=["tzid","location","tznames","latitude","longitude"],Kt=class Kt{constructor(e){z(this,"tzid","");z(this,"location","");z(this,"tznames","");z(this,"latitude",0);z(this,"longitude",0);z(this,"component",null);z(this,"expandedUntilYear",0);z(this,"icalclass","icaltimezone");this.wrappedJSObject=this,this.fromData(e)}static _compare_change_fn(e,t){return e.year<t.year?-1:e.year>t.year?1:e.month<t.month?-1:e.month>t.month?1:e.day<t.day?-1:e.day>t.day?1:e.hour<t.hour?-1:e.hour>t.hour?1:e.minute<t.minute?-1:e.minute>t.minute?1:e.second<t.second?-1:e.second>t.second?1:0}static convert_time(e,t,r){if(e.isDate||t.tzid==r.tzid||t==Kt.localTimezone||r==Kt.localTimezone)return e.zone=r,e;let a=t.utcOffset(e);return e.adjust(0,0,0,-a),a=r.utcOffset(e),e.adjust(0,0,0,a),null}static fromData(e){return new Kt().fromData(e)}static get utcTimezone(){return un(this,Fk)||Us(this,Fk,Kt.fromData({tzid:"UTC"})),un(this,Fk)}static get localTimezone(){return un(this,Lk)||Us(this,Lk,Kt.fromData({tzid:"floating"})),un(this,Lk)}static adjust_change(e,t,r,a,i){return Me.prototype.adjust.call(e,t,r,a,i,e)}fromData(e){if(this.expandedUntilYear=0,this.changes=[],e instanceof So)this.component=e;else{if(e&&"component"in e)if(typeof e.component=="string"){let t=lr(e.component);this.component=new So(t)}else e.component instanceof So?this.component=e.component:this.component=null;for(let t of a5e)e&&t in e&&(this[t]=e[t])}return this.component instanceof So&&!this.tzid&&(this.tzid=this.component.getFirstPropertyValue("tzid")),this}utcOffset(e){if(this==Kt.utcTimezone||this==Kt.localTimezone||(this._ensureCoverage(e.year),!this.changes.length))return 0;let t={year:e.year,month:e.month,day:e.day,hour:e.hour,minute:e.minute,second:e.second},r=this._findNearbyChange(t),a=-1,i=1;for(;;){let l=Fh(this.changes[r],!0);if(l.utcOffset<l.prevUtcOffset?Kt.adjust_change(l,0,0,0,l.utcOffset):Kt.adjust_change(l,0,0,0,l.prevUtcOffset),Kt._compare_change_fn(t,l)>=0?a=r:i=-1,i==-1&&a!=-1)break;if(r+=i,r<0)return 0;if(r>=this.changes.length)break}let s=this.changes[a];if(s.utcOffset-s.prevUtcOffset<0&&a>0){let l=Fh(s,!0);if(Kt.adjust_change(l,0,0,0,l.prevUtcOffset),Kt._compare_change_fn(t,l)<0){let c=this.changes[a-1],d=!1;s.is_daylight!=d&&c.is_daylight==d&&(s=c)}}return s.utcOffset}_findNearbyChange(e){let t=Rh(this.changes,e,Kt._compare_change_fn);return t>=this.changes.length?this.changes.length-1:t}_ensureCoverage(e){if(Kt._minimumExpansionYear==-1){let r=Me.now();Kt._minimumExpansionYear=r.year}let t=e;if(t<Kt._minimumExpansionYear&&(t=Kt._minimumExpansionYear),t+=Kt.EXTRA_COVERAGE,!this.changes.length||this.expandedUntilYear<e){let r=this.component.getAllSubcomponents(),a=r.length,i=0;for(;i<a;i++)this._expandComponent(r[i],t,this.changes);this.changes.sort(Kt._compare_change_fn),this.expandedUntilYear=t}}_expandComponent(e,t,r){if(!e.hasProperty("dtstart")||!e.hasProperty("tzoffsetto")||!e.hasProperty("tzoffsetfrom"))return null;let a=e.getFirstProperty("dtstart").getFirstValue(),i;function s(l){return l.factor*(l.hours*3600+l.minutes*60)}function o(){let l={};return l.is_daylight=e.name=="daylight",l.utcOffset=s(e.getFirstProperty("tzoffsetto").getFirstValue()),l.prevUtcOffset=s(e.getFirstProperty("tzoffsetfrom").getFirstValue()),l}if(!e.hasProperty("rrule")&&!e.hasProperty("rdate"))i=o(),i.year=a.year,i.month=a.month,i.day=a.day,i.hour=a.hour,i.minute=a.minute,i.second=a.second,Kt.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i);else{let l=e.getAllProperties("rdate");for(let d of l){let u=d.getFirstValue();i=o(),i.year=u.year,i.month=u.month,i.day=u.day,u.isDate?(i.hour=a.hour,i.minute=a.minute,i.second=a.second,a.zone!=Kt.utcTimezone&&Kt.adjust_change(i,0,0,0,-i.prevUtcOffset)):(i.hour=u.hour,i.minute=u.minute,i.second=u.second,u.zone!=Kt.utcTimezone&&Kt.adjust_change(i,0,0,0,-i.prevUtcOffset)),r.push(i)}let c=e.getFirstProperty("rrule");if(c){c=c.getFirstValue(),i=o(),c.until&&c.until.zone==Kt.utcTimezone&&(c.until.adjust(0,0,0,i.prevUtcOffset),c.until.zone=Kt.localTimezone);let d=c.iterator(a),u;for(;(u=d.next())&&(i=o(),!(u.year>t||!u));)i.year=u.year,i.month=u.month,i.day=u.day,i.hour=u.hour,i.minute=u.minute,i.second=u.second,i.isDate=u.isDate,Kt.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i)}}return r}toString(){return this.tznames?this.tznames:this.tzid}};Fk=new WeakMap,Lk=new WeakMap,Al(Kt,Fk,null),Al(Kt,Lk,null),z(Kt,"_minimumExpansionYear",-1),z(Kt,"EXTRA_COVERAGE",5);mr=Kt,gi=null,WR={get count(){return gi===null?0:Object.keys(gi).length},reset:function(){gi=Object.create(null);let n=mr.utcTimezone;gi.Z=n,gi.UTC=n,gi.GMT=n},_hard_reset:function(){gi=null},has:function(n){return gi===null?!1:!!gi[n]},get:function(n){return gi===null&&this.reset(),gi[n]},register:function(n,e){if(gi===null&&this.reset(),typeof n=="string"&&e instanceof mr&&([n,e]=[e,n]),e||(n instanceof mr?e=n.tzid:n.name==="vtimezone"&&(n=new mr(n),e=n.tzid)),!e)throw new TypeError("Neither a timezone nor a name was passed");if(n instanceof mr)gi[e]=n;else throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component")},remove:function(n){return gi===null?null:delete gi[n]}};s5e=Object.freeze({__proto__:null,binsearchInsert:Rh,clone:Fh,extend:Lh,foldline:_Te,formatClassType:ou,isStrictlyNaN:pE,pad2:Gi,strictParseInt:qa,trunc:la,unescapedIndexOf:RTe,updateTimezones:i5e}),lu=class n{constructor(e){z(this,"hours",0);z(this,"minutes",0);z(this,"factor",1);z(this,"icaltype","utc-offset");this.fromData(e)}static fromString(e){let t={};return t.factor=e[0]==="+"?1:-1,t.hours=qa(e.slice(1,3)),t.minutes=qa(e.slice(4,6)),new n(t)}static fromSeconds(e){let t=new n;return t.fromSeconds(e),t}clone(){return n.fromSeconds(this.toSeconds())}fromData(e){if(e)for(let[t,r]of Object.entries(e))this[t]=r;this._normalize()}fromSeconds(e){let t=Math.abs(e);return this.factor=e<0?-1:1,this.hours=la(t/3600),t-=this.hours*3600,this.minutes=la(t/60),this}toSeconds(){return this.factor*(60*this.minutes+3600*this.hours)}compare(e){let t=this.toSeconds(),r=e.toSeconds();return(t>r)-(r>t)}_normalize(){let e=this.toSeconds(),t=this.factor;for(;e<-43200;)e+=97200;for(;e>50400;)e-=97200;this.fromSeconds(e),e==0&&(this.factor=t)}toICALString(){return fr.icalendar.value["utc-offset"].toICAL(this.toString())}toString(){return(this.factor==1?"+":"-")+Gi(this.hours)+":"+Gi(this.minutes)}},Nh=class n extends Me{constructor(t,r,a){super(t,r);z(this,"icalclass","vcardtime");z(this,"icaltype","date-and-or-time");this.icaltype=a||"date-and-or-time"}static fromDateAndOrTimeString(t,r){function a(g,v,k){return g?qa(g.slice(v,v+k)):null}let i=t.split("T"),s=i[0],o=i[1],l=o?fr.vcard.value.time._splitZone(o):[],c=l[0],d=l[1],u=s?s.length:0,p=d?d.length:0,m=s&&s[0]=="-"&&s[1]=="-",f=d&&d[0]=="-",h={year:m?null:a(s,0,4),month:m&&(u==4||u==7)?a(s,2,2):u==7||u==10?a(s,5,2):null,day:u==5?a(s,3,2):u==7&&m?a(s,5,2):u==10?a(s,8,2):null,hour:f?null:a(d,0,2),minute:f&&p==3?a(d,1,2):p>4?f?a(d,1,2):a(d,3,2):null,second:p==4?a(d,2,2):p==6?a(d,4,2):p==8?a(d,6,2):null};return c=="Z"?c=mr.utcTimezone:c&&c[3]==":"?c=lu.fromString(c):c=null,new n(h,c,r)}clone(){return new n(this._time,this.zone,this.icaltype)}_normalize(){return this}utcOffset(){return this.zone instanceof lu?this.zone.toSeconds():Me.prototype.utcOffset.apply(this,arguments)}toICALString(){return fr.vcard.value[this.icaltype].toICAL(this.toString())}toString(){let t=this.year,r=this.month,a=this.day,i=this.hour,s=this.minute,o=this.second,l=t!==null,c=r!==null,d=a!==null,u=i!==null,p=s!==null,m=o!==null,f=(l?Gi(t)+(c||d?"-":""):c||d?"--":"")+(c?Gi(r):"")+(d?"-"+Gi(a):""),h=(u?Gi(i):"-")+(u&&p?":":"")+(p?Gi(s):"")+(!u&&!p?"-":"")+(p&&m?":":"")+(m?Gi(o):""),g;switch(this.zone===mr.utcTimezone?g="Z":this.zone instanceof lu?g=this.zone.toString():this.zone===mr.localTimezone?g="":this.zone instanceof mr?g=lu.fromSeconds(this.zone.utcOffset(this)).toString():g="",this.icaltype){case"time":return h+g;case"date-and-or-time":case"date-time":return f+(h=="--"?"":"T"+h+g);case"date":return f}return null}},qi=class qi{constructor(e){z(this,"completed",!1);z(this,"rule",null);z(this,"dtstart",null);z(this,"last",null);z(this,"occurrence_number",0);z(this,"by_indices",null);z(this,"initialized",!1);z(this,"by_data",null);z(this,"days",null);z(this,"days_index",0);this.fromData(e)}fromData(e){if(this.rule=ou(e.rule,yl),!this.rule)throw new Error("iterator requires a (ICAL.Recur) rule");if(this.dtstart=ou(e.dtstart,Me),!this.dtstart)throw new Error("iterator requires a (ICAL.Time) dtstart");if(e.by_data?this.by_data=e.by_data:this.by_data=Fh(this.rule.parts,!0),e.occurrence_number&&(this.occurrence_number=e.occurrence_number),this.days=e.days||[],e.last&&(this.last=ou(e.last,Me)),this.by_indices=e.by_indices,this.by_indices||(this.by_indices={BYSECOND:0,BYMINUTE:0,BYHOUR:0,BYDAY:0,BYMONTH:0,BYWEEKNO:0,BYMONTHDAY:0}),this.initialized=e.initialized||!1,!this.initialized)try{this.init()}catch(t){if(t instanceof Rk)this.completed=!0;else throw t}}init(){this.initialized=!0,this.last=this.dtstart.clone();let e=this.by_data;if("BYDAY"in e&&this.sort_byday_rules(e.BYDAY),"BYYEARDAY"in e&&("BYMONTH"in e||"BYWEEKNO"in e||"BYMONTHDAY"in e))throw new Error("Invalid BYYEARDAY rule");if("BYWEEKNO"in e&&"BYMONTHDAY"in e)throw new Error("BYWEEKNO does not fit to BYMONTHDAY");if(this.rule.freq=="MONTHLY"&&("BYYEARDAY"in e||"BYWEEKNO"in e))throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear");if(this.rule.freq=="WEEKLY"&&("BYYEARDAY"in e||"BYMONTHDAY"in e))throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear");if(this.rule.freq!="YEARLY"&&"BYYEARDAY"in e)throw new Error("BYYEARDAY may only appear in YEARLY rules");if(this.last.second=this.setup_defaults("BYSECOND","SECONDLY",this.dtstart.second),this.last.minute=this.setup_defaults("BYMINUTE","MINUTELY",this.dtstart.minute),this.last.hour=this.setup_defaults("BYHOUR","HOURLY",this.dtstart.hour),this.last.day=this.setup_defaults("BYMONTHDAY","DAILY",this.dtstart.day),this.last.month=this.setup_defaults("BYMONTH","MONTHLY",this.dtstart.month),this.rule.freq=="WEEKLY")if("BYDAY"in e){let[,t]=this.ruleDayOfWeek(e.BYDAY[0],this.rule.wkst),r=t-this.last.dayOfWeek(this.rule.wkst);(this.last.dayOfWeek(this.rule.wkst)<t&&r>=0||r<0)&&(this.last.day+=r)}else{let t=yl.numericDayToIcalDay(this.dtstart.dayOfWeek());e.BYDAY=[t]}if(this.rule.freq=="YEARLY"){let t=this.rule.until?this.rule.until.year:2e4;for(;this.last.year<=t&&(this.expand_year_days(this.last.year),!(this.days.length>0));)this.increment_year(this.rule.interval);if(this.days.length==0)throw new Rk;if(!this._nextByYearDay()&&!this.next_year()&&!this.next_year()&&!this.next_year())throw new Rk}if(this.rule.freq=="MONTHLY"){if(this.has_by_data("BYDAY")){let t=null,r=this.last.clone(),a=Me.daysInMonth(this.last.month,this.last.year);for(let i of this.by_data.BYDAY){this.last=r.clone();let[s,o]=this.ruleDayOfWeek(i),l=this.last.nthWeekDay(o,s);if(s>=6||s<=-6)throw new Error("Malformed values in BYDAY part");if(l>a||l<=0){if(t&&t.month==r.month)continue;for(;l>a||l<=0;)this.increment_month(),a=Me.daysInMonth(this.last.month,this.last.year),l=this.last.nthWeekDay(o,s)}this.last.day=l,(!t||this.last.compare(t)<0)&&(t=this.last.clone())}if(this.last=t.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>a||this.last.day==0)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")){this.last.day=1;let t=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY).filter(r=>r>=this.last.day);if(t.length)this.last.day=t[0],this.by_data.BYMONTHDAY=t;else if(!this.next_month()&&!this.next_month()&&!this.next_month())throw new Rk}}}next(e=!1){let t=this.last?this.last.clone():null;if((this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)&&(this.completed=!0),this.completed)return null;if(this.occurrence_number==0&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;let r,a=0;do switch(r=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":if(r=this.next_month(),r)a=0;else if(++a==336)return this.completed=!0,null;break;case"YEARLY":if(r=this.next_year(),r)a=0;else if(++a==28)return this.completed=!0,null;break;default:return null}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!r);if(this.last.compare(t)==0){if(e)throw new Error("Same occurrence found twice, protecting you from death by recursion");this.next(!0)}return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)}next_second(){return this.next_generic("BYSECOND","SECONDLY","second","minute")}increment_second(e){return this.increment_generic(e,"second",60,"minute")}next_minute(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")}increment_minute(e){return this.increment_generic(e,"minute",60,"hour")}next_hour(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")}increment_hour(e){this.increment_generic(e,"hour",24,"monthday")}next_day(){let e=this.rule.freq=="DAILY";return this.next_hour()==0||(e?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0}next_week(){let e=0;if(this.next_weekday_by_week()==0)return e;if(this.has_by_data("BYWEEKNO")){this.by_indices.BYWEEKNO++,this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,e=1),this.last.month=1,this.last.day=1;let t=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*t,e&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return e}normalizeByMonthDayRules(e,t,r){let a=Me.daysInMonth(t,e),i=[],s=0,o=r.length,l;for(;s<o;s++){if(l=parseInt(r[s],10),isNaN(l))throw new Error("Invalid BYMONTHDAY value");if(!(Math.abs(l)>a)){if(l<0)l=a+(l+1);else if(l===0)continue;i.indexOf(l)===-1&&i.push(l)}}return i.sort(function(c,d){return c-d})}_byDayAndMonthDay(e){let t,r=this.by_data.BYDAY,a,i=0,s,o=r.length,l=0,c,d=this,u=this.last.day;function p(){for(c=Me.daysInMonth(d.last.month,d.last.year),t=d.normalizeByMonthDayRules(d.last.year,d.last.month,d.by_data.BYMONTHDAY),s=t.length;t[i]<=u&&!(e&&t[i]==u)&&i<s-1;)i++}function m(){u=0,d.increment_month(),i=0,p()}p(),e&&(u-=1);let f=48;for(;!l&&f;){if(f--,a=u+1,a>c){m();continue}let h=t[i++];if(h>=a)u=h;else{m();continue}for(let g=0;g<o;g++){let v=this.ruleDayOfWeek(r[g]),k=v[0],T=v[1];if(this.last.day=u,this.last.isNthWeekDay(T,k)){l=1;break}}if(!l&&i===s){m();continue}}if(f<=0)throw new Error("Malformed values in BYDAY combined with BYMONTHDAY parts");return l}next_month(){let e=1;if(this.next_hour()==0)return e;if(this.has_by_data("BYDAY")&&this.has_by_data("BYMONTHDAY"))e=this._byDayAndMonthDay();else if(this.has_by_data("BYDAY")){let t=Me.daysInMonth(this.last.month,this.last.year),r=0,a=0;if(this.has_by_data("BYSETPOS")){let s=this.last.day;for(let o=1;o<=t;o++)this.last.day=o,this.is_day_in_byday(this.last)&&(a++,o<=s&&r++);this.last.day=s}e=0;let i;for(i=this.last.day+1;i<=t;i++)if(this.last.day=i,this.is_day_in_byday(this.last)&&(!this.has_by_data("BYSETPOS")||this.check_set_position(++r)||this.check_set_position(r-a-1))){e=1;break}i>t&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?(!this.has_by_data("BYSETPOS")||this.check_set_position(1))&&(e=1):e=0)}else if(this.has_by_data("BYMONTHDAY")){if(this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month(),this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length))return 0;let t=Me.daysInMonth(this.last.month,this.last.year),r=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];r<0&&(r=t+r+1),r>t?(this.last.day=1,e=this.is_day_in_byday(this.last)):this.last.day=r}else{this.increment_month();let t=Me.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>t?e=0:this.last.day=this.by_data.BYMONTHDAY[0]}return e}next_weekday_by_week(){let e=0;if(this.next_hour()==0)return e;if(!this.has_by_data("BYDAY"))return 1;for(;;){let t=new Me;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,e=1);let r=this.by_data.BYDAY[this.by_indices.BYDAY],i=this.ruleDayOfWeek(r)[1];i-=this.rule.wkst,i<0&&(i+=7),t.year=this.last.year,t.month=this.last.month,t.day=this.last.day;let s=t.startDoyWeek(this.rule.wkst);if(i+s<1&&!e)continue;let o=Me.fromDayOfYear(s+i,this.last.year);return this.last.year=o.year,this.last.month=o.month,this.last.day=o.day,e}}next_year(){return this.next_hour()==0||(this.days.length==0||++this.days_index==this.days.length)&&(this.days_index=0,this.increment_year(this.rule.interval),this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY)),this.expand_year_days(this.last.year),this.days.length==0)?0:this._nextByYearDay()}_nextByYearDay(){let e=this.days[this.days_index],t=this.last.year;if(Math.abs(e)==366&&!Me.isLeapYear(this.last.year))return 0;e<1&&(e+=1,t+=1);let r=Me.fromDayOfYear(e,t);return this.last.day=r.day,this.last.month=r.month,1}ruleDayOfWeek(e,t){let r=e.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);if(r){let a=parseInt(r[1]||0,10);return e=yl.icalDayToNumericDay(r[2],t),[a,e]}else return[0,0]}next_generic(e,t,r,a,i){let s=e in this.by_data,o=this.rule.freq==t,l=0;if(i&&this[i]()==0)return l;if(s){this.by_indices[e]++;let c=this.by_data[e];this.by_indices[e]==c.length&&(this.by_indices[e]=0,l=1),this.last[r]=c[this.by_indices[e]]}else o&&this["increment_"+r](this.rule.interval);return s&&l&&o&&this["increment_"+a](1),l}increment_monthday(e){for(let t=0;t<e;t++){let r=Me.daysInMonth(this.last.month,this.last.year);this.last.day++,this.last.day>r&&(this.last.day-=r,this.increment_month())}}increment_month(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{this.rule.freq=="MONTHLY"?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;let e=la(this.last.month/12);this.last.month%=12,this.last.month++,e!=0&&this.increment_year(e)}this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY))}increment_year(e){this.last.day=1,this.last.year+=e}increment_generic(e,t,r,a){this.last[t]+=e;let i=la(this.last[t]/r);this.last[t]%=r,i!=0&&this["increment_"+a](i)}has_by_data(e){return e in this.rule.parts}expand_year_days(e){let t=new Me;this.days=[];let r={},a=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(let o of a)o in this.rule.parts&&(r[o]=this.rule.parts[o]);if("BYMONTH"in r&&"BYWEEKNO"in r){let o=1,l={};t.year=e,t.isDate=!0;for(let c=0;c<this.by_data.BYMONTH.length;c++){let d=this.by_data.BYMONTH[c];t.month=d,t.day=1;let u=t.weekNumber(this.rule.wkst);t.day=Me.daysInMonth(d,e);let p=t.weekNumber(this.rule.wkst);for(c=u;c<p;c++)l[c]=1}for(let c=0;c<this.by_data.BYWEEKNO.length&&o;c++)this.by_data.BYWEEKNO[c]<52?o&=l[c]:o=0;o?delete r.BYMONTH:delete r.BYWEEKNO}let i=Object.keys(r).length;if(i==0){let o=this.dtstart.clone();o.year=this.last.year,this.days.push(o.dayOfYear())}else if(i==1&&"BYMONTH"in r)for(let o of this.by_data.BYMONTH){let l=this.dtstart.clone();l.year=e,l.month=o,l.isDate=!0,this.days.push(l.dayOfYear())}else if(i==1&&"BYMONTHDAY"in r)for(let o of this.by_data.BYMONTHDAY){let l=this.dtstart.clone();if(o<0){let c=Me.daysInMonth(l.month,e);o=o+c+1}l.day=o,l.year=e,l.isDate=!0,this.days.push(l.dayOfYear())}else if(i==2&&"BYMONTHDAY"in r&&"BYMONTH"in r)for(let o of this.by_data.BYMONTH){let l=Me.daysInMonth(o,e);for(let c of this.by_data.BYMONTHDAY)c<0&&(c=c+l+1),t.day=c,t.month=o,t.year=e,t.isDate=!0,this.days.push(t.dayOfYear())}else if(!(i==1&&"BYWEEKNO"in r)){if(!(i==2&&"BYWEEKNO"in r&&"BYMONTHDAY"in r)){if(i==1&&"BYDAY"in r)this.days=this.days.concat(this.expand_by_day(e));else if(i==2&&"BYDAY"in r&&"BYMONTH"in r){for(let o of this.by_data.BYMONTH){let l=Me.daysInMonth(o,e);t.year=e,t.month=o,t.day=1,t.isDate=!0;let c=t.dayOfWeek(),d=t.dayOfYear()-1;t.day=l;let u=t.dayOfWeek();if(this.has_by_data("BYSETPOS")){let p=[];for(let m=1;m<=l;m++)t.day=m,this.is_day_in_byday(t)&&p.push(m);for(let m=0;m<p.length;m++)(this.check_set_position(m+1)||this.check_set_position(m-p.length))&&this.days.push(d+p[m])}else for(let p of this.by_data.BYDAY){let m=this.ruleDayOfWeek(p),f=m[0],h=m[1],g,v=(h+7-c)%7+1,k=l-(u+7-h)%7;if(f==0)for(let T=v;T<=l;T+=7)this.days.push(d+T);else f>0?(g=v+(f-1)*7,g<=l&&this.days.push(d+g)):(g=k+(f+1)*7,g>0&&this.days.push(d+g))}}this.days.sort(function(o,l){return o-l})}else if(i==2&&"BYDAY"in r&&"BYMONTHDAY"in r){let o=this.expand_by_day(e);for(let l of o){let c=Me.fromDayOfYear(l,e);this.by_data.BYMONTHDAY.indexOf(c.day)>=0&&this.days.push(l)}}else if(i==3&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){let o=this.expand_by_day(e);for(let l of o){let c=Me.fromDayOfYear(l,e);this.by_data.BYMONTH.indexOf(c.month)>=0&&this.by_data.BYMONTHDAY.indexOf(c.day)>=0&&this.days.push(l)}}else if(i==2&&"BYDAY"in r&&"BYWEEKNO"in r){let o=this.expand_by_day(e);for(let l of o){let d=Me.fromDayOfYear(l,e).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(d)&&this.days.push(l)}}else if(!(i==3&&"BYDAY"in r&&"BYWEEKNO"in r&&"BYMONTHDAY"in r))if(i==1&&"BYYEARDAY"in r)this.days=this.days.concat(this.by_data.BYYEARDAY);else if(i==2&&"BYYEARDAY"in r&&"BYDAY"in r){let o=Me.isLeapYear(e)?366:365,l=new Set(this.expand_by_day(e));for(let c of this.by_data.BYYEARDAY)c<0&&(c+=o+1),l.has(c)&&this.days.push(c)}else this.days=[]}}let s=Me.isLeapYear(e)?366:365;return this.days.sort((o,l)=>(o<0&&(o+=s+1),l<0&&(l+=s+1),o-l)),0}expand_by_day(e){let t=[],r=this.last.clone();r.year=e,r.month=1,r.day=1,r.isDate=!0;let a=r.dayOfWeek();r.month=12,r.day=31,r.isDate=!0;let i=r.dayOfWeek(),s=r.dayOfYear();for(let o of this.by_data.BYDAY){let l=this.ruleDayOfWeek(o),c=l[0],d=l[1];if(c==0){let u=(d+7-a)%7+1;for(let p=u;p<=s;p+=7)t.push(p)}else if(c>0){let u;d>=a?u=d-a+1:u=d-a+8,t.push(u+(c-1)*7)}else{let u;c=-c,d<=i?u=s-i+d:u=s-i+d-7,t.push(u-(c-1)*7)}}return t}is_day_in_byday(e){if(this.by_data.BYDAY)for(let t of this.by_data.BYDAY){let r=this.ruleDayOfWeek(t),a=r[0],i=r[1],s=e.dayOfWeek();if(a==0&&i==s||e.nthWeekDay(i,a)==e.day)return 1}return 0}check_set_position(e){return this.has_by_data("BYSETPOS")?this.by_data.BYSETPOS.indexOf(e)!==-1:!1}sort_byday_rules(e){for(let t=0;t<e.length;t++)for(let r=0;r<t;r++){let a=this.ruleDayOfWeek(e[r],this.rule.wkst)[1],i=this.ruleDayOfWeek(e[t],this.rule.wkst)[1];if(a>i){let s=e[t];e[t]=e[r],e[r]=s}}}check_contract_restriction(e,t){let r=qi._indexMap[e],a=qi._expandMap[this.rule.freq][r],i=!1;if(e in this.by_data&&a==qi.CONTRACT){let s=this.by_data[e];for(let o of s)if(o==t){i=!0;break}}else i=!0;return i}check_contracting_rules(){let e=this.last.dayOfWeek(),t=this.last.weekNumber(this.rule.wkst),r=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",yl.numericDayToIcalDay(e))&&this.check_contract_restriction("BYWEEKNO",t)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",r)}setup_defaults(e,t,r){let a=qi._indexMap[e];return qi._expandMap[this.rule.freq][a]!=qi.CONTRACT&&(e in this.by_data||(this.by_data[e]=[r]),this.rule.freq!=t)?this.by_data[e][0]:r}toJSON(){let e=Object.create(null);return e.initialized=this.initialized,e.rule=this.rule.toJSON(),e.dtstart=this.dtstart.toJSON(),e.by_data=this.by_data,e.days=this.days,e.last=this.last.toJSON(),e.by_indices=this.by_indices,e.occurrence_number=this.occurrence_number,e}};z(qi,"_indexMap",{BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8}),z(qi,"_expandMap",{SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]}),z(qi,"UNKNOWN",0),z(qi,"CONTRACT",1),z(qi,"EXPAND",2),z(qi,"ILLEGAL",3);mE=qi,Rk=class extends Error{constructor(){super("Recurrence rule has no valid occurrences")}},o5e=/^(SU|MO|TU|WE|TH|FR|SA)$/,l5e=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,FTe={SU:Me.SUNDAY,MO:Me.MONDAY,TU:Me.TUESDAY,WE:Me.WEDNESDAY,TH:Me.THURSDAY,FR:Me.FRIDAY,SA:Me.SATURDAY},c5e=Object.fromEntries(Object.entries(FTe).map(n=>n.reverse())),wTe=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"],yl=class n{constructor(e){z(this,"parts",null);z(this,"interval",1);z(this,"wkst",Me.MONDAY);z(this,"until",null);z(this,"count",null);z(this,"freq",null);z(this,"icalclass","icalrecur");z(this,"icaltype","recur");this.wrappedJSObject=this,this.parts={},e&&typeof e=="object"&&this.fromData(e)}static fromString(e){let t=this._stringToData(e,!1);return new n(t)}static fromData(e){return new n(e)}static _stringToData(e,t){let r=Object.create(null),a=e.split(";"),i=a.length;for(let s=0;s<i;s++){let o=a[s].split("="),l=o[0].toUpperCase(),c=o[0].toLowerCase(),d=t?c:l,u=o[1];if(l in qW){let p=u.split(","),m=new Set;for(let f of p)m.add(qW[l](f));p=[...m],r[d]=p.length==1?p[0]:p}else l in WW?WW[l](u,r,t):r[c]=u}return r}static icalDayToNumericDay(e,t){let r=t||Me.SUNDAY;return(FTe[e]-r+7)%7+1}static numericDayToIcalDay(e,t){let r=t||Me.SUNDAY,a=e+r-Me.SUNDAY;return a>7&&(a-=7),c5e[a]}iterator(e){return new mE({rule:this,dtstart:e})}clone(){return new n(this.toJSON())}isFinite(){return!!(this.count||this.until)}isByCount(){return!!(this.count&&!this.until)}addComponent(e,t){let r=e.toUpperCase();r in this.parts?this.parts[r].push(t):this.parts[r]=[t]}setComponent(e,t){this.parts[e.toUpperCase()]=t.slice()}getComponent(e){let t=e.toUpperCase();return t in this.parts?this.parts[t].slice():[]}getNextOccurrence(e,t){let r=this.iterator(e),a;do a=r.next();while(a&&a.compare(t)<=0);return a&&t.zone&&(a.zone=t.zone),a}fromData(e){for(let t in e){let r=t.toUpperCase();r in qW?Array.isArray(e[t])?this.parts[r]=e[t]:this.parts[r]=[e[t]]:this[t]=e[t]}this.interval&&typeof this.interval!="number"&&WW.INTERVAL(this.interval,this),this.wkst&&typeof this.wkst!="number"&&(this.wkst=n.icalDayToNumericDay(this.wkst)),this.until&&!(this.until instanceof Me)&&(this.until=Me.fromString(this.until))}toJSON(){let e=Object.create(null);e.freq=this.freq,this.count&&(e.count=this.count),this.interval>1&&(e.interval=this.interval);for(let[t,r]of Object.entries(this.parts))Array.isArray(r)&&r.length==1?e[t.toLowerCase()]=r[0]:e[t.toLowerCase()]=Fh(r);return this.until&&(e.until=this.until.toString()),"wkst"in this&&this.wkst!==Me.DEFAULT_WEEK_START&&(e.wkst=n.numericDayToIcalDay(this.wkst)),e}toString(){let e="FREQ="+this.freq;this.count&&(e+=";COUNT="+this.count),this.interval>1&&(e+=";INTERVAL="+this.interval);for(let[t,r]of Object.entries(this.parts))e+=";"+t+"="+r;return this.until&&(e+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==Me.DEFAULT_WEEK_START&&(e+=";WKST="+n.numericDayToIcalDay(this.wkst)),e}};WW={FREQ:function(n,e,t){if(wTe.indexOf(n)!==-1)e.freq=n;else throw new Error('invalid frequency "'+n+'" expected: "'+wTe.join(", ")+'"')},COUNT:function(n,e,t){e.count=qa(n)},INTERVAL:function(n,e,t){e.interval=qa(n),e.interval<1&&(e.interval=1)},UNTIL:function(n,e,t){n.length>10?e.until=fr.icalendar.value["date-time"].fromICAL(n):e.until=fr.icalendar.value.date.fromICAL(n),t||(e.until=Me.fromString(e.until))},WKST:function(n,e,t){if(o5e.test(n))e.wkst=yl.icalDayToNumericDay(n);else throw new Error('invalid WKST value "'+n+'"')}},qW={BYSECOND:Jp.bind(void 0,"BYSECOND",0,60),BYMINUTE:Jp.bind(void 0,"BYMINUTE",0,59),BYHOUR:Jp.bind(void 0,"BYHOUR",0,23),BYDAY:function(n){if(l5e.test(n))return n;throw new Error('invalid BYDAY value "'+n+'"')},BYMONTHDAY:Jp.bind(void 0,"BYMONTHDAY",-31,31),BYYEARDAY:Jp.bind(void 0,"BYYEARDAY",-366,366),BYWEEKNO:Jp.bind(void 0,"BYWEEKNO",-53,53),BYMONTH:Jp.bind(void 0,"BYMONTH",1,12),BYSETPOS:Jp.bind(void 0,"BYSETPOS",-366,366)},d5e=/\\\\|\\;|\\,|\\[Nn]/g,u5e=/\\|;|,|\n/g,STe=/\\\\|\\,|\\[Nn]/g,CTe=/\\|,|\n/g;Zt={defaultType:"text"},fE={defaultType:"text",multiValue:","},qR={defaultType:"text",structuredValue:";"},OR={defaultType:"integer"},zR={defaultType:"date-time",allowedTypes:["date-time","date"]},BR={defaultType:"date-time"},Wi={defaultType:"uri"},xTe={defaultType:"utc-offset"},ETe={defaultType:"recur"},DTe={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};ZW={categories:fE,url:Wi,version:Zt,uid:Zt},QW={boolean:{values:["TRUE","FALSE"],fromICAL:function(n){switch(n){case"TRUE":return!0;case"FALSE":return!1;default:return!1}},toICAL:function(n){return n?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(n){let e=parseFloat(n);return pE(e)?0:e},toICAL:function(n){return String(n)}},integer:{fromICAL:function(n){let e=parseInt(n);return pE(e)?0:e},toICAL:function(n){return String(n)}},"utc-offset":{toICAL:function(n){return n.length<7?n.slice(0,3)+n.slice(4,6):n.slice(0,3)+n.slice(4,6)+n.slice(7,9)},fromICAL:function(n){return n.length<6?n.slice(0,3)+":"+n.slice(3,5):n.slice(0,3)+":"+n.slice(3,5)+":"+n.slice(5,7)},decorate:function(n){return lu.fromString(n)},undecorate:function(n){return n.toString()}}},f5e={cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}},zn=Lh(QW,{text:YW(d5e,u5e),uri:{},binary:{decorate:function(n){return HR.fromString(n)},undecorate:function(n){return n.toString()}},"cal-address":{},date:{decorate:function(n,e){return fr.strict?Me.fromDateString(n,e):Me.fromString(n,e)},undecorate:function(n){return n.toString()},fromICAL:function(n){return!fr.strict&&n.length>=15?zn["date-time"].fromICAL(n):n.slice(0,4)+"-"+n.slice(4,6)+"-"+n.slice(6,8)},toICAL:function(n){let e=n.length;return e==10?n.slice(0,4)+n.slice(5,7)+n.slice(8,10):e>=19?zn["date-time"].toICAL(n):n}},"date-time":{fromICAL:function(n){if(!fr.strict&&n.length==8)return zn.date.fromICAL(n);{let e=n.slice(0,4)+"-"+n.slice(4,6)+"-"+n.slice(6,8)+"T"+n.slice(9,11)+":"+n.slice(11,13)+":"+n.slice(13,15);return n[15]&&n[15]==="Z"&&(e+="Z"),e}},toICAL:function(n){let e=n.length;if(e==10&&!fr.strict)return zn.date.toICAL(n);if(e>=19){let t=n.slice(0,4)+n.slice(5,7)+n.slice(8,13)+n.slice(14,16)+n.slice(17,19);return n[19]&&n[19]==="Z"&&(t+="Z"),t}else return n},decorate:function(n,e){return fr.strict?Me.fromDateTimeString(n,e):Me.fromString(n,e)},undecorate:function(n){return n.toString()}},duration:{decorate:function(n){return Rs.fromString(n)},undecorate:function(n){return n.toString()}},period:{fromICAL:function(n){let e=n.split("/");return e[0]=zn["date-time"].fromICAL(e[0]),Rs.isValueString(e[1])||(e[1]=zn["date-time"].fromICAL(e[1])),e},toICAL:function(n){return n=n.slice(),!fr.strict&&n[0].length==10?n[0]=zn.date.toICAL(n[0]):n[0]=zn["date-time"].toICAL(n[0]),Rs.isValueString(n[1])||(!fr.strict&&n[1].length==10?n[1]=zn.date.toICAL(n[1]):n[1]=zn["date-time"].toICAL(n[1])),n.join("/")},decorate:function(n,e){return uE.fromJSON(n,e,!fr.strict)},undecorate:function(n){return n.toJSON()}},recur:{fromICAL:function(n){return yl._stringToData(n,!0)},toICAL:function(n){let e="";for(let[t,r]of Object.entries(n))t=="until"?r.length>10?r=zn["date-time"].toICAL(r):r=zn.date.toICAL(r):t=="wkst"?typeof r=="number"&&(r=yl.numericDayToIcalDay(r)):Array.isArray(r)&&(r=r.join(",")),e+=t.toUpperCase()+"="+r+";";return e.slice(0,Math.max(0,e.length-1))},decorate:function(e){return yl.fromData(e)},undecorate:function(n){return n.toJSON()}},time:{fromICAL:function(n){if(n.length<6)return n;let e=n.slice(0,2)+":"+n.slice(2,4)+":"+n.slice(4,6);return n[6]==="Z"&&(e+="Z"),e},toICAL:function(n){if(n.length<8)return n;let e=n.slice(0,2)+n.slice(3,5)+n.slice(6,8);return n[8]==="Z"&&(e+="Z"),e}}}),h5e=Lh(ZW,{action:Zt,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:Zt,class:Zt,comment:Zt,completed:BR,contact:Zt,created:BR,description:Zt,dtend:zR,dtstamp:BR,dtstart:zR,due:zR,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:ETe,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":BR,location:Zt,method:Zt,organizer:{defaultType:"cal-address"},"percent-complete":OR,priority:OR,prodid:Zt,"related-to":Zt,repeat:OR,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(n){return n.indexOf("/")!==-1?"period":n.indexOf("T")===-1?"date":"date-time"}},"recurrence-id":zR,resources:fE,"request-status":qR,rrule:ETe,sequence:OR,status:Zt,summary:Zt,transp:Zt,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:xTe,tzoffsetto:xTe,tzurl:Wi,tzid:Zt,tzname:Zt}),Ns=Lh(QW,{text:YW(STe,CTe),uri:YW(STe,CTe),date:{decorate:function(n){return Nh.fromDateAndOrTimeString(n,"date")},undecorate:function(n){return n.toString()},fromICAL:function(n){return n.length==8?zn.date.fromICAL(n):n[0]=="-"&&n.length==6?n.slice(0,4)+"-"+n.slice(4):n},toICAL:function(n){return n.length==10?zn.date.toICAL(n):n[0]=="-"&&n.length==7?n.slice(0,4)+n.slice(5):n}},time:{decorate:function(n){return Nh.fromDateAndOrTimeString("T"+n,"time")},undecorate:function(n){return n.toString()},fromICAL:function(n){let e=Ns.time._splitZone(n,!0),t=e[0],r=e[1];return r.length==6?r=r.slice(0,2)+":"+r.slice(2,4)+":"+r.slice(4,6):r.length==4&&r[0]!="-"?r=r.slice(0,2)+":"+r.slice(2,4):r.length==5&&(r=r.slice(0,3)+":"+r.slice(3,5)),t.length==5&&(t[0]=="-"||t[0]=="+")&&(t=t.slice(0,3)+":"+t.slice(3)),r+t},toICAL:function(n){let e=Ns.time._splitZone(n),t=e[0],r=e[1];return r.length==8?r=r.slice(0,2)+r.slice(3,5)+r.slice(6,8):r.length==5&&r[0]!="-"?r=r.slice(0,2)+r.slice(3,5):r.length==6&&(r=r.slice(0,3)+r.slice(4,6)),t.length==6&&(t[0]=="-"||t[0]=="+")&&(t=t.slice(0,3)+t.slice(4)),r+t},_splitZone:function(n,e){let t=n.length-1,r=n.length-(e?5:6),a=n[r],i,s;return n[t]=="Z"?(i=n[t],s=n.slice(0,Math.max(0,t))):n.length>6&&(a=="-"||a=="+")?(i=n.slice(r),s=n.slice(0,Math.max(0,r))):(i="",s=n),[i,s]}},"date-time":{decorate:function(n){return Nh.fromDateAndOrTimeString(n,"date-time")},undecorate:function(n){return n.toString()},fromICAL:function(n){return Ns["date-and-or-time"].fromICAL(n)},toICAL:function(n){return Ns["date-and-or-time"].toICAL(n)}},"date-and-or-time":{decorate:function(n){return Nh.fromDateAndOrTimeString(n,"date-and-or-time")},undecorate:function(n){return n.toString()},fromICAL:function(n){let e=n.split("T");return(e[0]?Ns.date.fromICAL(e[0]):"")+(e[1]?"T"+Ns.time.fromICAL(e[1]):"")},toICAL:function(n){let e=n.split("T");return Ns.date.toICAL(e[0])+(e[1]?"T"+Ns.time.toICAL(e[1]):"")}},timestamp:zn["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/},"phone-number":{fromICAL:function(n){return Array.from(n).filter(function(e){return e==="\\"?void 0:e}).join("")},toICAL:function(n){return Array.from(n).map(function(e){return e===","||e===";"?"\\"+e:e}).join("")}}}),g5e={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},y5e=Lh(ZW,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:DTe,bday:DTe,caladruri:Wi,caluri:Wi,clientpidmap:qR,email:Zt,fburl:Wi,fn:Zt,gender:qR,geo:Wi,impp:Wi,key:Wi,kind:Zt,lang:{defaultType:"language-tag"},logo:Wi,member:Wi,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:fE,note:Zt,org:{defaultType:"text",structuredValue:";"},photo:Wi,related:Wi,rev:{defaultType:"timestamp"},role:Zt,sound:Wi,source:Wi,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:Zt,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:Zt}),v5e=Lh(QW,{binary:zn.binary,date:Ns.date,"date-time":Ns["date-time"],"phone-number":Ns["phone-number"],uri:zn.uri,text:Ns.text,time:zn.time,vcard:zn.text,"utc-offset":{toICAL:function(n){return n.slice(0,7)},fromICAL:function(n){return n.slice(0,7)},decorate:function(n){return lu.fromString(n)},undecorate:function(n){return n.toString()}}}),k5e={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},T5e=Lh(ZW,{fn:Zt,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:fE,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(n){return n.indexOf("T")===-1?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:Zt,tel:{defaultType:"phone-number"},email:Zt,mailer:Zt,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:Zt,role:Zt,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:qR,note:fE,prodid:Zt,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(n){return n.indexOf("T")===-1?"date":"date-time"}},"sort-string":Zt,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:Zt,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),su={name:"ical",value:zn,param:f5e,property:h5e,propertyGroups:!1},PTe={name:"vcard4",value:Ns,param:g5e,property:y5e,propertyGroups:!0},ATe={name:"vcard3",value:v5e,param:k5e,property:T5e,propertyGroups:!0},fr={strict:!0,defaultSet:su,defaultType:"unknown",components:{vcard:PTe,vcard3:ATe,vevent:su,vtodo:su,vjournal:su,valarm:su,vtimezone:su,daylight:su,standard:su},icalendar:su,vcard:PTe,vcard3:ATe,getDesignSet:function(n){return n&&n in fr.components?fr.components[n]:fr.defaultSet}},UR=`\r
`,MTe="unknown",b5e={'"':"^'","\n":"^n","^":"^^"};on.component=function(n,e){let t=n[0].toUpperCase(),r="BEGIN:"+t+UR,a=n[1],i=0,s=a.length,o=n[0];for(o==="vcard"&&n[1].length>0&&!(n[1][0][0]==="version"&&n[1][0][3]==="4.0")&&(o="vcard3"),e=e||fr.getDesignSet(o);i<s;i++)r+=on.property(a[i],e)+UR;let l=n[2]||[],c=0,d=l.length;for(;c<d;c++)r+=on.component(l[c],e)+UR;return r+="END:"+t,r};on.property=function(n,e,t){let r=n[0].toUpperCase(),a=n[0],i=n[1];e||(e=fr.defaultSet);let s=i.group,o;e.propertyGroups&&s?o=s.toUpperCase()+"."+r:o=r;for(let[m,f]of Object.entries(i)){if(e.propertyGroups&&m=="group")continue;let h=e.param[m],g=h&&h.multiValue;g&&Array.isArray(f)?(f=f.map(function(v){return v=on._rfc6868Unescape(v),v=on.paramPropertyValue(v,h.multiValueSeparateDQuote),v}),f=on.multiValue(f,g,"unknown",null,e)):(f=on._rfc6868Unescape(f),f=on.paramPropertyValue(f)),o+=";"+m.toUpperCase()+"="+f}if(n.length===3)return o+":";let l=n[2],c,d=!1,u=!1,p=!1;return a in e.property?(c=e.property[a],"multiValue"in c&&(d=c.multiValue),"structuredValue"in c&&Array.isArray(n[3])&&(u=c.structuredValue),"defaultType"in c?l===c.defaultType&&(p=!0):l===MTe&&(p=!0)):l===MTe&&(p=!0),p||(o+=";VALUE="+l.toUpperCase()),o+=":",d&&u?o+=on.multiValue(n[3],u,l,d,e,u):d?o+=on.multiValue(n.slice(3),d,l,null,e,!1):u?o+=on.multiValue(n[3],u,l,null,e,u):o+=on.value(n[3],l,e,!1),t?o:_Te(o)};on.paramPropertyValue=function(n,e){return!e&&n.indexOf(",")===-1&&n.indexOf(":")===-1&&n.indexOf(";")===-1?n:'"'+n+'"'};on.multiValue=function(n,e,t,r,a,i){let s="",o=n.length,l=0;for(;l<o;l++)r&&Array.isArray(n[l])?s+=on.multiValue(n[l],r,t,null,a,i):s+=on.value(n[l],t,a,i),l!==o-1&&(s+=e);return s};on.value=function(n,e,t,r){return e in t.value&&"toICAL"in t.value[e]?t.value[e].toICAL(n,r):n};on._rfc6868Unescape=function(n){return n.replace(/[\n^"]/g,function(e){return b5e[e]})};ITe=0,jR=1,$R=2,Xp=3,_h=class n{static fromString(e,t){return new n(lr.property(e,t))}constructor(e,t){this._parent=t||null,typeof e=="string"?(this.jCal=[e,{},fr.defaultType],this.jCal[$R]=this.getDefaultType()):this.jCal=e,this._updateType()}get type(){return this.jCal[$R]}get name(){return this.jCal[ITe]}get parent(){return this._parent}set parent(e){let t=!this._parent||e&&e._designSet!=this._parent._designSet;this._parent=e,this.type==fr.defaultType&&t&&(this.jCal[$R]=this.getDefaultType(),this._updateType())}get _designSet(){return this.parent?this.parent._designSet:fr.defaultSet}_updateType(){let e=this._designSet;this.type in e.value&&("decorate"in e.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in e.property&&(this.isMultiValue="multiValue"in e.property[this.name],this.isStructuredValue="structuredValue"in e.property[this.name]))}_hydrateValue(e){return this._values&&this._values[e]?this._values[e]:this.jCal.length<=Xp+e?null:this.isDecorated?(this._values||(this._values=[]),this._values[e]=this._decorate(this.jCal[Xp+e])):this.jCal[Xp+e]}_decorate(e){return this._designSet.value[this.type].decorate(e,this)}_undecorate(e){return this._designSet.value[this.type].undecorate(e,this)}_setDecoratedValue(e,t){this._values||(this._values=[]),typeof e=="object"&&"icaltype"in e?(this.jCal[Xp+t]=this._undecorate(e),this._values[t]=e):(this.jCal[Xp+t]=e,this._values[t]=this._decorate(e))}getParameter(e){if(e in this.jCal[jR])return this.jCal[jR][e]}getFirstParameter(e){let t=this.getParameter(e);return Array.isArray(t)?t[0]:t}setParameter(e,t){let r=e.toLowerCase();typeof t=="string"&&r in this._designSet.param&&"multiValue"in this._designSet.param[r]&&(t=[t]),this.jCal[jR][e]=t}removeParameter(e){delete this.jCal[jR][e]}getDefaultType(){let e=this.jCal[ITe],t=this._designSet;if(e in t.property){let r=t.property[e];if("defaultType"in r)return r.defaultType}return fr.defaultType}resetType(e){this.removeAllValues(),this.jCal[$R]=e,this._updateType()}getFirstValue(){return this._hydrateValue(0)}getValues(){let e=this.jCal.length-Xp;if(e<1)return[];let t=0,r=[];for(;t<e;t++)r[t]=this._hydrateValue(t);return r}removeAllValues(){this._values&&(this._values.length=0),this.jCal.length=3}setValues(e){if(!this.isMultiValue)throw new Error(this.name+`: does not not support mulitValue.
override isMultiValue`);let t=e.length,r=0;if(this.removeAllValues(),t>0&&typeof e[0]=="object"&&"icaltype"in e[0]&&this.resetType(e[0].icaltype),this.isDecorated)for(;r<t;r++)this._setDecoratedValue(e[r],r);else for(;r<t;r++)this.jCal[Xp+r]=e[r]}setValue(e){this.removeAllValues(),typeof e=="object"&&"icaltype"in e&&this.resetType(e.icaltype),this.isDecorated?this._setDecoratedValue(e,0):this.jCal[Xp]=e}toJSON(){return this.jCal}toICALString(){return on.property(this.jCal,this._designSet,!0)}},em=0,Ic=1,tm=2,w5e=0,S5e=3,So=class n{constructor(e,t){z(this,"_hydratedPropertyCount",0);z(this,"_hydratedComponentCount",0);z(this,"_timezoneCache",null);z(this,"_components",null);z(this,"_properties",null);typeof e=="string"&&(e=[e,[],[]]),this.jCal=e,this.parent=t||null,!this.parent&&this.name==="vcalendar"&&(this._timezoneCache=new Map)}static fromString(e){return new n(lr.component(e))}get name(){return this.jCal[em]}get _designSet(){var t;let e=this.parent&&this.parent._designSet;if(!e&&this.name=="vcard"){let r=(t=this.jCal[Ic])==null?void 0:t[0];if(r&&r[w5e]=="version"&&r[S5e]=="3.0")return fr.getDesignSet("vcard3")}return e||fr.getDesignSet(this.name)}_hydrateComponent(e){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[e])return this._components[e];let t=new n(this.jCal[tm][e],this);return this._hydratedComponentCount++,this._components[e]=t}_hydrateProperty(e){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[e])return this._properties[e];let t=new _h(this.jCal[Ic][e],this);return this._hydratedPropertyCount++,this._properties[e]=t}getFirstSubcomponent(e){if(e){let t=0,r=this.jCal[tm],a=r.length;for(;t<a;t++)if(r[t][em]===e)return this._hydrateComponent(t)}else if(this.jCal[tm].length)return this._hydrateComponent(0);return null}getAllSubcomponents(e){let t=this.jCal[tm].length,r=0;if(e){let a=this.jCal[tm],i=[];for(;r<t;r++)e===a[r][em]&&i.push(this._hydrateComponent(r));return i}else{if(!this._components||this._hydratedComponentCount!==t)for(;r<t;r++)this._hydrateComponent(r);return this._components||[]}}hasProperty(e){let t=this.jCal[Ic],r=t.length,a=0;for(;a<r;a++)if(t[a][em]===e)return!0;return!1}getFirstProperty(e){if(e){let t=0,r=this.jCal[Ic],a=r.length;for(;t<a;t++)if(r[t][em]===e)return this._hydrateProperty(t)}else if(this.jCal[Ic].length)return this._hydrateProperty(0);return null}getFirstPropertyValue(e){let t=this.getFirstProperty(e);return t?t.getFirstValue():null}getAllProperties(e){let t=this.jCal[Ic].length,r=0;if(e){let a=this.jCal[Ic],i=[];for(;r<t;r++)e===a[r][em]&&i.push(this._hydrateProperty(r));return i}else{if(!this._properties||this._hydratedPropertyCount!==t)for(;r<t;r++)this._hydrateProperty(r);return this._properties||[]}}_removeObjectByIndex(e,t,r){if(t=t||[],t[r]){let a=t[r];"parent"in a&&(a.parent=null)}t.splice(r,1),this.jCal[e].splice(r,1)}_removeObject(e,t,r){let a=0,i=this.jCal[e],s=i.length,o=this[t];if(typeof r=="string"){for(;a<s;a++)if(i[a][em]===r)return this._removeObjectByIndex(e,o,a),!0}else if(o){for(;a<s;a++)if(o[a]&&o[a]===r)return this._removeObjectByIndex(e,o,a),!0}return!1}_removeAllObjects(e,t,r){let a=this[t],i=this.jCal[e],s=i.length-1;for(;s>=0;s--)(!r||i[s][em]===r)&&this._removeObjectByIndex(e,a,s)}addSubcomponent(e){this._components||(this._components=[],this._hydratedComponentCount=0),e.parent&&e.parent.removeSubcomponent(e);let t=this.jCal[tm].push(e.jCal);return this._components[t-1]=e,this._hydratedComponentCount++,e.parent=this,e}removeSubcomponent(e){let t=this._removeObject(tm,"_components",e);return t&&this._hydratedComponentCount--,t}removeAllSubcomponents(e){let t=this._removeAllObjects(tm,"_components",e);return this._hydratedComponentCount=0,t}addProperty(e){if(!(e instanceof _h))throw new TypeError("must be instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),e.parent&&e.parent.removeProperty(e);let t=this.jCal[Ic].push(e.jCal);return this._properties[t-1]=e,this._hydratedPropertyCount++,e.parent=this,e}addPropertyWithValue(e,t){let r=new _h(e);return r.setValue(t),this.addProperty(r),r}updatePropertyWithValue(e,t){let r=this.getFirstProperty(e);return r?r.setValue(t):r=this.addPropertyWithValue(e,t),r}removeProperty(e){let t=this._removeObject(Ic,"_properties",e);return t&&this._hydratedPropertyCount--,t}removeAllProperties(e){let t=this._removeAllObjects(Ic,"_properties",e);return this._hydratedPropertyCount=0,t}toJSON(){return this.jCal}toString(){return on.component(this.jCal,this._designSet)}getTimeZoneByID(e){if(this.parent)return this.parent.getTimeZoneByID(e);if(!this._timezoneCache)return null;if(this._timezoneCache.has(e))return this._timezoneCache.get(e);let t=this.getAllSubcomponents("vtimezone");for(let r of t)if(r.getFirstProperty("tzid").getFirstValue()===e){let a=new mr({component:r,tzid:e});return this._timezoneCache.set(e,a),a}return null}},GR=class{constructor(e){z(this,"complete",!1);z(this,"ruleIterators",null);z(this,"ruleDates",null);z(this,"exDates",null);z(this,"ruleDateInc",0);z(this,"exDateInc",0);z(this,"exDate",null);z(this,"ruleDate",null);z(this,"dtstart",null);z(this,"last",null);this.ruleDates=[],this.exDates=[],this.fromData(e)}fromData(e){let t=ou(e.dtstart,Me);if(t)this.dtstart=t;else throw new Error(".dtstart (ICAL.Time) must be given");if(e.component)this._init(e.component);else{if(this.last=ou(e.last,Me)||t.clone(),!e.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=e.ruleIterators.map(function(r){return ou(r,mE)}),this.ruleDateInc=e.ruleDateInc,this.exDateInc=e.exDateInc,e.ruleDates&&(this.ruleDates=e.ruleDates.map(r=>ou(r,Me)),this.ruleDate=this.ruleDates[this.ruleDateInc]),e.exDates&&(this.exDates=e.exDates.map(r=>ou(r,Me)),this.exDate=this.exDates[this.exDateInc]),typeof e.complete!="undefined"&&(this.complete=e.complete)}}_compare_special(e,t){return!e.isDate&&t.isDate?new Me({year:e.year,month:e.month,day:e.day}).compare(t):e.compare(t)}next(){let e,t,r,a=500,i=0;for(;;){if(i++>a)throw new Error("max tries have occurred, rule may be impossible to fulfill.");if(t=this.ruleDate,e=this._nextRecurrenceIter(this.last),!t&&!e){this.complete=!0;break}if((!t||e&&t.compare(e.last)>0)&&(t=e.last.clone(),e.next()),this.ruleDate===t&&this._nextRuleDay(),this.last=t,this.exDate&&(r=this._compare_special(this.last,this.exDate),r>0&&this._nextExDay(),r===0)){this._nextExDay();continue}return this.last}}toJSON(){function e(r){return r.toJSON()}let t=Object.create(null);return t.ruleIterators=this.ruleIterators.map(e),this.ruleDates&&(t.ruleDates=this.ruleDates.map(e)),this.exDates&&(t.exDates=this.exDates.map(e)),t.ruleDateInc=this.ruleDateInc,t.exDateInc=this.exDateInc,t.last=this.last.toJSON(),t.dtstart=this.dtstart.toJSON(),t.complete=this.complete,t}_extractDates(e,t){let r=[],a=e.getAllProperties(t);for(let i=0,s=a.length;i<s;i++)for(let o of a[i].getValues()){let l=Rh(r,o,(c,d)=>c.compare(d));r.splice(l,0,o)}return r}_init(e){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!e.hasProperty("rdate")&&!e.hasProperty("rrule")&&!e.hasProperty("recurrence-id")){this.ruleDate=this.last.clone(),this.complete=!0;return}if(e.hasProperty("rdate")&&(this.ruleDates=this._extractDates(e,"rdate"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=Rh(this.ruleDates,this.last,(t,r)=>t.compare(r)),this.ruleDate=this.ruleDates[this.ruleDateInc]),e.hasProperty("rrule")){let t=e.getAllProperties("rrule"),r=0,a=t.length,i,s;for(;r<a;r++)i=t[r].getFirstValue(),s=i.iterator(this.dtstart),this.ruleIterators.push(s),s.next()}e.hasProperty("exdate")&&(this.exDates=this._extractDates(e,"exdate"),this.exDateInc=Rh(this.exDates,this.last,this._compare_special),this.exDate=this.exDates[this.exDateInc])}_nextExDay(){this.exDate=this.exDates[++this.exDateInc]}_nextRuleDay(){this.ruleDate=this.ruleDates[++this.ruleDateInc]}_nextRecurrenceIter(){let e=this.ruleIterators;if(e.length===0)return null;let t=e.length,r,a,i=0,s;for(;i<t;i++){if(r=e[i],a=r.last,r.completed){t--,i!==0&&i--,e.splice(i,1);continue}(!s||s.last.compare(a)>0)&&(s=r)}return s}},dE=class dE{constructor(e,t){z(this,"exceptions",null);z(this,"strictExceptions",!1);e instanceof So||(t=e,e=null),e?this.component=e:this.component=new So("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],t&&t.strictExceptions&&(this.strictExceptions=t.strictExceptions),t&&t.exceptions?t.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(r){r.hasProperty("recurrence-id")&&this.relateException(r)},this)}relateException(e){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(e instanceof So&&(e=new dE(e)),this.strictExceptions&&e.uid!==this.uid)throw new Error("attempted to relate unrelated exception");let t=e.recurrenceId.toString();if(this.exceptions[t]=e,e.modifiesFuture()){let r=[e.recurrenceId.toUnixTime(),t],a=Rh(this.rangeExceptions,r,NTe);this.rangeExceptions.splice(a,0,r)}}modifiesFuture(){return this.component.hasProperty("recurrence-id")?this.component.getFirstProperty("recurrence-id").getParameter("range")===dE.THISANDFUTURE:!1}findRangeException(e){if(!this.rangeExceptions.length)return null;let t=e.toUnixTime(),r=Rh(this.rangeExceptions,[t],NTe);if(r-=1,r<0)return null;let a=this.rangeExceptions[r];return t<a[0]?null:a[1]}getOccurrenceDetails(e){let t=e.toString(),r=e.convertToZone(mr.utcTimezone).toString(),a,i={recurrenceId:e};if(t in this.exceptions)a=i.item=this.exceptions[t],i.startDate=a.startDate,i.endDate=a.endDate,i.item=a;else if(r in this.exceptions)a=this.exceptions[r],i.startDate=a.startDate,i.endDate=a.endDate,i.item=a;else{let s=this.findRangeException(e),o;if(s){let l=this.exceptions[s];i.item=l;let c=this._rangeExceptionCache[s];if(!c){let u=l.recurrenceId.clone(),p=l.startDate.clone();u.zone=p.zone,c=p.subtractDate(u),this._rangeExceptionCache[s]=c}let d=e.clone();d.zone=l.startDate.zone,d.addDuration(c),o=d.clone(),o.addDuration(l.duration),i.startDate=d,i.endDate=o}else o=e.clone(),o.addDuration(this.duration),i.endDate=o,i.startDate=e,i.item=this}return i}iterator(e){return new GR({component:this.component,dtstart:e||this.startDate})}isRecurring(){let e=this.component;return e.hasProperty("rrule")||e.hasProperty("rdate")}isRecurrenceException(){return this.component.hasProperty("recurrence-id")}getRecurrenceTypes(){let e=this.component.getAllProperties("rrule"),t=0,r=e.length,a=Object.create(null);for(;t<r;t++){let i=e[t].getFirstValue();a[i.freq]=!0}return a}get uid(){return this._firstProp("uid")}set uid(e){this._setProp("uid",e)}get startDate(){return this._firstProp("dtstart")}set startDate(e){this._setTime("dtstart",e)}get endDate(){let e=this._firstProp("dtend");if(!e){let t=this._firstProp("duration");e=this.startDate.clone(),t?e.addDuration(t):e.isDate&&(e.day+=1)}return e}set endDate(e){this.component.hasProperty("duration")&&this.component.removeProperty("duration"),this._setTime("dtend",e)}get duration(){let e=this._firstProp("duration");return e||this.endDate.subtractDateTz(this.startDate)}set duration(e){this.component.hasProperty("dtend")&&this.component.removeProperty("dtend"),this._setProp("duration",e)}get location(){return this._firstProp("location")}set location(e){this._setProp("location",e)}get attendees(){return this.component.getAllProperties("attendee")}get summary(){return this._firstProp("summary")}set summary(e){this._setProp("summary",e)}get description(){return this._firstProp("description")}set description(e){this._setProp("description",e)}get color(){return this._firstProp("color")}set color(e){this._setProp("color",e)}get organizer(){return this._firstProp("organizer")}set organizer(e){this._setProp("organizer",e)}get sequence(){return this._firstProp("sequence")}set sequence(e){this._setProp("sequence",e)}get recurrenceId(){return this._firstProp("recurrence-id")}set recurrenceId(e){this._setTime("recurrence-id",e)}_setTime(e,t){let r=this.component.getFirstProperty(e);r||(r=new _h(e),this.component.addProperty(r)),t.zone===mr.localTimezone||t.zone===mr.utcTimezone?r.removeParameter("tzid"):r.setParameter("tzid",t.zone.tzid),r.setValue(t)}_setProp(e,t){this.component.updatePropertyWithValue(e,t)}_firstProp(e){return this.component.getFirstPropertyValue(e)}toString(){return this.component.toString()}};z(dE,"THISANDFUTURE","THISANDFUTURE");YR=dE;KW=class{constructor(e){z(this,"parseEvent",!0);z(this,"parseTimezone",!0);z(this,"oncomplete",function(){});z(this,"onerror",function(e){});z(this,"ontimezone",function(e){});z(this,"onevent",function(e){});typeof e=="undefined"&&(e={});for(let[t,r]of Object.entries(e))this[t]=r}process(e){typeof e=="string"&&(e=lr(e)),e instanceof So||(e=new So(e));let t=e.getAllSubcomponents(),r=0,a=t.length,i;for(;r<a;r++)switch(i=t[r],i.name){case"vtimezone":if(this.parseTimezone){let s=i.getFirstPropertyValue("tzid");s&&this.ontimezone(new mr({tzid:s,component:i}))}break;case"vevent":this.parseEvent&&this.onevent(new YR(i));break;default:continue}this.oncomplete()}},Yi={foldLength:75,debug:!1,newLineChar:`\r
`,Binary:HR,Component:So,ComponentParser:KW,Duration:Rs,Event:YR,Period:uE,Property:_h,Recur:yl,RecurExpansion:GR,RecurIterator:mE,Time:Me,Timezone:mr,TimezoneService:WR,UtcOffset:lu,VCardTime:Nh,parse:lr,stringify:on,design:fr,helpers:s5e}});function OTe(n){if(typeof n!="string")return;let e=n.trim().replace(/^mailto:/i,"").toLowerCase();return/^[^\s<>@]+@[^\s<>@]+\.[^\s<>@]+$/.test(e)?e:void 0}function zTe(n){return OTe(n.getFirstPropertyValue("x-wr-calname"))}function JW(n,e){if(!e)return;let t=n.getAllProperties("attendee").find(a=>OTe(a.getFirstValue())===e);if(!t)return;let r=t.getParameter("partstat");return typeof r=="string"&&r.toUpperCase()==="DECLINED"}var BTe=y(()=>{});function jTe(n){let e=XW.get(n);if(e!==void 0)return e;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}),XW.set(n,!0),!0}catch(t){return XW.set(n,!1),!1}}function eq(n){if(!n)return null;let e=n.trim();if(!e)return null;let t=e.replace(/^\([^)]+\)\s*/u,"").trim();if(jTe(t))return t;let r=C5e[t];return r&&jTe(r)?r:null}function x5e(n){let e=$Te.get(n);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),$Te.set(n,e)),e}function E5e(n,e){let t=x5e(e).formatToParts(new Date(n)),r={};for(let i of t)r[i.type]=i.value;let a=parseInt(r.hour,10)%24;return{year:parseInt(r.year,10),month:parseInt(r.month,10),day:parseInt(r.day,10),hour:a,minute:parseInt(r.minute,10),second:parseInt(r.second,10)}}function tq(n,e){let t={year:n.year,month:n.month,day:n.day,hour:n.hour,minute:n.minute,second:n.second},r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second);for(let a=0;a<3;a++){let i=E5e(r,e),s=Date.UTC(i.year,i.month-1,i.day,i.hour,i.minute,i.second),o=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second),l=s-o;if(l===0)break;r-=l}return new Date(r).toISOString()}var C5e,XW,$Te,UTe=y(()=>{C5e=Object.freeze({"AUS Central Standard Time":"Australia/Darwin","AUS Eastern Standard Time":"Australia/Sydney","Afghanistan Standard Time":"Asia/Kabul","Alaskan Standard Time":"America/Anchorage","Aleutian Standard Time":"America/Adak","Altai Standard Time":"Asia/Barnaul","Arab Standard Time":"Asia/Riyadh","Arabian Standard Time":"Asia/Dubai","Arabic Standard Time":"Asia/Baghdad","Argentina Standard Time":"America/Buenos_Aires","Astrakhan Standard Time":"Europe/Astrakhan","Atlantic Standard Time":"America/Halifax","Aus Central W. Standard Time":"Australia/Eucla","Azerbaijan Standard Time":"Asia/Baku","Azores Standard Time":"Atlantic/Azores","Bahia Standard Time":"America/Bahia","Bangladesh Standard Time":"Asia/Dhaka","Belarus Standard Time":"Europe/Minsk","Bougainville Standard Time":"Pacific/Bougainville","Canada Central Standard Time":"America/Regina","Cape Verde Standard Time":"Atlantic/Cape_Verde","Caucasus Standard Time":"Asia/Yerevan","Cen. Australia Standard Time":"Australia/Adelaide","Central America Standard Time":"America/Guatemala","Central Asia Standard Time":"Asia/Almaty","Central Brazilian Standard Time":"America/Cuiaba","Central Europe Standard Time":"Europe/Budapest","Central European Standard Time":"Europe/Warsaw","Central Pacific Standard Time":"Pacific/Guadalcanal","Central Standard Time":"America/Chicago","Central Standard Time (Mexico)":"America/Mexico_City","Chatham Islands Standard Time":"Pacific/Chatham","China Standard Time":"Asia/Shanghai","Cuba Standard Time":"America/Havana","Dateline Standard Time":"Etc/GMT+12","E. Africa Standard Time":"Africa/Nairobi","E. Australia Standard Time":"Australia/Brisbane","E. Europe Standard Time":"Europe/Chisinau","E. South America Standard Time":"America/Sao_Paulo","Easter Island Standard Time":"Pacific/Easter","Eastern Standard Time":"America/New_York","Eastern Standard Time (Mexico)":"America/Cancun","Egypt Standard Time":"Africa/Cairo","Ekaterinburg Standard Time":"Asia/Yekaterinburg","FLE Standard Time":"Europe/Kiev","Fiji Standard Time":"Pacific/Fiji","GMT Standard Time":"Europe/London","GTB Standard Time":"Europe/Bucharest","Georgian Standard Time":"Asia/Tbilisi","Greenland Standard Time":"America/Godthab","Greenwich Standard Time":"Atlantic/Reykjavik","Haiti Standard Time":"America/Port-au-Prince","Hawaiian Standard Time":"Pacific/Honolulu","India Standard Time":"Asia/Kolkata","Iran Standard Time":"Asia/Tehran","Israel Standard Time":"Asia/Jerusalem","Jordan Standard Time":"Asia/Amman","Kaliningrad Standard Time":"Europe/Kaliningrad","Korea Standard Time":"Asia/Seoul","Libya Standard Time":"Africa/Tripoli","Line Islands Standard Time":"Pacific/Kiritimati","Lord Howe Standard Time":"Australia/Lord_Howe","Magadan Standard Time":"Asia/Magadan","Magallanes Standard Time":"America/Punta_Arenas","Marquesas Standard Time":"Pacific/Marquesas","Mauritius Standard Time":"Indian/Mauritius","Middle East Standard Time":"Asia/Beirut","Montevideo Standard Time":"America/Montevideo","Morocco Standard Time":"Africa/Casablanca","Mountain Standard Time":"America/Denver","Mountain Standard Time (Mexico)":"America/Chihuahua","Myanmar Standard Time":"Asia/Yangon","N. Central Asia Standard Time":"Asia/Novosibirsk","Namibia Standard Time":"Africa/Windhoek","Nepal Standard Time":"Asia/Katmandu","New Zealand Standard Time":"Pacific/Auckland","Newfoundland Standard Time":"America/St_Johns","Norfolk Standard Time":"Pacific/Norfolk","North Asia East Standard Time":"Asia/Irkutsk","North Asia Standard Time":"Asia/Krasnoyarsk","North Korea Standard Time":"Asia/Pyongyang","Omsk Standard Time":"Asia/Omsk","Pacific SA Standard Time":"America/Santiago","Pacific Standard Time":"America/Los_Angeles","Pacific Standard Time (Mexico)":"America/Tijuana","Pakistan Standard Time":"Asia/Karachi","Paraguay Standard Time":"America/Asuncion","Qyzylorda Standard Time":"Asia/Qyzylorda","Romance Standard Time":"Europe/Paris","Russia Time Zone 10":"Asia/Srednekolymsk","Russia Time Zone 11":"Asia/Kamchatka","Russia Time Zone 3":"Europe/Samara","Russian Standard Time":"Europe/Moscow","SA Eastern Standard Time":"America/Cayenne","SA Pacific Standard Time":"America/Bogota","SA Western Standard Time":"America/La_Paz","SE Asia Standard Time":"Asia/Bangkok","Saint Pierre Standard Time":"America/Miquelon","Sakhalin Standard Time":"Asia/Sakhalin","Samoa Standard Time":"Pacific/Apia","Sao Tome Standard Time":"Africa/Sao_Tome","Saratov Standard Time":"Europe/Saratov","Singapore Standard Time":"Asia/Singapore","South Africa Standard Time":"Africa/Johannesburg","South Sudan Standard Time":"Africa/Juba","Sri Lanka Standard Time":"Asia/Colombo","Sudan Standard Time":"Africa/Khartoum","Syria Standard Time":"Asia/Damascus","Taipei Standard Time":"Asia/Taipei","Tasmania Standard Time":"Australia/Hobart","Tocantins Standard Time":"America/Araguaina","Tokyo Standard Time":"Asia/Tokyo","Tomsk Standard Time":"Asia/Tomsk","Tonga Standard Time":"Pacific/Tongatapu","Transbaikal Standard Time":"Asia/Chita","Turkey Standard Time":"Europe/Istanbul","Turks And Caicos Standard Time":"America/Grand_Turk","US Eastern Standard Time":"America/Indianapolis","US Mountain Standard Time":"America/Phoenix",UTC:"Etc/UTC","UTC+12":"Etc/GMT-12","UTC+13":"Etc/GMT-13","UTC-02":"Etc/GMT+2","UTC-08":"Etc/GMT+8","UTC-09":"Etc/GMT+9","UTC-11":"Etc/GMT+11","Ulaanbaatar Standard Time":"Asia/Ulaanbaatar","Venezuela Standard Time":"America/Caracas","Vladivostok Standard Time":"Asia/Vladivostok","Volgograd Standard Time":"Europe/Volgograd","W. Australia Standard Time":"Australia/Perth","W. Central Africa Standard Time":"Africa/Lagos","W. Europe Standard Time":"Europe/Berlin","W. Mongolia Standard Time":"Asia/Hovd","West Asia Standard Time":"Asia/Tashkent","West Bank Standard Time":"Asia/Hebron","West Pacific Standard Time":"Pacific/Port_Moresby","Yakutsk Standard Time":"Asia/Yakutsk"}),XW=new Map;$Te=new Map});function VTe(n){let e=n.getFirstPropertyValue("tzid");return typeof e=="string"?e.trim():null}function I5e(n){let e=n.replace(/\s+\([^)]+\)$/u,"").trim();return e&&e!==n?[e]:[]}function N5e(n,e){var t;return(t=n.getAllSubcomponents("vtimezone").find(r=>VTe(r)===e))!=null?t:null}function R5e(n,e){let t=new Yi.Component(JSON.parse(JSON.stringify(n.toJSON())));return t.updatePropertyWithValue("tzid",e),t}function _5e(n){n.getAllSubcomponents("vtimezone").forEach(t=>{let r=VTe(t);Yi.TimezoneService.register(t),r&&I5e(r).forEach(a=>{let i=N5e(n,a),s=i!=null?i:R5e(t,a),o=new Yi.Timezone({component:s,tzid:a});i||n.addSubcomponent(s),Yi.TimezoneService.register(o)})})}function rq(n){if(!M5e.test(n))return null;let[e,t,r]=n.split("-").map(Number);return Date.UTC(e,t-1,r)}function F5e(n){let e=n.getUTCFullYear().toString().padStart(4,"0"),t=(n.getUTCMonth()+1).toString().padStart(2,"0"),r=n.getUTCDate().toString().padStart(2,"0");return`${e}-${t}-${r}`}function L5e(n,e){let t=rq(n),r=rq(e);return t===null||r===null||r<=t?null:Math.round((r-t)/HTe)}function O5e(n,e){let t=rq(n);return t===null?n:F5e(new Date(t+e*HTe))}var ZR,hE,D5e,P5e,A5e,M5e,HTe,KR,WTe=y(()=>{ZR=require("obsidian");LTe();BTe();px();q();Oi();UTe();hE=M({tag:"Services/ICSSubscriptionService"}),D5e=365*24*60*60*1e3,P5e=3e3,A5e=1e4,M5e=/^\d{4}-\d{2}-\d{2}$/u,HTe=1440*60*1e3;KR=class extends fc{constructor(t){super();this.subscriptions=[];this.cache=new Map;this.refreshTimers=new Map;this.fileWatchers=new Map;this.pendingRefreshes=new Set;this.lastFetched=new Map;this.lastError=new Map;this.destroyed=!1;this.CACHE_GRACE_PERIOD=300*1e3;this.plugin=t}translate(t,r){return this.plugin.i18n.translate(t,r)}icalTimeToISOString(t,r){var s;if(t.isDate){let o=t.year.toString().padStart(4,"0"),l=t.month.toString().padStart(2,"0"),c=t.day.toString().padStart(2,"0");return`${o}-${l}-${c}`}let a=(s=t.zone)==null?void 0:s.tzid;if(a==="floating"||a===void 0){let o=eq(r);if(o)return tq(t,o);if(!(typeof r=="string"&&r.trim().length>0)){let c=this.getLocalTimeZoneForFloatingTime();if(c)return tq(t,c)}}let i=t.toUnixTime();return new Date(i*1e3).toISOString()}getLocalTimeZoneForFloatingTime(){try{return eq(Intl.DateTimeFormat().resolvedOptions().timeZone)}catch(t){return null}}rawTzidOf(t,r){let a=t.getFirstProperty(r);if(!a)return null;let i=a.getParameter("tzid");return typeof i=="string"?i:null}getRecurringInstanceEnd(t,r,a,i){if(!a)return;if(i){let o=L5e(r,a);return o===null?a:O5e(t,o)}let s=new Date(a).getTime()-new Date(r).getTime();return new Date(new Date(t).getTime()+s).toISOString()}async initialize(){this.destroyed=!1,await this.loadSubscriptions();let t=[];this.subscriptions.forEach(r=>{if(r.enabled){r.type==="remote"?this.startRefreshTimer(r):r.type==="local"&&this.startFileWatcher(r);let a=this.cache.get(r.id);(!a||new Date(a.expires)<=new Date)&&t.push(this.fetchSubscription(r.id))}}),await Promise.allSettled(t),this.emit("data-changed")}async loadSubscriptions(){try{let t=await this.plugin.loadData();this.subscriptions=(t==null?void 0:t.icsSubscriptions)||[]}catch(t){hE.error("Failed to load ICS subscriptions:",{category:"provider",operation:"load-ics-subscriptions",error:t}),this.subscriptions=[]}}async saveSubscriptions(){try{let t=await this.plugin.loadPluginDataForSafeWrite("save-ics-subscriptions");if(!t)return;t.icsSubscriptions=this.subscriptions,await this.plugin.saveData(t)}catch(t){throw hE.error("Failed to save ICS subscriptions:",{category:"provider",operation:"save-ics-subscriptions",error:t}),t}}getSubscriptions(){return[...this.subscriptions]}getLastFetched(t){return this.lastFetched.get(t)}getLastError(t){return this.lastError.get(t)}async addSubscription(t){let r={...t,filePath:t.type==="local"&&t.filePath?this.normalizeLocalICSFilePathIfPossible(t.filePath):t.filePath,id:this.generateId()};return this.subscriptions.push(r),await this.saveSubscriptions(),r.enabled&&(r.type==="remote"?(this.startRefreshTimer(r),await this.fetchSubscription(r.id)):r.type==="local"&&(this.startFileWatcher(r),await this.fetchSubscription(r.id))),this.emit("data-changed"),r}async updateSubscription(t,r){let a=this.subscriptions.findIndex(l=>l.id===t);if(a===-1)throw new Error("Subscription not found");let i=this.subscriptions[a],s={...r};typeof r.filePath=="string"&&(s.filePath=this.normalizeLocalICSFilePathIfPossible(r.filePath));let o={...i,...s};this.subscriptions[a]=o,await this.saveSubscriptions(),this.stopRefreshTimer(t),this.stopFileWatcher(t),o.enabled&&(o.type==="remote"?this.startRefreshTimer(o):o.type==="local"&&this.startFileWatcher(o)),(r.url&&r.url!==i.url||r.filePath&&r.filePath!==i.filePath)&&this.cache.delete(t),this.emit("data-changed")}async removeSubscription(t){let r=this.subscriptions.findIndex(a=>a.id===t);if(r===-1)throw new Error("Subscription not found");this.subscriptions.splice(r,1),await this.saveSubscriptions(),this.stopRefreshTimer(t),this.stopFileWatcher(t),this.cache.delete(t),this.lastFetched.delete(t),this.lastError.delete(t),this.emit("data-changed")}async fetchSubscription(t){let r=this.subscriptions.find(a=>a.id===t);if(!(!r||!r.enabled))try{let a;if(r.type==="remote"){if(!r.url)throw new Error("Remote subscription missing URL");a=(await(0,ZR.requestUrl)({url:r.url,method:"GET",headers:{Accept:"text/calendar,*/*;q=0.1","Accept-Language":"en-US,en;q=0.9","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"}})).text}else if(r.type==="local"){if(!r.filePath)throw new Error("Local subscription missing file path");let o=this.normalizeLocalICSFilePath(r.filePath);a=await this.readLocalICSFile(o),r.filePath!==o&&(r.filePath=o,await this.saveSubscriptions())}else throw new Error("Unknown subscription type");let i=this.parseICS(a,r.id),s={subscriptionId:t,events:i,lastUpdated:new Date().toISOString(),expires:new Date(Date.now()+r.refreshInterval*60*1e3).toISOString()};this.cache.set(t,s),this.lastFetched.set(t,new Date().toISOString()),this.lastError.delete(t),this.emit("data-changed")}catch(a){let i=a instanceof Error?a.message:String(a);this.lastError.set(t,i),r.type==="remote"?i.includes("404")?ve(this.plugin.emitter,this.translate("services.icsSubscription.notices.calendarNotFound",{name:r.name})):i.includes("500")||i.includes("OwaBasicUnsupportedException")?ve(this.plugin.emitter,this.translate("services.icsSubscription.notices.calendarAccessDenied",{name:r.name})):ve(this.plugin.emitter,this.translate("services.icsSubscription.notices.fetchRemoteFailed",{name:r.name,error:i})):ve(this.plugin.emitter,this.translate("services.icsSubscription.notices.readLocalFailed",{name:r.name,error:i}))}}parseICS(t,r){try{let a=Yi.parse(t),i=new Yi.Component(a);_5e(i);let s=zTe(i),o=i.getAllSubcomponents("vevent"),l=[],c=new Map;return o.forEach(d=>{let u=new Yi.Event(d),p=u.uid;if(!p)return;let m=d.getFirstPropertyValue("recurrence-id");if(m instanceof Yi.Time){c.has(p)||c.set(p,new Map);let f=m.toString();c.get(p).set(f,u)}}),o.forEach(d=>{var u,p;try{let m=new Yi.Event(d);if(d.getFirstPropertyValue("recurrence-id"))return;let h=d.getFirstPropertyValue("status");if(typeof h=="string"&&h.toUpperCase()==="CANCELLED")return;let g=(u=JW(d,s))!=null?u:!1;if(g&&!m.isRecurring())return;let v=m.summary||"Untitled Event",k=m.description||void 0,T=m.location||void 0,b=m.startDate,w=m.endDate;if(!b)return;let S=this.rawTzidOf(d,"dtstart"),C=this.rawTzidOf(d,"dtend"),x=b.isDate,E=this.icalTimeToISOString(b,S),_=w?this.icalTimeToISOString(w,C!=null?C:S):void 0,F=m.uid||`${r}-${l.length}`,I=`${r}-${F}`,A={id:I,subscriptionId:r,title:v,description:k,start:E,end:_,allDay:x,location:T,url:m.url||void 0};if(m.isRecurring()){let R=new Set;d.getAllProperties("exdate").forEach(Q=>{let Z=Q.getFirstValue();Z&&(Array.isArray(Z)?Z:[Z]).forEach(le=>{le&&typeof le.toString=="function"&&R.add(le.toString())})});let U=c.get(F)||new Map,pe=m.iterator(b),oe=new Yi.Time;oe.fromJSDate(new Date(Date.now()+D5e));let X,de=0,Oe=0;for(;(X=pe.next())&&de<A5e&&Oe<P5e&&(de++,!(X.compare(oe)>0));){let Q=X.toString();if(R.has(Q))continue;let Z=`${I}-${Oe}`,Ue=U.get(Q);if(Ue){let le=Ue.component.getFirstPropertyValue("status");if(typeof le=="string"&&le.toUpperCase()==="CANCELLED"||((p=JW(Ue.component,s))!=null?p:g))continue;let at=Ue.startDate,He=Ue.endDate,qr=Ue.component,jn=qr?this.rawTzidOf(qr,"dtstart"):null,Dr=qr?this.rawTzidOf(qr,"dtend"):null;at&&(l.push({id:Z,subscriptionId:r,title:Ue.summary||v,description:Ue.description||k,start:this.icalTimeToISOString(at,jn),end:He?this.icalTimeToISOString(He,Dr!=null?Dr:jn):void 0,allDay:at.isDate,location:Ue.location||T,url:Ue.url||A.url,recurringEventId:I}),Oe++)}else{if(g)continue;let le=this.icalTimeToISOString(X,S),at=this.getRecurringInstanceEnd(le,E,_,x);l.push({...A,id:Z,start:le,end:at,recurringEventId:I}),Oe++}}}else l.push(A)}catch(m){hE.warn("Failed to parse individual event:",{category:"provider",operation:"parse-individual-event",error:m})}}),l}catch(a){throw hE.error("Failed to parse ICS data:",{category:"provider",operation:"parse-ics-data",error:a}),new Error("Invalid ICS format")}}getAllEvents(){let t=[],r=new Date;return this.subscriptions.forEach(a=>{if(!a.enabled)return;let i=this.cache.get(a.id);if(!i){this.pendingRefreshes.has(a.id)||(this.pendingRefreshes.add(a.id),this.fetchSubscription(a.id).finally(()=>this.pendingRefreshes.delete(a.id)));return}let s=new Date(i.expires),o=new Date(s.getTime()+this.CACHE_GRACE_PERIOD);r<o?(t.push(...i.events),r>s&&!this.pendingRefreshes.has(a.id)&&(this.pendingRefreshes.add(a.id),this.fetchSubscription(a.id).finally(()=>this.pendingRefreshes.delete(a.id)))):this.pendingRefreshes.has(a.id)||(this.pendingRefreshes.add(a.id),this.fetchSubscription(a.id).finally(()=>this.pendingRefreshes.delete(a.id)))}),t}getEventsForSubscription(t){let r=this.cache.get(t);if(!r){let l=this.subscriptions.find(c=>c.id===t);return l&&l.enabled&&!this.pendingRefreshes.has(t)&&(this.pendingRefreshes.add(t),this.fetchSubscription(t).finally(()=>this.pendingRefreshes.delete(t))),[]}let a=new Date,i=new Date(r.expires),s=new Date(i.getTime()+this.CACHE_GRACE_PERIOD);return a>=s?(this.pendingRefreshes.has(t)||(this.pendingRefreshes.add(t),this.fetchSubscription(t).finally(()=>this.pendingRefreshes.delete(t))),[]):(a>i&&!this.pendingRefreshes.has(t)&&(this.pendingRefreshes.add(t),this.fetchSubscription(t).finally(()=>this.pendingRefreshes.delete(t))),[...r.events])}async refreshAllSubscriptions(){let t=this.subscriptions.filter(r=>r.enabled);for(let r of t)await this.fetchSubscription(r.id)}getVaultBasePath(){let t=this.plugin.app.vault.adapter;if(typeof(t==null?void 0:t.getBasePath)=="function")try{let r=t.getBasePath();return typeof r=="string"&&r.trim()?r:void 0}catch(r){hE.warn("Failed to resolve vault base path for local ICS file:",{category:"provider",operation:"resolve-vault-base-path-local-ics-file",error:r});return}}normalizePathSeparators(t){return t.trim().replace(/\\/g,"/").replace(/^\.\/+/u,"")}isAbsoluteFilePath(t){return t.startsWith("/")||/^[A-Za-z]:\//u.test(t)}normalizeLocalICSFilePath(t){let r=this.normalizePathSeparators(t);if(!this.isAbsoluteFilePath(r))return r;let a=this.getVaultBasePath();if(a){let i=this.normalizePathSeparators(a).replace(/\/+$/u,"");if(r.startsWith(`${i}/`))return r.slice(i.length+1)}throw new Error('Local ICS files must be inside the current Obsidian vault. Move the file into the vault or use a vault-relative path such as "Calendar.ics".')}normalizeLocalICSFilePathIfPossible(t){try{return this.normalizeLocalICSFilePath(t)}catch(r){return this.normalizePathSeparators(t)}}async readLocalICSFile(t){try{let r=this.normalizeLocalICSFilePath(t),a=this.plugin.app.vault.getAbstractFileByPath(r);if(!a||!(a instanceof ZR.TFile))throw new Error(`File not found: ${r}`);if(a.extension!=="ics")throw new Error(`File is not an ICS file: ${r}`);return await this.plugin.app.vault.cachedRead(a)}catch(r){throw new Error(`Failed to read local ICS file "${t}": ${r instanceof Error?r.message:String(r)}`)}}startFileWatcher(t){if(!t.filePath)return;this.stopFileWatcher(t.id);let r=this.normalizeLocalICSFilePathIfPossible(t.filePath),a=(l,c)=>{(l.path===r||c===r)&&window.setTimeout(()=>{this.fetchSubscription(t.id)},1e3)},i=this.plugin.app.vault.on("modify",a),s=this.plugin.app.vault.on("rename",a),o=this.plugin.app.vault.on("delete",l=>{l.path===r&&this.lastError.set(t.id,"Local ICS file was deleted")});this.fileWatchers.set(t.id,()=>{this.plugin.app.vault.offref(i),this.plugin.app.vault.offref(s),this.plugin.app.vault.offref(o)}),this.startFileRefreshTimer(t)}stopFileWatcher(t){let r=this.fileWatchers.get(t);r&&(r(),this.fileWatchers.delete(t))}async refreshSubscription(t){await this.fetchSubscription(t)}startRefreshTimer(t){this.stopRefreshTimer(t.id),this.startRemoteRefreshTimer(t)}startFileRefreshTimer(t){let r=t.refreshInterval*60*1e3,a=window.setTimeout(()=>{this.refreshTimers.delete(t.id),this.fetchSubscription(t.id).finally(()=>{this.shouldContinueRefresh(t.id)&&this.startFileRefreshTimer(t)})},r);this.refreshTimers.set(t.id,a)}startRemoteRefreshTimer(t){let r=t.refreshInterval*60*1e3,a=window.setTimeout(()=>{this.refreshTimers.delete(t.id),this.fetchSubscription(t.id).finally(()=>{this.shouldContinueRefresh(t.id)&&this.startRemoteRefreshTimer(t)})},r);this.refreshTimers.set(t.id,a)}shouldContinueRefresh(t){return!this.destroyed&&this.subscriptions.some(r=>r.id===t&&r.enabled)}stopRefreshTimer(t){let r=this.refreshTimers.get(t);r&&(window.clearTimeout(r),this.refreshTimers.delete(t))}generateId(){return"ics_"+Math.random().toString(36).substring(2,11)+Date.now().toString(36)}destroy(){this.destroyed=!0,this.refreshTimers.forEach(t=>window.clearTimeout(t)),this.refreshTimers.clear(),this.fileWatchers.forEach(t=>t()),this.fileWatchers.clear(),this.cache.clear(),this.pendingRefreshes.clear(),this.removeAllListeners()}getLocalICSFiles(){return this.plugin.app.vault.getFiles().filter(t=>t.extension==="ics").sort((t,r)=>t.path.localeCompare(r.path))}}});function rm(n,e){return n.find(t=>t.id===e||e===nq&&t.primary===!0)}var z5e,nq,Ok,QR,nm=y(()=>{px();q();z5e=M({tag:"Services/CalendarProvider"}),nq="primary";Ok=class extends fc{ownsEvent(e){var t,r;return(r=(t=e.subscriptionId)==null?void 0:t.startsWith(`${this.providerId}-`))!=null?r:!1}extractEventIds(e){let t=e.subscriptionId.replace(`${this.providerId}-`,""),r=e.id.replace(`${this.providerId}-${t}-`,"");return{calendarId:t,eventId:r}}},QR=class{constructor(){this.providers=new Map}register(e){this.providers.set(e.providerId,e)}unregister(e){this.providers.delete(e)}getProvider(e){return this.providers.get(e)}getAllProviders(){return Array.from(this.providers.values())}findProviderForEvent(e){for(let t of this.providers.values())if(t.ownsEvent(e))return t}getAllEvents(){let e=[];for(let t of this.providers.values())e.push(...t.getAllEvents());return e}async refreshAll(){let e=Array.from(this.providers.values()).map(t=>t.refresh().catch(r=>{z5e.error(`Failed to refresh ${t.providerName}:`,{category:"provider",operation:"refresh",error:r})}));await Promise.all(e)}destroyAll(){for(let e of this.providers.values())e.destroy();this.providers.clear()}}});var gE,Nc,JR,qTe=y(()=>{gE=require("obsidian");Cr();kH();xe();kv();yt();JI();q();Oi();ya();nm();Nc=M({tag:"Services/ICSNoteService"}),JR=class{constructor(e){this.plugin=e}translate(e,t){return this.plugin.i18n.translate(e,t)}findEventById(e){var s,o,l,c,d,u,p,m,f,h;let t=e.trim();if(!t)return null;let r=(s=this.plugin.icsSubscriptionService)==null?void 0:s.getAllEvents().find(g=>g.id===t);if(r){let g=(l=(o=this.plugin.icsSubscriptionService)==null?void 0:o.getSubscriptions().find(v=>v.id===r.subscriptionId))==null?void 0:l.name;return{event:r,subscriptionName:g}}let a=(c=this.plugin.googleCalendarService)==null?void 0:c.getAllEvents().find(g=>g.id===t);if(a){let g=a.subscriptionId.replace("google-",""),v=(u=(d=this.plugin.googleCalendarService)==null?void 0:d.getAvailableCalendars())!=null?u:[],k=((p=rm(v,g))==null?void 0:p.summary)||"Google Calendar";return{event:a,subscriptionName:k}}let i=(m=this.plugin.microsoftCalendarService)==null?void 0:m.getAllEvents().find(g=>g.id===t);if(i){let g=i.subscriptionId.replace("microsoft-",""),v=((h=(f=this.plugin.microsoftCalendarService)==null?void 0:f.getAvailableCalendars().find(k=>k.id===g))==null?void 0:h.summary)||"Microsoft Calendar";return{event:i,subscriptionName:v}}return null}getLoadedCalendarEvents(){var e,t,r,a,i,s;return[...(t=(e=this.plugin.icsSubscriptionService)==null?void 0:e.getAllEvents())!=null?t:[],...(a=(r=this.plugin.googleCalendarService)==null?void 0:r.getAllEvents())!=null?a:[],...(s=(i=this.plugin.microsoftCalendarService)==null?void 0:i.getAllEvents())!=null?s:[]]}getExplicitSeriesId(e){var r;return((r=e.recurringEventId)==null?void 0:r.trim())||null}getRecurringRelatedNotesMode(){var e,t;return((t=(e=this.plugin.settings)==null?void 0:e.icsIntegration)==null?void 0:t.recurringEventRelatedNotesMode)==="instance"?"instance":"series"}buildEventSeriesIndex(){let e=new Map;for(let a of this.getLoadedCalendarEvents()){let i=this.getExplicitSeriesId(a);if(!i)continue;let s=e.get(i);s||(s=new Set,e.set(i,s)),s.add(a.id)}let t=new Map,r=new Map;for(let[a,i]of e){r.set(a,i);for(let s of i)t.set(s,a)}return{seriesIdByEventId:t,eventIdsBySeriesId:r}}getRelatedEventIds(e,t){var s;let r=new Set([e]);if(this.getRecurringRelatedNotesMode()==="instance")return r;let a=t.seriesIdByEventId.get(e),i=t.eventIdsBySeriesId.has(e)?e:a;if(i){r.add(i);for(let o of(s=t.eventIdsBySeriesId.get(i))!=null?s:[])r.add(o)}return r}eventIdsMatchSeries(e,t,r){for(let a of this.getRelatedEventIds(e,r))if(t.has(a))return!0;return!1}async getRelatedNoteCountsByEventId(){let e=new Map,t=this.plugin.fieldMapper.toUserField("icsEventId"),r=this.buildEventSeriesIndex(),a=(i,s)=>{for(let o of this.normalizeEventIds(i))for(let l of this.getRelatedEventIds(o,r)){let c=e.get(l);c||(c=new Set,e.set(l,c)),c.add(s)}};try{let i=await this.plugin.cacheManager.getAllTasks();for(let o of i)a(o.icsEventId,o.path);let s=this.plugin.app.vault.getMarkdownFiles();for(let o of s){let l=this.plugin.app.metadataCache.getFileCache(o),c=l==null?void 0:l.frontmatter;c&&a(c[t],o.path)}}catch(i){return Nc.error("Error counting related notes for ICS events:",{category:"provider",operation:"counting-related-notes-ics-events",error:i}),new Map}return new Map(Array.from(e.entries()).map(([i,s])=>[i,s.size]))}normalizeEventIds(e){return(Array.isArray(e)?e:e?[e]:[]).filter(r=>typeof r=="string").map(r=>r.trim()).filter(Boolean)}async createTaskFromICS(e,t){var r;try{let a=this.plugin.icsSubscriptionService.getSubscriptions().find(l=>l.id===e.subscriptionId),i=(a==null?void 0:a.name)||"Unknown Calendar",s=(t==null?void 0:t.scheduled)!==void 0?t.scheduled:this.computeScheduledFromICSEvent(e),o={title:(t==null?void 0:t.title)||e.title,status:(t==null?void 0:t.status)||this.plugin.settings.defaultTaskStatus,priority:(t==null?void 0:t.priority)||this.plugin.settings.defaultTaskPriority,due:(t==null?void 0:t.due)!==void 0?t.due:(r=this.plugin.settings.icsIntegration)!=null&&r.useICSEndAsDue?this.computeDueFromICSEnd(e):void 0,scheduled:s,contexts:(t==null?void 0:t.contexts)||(e.location?[e.location]:void 0),projects:t==null?void 0:t.projects,tags:(t==null?void 0:t.tags)||[this.plugin.fieldMapper.toUserField("icsEventTag")],timeEstimate:(t==null?void 0:t.timeEstimate)||this.calculateEventDuration(e),details:(t==null?void 0:t.details)||this.buildICSEventDetails(e,i),icsEventId:[e.id],creationContext:"ics-event",dateCreated:qe(),dateModified:qe(),...Object.fromEntries(Object.entries(t||{}).filter(([l])=>l!=="due"))};return await this.plugin.taskService.createTask(o,{applyDefaults:!1})}catch(a){let i=a instanceof Error?a.message:String(a);throw Nc.error("Error creating task from ICS event:",{category:"provider",operation:"creating-task-ics-event",details:{icsEventId:e.id,icsEventTitle:e.title},error:i}),new Error(`Failed to create task from ICS event: ${i}`)}}computeScheduledFromICSEvent(e){try{if(!e.start)return;let t=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,r=new Date(t);return e.allDay?ae(r):D(r,"yyyy-MM-dd'T'HH:mm")}catch(t){return Nc.warn("Failed to compute scheduled from ICS event start:",{category:"provider",operation:"compute-scheduled-ics-event-start",details:{start:e.start},error:t}),e.start}}computeDueFromICSEnd(e){try{if(!e.end)return;if(e.allDay){if(!e.start)return;let a=/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,i=new Date(a);return ae(i)}let t=/^\d{4}-\d{2}-\d{2}$/.test(e.end)?e.end+"T00:00:00":e.end,r=new Date(t);return D(r,"yyyy-MM-dd'T'HH:mm")}catch(t){Nc.warn("Failed to compute due from ICS event end:",{category:"provider",operation:"compute-due-ics-event-end",details:{end:e.end},error:t});return}}async createNoteFromICS(e,t){var r;try{let a=this.plugin.icsSubscriptionService.getSubscriptions().find(_=>_.id===e.subscriptionId),i=(a==null?void 0:a.name)||"Unknown Calendar",s=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,o=new Date(s),l=(t==null?void 0:t.title)||`${e.title} - ${D(o,"PPP")}`,c=(t==null?void 0:t.folder)||((r=this.plugin.settings.icsIntegration)==null?void 0:r.defaultNoteFolder)||"",d=eN(c,{date:o,icsData:{title:e.title,location:e.location,description:e.description}}),u={title:e.title,priority:"",status:"",date:o,dueDate:e.end,scheduledDate:e.start,icsEventTitle:e.title,icsEventLocation:e.location,icsEventDescription:e.description},p=fue(u,this.plugin.settings),m=await vv(p,d,this.plugin.app.vault),f=d?`${d}/${m}.md`:`${m}.md`;d&&await qu(this.plugin.app.vault,d);let h={title:l,priority:"",status:"",contexts:e.location?[e.location]:[],tags:[this.plugin.fieldMapper.toUserField("icsEventTag")],timeEstimate:0,dueDate:e.end||"",scheduledDate:e.start||"",details:e.description||"",parentNote:"",icsEventTitle:e.title,icsEventStart:e.start,icsEventEnd:e.end||"",icsEventLocation:e.location||"",icsEventDescription:e.description||"",icsEventUrl:e.url||"",icsEventSubscription:i,icsEventId:e.id},g=this.plugin.fieldMapper.toUserField("dateCreated"),v=this.plugin.fieldMapper.toUserField("dateModified"),k={title:l,[g]:qe(),[v]:qe(),tags:[this.plugin.fieldMapper.toUserField("icsEventTag")],[this.plugin.fieldMapper.toUserField("icsEventId")]:[e.id]},T=this.buildICSEventDetails(e,i);if(t!=null&&t.template)try{let _=(0,gE.normalizePath)(t.template.trim()),F=this.plugin.app.vault.getAbstractFileByPath(_.endsWith(".md")?_:`${_}.md`);if(F instanceof gE.TFile){let I=await this.plugin.app.vault.read(F),A=dx(I,h);k={...k,...A.frontmatter},T=A.body||T}else Nc.warn(`ICS note template not found: ${_}`,{category:"provider",operation:"ics-note-template-not-found"}),ve(this.plugin.emitter,this.translate("services.icsNote.notices.templateNotFound",{path:_}))}catch(_){Nc.error("Error processing ICS note template:",{category:"provider",operation:"processing-ics-note-template",error:_}),ve(this.plugin.emitter,this.translate("services.icsNote.notices.templateProcessError",{template:t.template}))}let w=`${Object.keys(k).length>0?`---
${Object.entries(k).map(([_,F])=>`${_}: ${this.formatYamlValue(F)}`).join(`
`)}
---
`:""}${T}`,S=await this.plugin.app.vault.create(f,w),C=Array.isArray(k.tags)?k.tags.filter(_=>typeof _=="string"):[],x=typeof k[g]=="string"?k[g]:void 0,E={title:l,path:S.path,tags:C,createdDate:x,lastModified:Date.now()};return{file:S,noteInfo:E}}catch(a){let i=a instanceof Error?a.message:String(a);throw Nc.error("Error creating note from ICS event:",{category:"provider",operation:"creating-note-ics-event",details:{icsEventId:e.id,icsEventTitle:e.title},error:i}),new Error(`Failed to create note from ICS event: ${i}`)}}async findRelatedNotes(e){try{let t=[],r=new Set,a=this.plugin.fieldMapper.toUserField("icsEventId"),i=this.buildEventSeriesIndex(),s=this.getRelatedEventIds(e.id,i),o=d=>this.normalizeEventIds(d).some(u=>this.eventIdsMatchSeries(u,s,i)),l=await this.plugin.cacheManager.getAllTasks();for(let d of l)if(o(d.icsEventId)){if(r.has(d.path))continue;t.push(d),r.add(d.path)}let c=this.plugin.app.vault.getMarkdownFiles();for(let d of c)try{let u=this.plugin.app.metadataCache.getFileCache(d),p=u==null?void 0:u.frontmatter;if(p&&o(p[a])){if(r.has(d.path))continue;let m={title:p.title||d.basename,path:d.path,tags:p.tags||[],createdDate:p.dateCreated,lastModified:d.stat.mtime};t.push(m),r.add(d.path)}}catch(u){continue}return t}catch(t){return Nc.error("Error finding related notes for ICS event:",{category:"provider",operation:"finding-related-notes-ics-event",error:t}),[]}}async linkNoteToICS(e,t){try{let r=this.plugin.app.vault.getAbstractFileByPath(e);if(!(r instanceof gE.TFile))throw new Error(`Cannot find note file: ${e}`);await yr(this.plugin.app,r,a=>{let i=this.plugin.fieldMapper.toUserField("icsEventId"),s=a[i],o=s?Array.isArray(s)?[...s]:[s]:[];o.includes(t.id)||o.push(t.id),a[i]=o;let l=this.plugin.fieldMapper.toUserField("dateModified");a[l]=qe()}),ve(this.plugin.emitter,this.translate("services.icsNote.notices.linkedToEvent",{title:t.title}))}catch(r){let a=r instanceof Error?r.message:String(r);throw Nc.error("Error linking note to ICS event:",{category:"provider",operation:"linking-note-ics-event",details:{notePath:e,icsEventId:t.id},error:a}),new Error(`Failed to link note to ICS event: ${a}`)}}buildICSEventDetails(e,t){let r=[];if(r.push(`# ${e.title}`),r.push(""),e.start){let a=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,i=new Date(a);r.push(`**Start:** ${D(i,"PPPp")}`)}if(e.end&&!e.allDay){let a=/^\d{4}-\d{2}-\d{2}$/.test(e.end)?e.end+"T00:00:00":e.end,i=new Date(a);r.push(`**End:** ${D(i,"PPPp")}`)}return e.location&&r.push(`**Location:** ${e.location}`),r.push(`**Calendar:** ${t}`),e.description&&(r.push(""),r.push("## Description"),r.push(e.description)),e.url&&(r.push(""),r.push(`**Event URL:** ${e.url}`)),r.join(`
`)}formatYamlValue(e){return typeof e=="string"?e.includes(":")||e.includes("#")||e.includes("[")||e.includes("{")?`"${e.replace(/"/g,'\\"')}"`:e:Array.isArray(e)?`[${e.map(t=>typeof t=="string"?`"${t}"`:t).join(", ")}]`:String(e)}calculateEventDuration(e){if(!(!e.start||!e.end))try{let t=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,r=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.end)?e.end+"T00:00:00":e.end,a=new Date(t).getTime(),i=new Date(r).getTime();if(isNaN(a)||isNaN(i))return;let s=i-a,o=Math.round(s/(1e3*60));return o>0&&o<1440?o:void 0}catch(t){Nc.warn("Error calculating event duration:",{category:"provider",operation:"calculating-event-duration",error:t});return}}}});var GTe,_s,zk,WXt,Bk=y(()=>{GTe={TOKEN_REFRESH_BUFFER_MS:3e5,CALLBACK_PORT_START:8080,CALLBACK_PORT_END:8090},_s={REFRESH_INTERVAL_MS:900*1e3,MIN_MANUAL_REFRESH_INTERVAL_MS:30*1e3,MAX_RESULTS_PER_REQUEST:2500,VIEW_RANGE:{DAYS_BEFORE:180,DAYS_AFTER:90},DEFAULT_EVENT_DURATION_MS:3600*1e3,MAX_REMINDER_MINUTES:40320,RATE_LIMIT:{MAX_RETRIES:3,INITIAL_BACKOFF_MS:1e3,MAX_BACKOFF_MS:16e3,BACKOFF_MULTIPLIER:2}},zk={REFRESH_INTERVAL_MS:900*1e3,MIN_MANUAL_REFRESH_INTERVAL_MS:30*1e3,MAX_RESULTS_PER_REQUEST:50,VIEW_RANGE:{DAYS_BEFORE:30,DAYS_AFTER:90},DEFAULT_EVENT_DURATION_MS:3600*1e3,RATE_LIMIT:{MAX_RETRIES:3,INITIAL_BACKOFF_MS:1e3,MAX_BACKOFF_MS:16e3,BACKOFF_MULTIPLIER:2}},WXt={SECOND_MS:1e3,MINUTE_MS:60*1e3,HOUR_MS:3600*1e3,DAY_MS:1440*60*1e3}});var yE,vE,Ki,Oh,XR,wa,am,jk,Co,im,$k=y(()=>{yE=class extends Error{constructor(t,r){super(t);this.code=r;this.name="TaskNotesServiceError",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},vE=class extends yE{constructor(t,r,a){super(t,a);this.provider=r;this.name="OAuthError"}},Ki=class extends vE{constructor(e){super(`${e} authentication expired. Please reconnect.`,e,"TOKEN_EXPIRED"),this.name="TokenExpiredError"}},Oh=class extends vE{constructor(t,r,a){let i=`${t} connection expired. Please reconnect in Settings > Integrations.`;super(i,t,"TOKEN_REFRESH_FAILED");this.oauthErrorCode=r;this.oauthErrorDescription=a;this.name="TokenRefreshError"}},XR=class extends vE{constructor(e){super(`${e} OAuth is not configured. Please provide OAuth credentials in settings.`,e,"NOT_CONFIGURED"),this.name="OAuthNotConfiguredError"}},wa=class extends yE{constructor(t,r,a){super(t,a);this.statusCode=r;this.name="GoogleCalendarError"}},am=class extends wa{constructor(e){super(`Calendar event not found: ${e}`,404,"EVENT_NOT_FOUND"),this.name="EventNotFoundError"}},jk=class extends wa{constructor(e){super(`Calendar not found: ${e}`,404,"CALENDAR_NOT_FOUND"),this.name="CalendarNotFoundError"}},Co=class extends wa{constructor(e){let t=e?`Rate limit exceeded. Retry after ${e} seconds.`:"Rate limit exceeded. Please try again later.";super(t,429,"RATE_LIMIT"),this.name="RateLimitError"}},im=class extends yE{constructor(t,r){super(t,"VALIDATION_ERROR");this.field=r;this.name="ValidationError"}}});function B5e(){if(sm.Platform.isDesktop&&sm.Platform.isDesktopApp)return aq||(aq=require("http")),aq;throw new Error("OAuth redirect handling is only available on desktop.")}var sm,xo,aq,e_,YTe=y(()=>{sm=require("obsidian");Bk();$k();q();Oi();xo=M({tag:"Services/OAuthService"}),aq=null;e_=class{constructor(e,t){this.callbackServer=null;this.pendingOAuthState=new Map;this.tokenRefreshPromises=new Map;this.connectionGenerations=new Map;this.configs={google:{provider:"google",clientId:"",redirectUri:"http://127.0.0.1:8080",scope:["https://www.googleapis.com/auth/calendar.readonly","https://www.googleapis.com/auth/calendar.events"],authorizationEndpoint:"https://accounts.google.com/o/oauth2/v2/auth",tokenEndpoint:"https://oauth2.googleapis.com/token",deviceCodeEndpoint:"https://oauth2.googleapis.com/device/code",revocationEndpoint:"https://oauth2.googleapis.com/revoke"},microsoft:{provider:"microsoft",clientId:"",redirectUri:"http://localhost:8080",scope:["Calendars.Read","Calendars.ReadWrite","offline_access"],authorizationEndpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",tokenEndpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",deviceCodeEndpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",revocationEndpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout"}};this.authenticationInProgress=!1;this.plugin=e,this.secretStore=t}getCredentials(e){return this.secretStore.getCredentials(e)}setCredentials(e,t){this.secretStore.setCredentials(e,t)}clearCredentials(e){this.secretStore.clearCredentials(e)}getConfig(e){var r;let t=this.secretStore.getCredentials(e);return{...this.configs[e],clientId:(r=t==null?void 0:t.clientId)!=null?r:"",clientSecret:t==null?void 0:t.clientSecret}}async authenticate(e){if(!this.getConfig(e).clientId)throw new XR(e);return await this.authenticateStandard(e)}async authenticateStandard(e){if(this.authenticationInProgress)throw new Error("An OAuth authorization is already in progress");this.authenticationInProgress=!0;try{let t=this.getConfig(e);if(!sm.Platform.isDesktopApp)throw ve(this.plugin.emitter,"OAUTH authentication requires the desktop app."),new Error("OAuth authentication requires the desktop app.");let r=this.generateCodeVerifier(),a=await this.generateCodeChallenge(r),i=this.generateState(),s=await this.startCallbackServer(0),o=t.redirectUri;t.redirectUri=`http://127.0.0.1:${s}`;try{let l=this.buildAuthorizationUrl(t,a,i);this.pendingOAuthState.set(i,{provider:e,codeVerifier:r,resolve:()=>{},reject:()=>{}}),ve(this.plugin.emitter,`Opening browser for ${e} authorization...`);let c=this.waitForCallback(i,3e5);this.openAuthorizationUrl(l).catch(p=>{var m;(m=this.pendingOAuthState.get(i))==null||m.reject(p instanceof Error?p:new Error("Could not open OAuth browser"))});let d=await c,u=await this.exchangeCodeForTokens(t,d,r);await this.storeConnection(e,u),ve(this.plugin.emitter,`Successfully connected to ${e} Calendar!`)}finally{let l=this.pendingOAuthState.get(i);this.pendingOAuthState.delete(i),l==null||l.reject(new Error("OAuth flow ended before authorization")),t.redirectUri=o}}catch(t){throw xo.error(`OAuth authentication failed for ${e}:`,{category:"provider",operation:"oauth-authentication",error:t}),ve(this.plugin.emitter,`Failed to connect to ${e}: ${t.message}`),t}finally{try{await this.stopCallbackServer()}finally{this.authenticationInProgress=!1}}}async openAuthorizationUrl(e){try{let r=require("electron").shell;if(r!=null&&r.openExternal){await r.openExternal(e);return}}catch(t){xo.warn("Failed to open OAuth URL in system browser; falling back to window.open.",{category:"provider",operation:"oauth-open-external",error:t})}window.open(e,"_blank")}generateCodeVerifier(){return this.base64UrlEncode(crypto.getRandomValues(new Uint8Array(32)))}async generateCodeChallenge(e){let t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t);return this.base64UrlEncode(new Uint8Array(r))}generateState(){return Array.from(crypto.getRandomValues(new Uint8Array(16))).map(e=>e.toString(16).padStart(2,"0")).join("")}base64UrlEncode(e){let t="";return e.forEach(r=>{t+=String.fromCharCode(r)}),btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}buildAuthorizationUrl(e,t,r){let a=new URLSearchParams({client_id:e.clientId,redirect_uri:e.redirectUri,response_type:"code",scope:e.scope.join(" "),state:r,code_challenge:t,code_challenge_method:"S256"});return e.provider==="google"&&(a.set("access_type","offline"),a.set("prompt","consent")),`${e.authorizationEndpoint}?${a.toString()}`}async startCallbackServer(e){return new Promise((t,r)=>{if(this.callbackServer){r(new Error("An OAuth callback is already pending"));return}let a;try{a=B5e()}catch(i){r(i instanceof Error?i:new Error(String(i)));return}this.callbackServer=a.createServer((i,s)=>{this.handleCallback(i,s)}),this.callbackServer.once("error",i=>{xo.error("OAuth callback server error:",{category:"provider",operation:"oauth-callback-server",error:i}),r(i)}),this.callbackServer.listen(e,"127.0.0.1",()=>{var s,o;let i=(o=(s=this.callbackServer)==null?void 0:s.address)==null?void 0:o.call(s);if(!i||typeof i=="string"){r(new Error("OAuth listener did not expose its bound port"));return}t(i.port)})})}async stopCallbackServer(){return new Promise(e=>{if(!this.callbackServer){e();return}let t=this.callbackServer;this.callbackServer=null,t.close(()=>e())})}handleCallback(e,t){let r={"Content-Type":"text/html; charset=utf-8","Content-Security-Policy":"default-src 'none'; frame-ancestors 'none'; base-uri 'none'","X-Content-Type-Options":"nosniff","Cache-Control":"no-store"},a;try{a=new URL(e.url||"/","http://127.0.0.1")}catch(c){t.writeHead(400,r),t.end("<!doctype html><title>Invalid callback</title>");return}let i=a.searchParams.get("state"),s=i?this.pendingOAuthState.get(i):void 0,o=a.searchParams.get("code"),l=a.searchParams.get("error");if(e.method!=="GET"||a.pathname!=="/"||!i||!s||!o&&!l){t.writeHead(400,r),t.end("<!doctype html><title>Invalid callback</title><p>No pending authorization matches this callback.</p>");return}this.pendingOAuthState.delete(i),t.writeHead(l?400:200,r),t.end(l?"<!doctype html><title>Authorization failed</title><p>Authorization was not completed. Return to Obsidian.</p>":"<!doctype html><title>Authorization complete</title><p>You can close this window and return to Obsidian.</p>"),l?s.reject(new Error("OAuth authorization failed")):s.resolve(o)}waitForCallback(e,t){return new Promise((r,a)=>{let i=this.pendingOAuthState.get(e);if(!i){a(new Error("Invalid OAuth state"));return}i.resolve=o=>{window.clearTimeout(s),r(o)},i.reject=o=>{window.clearTimeout(s),a(o)};let s=window.setTimeout(()=>{this.pendingOAuthState.has(e)&&(this.pendingOAuthState.delete(e),a(new Error("OAuth timeout - authorization took too long")))},t)})}async exchangeCodeForTokens(e,t,r){let a={client_id:e.clientId,code:t,code_verifier:r,redirect_uri:e.redirectUri,grant_type:"authorization_code"};e.clientSecret&&(a.client_secret=e.clientSecret);let i=new URLSearchParams(a);try{let s=await(0,sm.requestUrl)({url:e.tokenEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:i.toString(),throw:!1});if(s.status!==200)throw xo.error("Token exchange failed with status:",{category:"provider",operation:"token-exchange-status",details:{value:s.status}}),xo.error("Response headers:",{category:"provider",operation:"response-headers",details:{value:s.headers}}),xo.error("Response body:",{category:"provider",operation:"response-body",details:{value:s.text}}),xo.error("Response JSON:",{category:"provider",operation:"response-json",details:{value:s.json}}),new Error(`Token exchange failed with status ${s.status}: ${s.text||JSON.stringify(s.json)}`);let o=s.json;if(!o.access_token)throw new Error("No access token in response");let l=o.expires_in||3600,c=Date.now()+l*1e3;return{accessToken:o.access_token,refreshToken:o.refresh_token,expiresAt:c,scope:o.scope||e.scope.join(" "),tokenType:o.token_type||"Bearer"}}catch(s){throw xo.error("Token exchange error:",{category:"provider",operation:"token-exchange",error:s}),new Error(`Failed to exchange code for tokens: ${s.message}`)}}async refreshToken(e){var o;let t=await this.getConnection(e);if(!t)throw new Error(`No ${e} connection found`);if(!t.tokens.refreshToken)throw new Error(`No refresh token available for ${e}`);let r=(o=this.connectionGenerations.get(e))!=null?o:0,a=this.getConfig(e),i={client_id:a.clientId,refresh_token:t.tokens.refreshToken,grant_type:"refresh_token"};a.clientSecret&&(i.client_secret=a.clientSecret);let s=new URLSearchParams(i);try{let l=await(0,sm.requestUrl)({url:a.tokenEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:s.toString(),throw:!1});if(l.status!==200){let m,f;try{let g=l.json;m=g==null?void 0:g.error,f=g==null?void 0:g.error_description}catch(g){}throw xo.error("[OAuth] Token refresh failed:",{category:"provider",operation:"token-refresh",details:{status:l.status,description:f},error:m}),l.status===401||l.status===400&&(m==="invalid_grant"||m==="invalid_client")?this.clearConnection(e,r)?(ve(this.plugin.emitter,`${e} connection expired. Please reconnect in Settings > Integrations.`),new Oh(e,m,f)):new Error(`${e} OAuth connection changed during token refresh`):new Error(`Token refresh failed with status ${l.status}: ${m||l.text||"Unknown error"}`)}let c=l.json;if(!c.access_token)throw new Error("No access token in refresh response");let d=c.expires_in||3600,u=Date.now()+d*1e3,p={accessToken:c.access_token,refreshToken:c.refresh_token||t.tokens.refreshToken,expiresAt:u,scope:c.scope||t.tokens.scope,tokenType:c.token_type||"Bearer"};return await this.storeConnection(e,p,t.userEmail,r),p}catch(l){throw l instanceof Oh?l:(xo.error("Token refresh failed:",{category:"provider",operation:"token-refresh",error:l}),new Error(`Failed to refresh ${e} token: ${l.message}`))}}clearConnection(e,t){var a;let r=(a=this.connectionGenerations.get(e))!=null?a:0;return t!==void 0&&t!==r?!1:(this.secretStore.clearConnection(e),this.connectionGenerations.set(e,r+1),!0)}async getValidToken(e,t){this.assertExpectedConnectionGeneration(e,t);let r=await this.getConnection(e);if(this.assertExpectedConnectionGeneration(e,t),!r)throw new Ki(e);let a=Date.now(),i=GTe.TOKEN_REFRESH_BUFFER_MS;if(r.tokens.expiresAt-i<a){let s=this.tokenRefreshPromises.get(e);if(s){let c=await s;return this.assertExpectedConnectionGeneration(e,t),c.accessToken}let o=this.refreshToken(e).finally(()=>{this.tokenRefreshPromises.delete(e)});this.tokenRefreshPromises.set(e,o);let l=await o;return this.assertExpectedConnectionGeneration(e,t),l.accessToken}return this.assertExpectedConnectionGeneration(e,t),r.tokens.accessToken}assertExpectedConnectionGeneration(e,t){if(t!==void 0&&this.getConnectionGeneration(e)!==t)throw new Error(`${e} OAuth connection changed during calendar operation`)}async storeConnection(e,t,r,a){var s,o;if(a!==void 0&&a!==((s=this.connectionGenerations.get(e))!=null?s:0))throw new Error(`${e} OAuth connection changed during token refresh`);let i={provider:e,tokens:t,userEmail:r,connectedAt:new Date().toISOString(),lastRefreshed:new Date().toISOString()};if(this.secretStore.setConnection(e,i),a===void 0){let l=(o=this.connectionGenerations.get(e))!=null?o:0;this.connectionGenerations.set(e,l+1)}}async getConnection(e){return this.secretStore.getConnection(e)}async isConnected(e){return await this.getConnection(e)!==null}getConnectionGeneration(e){var t;return(t=this.connectionGenerations.get(e))!=null?t:0}async isConnectionGenerationCurrent(e,t){return this.getConnectionGeneration(e)===t&&await this.isConnected(e)}async disconnect(e){let t=this.getConnectionGeneration(e),r=await this.getConnection(e);r&&this.clearConnection(e,t)&&(await this.revokeToken(e,r.tokens.accessToken),r.tokens.refreshToken&&await this.revokeToken(e,r.tokens.refreshToken),ve(this.plugin.emitter,`Disconnected from ${e} Calendar`))}async revokeToken(e,t){let r=this.getConfig(e);if(!r.revocationEndpoint){xo.warn(`No revocation endpoint configured for ${e}`,{category:"provider",operation:"no-revocation-endpoint-configured"});return}try{await(0,sm.requestUrl)({url:r.revocationEndpoint,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({token:t,...r.clientId&&{client_id:r.clientId}}).toString(),throw:!1})}catch(a){xo.error(`[OAuth] Failed to revoke token for ${e}:`,{category:"provider",operation:"revoke-token",error:a})}}async destroy(){for(let e of this.pendingOAuthState.values())e.reject(new Error("OAuth authorization cancelled"));this.pendingOAuthState.clear(),await this.stopCallbackServer(),this.tokenRefreshPromises.clear(),this.connectionGenerations.clear()}}});function iq(n,e){if(!n||n.trim()==="")throw new im(`${e} cannot be empty`,e)}function Eo(n,e){if(n==null)throw new im(`${e} is required`,e)}function t_(n){if(iq(n,"Calendar ID"),!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$|^[a-zA-Z0-9_-]+$|^[a-zA-Z0-9+/]+=*$/.test(n))throw new im("Invalid calendar ID format. Expected email-like, alphanumeric, or Base64 format.","calendarId")}function j5e(n){for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);if(t<32||t===127)return!0}return!1}function r_(n){if(iq(n,"Calendar ID"),j5e(n))throw new im("Invalid calendar ID format. Microsoft calendar IDs cannot contain control characters.","calendarId")}function Uk(n){if(iq(n,"Event ID"),!/^[a-zA-Z0-9_+/=-]+$/.test(n))throw new im("Invalid event ID format. Expected alphanumeric or Base64 format.","eventId")}var sq=y(()=>{$k()});function G5e(n){return V5e.test(n)||W5e.test(n)||q5e.test(n)}function Y5e(n){return $5e.has(n)?2:U5e.has(n)?1:0}function K5e(n,e){var i;let t=[];n.childNodes.forEach(s=>oq(s,t));let r=QTe(ZTe(t)),a=((i=n.getAttribute("href"))!=null?i:"").trim();if(!a||a===r){e.push(r);return}if(!r){e.push(a);return}e.push(`${r} (${a})`)}function oq(n,e){var i;if(n.nodeType===3){e.push((i=n.textContent)!=null?i:"");return}if(n.nodeType!==1)return;let t=n,r=t.tagName.toUpperCase();if(H5e.has(r))return;if(r==="BR"){e.push({weight:1});return}if(r==="A"){K5e(t,e);return}let a=Y5e(r);a>0&&e.push({weight:a}),r==="LI"&&e.push("- "),t.childNodes.forEach(s=>oq(s,e)),a>0&&e.push({weight:a})}function ZTe(n){let e="",t=0;for(let r of n){if(typeof r!="string"){t=Math.max(t,r.weight);continue}r.length!==0&&(t>0&&r.trim().length===0||(e.length>0&&t>0&&(e+=`
`.repeat(t)),t=0,e+=r))}return e}function QTe(n){return n.replace(/\u00a0/g," ").replace(/\r\n?/g,`
`).split(`
`).map(e=>e.replace(/[ \t]+/g," ").trim()).join(`
`).replace(/\n{3,}/g,`
`).trim()}function Z5e(n){let e=(0,KTe.sanitizeHTMLToDom)(n),t=[];return e.childNodes.forEach(r=>oq(r,t)),QTe(ZTe(t))}function JTe(n){if(typeof n!="string"||n.length===0)return;if(!G5e(n))return n;let e=Z5e(n);return e.length>0?e:void 0}var KTe,$5e,U5e,H5e,V5e,W5e,q5e,XTe=y(()=>{KTe=require("obsidian"),$5e=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DL","FIELDSET","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"]),U5e=new Set(["DD","DIV","DT","FIGCAPTION","LI","TBODY","TD","TFOOT","TH","THEAD","TR"]),H5e=new Set(["SCRIPT","STYLE","TEMPLATE","HEAD"]),V5e=/<([a-z][\w:-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1\s*>/i,W5e=/<(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)(?:\s[^>]*)?\/?\s*>/i,q5e=/<!--[\s\S]*?-->/});var om,Do,Q5e,n_,ebe=y(()=>{om=require("obsidian");Cr();Bk();$k();sq();nm();q();Oi();XTe();Do=M({tag:"Services/GoogleCalendarService"}),Q5e={1:"#a4bdfc",2:"#7ae7bf",3:"#dbadff",4:"#ff887c",5:"#fbd75b",6:"#ffb878",7:"#46d6db",8:"#e1e1e1",9:"#5484ed",10:"#51b749",11:"#dc2127"},n_=class extends Ok{constructor(t,r){super();this.providerId="google";this.providerName="Google Calendar";this.baseUrl="https://www.googleapis.com/calendar/v3";this.cache=new Map;this.refreshTimer=null;this.availableCalendars=[];this.calendarColors=new Map;this.lastManualRefresh=0;this.plugin=t,this.oauthService=r}sleep(t){return new Promise(r=>window.setTimeout(r,t))}async withRetry(t,r){let{MAX_RETRIES:a,INITIAL_BACKOFF_MS:i,MAX_BACKOFF_MS:s,BACKOFF_MULTIPLIER:o}=_s.RATE_LIMIT,l=null,c=i;for(let d=0;d<=a;d++)try{return await t()}catch(u){l=u;let p=u.status===429,m=u.status>=500&&u.status<600,f=d===a;if(!p&&!m)throw u;if(f)throw Do.error(`[GoogleCalendar] ${r} failed after ${a} retries`,{category:"provider",operation:"retry-google-calendar-request",details:{context:r,attempts:a},error:u}),u;let h=Math.random()*.3*c,g=Math.min(c+h,s);Do.warn("Google Calendar request failed and will be retried",{category:"provider",operation:"retry-google-calendar-request",details:{context:r,status:u.status,delayMs:Math.round(g),nextAttempt:d+1,maxRetries:a},error:u}),await this.sleep(g),c=Math.min(c*o,s)}throw l instanceof Error?l:new Error(String(l))}getAvailableCalendars(){return this.availableCalendars}getConnectionGeneration(){return this.oauthService.getConnectionGeneration("google")}async isConnectionGenerationCurrent(t){return this.oauthService.isConnectionGenerationCurrent("google",t)}getEnabledCalendarIds(){return this.plugin.settings.enabledGoogleCalendars.length===0?this.availableCalendars.map(t=>t.id):this.plugin.settings.enabledGoogleCalendars}getSyncToken(t){return this.plugin.settings.googleCalendarSyncTokens[t]}async saveSyncToken(t,r){this.plugin.settings.googleCalendarSyncTokens[t]!==r&&(this.plugin.settings.googleCalendarSyncTokens[t]=r,await this.persistSettingsDataOnly())}async clearSyncToken(t){t in this.plugin.settings.googleCalendarSyncTokens&&(delete this.plugin.settings.googleCalendarSyncTokens[t],await this.persistSettingsDataOnly())}async persistSettingsDataOnly(){let t=this.plugin.saveSettingsDataOnly;typeof t=="function"&&await t.call(this.plugin)}async initialize(){await this.oauthService.isConnected("google")&&(await this.refreshAllCalendars(),this.startRefreshTimer())}startRefreshTimer(){this.refreshTimer&&window.clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout(()=>{this.refreshTimer=null,this.refreshAllCalendars().catch(t=>{Do.error("Google Calendar refresh failed:",{category:"provider",operation:"google-calendar-refresh",error:t})}).finally(()=>{this.oauthService.isConnected("google").then(t=>{t&&this.startRefreshTimer()})})},_s.REFRESH_INTERVAL_MS)}stopRefreshTimer(){this.refreshTimer&&(window.clearTimeout(this.refreshTimer),this.refreshTimer=null)}async listCalendars(){try{return await this.withRetry(async()=>{let t=await this.oauthService.getValidToken("google"),i=(await(0,om.requestUrl)({url:`${this.baseUrl}/users/me/calendarList`,method:"GET",headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}})).json.items||[],s=[];for(let o of i)o.backgroundColor&&this.calendarColors.set(o.id,o.backgroundColor),s.push({id:o.id,summary:o.summary,description:o.description,backgroundColor:o.backgroundColor,primary:o.primary||!1});return s},"List calendars")}catch(t){throw Do.error("Failed to list calendars:",{category:"provider",operation:"list-calendars",error:t}),new wa(`Failed to fetch calendar list: ${t.message}`,t.status)}}async fetchCalendarEvents(t,r,a){try{let i=await this.oauthService.getValidToken("google"),s=this.getSyncToken(t),o=[],l,c,d=!s,u=!1,p,m;if(!s){let f=new Date;p=r||new Date(f.getTime()-_s.VIEW_RANGE.DAYS_BEFORE*24*60*60*1e3),m=a||new Date(f.getTime()+_s.VIEW_RANGE.DAYS_AFTER*24*60*60*1e3)}do try{let f=new URLSearchParams({singleEvents:"true",maxResults:_s.MAX_RESULTS_PER_REQUEST.toString()});s?f.set("syncToken",s):(f.set("timeMin",p.toISOString()),f.set("timeMax",m.toISOString()),f.set("orderBy","startTime")),l&&f.set("pageToken",l);let g=(await this.withRetry(async()=>await(0,om.requestUrl)({url:`${this.baseUrl}/calendars/${encodeURIComponent(t)}/events?${f.toString()}`,method:"GET",headers:{Authorization:`Bearer ${i}`,Accept:"application/json"}}),`Fetch events for ${t}`)).json,v=g.items||[];!d&&v.some(k=>k.status==="cancelled")&&(u=!0),o.push(...v),l=g.nextPageToken,g.nextSyncToken&&(c=g.nextSyncToken)}catch(f){if(f.status===410)return await this.clearSyncToken(t),await this.fetchCalendarEvents(t,r,a);throw f}while(l);return c&&await this.saveSyncToken(t,c),{events:o,isFullSync:d,hasDeletes:u}}catch(i){throw Do.error(`Failed to fetch events from calendar ${t}:`,{category:"provider",operation:"fetch-events-calendar",error:i}),new Error(`Failed to fetch calendar events: ${i.message}`)}}getCalendarColor(t){let r=this.calendarColors.get(t);if(r)return r;let a=rm(this.availableCalendars,t);return a?this.calendarColors.get(a.id):void 0}convertToICSEvent(t,r){var c,d;let a,i,s;if(t.start.date)a=t.start.date,i=(c=t.end)==null?void 0:c.date,s=!0;else{let u=new Date(t.start.dateTime),p=(d=t.end)!=null&&d.dateTime?new Date(t.end.dateTime):void 0;a=D(u,"yyyy-MM-dd'T'HH:mm:ss"),i=p?D(p,"yyyy-MM-dd'T'HH:mm:ss"):void 0,s=!1}let o;t.colorId&&(o=Q5e[t.colorId]),o||(o=this.getCalendarColor(r)),o||(o="#4285F4");let l=t.recurringEventId?`google-${r}-${t.recurringEventId}`:void 0;return{id:`google-${r}-${t.id}`,subscriptionId:`google-${r}`,title:t.summary||"Untitled Event",description:JTe(t.description),start:a,end:i,allDay:s,location:t.location,url:t.htmlLink,recurringEventId:l,color:o}}async refreshAllCalendars(t={}){try{if(!await this.oauthService.isConnected("google"))return;this.availableCalendars=await this.listCalendars();let a=this.getEnabledCalendarIds(),i=this.cache.get("all")||[];for(let s of a)try{let{events:o,isFullSync:l}=await this.fetchCalendarEvents(s);if(l){i=i.filter(d=>d.subscriptionId!==`google-${s}`);let c=o.filter(d=>d.status!=="cancelled").map(d=>this.convertToICSEvent(d,s));i.push(...c)}else for(let c of o){let d=`google-${s}-${c.id}`,u=i.findIndex(p=>p.id===d);if(c.status==="cancelled")u!==-1&&i.splice(u,1);else{let p=this.convertToICSEvent(c,s);u!==-1?i[u]=p:i.push(p)}}}catch(o){Do.error(`Failed to fetch events from calendar ${s}:`,{category:"provider",operation:"fetch-events-calendar",error:o})}this.cache.set("all",i),this.emit("data-changed")}catch(r){if(Do.error("Failed to refresh Google calendars:",{category:"provider",operation:"refresh-google-calendars",error:r}),r.message&&r.message.includes("401")&&Do.warn("[GoogleCalendar] Authentication expired - caller should handle re-authentication",{category:"provider",operation:"authentication-expired-caller-should-handle-re-authentication"}),t.propagateErrors)throw r}}getAllEvents(){return this.cache.get("all")||[]}getCachedEvents(){return this.getAllEvents()}async getEvents(t,r,a){let{events:i}=await this.fetchCalendarEvents(t,r,a);return i.filter(s=>s.status!=="cancelled").map(s=>this.convertToICSEvent(s,t))}async manualRefresh(){return this.refresh()}async refresh(){let r=Date.now()-this.lastManualRefresh,a=_s.MIN_MANUAL_REFRESH_INTERVAL_MS;if(r<a){let i=a-r;ve(this.plugin.emitter,`Please wait ${Math.ceil(i/1e3)}s before refreshing again`);return}await this.refreshAllCalendars({propagateErrors:!0}),this.lastManualRefresh=Date.now()}clearCache(){this.cache.clear()}async updateEvent(t,r,a,i){t_(t),Uk(r),Eo(a,"updates");try{let s=await this.oauthService.getValidToken("google",i),c={...(await this.withRetry(async()=>await(0,om.requestUrl)({url:`${this.baseUrl}/calendars/${encodeURIComponent(t)}/events/${encodeURIComponent(r)}`,method:"GET",headers:{Authorization:`Bearer ${s}`,Accept:"application/json"}}),`Get event ${r}`)).json};c.status==="cancelled"&&(c.status="confirmed"),(a.title!==void 0||a.summary!==void 0)&&(c.summary=a.summary||a.title),a.description!==void 0&&(c.description=a.description),a.location!==void 0&&(c.location=a.location),a.reminders!==void 0&&(c.reminders=a.reminders),a.colorId!==void 0&&(c.colorId=a.colorId),a.recurrence!==void 0&&(c.recurrence=a.recurrence),a.start!==void 0&&(typeof a.start=="string"?a.isAllDay||!/T/.test(a.start)?c.start={date:a.start}:c.start={dateTime:a.start,timeZone:"UTC"}:c.start=a.start),a.end!==void 0&&(typeof a.end=="string"?a.isAllDay||!/T/.test(a.end)?c.end={date:a.end}:c.end={dateTime:a.end,timeZone:"UTC"}:c.end=a.end),c.start&&(c.start.date?(delete c.start.dateTime,delete c.start.timeZone):c.start.dateTime&&delete c.start.date),c.end&&(c.end.date?(delete c.end.dateTime,delete c.end.timeZone):c.end.dateTime&&delete c.end.date);let u=(await this.withRetry(async()=>await(0,om.requestUrl)({url:`${this.baseUrl}/calendars/${encodeURIComponent(t)}/events/${encodeURIComponent(r)}`,method:"PUT",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(c)}),`Update event ${r}`)).json,p=this.convertToICSEvent(u,t);return await this.refreshAllCalendars(),p}catch(s){throw Do.error("Failed to update Google Calendar event:",{category:"provider",operation:"update-google-calendar-event",error:s}),s.status===404?new am(r):s.status===401||s.status===403?new Ki("google"):s.status===429?new Co:new wa(`Failed to update event: ${s.message}`,s.status)}}async createEvent(t,r,a){t_(t),Eo(r,"event");let i=r.summary||r.title;Eo(i,"event.summary"),Eo(r.start,"event.start"),Eo(r.end,"event.end");try{let s=await this.oauthService.getValidToken("google",a),o={summary:i,description:r.description,location:r.location};r.reminders&&(o.reminders=r.reminders),r.colorId&&(o.colorId=r.colorId),r.recurrence&&r.recurrence.length>0&&(o.recurrence=r.recurrence),typeof r.start=="string"?r.isAllDay||!/T/.test(r.start)?(o.start={date:r.start},o.end={date:r.end}):(o.start={dateTime:r.start,timeZone:"UTC"},o.end={dateTime:r.end,timeZone:"UTC"}):(o.start=r.start,o.end=typeof r.end=="string"?{dateTime:r.end,timeZone:"UTC"}:r.end);let c=(await this.withRetry(async()=>await(0,om.requestUrl)({url:`${this.baseUrl}/calendars/${encodeURIComponent(t)}/events`,method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)}),`Create event in ${t}`)).json,d=this.convertToICSEvent(c,t);return await this.refreshAllCalendars(),d}catch(s){throw Do.error("Failed to create Google Calendar event:",{category:"provider",operation:"create-google-calendar-event",error:s}),s.status===404?new jk(t):s.status===401||s.status===403?new Ki("google"):s.status===429?new Co:new wa(`Failed to create event: ${s.message}`,s.status)}}async deleteEvent(t,r,a){t_(t),Uk(r);try{let i=await this.oauthService.getValidToken("google",a);await this.withRetry(async()=>await(0,om.requestUrl)({url:`${this.baseUrl}/calendars/${encodeURIComponent(t)}/events/${encodeURIComponent(r)}`,method:"DELETE",headers:{Authorization:`Bearer ${i}`}}),`Delete event ${r}`),await this.refreshAllCalendars()}catch(i){if(i.status===410)return;throw Do.error("Failed to delete Google Calendar event:",{category:"provider",operation:"delete-google-calendar-event",error:i}),i.status===404?new am(r):i.status===401||i.status===403?new Ki("google"):i.status===429?new Co:new wa(`Failed to delete event: ${i.message}`,i.status)}}async createCalendar(t,r){try{let a=await this.oauthService.getValidToken("google"),s=(await this.withRetry(async()=>await(0,om.requestUrl)({url:`${this.baseUrl}/calendars`,method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({summary:t,description:r,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}),"Create calendar")).json;return this.availableCalendars=await this.listCalendars(),s.id}catch(a){throw Do.error("Failed to create calendar:",{category:"provider",operation:"create-calendar",error:a}),a.status===401||a.status===403?new Ki("google"):a.status===429?new Co:new wa(`Failed to create calendar: ${a.message}`,a.status)}}destroy(){this.stopRefreshTimer(),this.cache.clear(),this.removeAllListeners()}}});var zh,yi,a_,tbe=y(()=>{zh=require("obsidian");Cr();Bk();$k();sq();nm();q();Oi();yi=M({tag:"Services/MicrosoftCalendarService"}),a_=class extends Ok{constructor(t,r){super();this.providerId="microsoft";this.providerName="Microsoft Calendar";this.baseUrl="https://graph.microsoft.com/v1.0";this.cache=new Map;this.refreshTimer=null;this.availableCalendars=[];this.lastManualRefresh=0;this.syncStatus={lastAttempt:null,lastSuccess:null,lastError:null,calendarErrors:[],calendarsChecked:0,eventsLoaded:0};this.plugin=t,this.oauthService=r}sleep(t){return new Promise(r=>window.setTimeout(r,t))}async withRetry(t,r){let{MAX_RETRIES:a,INITIAL_BACKOFF_MS:i,MAX_BACKOFF_MS:s,BACKOFF_MULTIPLIER:o}=zk.RATE_LIMIT,l=null,c=i;for(let d=0;d<=a;d++)try{return await t()}catch(u){l=u;let p=u.status===429,m=u.status>=500&&u.status<600,f=d===a;if(!p&&!m)throw u;if(f)throw yi.error(`[MicrosoftCalendar] ${r} failed after ${a} retries`,{category:"provider",operation:"retry-microsoft-calendar-request",details:{context:r,attempts:a},error:u}),u;let h=Math.random()*.3*c,g=Math.min(c+h,s);yi.warn("Microsoft Calendar request failed and will be retried",{category:"provider",operation:"retry-microsoft-calendar-request",details:{context:r,status:u.status,delayMs:Math.round(g),nextAttempt:d+1,maxRetries:a},error:u}),await this.sleep(g),c=Math.min(c*o,s)}throw l instanceof Error?l:new Error(String(l))}getAvailableCalendars(){return this.availableCalendars}getSyncStatus(){return{...this.syncStatus,calendarErrors:this.syncStatus.calendarErrors.map(t=>({...t}))}}getEnabledCalendarIds(){return this.plugin.settings.enabledMicrosoftCalendars.length===0?this.availableCalendars.map(t=>t.id):this.plugin.settings.enabledMicrosoftCalendars}getSyncToken(t){var r;return(r=this.plugin.settings.microsoftCalendarSyncTokens)==null?void 0:r[t]}async saveSyncToken(t,r){this.plugin.settings.microsoftCalendarSyncTokens||(this.plugin.settings.microsoftCalendarSyncTokens={}),this.plugin.settings.microsoftCalendarSyncTokens[t]!==r&&(this.plugin.settings.microsoftCalendarSyncTokens[t]=r,await this.persistSettingsDataOnly())}async clearSyncToken(t){this.plugin.settings.microsoftCalendarSyncTokens&&t in this.plugin.settings.microsoftCalendarSyncTokens&&(delete this.plugin.settings.microsoftCalendarSyncTokens[t],await this.persistSettingsDataOnly())}async persistSettingsDataOnly(){let t=this.plugin.saveSettingsDataOnly;typeof t=="function"&&await t.call(this.plugin)}getErrorMessage(t){if(t instanceof Error)return t.message;if(typeof t=="object"&&t!==null&&"message"in t){let r=t.message;if(typeof r=="string")return r}return String(t)}getErrorStatus(t){if(typeof t!="object"||t===null)return;let r=t.status;if(typeof r=="number")return r;let a=t.statusCode;return typeof a=="number"?a:void 0}createSyncError(t,r){return{calendarId:r==null?void 0:r.id,calendarName:r==null?void 0:r.summary,message:this.getErrorMessage(t),status:this.getErrorStatus(t),occurredAt:new Date().toISOString()}}formatSyncErrorSummary(t){if(t.length===0)return null;let r=t[0],a=r.calendarName||r.calendarId||"Microsoft calendar";return t.length===1?`${a}: ${r.message}`:`${t.length} Microsoft calendars failed to refresh. First error: ${a}: ${r.message}`}async initialize(){await this.oauthService.isConnected("microsoft")&&(await this.refreshAllCalendars(),this.startRefreshTimer())}startRefreshTimer(){this.refreshTimer&&window.clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout(()=>{this.refreshTimer=null,this.refreshAllCalendars().catch(t=>{yi.error("Microsoft Calendar refresh failed:",{category:"provider",operation:"microsoft-calendar-refresh",error:t})}).finally(()=>{this.oauthService.isConnected("microsoft").then(t=>{t&&this.startRefreshTimer()})})},zk.REFRESH_INTERVAL_MS)}stopRefreshTimer(){this.refreshTimer&&(window.clearTimeout(this.refreshTimer),this.refreshTimer=null)}async listCalendars(){try{return await this.withRetry(async()=>{let t=await this.oauthService.getValidToken("microsoft"),r=[],a=`${this.baseUrl}/me/calendars`;for(;a;){let s=(await(0,zh.requestUrl)({url:a,method:"GET",headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}})).json,o=s.value||[];r.push(...o),a=s["@odata.nextLink"]}return r.map(i=>({id:i.id,summary:i.name,name:i.name,color:i.hexColor||void 0,backgroundColor:i.hexColor||void 0,primary:i.isDefaultCalendar||!1,isDefault:i.isDefaultCalendar||!1}))},"List calendars")}catch(t){throw yi.error("Failed to list calendars:",{category:"provider",operation:"list-calendars",error:t}),new wa(`Failed to fetch calendar list: ${t.message}`,t.status)}}async fetchCalendarEvents(t,r,a){try{let i=await this.oauthService.getValidToken("microsoft"),s=this.getSyncToken(t),o=[],l,c,d=!s,u=!1,p;if(s)p=s;else{let m=new Date,f=r||new Date(m.getTime()-720*60*60*1e3),h=a||new Date(m.getTime()+2160*60*60*1e3),g=new URLSearchParams({startDateTime:f.toISOString(),endDateTime:h.toISOString(),$top:zk.MAX_RESULTS_PER_REQUEST.toString()});p=`${this.baseUrl}/me/calendars/${encodeURIComponent(t)}/calendarView?${g.toString()}`}do try{let f=(await this.withRetry(async()=>{let g=[`odata.maxpagesize=${zk.MAX_RESULTS_PER_REQUEST}`,'outlook.timezone="UTC"'];return await(0,zh.requestUrl)({url:l||p,method:"GET",headers:{Authorization:`Bearer ${i}`,Accept:"application/json",Prefer:g.join(", ")}})},`Fetch events for ${t}`)).json,h=f.value||[];!d&&h.some(g=>g.isCancelled||g["@removed"])&&(u=!0),o.push(...h),l=f["@odata.nextLink"],f["@odata.deltaLink"]&&(c=f["@odata.deltaLink"])}catch(m){if(m.status===410)return await this.clearSyncToken(t),await this.fetchCalendarEvents(t,r,a);throw m}while(l);return c&&await this.saveSyncToken(t,c),{events:o,isFullSync:d,hasDeletes:u}}catch(i){yi.error(`Failed to fetch events from calendar ${t}:`,{category:"provider",operation:"fetch-events-calendar",error:i});let s=new Error(`Failed to fetch calendar events: ${this.getErrorMessage(i)}`),o=this.getErrorStatus(i);throw s.status=o,s.statusCode=o,s}}convertToICSEvent(t,r){var c,d;if(!t.start||!t.end)throw new Error("Event missing start/end");let a,i,s=t.isAllDay||!1;if(s)a=t.start.dateTime.split("T")[0],i=t.end.dateTime.split("T")[0];else{let u=this.ensureUtcDateTime(t.start.dateTime,t.start.timeZone),p=this.ensureUtcDateTime(t.end.dateTime,t.end.timeZone),m=Na(u),f=Na(p);a=D(m,"yyyy-MM-dd'T'HH:mm:ss"),i=D(f,"yyyy-MM-dd'T'HH:mm:ss")}let o="#0078D4",l=t.seriesMasterId?`microsoft-${r}-${t.seriesMasterId}`:void 0;return{id:`microsoft-${r}-${t.id}`,subscriptionId:`microsoft-${r}`,title:t.subject||"Untitled Event",description:t.bodyPreview||((c=t.body)==null?void 0:c.content),start:a,end:i,allDay:s,location:(d=t.location)==null?void 0:d.displayName,url:t.webLink,recurringEventId:l,color:o}}async refreshAllCalendars(){var r,a;let t=new Date().toISOString();this.syncStatus={...this.syncStatus,lastAttempt:t,lastError:null,calendarErrors:[],calendarsChecked:0,eventsLoaded:((r=this.cache.get("all"))==null?void 0:r.length)||0};try{if(!await this.oauthService.isConnected("microsoft"))return;this.availableCalendars=await this.listCalendars();let s=this.getEnabledCalendarIds(),o=new Map(this.availableCalendars.map(d=>[d.id,d])),l=[],c=this.cache.get("all")||[];for(let d of s)try{let{events:u,isFullSync:p}=await this.fetchCalendarEvents(d);if(p){c=c.filter(f=>f.subscriptionId!==`microsoft-${d}`);let m=u.filter(f=>!f.isCancelled&&!f["@removed"]).map(f=>this.convertToICSEvent(f,d));c.push(...m)}else for(let m of u){let f=m["@removed"],h=`microsoft-${d}-${m.id}`,g=c.findIndex(v=>v.id===h);if(f){g!==-1&&c.splice(g,1);continue}if(m.isCancelled)g!==-1&&c.splice(g,1);else try{let v=this.convertToICSEvent(m,d);g!==-1?c[g]=v:c.push(v)}catch(v){yi.warn("[MicrosoftCalendar] Failed to convert event during refresh",{category:"provider",operation:"convert-event-refresh",details:{value:m.id},error:v})}}}catch(u){yi.error(`Failed to fetch events from calendar ${d}:`,{category:"provider",operation:"fetch-events-calendar",error:u}),l.push(this.createSyncError(u,o.get(d)))}this.cache.set("all",c),this.syncStatus={lastAttempt:t,lastSuccess:l.length===0?new Date().toISOString():this.syncStatus.lastSuccess,lastError:this.formatSyncErrorSummary(l),calendarErrors:l,calendarsChecked:s.length,eventsLoaded:c.length},this.emit("data-changed")}catch(i){yi.error("Failed to refresh Microsoft calendars:",{category:"provider",operation:"refresh-microsoft-calendars",error:i});let s=this.createSyncError(i);this.syncStatus={...this.syncStatus,lastAttempt:t,lastError:s.message,calendarErrors:[s],calendarsChecked:0,eventsLoaded:((a=this.cache.get("all"))==null?void 0:a.length)||0},this.getErrorMessage(i).includes("401")&&yi.warn("[MicrosoftCalendar] Authentication expired - caller should handle re-authentication",{category:"provider",operation:"authentication-expired-caller-should-handle-re-authentication"})}}getAllEvents(){return this.cache.get("all")||[]}getCachedEvents(){return this.getAllEvents()}async getEvents(t,r,a){let{events:i}=await this.fetchCalendarEvents(t,r,a),s=[];for(let o of i)if(!(o["@removed"]||o.isCancelled))try{s.push(this.convertToICSEvent(o,t))}catch(l){yi.warn("[MicrosoftCalendar] Skipping event due to conversion failure",{category:"provider",operation:"skipping-event-due-conversion",details:{value:o.id},error:l})}return s}async manualRefresh(){return this.refresh()}async disconnect(){this.clearCache(),this.stopRefreshTimer()}async refresh(){let t=Date.now(),r=t-this.lastManualRefresh,a=zk.MIN_MANUAL_REFRESH_INTERVAL_MS;if(r<a){let i=a-r;ve(this.plugin.emitter,`Please wait ${Math.ceil(i/1e3)}s before refreshing again`);return}this.lastManualRefresh=t,await this.refreshAllCalendars()}clearCache(){this.cache.clear()}async updateEvent(t,r,a){r_(t),Uk(r),Eo(a,"updates");try{let i=await this.oauthService.getValidToken("microsoft"),s={};(a.title!==void 0||a.summary!==void 0)&&(s.subject=a.summary||a.title),a.description!==void 0&&(s.body={contentType:"text",content:a.description});let o=!1,l=!1;a.start!==void 0&&(o=!0,typeof a.start=="string"?(l=a.isAllDay!==void 0?a.isAllDay:!/T/.test(a.start),s.start={dateTime:a.start,timeZone:"UTC"}):(s.start={dateTime:a.start.dateTime||a.start.date,timeZone:a.start.timeZone||"UTC"},a.start.date&&!a.start.dateTime&&(l=!0))),a.end!==void 0&&(o=!0,typeof a.end=="string"?s.end={dateTime:a.end,timeZone:"UTC"}:s.end={dateTime:a.end.dateTime||a.end.date,timeZone:a.end.timeZone||"UTC"}),a.isAllDay!==void 0?s.isAllDay=a.isAllDay:o&&(s.isAllDay=l),a.location!==void 0&&(s.location={displayName:a.location});let d=(await this.withRetry(async()=>await(0,zh.requestUrl)({url:`${this.baseUrl}/me/calendars/${encodeURIComponent(t)}/events/${encodeURIComponent(r)}`,method:"PATCH",headers:{Authorization:`Bearer ${i}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)}),`Update event ${r}`)).json,u=this.convertToICSEvent(d,t);return await this.refreshAllCalendars(),u}catch(i){throw yi.error("Failed to update Microsoft Calendar event:",{category:"provider",operation:"update-microsoft-calendar-event",error:i}),i.status===404?new am(r):i.status===401||i.status===403?new Ki("microsoft"):i.status===429?new Co:new wa(`Failed to update event: ${i.message}`,i.status)}}async createEvent(t,r){r_(t),Eo(r,"event");let a=r.summary||r.title;Eo(a,"event.summary"),Eo(r.start,"event.start"),Eo(r.end,"event.end");try{let i=await this.oauthService.getValidToken("microsoft"),s={subject:a};if(r.description&&(s.body={contentType:"text",content:r.description}),r.location&&(s.location={displayName:r.location}),typeof r.start=="string"){let d=r.isAllDay||!/T/.test(r.start);s.start={dateTime:r.start,timeZone:"UTC"},s.end={dateTime:typeof r.end=="string"?r.end:r.end.dateTime||r.end.date,timeZone:"UTC"},s.isAllDay=d}else{let d=r.end;s.start={dateTime:r.start.dateTime||r.start.date,timeZone:r.start.timeZone||"UTC"},s.end={dateTime:typeof d=="string"?d:d.dateTime||d.date,timeZone:typeof d=="string"?"UTC":d.timeZone||"UTC"},r.start.date&&!r.start.dateTime&&(s.isAllDay=!0)}let l=(await this.withRetry(async()=>await(0,zh.requestUrl)({url:`${this.baseUrl}/me/calendars/${encodeURIComponent(t)}/events`,method:"POST",headers:{Authorization:`Bearer ${i}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)}),`Create event in ${t}`)).json,c=this.convertToICSEvent(l,t);return await this.refreshAllCalendars(),c}catch(i){throw yi.error("Failed to create Microsoft Calendar event:",{category:"provider",operation:"create-microsoft-calendar-event",error:i}),i.status===404?new jk(t):i.status===401||i.status===403?new Ki("microsoft"):i.status===429?new Co:new wa(`Failed to create event: ${i.message}`,i.status)}}async deleteEvent(t,r){r_(t),Uk(r);try{let a=await this.oauthService.getValidToken("microsoft");await this.withRetry(async()=>await(0,zh.requestUrl)({url:`${this.baseUrl}/me/calendars/${encodeURIComponent(t)}/events/${encodeURIComponent(r)}`,method:"DELETE",headers:{Authorization:`Bearer ${a}`}}),`Delete event ${r}`),await this.refreshAllCalendars()}catch(a){throw a.status===404?new am(r):(yi.error("Failed to delete Microsoft Calendar event:",{category:"provider",operation:"delete-microsoft-calendar-event",error:a}),a.status===401||a.status===403?new Ki("microsoft"):a.status===429?new Co:new wa(`Failed to delete event: ${a.message}`,a.status))}}async createCalendar(t,r){try{let a=await this.oauthService.getValidToken("microsoft"),s=(await this.withRetry(async()=>await(0,zh.requestUrl)({url:`${this.baseUrl}/me/calendars`,method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({name:t})}),"Create calendar")).json;return this.availableCalendars=await this.listCalendars(),s.id}catch(a){throw yi.error("Failed to create calendar:",{category:"provider",operation:"create-calendar",error:a}),a.status===401||a.status===403?new Ki("microsoft"):a.status===429?new Co:new wa(`Failed to create calendar: ${a.message}`,a.status)}}ensureUtcDateTime(t,r){if(!t)throw new Error("Missing dateTime value");return/[+-]\d{2}:\d{2}$/.test(t)||t.endsWith("Z")?t:(r&&r.toUpperCase()!=="UTC"&&yi.warn(`[MicrosoftCalendar] Falling back to UTC conversion for timezone "${r}"`,{category:"provider",operation:"falling-back-utc-conversion-timezone"}),`${t.replace(/\.\d+$/,"")}Z`)}destroy(){this.stopRefreshTimer(),this.cache.clear(),this.removeAllListeners()}}});function J5e(n,e){return n!==null&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,e)}function X5e(n,e){return JSON.stringify(n)===JSON.stringify(e)}function rbe(n,e,t){return!X5e(n==null?void 0:n.pomodoroState,e)||(n==null?void 0:n.lastPomodoroDate)!==t}function nbe(n,e){return e===void 0?J5e(n,"lastSelectedTaskPath"):(n==null?void 0:n.lastSelectedTaskPath)!==e}var abe=y(()=>{});var eYe,i_,ibe=y(()=>{eYe=`
let timerInterval = null;
self.onmessage = function(event) {
if (event.data && event.data.command === "start") {
if (timerInterval) {
clearInterval(timerInterval);
}
timerInterval = setInterval(function() {
self.postMessage({ type: "tick" });
}, 1000);
return;
}
if (event.data && event.data.command === "stop") {
if (timerInterval) {
clearInterval(timerInterval);
timerInterval = null;
}
}
};
`,i_=class{constructor(e){this.onTick=e;this.worker=null;this.workerUrl=null;this.fallbackInterval=null;this.running=!1}start(){if(!this.running){if(this.running=!0,this.canUseWorker()){this.startWorkerTicker();return}this.fallbackInterval=window.setInterval(this.onTick,1e3)}}stop(){!this.running&&!this.worker&&this.fallbackInterval===null||(this.running=!1,this.worker&&(this.worker.postMessage({command:"stop"}),this.worker.terminate(),this.worker=null),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.fallbackInterval!==null&&(window.clearInterval(this.fallbackInterval),this.fallbackInterval=null))}destroy(){this.stop()}canUseWorker(){return typeof Worker!="undefined"&&typeof Blob!="undefined"&&typeof URL!="undefined"&&typeof URL.createObjectURL=="function"}startWorkerTicker(){let e=new Blob([eYe],{type:"application/javascript"});this.workerUrl=URL.createObjectURL(e),this.worker=new Worker(this.workerUrl),this.worker.onmessage=t=>{var r;((r=t.data)==null?void 0:r.type)==="tick"&&this.onTick()},this.worker.postMessage({command:"start"})}}});var obe={};Xe(obe,{PomodoroService:()=>kE});function s_(n){return(0,sbe.moment)(n)}function o_(n){return n!==null&&typeof n=="object"&&typeof n.id=="string"}var sbe,yn,Dt,kE,lq=y(()=>{sbe=require("obsidian"),yn=tt(od());Pr();Oi();ya();xe();PW();abe();ibe();gR();hM();q();Dt=M({tag:"Services/PomodoroService"});kE=class{constructor(e){this.ticker=null;this.activeAudioContexts=new Set;this.cleanupTimeouts=new Set;this.lastSelectedTaskPathLoaded=!1;this.completionInProgress=!1;this.plugin=e,this.state={isRunning:!1,timeRemaining:e.settings.pomodoroWorkDuration*60}}translate(e,t){return this.plugin.i18n.translate(e,t)}async initialize(){await this.loadState(),this.setupTicker(),this.subscribeToTaskFileRenames(),this.state.isRunning&&this.state.currentSession&&this.resumeTimer()}subscribeToTaskFileRenames(){this.taskFileRenameUnsubscribe||(this.taskFileRenameUnsubscribe=this.plugin.cacheManager.subscribe("file-renamed",e=>{if(!e||typeof e!="object")return;let{oldPath:t,newPath:r}=e;typeof t!="string"||typeof r!="string"||this.handleTaskFileRenamed(t,r)}))}async handleTaskFileRenamed(e,t){var i;if(!e||!t||e===t)return;let r=!1,a=!1;((i=this.state.currentSession)==null?void 0:i.taskPath)===e&&(this.state.currentSession.taskPath=t,r=!0),this.lastWorkSessionTaskPath===e&&(this.lastWorkSessionTaskPath=t),this.lastSelectedTaskPath===e&&(this.lastSelectedTaskPath=t,this.lastSelectedTaskPathLoaded=!0,a=!0);try{let s=await this.plugin.loadPluginDataForSafeWrite("persist-pomodoro-task-path-file-rename");if(!s)return;let o=!1;r&&(s.pomodoroState=this.state,s.lastPomodoroDate=ae(Xt()),o=!0),(a||s.lastSelectedTaskPath===e)&&(this.lastSelectedTaskPath=t,this.lastSelectedTaskPathLoaded=!0,s.lastSelectedTaskPath=t,o=!0),o&&await this.plugin.saveData(s)}catch(s){Dt.error("Failed to persist Pomodoro task path after file rename:",{category:"persistence",operation:"persist-pomodoro-task-path-file-rename",error:s})}r&&this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession})}setWebhookNotifier(e){this.webhookNotifier=e}setupTicker(){var e;(e=this.ticker)==null||e.destroy(),this.ticker=new i_(()=>this.handleTimerTick())}handleTimerTick(){if(!this.state.isRunning||!this.state.currentSession)return;this.syncRunningTimeRemaining()<=0&&!this.completionInProgress&&(this.completionInProgress=!0,this.completePomodoro().finally(()=>{this.completionInProgress=!1}))}async loadState(){try{let e=await this.plugin.loadData();if(e!=null&&e.pomodoroState){this.state=e.pomodoroState,this.state.timeRemaining=Math.max(0,this.state.timeRemaining||0);let t=ae(Xt());if(e.lastPomodoroDate!==t&&this.state.currentSession&&(this.state.currentSession=void 0,this.state.isRunning=!1,this.state.nextSessionType=void 0),this.state.currentSession){let a=new Date(this.state.currentSession.startTime).getTime();(Date.now()-a)/(1e3*60*60)>24&&(this.state.currentSession=void 0,this.state.isRunning=!1,this.state.timeRemaining=this.plugin.settings.pomodoroWorkDuration*60,this.state.nextSessionType=void 0)}this.state.currentSession||(this.state.timeRemaining=this.plugin.settings.pomodoroWorkDuration*60,this.state.nextSessionType=void 0)}}catch(e){Dt.error("Failed to load pomodoro state:",{category:"persistence",operation:"load-pomodoro-state",error:e}),this.state={isRunning:!1,timeRemaining:this.plugin.settings.pomodoroWorkDuration*60}}}async saveState(){try{let e=await this.plugin.loadPluginDataForSafeWrite("save-pomodoro-state");if(!e)return;let t=ae(Xt());if(!rbe(e,this.state,t))return;e.pomodoroState=this.state,e.lastPomodoroDate=t,await this.plugin.saveData(e)}catch(e){Dt.error("Failed to save pomodoro state:",{category:"persistence",operation:"save-pomodoro-state",error:e})}}async saveLastSelectedTask(e){this.lastSelectedTaskPath=e,this.lastSelectedTaskPathLoaded=!0;try{let t=await this.plugin.loadPluginDataForSafeWrite("save-last-selected-task");if(!t||!nbe(t,e))return;e===void 0?delete t.lastSelectedTaskPath:t.lastSelectedTaskPath=e,await this.plugin.saveData(t)}catch(t){Dt.error("Failed to save last selected task:",{category:"persistence",operation:"save-last-selected-task",error:t})}}async getLastSelectedTaskPath(){if(this.lastSelectedTaskPathLoaded)return this.lastSelectedTaskPath;try{let e=await this.plugin.loadData(),t=e==null?void 0:e.lastSelectedTaskPath;return typeof t=="string"&&t.trim().length>0?this.lastSelectedTaskPath=t:this.lastSelectedTaskPath=void 0,this.lastSelectedTaskPathLoaded=!0,this.lastSelectedTaskPath}catch(e){Dt.error("Failed to load last selected task:",{category:"persistence",operation:"load-last-selected-task",error:e});return}}async startPomodoro(e,t){var c;if(this.state.isRunning){ve(this.plugin.emitter,this.translate("services.pomodoro.notices.alreadyRunning"));return}if(this.state.currentSession&&!this.state.isRunning){ve(this.plugin.emitter,this.translate("services.pomodoro.notices.resumeCurrentSession"));return}let r=this.state.nextSessionType==="short-break"||this.state.nextSessionType==="long-break"?this.plugin.settings.pomodoroWorkDuration*60:this.state.timeRemaining,a=t!==void 0?t*60:void 0,i=Kp(a!=null?a:r),s=i/60,o=qe(),l={id:Date.now().toString(),taskPath:e==null?void 0:e.path,startTime:o,plannedDuration:s,type:"work",completed:!1,activePeriods:[{startTime:o}]};if(e!=null&&e.path&&(this.lastWorkSessionTaskPath=e.path,this.lastSelectedTaskPath=e.path,this.lastSelectedTaskPathLoaded=!0),this.state.currentSession=l,this.state.isRunning=!0,this.state.timeRemaining=i,this.state.nextSessionType=void 0,await this.saveState(),this.startTimer(),e)try{await this.plugin.taskService.startTimeTracking(e)}catch(d){(c=d.message)!=null&&c.includes("Time tracking is already active")||Dt.error("Failed to start time tracking for Pomodoro:",{category:"internal",operation:"start-time-tracking-pomodoro",error:d})}if(this.plugin.emitter.trigger(cd,{session:l,task:e}),this.webhookNotifier)try{await this.webhookNotifier.triggerWebhook("pomodoro.started",{session:l,task:e})}catch(d){Dt.warn("Failed to trigger webhook for pomodoro start:",{category:"provider",operation:"trigger-webhook-pomodoro-start",error:d})}this.showPomodoroNotification(`Pomodoro started${e?` for: ${e.title}`:""}`)}async startPomodoroWithLastSelectedTask(e){let t=await this.getAutoStartTask();await this.startPomodoro(t,e)}async startBreak(e=!1){if(this.state.isRunning){ve(this.plugin.emitter,this.translate("services.pomodoro.notices.timerAlreadyRunning"));return}if(this.state.currentSession&&!this.state.isRunning){ve(this.plugin.emitter,this.translate("services.pomodoro.notices.resumeSessionInstead"));return}let t=e?Math.max(1,Math.min(60,this.plugin.settings.pomodoroLongBreakDuration)):Math.max(1,Math.min(30,this.plugin.settings.pomodoroShortBreakDuration)),r=qe(),a={id:Date.now().toString(),startTime:r,plannedDuration:t,type:e?"long-break":"short-break",completed:!1,activePeriods:[{startTime:r}]};this.state.currentSession=a,this.state.isRunning=!0,this.state.timeRemaining=a.plannedDuration*60,this.state.nextSessionType=void 0,await this.saveState(),this.startTimer(),ve(this.plugin.emitter,this.translate(e?"services.pomodoro.notices.longBreakStarted":"services.pomodoro.notices.shortBreakStarted"))}async pausePomodoro(){if(!this.state.isRunning)return;this.syncRunningTimeRemaining(),this.stopTimer(),this.state.isRunning=!1;let e=qe();if(this.state.currentSession&&this.state.currentSession.activePeriods.length>0){let t=this.state.currentSession.activePeriods[this.state.currentSession.activePeriods.length-1];t.endTime||(t.endTime=e)}if(this.state.currentSession&&this.state.currentSession.taskPath)try{let t=await this.plugin.cacheManager.getTaskInfo(this.state.currentSession.taskPath);t&&await this.plugin.taskService.stopTimeTracking(t)}catch(t){Dt.error("Failed to stop time tracking for Pomodoro pause:",{category:"internal",operation:"stop-time-tracking-pomodoro-pause",error:t})}await this.saveState(),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession}),ve(this.plugin.emitter,this.translate("services.pomodoro.notices.paused"))}async resumePomodoro(){var e;if(!(this.state.isRunning||!this.state.currentSession)){if(this.state.isRunning=!0,this.state.currentSession&&this.state.currentSession.activePeriods.push({startTime:qe()}),await this.saveState(),this.startTimer(),this.state.currentSession&&this.state.currentSession.taskPath)try{let t=await this.plugin.cacheManager.getTaskInfo(this.state.currentSession.taskPath);t&&await this.plugin.taskService.startTimeTracking(t)}catch(t){(e=t.message)!=null&&e.includes("Time tracking is already active")||Dt.error("Failed to start time tracking for Pomodoro resume:",{category:"internal",operation:"start-time-tracking-pomodoro-resume",error:t})}this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession}),ve(this.plugin.emitter,this.translate("services.pomodoro.notices.resumed"))}}async stopPomodoro(){if(!this.state.currentSession)return;let e=this.state.isRunning;e&&this.syncRunningTimeRemaining(),this.stopTimer();let t=qe();if(this.state.currentSession){if(this.state.currentSession.interrupted=!0,this.state.currentSession.endTime=t,this.state.currentSession.activePeriods.length>0){let r=this.state.currentSession.activePeriods[this.state.currentSession.activePeriods.length-1];r.endTime||(r.endTime=t)}await this.addSessionToHistory(this.state.currentSession)}if(this.plugin.emitter.trigger(ud,{session:this.state.currentSession}),this.webhookNotifier&&this.state.currentSession)try{let r=this.state.currentSession.taskPath?await this.plugin.cacheManager.getTaskInfo(this.state.currentSession.taskPath):void 0;await this.webhookNotifier.triggerWebhook("pomodoro.interrupted",{session:this.state.currentSession,task:r})}catch(r){Dt.warn("Failed to trigger webhook for pomodoro interruption:",{category:"provider",operation:"trigger-webhook-pomodoro-interruption",error:r})}if(this.state.currentSession&&this.state.currentSession.taskPath&&e)try{let r=await this.plugin.cacheManager.getTaskInfo(this.state.currentSession.taskPath);r&&await this.plugin.taskService.stopTimeTracking(r)}catch(r){Dt.error("Failed to stop time tracking for Pomodoro interrupt:",{category:"internal",operation:"stop-time-tracking-pomodoro-interrupt",error:r})}this.state.currentSession=void 0,this.state.isRunning=!1,this.state.timeRemaining=this.plugin.settings.pomodoroWorkDuration*60,this.state.nextSessionType=void 0,await this.saveState(),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession}),e&&ve(this.plugin.emitter,this.translate("services.pomodoro.notices.stoppedAndReset"))}async skipBreak(){this.state.currentSession||this.state.nextSessionType!=="short-break"&&this.state.nextSessionType!=="long-break"||(this.stopTimer(),this.state.isRunning=!1,this.state.currentSession=void 0,this.state.timeRemaining=this.plugin.settings.pomodoroWorkDuration*60,this.state.nextSessionType=void 0,await this.saveState(),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession}))}startTimer(){var e;this.ticker||this.setupTicker(),this.syncRunningTimeRemaining(),(e=this.ticker)==null||e.start()}stopTimer(){var e;(e=this.ticker)==null||e.stop()}resumeTimer(){if(this.state.currentSession&&this.state.currentSession.startTime){let e=new Date(this.state.currentSession.startTime).getTime(),t=Date.now();if(e>t){this.stopPomodoro();return}!this.state.isRunning&&this.state.timeRemaining>0?this.state.timeRemaining=Math.min(this.state.timeRemaining,Kp(this.state.currentSession.plannedDuration*60)):this.state.isRunning&&(this.state.timeRemaining=wk(this.state.currentSession,t)),this.state.timeRemaining>0&&this.state.isRunning?this.startTimer():this.state.timeRemaining<=0&&this.completePomodoro()}}syncRunningTimeRemaining(e=Date.now()){return this.state.currentSession?(this.state.isRunning&&(this.state.timeRemaining=wk(this.state.currentSession,e)),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession}),this.state.timeRemaining):this.state.timeRemaining}async autoStartWorkSession(){if(!this.state.isRunning)try{let e=await this.getAutoStartTask();e?await this.startPomodoro(e):await this.startPomodoro()}catch(e){Dt.error("Failed to auto-start work session:",{category:"internal",operation:"auto-start-work-session",error:e})}}async getAutoStartTask(){var a;let e=[];this.lastWorkSessionTaskPath&&e.push(this.lastWorkSessionTaskPath),(a=this.state.currentSession)!=null&&a.taskPath&&e.push(this.state.currentSession.taskPath);let t=await this.getLastSelectedTaskPath();t&&e.push(t);let r=Array.from(new Set(e.filter(i=>typeof i=="string"&&i.length>0)));for(let i of r)try{let s=await this.plugin.cacheManager.getTaskInfo(i);if(!s){this.clearCachedTaskPath(i);continue}let o=Wf(s,new Date,this.plugin.statusManager,this.plugin.settings.defaultTaskStatus);if(s.archived||o)continue;return s}catch(s){Dt.warn(`Failed to load task for auto-start (${i}):`,{category:"persistence",operation:"load-task-auto-start",error:s})}}clearCachedTaskPath(e){this.lastWorkSessionTaskPath===e&&(this.lastWorkSessionTaskPath=void 0),this.lastSelectedTaskPath===e&&(this.lastSelectedTaskPath=void 0,this.lastSelectedTaskPathLoaded=!0)}async completePomodoro(){if(this.stopTimer(),!this.state.currentSession)return;let e=this.state.currentSession,t=Aye(e),r=t!==null?Mye(t):qe();if(e.completed=!0,e.endTime=r,e.type==="work"&&e.taskPath&&(this.lastWorkSessionTaskPath=e.taskPath),e.activePeriods.length>0){let o=e.activePeriods[e.activePeriods.length-1];o.endTime||(o.endTime=r)}if(e.type==="work"&&this.state.isRunning&&e.taskPath)try{let o=await this.plugin.cacheManager.getTaskInfo(e.taskPath);o&&await this.plugin.taskService.stopTimeTracking(o)}catch(o){Dt.error("Failed to stop time tracking for Pomodoro completion:",{category:"internal",operation:"stop-time-tracking-pomodoro-completion",error:o})}let a=!1;if(e.type==="work")try{a=((await this.getTodayStats()).pomodorosCompleted+1)%this.plugin.settings.pomodoroLongBreakInterval===0}catch(o){Dt.error("Failed to calculate break type:",{category:"internal",operation:"calculate-break-type",error:o}),a=!1}if(await this.addSessionToHistory(e),this.plugin.emitter.trigger(dd,{session:e,nextType:e.type==="work"?a?"long-break":"short-break":"work"}),this.webhookNotifier)try{let o=e.taskPath?await this.plugin.cacheManager.getTaskInfo(e.taskPath):void 0;await this.webhookNotifier.triggerWebhook("pomodoro.completed",{session:e,task:o})}catch(o){Dt.warn("Failed to trigger webhook for pomodoro completion:",{category:"provider",operation:"trigger-webhook-pomodoro-completion",error:o})}let i=e.type==="work"?"🍅 Pomodoro completed!":"☕ Break completed!",s=e.type==="work"?`Time for a ${a?"long break 💤":"short break ☕"}`:"Ready for the next pomodoro?";if(this.showPomodoroNotification(i,{body:s}),this.plugin.settings.pomodoroSoundEnabled&&this.playCompletionSound(),this.state.currentSession=void 0,this.state.isRunning=!1,e.type==="work"){let o=a?this.plugin.settings.pomodoroLongBreakDuration:this.plugin.settings.pomodoroShortBreakDuration;if(this.state.timeRemaining=o*60,this.state.nextSessionType=a?"long-break":"short-break",this.plugin.settings.pomodoroAutoStartBreaks){let l=window.setTimeout(()=>{this.startBreak(a)},1e3);this.cleanupTimeouts.add(l)}}else if(this.state.timeRemaining=this.plugin.settings.pomodoroWorkDuration*60,this.state.nextSessionType="work",this.plugin.settings.pomodoroAutoStartWork){let o=window.setTimeout(()=>{this.autoStartWorkSession()},1e3);this.cleanupTimeouts.add(o)}await this.saveState(),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession})}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),r=e.createGain();t.connect(r),r.connect(e.destination);let a=Math.max(0,Math.min(1,this.plugin.settings.pomodoroSoundVolume/100));r.gain.value=a*.3,t.frequency.value=800,t.type="sine",t.start(),t.stop(e.currentTime+.1),this.activeAudioContexts.add(e);let i=window.setTimeout(()=>{try{let o=e.createOscillator();o.connect(r),o.frequency.value=1e3,o.type="sine",o.start(),o.stop(e.currentTime+.1)}catch(o){Dt.error("Failed to play second beep:",{category:"provider",operation:"play-second-beep",error:o})}},150);this.cleanupTimeouts.add(i);let s=window.setTimeout(()=>{this.activeAudioContexts.delete(e),e.close().catch(()=>{})},300);this.cleanupTimeouts.add(s)}catch(e){Dt.error("Failed to play completion sound:",{category:"provider",operation:"play-completion-sound",error:e})}}showPomodoroNotification(e,t){if(this.plugin.settings.pomodoroNotifications&&!(typeof Notification=="undefined"||Notification.permission!=="granted"))try{new Notification(e,t)}catch(r){Dt.warn("Failed to show Pomodoro notification:",{category:"provider",operation:"show-pomodoro-notification",error:r})}}getState(){return{...this.state}}adjustSessionTime(e){if(this.state.currentSession){let t=Kp(this.state.timeRemaining+e);this.setCurrentSessionRemainingTime(t)}}setCurrentSessionRemainingTime(e){if(!this.state.currentSession)return;let t=Date.now();this.state.isRunning&&(this.state.timeRemaining=wk(this.state.currentSession,t));let r=Kp(e),a=CW(this.state.currentSession,t);this.state.timeRemaining=r,this.state.currentSession.plannedDuration=(a+r)/60,this.saveState(),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession})}adjustPreparedTimer(e){this.state.currentSession||(this.stopTimer(),this.state.timeRemaining=Kp(e),this.saveState(),this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:this.state.currentSession}))}isRunning(){return this.state.isRunning}getCurrentSession(){return this.state.currentSession}getTimeRemaining(){return this.state.timeRemaining}async getPomodorosCompleted(){return(await this.getTodayStats()).pomodorosCompleted}async getCurrentStreak(){return(await this.getTodayStats()).currentStreak}async getTotalMinutesToday(){return(await this.getTodayStats()).totalMinutes}async assignTaskToCurrentSession(e){var s;if(!this.state.currentSession)return;let t=this.state.currentSession,r=t.taskPath,a=e==null?void 0:e.path,i=this.state.isRunning&&t.type==="work"&&r!==a;if(i&&r)try{let o=await this.plugin.cacheManager.getTaskInfo(r);o&&await this.plugin.taskService.stopTimeTracking(o)}catch(o){Dt.error("Failed to stop time tracking for previous Pomodoro task:",{category:"persistence",operation:"stop-time-tracking-previous-pomodoro-task",error:o})}if(t.taskPath=a,a?(this.lastWorkSessionTaskPath=a,this.lastSelectedTaskPath=a,this.lastSelectedTaskPathLoaded=!0):(this.lastWorkSessionTaskPath=void 0,this.lastSelectedTaskPath=void 0,this.lastSelectedTaskPathLoaded=!0),await this.saveState(),i&&e)try{await this.plugin.taskService.startTimeTracking(e)}catch(o){(s=o.message)!=null&&s.includes("Time tracking is already active")||Dt.error("Failed to start time tracking for new Pomodoro task:",{category:"persistence",operation:"start-time-tracking-new-pomodoro-task",error:o})}this.plugin.emitter.trigger(ai,{timeRemaining:this.state.timeRemaining,session:t})}async getSessionHistory(){try{let e=await this.loadPluginHistory(),t;if(this.plugin.settings.pomodoroStorageLocation==="daily-notes"){let r=await this.loadHistoryFromDailyNotes();t=r,e.length>0&&(t=this.mergeHistories(e,r))}else t=e;return eE(t)}catch(e){return Dt.error("Failed to load session history:",{category:"persistence",operation:"load-session-history",error:e}),[]}}async getSessionsForDate(e){try{let t=ae(e);if(!t)return[];let r=await this.loadPluginHistoryForDateKey(t),a;if(this.plugin.settings.pomodoroStorageLocation==="daily-notes"){let i=await this.loadHistoryFromDailyNoteForDateKey(t);a=r.length>0?this.mergeHistories(r,i):i}else a=r;return eE(a)}catch(t){return Dt.error("Failed to load session history for date:",{category:"validation",operation:"load-session-history-date",error:t}),[]}}async getSessionsForDateRange(e,t){try{let r=await this.loadPluginHistoryForDateRange(e,t),a;if(this.plugin.settings.pomodoroStorageLocation==="daily-notes"){let i=await this.loadHistoryFromDailyNotesForDateRange(e,t);a=r.length>0?this.mergeHistories(r,i):i}else a=r;return eE(a)}catch(r){return Dt.error("Failed to load session history for date range:",{category:"validation",operation:"load-session-history-date-range",error:r}),[]}}async saveSessionHistory(e){try{this.plugin.settings.pomodoroStorageLocation==="daily-notes"?await this.saveHistoryToDailyNotes(e):await this.savePluginHistory(e)}catch(t){Dt.error("Failed to save session history:",{category:"persistence",operation:"save-session-history",error:t})}}async deleteSessionFromHistory(e){let t=!1;try{let r=await this.loadPluginHistory(),a=r.filter(i=>i.id!==e.id);a.length!==r.length&&(await this.savePluginHistory(a),t=!0),this.plugin.settings.pomodoroStorageLocation==="daily-notes"&&(t=await this.deleteSessionFromDailyNote(e)||t)}catch(r){Dt.error("Failed to delete pomodoro session:",{category:"persistence",operation:"delete-pomodoro-session",error:r})}return t}async addSessionToHistory(e){if(!e.endTime){Dt.warn("Cannot add session to history without end time",{category:"persistence",operation:"add-session-history-without-end-time"});return}let t={id:e.id,startTime:e.startTime,endTime:e.endTime,plannedDuration:e.plannedDuration,type:e.type,taskPath:e.taskPath,completed:e.completed&&!e.interrupted,activePeriods:e.activePeriods.slice()};try{if(this.plugin.settings.pomodoroStorageLocation==="daily-notes")await this.addSingleSessionToDailyNote(t);else{let r=await this.getSessionHistory();r.push(t),await this.saveSessionHistory(r)}}catch(r){Dt.error("Failed to add session to history:",{category:"persistence",operation:"add-session-history",error:r})}}async getStatsForDate(e){let t=await this.getSessionsForDate(e);return xk(t)}async getStatsForDateRange(e,t){let r=await this.getSessionsForDateRange(e,t);return xk(r)}async getOverallStats(){let e=await this.getSessionHistory();return xk(e)}async getTodayStats(){let e=Xt(),t=Br(e);return this.getStatsForDate(t)}cleanup(){var e,t;this.stopTimer(),(e=this.ticker)==null||e.destroy(),this.ticker=null,(t=this.taskFileRenameUnsubscribe)==null||t.call(this),this.taskFileRenameUnsubscribe=void 0;for(let r of this.cleanupTimeouts)window.clearTimeout(r);this.cleanupTimeouts.clear();for(let r of this.activeAudioContexts)r.state!=="closed"&&r.close().catch(()=>{});this.activeAudioContexts.clear(),this.saveState()}async loadPluginHistory(){let e=await this.plugin.loadData(),t=e==null?void 0:e.pomodoroHistory;return Array.isArray(t)?t:[]}async savePluginHistory(e){let t=await this.plugin.loadPluginDataForSafeWrite("save-pomodoro-history");t&&(t.pomodoroHistory=e,await this.plugin.saveData(t))}async loadPluginHistoryForDateKey(e){return zye(await this.loadPluginHistory(),e)}async loadPluginHistoryForDateRange(e,t){return Bye(await this.loadPluginHistory(),e,t)}async saveHistoryToDailyNotes(e){try{if(!(0,yn.appHasDailyNotesPluginLoaded)())throw new Error("Daily notes must be enabled in the core Daily Notes plugin or Periodic Notes");let t=this.groupSessionsByDate(e);for(let[r,a]of t)await this.updateDailyNotePomodoros(r,a)}catch(t){throw Dt.error("Failed to save history to daily notes:",{category:"persistence",operation:"save-history-daily-notes",error:t}),t}}async loadHistoryFromDailyNotesForDateRange(e,t){try{if(!(0,yn.appHasDailyNotesPluginLoaded)())return[];let r=(0,yn.getAllDailyNotes)(),a=[];for(let i of jye(e,t)){let s=await this.loadHistoryFromDailyNoteForDateKey(i,r);a.push(...s)}return a}catch(r){return Dt.error("Failed to load history from daily notes for date range:",{category:"validation",operation:"load-history-daily-notes-date-range",error:r}),[]}}async loadHistoryFromDailyNoteForDateKey(e,t){try{if(!e||!(0,yn.appHasDailyNotesPluginLoaded)())return[];let r=t!=null?t:(0,yn.getAllDailyNotes)(),a=et(e),i=s_(a),s=(0,yn.getDailyNote)(i,r);return s?this.readPomodoroSessionsFromDailyNote(s):[]}catch(r){return Dt.warn(`Failed to load pomodoro history for daily note ${e}:`,{category:"persistence",operation:"load-pomodoro-history-daily-note",error:r}),[]}}async loadHistoryFromDailyNotes(){try{if(!(0,yn.appHasDailyNotesPluginLoaded)())return[];let e=[],t=(0,yn.getAllDailyNotes)();for(let[,r]of Object.entries(t))try{e.push(...this.readPomodoroSessionsFromDailyNote(r))}catch(a){Dt.warn(`Failed to read pomodoro data from daily note ${r.path}:`,{category:"persistence",operation:"read-pomodoro-data-daily-note",error:a})}return e}catch(e){return Dt.error("Failed to load history from daily notes:",{category:"persistence",operation:"load-history-daily-notes",error:e}),[]}}readPomodoroSessionsFromDailyNote(e){let t=this.plugin.app.metadataCache.getFileCache(e),r=t==null?void 0:t.frontmatter,a=this.plugin.fieldMapper.toUserField("pomodoros"),i=r==null?void 0:r[a];return Array.isArray(i)?i.filter(o_):[]}groupSessionsByDate(e){let t=new Map;for(let r of e){let a=Ck(r);a&&(t.has(a)||t.set(a,[]),t.get(a).push(r))}return t}async addSingleSessionToDailyNote(e){try{let t=Ck(e);if(!t)throw new Error(`Invalid Pomodoro session start time: ${e.startTime}`);let r=et(t),a=s_(r),i=(0,yn.getAllDailyNotes)(),s=(0,yn.getDailyNote)(a,i);if(!s&&(s=await(0,yn.createDailyNote)(a),!s))throw new Error("Failed to create daily note. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.");let o=this.plugin.fieldMapper.toUserField("pomodoros");await yr(this.plugin.app,s,l=>{let c=Array.isArray(l[o])?l[o].filter(o_):[];new Set(c.map(u=>u.id)).has(e.id)||(l[o]=[...c,e])})}catch(t){Dt.error("Failed to add session to daily note:",{category:"persistence",operation:"add-session-daily-note",error:t})}}async deleteSessionFromDailyNote(e){try{if(!(0,yn.appHasDailyNotesPluginLoaded)())return!1;let t=Ck(e);if(!t)return!1;let r=et(t),a=s_(r),i=(0,yn.getDailyNote)(a,(0,yn.getAllDailyNotes)());if(!i)return!1;let s=this.plugin.fieldMapper.toUserField("pomodoros"),o=!1;return await yr(this.plugin.app,i,l=>{let c=Array.isArray(l[s])?l[s].filter(o_):[],d=c.filter(u=>u.id!==e.id);d.length!==c.length&&(l[s]=d,o=!0)}),o}catch(t){return Dt.error("Failed to delete pomodoro session from daily note:",{category:"persistence",operation:"delete-pomodoro-session-daily-note",error:t}),!1}}async updateDailyNotePomodoros(e,t){try{let r=et(e),a=s_(r),i=(0,yn.getAllDailyNotes)(),s=(0,yn.getDailyNote)(a,i);if(!s&&(s=await(0,yn.createDailyNote)(a),!s))throw new Error("Failed to create daily note. Please check your Daily Notes plugin configuration and ensure the daily notes folder exists.");let o=this.plugin.fieldMapper.toUserField("pomodoros");await yr(this.plugin.app,s,l=>{let c=Array.isArray(l[o])?l[o].filter(o_):[],d=new Set(c.map(p=>p.id)),u=t.filter(p=>!d.has(p.id));u.length>0&&(l[o]=[...c,...u])})}catch(r){Dt.error(`Failed to update daily note for ${e}:`,{category:"validation",operation:"update-daily-note",error:r})}}mergeHistories(e,t){let r=[...t],a=new Set(t.map(i=>i.id));for(let i of e)a.has(i.id)||r.push(i);return r}async migrateTodailyNotes(){try{if(!(0,yn.appHasDailyNotesPluginLoaded)())throw new Error("Daily notes must be enabled in the core Daily Notes plugin or Periodic Notes for migration");let e=await this.plugin.loadData();if(!e)return;let t=e.pomodoroHistory||[];if(t.length===0)return;await this.saveHistoryToDailyNotes(t),e.pomodoroHistory=[],await this.plugin.saveData(e),ve(this.plugin.emitter,this.translate("services.pomodoro.notices.migrationSuccess",{count:t.length}))}catch(e){throw Dt.error("Failed to migrate pomodoro data to daily notes:",{category:"persistence",operation:"migrate-pomodoro-data-daily-notes",error:e}),ve(this.plugin.emitter,this.translate("services.pomodoro.notices.migrationFailure")),e}}}});var tYe,l_,lbe=y(()=>{E2();q();Oi();ya();tYe=M({tag:"Services/AutoExportService"}),l_=class{constructor(e){this.scheduledExportId=null;this.lastExportTime=null;this.nextExportTime=null;this.isRunning=!1;this.plugin=e}translate(e,t){return this.plugin.i18n.translate(e,t)}start(){this.plugin.settings.icsIntegration.enableAutoExport&&(this.stop(),this.isRunning=!0,this.scheduleNextExport())}stop(){this.isRunning=!1,this.scheduledExportId!==null&&(window.clearTimeout(this.scheduledExportId),this.scheduledExportId=null),this.nextExportTime=null}updateInterval(e){this.plugin.settings.icsIntegration.enableAutoExport&&this.start()}async exportNow(){await this.performExport()}getLastExportTime(){return this.lastExportTime}getNextExportTime(){return this.nextExportTime}scheduleNextExport(){if(!this.isRunning||!this.plugin.settings.icsIntegration.enableAutoExport){this.nextExportTime=null;return}let t=this.plugin.settings.icsIntegration.autoExportInterval*60*1e3;this.nextExportTime=new Date(Date.now()+t),this.scheduledExportId=window.setTimeout(()=>{this.scheduledExportId=null,this.performExport().finally(()=>{this.isRunning&&this.scheduleNextExport()})},t)}async performExport(){var e,t,r,a;try{let i=this.plugin.settings.icsIntegration.autoExportPath||"tasknotes-calendar.ics",s=await this.plugin.cacheManager.getAllTasks();if(s.length===0)return;let o={useDurationForExport:this.plugin.settings.icsIntegration.useDurationForExport,excludeArchived:(e=this.plugin.settings.icsIntegration.excludeArchivedFromExport)!=null?e:!1,excludeCompleted:(t=this.plugin.settings.icsIntegration.excludeCompletedFromExport)!=null?t:!1,completedStatuses:this.plugin.statusManager.getCompletedStatuses(),requireDueDate:(r=this.plugin.settings.icsIntegration.requireDueDateForExport)!=null?r:!1,requireScheduledDate:(a=this.plugin.settings.icsIntegration.requireScheduledDateForExport)!=null?a:!1,includeObsidianLink:!0,vaultName:this.plugin.app.vault.getName()},l=yp.generateMultipleTasksICSContent(s,o),c=i;await this.plugin.app.vault.adapter.exists(c)?await this.plugin.app.vault.adapter.write(c,l):await mf(this.plugin.app,c,l),this.lastExportTime=new Date}catch(i){tYe.error("TaskNotes: Auto export failed:",{category:"provider",operation:"auto-export",error:i}),(!this.lastExportTime||Date.now()-this.lastExportTime.getTime()>360*60*1e3)&&ve(this.plugin.emitter,this.translate("services.autoExport.notices.exportFailed",{error:i instanceof Error?i.message:String(i)}))}}destroy(){this.stop()}}});function nYe(n){var e,t;return(t=(e=n.updatedTask)!=null?e:n.taskInfo)!=null?t:n.task}function c_(n){if(n===void 0)return null;if(Array.isArray(n))return n.map(e=>c_(e));if(n&&typeof n=="object"){let e=n;return Object.keys(e).sort().reduce((t,r)=>(t[r]=c_(e[r]),t),{})}return n}function aYe(n,e){return JSON.stringify(c_(n))===JSON.stringify(c_(e))}function iYe(n,e){var t;return(t=rYe.find(r=>!aYe(n[r],e[r])))!=null?t:null}var dbe,cbe,rYe,d_,ube=y(()=>{dbe=require("obsidian");Pr();q();cbe=M({tag:"Services/TaskFileLifecycleReconciliationService"}),rYe=["status","title","scheduled","due","priority","recurrence","occurrence_materialization","complete_instances","skipped_instances","timeEstimate","tags","contexts","projects"];d_=class{constructor(e){this.plugin=e;this.taskSnapshots=new Map;this.taskUpdatedRef=null;this.handlingPaths=new Set}async initialize(){await this.captureCurrentTasks(),this.taskUpdatedRef=this.plugin.emitter.on(rt,e=>{this.handleTaskUpdatedEvent(e)})}destroy(){this.taskUpdatedRef&&(this.plugin.emitter.offref(this.taskUpdatedRef),this.taskUpdatedRef=null),this.handlingPaths.clear(),this.taskSnapshots.clear()}async handleTaskUpdatedEvent(e){var o;let t=nYe(e),r=(o=e.path)!=null?o:t==null?void 0:t.path;if(!r||!t)return;if(e.originalTask){e.originalTask.path!==r&&this.taskSnapshots.delete(e.originalTask.path),this.taskSnapshots.set(r,t);return}let a=this.taskSnapshots.get(r);if(this.taskSnapshots.set(r,t),!a||this.handlingPaths.has(r))return;let i=iYe(a,t);if(!i)return;let s=this.plugin.app.vault.getAbstractFileByPath(r);if(s instanceof dbe.TFile){this.handlingPaths.add(r);try{await this.plugin.taskService.applyPropertyChangeSideEffects(s,a,t,i,a[i],t[i])}catch(l){cbe.warn("Failed to reconcile direct task file edit:",{category:"persistence",operation:"reconcile-direct-task-file-edit",details:{taskPath:r,property:i},error:l})}finally{this.handlingPaths.delete(r)}}}async captureCurrentTasks(){try{let e=await this.plugin.cacheManager.getAllTasks();for(let t of e)this.taskSnapshots.set(t.path,t)}catch(e){cbe.warn("Failed to snapshot tasks for direct file edit reconciliation:",{category:"stale-data",operation:"snapshot-direct-task-file-reconciliation",error:e})}}}});var Pt,cq,ge,Rc,TE=y(()=>{(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{let i={};for(let s of a)i[s]=s;return i},n.getValidEnumValues=a=>{let i=n.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),s={};for(let o of i)s[o]=a[o];return n.objectValues(s)},n.objectValues=a=>n.objectKeys(a).map(function(i){return a[i]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{let i=[];for(let s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.push(s);return i},n.find=(a,i)=>{for(let s of a)if(i(s))return s},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}n.joinValues=r,n.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Pt||(Pt={}));(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(cq||(cq={}));ge=Pt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Rc=n=>{switch(typeof n){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return Number.isNaN(n)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(n)?ge.array:n===null?ge.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ge.promise:typeof Map!="undefined"&&n instanceof Map?ge.map:typeof Set!="undefined"&&n instanceof Set?ge.set:typeof Date!="undefined"&&n instanceof Date?ge.date:ge.object;default:return ge.unknown}}});var J,sYe,Zi,u_=y(()=>{TE();J=Pt.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"]),sYe=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:"),Zi=class n extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},r={_errors:[]},a=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(a);else if(s.code==="invalid_return_type")a(s.returnTypeError);else if(s.code==="invalid_arguments")a(s.argumentsError);else if(s.path.length===0)r._errors.push(t(s));else{let o=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return a(this),r}static assert(e){if(!(e instanceof n))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},r=[];for(let a of this.issues)if(a.path.length>0){let i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};Zi.create=n=>new Zi(n)});var oYe,du,dq=y(()=>{u_();TE();oYe=(n,e)=>{let t;switch(n.code){case J.invalid_type:n.received===ge.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case J.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,Pt.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:t=`Unrecognized key(s) in object: ${Pt.joinValues(n.keys,", ")}`;break;case J.invalid_union:t="Invalid input";break;case J.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Pt.joinValues(n.options)}`;break;case J.invalid_enum_value:t=`Invalid enum value. Expected ${Pt.joinValues(n.options)}, received '${n.received}'`;break;case J.invalid_arguments:t="Invalid function arguments";break;case J.invalid_return_type:t="Invalid function return type";break;case J.invalid_date:t="Invalid date";break;case J.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:Pt.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case J.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case J.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case J.custom:t="Invalid input";break;case J.invalid_intersection_types:t="Intersection results could not be merged";break;case J.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case J.not_finite:t="Number must be finite";break;default:t=e.defaultError,Pt.assertNever(n)}return{message:t}},du=oYe});function lYe(n){pbe=n}function Hk(){return pbe}var pbe,p_=y(()=>{dq();pbe=du});function ue(n,e){let t=Hk(),r=bE({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===du?void 0:du].filter(a=>!!a)});n.common.issues.push(r)}var bE,cYe,Sa,Ye,Bh,Ga,m_,f_,lm,Vk,uq=y(()=>{p_();dq();bE=n=>{let{data:e,path:t,errorMaps:r,issueData:a}=n,i=[...t,...a.path||[]],s={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let o="",l=r.filter(c=>!!c).slice().reverse();for(let c of l)o=c(s,{data:e,defaultError:o}).message;return{...a,path:i,message:o}},cYe=[];Sa=class n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let a of t){if(a.status==="aborted")return Ye;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let a of t){let i=await a.key,s=await a.value;r.push({key:i,value:s})}return n.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let a of t){let{key:i,value:s}=a;if(i.status==="aborted"||s.status==="aborted")return Ye;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value!="undefined"||a.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}},Ye=Object.freeze({status:"aborted"}),Bh=n=>({status:"dirty",value:n}),Ga=n=>({status:"valid",value:n}),m_=n=>n.status==="aborted",f_=n=>n.status==="dirty",lm=n=>n.status==="valid",Vk=n=>typeof Promise!="undefined"&&n instanceof Promise});var mbe=y(()=>{});var Ne,fbe=y(()=>{(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ne||(Ne={}))});function ut(n){if(!n)return{};let{errorMap:e,invalid_type_error:t,required_error:r,description:a}=n;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(s,o)=>{var c,d;let{message:l}=n;return s.code==="invalid_enum_value"?{message:l!=null?l:o.defaultError}:typeof o.data=="undefined"?{message:(c=l!=null?l:r)!=null?c:o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:(d=l!=null?l:t)!=null?d:o.defaultError}},description:a}}function vbe(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);let t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function EYe(n){return new RegExp(`^${vbe(n)}$`)}function kbe(n){let e=`${ybe}T${vbe(n)}`,t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function DYe(n,e){return!!((e==="v4"||!e)&&kYe.test(n)||(e==="v6"||!e)&&bYe.test(n))}function PYe(n,e){if(!hYe.test(n))return!1;try{let[t]=n.split(".");if(!t)return!1;let r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch(t){return!1}}function AYe(n,e){return!!((e==="v4"||!e)&&TYe.test(n)||(e==="v6"||!e)&&wYe.test(n))}function MYe(n,e){let t=(n.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,i=Number.parseInt(n.toFixed(a).replace(".","")),s=Number.parseInt(e.toFixed(a).replace(".",""));return i%s/10**a}function Wk(n){if(n instanceof Ji){let e={};for(let t in n.shape){let r=n.shape[t];e[t]=Qi.create(Wk(r))}return new Ji({...n._def,shape:()=>e})}else return n instanceof mu?new mu({...n._def,type:Wk(n.element)}):n instanceof Qi?Qi.create(Wk(n.unwrap())):n instanceof Fc?Fc.create(Wk(n.unwrap())):n instanceof _c?_c.create(n.items.map(e=>Wk(e))):n}function mq(n,e){let t=Rc(n),r=Rc(e);if(n===e)return{valid:!0,data:n};if(t===ge.object&&r===ge.object){let a=Pt.objectKeys(e),i=Pt.objectKeys(n).filter(o=>a.indexOf(o)!==-1),s={...n,...e};for(let o of i){let l=mq(n[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(t===ge.array&&r===ge.array){if(n.length!==e.length)return{valid:!1};let a=[];for(let i=0;i<n.length;i++){let s=n[i],o=e[i],l=mq(s,o);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return t===ge.date&&r===ge.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}function Tbe(n,e){return new Zh({values:n,typeName:ee.ZodEnum,...ut(e)})}function gbe(n,e){let t=typeof n=="function"?n(e):typeof n=="string"?{message:n}:n;return typeof t=="string"?{message:t}:t}function bbe(n,e={},t){return n?dm.create().superRefine((r,a)=>{var s,o;let i=n(r);if(i instanceof Promise)return i.then(l=>{var c,d;if(!l){let u=gbe(e,r),p=(d=(c=u.fatal)!=null?c:t)!=null?d:!0;a.addIssue({code:"custom",...u,fatal:p})}});if(!i){let l=gbe(e,r),c=(o=(s=l.fatal)!=null?s:t)!=null?o:!0;a.addIssue({code:"custom",...l,fatal:c})}}):dm.create()}var Po,hbe,ft,dYe,uYe,pYe,mYe,fYe,hYe,gYe,yYe,vYe,pq,kYe,TYe,bYe,wYe,SYe,CYe,ybe,xYe,cm,jh,$h,Uh,Hh,qk,Vh,Wh,dm,pu,vl,Gk,mu,Ji,qh,uu,h_,Gh,_c,g_,Yk,Kk,y_,Yh,Kh,Zh,Qh,um,Ao,Qi,Fc,Jh,Xh,Zk,IYe,wE,SE,eg,NYe,ee,RYe,wbe,Sbe,_Ye,FYe,Cbe,LYe,OYe,zYe,BYe,jYe,$Ye,UYe,HYe,VYe,fq,WYe,qYe,GYe,YYe,KYe,ZYe,QYe,JYe,XYe,e8e,t8e,r8e,n8e,a8e,i8e,s8e,o8e,l8e,c8e,d8e,u8e,p8e,m8e,f8e,xbe=y(()=>{u_();p_();fbe();uq();TE();Po=class{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},hbe=(n,e)=>{if(lm(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new Zi(n.common.issues);return this._error=t,this._error}}};ft=class{get description(){return this._def.description}_getType(e){return Rc(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Rc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Sa,ctx:{common:e.parent.common,data:e.data,parsedType:Rc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Vk(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var i;let r={common:{issues:[],async:(i=t==null?void 0:t.async)!=null?i:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Rc(e)},a=this._parseSync({data:e,path:r.path,parent:r});return hbe(r,a)}"~validate"(e){var r,a;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Rc(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:t});return lm(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(a=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>lm(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Rc(e)},a=this._parse({data:e,path:r.path,parent:r}),i=await(Vk(a)?a:Promise.resolve(a));return hbe(r,i)}refine(e,t){let r=a=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{let s=e(a),o=()=>i.addIssue({code:J.custom,...r(a)});return typeof Promise!="undefined"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new Ao({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:t=>this["~validate"](t)}}optional(){return Qi.create(this,this._def)}nullable(){return Fc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mu.create(this)}promise(){return um.create(this,this._def)}or(e){return qh.create([this,e],this._def)}and(e){return Gh.create(this,e,this._def)}transform(e){return new Ao({...ut(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new Jh({...ut(this._def),innerType:this,defaultValue:t,typeName:ee.ZodDefault})}brand(){return new wE({typeName:ee.ZodBranded,type:this,...ut(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new Xh({...ut(this._def),innerType:this,catchValue:t,typeName:ee.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return SE.create(this,e)}readonly(){return eg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},dYe=/^c[^\s-]{8,}$/i,uYe=/^[0-9a-z]+$/,pYe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mYe=/^[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,fYe=/^[a-z0-9_-]{21}$/i,hYe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gYe=/^[-+]?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)?)??$/,yYe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vYe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",kYe=/^(?:(?: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])$/,TYe=/^(?:(?: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])$/,bYe=/^(([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]))$/,wYe=/^(([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])$/,SYe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,CYe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ybe="((\\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])))",xYe=new RegExp(`^${ybe}$`);cm=class n extends ft{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ge.string){let i=this._getOrReturnCtx(e);return ue(i,{code:J.invalid_type,expected:ge.string,received:i.parsedType}),Ye}let r=new Sa,a;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),ue(a,{code:J.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),ue(a,{code:J.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(a=this._getOrReturnCtx(e,a),s?ue(a,{code:J.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&ue(a,{code:J.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"email",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")pq||(pq=new RegExp(vYe,"u")),pq.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"emoji",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")mYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"uuid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")fYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"nanoid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")dYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"cuid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")uYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"cuid2",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")pYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"ulid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch(s){a=this._getOrReturnCtx(e,a),ue(a,{validation:"url",code:J.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"regex",code:J.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),ue(a,{code:J.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),ue(a,{code:J.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),ue(a,{code:J.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?kbe(i).test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{code:J.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?xYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{code:J.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?EYe(i).test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{code:J.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?gYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"duration",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?DYe(e.data,i.version)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"ip",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?PYe(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"jwt",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?AYe(e.data,i.version)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"cidr",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?SYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"base64",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?CYe.test(e.data)||(a=this._getOrReturnCtx(e,a),ue(a,{validation:"base64url",code:J.invalid_string,message:i.message}),r.dirty()):Pt.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:J.invalid_string,...Ne.errToObj(r)})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ne.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ne.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ne.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ne.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ne.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ne.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ne.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ne.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ne.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Ne.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Ne.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ne.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Ne.errToObj(e)})}datetime(e){var t,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(r=e==null?void 0:e.local)!=null?r:!1,...Ne.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,...Ne.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Ne.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Ne.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...Ne.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Ne.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Ne.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Ne.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Ne.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Ne.errToObj(t)})}nonempty(e){return this.min(1,Ne.errToObj(e))}trim(){return new n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};cm.create=n=>{var e;return new cm({checks:[],typeName:ee.ZodString,coerce:(e=n==null?void 0:n.coerce)!=null?e:!1,...ut(n)})};jh=class n extends ft{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ge.number){let i=this._getOrReturnCtx(e);return ue(i,{code:J.invalid_type,expected:ge.number,received:i.parsedType}),Ye}let r,a=new Sa;for(let i of this._def.checks)i.kind==="int"?Pt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ue(r,{code:J.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:J.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:J.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?MYe(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),ue(r,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ue(r,{code:J.not_finite,message:i.message}),a.dirty()):Pt.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ne.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ne.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ne.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ne.toString(t))}setLimit(e,t,r,a){return new n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Ne.toString(a)}]})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ne.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ne.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ne.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ne.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ne.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ne.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Ne.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ne.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ne.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Pt.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}};jh.create=n=>new jh({checks:[],typeName:ee.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...ut(n)});$h=class n extends ft{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(i){return this._getInvalidInput(e)}if(this._getType(e)!==ge.bigint)return this._getInvalidInput(e);let r,a=new Sa;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:J.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:J.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Pt.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return ue(t,{code:J.invalid_type,expected:ge.bigint,received:t.parsedType}),Ye}gte(e,t){return this.setLimit("min",e,!0,Ne.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ne.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ne.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ne.toString(t))}setLimit(e,t,r,a){return new n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Ne.toString(a)}]})}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ne.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ne.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ne.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ne.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ne.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};$h.create=n=>{var e;return new $h({checks:[],typeName:ee.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!=null?e:!1,...ut(n)})};Uh=class extends ft{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ge.boolean){let r=this._getOrReturnCtx(e);return ue(r,{code:J.invalid_type,expected:ge.boolean,received:r.parsedType}),Ye}return Ga(e.data)}};Uh.create=n=>new Uh({typeName:ee.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...ut(n)});Hh=class n extends ft{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ge.date){let i=this._getOrReturnCtx(e);return ue(i,{code:J.invalid_type,expected:ge.date,received:i.parsedType}),Ye}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return ue(i,{code:J.invalid_date}),Ye}let r=new Sa,a;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),ue(a,{code:J.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),ue(a,{code:J.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Pt.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new n({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Ne.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Ne.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};Hh.create=n=>new Hh({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ee.ZodDate,...ut(n)});qk=class extends ft{_parse(e){if(this._getType(e)!==ge.symbol){let r=this._getOrReturnCtx(e);return ue(r,{code:J.invalid_type,expected:ge.symbol,received:r.parsedType}),Ye}return Ga(e.data)}};qk.create=n=>new qk({typeName:ee.ZodSymbol,...ut(n)});Vh=class extends ft{_parse(e){if(this._getType(e)!==ge.undefined){let r=this._getOrReturnCtx(e);return ue(r,{code:J.invalid_type,expected:ge.undefined,received:r.parsedType}),Ye}return Ga(e.data)}};Vh.create=n=>new Vh({typeName:ee.ZodUndefined,...ut(n)});Wh=class extends ft{_parse(e){if(this._getType(e)!==ge.null){let r=this._getOrReturnCtx(e);return ue(r,{code:J.invalid_type,expected:ge.null,received:r.parsedType}),Ye}return Ga(e.data)}};Wh.create=n=>new Wh({typeName:ee.ZodNull,...ut(n)});dm=class extends ft{constructor(){super(...arguments),this._any=!0}_parse(e){return Ga(e.data)}};dm.create=n=>new dm({typeName:ee.ZodAny,...ut(n)});pu=class extends ft{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ga(e.data)}};pu.create=n=>new pu({typeName:ee.ZodUnknown,...ut(n)});vl=class extends ft{_parse(e){let t=this._getOrReturnCtx(e);return ue(t,{code:J.invalid_type,expected:ge.never,received:t.parsedType}),Ye}};vl.create=n=>new vl({typeName:ee.ZodNever,...ut(n)});Gk=class extends ft{_parse(e){if(this._getType(e)!==ge.undefined){let r=this._getOrReturnCtx(e);return ue(r,{code:J.invalid_type,expected:ge.void,received:r.parsedType}),Ye}return Ga(e.data)}};Gk.create=n=>new Gk({typeName:ee.ZodVoid,...ut(n)});mu=class n extends ft{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==ge.array)return ue(t,{code:J.invalid_type,expected:ge.array,received:t.parsedType}),Ye;if(a.exactLength!==null){let s=t.data.length>a.exactLength.value,o=t.data.length<a.exactLength.value;(s||o)&&(ue(t,{code:s?J.too_big:J.too_small,minimum:o?a.exactLength.value:void 0,maximum:s?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(ue(t,{code:J.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(ue(t,{code:J.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>a.type._parseAsync(new Po(t,s,t.path,o)))).then(s=>Sa.mergeArray(r,s));let i=[...t.data].map((s,o)=>a.type._parseSync(new Po(t,s,t.path,o)));return Sa.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new n({...this._def,minLength:{value:e,message:Ne.toString(t)}})}max(e,t){return new n({...this._def,maxLength:{value:e,message:Ne.toString(t)}})}length(e,t){return new n({...this._def,exactLength:{value:e,message:Ne.toString(t)}})}nonempty(e){return this.min(1,e)}};mu.create=(n,e)=>new mu({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...ut(e)});Ji=class n extends ft{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Pt.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==ge.object){let c=this._getOrReturnCtx(e);return ue(c,{code:J.invalid_type,expected:ge.object,received:c.parsedType}),Ye}let{status:r,ctx:a}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof vl&&this._def.unknownKeys==="strip"))for(let c in a.data)s.includes(c)||o.push(c);let l=[];for(let c of s){let d=i[c],u=a.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new Po(a,u,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof vl){let c=this._def.unknownKeys;if(c==="passthrough")for(let d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:a.data[d]}});else if(c==="strict")o.length>0&&(ue(a,{code:J.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let d of o){let u=a.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new Po(a,u,a.path,d)),alwaysSet:d in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let c=[];for(let d of l){let u=await d.key,p=await d.value;c.push({key:u,value:p,alwaysSet:d.alwaysSet})}return c}).then(c=>Sa.mergeObjectSync(r,c)):Sa.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Ne.errToObj,new n({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var i,s,o,l;let a=(o=(s=(i=this._def).errorMap)==null?void 0:s.call(i,t,r).message)!=null?o:r.defaultError;return t.code==="unrecognized_keys"?{message:(l=Ne.errToObj(e).message)!=null?l:a}:{message:a}}}:{}})}strip(){return new n({...this._def,unknownKeys:"strip"})}passthrough(){return new n({...this._def,unknownKeys:"passthrough"})}extend(e){return new n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new n({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new n({...this._def,catchall:e})}pick(e){let t={};for(let r of Pt.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new n({...this._def,shape:()=>t})}omit(e){let t={};for(let r of Pt.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new n({...this._def,shape:()=>t})}deepPartial(){return Wk(this)}partial(e){let t={};for(let r of Pt.objectKeys(this.shape)){let a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new n({...this._def,shape:()=>t})}required(e){let t={};for(let r of Pt.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Qi;)i=i._def.innerType;t[r]=i}return new n({...this._def,shape:()=>t})}keyof(){return Tbe(Pt.objectKeys(this.shape))}};Ji.create=(n,e)=>new Ji({shape:()=>n,unknownKeys:"strip",catchall:vl.create(),typeName:ee.ZodObject,...ut(e)});Ji.strictCreate=(n,e)=>new Ji({shape:()=>n,unknownKeys:"strict",catchall:vl.create(),typeName:ee.ZodObject,...ut(e)});Ji.lazycreate=(n,e)=>new Ji({shape:n,unknownKeys:"strip",catchall:vl.create(),typeName:ee.ZodObject,...ut(e)});qh=class extends ft{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function a(i){for(let o of i)if(o.result.status==="valid")return o.result;for(let o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let s=i.map(o=>new Zi(o.ctx.common.issues));return ue(t,{code:J.invalid_union,unionErrors:s}),Ye}if(t.common.async)return Promise.all(r.map(async i=>{let s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(a);{let i,s=[];for(let l of r){let c={...t,common:{...t.common,issues:[]},parent:null},d=l._parseSync({data:t.data,path:t.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let o=s.map(l=>new Zi(l));return ue(t,{code:J.invalid_union,unionErrors:o}),Ye}}get options(){return this._def.options}};qh.create=(n,e)=>new qh({options:n,typeName:ee.ZodUnion,...ut(e)});uu=n=>n instanceof Yh?uu(n.schema):n instanceof Ao?uu(n.innerType()):n instanceof Kh?[n.value]:n instanceof Zh?n.options:n instanceof Qh?Pt.objectValues(n.enum):n instanceof Jh?uu(n._def.innerType):n instanceof Vh?[void 0]:n instanceof Wh?[null]:n instanceof Qi?[void 0,...uu(n.unwrap())]:n instanceof Fc?[null,...uu(n.unwrap())]:n instanceof wE||n instanceof eg?uu(n.unwrap()):n instanceof Xh?uu(n._def.innerType):[],h_=class n extends ft{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==ge.object)return ue(t,{code:J.invalid_type,expected:ge.object,received:t.parsedType}),Ye;let r=this.discriminator,a=t.data[r],i=this.optionsMap.get(a);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(ue(t,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ye)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let a=new Map;for(let i of t){let s=uu(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of s){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,i)}}return new n({typeName:ee.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...ut(r)})}};Gh=class extends ft{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=(i,s)=>{if(m_(i)||m_(s))return Ye;let o=mq(i.value,s.value);return o.valid?((f_(i)||f_(s))&&t.dirty(),{status:t.value,value:o.data}):(ue(r,{code:J.invalid_intersection_types}),Ye)};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,s])=>a(i,s)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Gh.create=(n,e,t)=>new Gh({left:n,right:e,typeName:ee.ZodIntersection,...ut(t)});_c=class n extends ft{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.array)return ue(r,{code:J.invalid_type,expected:ge.array,received:r.parsedType}),Ye;if(r.data.length<this._def.items.length)return ue(r,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ye;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...r.data].map((s,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new Po(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Sa.mergeArray(t,s)):Sa.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new n({...this._def,rest:e})}};_c.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _c({items:n,typeName:ee.ZodTuple,rest:null,...ut(e)})};g_=class n extends ft{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.object)return ue(r,{code:J.invalid_type,expected:ge.object,received:r.parsedType}),Ye;let a=[],i=this._def.keyType,s=this._def.valueType;for(let o in r.data)a.push({key:i._parse(new Po(r,o,r.path,o)),value:s._parse(new Po(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?Sa.mergeObjectAsync(t,a):Sa.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof ft?new n({keyType:e,valueType:t,typeName:ee.ZodRecord,...ut(r)}):new n({keyType:cm.create(),valueType:e,typeName:ee.ZodRecord,...ut(t)})}},Yk=class extends ft{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.map)return ue(r,{code:J.invalid_type,expected:ge.map,received:r.parsedType}),Ye;let a=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([o,l],c)=>({key:a._parse(new Po(r,o,r.path,[c,"key"])),value:i._parse(new Po(r,l,r.path,[c,"value"]))}));if(r.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of s){let c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return Ye;(c.status==="dirty"||d.status==="dirty")&&t.dirty(),o.set(c.value,d.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let l of s){let c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return Ye;(c.status==="dirty"||d.status==="dirty")&&t.dirty(),o.set(c.value,d.value)}return{status:t.value,value:o}}}};Yk.create=(n,e,t)=>new Yk({valueType:e,keyType:n,typeName:ee.ZodMap,...ut(t)});Kk=class n extends ft{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ge.set)return ue(r,{code:J.invalid_type,expected:ge.set,received:r.parsedType}),Ye;let a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(ue(r,{code:J.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(ue(r,{code:J.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());let i=this._def.valueType;function s(l){let c=new Set;for(let d of l){if(d.status==="aborted")return Ye;d.status==="dirty"&&t.dirty(),c.add(d.value)}return{status:t.value,value:c}}let o=[...r.data.values()].map((l,c)=>i._parse(new Po(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,t){return new n({...this._def,minSize:{value:e,message:Ne.toString(t)}})}max(e,t){return new n({...this._def,maxSize:{value:e,message:Ne.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Kk.create=(n,e)=>new Kk({valueType:n,minSize:null,maxSize:null,typeName:ee.ZodSet,...ut(e)});y_=class n extends ft{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==ge.function)return ue(t,{code:J.invalid_type,expected:ge.function,received:t.parsedType}),Ye;function r(o,l){return bE({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Hk(),du].filter(c=>!!c),issueData:{code:J.invalid_arguments,argumentsError:l}})}function a(o,l){return bE({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Hk(),du].filter(c=>!!c),issueData:{code:J.invalid_return_type,returnTypeError:l}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof um){let o=this;return Ga(async function(...l){let c=new Zi([]),d=await o._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),u=await Reflect.apply(s,this,d);return await o._def.returns._def.type.parseAsync(u,i).catch(m=>{throw c.addIssue(a(u,m)),c})})}else{let o=this;return Ga(function(...l){let c=o._def.args.safeParse(l,i);if(!c.success)throw new Zi([r(l,c.error)]);let d=Reflect.apply(s,this,c.data),u=o._def.returns.safeParse(d,i);if(!u.success)throw new Zi([a(d,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new n({...this._def,args:_c.create(e).rest(pu.create())})}returns(e){return new n({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new n({args:e||_c.create([]).rest(pu.create()),returns:t||pu.create(),typeName:ee.ZodFunction,...ut(r)})}},Yh=class extends ft{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Yh.create=(n,e)=>new Yh({getter:n,typeName:ee.ZodLazy,...ut(e)});Kh=class extends ft{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return ue(t,{received:t.data,code:J.invalid_literal,expected:this._def.value}),Ye}return{status:"valid",value:e.data}}get value(){return this._def.value}};Kh.create=(n,e)=>new Kh({value:n,typeName:ee.ZodLiteral,...ut(e)});Zh=class n extends ft{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return ue(t,{expected:Pt.joinValues(r),received:t.parsedType,code:J.invalid_type}),Ye}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return ue(t,{received:t.data,code:J.invalid_enum_value,options:r}),Ye}return Ga(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return n.create(e,{...this._def,...t})}exclude(e,t=this._def){return n.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}};Zh.create=Tbe;Qh=class extends ft{_parse(e){let t=Pt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){let a=Pt.objectValues(t);return ue(r,{expected:Pt.joinValues(a),received:r.parsedType,code:J.invalid_type}),Ye}if(this._cache||(this._cache=new Set(Pt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let a=Pt.objectValues(t);return ue(r,{received:r.data,code:J.invalid_enum_value,options:a}),Ye}return Ga(e.data)}get enum(){return this._def.values}};Qh.create=(n,e)=>new Qh({values:n,typeName:ee.ZodNativeEnum,...ut(e)});um=class extends ft{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==ge.promise&&t.common.async===!1)return ue(t,{code:J.invalid_type,expected:ge.promise,received:t.parsedType}),Ye;let r=t.parsedType===ge.promise?t.data:Promise.resolve(t.data);return Ga(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}};um.create=(n,e)=>new um({type:n,typeName:ee.ZodPromise,...ut(e)});Ao=class extends ft{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:s=>{ue(r,s),s.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){let s=a.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async o=>{if(t.value==="aborted")return Ye;let l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ye:l.status==="dirty"?Bh(l.value):t.value==="dirty"?Bh(l.value):l});{if(t.value==="aborted")return Ye;let o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?Ye:o.status==="dirty"?Bh(o.value):t.value==="dirty"?Bh(o.value):o}}if(a.type==="refinement"){let s=o=>{let l=a.refinement(o,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ye:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Ye:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!lm(s))return Ye;let o=a.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>lm(s)?Promise.resolve(a.transform(s.value,i)).then(o=>({status:t.value,value:o})):Ye);Pt.assertNever(a)}};Ao.create=(n,e,t)=>new Ao({schema:n,typeName:ee.ZodEffects,effect:e,...ut(t)});Ao.createWithPreprocess=(n,e,t)=>new Ao({schema:e,effect:{type:"preprocess",transform:n},typeName:ee.ZodEffects,...ut(t)});Qi=class extends ft{_parse(e){return this._getType(e)===ge.undefined?Ga(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Qi.create=(n,e)=>new Qi({innerType:n,typeName:ee.ZodOptional,...ut(e)});Fc=class extends ft{_parse(e){return this._getType(e)===ge.null?Ga(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Fc.create=(n,e)=>new Fc({innerType:n,typeName:ee.ZodNullable,...ut(e)});Jh=class extends ft{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Jh.create=(n,e)=>new Jh({innerType:n,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ut(e)});Xh=class extends ft{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Vk(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zi(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Zi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Xh.create=(n,e)=>new Xh({innerType:n,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ut(e)});Zk=class extends ft{_parse(e){if(this._getType(e)!==ge.nan){let r=this._getOrReturnCtx(e);return ue(r,{code:J.invalid_type,expected:ge.nan,received:r.parsedType}),Ye}return{status:"valid",value:e.data}}};Zk.create=n=>new Zk({typeName:ee.ZodNaN,...ut(n)});IYe=Symbol("zod_brand"),wE=class extends ft{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},SE=class n extends ft{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ye:i.status==="dirty"?(t.dirty(),Bh(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ye:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new n({in:e,out:t,typeName:ee.ZodPipeline})}},eg=class extends ft{_parse(e){let t=this._def.innerType._parse(e),r=a=>(lm(a)&&(a.value=Object.freeze(a.value)),a);return Vk(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}};eg.create=(n,e)=>new eg({innerType:n,typeName:ee.ZodReadonly,...ut(e)});NYe={object:Ji.lazycreate};(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(ee||(ee={}));RYe=(n,e={message:`Input not instance of ${n.name}`})=>bbe(t=>t instanceof n,e),wbe=cm.create,Sbe=jh.create,_Ye=Zk.create,FYe=$h.create,Cbe=Uh.create,LYe=Hh.create,OYe=qk.create,zYe=Vh.create,BYe=Wh.create,jYe=dm.create,$Ye=pu.create,UYe=vl.create,HYe=Gk.create,VYe=mu.create,fq=Ji.create,WYe=Ji.strictCreate,qYe=qh.create,GYe=h_.create,YYe=Gh.create,KYe=_c.create,ZYe=g_.create,QYe=Yk.create,JYe=Kk.create,XYe=y_.create,e8e=Yh.create,t8e=Kh.create,r8e=Zh.create,n8e=Qh.create,a8e=um.create,i8e=Ao.create,s8e=Qi.create,o8e=Fc.create,l8e=Ao.createWithPreprocess,c8e=SE.create,d8e=()=>wbe().optional(),u8e=()=>Sbe().optional(),p8e=()=>Cbe().optional(),m8e={string:(n=>cm.create({...n,coerce:!0})),number:(n=>jh.create({...n,coerce:!0})),boolean:(n=>Uh.create({...n,coerce:!0})),bigint:(n=>$h.create({...n,coerce:!0})),date:(n=>Hh.create({...n,coerce:!0}))},f8e=Ye});var N={};Xe(N,{BRAND:()=>IYe,DIRTY:()=>Bh,EMPTY_PATH:()=>cYe,INVALID:()=>Ye,NEVER:()=>f8e,OK:()=>Ga,ParseStatus:()=>Sa,Schema:()=>ft,ZodAny:()=>dm,ZodArray:()=>mu,ZodBigInt:()=>$h,ZodBoolean:()=>Uh,ZodBranded:()=>wE,ZodCatch:()=>Xh,ZodDate:()=>Hh,ZodDefault:()=>Jh,ZodDiscriminatedUnion:()=>h_,ZodEffects:()=>Ao,ZodEnum:()=>Zh,ZodError:()=>Zi,ZodFirstPartyTypeKind:()=>ee,ZodFunction:()=>y_,ZodIntersection:()=>Gh,ZodIssueCode:()=>J,ZodLazy:()=>Yh,ZodLiteral:()=>Kh,ZodMap:()=>Yk,ZodNaN:()=>Zk,ZodNativeEnum:()=>Qh,ZodNever:()=>vl,ZodNull:()=>Wh,ZodNullable:()=>Fc,ZodNumber:()=>jh,ZodObject:()=>Ji,ZodOptional:()=>Qi,ZodParsedType:()=>ge,ZodPipeline:()=>SE,ZodPromise:()=>um,ZodReadonly:()=>eg,ZodRecord:()=>g_,ZodSchema:()=>ft,ZodSet:()=>Kk,ZodString:()=>cm,ZodSymbol:()=>qk,ZodTransformer:()=>Ao,ZodTuple:()=>_c,ZodType:()=>ft,ZodUndefined:()=>Vh,ZodUnion:()=>qh,ZodUnknown:()=>pu,ZodVoid:()=>Gk,addIssueToContext:()=>ue,any:()=>jYe,array:()=>VYe,bigint:()=>FYe,boolean:()=>Cbe,coerce:()=>m8e,custom:()=>bbe,date:()=>LYe,datetimeRegex:()=>kbe,defaultErrorMap:()=>du,discriminatedUnion:()=>GYe,effect:()=>i8e,enum:()=>r8e,function:()=>XYe,getErrorMap:()=>Hk,getParsedType:()=>Rc,instanceof:()=>RYe,intersection:()=>YYe,isAborted:()=>m_,isAsync:()=>Vk,isDirty:()=>f_,isValid:()=>lm,late:()=>NYe,lazy:()=>e8e,literal:()=>t8e,makeIssue:()=>bE,map:()=>QYe,nan:()=>_Ye,nativeEnum:()=>n8e,never:()=>UYe,null:()=>BYe,nullable:()=>o8e,number:()=>Sbe,object:()=>fq,objectUtil:()=>cq,oboolean:()=>p8e,onumber:()=>u8e,optional:()=>s8e,ostring:()=>d8e,pipeline:()=>c8e,preprocess:()=>l8e,promise:()=>a8e,quotelessJson:()=>sYe,record:()=>ZYe,set:()=>JYe,setErrorMap:()=>lYe,strictObject:()=>WYe,string:()=>wbe,symbol:()=>OYe,transformer:()=>i8e,tuple:()=>KYe,undefined:()=>zYe,union:()=>qYe,unknown:()=>$Ye,util:()=>Pt,void:()=>HYe});var v_=y(()=>{p_();uq();mbe();TE();xbe();u_()});var k_=y(()=>{v_();v_()});function Mbe(n={}){return{...fu,...n,fieldMapping:{...Abe,...n.fieldMapping},statuses:n.statuses?n.statuses.map(e=>({...e})):fu.statuses.map(e=>({...e})),priorities:n.priorities?n.priorities.map(e=>({...e})):fu.priorities.map(e=>({...e})),defaults:{...fu.defaults,...n.defaults},taskIdentification:{...fu.taskIdentification,...n.taskIdentification},userFields:n.userFields?n.userFields.map(e=>({...e})):[],recurrence:{...fu.recurrence,...n.recurrence},occurrences:{...fu.occurrences,...n.occurrences},timeTracking:{...fu.timeTracking,...n.timeTracking},nlp:n.nlp?{triggers:n.nlp.triggers.map(e=>({...e}))}:void 0}}function Ebe(n,e=fu.statuses){return n?e.some(t=>t.value===n&&t.isCompleted):!1}function Ibe(n){let e=T8e(n),t=e.match(yq);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s);if(!Nbe(o,l,c))throw new Error(`Invalid date "${n}".`);return new Date(Date.UTC(o,l-1,c,0,0,0,0))}if(!b8e(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!Rbe(r))throw new Error(`Invalid date "${n}".`);return r}function v8e(n){if(!Rbe(n))return"";let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}function hq(n){if(!/^\d{4}-\d{2}-\d{2}$/.test(n))throw new Error(`Invalid date "${n}". Expected YYYY-MM-DD.`);return Ibe(n),n}function k8e(n){if(!n)return"";let e=n.trim();if(yq.test(e))return e;let t=e.indexOf("T");if(t>-1)return e.slice(0,t);let r=e.indexOf(" ");return r>-1&&yq.test(e.slice(0,r))?e.slice(0,r):v8e(Ibe(e))}function T8e(n,e="Date string cannot be empty"){if(!n||n.trim().length===0)throw new Error(e);return n.trim()}function b8e(n){let e=n.match(y8e);if(!e)return!1;let[,t,r,a,i,s,o,,l,c,d]=e;return Nbe(Number(t),Number(r),Number(a))&&w8e(Number(i),Number(s),Number(o))&&S8e(l,c,d)}function Nbe(n,e,t){let r=new Date(Date.UTC(n,e-1,t,0,0,0,0));return r.getUTCFullYear()===n&&r.getUTCMonth()===e-1&&r.getUTCDate()===t}function w8e(n,e,t){return n>=0&&n<=23&&e>=0&&e<=59&&t>=0&&t<=59}function S8e(n,e,t){if(!n)return!0;let r=Number(e),a=Number(t);return!(r>14||a>59||r===14&&a!==0)}function Rbe(n){return n instanceof Date&&!Number.isNaN(n.getTime())}function C8e(n,e=""){var c;let t=n.trim(),r="path",a=t.match(/^\[\[([^|\]#]+)(?:#[^|\]]*)?(?:\|[^\]]*)?\]\]$/);if(a)r="wikilink",t=a[1].trim();else{let d=t.match(/^\[[^\]]*\]\(([^)#]+)(?:#[^)]*)?\)$/);d&&(r="markdown",t=d[1].trim())}try{t=decodeURI(t)}catch(d){return}if(t=t.replace(/\\/g,"/"),!t||/^[A-Za-z][A-Za-z\d+.-]*:/.test(t))return;let i=t.startsWith("/")||r==="wikilink"&&!t.startsWith("./")&&!t.startsWith("../"),s=e.replace(/\\/g,"/").split("/").filter(Boolean);s.length>0&&s.pop();let o=i?[]:s;for(let d of t.replace(/^\/+/,"").split("/"))if(!(!d||d===".")){if(d===".."){if(o.length===0)return;o.pop();continue}if(d.includes("\0")||d.includes("[")||d.includes("]"))return;o.push(d)}if(o.length===0)return;let l=(c=o[o.length-1])!=null?c:"";if(/^.+\.[^.]+$/.test(l))return o.join("/")}function x8e(n,e=""){let t=[],r=new Set;for(let[a,i]of(n!=null?n:[]).entries()){let s=C8e(i,e);if(!s){t.push({code:"invalid_attachment_reference",message:"Attachment references must identify a collection file using an explicit extension",index:a,reference:i});continue}if(r.has(s)){t.push({code:"duplicate_attachment_reference",message:`Attachment target is listed more than once: ${s}`,index:a,reference:i});continue}r.add(s)}return{valid:t.length===0,issues:t}}function vq(n){let e=[],t=Fbe.partial().safeParse(n);if(!t.success)for(let r of t.error.issues)e.push({code:"schema_invalid",message:r.message,severity:"error",path:r.path.map(String)});for(let r of["due","scheduled","completedDate","dateCreated","dateModified"]){let a=n[r];if(a!==void 0&&typeof a=="string")try{hq(k8e(a))}catch(i){e.push({code:"invalid_date",message:`${r} must contain a valid date`,severity:"error",field:r})}}if(n.complete_instances)for(let r of n.complete_instances)try{hq(r)}catch(a){e.push({code:"invalid_complete_instance",message:`Invalid completed recurrence instance "${r}"`,severity:"warning",field:"complete_instances"})}if(n.skipped_instances)for(let r of n.skipped_instances)try{hq(r)}catch(a){e.push({code:"invalid_skipped_instance",message:`Invalid skipped recurrence instance "${r}"`,severity:"warning",field:"skipped_instances"})}n.timeEntries&&e.push(...A8e(n.timeEntries).issues);for(let r of x8e(n.attachments,n.path).issues)e.push({code:r.code,message:r.message,severity:"error",path:["attachments",String(r.index)],field:"attachments"});return{valid:!e.some(r=>r.severity==="error"),issues:e}}function A8e(n){let e=[];return Array.isArray(n)?(n.forEach((r,a)=>{let i=_be.safeParse(r);if(!i.success){for(let s of i.error.issues)e.push({code:"invalid_time_entry",message:s.message,severity:"error",path:["timeEntries",String(a),...s.path.map(String)]});return}M8e(i.data,a,e)}),n.filter(r=>r&&!r.endTime).length>1&&e.push({code:"multiple_active_time_entries",message:"Only one active time entry is allowed",severity:"warning",field:"timeEntries"}),{valid:!e.some(r=>r.severity==="error"),issues:e}):{valid:!1,issues:[{code:"time_entries_not_array",message:"timeEntries must be an array",severity:"error",field:"timeEntries"}]}}function Lbe(n,e){let t=vq(n);for(let r of["title","status","dateCreated","dateModified"]){let a=n[r];(typeof a!="string"||a.trim().length===0)&&t.issues.push({code:"missing_required",message:`${r} is required`,severity:"error",field:r})}if(n.status&&!e.some(r=>r.value===n.status)&&t.issues.push({code:"invalid_status",message:`Unknown status "${n.status}"`,severity:"error",field:"status"}),n.completedDate!==void 0&&!/^\d{4}-\d{2}-\d{2}$/.test(n.completedDate)&&t.issues.push({code:"invalid_date_value",message:"completedDate must be a YYYY-MM-DD date",severity:"error",field:"completedDate"}),n.status&&Ebe(n.status,e)&&!n.recurrence&&!n.completedDate&&t.issues.push({code:"missing_required",message:"completedDate is required for a completed non-recurring task",severity:"error",field:"completedDate"}),n.dateCreated&&n.dateModified){let r=Date.parse(n.dateCreated),a=Date.parse(n.dateModified);Number.isFinite(r)&&Number.isFinite(a)&&a<r&&t.issues.push({code:"date_modified_before_created",message:"dateModified must not be before dateCreated",severity:"error",field:"dateModified"})}return n.status&&Ebe(n.status,e)&&n.recurrence&&n.completedDate&&t.issues.push({code:"recurring_task_completed_date",message:"Recurring task completion is tracked per instance, not with completedDate",severity:"warning",field:"completedDate"}),{valid:!t.issues.some(r=>r.severity==="error"),issues:t.issues}}function M8e(n,e,t){let r=new Date(n.startTime);if(Number.isNaN(r.getTime())){t.push({code:"invalid_time_entry_start",message:"Time entry startTime must be a valid datetime",severity:"error",path:["timeEntries",String(e),"startTime"]});return}if(!n.endTime)return;let a=new Date(n.endTime);if(Number.isNaN(a.getTime())){t.push({code:"invalid_time_entry_end",message:"Time entry endTime must be a valid datetime",severity:"error",path:["timeEntries",String(e),"endTime"]});return}a<r&&t.push({code:"time_entry_negative_duration",message:"Time entry endTime must not be before startTime",severity:"error",path:["timeEntries",String(e),"endTime"]})}var Pbe,Abe,h8e,g8e,fu,yq,y8e,E8e,D8e,_be,P8e,btr,wtr,Fbe,Str,gq,Dbe,Ctr,Obe=y(()=>{k_();ny();cx();cx();Pbe="0.3.0-rc.3",Abe={title:"title",status:"status",priority:"priority",due:"due",scheduled:"scheduled",contexts:"contexts",projects:"projects",attachments:"attachments",timeEstimate:"timeEstimate",completedDate:"completedDate",dateCreated:"dateCreated",dateModified:"dateModified",recurrence:"recurrence",recurrenceAnchor:"recurrence_anchor",recurrenceParent:"recurrence_parent",occurrenceDate:"occurrence_date",occurrenceMaterialization:"occurrence_materialization",occurrenceNextTrigger:"occurrence_next_trigger",occurrenceTemplate:"occurrence_template",occurrencePastHorizon:"occurrence_past_horizon",occurrenceFutureHorizon:"occurrence_future_horizon",archiveTag:"archived",timeEntries:"timeEntries",completeInstances:"complete_instances",skippedInstances:"skipped_instances",blockedBy:"blockedBy",pomodoros:"pomodoros",icsEventId:"icsEventId",icsEventTag:"ics_event",googleCalendarEventId:"googleCalendarEventId",googleCalendarExceptionEventId:"googleCalendarExceptionEventId",googleCalendarExceptionOriginalScheduled:"googleCalendarExceptionOriginalScheduled",googleCalendarMovedOriginalDates:"googleCalendarMovedOriginalDates",reminders:"reminders",sortOrder:"tasknotes_manual_order"},h8e=[{id:"none",value:"none",label:"None",color:"#cccccc",isCompleted:!1,excludeFromCycle:!1,order:0,autoArchive:!1,autoArchiveDelay:5},{id:"open",value:"open",label:"Open",color:"#808080",isCompleted:!1,excludeFromCycle:!1,order:1,autoArchive:!1,autoArchiveDelay:5},{id:"in-progress",value:"in-progress",label:"In progress",color:"#0066cc",isCompleted:!1,excludeFromCycle:!1,order:2,autoArchive:!1,autoArchiveDelay:5},{id:"done",value:"done",label:"Done",color:"#00aa00",isCompleted:!0,excludeFromCycle:!1,order:3,autoArchive:!1,autoArchiveDelay:5}],g8e=[{id:"none",value:"none",label:"None",color:"#cccccc",weight:0},{id:"low",value:"low",label:"Low",color:"#00aa00",weight:1},{id:"normal",value:"normal",label:"Normal",color:"#ffaa00",weight:2},{id:"high",value:"high",label:"High",color:"#ff0000",weight:3}],fu={fieldMapping:Abe,statuses:h8e,priorities:g8e,defaults:{status:"open",priority:"normal",taskTag:"task"},taskIdentification:{method:"tag",tag:"task",propertyName:"isTask",propertyValue:"true"},storeTitleInFilename:!1,userFields:[],recurrence:{maintainDueDateOffset:!0,resetCheckboxesOnRecurrence:!1},occurrences:{defaultMaterialization:"manual",defaultNextTrigger:"completion",pastHorizon:"P0D",futureHorizon:"P14D"},timeTracking:{autoStopOnComplete:!1,autoStopNotification:!0,defaultSessionDescription:"Work session"}};yq=/^(\d{4})-(\d{2})-(\d{2})$/,y8e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,3})?(?:Z|([+-])(\d{2}):(\d{2}))?$/;E8e=N.enum(["FINISHTOSTART","FINISHTOFINISH","STARTTOSTART","STARTTOFINISH"]),D8e=N.object({uid:N.string().min(1),reltype:E8e,gap:N.string().optional()}),_be=N.object({startTime:N.string().min(1),endTime:N.string().min(1).optional(),description:N.string().optional(),duration:N.number().optional()}),P8e=N.object({id:N.string().min(1),type:N.enum(["absolute","relative"]),relatedTo:N.enum(["due","scheduled"]).optional(),offset:N.string().optional(),absoluteTime:N.string().optional(),description:N.string().optional()}),btr=N.object({id:N.string().min(1),value:N.string().min(1),label:N.string().min(1),color:N.string().min(1),icon:N.string().optional(),isCompleted:N.boolean(),isSkipped:N.boolean().optional(),excludeFromCycle:N.boolean().optional(),nextStatus:N.string().optional(),order:N.number(),autoArchive:N.boolean(),autoArchiveDelay:N.number()}),wtr=N.object({id:N.string().min(1),value:N.string().min(1),label:N.string().min(1),color:N.string().min(1),icon:N.string().optional(),weight:N.number()}),Fbe=N.object({id:N.string().optional(),title:N.string(),status:N.string(),priority:N.string(),due:N.string().optional(),scheduled:N.string().optional(),path:N.string(),archived:N.boolean(),tags:N.array(N.string()).optional(),contexts:N.array(N.string()).optional(),projects:N.array(N.string()).optional(),attachments:N.array(N.string().min(1)).optional(),recurrence:N.string().optional(),recurrence_anchor:N.enum(["scheduled","completion"]).optional(),complete_instances:N.array(N.string()).optional(),skipped_instances:N.array(N.string()).optional(),recurrence_parent:N.string().optional(),occurrence_date:N.string().optional(),occurrence_materialization:N.enum(["manual","on_completion","rolling"]).optional(),occurrence_next_trigger:N.enum(["completion","completion_or_skip"]).optional(),occurrence_template:N.string().optional(),occurrence_past_horizon:N.string().optional(),occurrence_future_horizon:N.string().optional(),completedDate:N.string().optional(),timeEstimate:N.number().optional(),timeEntries:N.array(_be).optional(),totalTrackedTime:N.number().optional(),dateCreated:N.string().optional(),dateModified:N.string().optional(),icsEventId:N.array(N.string()).optional(),googleCalendarEventId:N.string().optional(),googleCalendarExceptionEventId:N.string().optional(),googleCalendarExceptionOriginalScheduled:N.string().optional(),googleCalendarMovedOriginalDates:N.array(N.string()).optional(),reminders:N.array(P8e).optional(),customProperties:N.record(N.unknown()).optional(),basesData:N.unknown().optional(),blockedBy:N.array(D8e).optional(),blocking:N.array(N.string()).optional(),isBlocked:N.boolean().optional(),isBlocking:N.boolean().optional(),hasSubtasks:N.boolean().optional(),details:N.string().optional(),sortOrder:N.string().optional()}),Str=N.object({frontmatter:N.record(N.unknown()),body:N.string(),task:Fbe.partial(),path:N.string().optional()}),gq=Reflect.get(Uu,"default"),Ctr=(Dbe=ye)!=null?Dbe:gq==null?void 0:gq.RRule});function I8e(n){return!n||n.length===0?0:n.reduce((e,t)=>{if(t.endTime){let r=new Date(t.endTime).getTime()-new Date(t.startTime).getTime();return e+Math.floor(r/(1e3*60))}else{let r=Date.now()-new Date(t.startTime).getTime();return e+Math.floor(r/(1e3*60))}},0)}function Qk(n,e){let t=[];for(let r of n){let a=e(r);if(a){let i=new Date(a.startTime),s=Math.floor((Date.now()-i.getTime())/(1e3*60));t.push({task:{id:r.path,title:r.title,status:r.status,priority:r.priority,tags:r.tags||[],projects:r.projects||[]},session:{startTime:a.startTime,description:a.description,elapsedMinutes:s},elapsedMinutes:s})}}return{activeSessions:t,totalActiveSessions:t.length,totalElapsedMinutes:t.reduce((r,a)=>r+a.elapsedMinutes,0)}}function N8e(n){let e,t=new Date;switch(n.period){case"today":e=new Date,e.setHours(0,0,0,0);break;case"week":e=new Date,e.setDate(e.getDate()-e.getDay()),e.setHours(0,0,0,0);break;case"month":e=new Date,e.setDate(1),e.setHours(0,0,0,0);break;case"all":e=new Date(0);break;default:n.fromDate?(e=n.fromDate,n.toDate&&(t=n.toDate)):(e=new Date,e.setHours(0,0,0,0))}return{startDate:e,endDate:t}}function Jk(n,e,t){let{startDate:r,endDate:a}=N8e(e),i=0,s=0,o=0,l=[],c=new Map,d=e.includeTags?new Map:null;for(let m of n){if(!m.timeEntries||m.timeEntries.length===0)continue;let f=0,h=!1;for(let g of m.timeEntries){let v=new Date(g.startTime);if(v>=r&&v<=a)if(!g.endTime)f+=Math.floor((Date.now()-v.getTime())/(1e3*60)),h=!0;else{let k=new Date(g.endTime);f+=Math.floor((k.getTime()-v.getTime())/(1e3*60))}}if(f>0){if(i+=f,l.push({task:m.path,title:m.title,minutes:f}),h?o++:t(m.status)&&s++,m.projects)for(let g of m.projects)c.set(g,(c.get(g)||0)+f);if(d&&m.tags)for(let g of m.tags)d.set(g,(d.get(g)||0)+f)}}l.sort((m,f)=>f.minutes-m.minutes);let u=Array.from(c.entries()).sort((m,f)=>f[1]-m[1]).slice(0,10).map(([m,f])=>({project:m,minutes:f})),p={period:e.period,dateRange:{from:r.toISOString(),to:a.toISOString()},summary:{totalMinutes:i,totalHours:Math.round(i/60*100)/100,tasksWithTime:l.length,activeTasks:o,completedTasks:s},topTasks:l.slice(0,10),topProjects:u};return d&&(p.topTags=Array.from(d.entries()).sort((m,f)=>f[1]-m[1]).slice(0,10).map(([m,f])=>({tag:m,minutes:f}))),p}function pm(n,e){let t=n.timeEntries||[],r=e(n),a=I8e(t),i=t.filter(l=>l.endTime).length,s=t.filter(l=>l.endTime),o=s.length>0?Math.round(s.reduce((l,c)=>l+Math.floor((new Date(c.endTime).getTime()-new Date(c.startTime).getTime())/(1e3*60)),0)/s.length*100)/100:0;return{task:{id:n.path,title:n.title,status:n.status,priority:n.priority},summary:{totalMinutes:a,totalHours:Math.round(a/60*100)/100,totalSessions:t.length,completedSessions:i,activeSessions:r?1:0,averageSessionMinutes:o},activeSession:r?{startTime:r.startTime,description:r.description,elapsedMinutes:Math.floor((Date.now()-new Date(r.startTime).getTime())/(1e3*60))}:null,timeEntries:t.map(l=>({startTime:l.startTime,endTime:l.endTime||null,description:l.description||null,duration:l.endTime?Math.floor((new Date(l.endTime).getTime()-new Date(l.startTime).getTime())/(1e3*60)):Math.floor((Date.now()-new Date(l.startTime).getTime())/(1e3*60)),isActive:!l.endTime}))}}var CE=y(()=>{});function kq(n){if(!n||typeof n!="object")return!1;let e=n;return e.name==="TaskNotesApiError"&&typeof e.message=="string"&&typeof e.status=="number"&&typeof e.code=="string"&&R8e.includes(e.code)}function $be(n){return n instanceof Hr||kq(n)}var zbe,Bbe,Lc,jbe,R8e,Hr,Ube,xE=y(()=>{zbe=["model.read","model.validate","catalog.read","extensions.read","extensions.register","tasks.read","tasks.write","tasks.delete","tasks.move","tasks.events","relationships.read","events.list","time.read","time.write","time.summary","pomodoro.read","pomodoro.write","pomodoro.events","recurring.write","recurring.materialize","recurring.events","settings.snapshot","bases.write","nlp.parse","ui.task-menu","query.tasks","query.validate","query.explain","query.filter-options","stats.tasks","system.health","lifecycle.events","errors.typed"],Bbe=[{name:"task.created",label:"Task created",description:"A TaskNotes task was created.",category:"task"},{name:"task.updated",label:"Task updated",description:"Any tracked TaskNotes task property changed.",category:"task"},{name:"task.deleted",label:"Task deleted",description:"A TaskNotes task was deleted.",category:"task"},{name:"task.moved",label:"Task moved",description:"A TaskNotes task note moved to a new path.",category:"task"},{name:"task.status.changed",label:"Task status changed",description:"A TaskNotes task status changed.",category:"task"},{name:"task.completed",label:"Task completed",description:"A TaskNotes task moved into a completed status.",category:"task"},{name:"task.uncompleted",label:"Task uncompleted",description:"A TaskNotes task moved out of a completed status.",category:"task"},{name:"task.archived",label:"Task archived",description:"A TaskNotes task was archived.",category:"task"},{name:"task.unarchived",label:"Task unarchived",description:"A TaskNotes task was unarchived.",category:"task"},{name:"task.scheduled.changed",label:"Task scheduled date changed",description:"A TaskNotes task scheduled date changed.",category:"task"},{name:"task.due.changed",label:"Task due date changed",description:"A TaskNotes task due date changed.",category:"task"},{name:"task.priority.changed",label:"Task priority changed",description:"A TaskNotes task priority changed.",category:"task"},{name:"task.tags.changed",label:"Task tags changed",description:"A TaskNotes task tag list changed.",category:"task"},{name:"task.contexts.changed",label:"Task contexts changed",description:"A TaskNotes task context list changed.",category:"task"},{name:"task.projects.changed",label:"Task projects changed",description:"A TaskNotes task project list changed.",category:"task"},{name:"task.attachments.changed",label:"Task attachments changed",description:"A TaskNotes task attachment list changed.",category:"task"},{name:"task.reminders.changed",label:"Task reminders changed",description:"A TaskNotes task reminder list changed.",category:"task"},{name:"task.dependencies.changed",label:"Task dependencies changed",description:"A TaskNotes task dependency list changed.",category:"task"},{name:"task.recurrence.changed",label:"Task recurrence changed",description:"A TaskNotes task recurrence rule changed.",category:"task"},{name:"time.started",label:"Time tracking started",description:"A time entry started on a TaskNotes task.",category:"time"},{name:"time.stopped",label:"Time tracking stopped",description:"A time entry stopped on a TaskNotes task.",category:"time"},{name:"pomodoro.started",label:"Pomodoro started",description:"A Pomodoro session started.",category:"pomodoro"},{name:"pomodoro.completed",label:"Pomodoro completed",description:"A Pomodoro session completed.",category:"pomodoro"},{name:"pomodoro.interrupted",label:"Pomodoro interrupted",description:"A Pomodoro session was interrupted.",category:"pomodoro"},{name:"recurring.instance.completed",label:"Recurring instance completed",description:"A recurring task instance was completed.",category:"recurring"},{name:"recurring.instance.skipped",label:"Recurring instance skipped",description:"A recurring task instance was skipped.",category:"recurring"}],Lc={ready:"tasknotes:runtime.ready","layout.ready":"tasknotes:runtime.layout-ready","settings.changed":"settings-changed","cache.changed":"tasknotes:cache.changed","cache.rebuilt":"tasknotes:cache.rebuilt","extension.registered":"tasknotes:extension.registered","extension.unregistered":"tasknotes:extension.unregistered",unloading:"tasknotes:runtime.unloading"},jbe=[{name:"ready",label:"Runtime ready",description:"TaskNotes loaded its runtime API.",category:"runtime"},{name:"layout.ready",label:"Layout ready",description:"TaskNotes completed post-layout initialization.",category:"runtime"},{name:"settings.changed",label:"Settings changed",description:"TaskNotes settings were saved or reloaded.",category:"settings"},{name:"cache.changed",label:"Cache changed",description:"TaskNotes task data changed or was invalidated.",category:"cache"},{name:"cache.rebuilt",label:"Cache rebuilt",description:"TaskNotes cache was explicitly rebuilt.",category:"cache"},{name:"extension.registered",label:"Extension registered",description:"A companion plugin registered a runtime API extension namespace.",category:"extension"},{name:"extension.unregistered",label:"Extension unregistered",description:"A companion plugin unregistered a runtime API extension namespace.",category:"extension"},{name:"unloading",label:"Runtime unloading",description:"TaskNotes started unloading.",category:"runtime"}],R8e=["invalid_input","invalid_task_path","invalid_status","task_not_found","task_file_not_found","file_already_exists","extension_invalid","extension_namespace_reserved","extension_namespace_conflict","extension_not_registered","operation_failed"],Hr=class extends Error{constructor(t,r,a={}){var i;super(r);this.name="TaskNotesApiError";this.code=t,this.status=(i=a.status)!=null?i:500,this.details=a.details,a.cause!==void 0&&(this.cause=a.cause)}toJSON(){return{name:this.name,code:this.code,message:this.message,status:this.status,details:this.details}}};Ube=["eq","ne","contains","notContains","in","notIn","exists","missing","lt","lte","gt","gte","isTrue","isFalse"]});function $8e(n){let e=vt(n).trim();return e?(0,vi.normalizePath)(e):null}function xn(n,e,t,r,a,i,s={}){var l,c,d,u,p;let o=_X.find(m=>m.id===e);return{id:n,internalProperty:e,label:t,category:r,valueType:a,source:i,queryable:!0,sortable:(l=s.sortable)!=null?l:!1,groupable:(c=s.groupable)!=null?c:!1,supportedOperators:H8e((d=o==null?void 0:o.supportedOperators)!=null?d:b_(a)),aliases:s.aliases,valueInputType:(p=(u=s.valueInputType)!=null?u:o==null?void 0:o.valueInputType)!=null?p:"text"}}function U8e(n){return bq.find(e=>e.internalProperty===n)}function H8e(n){let e=n.map(t=>Qbe(t)).filter(Oc);return e.includes("eq")&&e.push("in"),e.includes("ne")&&e.push("notIn"),Array.from(new Set(e))}function b_(n){return n==="boolean"?["isTrue","isFalse"]:n==="number"?["eq","ne","in","notIn","lt","lte","gt","gte","exists","missing"]:n==="date"||n==="datetime"?["eq","ne","in","notIn","lt","lte","gt","gte","exists","missing"]:n.endsWith("[]")?["contains","notContains","exists","missing"]:["eq","ne","in","notIn","contains","notContains","exists","missing"]}function Vbe(n){return n==="number"?"number":n==="date"?"date":n==="boolean"?"none":n==="list"?"multi-select":"text"}function Qbe(n){if(typeof n!="string")return null;let e=n.trim(),t=z8e.get(e);return t||(Ube.includes(e)?e:null)}function V8e(n){return!["exists","missing","isTrue","isFalse"].includes(n)}function Wbe(){return{sort:[],offset:0,group:[],scope:{includeArchived:!0}}}function W8e(n,e,t){if(!(typeof n=="undefined"||n===null)){if(typeof n!="number"||!Number.isInteger(n)||n<=0){t.push({path:e,code:"limit_invalid",message:"Runtime query limit must be a positive integer."});return}return n}}function q8e(n,e,t){return typeof n=="undefined"||n===null?0:typeof n!="number"||!Number.isInteger(n)||n<0?(t.push({path:e,code:"offset_invalid",message:"Runtime query offset must be a non-negative integer."}),0):n}function G8e(n,e){return typeof n=="undefined"||n===null?{includeArchived:!0}:hu(n)?{includeArchived:n.includeArchived!==!1,folders:qbe(n.folders,"$.scope.folders",e),excludeFolders:qbe(n.excludeFolders,"$.scope.excludeFolders",e)}:(e.push({path:"$.scope",code:"scope_not_object",message:"Runtime query scope must be an object."}),{includeArchived:!0})}function qbe(n,e,t){if(typeof n=="undefined")return;if(!Array.isArray(n)){t.push({path:e,code:"folder_list_invalid",message:"Runtime query folder scope must be an array of folder paths."});return}let r=n.map((a,i)=>typeof a!="string"||a.trim().length===0?(t.push({path:`${e}.${i}`,code:"folder_invalid",message:"Runtime query folder path must be a non-empty string."}),null):(0,vi.normalizePath)(a)).filter(Oc);return r.length>0?r:void 0}function S_(n){if(Array.isArray(n))return n.map(S_);if(hu(n)){let e=n.fn;if(e==="today")return{fn:"today"};if(e==="now")return{fn:"now"};if(e==="date"&&typeof n.value=="string")return{fn:"date",value:n.value};if(e==="dateAdd"&&Number.isFinite(n.amount)&&(n.unit==="day"||n.unit==="week"||n.unit==="month"))return{fn:"dateAdd",value:S_(n.value),amount:Number(n.amount),unit:n.unit}}return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===null?n:Jbe(n)}function C_(n){if(typeof n=="undefined")return null;if(Array.isArray(n))return n.map(e=>String(C_(e)));if(hu(n)){if(n.fn==="today")return"today";if(n.fn==="now")return new Date().toISOString();if(n.fn==="date"&&typeof n.value=="string")return n.value;if(n.fn==="dateAdd")return Y8e(n)}return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===null?n:Jbe(n)}function Jbe(n){var e;if(typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="bigint")return String(n);try{return(e=JSON.stringify(n))!=null?e:""}catch(t){return""}}function Y8e(n){let e=C_(n.value),t=e==="today"?new Date:typeof e=="string"?new Date(e):new Date;return n.unit==="day"&&t.setDate(t.getDate()+n.amount),n.unit==="week"&&t.setDate(t.getDate()+n.amount*7),n.unit==="month"&&t.setMonth(t.getMonth()+n.amount),t.toISOString().slice(0,10)}function wq(n){if("all"in n)return{any:n.all.map(wq).filter(Oc)};if("any"in n)return{all:n.any.map(wq).filter(Oc)};if("not"in n)return n.not;let e=K8e(n.op);return e?{...n,op:e}:null}function K8e(n){var t;return(t={eq:"ne",ne:"eq",contains:"notContains",notContains:"contains",in:"notIn",notIn:"in",exists:"missing",missing:"exists",lt:"gte",lte:"gt",gt:"lte",gte:"lt",isTrue:"isFalse",isFalse:"isTrue"}[n])!=null?t:null}function Z8e(n,e){return n.filter(t=>{var r;return!(!e.includeArchived&&t.archived||e.folders&&!e.folders.some(a=>Gbe(t,a))||(r=e.excludeFolders)!=null&&r.some(a=>Gbe(t,a)))})}function Gbe(n,e){let t=(0,vi.normalizePath)(e);return t?n.path===t||n.path.startsWith(`${t}/`):!0}function Q8e(n,e){let t=[];for(let[r,a]of n.entries()){let i=a.map(s=>s.path).filter(s=>e.has(s));i.length>0&&t.push({key:r,label:r,taskPaths:i})}return t}function EE(n){return`runtime:${n.replace(/[^a-z0-9._-]+/giu,"-")}`}function Oc(n){return n!==null&&typeof n!="undefined"}function J8e(n){let e=(0,vi.normalizePath)(n),t=[e];return/\.md$/iu.test(e)||t.push(`${e}.md`),t}function Tq(n){let e=new Set,t=[];for(let r of n)e.has(r.path)||(e.add(r.path),t.push(r));return t}function X8e(n){return{...n}}function DE(n){switch(n){case"number":return"number";case"date":return"date";case"boolean":return"boolean";case"list":return"string[]";case"text":default:return"string"}}function Ybe(n){return n?n instanceof Date?n:new Date(n):null}function hu(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function eKe(n,e){let t={},r=new Set([...Object.keys(n!=null?n:{}),...Object.keys(e!=null?e:{})]);for(let a of r){if(a==="basesData")continue;let i=n==null?void 0:n[a],s=e==null?void 0:e[a];tg(i,s)||(t[a]={before:i,after:s})}return t}function tg(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;try{return JSON.stringify(n)===JSON.stringify(e)}catch(t){return!1}}function T_(n){var e;return((e=n.timeEntries)!=null?e:[]).filter(t=>!t.endTime).length}function Kbe(n,e){let t=new Set(n!=null?n:[]);return(e!=null?e:[]).some(r=>!t.has(r))}function tKe(n){return n==="task.deleted"?Di:n==="pomodoro.started"?cd:n==="pomodoro.completed"?dd:n==="pomodoro.interrupted"?ud:rt}function cr(n){let e={...n};return n.tags&&(e.tags=[...n.tags]),n.contexts&&(e.contexts=[...n.contexts]),n.projects&&(e.projects=[...n.projects]),n.complete_instances&&(e.complete_instances=[...n.complete_instances]),n.skipped_instances&&(e.skipped_instances=[...n.skipped_instances]),n.icsEventId&&(e.icsEventId=[...n.icsEventId]),n.googleCalendarMovedOriginalDates&&(e.googleCalendarMovedOriginalDates=[...n.googleCalendarMovedOriginalDates]),n.reminders&&(e.reminders=n.reminders.map(t=>({...t}))),n.timeEntries&&(e.timeEntries=n.timeEntries.map(t=>({...t}))),n.blockedBy&&(e.blockedBy=n.blockedBy.map(t=>({...t}))),n.blocking&&(e.blocking=[...n.blocking]),n.customProperties&&(e.customProperties={...n.customProperties}),e}var vi,F8e,L8e,O8e,Zbe,z8e,bq,Hbe,B8e,j8e,w_,Xbe=y(()=>{vi=require("obsidian");Obe();Wl();Pr();yt();Cn();CE();DC();xE();xE();F8e=new Set(["apiversion","capabilities","events","extensions","hascapability","nlp","pomodoro","relationships","recurring","settings","tasks","time"]),L8e=[{id:"title",label:"Title",valueType:"string",source:"model",writable:!0,required:!0},{id:"status",label:"Status",valueType:"string",source:"model",writable:!0,required:!0},{id:"priority",label:"Priority",valueType:"string",source:"model",writable:!0,required:!0},{id:"due",label:"Due",valueType:"date",source:"model",writable:!0},{id:"scheduled",label:"Scheduled",valueType:"date",source:"model",writable:!0},{id:"archived",label:"Archived",valueType:"boolean",source:"model",writable:!0},{id:"tags",label:"Tags",valueType:"string[]",source:"model",writable:!0},{id:"contexts",label:"Contexts",valueType:"string[]",source:"model",writable:!0},{id:"projects",label:"Projects",valueType:"string[]",source:"model",writable:!0},{id:"recurrence",label:"Recurrence",valueType:"string",source:"model",writable:!0},{id:"recurrence_anchor",label:"Recurrence anchor",valueType:"string",source:"model",writable:!0},{id:"complete_instances",label:"Complete instances",valueType:"string[]",source:"model",writable:!0},{id:"skipped_instances",label:"Skipped instances",valueType:"string[]",source:"model",writable:!0},{id:"recurrence_parent",label:"Recurrence parent",valueType:"string",source:"model",writable:!0},{id:"occurrence_date",label:"Occurrence date",valueType:"date",source:"model",writable:!0},{id:"occurrence_materialization",label:"Occurrence materialization",valueType:"string",source:"model",writable:!0},{id:"occurrence_next_trigger",label:"Occurrence next trigger",valueType:"string",source:"model",writable:!0},{id:"occurrence_template",label:"Occurrence template",valueType:"string",source:"model",writable:!0},{id:"occurrence_past_horizon",label:"Occurrence past horizon",valueType:"string",source:"model",writable:!0},{id:"occurrence_future_horizon",label:"Occurrence future horizon",valueType:"string",source:"model",writable:!0},{id:"completedDate",label:"Completed date",valueType:"date",source:"model",writable:!0},{id:"timeEstimate",label:"Time estimate",valueType:"number",source:"model",writable:!0},{id:"timeEntries",label:"Time entries",valueType:"timeEntry[]",source:"model",writable:!0},{id:"attachments",label:"Attachments",valueType:"string[]",source:"model",writable:!0},{id:"dateCreated",label:"Date created",valueType:"datetime",source:"model",writable:!0},{id:"dateModified",label:"Date modified",valueType:"datetime",source:"model",writable:!0},{id:"reminders",label:"Reminders",valueType:"reminder[]",source:"model",writable:!0},{id:"blockedBy",label:"Blocked by",valueType:"dependency[]",source:"model",writable:!0},{id:"details",label:"Details",valueType:"string",source:"model",writable:!0},{id:"sortOrder",label:"Sort order",valueType:"string",source:"model",writable:!0},{id:"path",label:"Path",valueType:"string",source:"model",writable:!1},{id:"totalTrackedTime",label:"Total tracked time",valueType:"number",source:"computed",writable:!1},{id:"blocking",label:"Blocking",valueType:"string[]",source:"computed",writable:!1},{id:"isBlocked",label:"Is blocked",valueType:"boolean",source:"computed",writable:!1},{id:"isBlocking",label:"Is blocking",valueType:"boolean",source:"computed",writable:!1},{id:"hasSubtasks",label:"Has subtasks",valueType:"boolean",source:"computed",writable:!1}],O8e={title:"title",status:"status",priority:"priority",due:"due",scheduled:"scheduled",contexts:"contexts",projects:"projects",attachments:"attachments",recurrence:"recurrence",recurrence_anchor:"recurrenceAnchor",complete_instances:"completeInstances",skipped_instances:"skippedInstances",recurrence_parent:"recurrenceParent",occurrence_date:"occurrenceDate",occurrence_materialization:"occurrenceMaterialization",occurrence_next_trigger:"occurrenceNextTrigger",occurrence_template:"occurrenceTemplate",occurrence_past_horizon:"occurrencePastHorizon",occurrence_future_horizon:"occurrenceFutureHorizon",completedDate:"completedDate",timeEstimate:"timeEstimate",timeEntries:"timeEntries",dateCreated:"dateCreated",dateModified:"dateModified",reminders:"reminders",blockedBy:"blockedBy",sortOrder:"sortOrder"},Zbe=[{id:"eq",label:"equals",valueRequired:!0,appliesTo:["string","number","boolean","date","datetime","string[]"],aliases:["is"]},{id:"ne",label:"does not equal",valueRequired:!0,appliesTo:["string","number","boolean","date","datetime","string[]"],aliases:["is-not"]},{id:"contains",label:"contains",valueRequired:!0,appliesTo:["string","string[]","dependency[]"]},{id:"notContains",label:"does not contain",valueRequired:!0,appliesTo:["string","string[]","dependency[]"],aliases:["does-not-contain"]},{id:"in",label:"is one of",valueRequired:!0,appliesTo:["string","number","boolean","date","datetime"]},{id:"notIn",label:"is not one of",valueRequired:!0,appliesTo:["string","number","boolean","date","datetime"]},{id:"exists",label:"exists",valueRequired:!1,appliesTo:["string","number","boolean","date","datetime","string[]"],aliases:["is-not-empty"]},{id:"missing",label:"is missing",valueRequired:!1,appliesTo:["string","number","boolean","date","datetime","string[]"],aliases:["is-empty"]},{id:"lt",label:"is less than",valueRequired:!0,appliesTo:["number","date","datetime"],aliases:["is-before","is-less-than"]},{id:"lte",label:"is less than or equal",valueRequired:!0,appliesTo:["number","date","datetime"],aliases:["is-on-or-before","is-less-than-or-equal"]},{id:"gt",label:"is greater than",valueRequired:!0,appliesTo:["number","date","datetime"],aliases:["is-after","is-greater-than"]},{id:"gte",label:"is greater than or equal",valueRequired:!0,appliesTo:["number","date","datetime"],aliases:["is-on-or-after","is-greater-than-or-equal"]},{id:"isTrue",label:"is true",valueRequired:!1,appliesTo:["boolean"],aliases:["is-checked"]},{id:"isFalse",label:"is false",valueRequired:!1,appliesTo:["boolean"],aliases:["is-not-checked"]}],z8e=new Map(Zbe.flatMap(n=>{var e;return[[n.id,n.id],...((e=n.aliases)!=null?e:[]).map(t=>[t,n.id])]})),bq=[xn("task.title","title","Title","text","string","model",{aliases:["title","note.title"],sortable:!0}),xn("file.path","path","Path","file","string","file",{aliases:["path","task.path","note.path"]}),xn("task.status","status","Status","select","string","model",{aliases:["status","note.status"],sortable:!0,groupable:!0}),xn("task.priority","priority","Priority","select","string","model",{aliases:["priority","note.priority"],sortable:!0,groupable:!0}),xn("task.tags","tags","Tags","select","string[]","model",{aliases:["tags","file.tags","note.tags"],sortable:!0,groupable:!0}),xn("task.contexts","contexts","Contexts","select","string[]","model",{aliases:["contexts"],groupable:!0}),xn("task.projects","projects","Projects","select","string[]","model",{aliases:["projects"],groupable:!0}),xn("task.blockedBy","blockedBy","Blocked by","select","dependency[]","model",{aliases:["blockedBy"]}),xn("task.blocking","blocking","Blocking","select","string[]","computed",{aliases:["blocking"]}),xn("task.due","due","Due date","date","date","model",{aliases:["due","note.due"],sortable:!0,groupable:!0}),xn("task.scheduled","scheduled","Scheduled date","date","date","model",{aliases:["scheduled","note.scheduled"],sortable:!0,groupable:!0}),xn("task.completedDate","completedDate","Completed date","date","date","model",{aliases:["completedDate"],sortable:!0,groupable:!0}),xn("task.dateCreated","dateCreated","Created date","date","datetime","model",{aliases:["dateCreated","file.ctime"],sortable:!0}),xn("task.dateModified","dateModified","Modified date","date","datetime","model",{aliases:["dateModified","file.mtime"]}),xn("task.archived","archived","Archived","boolean","boolean","model",{aliases:["archived"]}),xn("task.hasSubtasks","hasSubtasks","Has subtasks","boolean","boolean","computed",{aliases:["hasSubtasks"]}),xn("task.isBlocked","dependencies.isBlocked","Blocked","boolean","boolean","computed",{aliases:["dependencies.isBlocked","isBlocked"]}),xn("task.isBlocking","dependencies.isBlocking","Blocking others","boolean","boolean","computed",{aliases:["dependencies.isBlocking","isBlocking"]}),xn("task.timeEstimate","timeEstimate","Time estimate","numeric","number","model",{aliases:["timeEstimate"],sortable:!0}),xn("task.recurrence","recurrence","Recurrence","special","string","model",{aliases:["recurrence"]}),xn("task.isCompleted","status.isCompleted","Completed","boolean","boolean","computed",{aliases:["status.isCompleted","completed"]})],Hbe={eq:"is",ne:"is-not",contains:"contains",notContains:"does-not-contain",in:"is",notIn:"is-not",exists:"is-not-empty",missing:"is-empty",lt:"is-before",lte:"is-on-or-before",gt:"is-after",gte:"is-on-or-after",isTrue:"is-checked",isFalse:"is-not-checked"},B8e=[{id:"parents",label:"Parents",description:"Tasks referenced from this task's projects."},{id:"subtasks",label:"Subtasks",description:"Tasks that reference this task as a project."},{id:"dependencies",label:"Dependencies",description:"Tasks this task is blocked by."},{id:"blocking",label:"Blocking",description:"Tasks blocked by this task."}],j8e=[{value:"FINISHTOSTART",label:"Finish to start",description:"The blocking task should finish before this task starts."},{value:"FINISHTOFINISH",label:"Finish to finish",description:"The blocking task should finish before this task finishes."},{value:"STARTTOSTART",label:"Start to start",description:"The blocking task should start before this task starts."},{value:"STARTTOFINISH",label:"Start to finish",description:"The blocking task should start before this task finishes."}],w_=class{constructor(e){this.plugin=e;this.apiVersion=1;this.model={info:()=>({packageName:"@tasknotes/model",specVersion:Pbe,runtimeApiVersion:this.apiVersion}),config:()=>this.getModelConfig(),validateTask:e=>this.validateTask(e),validatePatch:e=>this.validateTaskPatch(e)};this.catalog={statuses:()=>this.getStatuses(),priorities:()=>this.getPriorities(),userFields:()=>this.getUserFields(),fields:()=>this.getFieldDefinitions(),writableFields:()=>this.getFieldDefinitions().filter(e=>e.writable),filterProperties:()=>this.getFilterPropertyDefinitions(),filterOperators:()=>Zbe.map(e=>({...e})),relationships:()=>B8e.map(e=>({...e})),dependencyRelTypes:()=>j8e.map(e=>({...e})),events:()=>this.events.list()};this.tasks={get:e=>this.getTask(e),list:e=>this.listTasks(e),create:(e,t)=>this.createTask(e,t),update:(e,t,r)=>this.updateTask(e,t,r),patch:(e,t,r)=>this.updateTask(e,t,r),delete:(e,t)=>this.deleteTask(e,t),complete:(e,t,r)=>this.completeTask(e,t,r),uncomplete:(e,t,r)=>this.uncompleteTask(e,t,r),setStatus:(e,t,r)=>this.setTaskProperty(e,"status",t,r),setPriority:(e,t,r)=>this.setTaskProperty(e,"priority",t,r),setDue:(e,t,r)=>this.setTaskProperty(e,"due",t,r),clearDue:(e,t)=>this.setTaskProperty(e,"due",void 0,t),setScheduled:(e,t,r)=>this.setTaskProperty(e,"scheduled",t,r),clearScheduled:(e,t)=>this.setTaskProperty(e,"scheduled",void 0,t),reschedule:(e,t,r)=>this.rescheduleTask(e,t,r),archive:(e,t,r)=>this.archiveTask(e,t,r),move:(e,t,r)=>this.moveTask(e,t,r),addTag:(e,t,r)=>this.updateStringList(e,"tags",t,"add",r),removeTag:(e,t,r)=>this.updateStringList(e,"tags",t,"remove",r),addProject:(e,t,r)=>this.updateStringList(e,"projects",t,"add",r),removeProject:(e,t,r)=>this.updateStringList(e,"projects",t,"remove",r),addContext:(e,t,r)=>this.updateStringList(e,"contexts",t,"add",r),removeContext:(e,t,r)=>this.updateStringList(e,"contexts",t,"remove",r),setReminders:(e,t,r)=>this.updateTask(e,{reminders:t.map(a=>({...a}))},r),addReminder:(e,t,r)=>this.addReminder(e,t,r),removeReminder:(e,t,r)=>this.removeReminder(e,t,r),addDependency:(e,t,r)=>this.addDependency(e,t,r),removeDependency:(e,t,r)=>this.removeDependency(e,t,r)};this.relationships={parents:e=>this.getParentTasks(e),subtasks:e=>this.getSubtasks(e),dependencies:e=>this.getTaskDependencies(e),blocking:e=>this.getBlockingTasks(e),all:e=>this.getTaskRelationships(e)};this.time={start:(e,t,r)=>this.startTime(e,t,r),stop:(e,t)=>this.stopTime(e,t),active:()=>this.getActiveTimeEntries(),summary:e=>this.getTimeSummary(e),task:e=>this.getTaskTimeData(e),append:(e,t,r)=>this.appendTimeEntry(e,t,r),deleteEntry:(e,t,r)=>this.deleteTimeEntry(e,t,r)};this.pomodoro={status:()=>Promise.resolve(this.copyPomodoroState(this.plugin.pomodoroService.getState())),start:(e,t)=>this.startPomodoro(e,t),stop:e=>this.stopPomodoro(e),pause:e=>this.pausePomodoro(e),resume:e=>this.resumePomodoro(e),assignTask:(e,t)=>this.assignPomodoroTask(e,t),sessions:e=>this.getPomodoroSessions(e),stats:e=>this.getPomodoroStats(e)};this.recurring={toggleCompleteInstance:(e,t,r)=>this.toggleRecurringComplete(e,t,r),toggleSkippedInstance:(e,t,r)=>this.toggleRecurringSkipped(e,t,r),materializeOccurrence:(e,t,r)=>this.materializeOccurrence(e,t,r)};this.events={on:(e,t)=>this.on(e,t),off:e=>this.off(e),list:()=>Bbe.map(e=>({...e}))};this.settings={snapshot:()=>this.getSettingsSnapshot()};this.bases={updateDefaultFiles:()=>this.updateDefaultBasesFiles()};this.nlp={parse:e=>this.parseNaturalLanguage(e)};this.query={tasks:e=>this.queryTasks(e),validate:e=>this.validateRuntimeQuery(e),normalize:e=>this.normalizeRuntimeQueryOrThrow(e),explain:e=>this.explainRuntimeQuery(e),filterOptions:()=>this.getFilterOptions()};this.stats={tasks:e=>this.getTaskStats(e)};this.system={health:()=>this.getHealth()};this.ui={taskMenu:{show:e=>this.showTaskMenu(e),showAtElement:e=>this.showTaskMenuAtElement(e),populate:(e,t)=>this.populateTaskMenu(e,t)}};this.lifecycle={ready:()=>this.plugin.onReady(),isReady:()=>this.plugin.initializationComplete===!0,on:(e,t)=>this.onLifecycle(e,t),off:e=>this.off(e),list:()=>jbe.map(e=>({...e}))};this.errors={isApiError:e=>$be(e),normalize:e=>this.normalizeError(e),toResult:async e=>{try{return{ok:!0,value:await e()}}catch(t){return{ok:!1,error:this.normalizeError(t)}}}};this.extensions={register:e=>this.registerExtension(e),get:e=>this.getExtension(e),require:e=>this.requireExtension(e),has:e=>this.hasExtension(e),list:()=>this.listExtensions(),capabilities:()=>this.getExtensionCapabilities()};this.mutationContextByPath=new Map;this.mutationContextStack=[];this.extensionRegistry=new Map}get capabilities(){return[...zbe,...this.getExtensionCapabilities()]}hasCapability(e){return this.capabilities.includes(e)}parseNaturalLanguage(e){if(typeof e!="string")throw new Hr("invalid_input","TaskNotes API parseNaturalLanguage expects a string",{status:400});return Nn.fromPlugin(this.plugin).parseInput(e)}getModelConfig(){var t,r,a,i,s,o,l,c,d,u,p,m,f,h;let e=this.plugin.settings;return Mbe({fieldMapping:e.fieldMapping,statuses:e.customStatuses,priorities:e.customPriorities,defaults:{status:(t=e.defaultTaskStatus)!=null?t:"open",priority:(r=e.defaultTaskPriority)!=null?r:"normal",taskTag:(a=e.taskTag)!=null?a:"task"},taskIdentification:{method:(i=e.taskIdentificationMethod)!=null?i:"tag",tag:(s=e.taskTag)!=null?s:"task",propertyName:(o=e.taskPropertyName)!=null?o:"type",propertyValue:(l=e.taskPropertyValue)!=null?l:"task",excludedFolders:(c=e.excludedFolders)!=null?c:""},storeTitleInFilename:(d=e.storeTitleInFilename)!=null?d:!1,userFields:(u=e.userFields)!=null?u:[],recurrence:{maintainDueDateOffset:(p=e.maintainDueDateOffsetInRecurring)!=null?p:!0,resetCheckboxesOnRecurrence:(m=e.resetCheckboxesOnRecurrence)!=null?m:!0},timeTracking:{autoStopOnComplete:(f=e.autoStopTimeTrackingOnComplete)!=null?f:!1,autoStopNotification:(h=e.autoStopTimeTrackingNotification)!=null?h:!0,defaultSessionDescription:""}})}validateTask(e){var t;return Lbe(e,(t=this.plugin.settings.customStatuses)!=null?t:[])}validateTaskPatch(e){return vq(e)}normalizeError(e){return e instanceof Hr?e.toJSON():kq(e)?e:new Hr("operation_failed",e instanceof Error?e.message:String(e),{status:500,cause:e}).toJSON()}async updateDefaultBasesFiles(){return this.plugin.updateDefaultBasesFiles()}getStatuses(){var e;return((e=this.plugin.settings.customStatuses)!=null?e:[]).map(t=>({...t}))}getPriorities(){var e;return((e=this.plugin.settings.customPriorities)!=null?e:[]).map(t=>({...t}))}getUserFields(){var e;return((e=this.plugin.settings.userFields)!=null?e:[]).map(t=>({...t}))}getFieldDefinitions(){var a;let e=(a=this.plugin.settings.fieldMapping)!=null?a:{},t=L8e.map(i=>{var l,c,d;let s=O8e[i.id],o=U8e(i.id);return{...i,frontmatterKey:s?e[s]:void 0,queryable:!!o,sortable:(l=o==null?void 0:o.sortable)!=null?l:!1,groupable:(c=o==null?void 0:o.groupable)!=null?c:!1,supportedOperators:o==null?void 0:o.supportedOperators,aliases:o?[o.id,...(d=o.aliases)!=null?d:[]]:void 0}}),r=this.getUserFields().map(i=>({id:`user:${i.id||i.key}`,label:i.displayName||i.key,valueType:DE(i.type),source:"user",writable:!0,queryable:!0,sortable:!0,groupable:!0,supportedOperators:b_(DE(i.type)),aliases:[`user.${i.id||i.key}`,`user:${i.id||i.key}`],frontmatterKey:i.key,description:`User-defined field ${i.key}`}));return[...t,...r]}getFilterPropertyDefinitions(){let e=this.getUserFields().map(t=>({id:`user.${t.id||t.key}`,label:t.displayName||t.key,category:"user",valueType:DE(t.type),source:"user",queryable:!0,sortable:!0,groupable:!0,supportedOperators:b_(DE(t.type)),aliases:[`user:${t.id||t.key}`,`user.${t.key}`,`user:${t.key}`],frontmatterKey:t.key,valueInputType:Vbe(t.type)}));return[...bq.map(({internalProperty:t,...r})=>({...r,aliases:r.aliases?[...r.aliases]:void 0,supportedOperators:[...r.supportedOperators]})),...e]}async queryTasks(e){let t=this.normalizeRuntimeQueryForExecution(e);if(!t.validation.valid)throw new Hr("invalid_input","TaskNotes runtime query is invalid",{status:400,details:{issues:t.validation.issues}});let r=await this.plugin.cacheManager.getAllTasks(),a=Z8e(r,t.normalized.scope),i=new Set(a.map(m=>m.path)),s=await this.plugin.filterService.getGroupedTasks(t.filterQuery),o=new Map;for(let m of s.values())for(let f of m)i.has(f.path)&&!o.has(f.path)&&o.set(f.path,f);let l=Array.from(o.values()),c=t.normalized.offset,d=t.normalized.limit,u=typeof d=="number"?l.slice(c,c+d):l.slice(c),p=new Set(u.map(m=>m.path));return{tasks:u.map(cr),total:a.length,matched:l.length,returned:u.length,groups:t.normalized.group.length>0?Q8e(s,p):void 0,query:t.normalized,warnings:t.validation.warnings}}validateRuntimeQuery(e){return this.normalizeRuntimeQueryForExecution(e).validation}normalizeRuntimeQueryOrThrow(e){let t=this.normalizeRuntimeQueryForExecution(e);if(!t.validation.valid)throw new Hr("invalid_input","TaskNotes runtime query is invalid",{status:400,details:{issues:t.validation.issues}});return t.normalized}async explainRuntimeQuery(e){var i;let t=this.normalizeRuntimeQueryForExecution(e);if(!t.validation.valid)return{valid:!1,issues:t.validation.issues,warnings:t.validation.warnings,notes:["Query validation failed before execution."]};let r=await this.queryTasks(e),a=[];return t.normalized.sort.length>1&&a.push("Only the first sort is currently applied by the TaskNotes filter engine."),t.normalized.group.length>1&&a.push("Only the first group is currently applied by the TaskNotes filter engine."),{valid:!0,query:r.query,issues:[],warnings:(i=r.warnings)!=null?i:[],total:r.total,matched:r.matched,returned:r.returned,groups:r.groups,appliedSort:r.query.sort.slice(0,1),appliedLimit:r.query.limit,appliedOffset:r.query.offset,notes:a}}async getFilterOptions(){return this.plugin.filterService.getFilterOptions()}normalizeRuntimeQueryForExecution(e){let t=[],r=[],a=this.normalizeRuntimeTaskQuery(e,t,r);return{filterQuery:this.runtimeQueryToFilterQuery(a,t,r),normalized:a,validation:{valid:t.length===0,issues:t,warnings:r,normalized:t.length===0?a:void 0}}}normalizeRuntimeTaskQuery(e,t,r){if(e==null)return Wbe();if(!hu(e))return t.push({path:"$",code:"query_not_object",message:"Runtime task query must be an object."}),Wbe();let a=typeof e.where=="undefined"?void 0:this.normalizeRuntimePredicate(e.where,"$.where",t),i=this.normalizeRuntimeSorts(e.sort,t,r),s=this.normalizeRuntimeGroups(e.group,t,r),o=W8e(e.limit,"$.limit",t),l=q8e(e.offset,"$.offset",t),c=G8e(e.scope,t);return{where:a,sort:i,limit:o,offset:l,group:s,scope:c}}normalizeRuntimePredicate(e,t,r){if(!hu(e)){r.push({path:t,code:"predicate_not_object",message:"Runtime query predicate must be an object."});return}if(Array.isArray(e.all))return{all:e.all.map((a,i)=>this.normalizeRuntimePredicate(a,`${t}.all.${i}`,r)).filter(Oc)};if(Array.isArray(e.any))return{any:e.any.map((a,i)=>this.normalizeRuntimePredicate(a,`${t}.any.${i}`,r)).filter(Oc)};if(typeof e.not!="undefined"){let a=this.normalizeRuntimePredicate(e.not,`${t}.not`,r);return a?{not:a}:void 0}return this.normalizeRuntimeCondition(e,t,r)}normalizeRuntimeCondition(e,t,r){if(typeof e.field!="string"||e.field.trim().length===0){r.push({path:`${t}.field`,code:"field_required",message:"Runtime query condition requires a field."});return}let a=this.resolveRuntimeQueryField(e.field);if(!a){r.push({path:`${t}.field`,code:"field_unknown",message:`Unsupported runtime query field: ${e.field}`});return}let i=Qbe(e.op);if(!i){r.push({path:`${t}.op`,code:"operator_unknown",message:`Unsupported runtime query operator: ${String(e.op)}`});return}if(!a.definition.supportedOperators.includes(i)){r.push({path:`${t}.op`,code:"operator_unsupported",message:`Operator ${i} is not supported for ${a.definition.id}.`});return}let s=V8e(i);if(s&&typeof e.value=="undefined"){r.push({path:`${t}.value`,code:"value_required",message:`Operator ${i} requires a value.`});return}if((i==="in"||i==="notIn")&&!Array.isArray(e.value)){r.push({path:`${t}.value`,code:"value_array_required",message:`Operator ${i} requires an array value.`});return}return{field:a.definition.id,op:i,value:s?S_(e.value):void 0}}normalizeRuntimeSorts(e,t,r){if(typeof e=="undefined")return[];if(!Array.isArray(e))return t.push({path:"$.sort",code:"sort_not_array",message:"Runtime query sort must be an array."}),[];let a=e.map((i,s)=>{if(!hu(i)||typeof i.field!="string")return t.push({path:`$.sort.${s}`,code:"sort_invalid",message:"Runtime query sort entries require a field."}),null;let o=this.resolveRuntimeQueryField(i.field);if(!o||!o.definition.sortable)return t.push({path:`$.sort.${s}.field`,code:"sort_field_unsupported",message:`Runtime query field is not sortable: ${i.field}`}),null;let l=i.direction==="desc"?"desc":"asc";return{field:o.definition.id,direction:l}}).filter(Oc);return a.length>1&&r.push({path:"$.sort",code:"multiple_sorts",message:"Only the first sort is currently applied by TaskNotes."}),a}normalizeRuntimeGroups(e,t,r){if(typeof e=="undefined")return[];if(!Array.isArray(e))return t.push({path:"$.group",code:"group_not_array",message:"Runtime query group must be an array."}),[];let a=e.map((i,s)=>{if(!hu(i)||typeof i.field!="string")return t.push({path:`$.group.${s}`,code:"group_invalid",message:"Runtime query group entries require a field."}),null;let o=this.resolveRuntimeQueryField(i.field);return!o||!o.definition.groupable?(t.push({path:`$.group.${s}.field`,code:"group_field_unsupported",message:`Runtime query field is not groupable: ${i.field}`}),null):{field:o.definition.id}}).filter(Oc);return a.length>1&&r.push({path:"$.group",code:"multiple_groups",message:"Only the first group is currently applied by TaskNotes."}),a}runtimeQueryToFilterQuery(e,t,r){var c;let a=this.runtimePredicateToFilterNode(e.where,"$.where",t),s={type:"group",id:"runtime-query-root",conjunction:"and",children:a?a.type==="group"&&a.conjunction==="and"?a.children:[a]:[]},o=e.sort[0];if(o){let d=this.runtimeFieldToSortKey(o.field);d?(s.sortKey=d,s.sortDirection=(c=o.direction)!=null?c:"asc"):r.push({path:"$.sort.0.field",code:"sort_not_applied",message:`Sort field ${o.field} could not be mapped to TaskNotes sorting.`})}let l=e.group[0];if(l){let d=this.runtimeFieldToGroupKey(l.field);d?s.groupKey=d:r.push({path:"$.group.0.field",code:"group_not_applied",message:`Group field ${l.field} could not be mapped to TaskNotes grouping.`})}return s}runtimePredicateToFilterNode(e,t,r){if(!e)return null;if("all"in e)return{type:"group",id:EE(t),conjunction:"and",children:e.all.map((a,i)=>this.runtimePredicateToFilterNode(a,`${t}.all.${i}`,r)).filter(Oc)};if("any"in e)return{type:"group",id:EE(t),conjunction:"or",children:e.any.map((a,i)=>this.runtimePredicateToFilterNode(a,`${t}.any.${i}`,r)).filter(Oc)};if("not"in e){let a=wq(e.not);return a?this.runtimePredicateToFilterNode(a,`${t}.not`,r):(r.push({path:`${t}.not`,code:"not_unsupported",message:"Unable to invert runtime query predicate."}),null)}return this.runtimeConditionToFilterNode(e,t)}runtimeConditionToFilterNode(e,t){var i;let r=this.resolveRuntimeQueryField(e.field),a=Array.isArray(e.value)&&(e.op==="in"||e.op==="notIn")?e.value:null;return a?{type:"group",id:EE(t),conjunction:e.op==="in"?"or":"and",children:a.map((s,o)=>{var l;return{type:"condition",id:EE(`${t}.value.${o}`),property:(l=r==null?void 0:r.internalProperty)!=null?l:e.field,operator:Hbe[e.op],value:C_(S_(s))}})}:{type:"condition",id:EE(t),property:(i=r==null?void 0:r.internalProperty)!=null?i:e.field,operator:Hbe[e.op],value:C_(e.value)}}resolveRuntimeQueryField(e){let t=e.trim(),r=this.resolveRuntimeUserField(t);if(r)return r;let a=bq.find(i=>{var s;return i.id===t||((s=i.aliases)!=null?s:[]).includes(t)});return a?{definition:a,internalProperty:a.internalProperty}:null}resolveRuntimeUserField(e){if(!e.startsWith("user.")&&!e.startsWith("user:"))return null;let t=e.slice(5),r=this.getUserFields().find(s=>s.id===t||s.key===t);if(!r)return null;let a=r.id||r.key,i=DE(r.type);return{internalProperty:`user:${a}`,definition:{id:`user.${a}`,label:r.displayName||r.key,category:"user",valueType:i,source:"user",queryable:!0,sortable:!0,groupable:!0,supportedOperators:b_(i),aliases:[`user:${a}`,`user.${r.key}`,`user:${r.key}`],frontmatterKey:r.key,valueInputType:Vbe(r.type)}}}runtimeFieldToSortKey(e){let t=this.resolveRuntimeQueryField(e);if(!t)return null;let r=t.internalProperty;return r.startsWith("user:")||r==="due"||r==="scheduled"||r==="priority"||r==="status"||r==="title"||r==="dateCreated"||r==="completedDate"||r==="tags"?r:null}runtimeFieldToGroupKey(e){let t=this.resolveRuntimeQueryField(e);if(!t)return null;let r=t.internalProperty;return r.startsWith("user:")||r==="priority"||r==="due"||r==="scheduled"||r==="status"||r==="tags"||r==="completedDate"?r:r==="contexts"?"context":r==="projects"?"project":null}async getTaskStats(e){var a,i;let t=e?(await this.queryTasks(e)).tasks:await this.plugin.cacheManager.getAllTasks(),r=(i=(a=this.plugin.taskStatsService)==null?void 0:a.getStats(t))!=null?i:this.computeTaskStats(t);return{total:r.total,statusCounts:{...r.statusCounts},priorityCounts:{...r.priorityCounts},completed:r.completed,active:r.active,overdue:r.overdue,archived:r.archived,withTimeEntries:r.withTimeEntries,totalTrackedMinutes:r.totalTrackedMinutes,totalTrackedHours:r.totalTrackedHours}}async getTimeSummary(e={}){var r,a;let t=await this.plugin.cacheManager.getAllTasks();return Jk(t,{period:(r=e.period)!=null?r:"today",fromDate:Ybe(e.from),toDate:Ybe(e.to),includeTags:(a=e.includeTags)!=null?a:!0},i=>this.plugin.statusManager.isCompletedStatus(i))}async getTaskTimeData(e){let t=await this.requireTask(e);return pm(t,r=>this.plugin.getActiveTimeSession(r))}async getHealth(){let e=await this.plugin.cacheManager.getAllTasks();return{status:"ok",timestamp:new Date().toISOString(),apiVersion:this.apiVersion,capabilities:this.capabilities,vault:this.getVaultInfo(),tasks:{total:e.length}}}async showTaskMenu(e){(await this.buildTaskContextMenu(e)).show(e.event)}async showTaskMenuAtElement(e){(await this.buildTaskContextMenu(e)).showAtElement(e.element)}async populateTaskMenu(e,t){var a,i;let r=await this.requireTask(t.taskPath);ll.addToMenu(e,{task:r,plugin:this.plugin,targetDate:(a=t.targetDate)!=null?a:new Date,promoteOccurrenceControls:t.promoteOccurrenceControls,onUpdate:(i=t.onUpdate)!=null?i:this.defaultTaskMenuUpdateHandler()})}async buildTaskContextMenu(e){var r,a;let t=await this.requireTask(e.taskPath);return new ll({task:t,plugin:this.plugin,targetDate:(r=e.targetDate)!=null?r:new Date,promoteOccurrenceControls:e.promoteOccurrenceControls,onUpdate:(a=e.onUpdate)!=null?a:this.defaultTaskMenuUpdateHandler()})}defaultTaskMenuUpdateHandler(){return()=>{this.plugin.app.workspace.trigger("tasknotes:refresh-views")}}getVaultInfo(){let e=this.plugin.app.vault.adapter,t=null;try{typeof e.basePath=="string"?t=e.basePath:typeof e.path=="string"&&(t=e.path)}catch(r){t=null}return{name:this.plugin.app.vault.getName(),path:t}}computeTaskStats(e){var u,p,m,f,h;let t={},r={},a=0,i=0,s=0,o=0,l=0,c=0,d=(u=new Date().toISOString().split("T")[0])!=null?u:"";for(let g of e){t[g.status]=((p=t[g.status])!=null?p:0)+1,r[g.priority]=((m=r[g.priority])!=null?m:0)+1;let v=this.plugin.statusManager.isCompletedStatus(g.status);v&&a++,g.archived&&o++,!v&&!g.archived&&i++,g.due&&g.due<d&&!v&&!g.archived&&s++,(f=g.timeEntries)!=null&&f.length&&(l++,c+=(h=g.totalTrackedTime)!=null?h:0)}return{total:e.length,statusCounts:t,priorityCounts:r,completed:a,active:i,overdue:s,archived:o,withTimeEntries:l,totalTrackedMinutes:c,totalTrackedHours:Math.round(c/60*100)/100}}async getTask(e){let t=await this.plugin.cacheManager.getTaskInfo(this.normalizeTaskPath(e));return t?cr(t):null}async listTasks(e){return e?(await this.queryTasks(e)).tasks:(await this.plugin.cacheManager.getAllTasks()).map(cr)}async getParentTasks(e){var a;let t=await this.requireTask(e),r=[];for(let i of(a=t.projects)!=null?a:[]){let s=await this.resolveTaskReference(i,t.path);s&&r.push(s)}return Tq(r).map(cr)}async getSubtasks(e){var i;let t=await this.requireTask(e),r=await this.plugin.cacheManager.getAllTasks(),a=[];for(let s of r)if(s.path!==t.path){for(let o of(i=s.projects)!=null?i:[])if(await this.taskReferenceMatches(o,s.path,t.path)){a.push(s);break}}return Tq(a).map(cr)}async getTaskDependencies(e){var a,i;let t=await this.requireTask(e),r=[];for(let s of(a=t.blockedBy)!=null?a:[]){let o=await this.resolveTaskReferencePath(s.uid,t.path),l=o?await this.plugin.cacheManager.getTaskInfo(o):null;r.push({dependency:X8e(s),task:l?cr(l):null,path:(i=l==null?void 0:l.path)!=null?i:o})}return r}async getBlockingTasks(e){var i;let t=await this.requireTask(e),r=await this.plugin.cacheManager.getAllTasks(),a=[];for(let s of r)if(s.path!==t.path){for(let o of(i=s.blockedBy)!=null?i:[])if(await this.taskReferenceMatches(o.uid,s.path,t.path)){a.push(s);break}}return Tq(a).map(cr)}async getTaskRelationships(e){let t=await this.requireTask(e),[r,a,i,s]=await Promise.all([this.getParentTasks(t.path),this.getSubtasks(t.path),this.getTaskDependencies(t.path),this.getBlockingTasks(t.path)]);return{task:cr(t),parents:r,subtasks:a,dependencies:i,blocking:s}}async createTask(e,t){let r=await this.withMutationContext([],t,async()=>{var a;return this.plugin.taskService.createTask({...e,creationContext:(a=e.creationContext)!=null?a:"api"},{applyDefaults:!0})});return cr(r.taskInfo)}async updateTask(e,t,r){let a=await this.requireTask(e),i=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.updateTask(a,t));return cr(i)}async completeTask(e,t,r){var o,l;let a=await this.requireTask(e),i=(l=(o=t==null?void 0:t.status)!=null?o:this.plugin.statusManager.getCompletedStatuses()[0])!=null?l:"done";if(!this.plugin.statusManager.isCompletedStatus(i))throw new Hr("invalid_status",`Status "${i}" is not configured as a completed status`,{status:400,details:{status:i}});if(!(t!=null&&t.status)&&this.plugin.statusManager.isCompletedStatus(a.status))return cr(a);let s=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.updateProperty(a,"status",i));return cr(s)}async rescheduleTask(e,t,r){let a=await this.requireTask(e),i=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.updateProperty(a,"scheduled",t!=null?t:void 0));return cr(i)}async archiveTask(e,t,r){let a=await this.requireTask(e);if(a.archived===t)return cr(a);let i=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.toggleArchive(a));return cr(i)}async moveTask(e,t,r){let a=await this.requireTask(e),i=this.requireTaskFile(a.path),s=(0,vi.normalizePath)(t),o=s?`${s}/${i.name}`:i.name;return o===a.path?cr(a):this.withMutationContext([a.path,o],r,async()=>{if(s&&await qu(this.plugin.app.vault,s),this.plugin.app.vault.getAbstractFileByPath(o))throw new Hr("file_already_exists",`Cannot move task to "${o}" because a file already exists`,{status:409,details:{path:o}});await this.plugin.app.fileManager.renameFile(i,o);let c=cr({...a,id:a.id&&a.id!==a.path?a.id:o,path:o});return this.plugin.cacheManager.clearCacheEntry(a.path),this.plugin.cacheManager.updateTaskInfoInCache(o,c),this.plugin.emitter.trigger(rt,{path:o,originalTask:a,updatedTask:c}),c})}async deleteTask(e,t){let r=await this.requireTask(e);await this.withMutationContext([r.path],t,()=>this.plugin.taskService.deleteTask(r))}async uncompleteTask(e,t,r){var o,l;let a=await this.requireTask(e),i=(l=(o=t==null?void 0:t.status)!=null?o:this.plugin.settings.defaultTaskStatus)!=null?l:"open";if(!this.plugin.statusManager.isCompletedStatus(a.status)&&!(t!=null&&t.status))return cr(a);let s=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.updateProperty(a,"status",i));return cr(s)}async startTimeEntry(e,t){await this.startTime(e,void 0,t)}async stopTimeEntry(e,t){await this.stopTime(e,t)}async setTaskProperty(e,t,r,a){let i=await this.requireTask(e),s=await this.withMutationContext([i.path],a,()=>this.plugin.taskService.updateProperty(i,t,r));return cr(s)}async updateStringList(e,t,r,a,i){var d;let s=await this.requireTask(e),o=(d=s[t])!=null?d:[],l=r.trim();if(!l)throw new Hr("invalid_input",`TaskNotes API ${a} ${t} expects a non-empty value`,{status:400,details:{operation:a,property:t}});let c=a==="add"?Array.from(new Set([...o,l])):o.filter(u=>u!==l);return this.updateTask(s.path,{[t]:c},i)}async addReminder(e,t,r){var s;let a=await this.requireTask(e),i=[...(s=a.reminders)!=null?s:[],{...t}];return this.updateTask(a.path,{reminders:i},r)}async removeReminder(e,t,r){var s;let a=await this.requireTask(e),i=((s=a.reminders)!=null?s:[]).filter(o=>o.id!==t);return this.updateTask(a.path,{reminders:i},r)}async addDependency(e,t,r){var l;let a=await this.requireTask(e),i=(l=a.blockedBy)!=null?l:[],s=i.findIndex(c=>c.uid===t.uid),o=s>=0?i.map((c,d)=>d===s?{...t}:{...c}):[...i.map(c=>({...c})),{...t}];return this.updateTask(a.path,{blockedBy:o},r)}async removeDependency(e,t,r){var s;let a=await this.requireTask(e),i=((s=a.blockedBy)!=null?s:[]).filter(o=>o.uid!==t);return this.updateTask(a.path,{blockedBy:i.length>0?i:void 0},r)}async startTime(e,t,r){var s;let a=await this.requireTask(e),i=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.startTimeTracking(a));if(t!=null&&t.description&&((s=i.timeEntries)!=null&&s.length)){let o=i.timeEntries.map(c=>({...c})),l=-1;for(let c=o.length-1;c>=0;c--)if(!o[c].endTime){l=c;break}l>=0&&(o[l]={...o[l],description:t.description},i=await this.updateTask(i.path,{timeEntries:o},r))}return cr(i)}async stopTime(e,t){let r=await this.requireTask(e),a=await this.withMutationContext([r.path],t,()=>this.plugin.taskService.stopTimeTracking(r));return cr(a)}async appendTimeEntry(e,t,r){var s;let a=await this.requireTask(e),i=[...((s=a.timeEntries)!=null?s:[]).map(o=>({...o})),{...t}];return this.updateTask(a.path,{timeEntries:i},r)}async deleteTimeEntry(e,t,r){let a=await this.requireTask(e),i=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.deleteTimeEntry(a,t));return cr(i)}async getActiveTimeEntries(){var r;let e=await this.plugin.cacheManager.getAllTasks(),t=[];for(let a of e)for(let[i,s]of((r=a.timeEntries)!=null?r:[]).entries())s.endTime||t.push({taskPath:a.path,task:cr(a),entry:{...s},index:i});return t}getSettingsSnapshot(){return JSON.parse(JSON.stringify(this.plugin.settings))}registerExtension(e){var o;if(!e||typeof e!="object")throw new Hr("extension_invalid","TaskNotes API extension registration expects an object",{status:400});if(typeof e.id!="string"||e.id.trim().length===0)throw new Hr("extension_invalid","TaskNotes API extension registration expects a non-empty id",{status:400});if(e.api===null||typeof e.api=="undefined")throw new Hr("extension_invalid","TaskNotes API extension registration expects an api object",{status:400});let t=e.id.trim(),r=this.normalizeExtensionNamespace(e.namespace);if(F8e.has(r))throw new Hr("extension_namespace_reserved",`Cannot register TaskNotes API extension namespace "${r}"`,{status:400,details:{namespace:r}});if(this.extensionRegistry.has(r))throw new Hr("extension_namespace_conflict",`TaskNotes API extension namespace "${r}" is already registered`,{status:409,details:{namespace:r}});let a=Symbol(r),i=Array.from(new Set(((o=e.capabilities)!=null?o:[]).map(l=>this.normalizeExtensionCapability(l)))),s={id:t,namespace:r,api:e.api,displayName:e.displayName,version:e.version,capabilities:i,token:a};return this.extensionRegistry.set(r,s),this.emitLifecycle("extension.registered",{extension:this.extensionInfo(s)}),{id:t,namespace:r,unregister:()=>{let l=this.extensionRegistry.get(r);(l==null?void 0:l.token)===a&&(this.extensionRegistry.delete(r),this.emitLifecycle("extension.unregistered",{extension:this.extensionInfo(l)}))}}}getExtension(e){var t;return(t=this.extensionRegistry.get(this.normalizeExtensionNamespace(e)))==null?void 0:t.api}requireExtension(e){let t=this.normalizeExtensionNamespace(e),r=this.extensionRegistry.get(t);if(!r)throw new Hr("extension_not_registered",`TaskNotes API extension namespace "${t}" is not registered`,{status:404,details:{namespace:t}});return r.api}hasExtension(e){return this.extensionRegistry.has(this.normalizeExtensionNamespace(e))}listExtensions(){return Array.from(this.extensionRegistry.values()).map(e=>this.extensionInfo(e))}extensionInfo(e){return{id:e.id,namespace:e.namespace,displayName:e.displayName,version:e.version,capabilities:[...e.capabilities]}}getExtensionCapabilities(){return Array.from(this.extensionRegistry.values()).flatMap(e=>[...e.capabilities])}normalizeExtensionNamespace(e){if(typeof e!="string"||e.trim().length===0)throw new Hr("extension_invalid","TaskNotes API extension namespace must be a non-empty string",{status:400});let t=e.trim().toLowerCase();if(!/^[a-z][a-z0-9._-]*$/.test(t))throw new Hr("extension_invalid",`TaskNotes API extension namespace "${e}" must use letters, numbers, dots, underscores, or dashes`,{status:400,details:{namespace:e}});return t}normalizeExtensionCapability(e){if(typeof e!="string"||e.trim().length===0)throw new Hr("extension_invalid","TaskNotes API extension capabilities must be non-empty strings",{status:400});let t=e.trim().toLowerCase();if(!/^[a-z][a-z0-9._:-]*$/.test(t))throw new Hr("extension_invalid",`TaskNotes API extension capability "${e}" must use letters, numbers, dots, underscores, dashes, or colons`,{status:400,details:{capability:e}});return t}async startPomodoro(e,t){let r=e!=null&&e.taskPath?await this.requireTask(e.taskPath):void 0;return await this.withMutationContext(r?[r.path]:[],t,()=>this.plugin.pomodoroService.startPomodoro(r,e==null?void 0:e.duration)),this.copyPomodoroState(this.plugin.pomodoroService.getState())}async stopPomodoro(e){return await this.withMutationContext([],e,()=>this.plugin.pomodoroService.stopPomodoro()),this.copyPomodoroState(this.plugin.pomodoroService.getState())}async pausePomodoro(e){return await this.withMutationContext([],e,()=>this.plugin.pomodoroService.pausePomodoro()),this.copyPomodoroState(this.plugin.pomodoroService.getState())}async resumePomodoro(e){return await this.withMutationContext([],e,()=>this.plugin.pomodoroService.resumePomodoro()),this.copyPomodoroState(this.plugin.pomodoroService.getState())}async assignPomodoroTask(e,t){let r=e?await this.requireTask(e):void 0;return await this.withMutationContext(r?[r.path]:[],t,()=>this.plugin.pomodoroService.assignTaskToCurrentSession(r)),this.copyPomodoroState(this.plugin.pomodoroService.getState())}async getPomodoroSessions(e){let t=await this.plugin.pomodoroService.getSessionHistory();return e!=null&&e.date&&(t=t.filter(r=>new Date(r.startTime).toISOString().split("T")[0]===e.date)),e!=null&&e.limit&&e.limit>0&&(t=t.slice(-e.limit)),t.map(r=>({...r}))}getPomodoroStats(e){return e?this.plugin.pomodoroService.getStatsForDate(new Date(e)):this.plugin.pomodoroService.getTodayStats()}copyPomodoroState(e){return JSON.parse(JSON.stringify(e))}async toggleRecurringComplete(e,t,r){let a=await this.requireTask(e),i=t?new Date(t):void 0,s=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.toggleRecurringTaskCompleteWithOccurrenceNotes(a,i));return cr(s)}async materializeOccurrence(e,t,r){let a=await this.requireTask(e),i=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.materializeOccurrence(a,t));return cr(i)}async toggleRecurringSkipped(e,t,r){let a=await this.requireTask(e),i=t?new Date(t):void 0,s=await this.withMutationContext([a.path],r,()=>this.plugin.taskService.toggleRecurringTaskSkipped(a,i));return cr(s)}on(e,t){let r=tKe(e);return this.plugin.emitter.on(r,a=>{let i=this.normalizeRawEvent(r,a);for(let s of i)s.event===e&&t(s)})}onLifecycle(e,t){let r=Lc[e],a=this.plugin.emitter.on(r,i=>{t(this.normalizeLifecycleEvent(e,r,i))});return e==="ready"&&this.plugin.onReady().then(()=>{t(this.normalizeLifecycleEvent(e,r,void 0))}),a}emitLifecycle(e,t={}){this.plugin.emitter.trigger(Lc[e],{...t,timestamp:new Date().toISOString()})}off(e){this.plugin.emitter.offref(e)}async resolveTaskReference(e,t){let r=await this.resolveTaskReferencePath(e,t);return r?await this.plugin.cacheManager.getTaskInfo(r):null}async taskReferenceMatches(e,t,r){return await this.resolveTaskReferencePath(e,t)===(0,vi.normalizePath)(r)}async resolveTaskReferencePath(e,t){var s;let r=$8e(e);if(!r)return null;let a=this.plugin.app.metadataCache,i=(s=a==null?void 0:a.getFirstLinkpathDest)==null?void 0:s.call(a,r,t);if(i instanceof vi.TFile)return(0,vi.normalizePath)(i.path);for(let o of J8e(r)){let l=await this.plugin.cacheManager.getTaskInfo(o);if(l)return l.path}return(0,vi.normalizePath)(r)}async requireTask(e){let t=this.normalizeTaskPath(e),r=await this.plugin.cacheManager.getTaskInfo(t);if(!r)throw new Hr("task_not_found",`Task not found: ${t}`,{status:404,details:{path:t}});return r}requireTaskFile(e){let t=this.plugin.app.vault.getAbstractFileByPath(e);if(!(t instanceof vi.TFile))throw new Hr("task_file_not_found",`Cannot find task file: ${e}`,{status:404,details:{path:e}});return t}normalizeTaskPath(e){if(typeof e!="string"||e.trim().length===0)throw new Hr("invalid_task_path","TaskNotes API expects a non-empty task path",{status:400});return(0,vi.normalizePath)(e)}async withMutationContext(e,t,r){var i;if(!t)return r();let a=e.map(s=>(0,vi.normalizePath)(s));for(let s of a){let o=(i=this.mutationContextByPath.get(s))!=null?i:[];o.push(t),this.mutationContextByPath.set(s,o)}this.mutationContextStack.push(t);try{return await r()}finally{for(let s of a){let o=this.mutationContextByPath.get(s);o==null||o.pop(),o!=null&&o.length||this.mutationContextByPath.delete(s)}this.mutationContextStack.pop()}}normalizeUpdatedEvent(e){var c,d,u,p,m,f,h,g,v,k,T,b,w,S,C;let t=e.originalTask?cr(e.originalTask):void 0,r=e.updatedTask?cr(e.updatedTask):void 0,a=(u=(d=(c=r==null?void 0:r.path)!=null?c:t==null?void 0:t.path)!=null?d:e.path)!=null?u:"",i=eKe(t,r),s=this.getMutationContext(e),o=this.buildEventPayloadBase({taskPath:a,before:t,after:r,task:r,changes:i,context:s,rawEvent:rt}),l=[];if(!t&&r&&l.push({...o,event:"task.created"}),l.push({...o,event:"task.updated"}),t&&r&&t.path!==r.path&&l.push({...o,event:"task.moved"}),t&&r&&t.status!==r.status){l.push({...o,event:"task.status.changed"});let x=this.plugin.statusManager.isCompletedStatus(t.status),E=this.plugin.statusManager.isCompletedStatus(r.status);!x&&E?l.push({...o,event:"task.completed"}):x&&!E&&l.push({...o,event:"task.uncompleted"})}return t&&r&&t.archived!==r.archived&&l.push({...o,event:r.archived?"task.archived":"task.unarchived"}),t&&r&&t.scheduled!==r.scheduled&&l.push({...o,event:"task.scheduled.changed"}),t&&r&&t.due!==r.due&&l.push({...o,event:"task.due.changed"}),t&&r&&t.priority!==r.priority&&l.push({...o,event:"task.priority.changed"}),t&&r&&!tg((p=t.tags)!=null?p:[],(m=r.tags)!=null?m:[])&&l.push({...o,event:"task.tags.changed"}),t&&r&&!tg((f=t.contexts)!=null?f:[],(h=r.contexts)!=null?h:[])&&l.push({...o,event:"task.contexts.changed"}),t&&r&&!tg((g=t.projects)!=null?g:[],(v=r.projects)!=null?v:[])&&l.push({...o,event:"task.projects.changed"}),t&&r&&!tg((k=t.attachments)!=null?k:[],(T=r.attachments)!=null?T:[])&&l.push({...o,event:"task.attachments.changed"}),t&&r&&!tg((b=t.reminders)!=null?b:[],(w=r.reminders)!=null?w:[])&&l.push({...o,event:"task.reminders.changed"}),t&&r&&!tg((S=t.blockedBy)!=null?S:[],(C=r.blockedBy)!=null?C:[])&&l.push({...o,event:"task.dependencies.changed"}),t&&r&&t.recurrence!==r.recurrence&&l.push({...o,event:"task.recurrence.changed"}),t&&r&&Kbe(t.complete_instances,r.complete_instances)&&l.push({...o,event:"recurring.instance.completed"}),t&&r&&Kbe(t.skipped_instances,r.skipped_instances)&&l.push({...o,event:"recurring.instance.skipped"}),t&&r&&T_(t)!==T_(r)&&l.push({...o,event:T_(r)>T_(t)?"time.started":"time.stopped"}),l}normalizeDeletedEvent(e){var i,s;let t=e.deletedTask?cr(e.deletedTask):void 0,r=(s=(i=t==null?void 0:t.path)!=null?i:e.path)!=null?s:"",a=this.getMutationContext(e);return[this.buildEventPayloadBase({event:"task.deleted",taskPath:r,deletedTask:t,task:t,changes:{},context:a,rawEvent:Di})]}normalizeLifecycleEvent(e,t,r){var s;let a=hu(r)?r:{},i=hu(a.extension)?a.extension:void 0;return{event:e,timestamp:typeof a.timestamp=="string"?a.timestamp:new Date().toISOString(),data:(s=a.data)!=null?s:r,settings:e==="settings.changed"?this.getSettingsSnapshot():void 0,extension:i,filePath:typeof a.filePath=="string"?a.filePath:void 0,force:typeof a.force=="boolean"?a.force:void 0,rawEvent:t}}buildEventPayloadBase(e){var t,r,a,i;return{event:(t=e.event)!=null?t:"task.updated",timestamp:new Date().toISOString(),taskPath:e.taskPath,task:e.task,before:e.before,after:e.after,deletedTask:e.deletedTask,changes:e.changes,data:e.data,context:e.context,source:(r=e.context)==null?void 0:r.source,correlationId:(a=e.context)==null?void 0:a.correlationId,reason:(i=e.context)==null?void 0:i.reason,rawEvent:e.rawEvent}}getMutationContext(e){var r,a,i;let t=[e.path,"originalTask"in e?(r=e.originalTask)==null?void 0:r.path:void 0,"updatedTask"in e?(a=e.updatedTask)==null?void 0:a.path:void 0,"deletedTask"in e?(i=e.deletedTask)==null?void 0:i.path:void 0].filter(s=>!!s).map(s=>(0,vi.normalizePath)(s));for(let s of t){let o=this.mutationContextByPath.get(s),l=o==null?void 0:o[o.length-1];if(l)return l}return this.mutationContextStack[this.mutationContextStack.length-1]}normalizeRawEvent(e,t){return e===Di?this.normalizeDeletedEvent(t):e===cd?this.normalizePomodoroEvent("pomodoro.started",e,t):e===dd?this.normalizePomodoroEvent("pomodoro.completed",e,t):e===ud?this.normalizePomodoroEvent("pomodoro.interrupted",e,t):this.normalizeUpdatedEvent(t)}normalizePomodoroEvent(e,t,r){var l,c;let a=r,i=a.task?cr(a.task):void 0,s=(c=i==null?void 0:i.path)!=null?c:(l=a.session)==null?void 0:l.taskPath,o=this.mutationContextStack[this.mutationContextStack.length-1];return[this.buildEventPayloadBase({event:e,taskPath:s,task:i,changes:{},data:r,context:o,rawEvent:t})]}}});function x_(n,e=ewe.Platform.isMobile){return e&&n.disableCalendarOnMobile}var ewe,Sq=y(()=>{ewe=require("obsidian")});var rwe={};Xe(rwe,{TaskSelectionService:()=>Cq});var twe,Cq,nwe=y(()=>{q();twe=M({tag:"Services/TaskSelectionService"}),Cq=class{constructor(e){this.selectedTaskPaths=new Set;this.lastSelectedPath=null;this.primarySelectedPath=null;this.selectionModeActive=!1;this.selectionModeListeners=[];this.selectionChangeListeners=[];this.plugin=e}isSelectionModeActive(){return this.selectionModeActive}enterSelectionMode(){this.selectionModeActive||(this.selectionModeActive=!0,this.notifySelectionModeChange(!0))}exitSelectionMode(e=!1){this.selectionModeActive&&(this.selectionModeActive=!1,e&&this.clearSelection(),this.notifySelectionModeChange(!1))}toggleSelectionMode(){this.selectionModeActive?this.exitSelectionMode():this.enterSelectionMode()}isSelected(e){return this.selectedTaskPaths.has(e)}toggleSelection(e){this.selectedTaskPaths.has(e)?(this.selectedTaskPaths.delete(e),this.primarySelectedPath===e&&(this.primarySelectedPath=this.selectedTaskPaths.size>0?Array.from(this.selectedTaskPaths)[0]:null)):(this.selectedTaskPaths.size===0&&(this.primarySelectedPath=e),this.selectedTaskPaths.add(e)),this.lastSelectedPath=e,this.selectedTaskPaths.size>0&&!this.selectionModeActive&&this.enterSelectionMode(),this.selectedTaskPaths.size===0&&this.selectionModeActive&&this.exitSelectionMode(),this.notifySelectionChange()}selectTask(e){this.selectedTaskPaths.clear(),this.selectedTaskPaths.add(e),this.lastSelectedPath=e,this.primarySelectedPath=e,this.notifySelectionChange()}addToSelection(e){this.selectedTaskPaths.size===0&&(this.primarySelectedPath=e),this.selectedTaskPaths.add(e),this.lastSelectedPath=e,this.notifySelectionChange()}removeFromSelection(e){this.selectedTaskPaths.delete(e),this.notifySelectionChange()}selectRange(e,t){if(!this.lastSelectedPath){this.selectTask(e);return}let r=t.indexOf(this.lastSelectedPath),a=t.indexOf(e);if(r===-1||a===-1){this.toggleSelection(e);return}let i=Math.min(r,a),s=Math.max(r,a);for(let o=i;o<=s;o++)this.selectedTaskPaths.add(t[o]);this.lastSelectedPath=e,this.notifySelectionChange()}selectAdjacentRange(e,t){var s;if(t.length===0)return;let r=this.lastSelectedPath;if((!r||!t.includes(r))&&(r=(s=t.find(o=>this.selectedTaskPaths.has(o)))!=null?s:null),!r){this.selectTask(e>0?t[0]:t[t.length-1]);return}let a=t.indexOf(r);if(a===-1)return;let i=Math.max(0,Math.min(t.length-1,a+e));i!==a&&(this.lastSelectedPath=r,this.selectRange(t[i],t))}selectAll(e){this.selectedTaskPaths.size===0&&e.length>0&&(this.primarySelectedPath=e[0]);for(let t of e)this.selectedTaskPaths.add(t);e.length>0&&(this.lastSelectedPath=e[e.length-1]),this.notifySelectionChange()}clearSelection(){this.selectedTaskPaths.clear(),this.lastSelectedPath=null,this.primarySelectedPath=null,this.notifySelectionChange()}getSelectedPaths(){return Array.from(this.selectedTaskPaths)}getPrimarySelectedPath(){return this.primarySelectedPath}getSelectionCount(){return this.selectedTaskPaths.size}async getSelectedTasks(){let e=[];for(let t of this.selectedTaskPaths){let r=await this.plugin.cacheManager.getTaskInfo(t);r&&e.push(r)}return e}onSelectionModeChange(e){return this.selectionModeListeners.push(e),()=>{let t=this.selectionModeListeners.indexOf(e);t!==-1&&this.selectionModeListeners.splice(t,1)}}onSelectionChange(e){return this.selectionChangeListeners.push(e),()=>{let t=this.selectionChangeListeners.indexOf(e);t!==-1&&this.selectionChangeListeners.splice(t,1)}}notifySelectionModeChange(e){for(let t of this.selectionModeListeners)try{t(e)}catch(r){twe.error("[TaskSelectionService] Error in selection mode listener:",{category:"persistence",operation:"selection-mode-listener",error:r})}}notifySelectionChange(){let e=this.getSelectedPaths();for(let t of this.selectionChangeListeners)try{t(e)}catch(r){twe.error("[TaskSelectionService] Error in selection change listener:",{category:"persistence",operation:"selection-change-listener",error:r})}}destroy(){this.selectedTaskPaths.clear(),this.selectionModeListeners=[],this.selectionChangeListeners=[]}}});var awe={};Xe(awe,{BasesFilterConverter:()=>Eq});function rKe(n){return n instanceof Error?n.message:String(n)}function nKe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}var xq,Eq,iwe=y(()=>{dr();q();xq=M({tag:"Services/BasesFilterConverter"});Eq=class{constructor(e){this.plugin=e,this.statusManager=e.statusManager,this.priorityManager=e.priorityManager}convertToBasesFilter(e){try{let t=this.convertNodeToObject(e);return t||null}catch(t){throw xq.error("Error converting TaskNotes filter to Bases:",{category:"validation",operation:"converting-tasknotes-filter-bases",error:t}),new Error(`Failed to convert filter: ${rKe(t)}`)}}convertNodeToObject(e){return e.type=="group"?this.convertGroupToObject(e):e.type=="condition"?this.convertConditionToString(e):null}convertGroupToObject(e){let t=e.children.filter(i=>i.type=="condition"?this.isConditionComplete(i):!0);if(t.length==0)return null;let r=t.map(i=>this.convertNodeToObject(i)).filter(i=>i!==null);return r.length==0?null:r.length===1?r[0]:{[e.conjunction=="and"?"and":"or"]:r}}convertConditionToString(e){let{property:t,operator:r,value:a}=e;if(t=="status.isCompleted")return this.convertCompletedStatusCondition(r,a);if(t=="archived")return this.convertArchivedCondition(r);if(t=="dependencies.isBlocked")return this.convertIsBlockedCondition(r);if(t.startsWith("user:"))return this.convertUserFieldCondition(t,r,a);let i=this.getBasesPropertyPath(t);return this.convertOperator(i,r,a,t)}isConditionComplete(e){let{property:t,operator:r,value:a}=e;return!t||!r?!1:["is-empty","is-not-empty","is-checked","is-not-checked"].includes(r)?!0:a!=null&&a!==""}convertCompletedStatusCondition(e,t){let r=this.statusManager.getCompletedStatuses(),a=this.plugin.fieldMapper,i=a.toUserField("status"),s=r.map(u=>`note.${i} == "${this.escapeString(u)}"`).join(" || "),o=r.length>1?`(${s})`:s,l=a.toUserField("completeInstances"),c=`note.${l} && note.${l}.map(date(value).format("YYYY-MM-DD")).contains(today().format("YYYY-MM-DD"))`,d=`(${o}) || (${c})`;return e=="is-not-checked"||e=="is-not"?`!(${d})`:d}convertArchivedCondition(e){let r=this.plugin.fieldMapper.toUserField("archiveTag"),a=`file.tags.contains("${this.escapeString(r)}")`;return e=="is-not-checked"||e=="is-not"?`!${a}`:a}convertIsBlockedCondition(e){let r=this.plugin.fieldMapper.toUserField("blockedBy"),a=`(note.${r} && list(note.${r}).length > 0)`;return e=="is-not-checked"||e=="is-not"?`!(${a})`:a}convertUserFieldCondition(e,t,r){let a=e.slice(5),s=(this.plugin.settings.userFields||[]).find(l=>(l.id||l.key)===a||l.key===a);if(!s)return xq.warn(`User field not found: ${a}`,{category:"validation",operation:"user-field-not-found"}),"true";let o=`note.${s.key}`;return this.convertOperator(o,t,r,e,s.type)}getBasesPropertyPath(e){let t=this.plugin.fieldMapper,r;switch(e){case"title":return"file.name";case"status":r=t.toUserField("status");break;case"priority":r=t.toUserField("priority");break;case"due":r=t.toUserField("due");break;case"scheduled":r=t.toUserField("scheduled");break;case"contexts":r=t.toUserField("contexts");break;case"projects":r=t.toUserField("projects");break;case"tags":return"file.tags";case"path":return"file.path";case"dateCreated":return"file.ctime";case"dateModified":return"file.mtime";case"timeEstimate":r=t.toUserField("timeEstimate");break;case"completedDate":r=t.toUserField("completedDate");break;case"recurrence":r=t.toUserField("recurrence");break;case"blockedBy":r=t.toUserField("blockedBy");break;case"blocking":r="blocking";break;default:r=e}return`note.${r}`}convertOperator(e,t,r,a,i){switch(t){case"is":return this.convertIsOperator(e,r,i);case"is-not":return`!(${this.convertIsOperator(e,r,i)})`;case"contains":return this.convertContainsOperator(e,r,a);case"does-not-contain":return`!(${this.convertContainsOperator(e,r,a)})`;case"is-before":return`${e} < "${this.escapeString(String(r))}"`;case"is-after":return`${e} > "${this.escapeString(String(r))}"`;case"is-on-or-before":return`${e} <= "${this.escapeString(String(r))}"`;case"is-on-or-after":return`${e} >= "${this.escapeString(String(r))}"`;case"is-empty":return`${e}.isEmpty()`;case"is-not-empty":return`!${e}.isEmpty()`;case"is-checked":return`${e} == true`;case"is-not-checked":return`${e} != true`;case"is-greater-than":return`${e} > ${this.formatNumericValue(r)}`;case"is-less-than":return`${e} < ${this.formatNumericValue(r)}`;case"is-greater-than-or-equal":return`${e} >= ${this.formatNumericValue(r)}`;case"is-less-than-or-equal":return`${e} <= ${this.formatNumericValue(r)}`;default:return xq.warn("Unknown operator:",{category:"validation",operation:"unknown-operator",details:{value:t}}),"true"}}convertIsOperator(e,t,r){if(Array.isArray(t)){if(t.length==0)return`(!${e} || ${e}.length == 0)`;let a=t.map(i=>`${e}.contains("${this.escapeString(Y(i))}")`);return a.length>1?`(${a.join(" || ")})`:a[0]}if(r=="list")return`${e}.contains("${this.escapeString(Y(t))}")`;if(typeof t=="boolean"||r=="boolean"){let a=typeof t=="boolean"?t?"true":"false":Y(t);return`${e} == ${a}`}return typeof t=="number"||r=="number"?`${e} == ${this.formatNumericValue(t)}`:t==null||t==""?`(!${e} || ${e} == "" || ${e} == null)`:`${e} == "${this.escapeString(Y(t))}"`}convertContainsOperator(e,t,r){if(["tags","contexts","projects"].includes(r)){if(Array.isArray(t)){let i=t.map(s=>`${e}.contains("${this.escapeString(String(s))}")`);return i.length>1?`(${i.join(" || ")})`:i[0]}if(r=="projects"){let i=String(t);return i.startsWith("[[")&&i.endsWith("]]")?`${e}.contains("${this.escapeString(i)}")`:`(${e}.contains("[[${this.escapeString(i)}]]") || ${e}.contains("${this.escapeString(i)}"))`}return`${e}.contains("${this.escapeString(Y(t))}")`}return`${e}.lower().contains("${this.escapeString(Y(t).toLowerCase())}")`}formatNumericValue(e){if(typeof e=="number")return String(e);let t=parseFloat(Y(e));return isNaN(t)?"0":String(t)}escapeString(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}filterObjectToYAML(e,t=0){let r=" ".repeat(t);if(typeof e=="string")return`'${e.replace(/'/g,"\\'")}'`;if(Array.isArray(e))return e.map(a=>`
${r}- ${this.filterObjectToYAML(a,t+1)}`).join("");if(nKe(e)){let a=Object.keys(e)[0],i=e[a];return Array.isArray(i)?`
${r}${a}:${i.map(s=>`
${r} - ${this.filterObjectToYAML(s,t+2)}`).join("")}`:`
${r}${a}: ${this.filterObjectToYAML(i,t+1)}`}return String(e)}convertSavedViewToBasesFile(e,t="tasknotesTaskList"){let r=this.convertToBasesFilter(e.query),a=`# ${e.name}
`;if(r&&(a+=`filters:${this.filterObjectToYAML(r,1)}
`),a+=`views:
`,a+=` - type: ${t}
`,a+=` name: "${e.name}"
`,e.query.sortKey){let i=this.mapSortKeyToBasesColumn(e.query.sortKey),s=(e.query.sortDirection||"asc").toUpperCase();a+=` sort:
`,a+=` - column: ${i}
`,a+=` direction: ${s}
`}if(e.query.groupKey&&e.query.groupKey!=="none"){let i=this.mapGroupKeyToBasesColumn(e.query.groupKey),s=(e.query.sortDirection||"asc").toUpperCase();a+=` groupBy:
`,a+=` property: ${i}
`,a+=` direction: ${s}
`}return e.viewOptions&&Object.keys(e.viewOptions).length>0&&(a+=` options:
`,Object.entries(e.viewOptions).forEach(([i,s])=>{let o;typeof s=="boolean"||typeof s=="number"?o=String(s):typeof s=="string"?o=`"${this.escapeString(s)}"`:o=JSON.stringify(s),a+=` ${i}: ${o}
`})),a}mapSortKeyToBasesColumn(e){let t=this.plugin.fieldMapper;switch(e){case"due":return t.toUserField("due");case"scheduled":return t.toUserField("scheduled");case"priority":return t.toUserField("priority");case"status":return t.toUserField("status");case"title":return t.toUserField("title");case"dateCreated":return"file.ctime";case"dateModified":return"file.mtime";case"completedDate":return t.toUserField("completedDate");case"tags":return"file.tags";case"path":return"file.path";case"timeEstimate":return t.toUserField("timeEstimate");case"recurrence":return t.toUserField("recurrence");default:if(e.startsWith("user:")){let r=e.slice(5),i=(this.plugin.settings.userFields||[]).find(s=>(s.id||s.key)===r||s.key===r);return(i==null?void 0:i.key)||e}return e}}mapGroupKeyToBasesColumn(e){return this.mapSortKeyToBasesColumn(e)}convertAllSavedViewsToBasesFile(e){if(!e||e.length==0)return"";let t=`# All Saved Views
`;t+=`# Converted from TaskNotes saved views
`;let r=[];for(let a of e){let i=this.detectViewType(a),s=this.convertToBasesFilter(a.query),o=` - type: ${i}
`;if(o+=` name: "${a.name}"
`,s&&(o+=` filters:${this.filterObjectToYAML(s,3)}
`),a.query.sortKey){let l=this.mapSortKeyToBasesColumn(a.query.sortKey),c=(a.query.sortDirection||"asc").toUpperCase();o+=` sort:
`,o+=` - column: ${l}
`,o+=` direction: ${c}
`}if(a.query.groupKey&&a.query.groupKey!=="none"){let l=this.mapGroupKeyToBasesColumn(a.query.groupKey),c=(a.query.sortDirection||"asc").toUpperCase();o+=` groupBy:
`,o+=` property: ${l}
`,o+=` direction: ${c}
`}a.viewOptions&&Object.keys(a.viewOptions).length>0&&(o+=` options:
`,Object.entries(a.viewOptions).forEach(([l,c])=>{let d;typeof c=="boolean"||typeof c=="number"?d=String(c):typeof c=="string"?d=`"${this.escapeString(c)}"`:d=JSON.stringify(c),o+=` ${l}: ${d}
`})),r.push(o)}return t+=`views:
`,t+=r.join(`
`),t}detectViewType(e){let t=e.viewOptions||{};return["showScheduled","showDue","showRecurring","showTimeEntries","showTimeblocks","showPropertyBasedEvents","calendarView","customDayCount","firstDay","slotMinTime","slotMaxTime","slotDuration","snapDuration"].some(o=>o in t)?"tasknotesCalendar":["columnWidth","hideEmptyColumns","pinnedColumns","cardLayout"].some(o=>o in t)?"tasknotesKanban":"tasknotesTaskList"}}});var owe={};Xe(owe,{MdbaseSpecService:()=>Pq});function gu(n){return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function aKe(n){return gu(n)}function iKe(n){let e=n.toLowerCase();return e==="true"||e==="false"?e:gu(n)}var swe,Dq,PE,Pq,lwe=y(()=>{swe=require("obsidian");cx();q();Dq=M({tag:"Services/MdbaseSpecService"}),PE="_types",Pq=class{constructor(e){this.plugin=e}async onSettingsChanged(){this.plugin.settings.enableMdbaseSpec&&await this.generate()}async generate(){try{let e=this.plugin.app.vault,t=await this.getTypesFolder(),r=`${t}/task.md`;await this.ensureFolderPath(t);let a=this.buildTaskTypeDef();if(await this.writeFile(r,a),!await e.adapter.exists("mdbase.yaml")){let s=this.buildMdbaseYaml(t);await this.writeFile("mdbase.yaml",s)}Dq.debug(`[TaskNotes][mdbase-spec] Generated mdbase.yaml and ${r}`,{category:"configuration",operation:"generated-mdbase-yaml-and"})}catch(e){Dq.error("[TaskNotes][mdbase-spec] Failed to generate files:",{category:"configuration",operation:"generate-files",error:e})}}async getTypesFolder(){var r,a;let e=this.plugin.app.vault;if(!await e.adapter.exists("mdbase.yaml"))return PE;try{let i=await e.adapter.read("mdbase.yaml"),s=Yv.parse(i);return(a=this.normalizeTypesFolder((r=s==null?void 0:s.settings)==null?void 0:r.types_folder))!=null?a:PE}catch(i){return Dq.warn("[TaskNotes][mdbase-spec] Failed to read mdbase.yaml:",{category:"configuration",operation:"read-mdbase-yaml",error:i}),PE}}normalizeTypesFolder(e){if(typeof e!="string")return null;let t=e.trim();if(!t||t.startsWith("/")||t==="."||t==="..")return null;let r=(0,swe.normalizePath)(t);return!r||r==="."||r===".."||r.startsWith("../")||r.includes("/../")?null:r}async ensureFolderPath(e){let t=this.plugin.app.vault,r=e.split("/").filter(Boolean),a="";for(let i of r)a=a?`${a}/${i}`:i,await t.adapter.exists(a)||await t.createFolder(a)}async writeFile(e,t){let r=this.plugin.app.vault;await r.adapter.exists(e)?await r.adapter.write(e,t):await r.create(e,t)}buildMdbaseYaml(e=PE){var r;let t=(r=this.normalizeTypesFolder(e))!=null?r:PE;return['spec_version: "0.2.0"','name: "TaskNotes"','description: "Task collection managed by TaskNotes for Obsidian"',"settings:",` types_folder: ${gu(t)}`," default_strict: false"," exclude:",` - ${gu(t)}`,""].join(`
`)}buildTaskTypeDef(){var i,s;let e=this.plugin.settings,t=this.plugin.fieldMapper,r=[];if(r.push("---"),r.push("name: task"),r.push("description: A task managed by the TaskNotes plugin for Obsidian."),r.push(`display_name_key: ${t.toUserField("title")}`),r.push("strict: false"),r.push(`path_pattern: ${gu(this.buildPathPattern())}`),r.push(""),r.push("match:"),this.addMatchRules(r),r.push(""),r.push("fields:"),this.addRoleField(r,"title",{type:"string",required:!0,description:"Short summary of the task."}),this.addRoleField(r,"status",{type:"enum",required:!0,values:e.customStatuses.map(o=>o.value),default:e.defaultTaskStatus,tn_completed_values:e.customStatuses.filter(o=>o.isCompleted).map(o=>o.value)}),this.addRoleField(r,"priority",{type:"enum",values:e.customPriorities.map(o=>o.value),default:e.defaultTaskPriority}),this.addRoleField(r,"due",{type:"date"}),this.addRoleField(r,"scheduled",{type:"date"}),this.addRoleField(r,"contexts",{type:"list",items:{type:"string"}}),this.addRoleField(r,"projects",{type:"list",items:{type:"link"},description:"Wikilinks to related project notes."}),this.addRoleField(r,"timeEstimate",{type:"integer",min:0,description:"Estimated time in minutes."}),this.addRoleField(r,"completedDate",{type:"date"}),this.addRoleField(r,"dateCreated",{type:"datetime",required:!0,generated:"now"}),this.addRoleField(r,"dateModified",{type:"datetime",generated:"now_on_write"}),this.addRoleField(r,"recurrence",{type:"string"}),this.addRoleField(r,"recurrenceAnchor",{type:"enum",values:["scheduled","completion"],default:"scheduled"}),this.addRoleField(r,"occurrenceMaterialization",{type:"enum",values:["manual","on_completion","rolling"],default:"manual",description:"How occurrence task notes are materialized for a recurring parent task."}),this.addRoleField(r,"occurrenceNextTrigger",{type:"enum",values:["completion","completion_or_skip"],default:"completion",description:"Which occurrence state changes should materialize the next occurrence."}),this.addRoleField(r,"occurrenceTemplate",{type:"link",description:"Optional template note used when materializing occurrences."}),this.addRoleField(r,"occurrencePastHorizon",{type:"string",description:"ISO 8601 duration controlling rolling materialization before today."}),this.addRoleField(r,"occurrenceFutureHorizon",{type:"string",description:"ISO 8601 duration controlling rolling materialization after today."}),this.addRoleField(r,"recurrenceParent",{type:"link",description:"Parent recurring task for a materialized occurrence note."}),this.addRoleField(r,"occurrenceDate",{type:"date",description:"Target recurrence date for a materialized occurrence note."}),this.addField(r,"tags",{type:"list",items:{type:"string"},tn_role:"tags"}),this.addRoleField(r,"timeEntries",{type:"list",items:{type:"object",fields:{startTime:{type:"datetime"},endTime:{type:"datetime"},description:{type:"string"},duration:{type:"integer"}}}}),this.addRoleField(r,"reminders",{type:"list",items:{type:"object",fields:{id:{type:"string",required:!0},type:{type:"enum",values:["absolute","relative"]},description:{type:"string"},relatedTo:{type:"enum",values:["due","scheduled"],description:"Field the reminder is relative to (e.g. 'due')."},offset:{type:"string",description:"ISO 8601 duration offset (e.g. '-PT1H')."},absoluteTime:{type:"datetime"}}},description:"Reminder objects with id, type, offset, etc."}),this.addRoleField(r,"blockedBy",{type:"list",items:{type:"object",fields:{uid:{type:"link",required:!0},reltype:{type:"string"},gap:{type:"string"}}}}),this.addRoleField(r,"completeInstances",{type:"list",items:{type:"date"}}),this.addRoleField(r,"skippedInstances",{type:"list",items:{type:"date"}}),this.addRoleField(r,"icsEventId",{type:"list",items:{type:"string"}}),this.addRoleField(r,"googleCalendarEventId",{type:"string"}),this.addRoleField(r,"googleCalendarExceptionEventId",{type:"string"}),this.addRoleField(r,"googleCalendarExceptionOriginalScheduled",{type:"date"}),this.addRoleField(r,"googleCalendarMovedOriginalDates",{type:"list",items:{type:"date"}}),e.userFields&&e.userFields.length>0)for(let o of e.userFields)this.addField(r,o.key,this.mapUserFieldType(o));r.push(""),r.push("x-tasknotes:"),r.push(" nlp:");let a=(s=(i=e.nlpTriggers)==null?void 0:i.triggers)!=null?s:[];if(a.length===0)r.push(" triggers: []");else{r.push(" triggers:");for(let o of a)r.push(` - property_id: ${gu(o.propertyId)}`),r.push(` trigger: ${gu(o.trigger)}`),r.push(` enabled: ${o.enabled===!0}`)}return r.push("---"),r.push(""),r.push("# Task"),r.push(""),r.push("This type definition describes the data schema for tasks managed by"),r.push("[TaskNotes](https://github.com/callumalpass/tasknotes), an Obsidian plugin"),r.push("for note-based task management."),r.push(""),r.push("It conforms to [mdbase-spec](https://github.com/callumalpass/mdbase-spec) v0.2.0,"),r.push("a specification for typed markdown collections."),r.push(""),r.push("TaskNotes also adds a non-standard `tn_role` field annotation on schema"),r.push("fields. This maps each field to its TaskNotes semantic role so custom"),r.push("frontmatter field names can still be interpreted consistently."),r.push("The status field also includes `tn_completed_values`, listing"),r.push("which status values count as completed."),r.push(""),r.push("This file is automatically generated from TaskNotes settings and should not be"),r.push("edited manually. Changes to TaskNotes settings (statuses, priorities, field"),r.push("mappings, user fields) will cause this file to be regenerated."),r.push(""),r.join(`
`)}addField(e,t,r,a=2){let i=" ".repeat(a);e.push(`${i}${t}:`),this.writeFieldProps(e,r,a+2)}addRoleField(e,t,r,a=2){let i=this.plugin.fieldMapper.toUserField(t);this.addField(e,i,{...r,tn_role:t},a)}writeFieldProps(e,t,r){let a=" ".repeat(r);if(e.push(`${a}type: ${t.type}`),t.required&&e.push(`${a}required: true`),t.generated&&e.push(`${a}generated: ${t.generated}`),t.values&&e.push(`${a}values: [${t.values.join(", ")}]`),t.tn_completed_values&&t.tn_completed_values.length>0&&e.push(`${a}tn_completed_values: [${t.tn_completed_values.join(", ")}]`),t.default!==void 0&&e.push(`${a}default: ${t.default}`),t.min!==void 0&&e.push(`${a}min: ${t.min}`),t.description&&e.push(`${a}description: ${gu(t.description)}`),t.tn_role&&e.push(`${a}tn_role: ${t.tn_role}`),t.items)if(t.items.type==="object"&&t.items.fields){e.push(`${a}items:`),e.push(`${a} type: object`),e.push(`${a} fields:`);for(let[i,s]of Object.entries(t.items.fields))this.addField(e,i,s,r+4)}else e.push(`${a}items:`),e.push(`${a} type: ${t.items.type}`)}mapUserFieldType(e){switch(e.type){case"text":return{type:"string"};case"number":return{type:"number"};case"date":return{type:"date"};case"boolean":return{type:"boolean"};case"list":return{type:"list",items:{type:"string"}};default:return{type:"string"}}}addMatchRules(e){var r,a;let t=this.plugin.settings;if(t.taskIdentificationMethod==="property"){let i=(r=t.taskPropertyName)==null?void 0:r.trim(),s=(a=t.taskPropertyValue)==null?void 0:a.trim();if(!i){this.addTagMatchRule(e);return}e.push(" where:"),e.push(` ${aKe(i)}:`),s?e.push(` eq: ${iKe(s)}`):e.push(" exists: true");return}this.addTagMatchRule(e)}addTagMatchRule(e){var r;let t=((r=this.plugin.settings.taskTag)==null?void 0:r.trim())||"task";e.push(" where:"),e.push(" tags:"),e.push(` contains: ${gu(t)}`)}buildPathPattern(){let e=this.toMdbaseTemplate(this.plugin.settings.tasksFolder||""),t=this.getFilenameTemplate(),r=this.toMdbaseTemplate(t)||`{${this.plugin.fieldMapper.toUserField("title")}}`,a=r.endsWith(".md")?r:`${r}.md`;return e?`${e}/${a}`:a}getFilenameTemplate(){var t;let e=this.plugin.settings;if(e.storeTitleInFilename||e.taskFilenameFormat==="title")return"{{title}}";switch(e.taskFilenameFormat){case"timestamp":return"{{timestamp}}";case"uuid":return"{{uuid}}";case"custom":return((t=e.customFilenameTemplate)==null?void 0:t.trim())||"{{title}}";case"zettel":default:return"{{zettel}}"}}toMdbaseTemplate(e){let t=(e||"").trim();if(!t)return"";let r=this.getPathVariableMap();return t.replace(/\{\{(\w+)\}\}|\{(\w+)\}/g,(i,s,o)=>{let l=String(s!=null?s:o);return`{${r[l]||l}}`}).replace(/\\/g,"/").replace(/\/+/g,"/").replace(/^\/+|\/+$/g,"")}getPathVariableMap(){let e=this.plugin.fieldMapper;return{title:e.toUserField("title"),priority:e.toUserField("priority"),status:e.toUserField("status"),dueDate:e.toUserField("due"),scheduledDate:e.toUserField("scheduled"),due:e.toUserField("due"),scheduled:e.toUserField("scheduled")}}}});function rg(n){var i,s;if(n==null)return null;let e=n;if(((i=e.constructor)==null?void 0:i.name)==="NullValue"||dwe(e))return null;if(typeof e.data!="undefined")return e.data;let t=pwe(e);if(t)return t;let r=uwe(e);if(r!==void 0)return r;if(e.date instanceof Date)return e.date.toISOString();if(((s=e.constructor)==null?void 0:s.name)==="DateValue"&&e.toISOString)return e.toISOString();if(e.file)return e.file.path;let a=Reflect.get(e,"toString");if(typeof a=="function"&&a!==Object.prototype.toString){let o=Reflect.apply(a,e,[]);if(o!=="[object Object]")return o}return n}function cwe(n){var r;if(n==null)return"Unknown";let e=n;if(((r=e.constructor)==null?void 0:r.name)==="NullValue")return"Unknown";if(dwe(e))return"None";let t=sKe(e);return oKe(t)}function sKe(n){if(n.file&&typeof n.file=="object")return n.file.path;if(n.date instanceof Date)return n.date;let e=pwe(n);if(e)return e;if(typeof n.data!="undefined")return n.data;let t=uwe(n);return t!==void 0?t:n}function dwe(n){return n.icon==="lucide-file-question"&&typeof n.data=="undefined"&&typeof n.display=="undefined"&&typeof n.label=="undefined"&&!(n.date instanceof Date)&&!n.file&&!Array.isArray(n.value)&&typeof n.get!="function"&&typeof n.at!="function"&&typeof n.length!="function"&&typeof n.toISOString!="function"}function uwe(n){for(let e of[n.value,n.display,n.label])if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function oKe(n){if(n==null)return"None";if(n instanceof Date){let e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}return typeof n=="string"?n||"None":typeof n=="number"?String(n):typeof n=="boolean"?n?"True":"False":Array.isArray(n)?n.length>0?n.map(Y).join(", "):"None":Y(n)||"None"}function pwe(n){let e=typeof n.get=="function"?n.get.bind(n):typeof n.at=="function"?n.at.bind(n):null;if(typeof n.length=="function"&&e){let t=n.length(),r=[];for(let a=0;a<t;a++){let i=e(a);r.push(rg(i))}return r}return Array.isArray(n.value)?n.value.map(t=>rg(t)):null}var Aq=y(()=>{dr()});function mwe(n){let t={...n.frontmatter||n.properties||{}},r=n.file;return r&&(r.name!==void 0&&(t["file.name"]=r.name),r.basename!==void 0&&(t["file.basename"]=r.basename),r.extension!==void 0&&(t["file.extension"]=r.extension),r.path!==void 0&&(t["file.path"]=r.path),r.stat&&(r.stat.size!==void 0&&(t["file.size"]=r.stat.size),r.stat.ctime!==void 0&&(t["file.ctime"]=r.stat.ctime),r.stat.mtime!==void 0&&(t["file.mtime"]=r.stat.mtime))),t}var fwe=y(()=>{});var E_,hwe=y(()=>{q();Aq();fwe();E_=class{constructor(e,t=M({tag:"Bases/DataAdapter"})){this.basesView=e;this.logger=t}extractDataItems(){return this.basesView.data.data.map(t=>({key:t.file.path,data:t,file:t.file,path:t.file.path,properties:this.extractEntryProperties(t),basesData:t}))}getGroupedData(){return this.basesView.data.groupedData}isGrouped(){let e=this.basesView.data.groupedData;return e.length!==1?!0:e[0].hasKey()}getSortConfig(){return this.basesView.config.getSort()}getVisiblePropertyIds(){return this.basesView.config.getOrder()}getPropertyDisplayName(e){return this.basesView.config.getDisplayName(e)}getPropertyValue(e,t){try{let r=e.getValue(t);return rg(r)}catch(r){return this.logger.warn("Failed to get property value",{category:"provider",operation:"get-property-value",details:{propertyId:t},error:r}),null}}convertGroupKeyToString(e){return cwe(e)}extractEntryProperties(e){return mwe(e)}getComputedProperty(e,t){if(!e||typeof e!="object")return null;try{let r=e.getValue;if(typeof r!="function")return null;let a=r.call(e,t);return rg(a)}catch(r){return null}}}});var AE,Mq=y(()=>{AE=class{constructor(e,t){this.fieldMapper=t!=null?t:e}basesToTaskCardProperty(e){if(this.fieldMapper&&this.fieldMapper.isRecognizedProperty(e))return this.applySpecialTransformations(e);if(e.startsWith("note.")){let t=e.substring(5);return this.fieldMapper&&this.fieldMapper.isRecognizedProperty(t)?this.applySpecialTransformations(t):t==="dateCreated"?"dateCreated":t==="dateModified"?"dateModified":t==="completedDate"?"completedDate":this.applySpecialTransformations(t)}if(e.startsWith("task.")){let t=e.substring(5);return this.fieldMapper&&this.fieldMapper.isRecognizedProperty(t)?this.applySpecialTransformations(t):this.applySpecialTransformations(t)}return e.startsWith("file.")?e==="file.ctime"?"dateCreated":e==="file.mtime"?"dateModified":e==="file.tasks"?"checklistProgress":e:e.startsWith("formula.")?e==="formula.checklistProgress"?"checklistProgress":e:this.applySpecialTransformations(e)}internalToUserProperty(e){let t=this.fieldMapper.getMapping();return e in t?this.fieldMapper.toUserField(e):e}userPropertyToInternal(e){return this.fieldMapper.lookupMappingKey(e)||e}basesToUserProperty(e){let t=this.basesToTaskCardProperty(e);return this.internalToUserProperty(t)}applySpecialTransformations(e){return e==="timeEntries"?"totalTrackedTime":e==="blockedBy"?"blocked":e==="file.tasks"||e==="formula.checklistProgress"?"checklistProgress":e}basesToInternal(e){return this.basesToTaskCardProperty(e)}basesToTaskInfoProperty(e){var a;let t=e.replace(/^(note\.|file\.|task\.)/,""),r=(a=this.fieldMapper)==null?void 0:a.lookupMappingKey(t);return r||(t==="ctime"||e==="file.ctime"?"dateCreated":t==="mtime"||e==="file.mtime"?"dateModified":t==="name"||t==="basename"?"title":t)}mapVisibleProperties(e){let t=new Set,r=[];for(let a of e){let i=this.basesToTaskCardProperty(a);t.has(i)||(t.add(i),r.push(i))}return r}}});function mm(n){if(n!=null)return L0(n)}function ca(n){if(n!=null)return Y(n)}function dKe(n){if(typeof n=="number")return n;if(typeof n=="string"&&n.trim()!==""){let e=Number(n);return Number.isNaN(e)?void 0:e}}function uKe(n){let e=ca(n);return e==="manual"||e==="on_completion"||e==="rolling"?e:void 0}function pKe(n){let e=ca(n);return e==="completion"||e==="completion_or_skip"?e:void 0}function mKe(n){return Array.isArray(n)?n:void 0}function fKe(n){return Array.isArray(n)?n:void 0}function hKe(n){return n===void 0?void 0:yf(n)}function gwe(n,e,t){var d,u,p;let r=new Set(["title","status","priority","archived","due","scheduled","contexts","projects","tags","timeEstimate","completedDate","recurrence","recurrence_parent","occurrence_date","occurrence_materialization","occurrence_next_trigger","occurrence_template","occurrence_past_horizon","occurrence_future_horizon","dateCreated","dateModified","timeEntries","reminders","icsEventId","complete_instances","skipped_instances","googleCalendarExceptionOriginalScheduled","googleCalendarMovedOriginalDates","blockedBy","blocking","sortOrder","customProperties"]),a={};Object.keys(n).forEach(m=>{r.has(m)||(a[m]=n[m])});let i=mKe(n.timeEntries),s=i?oi(i):0,o=!1,l=[],c=!1;return t!=null&&t.dependencyCache&&e.path?(o=t.dependencyCache.isTaskBlocked(e.path),l=t.dependencyCache.getBlockedTaskPaths(e.path),c=l.length>0):o=Array.isArray(n.blockedBy)&&n.blockedBy.length>0,{title:ca(n.title)||e.name||((u=(d=e.path)==null?void 0:d.split("/").pop())==null?void 0:u.replace(".md",""))||"Untitled",status:ca(n.status)||((p=t==null?void 0:t.settings)==null?void 0:p.defaultTaskStatus)||"open",priority:ca(n.priority)||"normal",path:e.path||"",archived:n.archived===!0,due:ca(n.due),scheduled:ca(n.scheduled),contexts:mm(n.contexts),projects:mm(n.projects),attachments:mm(n.attachments),tags:mm(n.tags),timeEstimate:dKe(n.timeEstimate),completedDate:ca(n.completedDate),recurrence:ca(n.recurrence),recurrence_parent:ca(n.recurrence_parent),occurrence_date:ca(n.occurrence_date),occurrence_materialization:uKe(n.occurrence_materialization),occurrence_next_trigger:pKe(n.occurrence_next_trigger),occurrence_template:ca(n.occurrence_template),occurrence_past_horizon:ca(n.occurrence_past_horizon),occurrence_future_horizon:ca(n.occurrence_future_horizon),dateCreated:ca(n.dateCreated),dateModified:ca(n.dateModified),timeEntries:i,totalTrackedTime:s,reminders:fKe(n.reminders),icsEventId:mm(n.icsEventId),complete_instances:mm(n.complete_instances),skipped_instances:mm(n.skipped_instances),googleCalendarExceptionOriginalScheduled:ca(n.googleCalendarExceptionOriginalScheduled),googleCalendarMovedOriginalDates:mm(n.googleCalendarMovedOriginalDates),blockedBy:hKe(n.blockedBy),blocking:l.length>0?l:void 0,isBlocked:o,isBlocking:c,sortOrder:ca(n.sortOrder),customProperties:Object.keys(a).length>0?a:void 0,basesData:e.basesData}}function gKe(n,e){let t={...n!=null?n:{},...e!=null?e:{}};return Object.keys(t).length>0?t:void 0}function ywe(n,e){var r,a;let t=(a=(r=e==null?void 0:e.cacheManager)==null?void 0:r.getCachedTaskInfoSync)==null?void 0:a.call(r,n.path);return t?{...t,basesData:n.basesData,customProperties:gKe(t.customProperties,n.customProperties)}:n}function yKe(n,e){if(!(n!=null&&n.path))return null;let t=n.properties||n.frontmatter||{};if(e!=null&&e.fieldMapper){let r=e.fieldMapper.mapFromFrontmatter(t,n.path,e.settings.storeTitleInFilename),a=gwe(r,n,e),i={};return Object.keys(t).forEach(s=>{s.startsWith("file.")&&(i[s]=t[s])}),ywe({...a,customProperties:{...r.customProperties,...a.customProperties,...i}},e)}else return ywe(gwe(t,n,e),e)}async function yu(n,e,t){let r=t||yKe,a=[];for(let i of n)if(i!=null&&i.path)try{let s=r(i,e);s&&a.push(s)}catch(s){cKe.warn("[TaskNotes][BasesPOC] Error converting Bases item to TaskInfo:",{category:"validation",operation:"converting-bases-item-taskinfo",error:s})}return a}var lKe,cKe,ME=y(()=>{lKe=require("obsidian");yt();Yl();jf();Mq();Zs();dr();q();Li();cKe=M({tag:"Bases/Helpers"})});function Iq(n){return Array.isArray(n)?n.map(String):[String(n)]}function Mo(n,e,t){return n[e.toUserField(t)]}function fm(n){return Y(n)}function kKe(n,e){return new Set([...vKe.map(t=>n.toUserField(t)),n.toUserField("archiveTag"),"tags",...e.map(t=>t.key)])}function vwe(n,e,t=[]){let r={},a={},i=Mo(n,e,"title");i!==void 0&&(r.title=fm(i));let s=Mo(n,e,"status");s!==void 0&&(r.status=fm(s));let o=Mo(n,e,"priority");o!==void 0&&(r.priority=fm(o));let l=Mo(n,e,"due");l!==void 0&&(r.due=fm(l));let c=Mo(n,e,"scheduled");c!==void 0&&(r.scheduled=fm(c));let d=Mo(n,e,"contexts");d!==void 0&&(r.contexts=Iq(d));let u=Mo(n,e,"projects");u!==void 0&&(r.projects=Iq(u)),n.tags!==void 0&&(r.tags=Iq(n.tags)),Array.isArray(n.tags)&&(r.archived=n.tags.includes(e.toUserField("archiveTag")));let p=Mo(n,e,"timeEstimate");p!==void 0&&(r.timeEstimate=Number(p));let m=Mo(n,e,"recurrence");m!==void 0&&(r.recurrence=fm(m));let f=Mo(n,e,"completedDate");f!==void 0&&(r.completedDate=fm(f));let h=Mo(n,e,"dateCreated");h!==void 0&&(r.dateCreated=fm(h));let g=Mo(n,e,"blockedBy");g!==void 0&&(r.blockedBy=yf(g));for(let T of t)n[T.key]!==void 0&&(a[T.key]=n[T.key]);let v=kKe(e,t);for(let[T,b]of Object.entries(n))v.has(T)||(a[T]=b);let k={...r};return Object.keys(a).length>0&&(k.customFrontmatter=a),k}var vKe,kwe=y(()=>{Zs();dr();vKe=["title","status","priority","due","scheduled","contexts","projects","timeEstimate","recurrence","completedDate","dateCreated","blockedBy"]});function P_(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Nq(n){try{return JSON.parse(`"${n}"`)}catch(e){return n}}function Twe(n){let e={},t=P_(n.config)?n.config:{},r=P_(t.query)?t.query:void 0;return _q(r==null?void 0:r.filters,e,n),_q(t.filters,e,n),e}function _q(n,e,t){if(!P_(n))return;let r=n,a=Array.isArray(r.filters)?r.filters:[];if(a.length>0){if(r.conjunction!==void 0&&r.conjunction!=="and")return;for(let s of a)_q(s,e,t);return}let i=P_(r.rule)?r.rule.text:void 0;typeof i=="string"&&TKe(i,e,t)}function TKe(n,e,t){let r=n.trim(),a=r.match(/^file\.hasTag\("((?:\\.|[^"\\])*)"\)$/);if(a){let l=Nq(a[1]);l!==t.taskTag&&D_(e,"tags",l,t.fieldMapper);return}let i=r.match(/^(.+?)\s*==\s*"((?:\\.|[^"\\])*)"$/);if(i){let l=Rq(i[1],t);l&&D_(e,l,Nq(i[2]),t.fieldMapper);return}let s=r.match(/^(.+?)\.contains\("((?:\\.|[^"\\])*)"\)$/);if(s){let l=Rq(s[1],t);l&&D_(e,l,Nq(s[2]),t.fieldMapper);return}let o=r.match(/^(.+?)\.contains\(this\.file\.asLink\(\)\)$/);if(o){let l=o[1].trim(),c=`.map(${vb("value")})`;l.endsWith(c)&&(l=l.slice(0,-c.length).replace(/^file\.hasLink\(this\.file\)\s*&&\s*/,""));let d=Rq(l,t),u=bKe(t.currentFileLink);d&&u&&D_(e,d,u,t.fieldMapper)}}function bKe(n){return typeof n=="function"?n():n!=null?n:null}function Rq(n,e){var a;let t=n.trim(),r=t.match(/^list\((.+)\)$/);if(r&&(t=r[1].trim()),t=t.replace(/^(note|task)\./,""),t==="tags"||t==="file.tags")return"tags";for(let i of wKe){let s=e.fieldMapper.toUserField(i);if(t===i||t===s)return s}return(a=e.userFields)!=null&&a.some(i=>i.key===t)?t:null}function D_(n,e,t,r){if(!new Set(["tags",r.toUserField("contexts"),r.toUserField("projects"),r.toUserField("blockedBy")]).has(e)){n[e]===void 0&&(n[e]=t);return}let i=n[e],s=Array.isArray(i)?i.filter(o=>typeof o=="string"):typeof i=="string"?[i]:[];s.includes(t)||(n[e]=[...s,t])}var wKe,bwe=y(()=>{G1();wKe=["title","status","priority","due","scheduled","contexts","projects","timeEstimate","completedDate","dateCreated","recurrence","blockedBy"]});function wwe({config:n,fieldMapper:e,taskTag:t,userFields:r=[],currentFileLink:a,frontmatterProcessor:i}){let s=Twe({config:n,fieldMapper:e,taskTag:t,userFields:r,currentFileLink:a});return i==null||i(s),vwe(s,e,r)}function Swe(n){let e=n.workspace.getActiveFile();return!e||e.extension==="base"?null:n.fileManager.generateMarkdownLink(e,e.path)}var Cwe=y(()=>{kwe();bwe()});function Ewe(n,e){let t=SKe(e),r=n.map(a=>t.map(i=>{var s,o;return i.id==="file"?(o=(s=a.file)==null?void 0:s.path)!=null?o:"":CKe(e.getPropertyValue(a,i.id))}));return{columns:t,rows:r}}function SKe(n){let e=n.getVisiblePropertyIds();return[{id:"file",label:"File"},...e.map(t=>({id:t,label:n.getPropertyDisplayName(t)||t}))]}function CKe(n){return Y(n).replace(/\r?\n/g," ")}function Dwe(n){return[n.columns.map(e=>xwe(e.label)),...n.rows].map(e=>e.map(xwe).join(" ")).join(`
`)}function Pwe(n){return[n.columns.map(e=>e.label),...n.rows].map(e=>e.map(xKe).join(",")).join(`
`)}function Awe(n,e){let r=Y(n)||e||"tasknotes-bases-export";return`${EKe(r)}.csv`}function xwe(n){return n.replace(/\t/g," ")}function xKe(n){return/[",\r\n]/.test(n)?`"${n.replace(/"/g,'""')}"`:n}function EKe(n){return n.trim().replace(/[\\/:*?"<>|]+/g,"-").replace(/\s+/g,"-").replace(/^-+|-+$/g,"")||"tasknotes-bases-export"}var Mwe=y(()=>{dr()});function Iwe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Nwe(n,e){var o,l,c,d;let t=Iwe(n)?n:{},r=(l=(o=t.updatedTask)!=null?o:t.task)!=null?l:t.taskInfo;if(!(r!=null&&r.path))return{action:"ignore"};let a=r.path,i=(d=(c=t.originalTask)==null?void 0:c.path)!=null?d:typeof t.path=="string"?t.path:void 0;return e.has(a)||(i?e.has(i):!1)?i&&i!==a?{action:"refresh-renamed-task",removePath:i,addPath:a}:{action:"handle-task",task:r,source:PKe(t)}:DKe(t)?{action:"refresh-view"}:{action:"ignore"}}function DKe(n){return n.originalTask?!0:!(n.task!==void 0||n.taskInfo!==void 0)}function PKe(n){return n.task!==void 0||n.taskInfo!==void 0?"metadata-cache":"tasknotes-service"}function Rwe(n,e){var s,o,l,c;let t=Iwe(n)?n:{},r=typeof t.path=="string"?t.path:(s=t.deletedTask)==null?void 0:s.path,a=typeof r=="string"&&e.renderedTaskPaths.has(r),i=((c=(l=(o=t.deletedTask)==null?void 0:o.projects)==null?void 0:l.length)!=null?c:0)>0||AKe(t.prevCache,e.projectsField);return{deletedPath:r,shouldRefresh:a||i}}function _we(n){let e=new Set;if(!n)return e;let t=n.querySelectorAll(".task-card[data-task-path]");for(let r of Array.from(t))r.dataset.taskPath&&e.add(r.dataset.taskPath);return e}function AKe(n,e){let t=n==null?void 0:n.frontmatter;if(!t)return!1;let r=t[e];return Array.isArray(r)?r.length>0:typeof r=="string"&&r.trim().length>0}var Fq=y(()=>{});function Owe(n){var r;let e=n.closest(".bases-view"),t=e==null?void 0:e.parentElement;(r=t==null?void 0:t.querySelector(`.${Lq}`))==null||r.remove(),t==null||t.classList.remove(Lwe)}function zwe(n){var d;let e=n.containerEl.closest(".bases-view");if(!e)return"missing-bases-view";let t=e.parentElement;if(!t)return"missing-parent";t.classList.add(Lwe);let r=t.querySelector(".bases-toolbar");if(!r)return"missing-toolbar";(d=r.querySelector(`.${Lq}`))==null||d.remove();let a=n.containerEl.ownerDocument,i=Ie(a,"div");i.className=`bases-toolbar-item ${Lq}`;let s=Ie(a,"button");s.className="text-icon-button",s.type="button",s.setAttribute("aria-label",n.label);let o=Ie(a,"span");o.className="text-button-icon",(0,Fwe.setIcon)(o,"plus"),s.appendChild(o);let l=Ie(a,"span");l.className="text-button-label",l.textContent=n.label,s.appendChild(l),i.appendChild(s),i.addEventListener("click",n.onClick);let c=r.querySelector(".bases-toolbar-new-item-menu");return c?c.before(i):r.appendChild(i),"injected"}var Fwe,Lwe,Lq,Bwe=y(()=>{Fwe=require("obsidian");Li();Lwe="tasknotes-view-active",Lq="tn-bases-new-task-btn"});function jwe({basesPropertyIds:n,propertyMapper:e,fallbackInternalProperties:t,toUserProperties:r}){let a=e.mapVisibleProperties([...n]);return a.length>0?a:r(t)}function $we({basesPropertyIds:n,propertyMapper:e,getDisplayName:t}){let r={};for(let a of n){let i=e.basesToTaskCardProperty(a),s=t(a);i&&typeof s=="string"&&s.trim()!==""&&(r[i]=s)}return r}var Uwe=y(()=>{});var Hwe,A_,Vwe=y(()=>{Hwe=require("obsidian");tc();Li();A_=class{constructor(e,t,r=300){this.searchBoxEl=null;this.inputEl=null;this.clearBtnEl=null;this.debouncedSearch=null;this.destroyed=!1;this.handleInput=()=>{if(!this.inputEl)return;let e=this.inputEl.value;this.updateClearButtonVisibility(),this.debouncedSearch&&this.debouncedSearch(e)};this.handleKeydown=e=>{e.key==="Escape"&&(this.clear(),this.debouncedSearch&&this.debouncedSearch(""))};this.handleClear=()=>{var e;this.clear(),this.debouncedSearch&&this.debouncedSearch(""),(e=this.inputEl)==null||e.focus()};this.container=e,this.onSearch=t,this.debounceMs=r,this.debouncedSearch=iv(a=>{this.destroyed||this.onSearch(a)},this.debounceMs,!1)}render(){let e=this.container.ownerDocument;this.searchBoxEl=Ie(e,"div"),this.searchBoxEl.className="tn-search-box";let t=Ie(e,"div");t.className="tn-search-box__input-wrapper";let r=Ie(e,"div");r.className="tn-search-box__icon",(0,Hwe.setIcon)(r,"search"),this.inputEl=Ie(e,"input"),this.inputEl.type="text",this.inputEl.className="tn-search-box__input",this.inputEl.placeholder="Search tasks...",this.inputEl.setAttribute("aria-label","Search tasks");let a=Ie(e,"button");return a.type="button",a.className="tn-search-box__clear",a.textContent="×",a.setAttribute("aria-label","Clear search"),this.clearBtnEl=a,t.appendChild(r),t.appendChild(this.inputEl),t.appendChild(this.clearBtnEl),this.searchBoxEl.appendChild(t),this.container.appendChild(this.searchBoxEl),this.attachEventListeners(),this.searchBoxEl}attachEventListeners(){!this.inputEl||!this.clearBtnEl||(this.inputEl.addEventListener("input",this.handleInput),this.inputEl.addEventListener("keydown",this.handleKeydown),this.clearBtnEl.addEventListener("click",this.handleClear))}updateClearButtonVisibility(){if(!this.inputEl||!this.clearBtnEl)return;this.inputEl.value.length>0?this.clearBtnEl.classList.add("is-visible"):this.clearBtnEl.classList.remove("is-visible")}getValue(){var e;return((e=this.inputEl)==null?void 0:e.value)||""}setValue(e){this.inputEl&&(this.inputEl.value=e,this.updateClearButtonVisibility())}clear(){this.inputEl&&(this.inputEl.value="",this.updateClearButtonVisibility())}destroy(){this.destroyed=!0,this.inputEl&&(this.inputEl.removeEventListener("input",this.handleInput),this.inputEl.removeEventListener("keydown",this.handleKeydown)),this.clearBtnEl&&this.clearBtnEl.removeEventListener("click",this.handleClear),this.inputEl=null,this.clearBtnEl=null,this.searchBoxEl=null,this.debouncedSearch=null}}});var M_,Wwe=y(()=>{dr();M_=class{constructor(e){this.visibleProperties=e||[]}filterTasks(e,t){let a=this.normalizeSearchTerm(t).split(/\s+/).filter(Boolean);return a.length===0?e:e.filter(i=>{let s=this.extractSearchableText(i);return a.some(o=>s.includes(o))})}extractSearchableText(e){let t=[];if(t.push(e.title||""),t.push(e.status||""),t.push(e.priority||""),e.tags&&Array.isArray(e.tags)&&t.push(e.tags.join(" ")),e.contexts&&Array.isArray(e.contexts)&&t.push(e.contexts.join(" ")),e.projects&&Array.isArray(e.projects)&&t.push(e.projects.join(" ")),e.customProperties&&this.visibleProperties.length>0)for(let r of this.visibleProperties){let a=e.customProperties[r];a!=null&&(Array.isArray(a)?t.push(a.join(" ")):t.push(Y(a)))}return t.join(" ").toLowerCase()}normalizeSearchTerm(e){return e.trim().toLowerCase()}}});function qwe({container:n,visibleProperties:e,currentSearchTerm:t,onSearch:r,debounceMs:a=300}){let i=n.ownerDocument,s=Ie(i,"div");s.className="tn-search-container",n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s);let o=new M_([...e]),l=new A_(s,r,a);return l.render(),t&&l.setValue(t),{searchContainer:s,searchBox:l,searchFilter:o}}function Gwe(n,e,t){return n.length>0&&e===0&&t>0}function Ywe(n,e){let t=n.ownerDocument,r=Ie(t,"div");r.className="tn-search-no-results";let a=Ie(t,"div");a.className="tn-search-no-results__text",a.textContent=`No tasks match "${e}"`;let i=Ie(t,"div");return i.className="tn-search-no-results__hint",i.textContent="Try a different search term or clear the search",r.appendChild(a),r.appendChild(i),n.appendChild(r),r}var Kwe=y(()=>{Vwe();Wwe();Li()});function Jwe(n,e){if(e){n.classList.add("tn-selection-mode"),n.setAttribute("data-selection-mode","true");return}n.classList.remove("tn-selection-mode"),n.removeAttribute("data-selection-mode"),I_(n)}function Xwe(n,e){if(!e){I_(n);return}let t=e.getPrimarySelectedPath(),r=n.querySelectorAll(".task-card");for(let i of r)Qwe({element:i,path:i.dataset.taskPath,selected:i.dataset.taskPath?e.isSelected(i.dataset.taskPath):!1,primary:i.dataset.taskPath===t,selectedClass:"task-card--selected",primaryClass:"task-card--selected-primary"});let a=n.querySelectorAll(".kanban-view__card-wrapper");for(let i of a)Qwe({element:i,path:i.dataset.taskPath,selected:i.dataset.taskPath?e.isSelected(i.dataset.taskPath):!1,primary:i.dataset.taskPath===t,selectedClass:"kanban-view__card-wrapper--selected",primaryClass:"kanban-view__card-wrapper--selected-primary"})}function I_(n){let e=n.querySelectorAll(".task-card--selected");for(let r of e)r.classList.remove("task-card--selected"),r.classList.remove("task-card--selected-primary");let t=n.querySelectorAll(".kanban-view__card-wrapper--selected");for(let r of t)r.classList.remove("kanban-view__card-wrapper--selected"),r.classList.remove("kanban-view__card-wrapper--selected-primary")}function eSe({rootElement:n,indicatorEl:e,count:t,onClearSelection:r}){if(t<=0)return e&&Zwe(e,"tn-static-display-none-6b99de8b"),e;let a=e!=null?e:IKe(n);return a.onclick=()=>{r()},a.onkeydown=i=>{i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),r())},a.textContent=`${t} selected`,a.setAttribute("aria-label",`${t} selected. Activate to clear selection.`),Zwe(a,"tn-static-display-block-2a1b75c9"),a}function tSe({event:n,taskPath:e,selectionService:t,getVisibleTaskPaths:r,updateSelectionVisuals:a}){return!t||!t.isSelectionModeActive()&&!n.shiftKey&&!n.ctrlKey&&!n.metaKey?!1:(n.shiftKey&&!t.isSelectionModeActive()&&t.enterSelectionMode(),n.shiftKey?t.selectRange(e,r()):(n.ctrlKey||n.metaKey||t.isSelectionModeActive())&&t.toggleSelection(e),a(),!0)}function rSe({event:n,selectionService:e,getVisibleTaskPaths:t,updateSelectionModeUi:r,updateSelectionVisuals:a}){if(!(e!=null&&e.isSelectionModeActive())||RKe(n.target))return!1;if(n.key==="Escape")return e.exitSelectionMode(!0),r(!1),!0;if((n.ctrlKey||n.metaKey)&&n.key.toLowerCase()==="a")return n.preventDefault(),e.selectAll(t()),a(),!0;let i=NKe(n);return i!==null?(n.preventDefault(),e.selectAdjacentRange(i,t()),a(),!0):!1}function nSe(n){if(!n)return[];let e=n.querySelectorAll(".task-card[data-task-path]"),t=[];for(let r of e){let a=r.dataset.taskPath;a&&t.push(a)}return t}function IKe(n){let e=n.ownerDocument,t=Ie(e,"div");return t.className="tn-selection-indicator",t.setAttribute("role","button"),t.tabIndex=0,n.appendChild(t),t}function Zwe(n,e){n.classList.remove(...MKe),n.classList.add(e)}function Qwe({element:n,path:e,selected:t,primary:r,selectedClass:a,primaryClass:i}){if(!e||!t){n.classList.remove(a),n.classList.remove(i);return}n.classList.add(a),r?n.classList.add(i):n.classList.remove(i)}function NKe(n){return n.shiftKey?n.key==="ArrowUp"||n.key==="ArrowLeft"?-1:n.key==="ArrowDown"||n.key==="ArrowRight"?1:null:null}function RKe(n){if(!(n instanceof HTMLElement))return!1;if(n.isContentEditable)return!0;let e=n.tagName.toLowerCase();return e==="input"||e==="textarea"||e==="select"}var MKe,aSe=y(()=>{Li();MKe=["tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"]});function _Ke(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function FKe(n,e,t){let r=n;if(r&&typeof r.then=="function"){r.then(e,e);return}t(e,0)}function iSe({controller:n,view:e,isConnected:t,refresh:r,scheduleTimeout:a}){if(!_Ke(n)||typeof n.onConfigChanged!="function")return null;let i=n,s=i.onConfigChanged;if(!s)return null;let o=()=>{i.view&&i.view!==e||t()&&r()},l=(...c)=>{let d=s.apply(i,c);return FKe(d,o,a),d};return i.onConfigChanged=l,()=>{i.onConfigChanged===l&&(i.onConfigChanged=s)}}function sSe({currentTimer:n,scheduler:e,isConnected:t,beforeRender:r,render:a,onTimerCleared:i,onRenderError:s,delayMs:o=500}){return t()?(n&&e.clearTimeout(n),e.setTimeout(()=>{i();try{r(),a()}catch(l){s(l)}},o)):n}function oSe({currentTimer:n,scheduler:e,render:t,onTimerCleared:r,delayMs:a=300}){return n&&e.clearTimeout(n),e.setTimeout(()=>{try{t()}finally{r()}},a)}var lSe=y(()=>{});function dSe(n){return[{name:"Copy task filenames",icon:"lucide-file-text",callback:()=>n("filenames")},{name:"Copy task links",icon:"lucide-link",callback:()=>n("markdown-links")},{name:"Copy task titles",icon:"lucide-text",callback:()=>n("titles")}]}async function uSe({dataItems:n,format:e,identifyTaskNotes:t,filterTasks:r,resolveLinkText:a,writeText:i}){let s=await t(n),l=r(s).map(d=>({path:d.path,title:d.title}));if(l.length===0)return{status:"empty"};let c=UA(l,e,a);return await i(c),{status:"copied",count:l.length}}function pSe(n,e){let t=n.vault.getAbstractFileByPath(e);return t instanceof cSe.TFile?n.metadataCache.fileToLinktext(t,""):e}var cSe,mSe=y(()=>{cSe=require("obsidian");T$()});async function LKe({eventData:n,isConnected:e,relevantPathsCache:t,handleTaskUpdate:r,debouncedRefresh:a,onError:i}){try{if(!e())return;let s=Nwe(n,t);if(s.action==="refresh-view"){a();return}if(s.action==="refresh-renamed-task"){t.delete(s.removePath),t.add(s.addPath),a();return}s.action==="handle-task"&&await r(s.task,s.source)}catch(s){i(s),a()}}function fSe({emitter:n,isConnected:e,relevantPathsCache:t,handleTaskUpdate:r,handleTaskDeleted:a,debouncedRefresh:i,onError:s}){let o=n.on(rt,d=>LKe({eventData:d,isConnected:e,relevantPathsCache:t,handleTaskUpdate:r,debouncedRefresh:i,onError:s})),l=n.on(Di,d=>{a(d)}),c=n.on("file-deleted",d=>{a(d)});return[o,l,c]}function hSe(n,e){for(let t of e)n.offref(t)}var gSe=y(()=>{Pr();Fq()});function OKe(n,e){return e!==n||n.trim().startsWith("[[")}function zKe(n,e,t){if(!Array.isArray(n.projects)||n.projects.length===0)return!1;for(let r of n.projects){if(typeof r!="string"||r.trim().length===0)continue;let a=vt(r);if(!OKe(r,a))continue;let i=t(a,n.path);if(i!=null&&i.path&&e.has(i.path))return!0}return!1}function ySe(n,e){let t=new Set(n.map(r=>r.path));return n.filter(r=>!zKe(r,t,e))}var vSe=y(()=>{Cn()});function BKe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}var zc,Bc,IE=y(()=>{zc=require("obsidian");hwe();Mq();Yl();jf();w$();ME();Cwe();Mwe();Fq();Bwe();Uwe();Kwe();aSe();Li();lSe();mSe();gSe();vSe();q();Bc=class extends zc.Component{constructor(t,r,a){super();this.app=void 0;this.config=void 0;this.data=void 0;this.allProperties=[];this.rootElement=null;this.taskUpdateListener=null;this.updateDebounceTimer=null;this.dataUpdateDebounceTimer=null;this.restoreConfigChangeHook=null;this.relevantPathsCache=new Set;this.enableSearch=!1;this.searchBox=null;this.searchContainerEl=null;this.searchFilter=null;this.currentSearchTerm="";this.selectionModeCleanup=null;this.selectionIndicatorEl=null;this.plugin=a,this.containerEl=r,this.logger=M({tag:()=>`Bases/${this.type}`,isDebugEnabled:()=>this.plugin.settings.enableDebugLogging}),this.dataAdapter=new E_(this,this.logger.child("DataAdapter")),this.propertyMapper=new AE(a.fieldMapper),this.createFileForView=this.createFileForView.bind(this),this.setupConfigChangeHook(t)}setupConfigChangeHook(t){let r=iSe({controller:t,view:this,isConnected:()=>{var a;return!!((a=this.rootElement)!=null&&a.isConnected)},refresh:()=>this.debouncedRefresh(),scheduleTimeout:(a,i)=>{this.getTimeoutScheduler().setTimeout(a,i)}});r&&(this.restoreConfigChangeHook=r,typeof this.register=="function"&&this.register(()=>{var a;(a=this.restoreConfigChangeHook)==null||a.call(this),this.restoreConfigChangeHook=null}))}getTimeoutScheduler(){let t=this.containerEl.ownerDocument.defaultView||window;return{setTimeout:(r,a)=>t.setTimeout(r,a),clearTimeout:r=>t.clearTimeout(r)}}onload(){this.setupContainer(),this.setupTaskUpdateListener(),this.setupSelectionHandling(),this.updateRelevantPathsCache(),this.render()}onDataUpdated(){var t;(t=this.rootElement)!=null&&t.isConnected&&(this.dataUpdateDebounceTimer=sSe({currentTimer:this.dataUpdateDebounceTimer,scheduler:this.getTimeoutScheduler(),isConnected:()=>{var r;return!!((r=this.rootElement)!=null&&r.isConnected)},beforeRender:()=>this.updateRelevantPathsCache(),render:async()=>{let r=this.getEphemeralState();try{await this.render()}finally{this.setEphemeralState(r)}},onTimerCleared:()=>{this.dataUpdateDebounceTimer=null},onRenderError:r=>{this.logger.error("Render error during data update",{category:"internal",operation:"data-update-render",error:r}),this.renderError(r)},delayMs:500}))}updateRelevantPathsCache(){this.relevantPathsCache.clear();try{let t=this.dataAdapter.extractDataItems();for(let r of t)r.path&&this.relevantPathsCache.add(r.path)}catch(t){}}getEphemeralState(){var t;return{scrollTop:((t=this.rootElement)==null?void 0:t.scrollTop)||0,containerScrollTop:this.containerEl.scrollTop||0}}setEphemeralState(t){if(!(!BKe(t)||!this.rootElement||!this.rootElement.isConnected))try{let r=t;typeof r.scrollTop=="number"&&(this.rootElement.scrollTop=r.scrollTop),typeof r.containerScrollTop=="number"&&(this.containerEl.scrollTop=r.containerScrollTop)}catch(r){this.logger.debug("Failed to restore ephemeral state",{category:"stale-data",operation:"restore-ephemeral-state",error:r})}}focus(){var t;try{(t=this.rootElement)!=null&&t.isConnected&&typeof this.rootElement.focus=="function"&&this.rootElement.focus()}catch(r){this.logger.debug("Failed to focus view",{category:"internal",operation:"focus-view",error:r})}}refresh(){this.render()}copyToClipboard(){this.copyBasesTableToClipboard()}exportTable(){this.exportBasesTableAsCsv()}getViewActions(){return dSe(t=>{this.copyCurrentViewTasks(t)})}onResize(){}setupContainer(){this.containerEl.empty();let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className=`tn-bases-integration tasknotes-plugin tasknotes-container tn-${this.type}`,r.tabIndex=-1,this.containerEl.appendChild(r),this.rootElement=r,this.setupNewTaskButton()}setupNewTaskButton(){window.setTimeout(()=>this.injectNewTaskButton(),100),this.register(()=>this.cleanupNewTaskButton())}cleanupNewTaskButton(){Owe(this.containerEl)}injectNewTaskButton(){let t=zwe({containerEl:this.containerEl,label:this.plugin.i18n.translate("common.new"),onClick:r=>{r.preventDefault(),r.stopPropagation(),this.createFileForView("New Task")}});if(t==="missing-bases-view"){this.logger.debug("No .bases-view element found",{category:"provider",operation:"inject-new-task-button"});return}if(t==="missing-parent"){this.logger.debug("No parent element found for Bases view",{category:"provider",operation:"inject-new-task-button"});return}if(t==="missing-toolbar"){this.logger.debug("No .bases-toolbar element found",{category:"provider",operation:"inject-new-task-button"});return}this.logger.debug("Injected New Task button into toolbar",{category:"provider",operation:"inject-new-task-button"})}setupTaskUpdateListener(){this.taskUpdateListener||(this.taskUpdateListener=fSe({emitter:this.plugin.emitter,isConnected:()=>{var t;return!!((t=this.rootElement)!=null&&t.isConnected)},relevantPathsCache:this.relevantPathsCache,handleTaskUpdate:(t,r)=>this.handleTaskUpdate(t,r),handleTaskDeleted:t=>this.handleTaskDeletedEvent(t),debouncedRefresh:()=>this.debouncedRefresh(),onError:t=>{this.logger.error("Error in task update handler",{category:"internal",operation:"task-update-handler",error:t})}}),this.register(()=>{this.taskUpdateListener&&(hSe(this.plugin.emitter,this.taskUpdateListener),this.taskUpdateListener=null)}))}handleTaskDeletedEvent(t){var a,i;let r=Rwe(t,{projectsField:this.plugin.fieldMapper.toUserField("projects"),renderedTaskPaths:_we(this.rootElement)});r.deletedPath&&this.relevantPathsCache.delete(r.deletedPath),(a=this.plugin.projectSubtasksService)==null||a.invalidateIndex(),(i=this.rootElement)!=null&&i.isConnected&&r.shouldRefresh&&this.debouncedRefresh()}debouncedRefresh(){this.updateDebounceTimer=oSe({currentTimer:this.updateDebounceTimer,scheduler:this.getTimeoutScheduler(),render:async()=>{let t=this.getEphemeralState();try{await this.render()}finally{this.setEphemeralState(t)}},onTimerCleared:()=>{this.updateDebounceTimer=null},delayMs:300})}async createFileForView(t,r){let{TaskCreationModal:a}=await Promise.resolve().then(()=>(UM(),Sue)),i=this.app||this.plugin.app,s=wwe({config:this.config,fieldMapper:this.plugin.fieldMapper,taskTag:this.plugin.settings.taskTag,userFields:this.plugin.settings.userFields||[],currentFileLink:()=>Swe(i),frontmatterProcessor:r});new a(i,this.plugin,{prePopulatedValues:s,onTaskCreated:l=>{this.refresh()}}).open()}getVisibleProperties(){let t=this.plugin.settings.defaultVisibleProperties||[...oC,"tags"];return jwe({basesPropertyIds:this.config.getOrder(),propertyMapper:this.propertyMapper,fallbackInternalProperties:t,toUserProperties:r=>di([...r],this.plugin)})}getVisiblePropertyLabels(){return $we({basesPropertyIds:this.config.getOrder(),propertyMapper:this.propertyMapper,getDisplayName:t=>{var r,a;return(a=(r=this.config).getDisplayName)==null?void 0:a.call(r,t)}})}buildTaskCardOptions(t={}){return{propertyLabels:this.getVisiblePropertyLabels(),...t}}filterTopLevelSubtasks(t){return ySe(t,(r,a)=>this.plugin.app.metadataCache.getFirstLinkpathDest(r,a))}setupSearch(t){if(this.searchBox&&!this.enableSearch){this.teardownSearch();return}if(this.searchBox){this.currentSearchTerm&&this.searchBox.getValue()!==this.currentSearchTerm&&this.searchBox.setValue(this.currentSearchTerm);return}if(!this.enableSearch)return;let r=[];try{this.config&&(r=this.getVisibleProperties())}catch(i){this.logger.debug("Could not get visible properties during search setup",{category:"provider",operation:"setup-search",error:i})}let a=qwe({container:t,visibleProperties:r,currentSearchTerm:this.currentSearchTerm,onSearch:i=>this.handleSearch(i)});this.searchFilter=a.searchFilter,this.searchBox=a.searchBox,this.searchContainerEl=a.searchContainer,this.register(()=>this.teardownSearch())}teardownSearch(){var t;this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),(t=this.searchContainerEl)==null||t.remove(),this.searchContainerEl=null,this.searchFilter=null,this.currentSearchTerm=""}handleSearch(t){let r=performance.now();this.currentSearchTerm=t,this.render();let a=performance.now()-r;a>200&&this.logger.warn("Slow search",{category:"internal",operation:"search",details:{elapsedMs:a,term:t}})}applySearchFilter(t){if(!this.searchFilter||!this.currentSearchTerm)return t;let r=performance.now(),a=this.searchFilter.filterTasks(t,this.currentSearchTerm),i=performance.now()-r;return i>100&&this.logger.warn("Slow filter operation",{category:"internal",operation:"filter",details:{elapsedMs:i,taskCount:t.length}}),a}async copyCurrentViewTasks(t){try{let r=this.app||this.plugin.app,a=await uSe({dataItems:this.dataAdapter.extractDataItems(),format:t,identifyTaskNotes:i=>yu(i,this.plugin),filterTasks:i=>this.applySearchFilter(i),resolveLinkText:i=>pSe(r,i.path),writeText:i=>navigator.clipboard.writeText(i)});if(a.status==="empty"){new zc.Notice("No tasks to copy");return}new zc.Notice(`Copied ${a.count} tasks`)}catch(r){this.logger.error("Failed to copy current view tasks",{category:"provider",operation:"copy-current-view-tasks",error:r}),new zc.Notice("Failed to copy tasks")}}getBasesExportTable(){var t,r;return Ewe((r=(t=this.data)==null?void 0:t.data)!=null?r:[],this.dataAdapter)}getBasesExportFileName(){var r;let t=typeof((r=this.config)==null?void 0:r.get)=="function"?this.config.get("name"):"";return Awe(t,this.type)}async copyBasesTableToClipboard(){try{let t=this.getBasesExportTable(),r=Dwe(t);await navigator.clipboard.writeText(r),new zc.Notice(`Copied ${t.rows.length} rows`)}catch(t){this.logger.error("Failed to copy Bases table",{category:"provider",operation:"copy-bases-table",error:t}),new zc.Notice("Failed to copy table")}}async exportBasesTableAsCsv(){var t;try{let r=this.getBasesExportTable(),a=Pwe(r),i=new Blob([a],{type:"text/csv;charset=utf-8"}),s=(t=this.containerEl.ownerDocument.defaultView)!=null?t:window,o=s.URL.createObjectURL(i),l=Ie(this.containerEl.ownerDocument,"a");l.href=o,l.download=this.getBasesExportFileName(),l.click(),s.URL.revokeObjectURL(o),new zc.Notice(`Exported ${r.rows.length} rows`)}catch(r){this.logger.error("Failed to export Bases table",{category:"provider",operation:"export-bases-table",error:r}),new zc.Notice("Failed to export table")}}isSearchWithNoResults(t,r){return Gwe(this.currentSearchTerm,t.length,r)}renderSearchNoResults(t){Ywe(t,this.currentSearchTerm)}setupSelectionHandling(){if(!this.rootElement)return;let t=this.plugin.taskSelectionService;if(!t)return;let r=s=>{rSe({event:s,selectionService:t,getVisibleTaskPaths:()=>this.getVisibleTaskPaths(),updateSelectionModeUi:o=>this.updateSelectionModeUI(o),updateSelectionVisuals:()=>this.updateSelectionVisuals()})};this.rootElement.addEventListener("keydown",r);let a=t.onSelectionChange(s=>{this.updateSelectionVisuals(),this.updateSelectionIndicator(s.length)}),i=t.onSelectionModeChange(s=>{this.updateSelectionModeUI(s)});this.register(()=>{var s;(s=this.rootElement)==null||s.removeEventListener("keydown",r),a(),i()})}updateSelectionModeUI(t){this.rootElement&&Jwe(this.rootElement,t)}updateSelectionVisuals(){if(!this.rootElement)return;let t=this.plugin.taskSelectionService;t&&Xwe(this.rootElement,t)}clearSelectionVisuals(){this.rootElement&&I_(this.rootElement)}updateSelectionIndicator(t){this.rootElement&&(this.selectionIndicatorEl=eSe({rootElement:this.rootElement,indicatorEl:this.selectionIndicatorEl,count:t,onClearSelection:()=>{var r,a;(r=this.plugin.taskSelectionService)==null||r.clearSelection(),(a=this.plugin.taskSelectionService)==null||a.exitSelectionMode()}}))}handleSelectionClick(t,r){var s;let a=this.plugin.taskSelectionService,i=tSe({event:t,taskPath:r,selectionService:a,getVisibleTaskPaths:()=>this.getVisibleTaskPaths(),updateSelectionVisuals:()=>this.updateSelectionVisuals()});return i&&((s=this.rootElement)==null||s.focus({preventScroll:!0})),i}showBatchContextMenu(t){let r=this.plugin.taskSelectionService;if(!r)return;let a=r.getSelectedPaths();if(a.length===0)return;new Gy({plugin:this.plugin,selectedPaths:a,onUpdate:()=>{this.render()}}).show(t)}getVisibleTaskPaths(){return nSe(this.rootElement)}}});function TSe(n,e,t){var c,d;let r=(c=t.sourcePath)!=null?c:"",a=vt(n),i=t.metadataCache.getFirstLinkpathDest(a,r)||t.metadataCache.getFirstLinkpathDest(a,"");if(!(i instanceof NE.TFile))return e;let s=t.metadataCache.getCache(i.path),o=(d=s==null?void 0:s.frontmatter)==null?void 0:d.title,l=jKe(e,i,a);if(typeof o=="string"&&o.trim().length>0)return l?o:e;if(l){let u=(e==null?void 0:e.trim())||"";return u&&!u.includes("/")?u:i.basename}return e}function jKe(n,e,t){let r=(n==null?void 0:n.trim())||"",a=e.path.replace(/\.md$/i,""),i=t.replace(/\.md$/i,"");return new Set(["",e.name,e.basename,e.path,a,t,i]).has(r)}function bSe(n){let e=n.match(/^\[\[([^\]]+)\]\]$/);if(!e)return null;let t=e[1];if(t.includes("|")){let a=t.split("|");return{filePath:a[0].trim(),displayText:a[1].trim()}}let r=(0,NE.parseLinktext)(t);return{filePath:r.path,displayText:r.path}}function wSe(n){let e=n.match(/^\[([^\]]*)\]\(([^)]+)\)$/);return e?{displayText:e[1].trim(),filePath:vt(n)}:null}function $Ke(n){return bSe(n)||wSe(n)}function UKe(n,e){let t=n.slice(e),r=t.match(/^\[\[([^\]]+)\]\]/);if(r){let i=bSe(r[0]);return i?{segment:i,endIndex:e+r[0].length}:null}let a=t.match(/^\[([^\]]*)\]\(([^)]+)\)/);if(a){let i=wSe(a[0]);return i?{segment:i,endIndex:e+a[0].length}:null}return null}function HKe(n){var a,i,s,o,l;let e=[],t=0,r=0;for(;t<n.length;){let c=(i=(a=n.slice(t).match(/^\s*/))==null?void 0:a[0])!=null?i:"";t+=c.length;let d=UKe(n,t);if(!d)return null;e.push(d.segment),r+=1,t=d.endIndex;let u=(o=(s=n.slice(t).match(/^\s*/))==null?void 0:s[0])!=null?o:"";if(t+=u.length,t>=n.length)break;let p=(l=n.slice(t).match(/^,\s*/))==null?void 0:l[0];if(!p)return null;e.push(p),t+=p.length}return r>1?e:null}function kSe(n,e,t){let r=TSe(e.filePath,e.displayText,t);nl(n,e.filePath,r,t,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1})}function N_(n,e,t){let r=$Ke(e);if(r){kSe(n,r,t);return}let a=HKe(e);if(a){for(let o of a)typeof o=="string"?n.appendChild(activeDocument.createTextNode(o)):kSe(n,o,t);return}let i=e.endsWith(".md")?e.replace(/\.md$/,""):e,s=t.metadataCache.getFirstLinkpathDest(i,"");if(s instanceof NE.TFile){let o=s.basename,l=TSe(i,o,t);nl(n,i,l,t,{cssClass:"internal-link task-group-link",hoverSource:"tasknotes-bases-group",showErrorNotices:!1});return}n.textContent=e}var NE,Oq=y(()=>{NE=require("obsidian");cp();Cn()});var VKe,hm,zq=y(()=>{q();VKe=M({tag:"Utils/VirtualScroller"}),hm=class{constructor(e){this.items=[];this.state={startIndex:0,endIndex:0,totalItems:0,offsetY:0};this.renderedElements=new Map;this.scrollRAF=null;this.itemHeights=new Map;this.positionCache=[];this.totalHeight=0;this.resizeObserver=null;this.measurementRAF=null;this.pendingMeasurements=new Set;this.invalidatedKeys=new Set;this.handleScroll=()=>{this.scrollRAF===null&&(this.scrollRAF=window.requestAnimationFrame(()=>{this.updateVisibleRange(),this.scrollRAF=null}))};var t,r,a;this.container=e.container,this.items=e.items,this.estimatedHeight=(t=e.itemHeight)!=null?t:0,this.overscan=(r=e.overscan)!=null?r:5,this.renderItem=e.renderItem,this.getItemKey=(a=e.getItemKey)!=null?a:((i,s)=>String(s)),this.setupDOM(),this.attachScrollListener(),this.setupResizeObserver(),!e.itemHeight&&this.items.length>0&&this.calculateEstimatedHeight(),this.rebuildPositionCache(),this.updateVisibleRange()}setupDOM(){this.container.empty(),this.container.classList.remove("tn-static-margin-top-12px-91e0f558"),this.container.classList.add("tn-static-position-relative-d461c96d"),this.spacer=this.container.createDiv({cls:"virtual-scroller__spacer"}),this.spacer.style.cssText=`
position: absolute;
top: 0;
left: 0;
right: 0;
pointer-events: none;
`,this.updateSpacerHeight(),this.contentContainer=this.container.createDiv({cls:"virtual-scroller__content"}),this.contentContainer.style.cssText=`
position: relative;
`,this.scrollContainer=this.findScrollContainer(this.container)}calculateEstimatedHeight(){let e=Math.min(5,this.items.length),t=[],r=this.contentContainer.createDiv({cls:"virtual-scroller__sample"});r.style.cssText=`
position: absolute;
visibility: hidden;
pointer-events: none;
`;for(let a=0;a<e;a++){let i=this.renderItem(this.items[a],a);r.appendChild(i);let s=i.getBoundingClientRect().height;s>0&&t.push(s)}if(r.remove(),t.length>0){let a=t.reduce((i,s)=>i+s,0);this.estimatedHeight=Math.ceil(a/t.length)}else this.estimatedHeight=60}findScrollContainer(e){let t=e;for(;t;){let a=window.getComputedStyle(t).overflowY;if(a==="scroll"||a==="auto")return t;t=t.parentElement}return e}getContainerBottomPadding(){var a;let e=this.container.ownerDocument.defaultView,t=(a=e==null?void 0:e.getComputedStyle(this.container).paddingBottom)!=null?a:"",r=Number.parseFloat(t);return Number.isFinite(r)?r:0}updateSpacerHeight(){this.spacer.style.height=`${this.totalHeight+this.getContainerBottomPadding()}px`}binarySearchPosition(e){if(this.positionCache.length===0)return 0;let t=0,r=this.positionCache.length-1;for(;t<r;){let a=Math.floor((t+r)/2);this.positionCache[a]<e?t=a+1:r=a}return Math.max(0,t-1)}getItemHeight(e){var t;return(t=this.itemHeights.get(e))!=null?t:this.estimatedHeight}getItemPosition(e){return e<0||e>=this.positionCache.length?0:this.positionCache[e]}rebuildPositionCache(){this.positionCache=[];let e=0;for(let t=0;t<this.items.length;t++)this.positionCache[t]=e,e+=this.getItemHeight(t);this.totalHeight=e,this.updateSpacerHeight()}getItemEntries(){return this.items.map((e,t)=>({item:e,key:this.getItemKey(e,t),height:this.itemHeights.get(t)}))}hasUniqueStableKeys(e){let t=new Set;for(let r of e){if(t.has(r.key))return!1;t.add(r.key)}return!0}applyItemEntries(e){this.items=e.map(r=>r.item),this.state.totalItems=this.items.length;let t=new Map;e.forEach((r,a)=>{r.height!==void 0&&t.set(a,r.height)}),this.itemHeights=t,this.pendingMeasurements.clear(),this.rebuildPositionCache()}forceVisibleRangeUpdate(){this.state.startIndex=-1,this.state.endIndex=-1,this.updateVisibleRange()}getUniqueCurrentEntries(){let e=this.getItemEntries();return this.hasUniqueStableKeys(e)?e:null}buildEntriesAfterRemoval(e){let t=new Set(e);if(e.length===0||t.size!==e.length)return null;let r=this.getUniqueCurrentEntries();if(!r)return null;let a=new Set(r.map(o=>o.key));if(!e.every(o=>a.has(o)))return null;let i=r.filter(o=>!t.has(o.key));return i.every((o,l)=>this.getItemKey(o.item,l)===o.key)?i:null}buildEntriesAfterInsertion(e){var l;if(e.items.length===0)return null;let t=this.getUniqueCurrentEntries();if(!t)return null;let r=(l=e.position)!=null?l:"end";if(r!=="end"&&!e.targetKey)return null;let a=t.length;if(r!=="end"){let c=t.findIndex(d=>d.key===e.targetKey);if(c===-1)return null;a=r==="before"?c:c+1}let i=e.items.map((c,d)=>({item:c,key:this.getItemKey(c,a+d)})),s=[...t.slice(0,a),...i,...t.slice(a)];return this.hasUniqueStableKeys(s)&&s.every((c,d)=>this.getItemKey(c.item,d)===c.key)?s:null}setupResizeObserver(){this.resizeObserver=new ResizeObserver(e=>{for(let t of e){let r=t.target,a=parseInt(r.dataset.virtualIndex||"-1",10);a>=0&&a<this.items.length&&this.pendingMeasurements.add(a)}this.measurementRAF===null&&(this.measurementRAF=window.requestAnimationFrame(()=>{this.processPendingMeasurements(),this.measurementRAF=null}))})}processPendingMeasurements(){if(this.pendingMeasurements.size===0)return;let e=!1;for(let t of this.pendingMeasurements){let r=this.contentContainer.querySelector(`[data-virtual-index="${t}"]`);if(r){let a=r.getBoundingClientRect().height;this.itemHeights.get(t)!==a&&a>0&&(this.itemHeights.set(t,a),e=!0)}}this.pendingMeasurements.clear(),e&&this.rebuildPositionCache()}measureRenderedItems(){let e=this.contentContainer.querySelectorAll("[data-virtual-index]"),t=!1;for(let r of e){let a=parseInt(r.dataset.virtualIndex||"-1",10);if(a>=0&&a<this.items.length){let i=r.getBoundingClientRect().height;this.itemHeights.get(a)!==i&&i>0&&(this.itemHeights.set(a,i),t=!0)}}t&&this.rebuildPositionCache()}attachScrollListener(){this.scrollContainer.addEventListener("scroll",this.handleScroll)}updateVisibleRange(){var o;let e=this.scrollContainer.scrollTop,t=this.scrollContainer.clientHeight;t===0&&(t=((o=this.scrollContainer.parentElement)==null?void 0:o.clientHeight)||0),t===0&&(t=window.innerHeight,VKe.warn("[VirtualScroller] Using window height as fallback:",{category:"configuration",operation:"using-window-height-as-fallback",details:{value:t}}));let r=Math.max(0,this.binarySearchPosition(e)-this.overscan),a=r,i=e+t;for(;a<this.items.length-1&&!(this.getItemPosition(a)+this.getItemHeight(a)>i);)a++;a=Math.min(this.items.length-1,a+this.overscan);let s=this.getItemPosition(r);(r!==this.state.startIndex||a!==this.state.endIndex||this.items.length!==this.state.totalItems)&&(this.state={startIndex:r,endIndex:a,totalItems:this.items.length,offsetY:s},this.renderVisibleItems())}renderVisibleItems(){let{startIndex:e,endIndex:t,offsetY:r}=this.state,a=new Set;this.contentContainer.style.transform=`translateY(${r}px)`;let i=new Map;for(let[o,l]of this.renderedElements)l.parentElement===this.contentContainer&&i.set(o,l);let s=null;for(let o=e;o<=t;o++){let l=this.items[o],c=this.getItemKey(l,o);a.add(c);let d=this.renderedElements.get(c);d&&this.invalidatedKeys.has(c)&&(this.resizeObserver&&this.resizeObserver.unobserve(d),d.remove(),this.renderedElements.delete(c),d=void 0),d?d.dataset.virtualIndex=String(o):(d=this.renderItem(l,o),d.dataset.virtualIndex=String(o),this.renderedElements.set(c,d),this.resizeObserver&&this.resizeObserver.observe(d)),this.invalidatedKeys.delete(c),s?d.previousElementSibling!==s&&s.after(d):this.contentContainer.firstChild!==d&&this.contentContainer.prepend(d),s=d}for(let[o,l]of this.renderedElements)a.has(o)||(this.resizeObserver&&this.resizeObserver.unobserve(l),l.remove(),this.renderedElements.delete(o),this.invalidatedKeys.delete(o));window.requestAnimationFrame(()=>{this.measureRenderedItems()})}updateItems(e){let t=this.scrollContainer.scrollTop;this.items=e,this.state.totalItems=e.length;let r=this.itemHeights.size;for(let a=e.length;a<r;a++)this.itemHeights.delete(a);this.rebuildPositionCache();for(let a of this.renderedElements.values())this.resizeObserver&&this.resizeObserver.unobserve(a);this.renderedElements.clear(),this.contentContainer.empty(),this.state.startIndex=-1,this.state.endIndex=-1,this.scrollContainer.scrollTop=t,this.updateVisibleRange()}getItems(){return[...this.items]}reorderItems(e){let t=[...e.movedKeys],r=new Set(t);if(t.length===0||r.size!==t.length||r.has(e.targetKey))return!1;let a=this.getItemEntries();if(!this.hasUniqueStableKeys(a))return!1;let i=new Map(a.map(m=>[m.key,m]));if(!i.has(e.targetKey)||!t.every(m=>i.has(m)))return!1;let s=a.filter(m=>!r.has(m.key)),o=s.findIndex(m=>m.key===e.targetKey);if(o===-1)return!1;let l=[];for(let m of t){let f=i.get(m);if(!f)return!1;l.push(f)}let c=e.position==="before"?o:o+1,d=[...s.slice(0,c),...l,...s.slice(c)];if(!d.every((m,f)=>this.getItemKey(m.item,f)===m.key))return!1;let p=this.scrollContainer.scrollTop;return this.applyItemEntries(d),this.scrollContainer.scrollTop=p,this.forceVisibleRangeUpdate(),!0}canRemoveItems(e){return this.buildEntriesAfterRemoval(e)!==null}removeItems(e){let t=this.buildEntriesAfterRemoval(e);if(!t)return!1;let r=this.scrollContainer.scrollTop;for(let a of e){let i=this.renderedElements.get(a);i&&(this.resizeObserver&&this.resizeObserver.unobserve(i),i.remove(),this.renderedElements.delete(a)),this.invalidatedKeys.delete(a)}return this.applyItemEntries(t),this.scrollContainer.scrollTop=r,this.forceVisibleRangeUpdate(),!0}canInsertItems(e){return this.buildEntriesAfterInsertion(e)!==null}insertItems(e){let t=this.buildEntriesAfterInsertion(e);if(!t)return!1;let r=this.scrollContainer.scrollTop;return this.applyItemEntries(t),this.scrollContainer.scrollTop=r,this.forceVisibleRangeUpdate(),!0}invalidateItems(e,t={}){if(e.length===0)return;let r=new Set(e);if(t.invalidateHeights){for(let a of r){let i=this.renderedElements.get(a);if(!i)continue;let s=parseInt(i.dataset.virtualIndex||"-1",10);s>=0&&this.itemHeights.delete(s)}this.rebuildPositionCache()}for(let a of r)this.invalidatedKeys.add(a);this.forceVisibleRangeUpdate()}scrollToIndex(e,t="smooth"){let r=this.getItemPosition(e);this.scrollContainer.scrollTo({top:r,behavior:t})}recalculate(){this.state.startIndex=-1,this.state.endIndex=-1,this.updateSpacerHeight(),this.updateVisibleRange()}invalidateItem(e){this.invalidateItems([e],{invalidateHeights:!0})}invalidateHeights(e){for(let t of e)this.itemHeights.delete(t);this.rebuildPositionCache()}getState(){return{...this.state}}destroy(){this.scrollRAF!==null&&cancelAnimationFrame(this.scrollRAF),this.measurementRAF!==null&&cancelAnimationFrame(this.measurementRAF),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.scrollContainer.removeEventListener("scroll",this.handleScroll),this.renderedElements.clear(),this.contentContainer.empty(),this.itemHeights.clear(),this.positionCache=[],this.pendingMeasurements.clear(),this.invalidatedKeys.clear()}}});var SSe=te(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});R_.lexoHelper=void 0;R_.lexoHelper={arrayCopy:WKe};function WKe(n,e,t,r,a){let i=r,s=e+a;for(let o=e;o<s;o++)t[i]=n[o],++i}});var __=te(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});var Bq=class{constructor(e=""){this.str=e}get length(){return this.str.length}set length(e){this.str=this.str.substring(0,e)}append(e){return this.str=this.str+e,this}remove(e,t){return this.str=this.str.substr(0,e)+this.str.substr(e+t),this}insert(e,t){return this.str=this.str.substr(0,e)+t+this.str.substr(e),this}toString(){return this.str}};jq.default=Bq});var O_=te(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.LexoInteger=void 0;var F_=SSe(),qKe=__(),gm=class n{constructor(e,t,r){this.sys=e,this.sign=t,this.mag=r}static parse(e,t){let r=e,a=1;e.indexOf(t.getPositiveChar())===0?r=e.substring(1):e.indexOf(t.getNegativeChar())===0&&(r=e.substring(1),a=-1);let i=new Array(r.length),s=i.length-1;for(let o=0;s>=0;++o)i[o]=t.toDigit(r.charAt(s)),--s;return n.make(t,a,i)}static zero(e){return new n(e,0,n.ZERO_MAG)}static one(e){return n.make(e,1,n.ONE_MAG)}static make(e,t,r){let a;for(a=r.length;a>0&&r[a-1]===0;--a);if(a===0)return n.zero(e);if(a===r.length)return new n(e,t,r);let i=new Array(a).fill(0);return F_.lexoHelper.arrayCopy(r,0,i,0,a),new n(e,t,i)}static add(e,t,r){let a=Math.max(t.length,r.length),i=new Array(a).fill(0),s=0;for(let o=0;o<a;++o){let l=o<t.length?t[o]:0,c=o<r.length?r[o]:0,d=l+c+s;for(s=0;d>=e.getBase();d-=e.getBase())++s;i[o]=d}return n.extendWithCarry(i,s)}static extendWithCarry(e,t){if(t>0){let r=new Array(e.length+1).fill(0);return F_.lexoHelper.arrayCopy(e,0,r,0,e.length),r[r.length-1]=t,r}return e}static subtract(e,t,r){let a=n.complement(e,r,t.length),i=n.add(e,t,a);return i[i.length-1]=0,n.add(e,i,n.ONE_MAG)}static multiply(e,t,r){let a=new Array(t.length+r.length).fill(0);for(let i=0;i<t.length;++i)for(let s=0;s<r.length;++s){let o=i+s;for(a[o]+=t[i]*r[s];a[o]>=e.getBase();a[o]-=e.getBase())++a[o+1]}return a}static complement(e,t,r){if(r<=0)throw new Error("Expected at least 1 digit");let a=new Array(r).fill(e.getBase()-1);for(let i=0;i<t.length;++i)a[i]=e.getBase()-1-t[i];return a}static compare(e,t){if(e.length<t.length)return-1;if(e.length>t.length)return 1;for(let r=e.length-1;r>=0;--r){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0}add(e){if(this.checkSystem(e),this.isZero())return e;if(e.isZero())return this;if(this.sign!==e.sign){let r;return this.sign===-1?(r=this.negate(),r.subtract(e).negate()):(r=e.negate(),this.subtract(r))}let t=n.add(this.sys,this.mag,e.mag);return n.make(this.sys,this.sign,t)}subtract(e){if(this.checkSystem(e),this.isZero())return e.negate();if(e.isZero())return this;if(this.sign!==e.sign){let r;return this.sign===-1?(r=this.negate(),r.add(e).negate()):(r=e.negate(),this.add(r))}let t=n.compare(this.mag,e.mag);return t===0?n.zero(this.sys):t<0?n.make(this.sys,this.sign===-1?1:-1,n.subtract(this.sys,e.mag,this.mag)):n.make(this.sys,this.sign===-1?-1:1,n.subtract(this.sys,this.mag,e.mag))}multiply(e){if(this.checkSystem(e),this.isZero())return this;if(e.isZero())return e;if(this.isOneish())return this.sign===e.sign?n.make(this.sys,1,e.mag):n.make(this.sys,-1,e.mag);if(e.isOneish())return this.sign===e.sign?n.make(this.sys,1,this.mag):n.make(this.sys,-1,this.mag);let t=n.multiply(this.sys,this.mag,e.mag);return this.sign===e.sign?n.make(this.sys,1,t):n.make(this.sys,-1,t)}negate(){return this.isZero()?this:n.make(this.sys,this.sign===1?-1:1,this.mag)}shiftLeft(e=1){if(e===0)return this;if(e<0)return this.shiftRight(Math.abs(e));let t=new Array(this.mag.length+e).fill(0);return F_.lexoHelper.arrayCopy(this.mag,0,t,e,this.mag.length),n.make(this.sys,this.sign,t)}shiftRight(e=1){if(this.mag.length-e<=0)return n.zero(this.sys);let t=new Array(this.mag.length-e).fill(0);return F_.lexoHelper.arrayCopy(this.mag,e,t,0,t.length),n.make(this.sys,this.sign,t)}complement(){return this.complementDigits(this.mag.length)}complementDigits(e){return n.make(this.sys,this.sign,n.complement(this.sys,this.mag,e))}isZero(){return this.sign===0&&this.mag.length===1&&this.mag[0]===0}isOne(){return this.sign===1&&this.mag.length===1&&this.mag[0]===1}getMag(e){return this.mag[e]}compareTo(e){if(this===e)return 0;if(!e)return 1;if(this.sign===-1){if(e.sign===-1){let t=n.compare(this.mag,e.mag);return t===-1?1:t===1?-1:0}return-1}return this.sign===1?e.sign===1?n.compare(this.mag,e.mag):1:e.sign===-1?1:e.sign===1?-1:0}getSystem(){return this.sys}format(){if(this.isZero())return""+this.sys.toChar(0);let e=new qKe.default,t=this.mag,r=t.length;for(let a=0;a<r;++a){let i=t[a];e.insert(0,this.sys.toChar(i))}return this.sign===-1&&e.insert(0,this.sys.getNegativeChar()),e.toString()}equals(e){return this===e?!0:e?this.sys.getBase()===e.sys.getBase()&&this.compareTo(e)===0:!1}toString(){return this.format()}isOneish(){return this.mag.length===1&&this.mag[0]===1}checkSystem(e){if(this.sys.getBase()!==e.sys.getBase())throw new Error("Expected numbers of same numeral sys")}};L_.LexoInteger=gm;gm.ZERO_MAG=[0];gm.ONE_MAG=[1];gm.NEGATIVE_SIGN=-1;gm.ZERO_SIGN=0;gm.POSITIVE_SIGN=1});var Uq=te(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});z_.LexoDecimal=void 0;var RE=O_(),GKe=__(),$q=class n{constructor(e,t){this.mag=e,this.sig=t}static half(e){let t=e.getBase()/2|0;return n.make(RE.LexoInteger.make(e,1,[t]),1)}static parse(e,t){let r=e.indexOf(t.getRadixPointChar());if(e.lastIndexOf(t.getRadixPointChar())!==r)throw new Error("More than one "+t.getRadixPointChar());if(r<0)return n.make(RE.LexoInteger.parse(e,t),0);let a=e.substring(0,r)+e.substring(r+1);return n.make(RE.LexoInteger.parse(a,t),e.length-1-r)}static from(e){return n.make(e,0)}static make(e,t){if(e.isZero())return new n(e,0);let r=0;for(let s=0;s<t&&e.getMag(s)===0;++s)++r;let a=e.shiftRight(r),i=t-r;return new n(a,i)}getSystem(){return this.mag.getSystem()}add(e){let t=this.mag,r=this.sig,a=e.mag,i;for(i=e.sig;r<i;++r)t=t.shiftLeft();for(;r>i;)a=a.shiftLeft(),++i;return n.make(t.add(a),r)}subtract(e){let t=this.mag,r=this.sig,a=e.mag,i;for(i=e.sig;r<i;++r)t=t.shiftLeft();for(;r>i;)a=a.shiftLeft(),++i;return n.make(t.subtract(a),r)}multiply(e){return n.make(this.mag.multiply(e.mag),this.sig+e.sig)}floor(){return this.mag.shiftRight(this.sig)}ceil(){if(this.isExact())return this.mag;let e=this.floor();return e.add(RE.LexoInteger.one(e.getSystem()))}isExact(){if(this.sig===0)return!0;for(let e=0;e<this.sig;++e)if(this.mag.getMag(e)!==0)return!1;return!0}getScale(){return this.sig}setScale(e,t=!1){if(e>=this.sig)return this;e<0&&(e=0);let r=this.sig-e,a=this.mag.shiftRight(r);return t&&(a=a.add(RE.LexoInteger.one(a.getSystem()))),n.make(a,e)}compareTo(e){if(this===e)return 0;if(!e)return 1;let t=this.mag,r=e.mag;return this.sig>e.sig?r=r.shiftLeft(this.sig-e.sig):this.sig<e.sig&&(t=t.shiftLeft(e.sig-this.sig)),t.compareTo(r)}format(){let e=this.mag.format();if(this.sig===0)return e;let t=new GKe.default(e),r=t[0],a=r===this.mag.getSystem().getPositiveChar()||r===this.mag.getSystem().getNegativeChar();for(a&&t.remove(0,1);t.length<this.sig+1;)t.insert(0,this.mag.getSystem().toChar(0));return t.insert(t.length-this.sig,this.mag.getSystem().getRadixPointChar()),t.length-this.sig===0&&t.insert(0,this.mag.getSystem().toChar(0)),a&&t.insert(0,r),t.toString()}equals(e){return this===e?!0:e?this.mag.equals(e.mag)&&this.sig===e.sig:!1}toString(){return this.format()}};z_.LexoDecimal=$q});var Wq=te(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var CSe=O_(),xSe=qq(),Hq=class n{constructor(e){this.value=CSe.LexoInteger.parse(e,xSe.LexoRank.NUMERAL_SYSTEM)}static get BUCKET_0(){return this._BUCKET_0||(this._BUCKET_0=new n("0")),this._BUCKET_0}static get BUCKET_1(){return this._BUCKET_1||(this._BUCKET_1=new n("1")),this._BUCKET_1}static get BUCKET_2(){return this._BUCKET_2||(this._BUCKET_2=new n("2")),this._BUCKET_2}static get VALUES(){return this._VALUES||(this._VALUES=[n.BUCKET_0,n.BUCKET_1,n.BUCKET_2]),this._VALUES}static max(){return n.VALUES[n.VALUES.length-1]}static from(e){let t=CSe.LexoInteger.parse(e,xSe.LexoRank.NUMERAL_SYSTEM),r=n.VALUES,a=r.length;for(let i=0;i<a;++i){let s=r[i];if(s.value.equals(t))return s}throw new Error("Unknown bucket: "+e)}static resolve(e){let t=n.VALUES,r=t.length;for(let a=0;a<r;++a){let i=t[a];if(i.equals(n.from(e.toString())))return i}throw new Error("No bucket found with id "+e)}format(){return this.value.format()}next(){return this.equals(n.BUCKET_0)?n.BUCKET_1:this.equals(n.BUCKET_1)?n.BUCKET_2:this.equals(n.BUCKET_2)?n.BUCKET_0:n.BUCKET_2}prev(){return this.equals(n.BUCKET_0)?n.BUCKET_2:this.equals(n.BUCKET_1)?n.BUCKET_0:this.equals(n.BUCKET_2)?n.BUCKET_1:n.BUCKET_0}equals(e){return this===e?!0:e?this.value.equals(e.value):!1}};Vq.default=Hq});var DSe=te(ESe=>{"use strict";Object.defineProperty(ESe,"__esModule",{value:!0})});var PSe=te(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});B_.LexoNumeralSystem10=void 0;var Gq=class{getBase(){return 10}getPositiveChar(){return"+"}getNegativeChar(){return"-"}getRadixPointChar(){return"."}toDigit(e){if(e>="0"&&e<="9")return e.charCodeAt(0)-48;throw new Error("Not valid digit: "+e)}toChar(e){return String.fromCharCode(e+48)}};B_.LexoNumeralSystem10=Gq});var ASe=te(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.LexoNumeralSystem36=void 0;var Yq=class{constructor(){this.DIGITS="0123456789abcdefghijklmnopqrstuvwxyz".split("")}getBase(){return 36}getPositiveChar(){return"+"}getNegativeChar(){return"-"}getRadixPointChar(){return":"}toDigit(e){if(e>="0"&&e<="9")return e.charCodeAt(0)-48;if(e>="a"&&e<="z")return e.charCodeAt(0)-97+10;throw new Error("Not valid digit: "+e)}toChar(e){return this.DIGITS[e]}};j_.LexoNumeralSystem36=Yq});var MSe=te($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});$_.LexoNumeralSystem64=void 0;var Kq=class{constructor(){this.DIGITS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_abcdefghijklmnopqrstuvwxyz".split("")}getBase(){return 64}getPositiveChar(){return"+"}getNegativeChar(){return"-"}getRadixPointChar(){return":"}toDigit(e){if(e>="0"&&e<="9")return e.charCodeAt(0)-48;if(e>="A"&&e<="Z")return e.charCodeAt(0)-65+10;if(e==="^")return 36;if(e==="_")return 37;if(e>="a"&&e<="z")return e.charCodeAt(0)-97+38;throw new Error("Not valid digit: "+e)}toChar(e){return this.DIGITS[e]}};$_.LexoNumeralSystem64=Kq});var Zq=te(jc=>{"use strict";var YKe=jc&&jc.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var a=Object.getOwnPropertyDescriptor(e,t);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,a)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),U_=jc&&jc.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&YKe(e,n,t)};Object.defineProperty(jc,"__esModule",{value:!0});U_(DSe(),jc);U_(PSe(),jc);U_(ASe(),jc);U_(MSe(),jc)});var qq=te(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.LexoRank=void 0;var $c=Uq(),H_=Wq(),KKe=__(),ZKe=Zq(),Qq=class n{constructor(e,t){this.value=e.format()+"|"+n.formatDecimal(t),this.bucket=e,this.decimal=t}static get NUMERAL_SYSTEM(){return this._NUMERAL_SYSTEM||(this._NUMERAL_SYSTEM=new ZKe.LexoNumeralSystem36),this._NUMERAL_SYSTEM}static get ZERO_DECIMAL(){return this._ZERO_DECIMAL||(this._ZERO_DECIMAL=$c.LexoDecimal.parse("0",n.NUMERAL_SYSTEM)),this._ZERO_DECIMAL}static get ONE_DECIMAL(){return this._ONE_DECIMAL||(this._ONE_DECIMAL=$c.LexoDecimal.parse("1",n.NUMERAL_SYSTEM)),this._ONE_DECIMAL}static get EIGHT_DECIMAL(){return this._EIGHT_DECIMAL||(this._EIGHT_DECIMAL=$c.LexoDecimal.parse("8",n.NUMERAL_SYSTEM)),this._EIGHT_DECIMAL}static get MIN_DECIMAL(){return this._MIN_DECIMAL||(this._MIN_DECIMAL=n.ZERO_DECIMAL),this._MIN_DECIMAL}static get MAX_DECIMAL(){return this._MAX_DECIMAL||(this._MAX_DECIMAL=$c.LexoDecimal.parse("1000000",n.NUMERAL_SYSTEM).subtract(n.ONE_DECIMAL)),this._MAX_DECIMAL}static get MID_DECIMAL(){return this._MID_DECIMAL||(this._MID_DECIMAL=n.between(n.MIN_DECIMAL,n.MAX_DECIMAL)),this._MID_DECIMAL}static get INITIAL_MIN_DECIMAL(){return this._INITIAL_MIN_DECIMAL||(this._INITIAL_MIN_DECIMAL=$c.LexoDecimal.parse("100000",n.NUMERAL_SYSTEM)),this._INITIAL_MIN_DECIMAL}static get INITIAL_MAX_DECIMAL(){return this._INITIAL_MAX_DECIMAL||(this._INITIAL_MAX_DECIMAL=$c.LexoDecimal.parse(n.NUMERAL_SYSTEM.toChar(n.NUMERAL_SYSTEM.getBase()-2)+"00000",n.NUMERAL_SYSTEM)),this._INITIAL_MAX_DECIMAL}static min(){return n.from(H_.default.BUCKET_0,n.MIN_DECIMAL)}static middle(){let e=n.min();return e.between(n.max(e.bucket))}static max(e=H_.default.BUCKET_0){return n.from(e,n.MAX_DECIMAL)}static initial(e){return e===H_.default.BUCKET_0?n.from(e,n.INITIAL_MIN_DECIMAL):n.from(e,n.INITIAL_MAX_DECIMAL)}static between(e,t){if(e.getSystem().getBase()!==t.getSystem().getBase())throw new Error("Expected same system");let r=e,a=t,i;if(e.getScale()<t.getScale()){if(i=t.setScale(e.getScale(),!1),e.compareTo(i)>=0)return n.mid(e,t);a=i}if(e.getScale()>a.getScale()){if(i=e.setScale(a.getScale(),!0),i.compareTo(a)>=0)return n.mid(e,t);r=i}let s;for(let c=r.getScale();c>0;a=s){let d=c-1,u=r.setScale(d,!0);if(s=a.setScale(d,!1),u.compareTo(s)===0)return n.checkMid(e,t,u);if(u.compareTo(s)>0)break;c=d,r=u}let o=n.middleInternal(e,t,r,a),l;for(let c=o.getScale();c>0;c=l){l=c-1;let d=o.setScale(l);if(e.compareTo(d)>=0||d.compareTo(t)>=0)break;o=d}return o}static parse(e){let t=e.split("|"),r=H_.default.from(t[0]),a=$c.LexoDecimal.parse(t[1],n.NUMERAL_SYSTEM);return new n(r,a)}static from(e,t){if(t.getSystem().getBase()!==n.NUMERAL_SYSTEM.getBase())throw new Error("Expected different system");return new n(e,t)}static middleInternal(e,t,r,a){let i=n.mid(r,a);return n.checkMid(e,t,i)}static checkMid(e,t,r){return e.compareTo(r)>=0||r.compareTo(t)>=0?n.mid(e,t):r}static mid(e,t){let a=e.add(t).multiply($c.LexoDecimal.half(e.getSystem())),i=e.getScale()>t.getScale()?e.getScale():t.getScale();if(a.getScale()>i){let s=a.setScale(i,!1);if(s.compareTo(e)>0)return s;let o=a.setScale(i,!0);if(o.compareTo(t)<0)return o}return a}static formatDecimal(e){let t=e.format(),r=new KKe.default(t),a=t.indexOf(n.NUMERAL_SYSTEM.getRadixPointChar()),i=n.NUMERAL_SYSTEM.toChar(0);for(a<0&&(a=t.length,r.append(n.NUMERAL_SYSTEM.getRadixPointChar()));a<6;)r.insert(0,i),++a;for(;r[r.length-1]===i;)r.length=r.length-1;return r.toString()}genPrev(){if(this.isMax())return new n(this.bucket,n.INITIAL_MAX_DECIMAL);let e=this.decimal.floor(),r=$c.LexoDecimal.from(e).subtract(n.EIGHT_DECIMAL);return r.compareTo(n.MIN_DECIMAL)<=0&&(r=n.between(n.MIN_DECIMAL,this.decimal)),new n(this.bucket,r)}genNext(){if(this.isMin())return new n(this.bucket,n.INITIAL_MIN_DECIMAL);let e=this.decimal.ceil(),r=$c.LexoDecimal.from(e).add(n.EIGHT_DECIMAL);return r.compareTo(n.MAX_DECIMAL)>=0&&(r=n.between(this.decimal,n.MAX_DECIMAL)),new n(this.bucket,r)}between(e){if(!this.bucket.equals(e.bucket))throw new Error("Between works only within the same bucket");let t=this.decimal.compareTo(e.decimal);if(t>0)return new n(this.bucket,n.between(e.decimal,this.decimal));if(t===0)throw new Error("Try to rank between issues with same rank this="+this+" other="+e+" this.decimal="+this.decimal+" other.decimal="+e.decimal);return new n(this.bucket,n.between(this.decimal,e.decimal))}getBucket(){return this.bucket}getDecimal(){return this.decimal}inNextBucket(){return n.from(this.bucket.next(),this.decimal)}inPrevBucket(){return n.from(this.bucket.prev(),this.decimal)}isMin(){return this.decimal.equals(n.MIN_DECIMAL)}isMax(){return this.decimal.equals(n.MAX_DECIMAL)}format(){return this.value}equals(e){return this===e?!0:e?this.value===e.value:!1}toString(){return this.value}compareTo(e){return this===e?0:e?this.value.localeCompare(e.value):1}};V_.LexoRank=Qq});var ISe=te(Uc=>{"use strict";var QKe=Uc&&Uc.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var a=Object.getOwnPropertyDescriptor(e,t);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,a)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),W_=Uc&&Uc.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&QKe(e,n,t)};Object.defineProperty(Uc,"__esModule",{value:!0});W_(qq(),Uc);W_(Wq(),Uc);W_(Uq(),Uc);W_(O_(),Uc)});var RSe=te(ym=>{"use strict";var JKe=ym&&ym.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var a=Object.getOwnPropertyDescriptor(e,t);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,a)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),NSe=ym&&ym.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&JKe(e,n,t)};Object.defineProperty(ym,"__esModule",{value:!0});NSe(ISe(),ym);NSe(Zq(),ym)});function GSe(n){let e=Math.max(0,Math.min(Xk,Math.floor(n))),t=Array(Jq);for(let r=Jq-1;r>=0;r--)t[r]=String.fromCharCode(97+e%Y_),e=Math.floor(e/Y_);return`${qSe}${t.join("")}`}function Z_(n){if(!t7e.test(n))return null;let e=0;for(let t of n.slice(qSe.length))e=e*Y_+(t.charCodeAt(0)-97);return e}function r7e(n,e,t){let r=Math.max(1,Math.floor(Xk/(e+1))),a=t==="asc"?n+1:e-n;return GSe(r*a)}function Io(n,e){let t=e7e.compare(n,e);return t!==0?t:n.localeCompare(e)}function _Se(n,e,t){return t==="asc"?Io(n,e):Io(e,n)}function q_(n,e,t,r){return!(e&&_Se(e,n,r)>=0||t&&_Se(n,t,r)>=0)}function K_(n){return VSe.LexoRank.parse(n)}function FSe(){return new eT(Math.floor(Xk/2))}function Ya(n){let e=n.split("."),t=0;for(;t<e.length-1&&["note","file","formula","task"].includes(e[t]);)t++;return t>0?e.slice(t).join("."):n}function _E(n,e){try{let t=n.getSortConfig();return t?(Array.isArray(t)?t:[t]).some(a=>{if(!a||typeof a!="object")return!1;let i=a.property||a.column||a.field||a.id||a.name||"";return Y(i).replace(/^(note\.|file\.|task\.)/,"")===e}):!1}catch(t){return!1}}function vu(n){if(typeof n!="string"||n.length===0)return null;let e=Z_(n);if(e!==null)return new eT(e);try{return K_(n)}catch(t){return null}}function n7e(n){return vu(n.sortOrder)!==null}function G_(n){return n?n.isMax()||n.toString().length>XKe:!1}function LSe(n){return n==null||n===""?"None":typeof n=="string"?n:typeof n=="boolean"?n?"True":"False":typeof n=="number"?String(n):Y(n)||"None"}function a7e(n){return n==null||n===""?["None"]:Array.isArray(n)?n.length>0?n.map(e=>LSe(e)):["None"]:[LSe(n)]}function OSe(n,e){return e===null?!0:a7e(n).includes(e)}function i7e(n){let e=new Map;return n&&n.forEach((t,r)=>{e.set(t,r)}),e}function s7e(n,e,t){if(!e||e.length===0)return n.filter(i=>i.path!==t);let r=new Map(n.map(i=>[i.path,i])),a=e.filter(i=>i!==t).map(i=>r.get(i)).filter(i=>!!i);return a.length>0?a:n.filter(i=>i.path!==t)}function o7e(n){for(let e=1;e<n.length;e++){let t=vu(n[e-1].sortOrder),r=vu(n[e].sortOrder);if(!t||!r)continue;let a=Io(t.toString(),r.toString());if(a<0)return"asc";if(a>0)return"desc"}return"asc"}function zSe(n,e,t){return t==="asc"?Io(n.toString(),e.toString()):Io(e.toString(),n.toString())}function BSe(n,e){return e==="asc"?e4(n):Xq(n)}function jSe(n,e){return e==="asc"?Xq(n):e4(n)}function $Se(n,e,t){return t==="asc"?USe(n,e):USe(e,n)}function Xq(n){let e=n.toString();try{let c=n.genNext();if(c.toString()>e)return c}catch(c){}if(Z_(e)!==null)return new eT(Xk);let r=e.indexOf("|"),a=e.indexOf(":"),i=e.substring(0,r),s=e.substring(r+1,a),o=e.substring(a+1),l=s.charAt(0);if(l!=="z"){let c=l>="0"&&l<="8"?String.fromCharCode(l.charCodeAt(0)+1):l==="9"?"a":l>="a"&&l<="y"?String.fromCharCode(l.charCodeAt(0)+1):"z",d=`${i}|${c}${s.slice(1)}:`,u=n.between(K_(d));if(u.toString()>e)return u}return K_(`${i}|${s}:${o}i`)}function e4(n){let e=n.toString();try{let c=n.genPrev();if(c.toString()<e)return c}catch(c){}if(Z_(e)!==null)return new eT(0);let r=e.indexOf("|"),a=e.indexOf(":"),i=e.substring(0,r),s=e.substring(r+1,a),o=s.charAt(0),l;if(o==="0")l=`${i}|0:`;else{let c=o>="1"&&o<="9"?String.fromCharCode(o.charCodeAt(0)-1):o==="a"?"9":o>="b"&&o<="z"?String.fromCharCode(o.charCodeAt(0)-1):"0";l=`${i}|${c}${s.slice(1)}:`}return K_(l).between(n)}function USe(n,e){let t=n.toString(),r=e.toString();try{let s=n.between(e).toString();if(Io(s,t)>0&&Io(s,r)<0)return s}catch(s){}let a=Xq(n).toString();if(Io(a,t)>0&&Io(a,r)<0)return a;let i=e4(e).toString();return Io(i,t)>0&&Io(i,r)<0?i:a}function ng(n,e,t,r){let a=t?e:e+1,i=n.map(l=>l.path);i.splice(a,0,null);let s=[],o=null;for(let l=0;l<i.length;l++){let c=r7e(l,i.length,r),d=i[l];d===null?o=c:s.push({path:d,sortOrder:c})}return{sortOrder:o,additionalWrites:s,reason:"rebalance"}}function l7e(n,e,t,r={}){var c,d,u;let a=t.settings.fieldMapping.sortOrder,i=i7e(r.visibleTaskPaths),s=r.candidateTaskPaths?new Set(r.candidateTaskPaths):null,o=t.app.vault.getMarkdownFiles(),l=[];for(let p of o){if(s&&!s.has(p.path))continue;let m=(c=t.app.metadataCache.getFileCache(p))==null?void 0:c.frontmatter;if(!m||n!==null&&e&&!OSe(m[e],n)||(d=r.scopeFilters)!=null&&d.some(v=>!OSe(m[v.property],v.value)))continue;let f=m[a],h=f!==void 0?String(f):void 0,g=(u=r.taskInfoCache)==null?void 0:u.get(p.path);if(g){g.sortOrder=h,l.push(g);continue}l.push({path:p.path,title:p.basename,status:m.status||"open",priority:m.priority||"",archived:m.archived||!1,sortOrder:h})}return l.sort((p,m)=>{let f=vu(p.sortOrder),h=vu(m.sortOrder);if(f&&h){let k=Io(f.toString(),h.toString());if(k!==0)return k}if(f&&!h)return-1;if(!f&&h)return 1;let g=i.get(p.path),v=i.get(m.path);return g!==void 0&&v!==void 0?g-v:g!==void 0?-1:v!==void 0?1:p.path.localeCompare(m.path)}),l}async function HSe(n,e,t){let r=t.app.vault.getAbstractFileByPath(n);if(!(r instanceof WSe.TFile))return;let a=t.settings.fieldMapping.sortOrder;await yr(t.app,r,i=>{i[a]=e})}async function Q_(n,e,t,r,a,i,s={}){var b;let o=l7e(t,r,i,s).filter(w=>w.path!==a),l=s7e(o,s.visibleTaskPaths,a),c=o7e(l);if(o.length===0)return{sortOrder:FSe().toString(),additionalWrites:[],reason:"boundary"};let d=l.findIndex(w=>w.path===n);if(d===-1){let w=[...l].reverse().find(C=>n7e(C)),S=w?vu(w.sortOrder):null;if(S&&!G_(S)){let C=jSe(S,c).toString();if(q_(C,S.toString(),null,c))return{sortOrder:C,additionalWrites:[],reason:"boundary"}}return l.length>0?ng(l,l.length-1,!1,c):{sortOrder:FSe().toString(),additionalWrites:[],reason:"boundary"}}let u=l[d],p=d>0?l[d-1]:null,m=d<l.length-1?l[d+1]:null,f=vu(u.sortOrder),h=p?vu(p.sortOrder):null,g=m?vu(m.sortOrder):null;if(!f)return ng(l,d,e,c);let v=h?zSe(h,f,c)>=0:!1,k=g?zSe(f,g,c)>=0:!1;if(e&&v||!e&&k||G_(h)||G_(f)||G_(g))return ng(l,d,e,c);if(e){let w=d===0?BSe(f,c).toString():h?$Se(h,f,c):BSe(f,c).toString();return q_(w,(b=h==null?void 0:h.toString())!=null?b:null,f.toString(),c)?{sortOrder:w,additionalWrites:[],reason:d===0?"boundary":"midpoint"}:ng(l,d,e,c)}if(!m||!g){let w=jSe(f,c).toString();return q_(w,f.toString(),null,c)?{sortOrder:w,additionalWrites:[],reason:"boundary"}:ng(l,d,e,c)}let T=$Se(f,g,c);return q_(T,f.toString(),g.toString(),c)?{sortOrder:T,additionalWrites:[],reason:"midpoint"}:ng(l,d,e,c)}async function J_(n,e,t,r={}){if(e.sortOrder){for(let a of e.additionalWrites)await HSe(a.path,a.sortOrder,t);r.includeDragged!==!1&&await HSe(n,e.sortOrder,t)}}var VSe,WSe,XKe,e7e,qSe,Jq,Y_,Xk,t7e,eT,tT,FE=y(()=>{VSe=tt(RSe()),WSe=require("obsidian");dr();ya();XKe=32,e7e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),qSe="tn",Jq=10,Y_=26,Xk=Math.pow(Y_,Jq)-1,t7e=/^tn[a-z]{10}$/,eT=class n{constructor(e){this.value=e}toString(){return GSe(this.value)}genPrev(){if(this.value<=0)throw new Error("Cannot generate rank before minimum alpha rank");return new n(this.value-1)}genNext(){if(this.value>=Xk)throw new Error("Cannot generate rank after maximum alpha rank");return new n(this.value+1)}between(e){let t=Z_(e.toString());if(t===null)throw new Error("Cannot generate alpha midpoint against a non-alpha rank");let r=Math.min(this.value,t),a=Math.max(this.value,t),i=Math.floor((r+a)/2);if(i<=r||i>=a)throw new Error("No alpha rank gap available");return new n(i)}isMax(){return this.value>=Xk}};tT=class{constructor(){this.queues=new Map}async enqueue(e,t){var i;let a=((i=this.queues.get(e))!=null?i:Promise.resolve()).then(t,t);this.queues.set(e,a);try{await a}finally{this.queues.get(e)===a&&this.queues.delete(e)}}}});function vm(n){n.classList.remove(...c7e),n.removeAttribute("style")}var c7e,X_=y(()=>{c7e=["tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-center-7c619740","tn-static-align-items-flex-start-0486f781","tn-static-background-color-var-background-mo-94b219f0","tn-static-background-color-var-background-se-9087a23e","tn-static-background-color-var-color-base-40-ef5f175e","tn-static-background-color-var-color-red-134bc721","tn-static-background-color-var-text-accent-a954c70f","tn-static-border-1px-solid-var-background-mo-b65b5121","tn-static-border-none-2eda1daa","tn-static-border-radius-4px-c290c56e","tn-static-border-radius-6px-0dc8408c","tn-static-border-style-dashed-12296c91","tn-static-border-style-solid-11080b69","tn-static-border-top-1px-solid-var-backgroun-aab7c2ca","tn-static-border-width-2px-a1222254","tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-grab-dad79857","tn-static-cursor-pointer-2723efcc","tn-static-cursor-pointer-3b6a3a65","tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-flex-1-14e3b769","tn-static-flex-1-97445a8d","tn-static-flex-direction-column-06c8b5ed","tn-static-flex-shrink-0-6ee0661e","tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-0-9em-65025e95","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-font-size-var-tn-font-size-sm-0274a31d","tn-static-font-weight-500-02a2d333","tn-static-font-weight-600-eed0f8fb","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-flex-end-455f8cca","tn-static-justify-content-space-between-a562f4fd","tn-static-margin-0-11696618","tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-20px-49f14f8f","tn-static-margin-bottom-8px-fdf33f23","tn-static-margin-left-4px-46cec891","tn-static-margin-right-4px-c6b76b85","tn-static-margin-right-8px-539fa9a0","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68","tn-static-max-height-400px-f0787633","tn-static-max-width-900px-1d34c094","tn-static-min-height-800px-997b4c8c","tn-static-min-width-0-3922d326","tn-static-min-width-2px-709d7da0","tn-static-opacity-0-6-d95b59ac","tn-static-opacity-0-8d919cb5","tn-static-opacity-1-c6e7979d","tn-static-overflow-hidden-69824400","tn-static-overflow-y-auto-03df744e","tn-static-overflow-y-clip-c5043043","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c","tn-static-padding-top-20px-49826953","tn-static-position-relative-d461c96d","tn-static-text-align-center-91a87015","tn-static-text-decoration-line-through-7059a4e5","tn-static-text-decoration-none-80d654f9","tn-static-transform-translatey-0-1b976432","tn-static-transform-translatey-10px-5b91bf02","tn-static-transition-background-color-0-2s-8142f01e","tn-static-vertical-align-baseline-657d9c46","tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"]});function eF(n){return typeof n=="object"&&n!==null}function tF(n,e){let t=t4(n,e);return typeof t=="string"&&d7e.has(t)}function t4(n,e){var i,s;let t=n.metadataTypeManager,r=(i=t==null?void 0:t.properties)==null?void 0:i[e.toLowerCase()],a=(s=r==null?void 0:r.type)!=null?s:r==null?void 0:r.widget;return typeof a=="string"?a:null}function u7e(n){if(!(!eF(n)||!eF(n.ctx)||!eF(n.ctx.formulas)))return n.ctx.formulas}function YSe(n){return eF(n.basesData)?n.basesData:void 0}function p7e(n){return typeof(n==null?void 0:n.getValue)=="function"}function m7e(n,e,t){let r=e.frontmatter;if(r&&Object.keys(t).length>0){e.frontmatter={...r,...t};try{return n.getValue(e)}finally{e.frontmatter=r}}return n.getValue(e)}function f7e(n,e){var r,a;let t=(a=(r=YSe(e))==null?void 0:r.formulaResults)==null?void 0:a.cachedFormulaOutputs;if(!(!t||typeof t!="object"))for(let[i,s]of Object.entries(t))n[`formula.${i}`]=s}function h7e(n){var e,t,r;return(e=n.formulaResults)!=null||(n.formulaResults={}),(r=(t=n.formulaResults).cachedFormulaOutputs)!=null||(t.cachedFormulaOutputs={}),n.formulaResults.cachedFormulaOutputs}function rF(n){let e=new Map;for(let t of n){if(!t.path)continue;let r={...t.properties||{}};f7e(r,t),e.set(t.path,r)}return e}function KSe(n,e,t){if(t.startsWith("formula."))for(let r of n){if(!r.path||!r.data||typeof r.data!="object")continue;let a=r.data.getValue;if(typeof a=="function")try{let i=a.call(r.data,t),s=e.get(r.path);s&&(s[t]=rg(i))}catch(i){}}}function LE(n,e){let t=u7e(n);if(!(!t||e.length===0))for(let r of e){let a=YSe(r);if(!a)continue;let i=h7e(a);for(let s of Object.keys(t)){let o=t[s];if(p7e(o))try{let l=r.properties||{},c=m7e(o,a,l);c!==void 0&&(i[s]=c)}catch(l){}}}}var d7e,OE=y(()=>{Aq();d7e=new Set(["multitext","tags","aliases"])});function v7e(n,e){var i;let t=n==null?void 0:n.find(s=>s.key===e);if(t)return t.type;let r=e.toLowerCase(),a=n==null?void 0:n.find(s=>s.key.toLowerCase()===r);return(i=a==null?void 0:a.type)!=null?i:null}function k7e(n,e,t){var r;return(r=v7e(t,e))!=null?r:t4(n,e)}function T7e(n,e){if(!e)return n;let t=e.toLowerCase(),r=n.trim();if(t==="number"&&y7e.test(r)){let a=Number(r);return Number.isFinite(a)?a:n}if(g7e.has(t)){if(r.toLowerCase()==="true")return!0;if(r.toLowerCase()==="false")return!1}return n}function nF(n,e,t,r){let a=k7e(n,e,r);return T7e(t,a)}var g7e,y7e,r4=y(()=>{OE();g7e=new Set(["boolean","checkbox"]),y7e=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i});function ZSe(n){if(n.length===0)return[];let e=[];for(let t of n){let r=e[e.length-1];if(!r||r.groupKey!==t.groupKey){e.push({groupKey:t.groupKey,cards:[t]});continue}r.cards.push(t)}return e}function QSe(n,e,t){let r=n[e];if(!r||r.cards.length===0)return null;let a=Math.max(0,Math.min(t,r.cards.length));return a===0?{taskPath:r.cards[0].path,above:!0}:{taskPath:r.cards[a-1].path,above:!1}}function JSe(n,e){if(n.length===0)return null;let t=n.length-1;for(let s=0;s<n.length;s++){let o=n[s],l=s>0?n[s-1]:null,c=s<n.length-1?n[s+1]:null,d=o.cards[0],u=o.cards[o.cards.length-1],p=l?(l.cards[l.cards.length-1].bottom+d.top)/2:Number.NEGATIVE_INFINITY,m=c?(u.bottom+c.cards[0].top)/2:Number.POSITIVE_INFINITY;if((e<m||s===n.length-1)&&(e>=p||s===0)){t=s;break}}let r=n[t],a=r.cards,i=a.findIndex(s=>e<s.midpoint);if(i===-1){let s=a[a.length-1];return{groupKey:r.groupKey,segmentIndex:t,insertionIndex:a.length,element:s.card,position:"after"}}return{groupKey:r.groupKey,segmentIndex:t,insertionIndex:i,element:a[i].card,position:"before"}}var XSe=y(()=>{});function zE(n){return rF(n)}function b7e(n,e){var r,a;if(!e)return null;if(e.startsWith("formula."))return(r=n[e])!=null?r:null;let t=e.replace(/^(note\.|task\.|file\.)/,"");return(a=n[t])!=null?a:null}function n4(n){var e,t;if(n==null)return"None";if(typeof n=="object"&&n!==null&&typeof n.toString=="function"){let r=n;if(((e=r.constructor)==null?void 0:e.name)==="NullValue"||r.isTruthy&&!r.isTruthy())return"None";if(((t=r.constructor)==null?void 0:t.name)==="ListValue"||Array.isArray(r.value)){let a=r.value||[];return a.length>0?a.map(i=>n4(i)).join(", "):"None"}return r.toString()||"None"}return typeof n=="string"?n||"None":typeof n=="number"?String(n):typeof n=="boolean"?n?"True":"False":Array.isArray(n)?n.length>0?n.map(r=>n4(r)).join(", "):"None":Y(n)||"None"}function rT(n,e,t){let r=new Map;for(let a of n){let i=t.get(a.path)||{},s=b7e(i,e),o=n4(s),l=r.get(o)||[];l.push(a),r.set(o,l)}return r}function eCe(n,e,t){let r=new Set(e.map(i=>i.path)),a=new Map;for(let i of n){let s=t(i.key),o=i.entries.map(l=>{var c;return(c=l.file)==null?void 0:c.path}).filter(l=>!!l&&r.has(l));a.set(s,o)}return a}function tCe(n){let e=new Map;for(let[t,r]of n)e.set(t,r.map(a=>a.path));return e}function a4(n){let e=[];for(let t of n.groups){let r=n.convertGroupKeyToString(t.key),a=new Set(t.entries.map(o=>{var l;return(l=o.file)==null?void 0:l.path})),i=n.taskNotes.filter(o=>a.has(o.path));if(i.length===0)continue;let s=n.collapsedGroups.has(r);if(e.push({type:"primary-header",groupKey:r,groupTitle:r,taskCount:i.length,groupEntries:t.entries,isCollapsed:s}),!s){if(n.subGroupPropertyId){let o=rT(i,n.subGroupPropertyId,n.pathToProps);for(let[l,c]of o){if(c.length===0)continue;let d=`${r}:${l}`,u=n.collapsedSubGroups.has(d);if(e.push({type:"sub-header",groupKey:r,subGroupKey:l,subGroupTitle:l,taskCount:c.length,isCollapsed:u,parentKey:r}),!u)for(let p of c)e.push({type:"task",task:p,groupKey:r,subGroupKey:l})}continue}for(let o of i)e.push({type:"task",task:o,groupKey:r})}}return e}function i4(n,e){let t=[];for(let[r,a]of n){if(a.length===0)continue;let i=e.has(r);if(t.push({type:"primary-header",groupKey:r,groupTitle:r,taskCount:a.length,groupEntries:[],isCollapsed:i}),!i)for(let s of a)t.push({type:"task",task:s,groupKey:r})}return t}var rCe=y(()=>{dr();OE()});function nCe({groupByPropertyId:n,sourceGroupKey:e,targetGroupKey:t,lookupMappingKey:r,isListTypeProperty:a}){let i=n?Ya(n):null,s=!!(n!=null&&n.startsWith("formula.")),o=t==="None"?null:t,l=!!n&&o!==e,c=i?r(i):null,d=!!i&&a(i),u=n?n.replace(/^(note\.|file\.|task\.)/,""):null;return{groupByPropertyId:n,cleanGroupBy:i,frontmatterKey:u,groupByTaskProp:c,isFormulaGrouping:s,isListGrouping:d,needsGroupUpdate:l,normalizedTargetGroupKey:o,sourceGroupKey:e}}function aCe({frontmatter:n,plan:e,sortOrderField:t,sortOrder:r,isRecurring:a,dateModifiedField:i,coerceGroupKeyForFrontmatter:s,updateCompletedDateInFrontmatter:o,getTimestamp:l}){if(e.needsGroupUpdate&&e.frontmatterKey){if(e.isListGrouping){let c=n[e.frontmatterKey],u=(Array.isArray(c)?c:c?[c]:[]).filter(p=>p!==e.sourceGroupKey);e.normalizedTargetGroupKey!==null&&!u.includes(e.normalizedTargetGroupKey)&&u.push(e.normalizedTargetGroupKey),u.length>0?n[e.frontmatterKey]=u:delete n[e.frontmatterKey]}else e.normalizedTargetGroupKey===null?delete n[e.frontmatterKey]:n[e.frontmatterKey]=s(e.frontmatterKey,e.normalizedTargetGroupKey);e.groupByTaskProp==="status"&&e.normalizedTargetGroupKey!==null&&(o(n,e.normalizedTargetGroupKey,a),n[i]=l())}r!==null&&(n[t]=r)}function iCe(n,{plan:e,isCompletedStatus:t,getTimestamp:r,getCompletedDate:a}){if(!e.needsGroupUpdate||!e.groupByTaskProp)return null;let i={...n},s=n,o=i,l=e.groupByTaskProp;if(e.isListGrouping){let c=s[l],u=(Array.isArray(c)?[...c]:c?[Y(c)]:[]).filter(p=>p!==e.sourceGroupKey);e.normalizedTargetGroupKey!==null&&!u.includes(e.normalizedTargetGroupKey)&&u.push(e.normalizedTargetGroupKey),o[l]=u}else o[l]=e.normalizedTargetGroupKey;return i.dateModified=r(),l==="status"&&!n.recurrence&&(e.normalizedTargetGroupKey!==null&&t(e.normalizedTargetGroupKey)?i.completedDate=a():i.completedDate=void 0),i}var sCe=y(()=>{dr();FE()});function BE(n,e){let t=new Map;e.sortOrder&&t.set(n,e.sortOrder);for(let r of e.additionalWrites)t.set(r.path,r.sortOrder);return t}function jE(n,e,t){for(let[r,a]of e){let i=n.get(r);i&&(i.sortOrder=a,t==null||t(i))}}function $E(n,e,t,r){for(let a of n){let i=e(a);if(!i)continue;let s=t.get(i.path);s!==void 0&&(i.sortOrder=s,r==null||r(i))}}function UE(n,e,t,r){if(e.length===0||e.includes(t))return null;let a=new Set(n),i=new Set(e);if(!e.every(c=>a.has(c)))return null;let s=n.filter(c=>!i.has(c)),o=s.indexOf(t);if(o===-1)return null;let l=r?o:o+1;return[...s.slice(0,l),...e,...s.slice(l)]}function oCe(n,e,t,r,a){if(t.length===0||t.includes(r))return null;let i=new Set(t),s=new Map,o=[];for(let u of n){let p=e(u);p&&i.has(p)?s.set(p,u):o.push(u)}if(!t.every(u=>s.has(u)))return null;let l=o.findIndex(u=>e(u)===r);if(l===-1)return null;let c=[];for(let u of t){let p=s.get(u);if(!p)return null;c.push(p)}let d=a?l:l+1;return[...o.slice(0,d),...c,...o.slice(d)]}var s4=y(()=>{});function cCe(n){return typeof n=="object"&&n!==null}function w7e(n){return cCe(n)}function lCe(n){if(typeof n=="number")return n===1?"show-all":"inherit";let e=Y(n).trim().toLowerCase().replace(/^['"]|['"]$/g,"").replace(/[_\s]+/g,"-");return e==="show-all"||e==="1"?"show-all":"inherit"}function dCe(n){return function(e,t){if(!t)throw Fs.error("[TaskNotes][TaskListView] No containerEl provided",{category:"stale-data",operation:"no-containerel-provided"}),new Error("TaskListView requires a containerEl");return new o4(e,t,n)}}var Qn,Fs,o4,uCe=y(()=>{Qn=require("obsidian");IE();ME();Ua();D$();Oq();Uy();fC();Qy();Fi();Jy();xe();dr();zq();FE();X_();Li();OE();r4();XSe();rCe();sCe();s4();q();ya();Fs=M({tag:"Bases/TaskListView"});o4=class extends Bc{constructor(t,r,a){super(t,r,a);this.type="tasknotesTaskList";this.configLoaded=!1;this.itemsContainer=null;this.currentTaskElements=new Map;this.lastRenderWasGrouped=!1;this.lastFlatPaths=[];this.lastVirtualItems=[];this.lastTaskSignatures=new Map;this.lastCardRenderSignature="";this.taskInfoCache=new Map;this.clickTimeouts=new Map;this.currentTargetDate=Br(new Date);this.containerListenersRegistered=!1;this.virtualScroller=null;this.useVirtualScrolling=!1;this.collapsedGroups=new Set;this.collapsedSubGroups=new Set;this.subGroupPropertyId=null;this.defaultCollapsedState="Expanded";this.expandedRelationshipFilterMode="inherit";this.currentVisibleTaskPaths=new Set;this.currentVisibleTaskOrder=new Map;this.expandedRelationshipTaskPaths=new Set;this.expandedRelationshipTaskOrder=new Map;this.hideTopLevelSubtasks=!1;this.currentPrimaryGroupKeys=[];this.currentSubGroupKeysByParent=new Map;this.initializedPrimaryGroupKeys=new Set;this.initializedSubGroupKeys=new Set;this.deferCollapseDefaultForNextSnapshot=!1;this.draggedTaskPath=null;this.dragGroupKey=null;this.currentInsertionGroupKey=null;this.currentInsertionSegmentIndex=-1;this.currentInsertionIndex=-1;this.pendingDragClientY=null;this.pendingRender=!1;this.taskGroupKeys=new Map;this.sortScopeTaskPaths=new Map;this.sortScopeCandidateTaskPaths=new Map;this.dragOverRafId=0;this.dragContainer=null;this.currentDropSlotElement=null;this.currentDropSlotPosition=null;this.dragBaselineCards=[];this.dropQueue=new tT;this.VIRTUAL_SCROLL_THRESHOLD=100;this.LARGE_REORDER_WARNING_THRESHOLD=10;this.UNGROUPED_SORT_SCOPE_KEY="__ungrouped__";this.CARD_NO_DRAG_SELECTOR='[data-tn-no-drag="true"], a, button, input, select, textarea, [contenteditable="true"]';this.CARD_DRAG_HANDLE_SELECTOR='[data-tn-drag-handle="true"]';this.handleItemClick=async t=>{let r=t.target,a=r.closest(".task-group-header");if(a){let i=a.closest(".task-group"),s=i==null?void 0:i.dataset.groupKey;if(s){if(r.closest("a"))return;t.preventDefault(),t.stopPropagation(),await this.handleGroupToggle(s);return}}};this.handleItemContextMenu=async t=>{let r=this.getTaskContextFromEvent(t);if(!r)return;t.preventDefault(),t.stopPropagation();let a=this.plugin.taskSelectionService;if(a&&a.getSelectionCount()>1){a.isSelected(r.task.path)||a.addToSelection(r.task.path),this.showBatchContextMenu(t);return}await uo(t,r.task.path,this.plugin,this.currentTargetDate)};this.handleItemPointerOver=t=>{if("pointerType"in t&&t.pointerType!=="mouse")return;let r=this.getTaskContextFromEvent(t);if(!r)return;let a=t.relatedTarget;if(a&&r.card.contains(a))return;let i=this.app||this.plugin.app;i.vault.getAbstractFileByPath(r.task.path)&&i.workspace.trigger("hover-link",{event:t,source:"tasknotes-task-card",hoverParent:r.card,targetEl:r.card,linktext:r.task.path,sourcePath:r.task.path})};this.basesController=t,this.dataAdapter.basesView=this}onload(){this.readViewOptions(),super.onload(),this.registerGroupContextMenuListeners()}registerGroupContextMenuListeners(){this.rootElement&&this.rootElement.addEventListener("contextmenu",t=>{let r=t.target,a=r.closest(".task-group-header");if(a){let s=a.closest(".task-group"),o=s==null?void 0:s.dataset.groupKey;if(o&&!this.isSubGroupKey(o)){t.preventDefault(),this.showGroupHeaderContextMenu(t,o);return}}!r.closest(".task-card")&&!a&&this.currentPrimaryGroupKeys.length>0&&(t.preventDefault(),this.showContainerContextMenu(t))})}showGroupHeaderContextMenu(t,r){let a=this.currentSubGroupKeysByParent.get(r);if(!a||a.length===0)return;let i=a.every(o=>this.collapsedSubGroups.has(o)),s=new Qn.Menu;s.addItem(o=>{o.setTitle(i?"Expand subgroups":"Collapse subgroups").setIcon(i?"list-tree":"list-collapse").onClick(()=>void this.setSubGroupsCollapsed(r,!i))}),s.showAtMouseEvent(t)}showContainerContextMenu(t){let r=new Qn.Menu;r.addItem(a=>{a.setTitle("Expand all groups").setIcon("chevrons-down").onClick(()=>void this.setAllPrimaryGroupsCollapsed(!1))}),r.addItem(a=>{a.setTitle("Collapse all groups").setIcon("chevrons-up").onClick(()=>void this.setAllPrimaryGroupsCollapsed(!0))}),r.addItem(a=>{a.setTitle("Expand all groups and subgroups").setIcon("list-tree").onClick(()=>void this.setAllGroupsAndSubGroupsCollapsed(!1))}),r.addItem(a=>{a.setTitle("Collapse all groups and subgroups").setIcon("list-collapse").onClick(()=>void this.setAllGroupsAndSubGroupsCollapsed(!0))}),r.showAtMouseEvent(t)}readViewOptions(){if(!this.config||typeof this.config.get!="function"){Fs.debug("[TaskListView] Config not available yet in readViewOptions",{category:"configuration",operation:"config-not-yet-readviewoptions"});return}try{this.subGroupPropertyId=this.config.getAsPropertyId("subGroup");let t=this.config.get("enableSearch");this.enableSearch=t!=null?t:!1;let r=this.config.get("defaultCollapsedState");this.defaultCollapsedState=r==="Collapsed"||r==="1"?"Collapsed":"Expanded";let a=this.config.get("expandedRelationshipFilterMode");this.expandedRelationshipFilterMode=lCe(a),this.hideTopLevelSubtasks=this.config.get("hideTopLevelSubtasks")===!0,this.configLoaded=!0}catch(t){Fs.warn("[TaskListView] Failed to parse config:",{category:"configuration",operation:"parse-config",error:t})}}clearGroupingSnapshot(){this.currentPrimaryGroupKeys=[],this.currentSubGroupKeysByParent.clear()}initializeCollapseStateForSnapshot(t,r){let a=this.defaultCollapsedState==="Collapsed"&&!this.deferCollapseDefaultForNextSnapshot;for(let i of t)this.initializedPrimaryGroupKeys.has(i)||(this.initializedPrimaryGroupKeys.add(i),a&&this.collapsedGroups.add(i));for(let i of r.values())for(let s of i)this.initializedSubGroupKeys.has(s)||(this.initializedSubGroupKeys.add(s),a&&this.collapsedSubGroups.add(s));this.deferCollapseDefaultForNextSnapshot=!1}applyGroupingSnapshot(t){let r=new Map;for(let[a,i]of t.subGroupKeysByParent.entries())r.set(a,[...i]);this.initializeCollapseStateForSnapshot(t.primaryGroupKeys,r),this.currentPrimaryGroupKeys=[...t.primaryGroupKeys],this.currentSubGroupKeysByParent=r}createGroupedHierarchySnapshot(t,r){let a={primaryGroupKeys:[],subGroupKeysByParent:new Map},i=this.subGroupPropertyId?zE(this.dataAdapter.extractDataItems()):new Map;for(let s of t){let o=this.dataAdapter.convertGroupKeyToString(s.key),l=new Set(s.entries.map(p=>{var m;return(m=p.file)==null?void 0:m.path})),c=r.filter(p=>l.has(p.path));if(c.length===0||(a.primaryGroupKeys.push(o),!this.subGroupPropertyId))continue;let d=[],u=rT(c,this.subGroupPropertyId,i);for(let[p,m]of u)m.length!==0&&d.push(`${o}:${p}`);d.length>0&&a.subGroupKeysByParent.set(o,d)}return a}createSubPropertyHierarchySnapshot(t){return{primaryGroupKeys:Array.from(t.keys()),subGroupKeysByParent:new Map}}setupContainer(){var a;super.setupContainer(),this.rootElement&&(this.rootElement.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-flex-direction-column-06c8b5ed","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),this.rootElement.classList.add("tn-static-display-flex-4d51fc62"));let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className="tn-bases-items-container",r.classList.remove("tn-static-flex-1-14e3b769","tn-static-flex-1-97445a8d","tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68","tn-static-max-height-400px-f0787633","tn-static-overflow-y-auto-03df744e","tn-static-overflow-y-clip-c5043043","tn-static-position-relative-d461c96d"),r.classList.add("tn-static-margin-top-12px-91e0f558"),(a=this.rootElement)==null||a.appendChild(r),this.itemsContainer=r,this.registerContainerListeners(),this.setupContainerDragHandlers()}async render(){var t;if(!(!this.itemsContainer||!this.rootElement)){if(this.draggedTaskPath){this.pendingRender=!0;return}this.config&&this.readViewOptions(),this.rootElement&&this.setupSearch(this.rootElement);try{if(!((t=this.data)!=null&&t.data)){this.clearGroupingSnapshot();return}let r=this.dataAdapter.extractDataItems();LE(this.data,r);let a=await yu(r,this.plugin);if(a.length===0){this.clearAllTaskElements(),this.sortScopeTaskPaths.clear(),this.sortScopeCandidateTaskPaths.clear(),this.clearGroupingSnapshot(),this.renderEmptyState(),this.lastRenderWasGrouped=!1;return}let i=this.dataAdapter.isGrouped();!i&&this.subGroupPropertyId?(this.lastRenderWasGrouped||this.clearAllTaskElements(),await this.renderGroupedBySubProperty(a),this.lastRenderWasGrouped=!0):i?(this.lastRenderWasGrouped||this.clearAllTaskElements(),await this.renderGrouped(a),this.lastRenderWasGrouped=!0):(this.lastRenderWasGrouped&&this.clearAllTaskElements(),this.clearGroupingSnapshot(),await this.renderFlat(a),this.lastRenderWasGrouped=!1)}catch(r){Fs.error("[TaskNotes][TaskListView] Error rendering:",{category:"persistence",operation:"rendering",error:r}),this.clearAllTaskElements(),this.sortScopeTaskPaths.clear(),this.sortScopeCandidateTaskPaths.clear(),this.renderError(r instanceof Error?r:new Error(String(r)))}}}getGroupByPropertyId(){var r;let t=this.basesController;if((r=t==null?void 0:t.query)!=null&&r.views&&(t!=null&&t.viewName)){for(let a of t.query.views)if((a==null?void 0:a.name)===t.viewName){if(a.groupBy){if(typeof a.groupBy=="object"&&a.groupBy.property)return a.groupBy.property;if(typeof a.groupBy=="string")return a.groupBy}return null}}return null}getSortScopeKey(t){return t!=null?t:this.UNGROUPED_SORT_SCOPE_KEY}getVisibleSortScopePaths(t){return this.sortScopeTaskPaths.get(this.getSortScopeKey(t))}getCandidateSortScopePaths(t){return this.sortScopeCandidateTaskPaths.get(this.getSortScopeKey(t))}setSortScopePaths(t){this.sortScopeTaskPaths.clear();for(let[r,a]of t)this.sortScopeTaskPaths.set(this.getSortScopeKey(r),[...a])}setSortScopeCandidatePaths(t){this.sortScopeCandidateTaskPaths.clear();for(let[r,a]of t)this.sortScopeCandidateTaskPaths.set(this.getSortScopeKey(r),[...a])}getVirtualItemTask(t){return"type"in t?t.type==="task"?t.task:null:t}getVirtualItemPath(t){var r,a;return(a=(r=this.getVirtualItemTask(t))==null?void 0:r.path)!=null?a:null}getVirtualItemGroupKey(t){return"type"in t&&t.type==="task"?t.groupKey:null}rebuildSortScopesFromVirtualItems(t){var i;let r=new Map,a=[];for(let s of t){let o=this.getVirtualItemTask(s);if(!o)continue;a.push(o.path);let l=this.getVirtualItemGroupKey(s),c=(i=r.get(l))!=null?i:[];c.push(o.path),r.set(l,c)}r.size>0?this.setSortScopePaths(r):this.setSortScopePaths([[null,a]])}applyOptimisticSortOrderResult(t,r,a,i,s,o){var u,p;if(s!==i)return!1;let l=BE(t,o);if(jE(this.taskInfoCache,l,m=>{this.lastTaskSignatures.set(m.path,this.buildTaskSignature(m))}),this.virtualScroller&&this.lastVirtualItems.length>0){let m=oCe(this.lastVirtualItems,f=>this.getVirtualItemPath(f),[t],r,a);return m?($E(m,f=>this.getVirtualItemTask(f),l,f=>{this.taskInfoCache.set(f.path,f),this.lastTaskSignatures.set(f.path,this.buildTaskSignature(f))}),this.lastVirtualItems=m,this.virtualScroller.updateItems(m),this.rebuildSortScopesFromVirtualItems(m),this.setCurrentVisibleTaskPaths(m.map(f=>this.getVirtualItemTask(f)).filter(f=>!!f)),this.lastFlatPaths=m.map(f=>this.getVirtualItemPath(f)).filter(f=>!!f),!0):!1}let c=(u=this.itemsContainer)==null?void 0:u.querySelector(`.task-card[data-task-path="${CSS.escape(t)}"]`),d=(p=this.itemsContainer)==null?void 0:p.querySelector(`.task-card[data-task-path="${CSS.escape(r)}"]`);return!c||!d?!1:(a?d.before(c):d.after(c),!0)}isListTypeProperty(t){if(tF(this.plugin.app,t))return!0;let r=this.plugin.fieldMapper.toUserField("contexts"),a=this.plugin.fieldMapper.toUserField("projects");return new Set(["contexts",r,"projects",a,"tags","aliases"]).has(t)}coerceGroupKeyForFrontmatter(t,r){return nF(this.plugin.app,t,r,this.plugin.settings.userFields)}async confirmLargeReorder(t,r){let a=this.plugin.settings.fieldMapping.sortOrder,i=r===null?this.plugin.i18n.translate("views.taskList.reorder.scope.ungrouped"):this.plugin.i18n.translate("views.taskList.reorder.scope.group",{group:r});return ur(this.plugin.app,{title:this.plugin.i18n.translate("common.reorder.confirmLargeTitle"),message:this.plugin.i18n.translate("common.reorder.confirmLargeMessage",{field:a,count:t,scope:i}),confirmText:this.plugin.i18n.translate("common.reorder.confirmButton"),cancelText:this.plugin.i18n.translate("common.cancel")})}getEventTargetElement(t){let r=t;return!r||typeof r.nodeType!="number"?null:r.nodeType===Node.ELEMENT_NODE?r:r.parentElement}shouldSuppressCardDrag(t,r){let a=this.getEventTargetElement(t);if(!a||!r.contains(a))return!1;let i=a.closest(this.CARD_NO_DRAG_SELECTOR);return i&&r.contains(i)?!0:this.isMobileDragHandleOnlyMode(r)&&!a.closest(this.CARD_DRAG_HANDLE_SELECTOR)}isMobileDragHandleOnlyMode(t){return t.ownerDocument.body.classList.contains("is-mobile")}setupCardDragHandle(t){t.classList.add("task-card--reorderable"),t.classList.toggle("task-card--drag-handle-only",this.isMobileDragHandleOnlyMode(t));let r=t.querySelector(this.CARD_DRAG_HANDLE_SELECTOR);if(r){r.setAttribute("draggable","true");return}let a=Ie(t.ownerDocument,"div");a.className="task-card__drag-handle",a.dataset.tnDragHandle="true",a.setAttribute("draggable","true"),a.setAttribute("aria-label","Drag to reorder"),a.setAttribute("title","Drag to reorder"),(0,Qn.setIcon)(a,"grip-vertical"),a.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation()}),t.insertBefore(a,t.firstChild)}setupCardDragHandlers(t,r,a){let i=null,s=!1,o=()=>{t.setAttribute("draggable",this.isMobileDragHandleOnlyMode(t)?"false":"true"),i=null,s=!1},l=d=>typeof d.button!="number"||d.button===0,c=d=>{i=d.target,s=this.shouldSuppressCardDrag(d.target,t),t.setAttribute("draggable",s?"false":"true"),!(s||!l(d))&&d.stopPropagation()};this.setupCardDragHandle(t),o(),t.addEventListener("pointerdown",c,{capture:!0}),t.addEventListener("mousedown",c,{capture:!0}),t.addEventListener("mouseup",d=>{!s&&l(d)&&d.stopPropagation(),o()}),t.addEventListener("click",o,{capture:!0}),t.addEventListener("dragstart",d=>{if(this.shouldSuppressCardDrag(i!=null?i:d.target,t)){d.preventDefault(),d.stopPropagation(),o();return}d.stopPropagation(),this.draggedTaskPath=r.path,this.dragGroupKey=a,t.classList.add("task-card--dragging"),d.dataTransfer&&(d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("text/plain",r.path)),this.containerEl.ownerDocument.body.classList.add("tn-drag-active");let u=t.getBoundingClientRect().height,p=this.itemsContainer;window.requestAnimationFrame(()=>{if(t.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),t.classList.add("tn-static-height-0-7a31cef0"),t.classList.remove("tn-static-flex-1-14e3b769"),t.classList.add("tn-static-overflow-hidden-69824400"),t.classList.remove("tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),t.classList.add("tn-static-padding-0-41d7d7e2"),t.classList.remove("tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),t.classList.add("tn-static-margin-0-11696618"),t.classList.remove("tn-static-border-1px-solid-var-background-mo-b65b5121","tn-static-padding-12px-43bef435"),t.classList.add("tn-static-border-none-2eda1daa"),t.classList.remove("tn-static-opacity-0-6-d95b59ac","tn-static-opacity-1-c6e7979d"),t.classList.add("tn-static-opacity-0-8d919cb5"),p){let m=getComputedStyle(p).gap,f=parseFloat(m)||4;p.style.setProperty("--tn-drag-gap",`${u+f}px`),this.dragContainer=p,this.currentInsertionGroupKey=a,this.currentInsertionSegmentIndex=-1,this.currentInsertionIndex=-1,this.currentDropSlotElement=null,this.currentDropSlotPosition=null,this.captureDropBaseline()}})}),t.addEventListener("dragend",()=>{o(),vm(t),t.classList.remove("task-card--dragging"),this.cleanupDragShift(),this.containerEl.ownerDocument.body.classList.remove("tn-drag-active"),this.draggedTaskPath=null,this.dragGroupKey=null,this.currentInsertionGroupKey=null,this.currentInsertionSegmentIndex=-1,this.currentInsertionIndex=-1,this.dragOverRafId&&(cancelAnimationFrame(this.dragOverRafId),this.dragOverRafId=0),this.pendingDragClientY=null,this.pendingRender&&(this.containerEl.ownerDocument.defaultView||window).setTimeout(()=>{this.pendingRender&&(this.pendingRender=!1,this.debouncedRefresh())},200)})}shouldEnableManualReordering(){return _E(this.dataAdapter,this.plugin.settings.fieldMapping.sortOrder)}configureCardForManualReordering(t,r,a){this.shouldEnableManualReordering()&&(t.setAttribute("draggable","true"),this.setupCardDragHandlers(t,r,a))}clearDropIndicators(){var t;(t=this.itemsContainer)==null||t.querySelectorAll(".task-card--drop-above, .task-card--drop-below, .task-list-view__drop-slot-before, .task-list-view__drop-slot-after").forEach(r=>{r.classList.remove("task-card--drop-above","task-card--drop-below","task-list-view__drop-slot-before","task-list-view__drop-slot-after")}),this.currentDropSlotElement=null,this.currentDropSlotPosition=null}cleanupDragShift(){var t;this.dragContainer&&this.dragContainer.style.removeProperty("--tn-drag-gap"),(t=this.itemsContainer)==null||t.querySelectorAll(".task-card--drag-shift, .task-card--shift-down, .task-list-view__drop-slot-before, .task-list-view__drop-slot-after").forEach(r=>{r.classList.remove("task-card--drag-shift","task-card--shift-down","task-list-view__drop-slot-before","task-list-view__drop-slot-after")}),this.dragContainer=null,this.currentDropSlotElement=null,this.currentDropSlotPosition=null,this.currentInsertionGroupKey=null,this.currentInsertionSegmentIndex=-1,this.currentInsertionIndex=-1,this.dragBaselineCards=[]}getDropSegments(){return ZSe(this.getDropBaselineCards())}reconstructDropTargetFromInsertionSlot(t,r){return QSe(this.getDropSegments(),t,r)}getCurrentInsertionTarget(){return this.currentInsertionSegmentIndex<0||this.currentInsertionIndex<0?null:this.reconstructDropTargetFromInsertionSlot(this.currentInsertionSegmentIndex,this.currentInsertionIndex)}getVisibleSortScopePathsForDrag(t){return this.getVisibleSortScopePaths(t)}getReorderScopeQueueKey(t,r){return r?`manual-sort:${r}:${this.getSortScopeKey(t)}`:"manual-sort:list"}syncGroupedDragMetadata(t){this.taskGroupKeys.clear();let r=new Map;for(let a of t){if(a.type!=="task")continue;this.taskGroupKeys.set(a.task.path,a.groupKey);let i=r.get(a.groupKey)||[];i.push(a.task.path),r.set(a.groupKey,i)}this.setSortScopePaths(r)}updateDropSlotPreview(t){let{element:r,position:a}=t;r===this.currentDropSlotElement&&a===this.currentDropSlotPosition||(this.clearDropIndicators(),r.classList.add(a==="before"?"task-list-view__drop-slot-before":"task-list-view__drop-slot-after"),this.currentDropSlotElement=r,this.currentDropSlotPosition=a)}updateResolvedInsertionSlot(t){let r=this.resolveClosestInsertionSlot(t);return r?(this.currentInsertionGroupKey=r.groupKey,this.currentInsertionSegmentIndex=r.segmentIndex,this.currentInsertionIndex=r.insertionIndex,this.updateDropSlotPreview(r),!0):!1}flushPendingInsertionSlot(t){return this.dragOverRafId&&(cancelAnimationFrame(this.dragOverRafId),this.dragOverRafId=0),this.pendingDragClientY=null,this.updateResolvedInsertionSlot(t)}getVisibleDropCards(){return this.itemsContainer?Array.from(this.itemsContainer.querySelectorAll(".task-card[data-task-path]")).filter(t=>{var a;return t.dataset.taskPath===this.draggedTaskPath?!1:!((a=t.parentElement)==null?void 0:a.closest(".task-card[data-task-path]"))}):[]}captureDropBaseline(t=this.getVisibleDropCards()){if(!this.itemsContainer){this.dragBaselineCards=[];return}let r=this.itemsContainer.getBoundingClientRect(),a=this.itemsContainer.scrollTop;this.dragBaselineCards=t.map(i=>{var c;let s=i.dataset.taskPath;if(!s)return null;let o=i.getBoundingClientRect(),l=o.top-r.top+a;return{path:s,groupKey:(c=this.taskGroupKeys.get(s))!=null?c:null,card:i,top:l,bottom:l+o.height,midpoint:l+o.height/2}}).filter(i=>!!i)}getDropBaselineCards(){let t=this.getVisibleDropCards(),r=t.map(s=>{var o;return(o=s.dataset.taskPath)!=null?o:""}),a=this.dragBaselineCards.map(s=>s.path);return r.length===a.length&&r.every((s,o)=>s===a[o])||this.captureDropBaseline(t),this.dragBaselineCards}getContainerLocalY(t){if(!this.itemsContainer)return t;let r=this.itemsContainer.getBoundingClientRect();return t-r.top+this.itemsContainer.scrollTop}resolveClosestInsertionSlot(t){let r=this.getDropSegments(),a=this.getContainerLocalY(t);return JSe(r,a)}setupContainerDragHandlers(){this.itemsContainer&&(this.itemsContainer.addEventListener("dragenter",t=>{this.draggedTaskPath&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))}),this.itemsContainer.addEventListener("dragover",t=>{this.draggedTaskPath&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.pendingDragClientY=t.clientY,this.dragOverRafId||(this.dragOverRafId=window.requestAnimationFrame(()=>{this.dragOverRafId=0;let r=this.pendingDragClientY;this.pendingDragClientY=null,r!==null&&this.updateResolvedInsertionSlot(r)})))}),this.itemsContainer.addEventListener("dragleave",t=>{var a;let r=t.relatedTarget;(!r||!((a=this.itemsContainer)!=null&&a.contains(r)))&&this.clearDropIndicators()}),this.itemsContainer.addEventListener("drop",t=>{(async()=>{if(t.preventDefault(),!this.draggedTaskPath||!this.flushPendingInsertionSlot(t.clientY)&&this.currentInsertionIndex<0)return;let r=this.draggedTaskPath,a=this.dragGroupKey,i=this.currentInsertionGroupKey,s=this.getVisibleSortScopePathsForDrag(i),o=this.currentInsertionSegmentIndex,l=this.currentInsertionIndex,c=o>=0&&l>=0?this.reconstructDropTargetFromInsertionSlot(o,l):null;!r||!c||(this.clearDropIndicators(),this.cleanupDragShift(),this.draggedTaskPath=null,this.dragGroupKey=null,this.currentInsertionGroupKey=null,this.currentInsertionSegmentIndex=-1,this.currentInsertionIndex=-1,this.pendingDragClientY=null,await this.handleSortOrderDrop(r,c.taskPath,c.above,i,a,s))})()}))}async handleSortOrderDrop(t,r,a,i,s,o){let l=this.getGroupByPropertyId(),c=this.getReorderScopeQueueKey(i,l);await this.dropQueue.enqueue(c,async()=>{var v;let d=nCe({groupByPropertyId:l,sourceGroupKey:s,targetGroupKey:i,lookupMappingKey:k=>this.plugin.fieldMapper.lookupMappingKey(k),isListTypeProperty:k=>this.isListTypeProperty(k)});if(d.isFormulaGrouping){new Qn.Notice(this.plugin.i18n.translate("views.taskList.errors.formulaGroupingReadOnly"));return}let u=await Q_(r,a,i,d.cleanGroupBy,t,this.plugin,{taskInfoCache:this.taskInfoCache,visibleTaskPaths:o!=null?o:this.getVisibleSortScopePaths(i),candidateTaskPaths:this.getCandidateSortScopePaths(i)});if(u.sortOrder===null)return;let p=u.additionalWrites.length+1;if(p>this.LARGE_REORDER_WARNING_THRESHOLD&&!await this.confirmLargeReorder(p,i))return;if(!(d.needsGroupUpdate||u!==null)){this.debouncedRefresh();return}let f=this.plugin.app.vault.getAbstractFileByPath(t);if(!f||!(f instanceof Qn.TFile)){this.debouncedRefresh();return}let h=this.plugin.settings.fieldMapping.sortOrder;if(await J_(t,u,this.plugin,{includeDragged:!1}),await yr(this.plugin.app,f,k=>{var T;aCe({frontmatter:k,plan:d,sortOrderField:h,sortOrder:u.sortOrder,isRecurring:!!((T=this.taskInfoCache.get(t))!=null&&T.recurrence),dateModifiedField:this.plugin.fieldMapper.toUserField("dateModified"),coerceGroupKeyForFrontmatter:(b,w)=>this.coerceGroupKeyForFrontmatter(b,w),updateCompletedDateInFrontmatter:(b,w,S)=>this.plugin.taskService.updateCompletedDateInFrontmatter(b,w,S),getTimestamp:qe})}),d.needsGroupUpdate&&d.groupByTaskProp)try{let k=(v=this.taskInfoCache.get(t))!=null?v:await this.plugin.cacheManager.getTaskInfo(t);if(k){let T=iCe(k,{plan:d,isCompletedStatus:b=>this.plugin.statusManager.isCompletedStatus(b),getTimestamp:qe,getCompletedDate:()=>new Date().toISOString().split("T")[0]});T&&await this.plugin.taskService.applyPropertyChangeSideEffects(f,k,T,d.groupByTaskProp,d.sourceGroupKey,d.normalizedTargetGroupKey)}}catch(k){Fs.warn("[TaskNotes][TaskListView] Side-effect error after drop:",{category:"persistence",operation:"side-effect-drop",error:k})}this.applyOptimisticSortOrderResult(t,r,a,i,s,u)||this.debouncedRefresh()})}async renderFlat(t){let r=this.getVisibleProperties();this.setSortScopeCandidatePaths([[null,t.map(c=>c.path)]]);let a=this.applySearchFilter(t);this.setExpandedRelationshipTaskScope(a);let i=this.getTopLevelRenderTasks(a);if(this.setCurrentVisibleTaskPaths(i),this.isSearchWithNoResults(a,t.length)){this.clearAllTaskElements(),this.sortScopeTaskPaths.clear(),this.sortScopeCandidateTaskPaths.clear(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let s=Br(new Date);this.currentTargetDate=s;let o=this.getCardOptions(s),l=i.length>=this.VIRTUAL_SCROLL_THRESHOLD;l&&!this.useVirtualScrolling?(this.cleanupNonVirtualRendering(),this.useVirtualScrolling=!0):!l&&this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),this.useVirtualScrolling?await this.renderFlatVirtual(i,r,o):await this.renderFlatNormal(i,r,o)}async renderFlatVirtual(t,r,a){if(this.itemsContainer){if(this.taskGroupKeys.clear(),this.setSortScopePaths([[null,t.map(i=>i.path)]]),!this.virtualScroller)this.resetVirtualScrollerIfCardRenderChanged(this.buildCardRenderSignature(r,a)),this.virtualScroller=new hm({container:this.itemsContainer,items:t,overscan:5,renderItem:i=>{if("type"in i)throw new Error("Unexpected grouped item in flat renderer");let s=i,o=pr(i,this.plugin,r,a);return this.configureCardForManualReordering(o,s,null),this.taskInfoCache.set(s.path,s),this.lastTaskSignatures.set(s.path,this.buildTaskSignature(s)),o},getItemKey:i=>"type"in i?`grouped-${i.groupKey}`:i.path}),window.setTimeout(()=>{var i;(i=this.virtualScroller)==null||i.recalculate()},0);else{if(this.resetVirtualScrollerIfCardRenderChanged(this.buildCardRenderSignature(r,a)),!this.virtualScroller){await this.renderFlatVirtual(t,r,a);return}this.virtualScroller.updateItems(t)}this.lastVirtualItems=t,this.lastFlatPaths=t.map(i=>i.path),this.lastCardRenderSignature=this.buildCardRenderSignature(r,a)}}async renderFlatNormal(t,r,a){if(!this.itemsContainer)return;this.lastVirtualItems=[],this.taskGroupKeys.clear(),this.setSortScopePaths([[null,t.map(c=>c.path)]]);let i=new Set,s=!this.arePathArraysEqual(t,this.lastFlatPaths),o=this.buildCardRenderSignature(r,a),l=o!==this.lastCardRenderSignature;s&&(this.itemsContainer.empty(),this.currentTaskElements.clear());for(let c of t){let d=s?null:this.currentTaskElements.get(c.path)||null,u=this.buildTaskSignature(c,r),p=this.lastTaskSignatures.get(c.path),m=l||u!==p||!d;if(!d||m){let f=pr(c,this.plugin,r,a);d&&d.isConnected&&d.replaceWith(f),d=f}d.isConnected||this.itemsContainer.appendChild(d),m&&this.configureCardForManualReordering(d,c,null),this.currentTaskElements.set(c.path,d),this.taskInfoCache.set(c.path,c),this.lastTaskSignatures.set(c.path,u),i.add(c.path)}if(!s&&i.size!==this.currentTaskElements.size){for(let[c,d]of this.currentTaskElements)if(!i.has(c)){d.remove(),this.currentTaskElements.delete(c);let u=this.clickTimeouts.get(c);u&&(window.clearTimeout(u),this.clickTimeouts.delete(c)),this.taskInfoCache.delete(c),this.lastTaskSignatures.delete(c)}}this.lastFlatPaths=t.map(c=>c.path),this.lastCardRenderSignature=o}async renderGroupedBySubProperty(t){let r=this.getVisibleProperties(),a=this.applySearchFilter(t);this.setExpandedRelationshipTaskScope(a);let i=this.getTopLevelRenderTasks(a),s=this.getTopLevelRenderTasks(t);if(this.setCurrentVisibleTaskPaths(i),this.isSearchWithNoResults(a,t.length)){this.clearAllTaskElements(),this.sortScopeTaskPaths.clear(),this.sortScopeCandidateTaskPaths.clear(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let o=Br(new Date);this.currentTargetDate=o;let l=this.getCardOptions(o),c=zE(this.dataAdapter.extractDataItems()),d=rT(i,this.subGroupPropertyId,c),u=rT(s,this.subGroupPropertyId,c);this.setSortScopeCandidatePaths(tCe(u)),this.applyGroupingSnapshot(this.createSubPropertyHierarchySnapshot(d));let p=i4(d,this.collapsedGroups),m=p.length>=this.VIRTUAL_SCROLL_THRESHOLD;if(this.useVirtualScrolling&&m&&this.virtualScroller){await this.renderGroupedVirtual(p,r,l),this.lastFlatPaths=t.map(f=>f.path);return}this.itemsContainer.empty(),this.currentTaskElements.clear(),this.clearClickTimeouts(),this.taskInfoCache.clear(),this.lastTaskSignatures.clear(),m&&!this.useVirtualScrolling?(this.cleanupNonVirtualRendering(),this.useVirtualScrolling=!0):!m&&this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),this.useVirtualScrolling?await this.renderGroupedVirtual(p,r,l):await this.renderGroupedNormal(p,r,l),this.lastFlatPaths=t.map(f=>f.path)}async renderGrouped(t){let r=this.getVisibleProperties(),a=this.dataAdapter.getGroupedData(),i=this.applySearchFilter(t);this.setExpandedRelationshipTaskScope(i);let s=this.getTopLevelRenderTasks(i),o=this.getTopLevelRenderTasks(t);if(this.setCurrentVisibleTaskPaths(s),this.isSearchWithNoResults(i,t.length)){this.clearAllTaskElements(),this.sortScopeTaskPaths.clear(),this.sortScopeCandidateTaskPaths.clear(),this.itemsContainer&&this.renderSearchNoResults(this.itemsContainer);return}let l=Br(new Date);this.currentTargetDate=l;let c=this.getCardOptions(l);this.applyGroupingSnapshot(this.createGroupedHierarchySnapshot(a,s));let d=this.subGroupPropertyId?zE(this.dataAdapter.extractDataItems()):new Map,u=a4({groups:a,taskNotes:s,subGroupPropertyId:this.subGroupPropertyId,pathToProps:d,collapsedGroups:this.collapsedGroups,collapsedSubGroups:this.collapsedSubGroups,convertGroupKeyToString:m=>this.dataAdapter.convertGroupKeyToString(m)});this.setSortScopeCandidatePaths(eCe(a,o,m=>this.dataAdapter.convertGroupKeyToString(m)));let p=u.length>=this.VIRTUAL_SCROLL_THRESHOLD;if(this.useVirtualScrolling&&p&&this.virtualScroller){await this.renderGroupedVirtual(u,r,c),this.lastFlatPaths=t.map(m=>m.path);return}this.itemsContainer.empty(),this.currentTaskElements.clear(),this.clearClickTimeouts(),this.taskInfoCache.clear(),this.lastTaskSignatures.clear(),p&&!this.useVirtualScrolling?(this.cleanupNonVirtualRendering(),this.useVirtualScrolling=!0):!p&&this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),this.useVirtualScrolling?await this.renderGroupedVirtual(u,r,c):await this.renderGroupedNormal(u,r,c),this.lastFlatPaths=t.map(m=>m.path)}async renderGroupedVirtual(t,r,a){if(this.syncGroupedDragMetadata(t),!this.virtualScroller)this.virtualScroller=new hm({container:this.itemsContainer,items:t,overscan:5,renderItem:i=>{if(!("type"in i))throw new Error("Unexpected flat task item in grouped renderer");if(i.type==="primary-header"||i.type==="sub-header")return this.createGroupHeader(i);{let s=pr(i.task,this.plugin,r,a);return this.configureCardForManualReordering(s,i.task,i.groupKey),this.taskInfoCache.set(i.task.path,i.task),this.lastTaskSignatures.set(i.task.path,this.buildTaskSignature(i.task)),s}},getItemKey:i=>"type"in i?i.type==="primary-header"?`primary-${i.groupKey}`:i.type==="sub-header"?`sub-${i.groupKey}:${i.subGroupKey}`:i.task.path:i.path}),window.setTimeout(()=>{var i;(i=this.virtualScroller)==null||i.recalculate()},0);else{if(this.resetVirtualScrollerIfCardRenderChanged(this.buildCardRenderSignature(r,a)),!this.virtualScroller){await this.renderGroupedVirtual(t,r,a);return}this.virtualScroller.updateItems(t)}this.lastVirtualItems=t,this.lastCardRenderSignature=this.buildCardRenderSignature(r,a)}async renderGroupedNormal(t,r,a){this.lastVirtualItems=[],this.syncGroupedDragMetadata(t);for(let i of t)if(i.type==="primary-header"||i.type==="sub-header"){let s=this.createGroupHeader(i);this.itemsContainer.appendChild(s)}else{let s=pr(i.task,this.plugin,r,a);this.configureCardForManualReordering(s,i.task,i.groupKey),this.itemsContainer.appendChild(s),this.currentTaskElements.set(i.task.path,s),this.taskInfoCache.set(i.task.path,i.task),this.lastTaskSignatures.set(i.task.path,this.buildTaskSignature(i.task))}this.lastCardRenderSignature=this.buildCardRenderSignature(r,a)}createGroupHeader(t){let r=this.containerEl.ownerDocument,a=Ie(r,"div");a.className="task-section task-group";let i=t.type==="sub-header",s=i?"sub":"primary";a.dataset.level=s;let o=i?`${t.groupKey}:${t.subGroupKey}`:t.groupKey;i?(a.dataset.groupKey=o,a.dataset.parentKey=t.parentKey):a.dataset.groupKey=o,t.isCollapsed&&a.classList.add("is-collapsed");let l=Ie(r,"h3");l.className="task-group-header task-list-view__group-header",a.appendChild(l);let c=Ie(r,"button");c.className="task-group-toggle",c.type="button",c.setAttribute("aria-label","Toggle group"),c.setAttribute("aria-expanded",String(!t.isCollapsed)),c.dataset.groupKey=o,l.appendChild(c),(0,Qn.setIcon)(c,"chevron-right");let d=c.querySelector("svg");d&&(d.classList.add("chevron"),d.setAttribute("width","16"),d.setAttribute("height","16"));let u=l.createSpan({cls:"task-group-title"}),p=i?t.subGroupTitle:t.groupTitle;return this.renderGroupTitle(u,p),l.createSpan({text:` (${t.taskCount})`,cls:"agenda-view__item-count"}),a}async handleTaskUpdate(t){var r;if(this.taskInfoCache.set(t.path,t),this.lastTaskSignatures.set(t.path,this.buildTaskSignature(t)),this.useVirtualScrolling)this.debouncedRefresh();else{let a=this.currentTaskElements.get(t.path);if(a&&a.isConnected){let i=this.getVisibleProperties(),s=pr(t,this.plugin,i,this.getCardOptions(this.currentTargetDate));this.configureCardForManualReordering(s,t,(r=this.taskGroupKeys.get(t.path))!=null?r:null),a.replaceWith(s),s.classList.add("task-card--updated"),(this.containerEl.ownerDocument.defaultView||window).setTimeout(()=>{s.classList.remove("task-card--updated")},1e3),this.currentTaskElements.set(t.path,s)}else this.debouncedRefresh()}}renderEmptyState(){let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className="tn-bases-empty",r.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c","tn-static-text-align-center-91a87015"),r.classList.add("tn-static-padding-20px-7a035d95"),r.textContent="No tasknotes tasks found for this base.",this.itemsContainer.appendChild(r)}renderError(t){let r=this.containerEl.ownerDocument,a=Ie(r,"div");a.className="tn-bases-error",a.classList.remove("tn-static-border-radius-4px-c290c56e","tn-static-border-radius-6px-0dc8408c","tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-0-11696618","tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),a.classList.add("tn-static-padding-20px-ebe8e48c"),a.textContent=`Error loading tasks: ${t.message||"Unknown error"}`,this.itemsContainer.appendChild(a)}renderGroupTitle(t,r){let a=this.app||this.plugin.app,i={metadataCache:a.metadataCache,workspace:a.workspace};N_(t,r,i)}onunload(){this.unregisterContainerListeners(),this.destroyVirtualScroller(),this.currentTaskElements.clear(),this.itemsContainer=null,this.lastRenderWasGrouped=!1,this.clearClickTimeouts(),this.taskInfoCache.clear(),this.lastTaskSignatures.clear(),this.lastFlatPaths=[],this.useVirtualScrolling=!1,this.collapsedGroups.clear(),this.collapsedSubGroups.clear(),this.clearGroupingSnapshot(),this.initializedPrimaryGroupKeys.clear(),this.initializedSubGroupKeys.clear(),this.taskGroupKeys.clear(),this.sortScopeTaskPaths.clear()}getEphemeralState(){var a,i;let t=super.getEphemeralState();return{...cCe(t)?t:{},scrollTop:((a=this.rootElement)==null?void 0:a.scrollTop)||0,itemsContainerScrollTop:((i=this.itemsContainer)==null?void 0:i.scrollTop)||0,collapsedGroups:Array.from(this.collapsedGroups),collapsedSubGroups:Array.from(this.collapsedSubGroups)}}hasInitializedCollapseState(){return this.initializedPrimaryGroupKeys.size>0||this.initializedSubGroupKeys.size>0}restoreCollapsedStateFromEphemeral(t){let r=!1;if(t.collapsedGroups&&Array.isArray(t.collapsedGroups)){let a=t.collapsedGroups.filter(i=>typeof i=="string");this.collapsedGroups=new Set(a),r=r||a.length>0}if(t.collapsedSubGroups&&Array.isArray(t.collapsedSubGroups)){let a=t.collapsedSubGroups.filter(i=>typeof i=="string");this.collapsedSubGroups=new Set(a),r=r||a.length>0}this.deferCollapseDefaultForNextSnapshot=r}setEphemeralState(t){if(w7e(t)){if(super.setEphemeralState(t),this.hasInitializedCollapseState()||this.restoreCollapsedStateFromEphemeral(t),typeof t.scrollTop=="number"&&this.rootElement){let r=t.scrollTop;window.requestAnimationFrame(()=>{this.rootElement&&this.rootElement.isConnected&&(this.rootElement.scrollTop=r)})}if(typeof t.itemsContainerScrollTop=="number"){let r=t.itemsContainerScrollTop;window.requestAnimationFrame(()=>{var a;this.itemsContainer&&this.itemsContainer.isConnected&&(this.itemsContainer.scrollTop=r,(a=this.virtualScroller)==null||a.recalculate())})}}}clearAllTaskElements(){var t;this.useVirtualScrolling&&(this.destroyVirtualScroller(),this.useVirtualScrolling=!1),(t=this.itemsContainer)==null||t.empty(),this.currentTaskElements.forEach(r=>r.remove()),this.currentTaskElements.clear(),this.lastFlatPaths=[],this.lastTaskSignatures.clear(),this.taskInfoCache.clear(),this.clearClickTimeouts(),this.taskGroupKeys.clear(),this.sortScopeTaskPaths.clear(),this.expandedRelationshipTaskPaths.clear(),this.expandedRelationshipTaskOrder.clear()}getCardOptions(t){return this.buildTaskCardOptions({targetDate:t,expandedRelationshipFilterMode:this.expandedRelationshipFilterMode,resolveExpandedRelationshipFilterMode:()=>{var r;return lCe((r=this.config)==null?void 0:r.get("expandedRelationshipFilterMode"))},expandedRelationshipTaskPaths:this.expandedRelationshipTaskPaths,expandedRelationshipTaskOrder:this.expandedRelationshipTaskOrder})}getTopLevelRenderTasks(t){return this.hideTopLevelSubtasks?this.filterTopLevelSubtasks(t):[...t]}setExpandedRelationshipTaskScope(t){this.expandedRelationshipTaskPaths.clear(),this.expandedRelationshipTaskOrder.clear(),t.forEach((r,a)=>{this.expandedRelationshipTaskPaths.add(r.path),this.expandedRelationshipTaskOrder.set(r.path,a)})}setCurrentVisibleTaskPaths(t){this.currentVisibleTaskPaths.clear(),this.currentVisibleTaskOrder.clear(),t.forEach((r,a)=>{this.currentVisibleTaskPaths.add(r.path),this.currentVisibleTaskOrder.set(r.path,a)})}clearClickTimeouts(){for(let t of this.clickTimeouts.values())t&&window.clearTimeout(t);this.clickTimeouts.clear()}registerContainerListeners(){!this.itemsContainer||this.containerListenersRegistered||(this.registerDomEvent(this.itemsContainer,"click",this.handleItemClick),this.containerListenersRegistered=!0)}unregisterContainerListeners(){this.containerListenersRegistered=!1}getTaskContextFromEvent(t){let r=t.target;if(!r)return null;let a=r.closest(".task-card");if(!a)return null;let i=a.dataset.taskPath;if(!i)return null;let s=this.taskInfoCache.get(i);return s?{task:s,card:a}:null}isSubGroupKey(t){return t.includes(":")}setSetEntry(t,r,a){if(a){t.add(r);return}t.delete(r)}getCurrentSubGroupKeys(){let t=[];for(let r of this.currentSubGroupKeysByParent.values())t.push(...r);return t}async setSubGroupsCollapsed(t,r){for(let a of this.currentSubGroupKeysByParent.get(t)||[])this.setSetEntry(this.collapsedSubGroups,a,r);this.lastRenderWasGrouped&&await this.refreshGroupedView()}async setAllPrimaryGroupsCollapsed(t){for(let r of this.currentPrimaryGroupKeys)this.setSetEntry(this.collapsedGroups,r,t);this.lastRenderWasGrouped&&await this.refreshGroupedView()}async setAllGroupsAndSubGroupsCollapsed(t){for(let r of this.currentPrimaryGroupKeys)this.setSetEntry(this.collapsedGroups,r,t);for(let r of this.getCurrentSubGroupKeys())this.setSetEntry(this.collapsedSubGroups,r,t);this.lastRenderWasGrouped&&await this.refreshGroupedView()}async handleGroupToggle(t){this.isSubGroupKey(t)?this.setSetEntry(this.collapsedSubGroups,t,!this.collapsedSubGroups.has(t)):this.setSetEntry(this.collapsedGroups,t,!this.collapsedGroups.has(t)),this.lastRenderWasGrouped&&await this.refreshGroupedView()}async refreshGroupedView(){var l;if(!((l=this.data)!=null&&l.data))return;let t=this.dataAdapter.extractDataItems();LE(this.data,t);let r=await yu(t,this.plugin),a=this.applySearchFilter(r);this.setExpandedRelationshipTaskScope(a);let i=this.getTopLevelRenderTasks(a);this.setCurrentVisibleTaskPaths(i);let s=this.subGroupPropertyId?zE(t):new Map,o;if(!this.dataAdapter.isGrouped()&&this.subGroupPropertyId){let c=rT(i,this.subGroupPropertyId,s);this.applyGroupingSnapshot(this.createSubPropertyHierarchySnapshot(c)),o=i4(c,this.collapsedGroups)}else{let c=this.dataAdapter.getGroupedData();this.applyGroupingSnapshot(this.createGroupedHierarchySnapshot(c,i)),o=a4({groups:c,taskNotes:i,subGroupPropertyId:this.subGroupPropertyId,pathToProps:s,collapsedGroups:this.collapsedGroups,collapsedSubGroups:this.collapsedSubGroups,convertGroupKeyToString:d=>this.dataAdapter.convertGroupKeyToString(d)})}this.useVirtualScrolling&&this.virtualScroller?(this.syncGroupedDragMetadata(o),this.virtualScroller.updateItems(o)):await this.render()}async handleActionClick(t,r,a,i){switch(t){case"toggle-status":await this.handleToggleStatus(r,i);return;case"priority-menu":this.showPriorityMenu(r,i);return;case"recurrence-menu":this.showRecurrenceMenu(r,i);return;case"reminder-menu":this.showReminderModal(r);return;case"task-context-menu":await uo(i,r.path,this.plugin,this.getTaskActionDate(r));return;case"edit-date":await this.openDateContextMenu(r,a.dataset.tnDateType,i);return;case"toggle-subtasks":await this.toggleSubtasks(r,a);return;case"toggle-blocking-tasks":await this.toggleBlockingTasks(r,a);return;default:await this.handleCardClick(r,i)}}async handleToggleStatus(t,r){try{if(t.recurrence){let a=this.getTaskActionDate(t);await this.plugin.toggleRecurringTaskComplete(t,a)}else await this.plugin.toggleTaskStatus(t)}catch(a){let i=a instanceof Error?a.message:String(a);Fs.error("[TaskNotes][TaskListView] Failed to toggle status",{category:"persistence",operation:"toggle-status",details:{taskPath:t.path},error:i}),new Qn.Notice(`Failed to toggle task status: ${i}`)}}getTaskActionDate(t){let r=re(t.scheduled||t.due||"");return r?st(r):this.currentTargetDate}showPriorityMenu(t,r){new Ud({currentValue:t.priority,onSelect:i=>{(async()=>{try{await this.plugin.updateTaskProperty(t,"priority",i)}catch(s){Fs.error("[TaskNotes][TaskListView] Failed to update priority",{category:"validation",operation:"update-priority",error:s}),new Qn.Notice("Failed to update priority")}})()},plugin:this.plugin}).show(r)}showRecurrenceMenu(t,r){new il({currentValue:typeof t.recurrence=="string"?t.recurrence:void 0,currentAnchor:t.recurrence_anchor||"scheduled",scheduledDate:t.scheduled,onSelect:(i,s)=>{(async()=>{try{await this.plugin.updateTaskProperty(t,"recurrence",i||void 0),s!==void 0&&await this.plugin.updateTaskProperty(t,"recurrence_anchor",s)}catch(o){Fs.error("[TaskNotes][TaskListView] Failed to update recurrence",{category:"validation",operation:"update-recurrence",error:o}),new Qn.Notice("Failed to update recurrence")}})()},app:this.plugin.app,plugin:this.plugin}).show(r)}showReminderModal(t){new sl(this.plugin.app,this.plugin,t,a=>{(async()=>{try{await this.plugin.updateTaskProperty(t,"reminders",a.length>0?a:void 0)}catch(i){Fs.error("[TaskNotes][TaskListView] Failed to update reminders",{category:"validation",operation:"update-reminders",error:i}),new Qn.Notice("Failed to update reminders")}})()}).open()}async openDateContextMenu(t,r,a){if(!r)return;let i=r==="due"?t.due:t.scheduled;new rl({currentValue:re(i||""),currentTime:si(i||""),onSelect:(o,l)=>{(async()=>{try{let c;o?l?c=`${o}T${l}`:c=o:c=void 0,await this.plugin.updateTaskProperty(t,r,c)}catch(c){let d=c instanceof Error?c.message:String(c);Fs.error("[TaskNotes][TaskListView] Failed to update date",{category:"validation",operation:"update-date",details:{taskPath:t.path,dateType:r},error:d}),new Qn.Notice(`Failed to update ${r} date: ${d}`)}})()},dateRole:r,plugin:this.plugin,app:this.app||this.plugin.app}).show(a)}async handleCardClick(t,r){if(this.handleSelectionClick(r,t.path))return;if(this.plugin.settings.doubleClickAction==="none"){await this.executeSingleClickAction(t,r);return}let a=this.clickTimeouts.get(t.path);if(a)window.clearTimeout(a),this.clickTimeouts.delete(t.path),await this.executeDoubleClickAction(t,r);else{let s=(this.containerEl.ownerDocument.defaultView||window).setTimeout(()=>{(async()=>(this.clickTimeouts.delete(t.path),await this.executeSingleClickAction(t,r)))()},250);this.clickTimeouts.set(t.path,s)}}async executeSingleClickAction(t,r){if(r.ctrlKey||r.metaKey){this.openTaskNote(t,!0);return}switch(this.plugin.settings.singleClickAction){case"edit":await this.editTask(t);break;case"openNote":this.openTaskNote(t,!1);break;default:break}}async executeDoubleClickAction(t,r){switch(this.plugin.settings.doubleClickAction){case"edit":await this.editTask(t);break;case"openNote":this.openTaskNote(t,!1);break;default:break}}async editTask(t){await this.plugin.openTaskEditModal(t)}openTaskNote(t,r){let a=this.app||this.plugin.app,i=a.vault.getAbstractFileByPath(t.path);i instanceof Qn.TFile&&(r?a.workspace.openLinkText(t.path,"",!0):a.workspace.getLeaf(!1).openFile(i))}async toggleSubtasks(t,r){var a;try{if(!this.plugin.expandedProjectsService){Fs.error("[TaskNotes][TaskListView] ExpandedProjectsService not initialized",{category:"stale-data",operation:"expandedprojectsservice-not-initialized"}),new Qn.Notice("Service not available. Please try reloading the plugin.");return}let i=this.plugin.expandedProjectsService.toggle(t.path,((a=this.plugin.settings)==null?void 0:a.expandSubtasksByDefault)===!0);r.classList.toggle("task-card__chevron--expanded",i),r.setAttribute("aria-label",i?"Collapse subtasks":"Expand subtasks");let s=r.closest(".task-card");if(s){let{toggleSubtasks:o}=await Promise.resolve().then(()=>(Ua(),fv));await o(s,t,this.plugin,i)}}catch(i){Fs.error("[TaskNotes][TaskListView] Failed to toggle subtasks",{category:"persistence",operation:"toggle-subtasks",error:i}),new Qn.Notice("Failed to toggle subtasks")}}async toggleBlockingTasks(t,r){try{let a=r.classList.toggle("task-card__blocking-toggle--expanded"),i=r.closest(".task-card");if(i){let{toggleBlockingTasks:s}=await Promise.resolve().then(()=>(Ua(),fv));await s(i,t,this.plugin,a)}}catch(a){Fs.error("[TaskNotes][TaskListView] Failed to toggle blocking tasks",{category:"persistence",operation:"toggle-blocking-tasks",error:a}),new Qn.Notice("Failed to toggle blocking tasks")}}arePathArraysEqual(t,r){if(t.length!==r.length)return!1;for(let a=0;a<t.length;a++)if(t[a].path!==r[a])return!1;return!0}cleanupNonVirtualRendering(){var t;(t=this.itemsContainer)==null||t.empty(),this.currentTaskElements.clear(),this.clearClickTimeouts()}destroyVirtualScroller(){this.virtualScroller&&(this.virtualScroller.destroy(),this.virtualScroller=null),this.lastVirtualItems=[]}resetVirtualScrollerIfCardRenderChanged(t){this.virtualScroller&&this.lastCardRenderSignature!==""&&this.lastCardRenderSignature!==t&&this.destroyVirtualScroller()}buildTaskSignature(t,r=[]){return JSON.stringify({task:{...t,basesData:void 0},visibleValues:r.map(a=>dC(t,a,this.plugin))})}buildCardRenderSignature(t,r){var i,s,o;let a=r.propertyLabels?Object.entries(r.propertyLabels).sort(([l],[c])=>l.localeCompare(c)):[];return JSON.stringify({visibleProperties:t!=null?t:null,propertyLabels:a,expandedRelationshipFilterMode:(i=r.expandedRelationshipFilterMode)!=null?i:null,targetDate:(o=(s=r.targetDate)==null?void 0:s.toISOString().slice(0,10))!=null?o:null})}}});async function l4({action:n,task:e,target:t,event:r,plugin:a,app:i}){let[{DateContextMenu:s},{PriorityContextMenu:o},{RecurrenceContextMenu:l},{ReminderModal:c},{showTaskContextMenu:d,toggleBlockingTasks:u,toggleSubtasks:p}]=await Promise.all([Promise.resolve().then(()=>(Uy(),rle)),Promise.resolve().then(()=>(fC(),Rle)),Promise.resolve().then(()=>(Qy(),jle)),Promise.resolve().then(()=>(Jy(),$le)),Promise.resolve().then(()=>(Ua(),fv))]);switch(n){case"toggle-status":await S7e(e,r,a);return;case"priority-menu":C7e(e,r,a,o);return;case"recurrence-menu":x7e(e,r,a,l);return;case"reminder-menu":E7e(e,a,c);return;case"task-context-menu":await d(r,e.path,a,VE(e));return;case"edit-date":await D7e(e,t.dataset.tnDateType,r,a,i,s);return;case"toggle-subtasks":await P7e(e,t,a,p);return;case"toggle-blocking-tasks":await A7e(e,t,a,u);return}}async function S7e(n,e,t){try{n.recurrence?await t.toggleRecurringTaskComplete(n,VE(n)):await t.toggleTaskStatus(n)}catch(r){HE.error("[TaskNotes][KanbanView] Failed to toggle status",{category:"internal",operation:"toggle-status",error:r})}}function VE(n){let e=re(n.scheduled||n.due||"");return e?st(e):Br(new Date)}function C7e(n,e,t,r){new r({currentValue:n.priority,onSelect:i=>{(async()=>{try{await t.updateTaskProperty(n,"priority",i)}catch(s){HE.error("[TaskNotes][KanbanView] Failed to update priority",{category:"validation",operation:"update-priority",error:s})}})()},plugin:t}).show(e)}function x7e(n,e,t,r){new r({currentValue:typeof n.recurrence=="string"?n.recurrence:void 0,currentAnchor:n.recurrence_anchor||"scheduled",scheduledDate:n.scheduled,onSelect:(i,s)=>{(async()=>{try{await t.updateTaskProperty(n,"recurrence",i||void 0),s!==void 0&&await t.updateTaskProperty(n,"recurrence_anchor",s)}catch(o){HE.error("[TaskNotes][KanbanView] Failed to update recurrence",{category:"validation",operation:"update-recurrence",error:o})}})()},app:t.app,plugin:t}).show(e)}function E7e(n,e,t){new t(e.app,e,n,a=>{(async()=>{try{await e.updateTaskProperty(n,"reminders",a.length>0?a:void 0)}catch(i){HE.error("[TaskNotes][KanbanView] Failed to update reminders",{category:"validation",operation:"update-reminders",error:i})}})()}).open()}async function D7e(n,e,t,r,a,i){if(!e)return;let{getDatePart:s,getTimePart:o}=await Promise.resolve().then(()=>(xe(),Gz)),l=e==="due"?n.due:n.scheduled;new i({currentValue:s(l||""),currentTime:o(l||""),onSelect:(d,u)=>{(async()=>{try{let p;d?u?p=`${d}T${u}`:p=d:p=void 0,await r.updateTaskProperty(n,e,p)}catch(p){HE.error("[TaskNotes][KanbanView] Failed to update date",{category:"validation",operation:"update-date",error:p})}})()},dateRole:e,plugin:r,app:a}).show(t)}async function P7e(n,e,t,r){var o,l;let a=e.closest(".task-card");if(!a)return;let s=!(((o=t.expandedProjectsService)==null?void 0:o.isExpanded(n.path))||!1);(l=t.expandedProjectsService)==null||l.setExpanded(n.path,s),e.classList.toggle("is-rotated",s),await r(a,n,t,s)}async function A7e(n,e,t,r){let a=e.closest(".task-card");if(!a)return;let i=e.classList.toggle("task-card__blocking-toggle--expanded");await r(a,n,t,i)}var HE,pCe=y(()=>{xe();q();HE=M({tag:"Bases/KanbanCardActions"})});function mCe(n,e,t){return Math.min(Math.max(n,e),t)}function M7e(n,e,t){let r=Math.max(0,n.width),a=Math.max(0,n.height);return{x:mCe(e-n.left,0,r),y:mCe(t-n.top,0,a)}}function fCe(n,e,t){let r=n.dataTransfer;if(!r||typeof r.setDragImage!="function")return null;let a=e.ownerDocument,i=a.body;if(!i)return null;let s=e.getBoundingClientRect(),o=e.cloneNode(!0);o.classList.add("tasknotes-plugin"),t&&o.classList.add(t),o.setAttribute("aria-hidden","true"),o.style.width=`${Math.max(0,s.width)}px`,o.style.height=`${Math.max(0,s.height)}px`,i.appendChild(o);let l=M7e(s,n.clientX,n.clientY);r.setDragImage(o,l.x,l.y);let c=a.defaultView;return(c!=null?c:window).setTimeout(()=>{o.remove()},0),o}var hCe=y(()=>{});function I7e(n){let e=n;return!e||typeof e.nodeType!="number"?null:e.nodeType===Node.ELEMENT_NODE?e:e.parentElement}function c4(n,e){let t=I7e(n);if(!t||!e.contains(t))return null;let r=t.closest(".task-card__subtasks .task-card[data-task-path]");if(!r||!e.contains(r))return null;let a=r.dataset.taskPath;return a?{taskPath:a,sourceElement:r}:null}function iF(n,e){return n?{taskPath:n,above:e}:void 0}function WE(n,e){return n.length>0?[...n]:[e]}function d4({dropTarget:n,isCrossScope:e,targetInDropScope:t,fallbackDropTarget:r}){if(!(n&&e&&!t))return!n&&!e?r:n}function yCe(n,e,t){let r=n.getBoundingClientRect();return{taskPath:e,above:t<r.top+r.height/2}}function u4({cardsContainer:n,draggedTaskPaths:e,currentInsertionIndex:t,clientY:r}){let a=Array.from(n.querySelectorAll(".kanban-view__card-wrapper")).filter(s=>{let o=s.dataset.taskPath;return!!o&&!e.includes(o)});if(a.length===0)return;if(r!==void 0&&Number.isFinite(r)){let s=a.findIndex(o=>{let l=o.getBoundingClientRect();return r<l.top+l.height/2});return s===-1?{taskPath:a[a.length-1].dataset.taskPath,above:!1}:{taskPath:a[s].dataset.taskPath,above:!0}}let i=t>=0?Math.min(t,a.length):a.length;return i===0?{taskPath:a[0].dataset.taskPath,above:!0}:{taskPath:a[i-1].dataset.taskPath,above:!1}}function vCe(n,e,t){n.classList.remove("kanban-view__cards--drop-marker-end");for(let a of e)a.classList.remove("kanban-view__card-wrapper--drop-marker");let r=e[t];if(r){r.classList.add("kanban-view__card-wrapper--drop-marker");return}e.length>0&&t>=e.length&&n.classList.add("kanban-view__cards--drop-marker-end")}function p4(n){n.nodeType===Node.ELEMENT_NODE&&n.classList.remove("kanban-view__card-wrapper--drop-marker","kanban-view__cards--drop-marker-end"),n.querySelectorAll(".kanban-view__card-wrapper--drop-marker").forEach(e=>{e.classList.remove("kanban-view__card-wrapper--drop-marker")}),n.querySelectorAll(".kanban-view__cards--drop-marker-end").forEach(e=>{e.classList.remove("kanban-view__cards--drop-marker-end")})}function kCe({draggedPaths:n,dropTarget:e,targetContainer:t,currentTaskElements:r,removeEmptyCellHint:a,log:i}){var d,u;if(n.length===0)return i==null||i("OPTIMISTIC-REORDER: bail — no dragged paths"),!1;let s=()=>{let p=[];for(let m of n){let f=r.get(m);if(!f)return i==null||i("OPTIMISTIC-REORDER: bail — element not in currentTaskElements",{path:m.split("/").pop()}),null;p.push(f)}return p};if(!e){if(!t)return i==null||i("OPTIMISTIC-REORDER: bail — no dropTarget AND no targetContainer"),!1;let p=s();if(!p)return!1;a==null||a(t),i==null||i("OPTIMISTIC-REORDER: cross-column append path",{paths:n.map(m=>m.split("/").pop()),containerChildCount:t.childElementCount,containerClass:t.className});for(let m of p){let f=m.parentElement;i==null||i("OPTIMISTIC-REORDER: moving element",{path:(d=m.dataset.taskPath)==null?void 0:d.split("/").pop(),oldParentClass:f==null?void 0:f.className,oldParentChildCount:f==null?void 0:f.childElementCount,sameContainer:f===t,elCurrentStyles:m.style.cssText.slice(0,120)}),vm(m),m.classList.remove("kanban-view__card--dragging"),t.appendChild(m)}return i==null||i("OPTIMISTIC-REORDER: cross-column append SUCCESS",{containerChildCount:t.childElementCount}),!0}i==null||i("OPTIMISTIC-REORDER: drop-on-card path",{paths:n.map(p=>p.split("/").pop()),targetCard:e.taskPath.split("/").pop(),above:e.above,hasContainer:!!t});let o=r.get(e.taskPath);if(!o)return i==null||i("OPTIMISTIC-REORDER: bail — target element not in currentTaskElements",{target:e.taskPath.split("/").pop()}),!1;let l=t||o.parentElement;if(!l)return i==null||i("OPTIMISTIC-REORDER: bail — no container resolved"),!1;if(!l.contains(o))return i==null||i("OPTIMISTIC-REORDER: bail — targetEl not in container",{containerClass:l.className,targetElParentClass:(u=o.parentElement)==null?void 0:u.className}),!1;let c=s();if(!c)return!1;a==null||a(l);for(let p of c)vm(p),p.classList.remove("kanban-view__card--dragging"),e.above?l.insertBefore(p,o):l.insertBefore(p,o.nextSibling);return i==null||i("OPTIMISTIC-REORDER: drop-on-card SUCCESS"),!0}function gCe(n){return n.replace(/^(note\.|file\.|task\.)/,"")}function TCe({path:n,sourceColumn:e,sourceSwimlane:t,newGroupValue:r,newSwimLaneValue:a,groupByPropertyId:i,swimLanePropertyId:s,groupByTaskProp:o,swimlaneTaskProp:l,isGroupByListProperty:c,isSwimlaneListProperty:d}){let u=e!==r,p=a!==null&&!!s&&t!==a,m=u?o:p?l:null,f=u?e:t,h=u?r:a;return{path:n,sourceColumn:e,sourceSwimlane:t,needsGroupUpdate:u,needsSwimlaneUpdate:p,groupByFrontmatterKey:gCe(i),swimlaneFrontmatterKey:s?gCe(s):void 0,groupByTaskProp:o,swimlaneTaskProp:l,changedTaskProp:m,oldPropValue:f,newPropValue:h,newGroupValue:r,newSwimLaneValue:a,isGroupByListProperty:c,isSwimlaneListProperty:d}}function bCe(n,e){return n.needsGroupUpdate||n.needsSwimlaneUpdate||e}function N7e(n){return Array.isArray(n)?n:n?[n]:[]}function aF(n,e,t){let r=N7e(n).filter(a=>a!==e);return!r.includes(t)&&t!=="None"&&r.push(t),r.length>0?r:[]}function wCe(n,e,t){e.needsGroupUpdate&&(e.isGroupByListProperty&&e.sourceColumn?n[e.groupByFrontmatterKey]=aF(n[e.groupByFrontmatterKey],e.sourceColumn,e.newGroupValue):n[e.groupByFrontmatterKey]=t.coerceGroupValue(e.groupByFrontmatterKey,e.newGroupValue)),e.needsSwimlaneUpdate&&e.swimlaneFrontmatterKey&&e.newSwimLaneValue!==null&&(e.isSwimlaneListProperty&&e.sourceSwimlane?n[e.swimlaneFrontmatterKey]=aF(n[e.swimlaneFrontmatterKey],e.sourceSwimlane,e.newSwimLaneValue):n[e.swimlaneFrontmatterKey]=t.coerceGroupValue(e.swimlaneFrontmatterKey,e.newSwimLaneValue))}function SCe({plan:n,task:e,dateModifiedField:t,dateModifiedValue:r}){let a=n.needsGroupUpdate&&n.groupByTaskProp==="status"?n.newGroupValue:n.needsSwimlaneUpdate&&n.swimlaneTaskProp==="status"&&n.newSwimLaneValue!==null?n.newSwimLaneValue:null;return a===null?null:{statusValue:a,isRecurring:!!(e!=null&&e.recurrence),dateModifiedField:t,dateModifiedValue:r}}function CCe({plan:n,originalTask:e,dateModifiedValue:t,isCompletedStatus:r}){if(!n.changedTaskProp||!e)return null;let a=n.changedTaskProp,i=R7e(n,e,a),s={...e,[a]:i,dateModified:t};return a==="status"&&!e.recurrence&&(s.completedDate=typeof i=="string"&&r(i)?new Date().toISOString().split("T")[0]:void 0),{changedTaskProp:a,oldPropValue:n.oldPropValue,newPropValue:i,updatedTask:s}}function R7e(n,e,t){let r=e[t];return n.needsGroupUpdate&&n.isGroupByListProperty?aF(r,n.sourceColumn,n.newGroupValue):n.needsSwimlaneUpdate&&n.isSwimlaneListProperty&&n.newSwimLaneValue!==null?aF(r,n.sourceSwimlane,n.newSwimLaneValue):n.newPropValue}var xCe=y(()=>{X_()});function ECe(n){let{frontmatter:e,propertyId:t,groupKey:r}=n;if(!t||!r||r==="None")return;let a=F7e({propertyId:t,propertyMapper:n.propertyMapper,fieldMapper:n.fieldMapper,userFields:n.userFields});if(a){if(L7e({property:a,fieldMapper:n.fieldMapper,userFields:n.userFields,isListTypeProperty:n.isListTypeProperty})){z7e(e,a,r);return}e[a]=n.coerceGroupKeyForFrontmatter(a,r)}}function F7e(n){var r;if(n.propertyId.startsWith("file.")||n.propertyId.startsWith("formula."))return null;let e=n.propertyMapper.basesToUserProperty(n.propertyId);return new Set([..._7e.map(a=>n.fieldMapper.toUserField(a)),"tags"]).has(e)||(r=n.userFields)!=null&&r.some(a=>a.key===e)?e:null}function L7e(n){var t;if(O7e(n.fieldMapper).has(n.property))return!0;let e=(t=n.userFields)==null?void 0:t.find(r=>r.key===n.property);return(e==null?void 0:e.type)==="list"||n.isListTypeProperty(n.property)}function O7e(n){return new Set(["tags",n.toUserField("contexts"),n.toUserField("projects"),n.toUserField("blockedBy")])}function z7e(n,e,t){let r=n[e],a=Array.isArray(r)?r.filter(i=>typeof i=="string"):typeof r=="string"?[r]:[];a.includes(t)||(n[e]=[...a,t])}var _7e,DCe=y(()=>{_7e=["status","priority","due","scheduled","contexts","projects","timeEstimate","recurrence","blockedBy"]});function RCe(n){return typeof n=="object"&&n!==null}function sF(n){let e=new Set,t=[];for(let r of n){let a=Y(r).trim();!a||e.has(a)||(e.add(a),t.push(a))}return t}function m4(n){if(n==null)return{};let e=n;if(typeof n=="string"){let r=n.trim();if(!r)return{};try{e=JSON.parse(r)}catch(a){return{}}}if(!RCe(e))return{};let t={};for(let[r,a]of Object.entries(e)){if(!Array.isArray(a))continue;let i=sF(a);i.length>0&&(t[r]=i)}return t}function _Ce(n){let e=typeof n=="number"?n:typeof n=="string"&&n.trim()?Number(n):Number.NaN;return!Number.isFinite(e)||e<=0?null:Math.floor(e)}function f4(n){if(n==null)return{};let e=n;if(typeof n=="string"){let r=n.trim();if(!r)return{};try{e=JSON.parse(r)}catch(a){return{}}}if(!RCe(e))return{};let t={};for(let[r,a]of Object.entries(e)){let i=Y(r).trim(),s=_Ce(a);i&&s!==null&&(t[i]=s)}return t}function oF(n,e){let t=_Ce(e);return t===null?{text:` (${n})`,isExceeded:!1}:{text:` (${n}/${t})`,isExceeded:n>t}}function h4(n){if(n==null)return[];if(Array.isArray(n))return sF(n);if(typeof n!="string")return[];let e=n.trim();if(!e)return[];if(e.startsWith("["))try{let t=JSON.parse(e);if(Array.isArray(t))return sF(t)}catch(t){}return sF(e.split(","))}function FCe(n,e){for(let t of e)n.has(t)||n.set(t,[])}function LCe(n,e){let t=new Set(e),r=new Set(n),a=e.filter(s=>r.has(s)),i=n.filter(s=>!t.has(s)).sort();return[...a,...i]}function g4(n,e,t,r){return!n||t.length>0||r.includes(e)}function B7e(n,e){var r;if(e.startsWith("formula."))return(r=n[e])!=null?r:null;let t=Ya(e);return n[e]!==void 0?n[e]:n[t]!==void 0?n[t]:null}function OCe(n,e,t){return t(n)?!0:new Set(["contexts",e.contextsField,"projects",e.projectsField,"tags","aliases"]).has(n)}function zCe(n,e,t,r){return e==="contexts"||e===r.contextsField?n.contexts:e==="projects"||e===r.projectsField?n.projects:e==="tags"?n.tags:(t.get(n.path)||{})[e]}function lF(n,e){return n?Ya(n)===e:!1}function y4(n,e){return n?Ya(n)===e:!1}function BCe(n,e=()=>null){let t=new Set;for(let r of[n.value,n.label]){let a=r.trim();if(!a)continue;t.add(a);let i=e(a);i&&t.add(i)}return t}function v4(n,e,t,r){let a=n.trim();if(!a||a==="None")return;let i=e.find(d=>d.value===a);if(i)return i;let s=t(a),o=e.find(d=>d.value===s);if(o)return o;let l=e.filter(d=>d.label===a);if(l.length===1)return l[0];let c=e.filter(d=>r(d).has(a));return c.length===1?c[0]:void 0}function jCe(n){var e,t;return n.groupKey.trim()==="None"?n.groupKey:lF(n.propertyId,n.fields.statusField)?(t=(e=v4(n.groupKey,n.statuses,n.normalizeStatusValue,n.getStatusGroupKeyAliases))==null?void 0:e.value)!=null?t:n.groupKey:y4(n.propertyId,n.fields.priorityField)?n.normalizePriorityValue(n.groupKey):n.groupKey}function j7e(n,e,t){let r=t(e);for(let a of n.keys())if(r.has(a.trim()))return!0;return!1}function $7e(n,e,t,r,a){if(r(e))for(let i of t)j7e(n,i,a)||n.set(i.value,[])}function U7e(n,e,t,r){if(r(e))for(let a of t)n.has(a.value)||n.set(a.value,[])}function qE(n){var e,t;if(n==null)return"None";if(typeof n=="object"&&n!==null&&typeof n.toString=="function"){let r=n;if(((e=r.constructor)==null?void 0:e.name)==="NullValue"||r.isTruthy&&!r.isTruthy())return"None";if(((t=r.constructor)==null?void 0:t.name)==="ListValue"||Array.isArray(r.value)){let i=r.value||[];return i.length===0?"None":i.map(s=>qE(s)).join(", ")}return r.toString()||"None"}return typeof n=="string"?n||"None":typeof n=="number"?String(n):typeof n=="boolean"?n?"True":"False":Array.isArray(n)?n.length>0?n.map(r=>qE(r)).join(", "):"None":Y(n)||"None"}function $Ce(n){let e;Array.isArray(n)?e=n:n==null?e=[]:typeof n=="object"&&n!==null&&Array.isArray(n.value)?e=n.value||[]:e=[n];let t=e.map(r=>qE(r)).filter(r=>r!=="None");return t.length>0?Array.from(new Set(t)):["None"]}function H7e(n,e){for(let t of n.values())t.sort((r,a)=>{var i,s;return((i=e.get(r.path))!=null?i:Number.MAX_SAFE_INTEGER)-((s=e.get(a.path))!=null?s:Number.MAX_SAFE_INTEGER)})}function V7e(n,e){if(e)for(let t of n.values())t.sort((r,a)=>{let i=e.get(r.path),s=e.get(a.path);return i!=null&&s!=null?Y(i).localeCompare(Y(s)):i!=null?-1:s!=null?1:0})}function PCe(n,e,t){var r;n.has(e)||n.set(e,[]),(r=n.get(e))==null||r.push(t)}function UCe(n){if(!n.swimLanePropertyId)return["None"];let e=Ya(n.swimLanePropertyId);if(n.explodeListColumns&&n.isListTypeProperty(e)){let a=n.getListPropertyValue(n.task,e);return $Ce(a)}let t=n.pathToProps.get(n.task.path)||{},r=qE(B7e(t,n.swimLanePropertyId));return[n.canonicalizeGroupKey(r,n.swimLanePropertyId)]}function HCe(n){let e=new Map,t=new Map(n.taskNotes.map((o,l)=>[o.path,l])),r=Ya(n.groupByPropertyId),a=n.isStatusGroupingProperty(n.groupByPropertyId),i=n.isPriorityGroupingProperty(n.groupByPropertyId);if(n.explodeListColumns&&n.isListTypeProperty(r))for(let o of n.taskNotes){let l=n.getListPropertyValue(o,r),c=$Ce(l);for(let d of c)PCe(e,d,o)}else if(a||i)for(let o of n.taskNotes){let l=a?o.status:o.priority,c=qE(l),d=n.canonicalizeGroupKey(c,n.groupByPropertyId);PCe(e,d,o)}else{let o=new Map(n.taskNotes.map(l=>[l.path,l]));for(let l of n.groupedData){let c=n.convertGroupKeyToString(l.key),d=n.canonicalizeGroupKey(c,n.groupByPropertyId),u=e.get(d)||[];for(let p of l.entries){let m=o.get(p.file.path);m&&u.push(m)}e.has(d)||e.set(d,u)}}return H7e(e,t),V7e(e,n.sortOrderValues),$7e(e,n.groupByPropertyId,n.statusConfigs,n.isStatusGroupingProperty,n.getStatusGroupKeyAliases),U7e(e,n.groupByPropertyId,n.priorityConfigs,n.isPriorityGroupingProperty),FCe(e,n.pinnedColumns),e}function k4(n,e,t){var i;let r=new Set;for(let s of n)for(let o of t(s))r.add(o);let a=new Map;for(let s of r){let o=new Map;a.set(s,o);for(let[l]of e)o.set(l,[])}for(let[s,o]of e)for(let l of o)for(let c of t(l)){let d=a.get(c);d&&d.has(s)&&((i=d.get(s))==null||i.push(l))}return a}function T4(n,e){var r,a,i;let t=new Map(e.map(s=>[s,0]));for(let s of n.values())for(let o of e)t.set(o,((r=t.get(o))!=null?r:0)+((i=(a=s.get(o))==null?void 0:a.length)!=null?i:0));return t}function VCe(n,e,t,r){if(!t)return[...n];let a=T4(e,n);return n.filter(i=>{var s;return((s=a.get(i))!=null?s:0)>0||r.includes(i)})}function ACe(n,e){return n==="None"&&e!=="None"?1:e==="None"&&n!=="None"?-1:n.localeCompare(e)}function WCe(n,e){var t;if(e)return(t=n[e])!=null?t:n[Ya(e)]}function MCe(n,e){let t=new Set(n),r=new Set(e),a=e.filter(s=>t.has(s)),i=n.filter(s=>!r.has(s));return[...a,...i]}function ICe(n){let e=[...n.actualKeys];return n.isPriorityField(n.groupBy)?MCe(e.sort((t,r)=>n.getPriorityWeight(r)-n.getPriorityWeight(t)||ACe(t,r)),n.pinnedColumns):n.isStatusField(n.groupBy)?MCe(e.sort((t,r)=>{let a=n.findStatusConfig(t),i=n.findStatusConfig(r);return a&&i?a.order-i.order||t.localeCompare(r):a?-1:i?1:ACe(t,r)}),n.pinnedColumns):LCe([...n.actualKeys],n.pinnedColumns)}function qCe(n){let e=WCe(n.columnOrders,n.groupBy);if(!e||e.length===0)return ICe(n);let t=[],r=[],a=new Set(n.actualKeys);for(let i of e)(!n.hideEmptyColumns||a.has(i))&&t.push(i);for(let i of n.actualKeys)e.includes(i)||r.push(i);return[...t,...ICe({...n,actualKeys:r})]}function NCe(n){let e=[...n.actualKeys];return n.isPriorityField(n.swimLanePropertyId)?e.sort((t,r)=>n.getPriorityWeight(r)-n.getPriorityWeight(t)||t.localeCompare(r)):n.isStatusField(n.swimLanePropertyId)?e.sort((t,r)=>n.getStatusOrder(t)-n.getStatusOrder(r)||t.localeCompare(r)):e}function b4(n){let e=WCe(n.swimLaneOrders,n.swimLanePropertyId);if(!e||e.length===0)return NCe(n);let t=new Set(n.actualKeys),r=e.filter(i=>t.has(i)||!n.hideEmptySwimLanes),a=NCe({...n,actualKeys:n.actualKeys.filter(i=>!e.includes(i))});return[...r,...a]}function W7e(n){return new Map(n.map(e=>[e,[]]))}function q7e(n){return Array.from(n.values()).reduce((e,t)=>e+t.length,0)}function GCe(n){var a;let e=Array.from(n.swimLanes.keys());if(!n.hideEmptySwimLanes&&n.isPriorityField(n.swimLanePropertyId))for(let i of n.priorityKeys)n.swimLanes.has(i)||e.push(i);let t=b4({swimLanePropertyId:n.swimLanePropertyId,actualKeys:e,swimLaneOrders:n.swimLaneOrders,hideEmptySwimLanes:n.hideEmptySwimLanes,isPriorityField:n.isPriorityField,isStatusField:n.isStatusField,getPriorityWeight:n.getPriorityWeight,getStatusOrder:n.getStatusOrder}),r=new Map;for(let i of t){let s=(a=n.swimLanes.get(i))!=null?a:W7e(n.columnKeys);n.hideEmptySwimLanes&&q7e(s)===0||r.set(i,s instanceof Map?s:new Map(Array.from(s.entries()).map(([o,l])=>[o,[...l]])))}return r}var w4=y(()=>{dr();FE()});function C4(n){return typeof n=="object"&&n!==null}function G7e(n){return C4(n)}function cF(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Y7e(n){if(!C4(n.columnScroll))return null;let e={};for(let[t,r]of Object.entries(n.columnScroll))typeof r=="number"&&(e[t]=r);return e}function YCe(n){if(typeof n=="number")return n===1?"show-all":"inherit";let e=Y(n).trim().toLowerCase().replace(/^['"]|['"]$/g,"").replace(/[_\s]+/g,"-");return e==="show-all"||e==="1"?"show-all":"inherit"}function KCe(n,e=navigator,t=window){var r,a,i,s;return n||typeof(e==null?void 0:e.maxTouchPoints)=="number"&&e.maxTouchPoints>0?!0:!!((a=(r=t==null?void 0:t.matchMedia)==null?void 0:r.call(t,"(any-pointer: coarse)"))!=null&&a.matches||(s=(i=t==null?void 0:t.matchMedia)==null?void 0:i.call(t,"(pointer: coarse)"))!=null&&s.matches)}function K7e(n){return n==="compact"?"compact":"default"}function ZCe(n){return function(e,t){if(!t)throw ag.error("[TaskNotes][KanbanView] No containerEl provided",{category:"stale-data",operation:"no-containerel-provided"}),new Error("KanbanView requires a containerEl");return new S4(e,t,n)}}var En,ag,nT,S4,QCe=y(()=>{En=require("obsidian");IE();ME();Ua();Oq();Fi();zq();xe();Cn();dr();FE();s4();pCe();X_();hCe();Li();xCe();OE();DCe();r4();w4();q();ya();w4();ag=M({tag:"Bases/KanbanView"});nT=class nT extends Bc{constructor(t,r,a){super(t,r,a);this.type="tasknotesKanban";this.boardEl=null;this.currentTaskElements=new Map;this.draggedTaskPath=null;this.draggedTaskPaths=[];this.draggedFromColumn=null;this.draggedFromSwimlane=null;this.dropTargetPath=null;this.pendingRender=!1;this.dropAbove=!0;this.dragOverRafId=0;this.dragContainer=null;this.currentInsertionIndex=-1;this.dragSourceColumnEl=null;this.dragTargetColumnEl=null;this.activeDragSourceElement=null;this.floatingDragPreviewEl=null;this.floatingDragPreviewDocument=null;this.floatingDragPreviewMoveHandler=null;this.floatingDragPreviewRafId=null;this.floatingDragPreviewWidth=280;this.floatingDragPreviewHeight=40;this.floatingDragPreviewPendingX=0;this.floatingDragPreviewPendingY=0;this.draggedSourceColumns=new Map;this.draggedSourceSwimlanes=new Map;this.taskInfoCache=new Map;this.sortScopeTaskPaths=new Map;this.sortScopeCandidateTaskPaths=new Map;this.containerListenersRegistered=!1;this.columnScrollers=new Map;this.expandedRelationshipFilterMode="inherit";this.currentVisibleTaskPaths=new Set;this.currentVisibleTaskOrder=new Map;this.expandedRelationshipTaskPaths=new Set;this.expandedRelationshipTaskOrder=new Map;this.hideTopLevelSubtasks=!1;this.suppressRenderUntil=0;this.postDropTimer=null;this.dropQueue=new tT;this.activeDropCount=0;this.postDropRefreshRequested=!1;this.touchDragActive=!1;this.touchDragGhost=null;this.touchStartX=0;this.touchStartY=0;this.longPressTimer=null;this.autoScrollTimer=null;this.autoScrollDirection=0;this.LONG_PRESS_DELAY=350;this.TOUCH_MOVE_THRESHOLD=10;this.AUTO_SCROLL_EDGE=60;this.AUTO_SCROLL_SPEED=8;this.touchDragType=null;this.draggedColumnKey=null;this.boundContextMenuBlocker=t=>{t.preventDefault(),t.stopPropagation()};this.LARGE_REORDER_WARNING_THRESHOLD=10;this.swimLanePropertyId=null;this.columnWidth=280;this.maxSwimlaneHeight=600;this.hideEmptyColumns=!1;this.explodeListColumns=!0;this.consolidateStatusIcon=!1;this.columnOrders={};this.pinnedColumns=[];this.wipLimits={};this.swimLaneOrders={};this.hideEmptySwimLanes=!1;this.cardLayout="default";this.configLoaded=!1;this.VIRTUAL_SCROLL_THRESHOLD=15;this.handleBoardClick=async t=>{let r=this.getTaskContextFromEvent(t);if(!r)return;let{task:a,card:i}=r,o=t.target.closest("[data-tn-action]");if(o&&o!==i){let l=o.dataset.tnAction;if(l){t.preventDefault(),t.stopPropagation(),await this.handleCardAction(l,a,o,t);return}}};this.handleBoardContextMenu=async t=>{let r=this.getTaskContextFromEvent(t);if(!r)return;t.preventDefault(),t.stopPropagation();let{showTaskContextMenu:a}=await Promise.resolve().then(()=>(Ua(),fv));await a(t,r.task.path,this.plugin,VE(r.task))};this.basesController=t,this.dataAdapter.basesView=this}onload(){this.readViewOptions(),super.onload()}onDataUpdated(){if(this.draggedTaskPath){this.debugLog("ON-DATA-UPDATED: deferred (drag active)",{draggedTask:this.draggedTaskPath.split("/").pop()}),this.pendingRender=!0;return}if(this.activeDropCount>0||Date.now()<this.suppressRenderUntil){this.debugLog("ON-DATA-UPDATED: suppressed",{activeDropCount:this.activeDropCount,msRemaining:this.suppressRenderUntil-Date.now()});return}this.postDropTimer?(this.debugLog("ON-DATA-UPDATED: cancelling postDropTimer, rendering with fresh Bases data"),window.clearTimeout(this.postDropTimer),this.postDropTimer=null):this.debugLog("ON-DATA-UPDATED: normal render (no suppression active)");let t=this.getEphemeralState();try{this.render()}catch(r){ag.error(`[TaskNotes][${this.type}] Render error:`,{category:"internal",operation:"render-kanban-view",error:r}),this.renderError(r)}this.setEphemeralState(t)}readViewOptions(){var t;if(!(!this.config||typeof this.config.get!="function"))try{this.swimLanePropertyId=this.config.getAsPropertyId("swimLane"),this.columnWidth=this.config.get("columnWidth")||280,this.maxSwimlaneHeight=this.config.get("maxSwimlaneHeight")||600,this.hideEmptyColumns=this.config.get("hideEmptyColumns")||!1;let r=this.config.get("explodeListColumns");this.explodeListColumns=r!==!1;let a=this.config.get("consolidateStatusIcon");this.consolidateStatusIcon=a===!0,this.columnOrders=m4(this.config.get("columnOrder")),this.pinnedColumns=h4(this.config.get("pinnedColumns")),this.wipLimits=f4(this.config.get("wipLimits")),this.swimLaneOrders=m4((t=this.config.get("swimLaneOrder"))!=null?t:this.config.get("swimLaneOrders")),this.hideEmptySwimLanes=this.config.get("hideEmptySwimLanes")===!0,this.cardLayout=K7e(this.config.get("cardLayout"));let i=this.config.get("enableSearch");this.enableSearch=i!=null?i:!1;let s=this.config.get("expandedRelationshipFilterMode");this.expandedRelationshipFilterMode=YCe(s),this.hideTopLevelSubtasks=this.config.get("hideTopLevelSubtasks")===!0,this.configLoaded=!0}catch(r){ag.warn("[KanbanView] Failed to parse config:",{category:"configuration",operation:"parse-config",error:r})}}getEphemeralState(){var i;let t=super.getEphemeralState(),r=C4(t)?t:{},a={};for(let[s,o]of this.columnScrollers){let l=o.scrollContainer;l&&(a[s]=l.scrollTop)}return this.boardEl&&(this.boardEl.querySelectorAll(".kanban-view__column").forEach(l=>{let c=l.getAttribute("data-group"),d=l.querySelector(".kanban-view__cards");c&&d&&!(c in a)&&(a[c]=d.scrollTop)}),this.boardEl.querySelectorAll(".kanban-view__swimlane-column").forEach(l=>{let c=l.getAttribute("data-column"),d=l.getAttribute("data-swimlane");if(c&&d){let u=`${d}:${c}`,p=l.querySelector(".kanban-view__tasks-container");p&&!(u in a)&&(a[u]=p.scrollTop)}})),{...r,scrollTop:((i=this.rootElement)==null?void 0:i.scrollTop)||0,columnScroll:a}}setEphemeralState(t){if(!G7e(t))return;super.setEphemeralState(t);let r=Y7e(t);if(typeof t.scrollTop=="number"&&this.rootElement){let a=t.scrollTop;window.requestAnimationFrame(()=>{this.rootElement&&this.rootElement.isConnected&&(this.rootElement.scrollTop=a)})}r&&window.requestAnimationFrame(()=>{for(let[a,i]of this.columnScrollers){let s=r[a];if(s!==void 0){let o=i.scrollContainer;o&&(o.scrollTop=s)}}this.boardEl&&(this.boardEl.querySelectorAll(".kanban-view__column").forEach(s=>{let o=s.getAttribute("data-group");if(o&&r[o]!==void 0){let l=s.querySelector(".kanban-view__cards");l&&!this.columnScrollers.has(o)&&(l.scrollTop=r[o])}}),this.boardEl.querySelectorAll(".kanban-view__swimlane-column").forEach(s=>{let o=s.getAttribute("data-column"),l=s.getAttribute("data-swimlane");if(o&&l){let c=`${l}:${o}`;if(r[c]!==void 0){let d=s.querySelector(".kanban-view__tasks-container");d&&!this.columnScrollers.has(c)&&(d.scrollTop=r[c])}}}))})}async render(){var t,r;if(!(!this.boardEl||!this.rootElement)&&(t=this.data)!=null&&t.data){this.debugLog("RENDER-START",{activeDropCount:this.activeDropCount,suppressRenderRemaining:Math.max(0,this.suppressRenderUntil-Date.now()),draggedTaskPath:((r=this.draggedTaskPath)==null?void 0:r.split("/").pop())||null,currentTaskElementsCount:this.currentTaskElements.size}),this.config&&this.readViewOptions(),this.rootElement&&this.setupSearch(this.rootElement);try{let a=this.dataAdapter.extractDataItems();LE(this.data,a);let i=await yu(a,this.plugin),s=this.applySearchFilter(i);this.setExpandedRelationshipTaskScope(s);let o=this.getTopLevelRenderTasks(s),l=this.getTopLevelRenderTasks(i);if(this.setCurrentVisibleTaskPaths(o),this.destroyColumnScrollers(),this.boardEl.empty(),this.sortScopeTaskPaths.clear(),this.sortScopeCandidateTaskPaths.clear(),o.length===0&&!(s.length>0&&!this.hideEmptySwimLanes&&this.isPropertyField(this.swimLanePropertyId,"priority"))){this.isSearchWithNoResults(s,i.length)?this.renderSearchNoResults(this.boardEl):this.renderEmptyState();return}let c=rF(a);this.swimLanePropertyId&&KSe(a,c,this.swimLanePropertyId);let d=this.getGroupByPropertyId();if(!d){this.renderNoGroupByError();return}let u=this.groupTasks(o,d,c),p=this.groupTasks(l,d,c);this.swimLanePropertyId?await this.renderWithSwimLanes(u,o,p,l,c,d):await this.renderFlat(u,p)}catch(a){ag.error("[TaskNotes][KanbanView] Error rendering:",{category:"internal",operation:"rendering",error:a}),this.renderError(a instanceof Error?a:new Error(String(a)))}}}getGroupByPropertyId(){var r;let t=this.basesController;if((r=t==null?void 0:t.query)!=null&&r.views&&(t!=null&&t.viewName)){let a=t.query.views,i=t.viewName;for(let s=0;s<a.length;s++){let o=a[s];if(o&&o.name===i){if(o.groupBy){if(typeof o.groupBy=="object"&&o.groupBy.property)return o.groupBy.property;if(typeof o.groupBy=="string")return o.groupBy}return null}}}return null}getSortScopeKey(t,r=null){return r===null?t:`${r}::${t}`}getColumnScrollerKey(t,r=null){return r===null?t:`${r}:${t}`}getVisibleSortScopePaths(t,r=null){return this.sortScopeTaskPaths.get(this.getSortScopeKey(t,r))}getCandidateSortScopePaths(t,r=null){return this.sortScopeCandidateTaskPaths.get(this.getSortScopeKey(t,r))}setSortScopePathsForScope(t,r,a){this.sortScopeTaskPaths.set(this.getSortScopeKey(t,r),[...a])}hasVirtualScrollerForScope(t,r){return this.columnScrollers.has(this.getColumnScrollerKey(t,r))}canFastPatchManualOrderDrop(t,r,a,i,s){var l,c;let o=this.hasVirtualScrollerForScope(i,s);return!!r&&a.length===1&&((c=(l=t.draggedPaths)==null?void 0:l.length)!=null?c:1)===1&&(t.optimisticReorderApplied===!0||o)}canFastPatchCrossScopeDrop(t,r){var a,i;return r.length===1&&((i=(a=t.draggedPaths)==null?void 0:a.length)!=null?i:1)===1}setSortScopeCandidatePaths(t){this.sortScopeCandidateTaskPaths.clear();for(let[r,a]of t)this.sortScopeCandidateTaskPaths.set(r,[...a])}getCurrentVisibleTaskPathOrder(){return Array.from(this.currentVisibleTaskOrder.entries()).sort(([,t],[,r])=>t-r).map(([t])=>t)}setCurrentVisibleTaskPathOrder(t){this.currentVisibleTaskPaths.clear(),this.currentVisibleTaskOrder.clear(),t.forEach((r,a)=>{this.currentVisibleTaskPaths.add(r),this.currentVisibleTaskOrder.set(r,a)}),this.hideTopLevelSubtasks||(this.expandedRelationshipTaskPaths.clear(),this.expandedRelationshipTaskOrder.clear(),t.forEach((r,a)=>{this.expandedRelationshipTaskPaths.add(r),this.expandedRelationshipTaskOrder.set(r,a)}))}applyOptimisticSortOrderResult(t,r,a,i,s,o){let l=this.getVisibleSortScopePaths(i,s);if(!l)return!1;let c=UE(l,[t],r,a);if(!c)return!1;let d=this.getCurrentVisibleTaskPathOrder(),u=UE(d,[t],r,a);if(!u)return!1;let p=this.columnScrollers.get(this.getColumnScrollerKey(i,s));if(p&&!p.reorderItems({movedKeys:[t],targetKey:r,position:a?"before":"after"}))return!1;let m=BE(t,o);return jE(this.taskInfoCache,m),p&&($E(p.getItems(),f=>f,m,f=>{this.taskInfoCache.set(f.path,f)}),p.invalidateItems([...m.keys()])),this.setSortScopePathsForScope(i,s,c),this.setCurrentVisibleTaskPathOrder(u),!0}applySuccessfulKanbanDropLocally({path:t,dropPlan:r,dropTarget:a,sortOrderPlan:i,updatedTask:s,optimisticReorderApplied:o}){var C;if(!r.needsGroupUpdate&&!r.needsSwimlaneUpdate||r.isGroupByListProperty||r.isSwimlaneListProperty)return!1;let l=r.sourceColumn;if(!l)return!1;let c=this.swimLanePropertyId&&(C=r.sourceSwimlane)!=null?C:null,d=r.newGroupValue,u=this.swimLanePropertyId?r.newSwimLaneValue:null,p=this.getVisibleSortScopePaths(l,c),m=this.getVisibleSortScopePaths(d,u);if(!p||!m||!p.includes(t))return!1;let f=p.filter(x=>x!==t),h=this.insertPathIntoDropScope(m,t,a);if(!h)return!1;let g=this.moveVisiblePathForDrop(t,a);if(!g)return!1;let v=s!=null?s:this.buildTaskInfoForLocalDropPatch(t,r,i);if(!v)return!1;let k=i?BE(t,i):new Map,T=k.get(t);T&&(v.sortOrder=T);let b=this.columnScrollers.get(this.getColumnScrollerKey(l,c)),w=this.columnScrollers.get(this.getColumnScrollerKey(d,u)),S={items:[v],targetKey:a==null?void 0:a.taskPath,position:a?a.above?"before":"after":"end"};if(b&&!b.canRemoveItems([t])||w&&!w.canInsertItems(S)||!w&&!this.getTaskContainerForScope(d,u)||!w&&!o&&!a||b&&!b.removeItems([t]))return!1;if(w){if(!w.insertItems(S))return!1;w.invalidateItems([t]),this.removeNormalRenderedTask(t)}else if(!this.renderNormalTaskInDropScope(v,d,u,a))return!1;this.taskInfoCache.set(t,v),jE(this.taskInfoCache,k);for(let x of[b,w]){if(!x)continue;let E=x.getItems();$E(E,I=>I,k,I=>{this.taskInfoCache.set(I.path,I)});let _=new Set(E.map(I=>I.path)),F=[...k.keys()].filter(I=>_.has(I));x.invalidateItems(F)}return this.setSortScopePathsForScope(l,c,f),this.setSortScopePathsForScope(d,u,h),this.setCurrentVisibleTaskPathOrder(g),this.updateScopeEmptyHint(l,c),this.updateScopeEmptyHint(d,u),this.updateCountDisplaysForScope(l,c),this.updateCountDisplaysForScope(d,u),!0}insertPathIntoDropScope(t,r,a){let i=t.filter(s=>s!==r);return a?i.includes(a.taskPath)?UE([...i,r],[r],a.taskPath,a.above):null:[...i,r]}moveVisiblePathForDrop(t,r){let a=this.getCurrentVisibleTaskPathOrder();return a.includes(t)?r?a.includes(r.taskPath)?UE(a,[t],r.taskPath,r.above):null:[...a.filter(i=>i!==t),t]:null}buildTaskInfoForLocalDropPatch(t,r,a){var o;let i=this.taskInfoCache.get(t);if(!i)return null;let s={...i,customProperties:{...(o=i.customProperties)!=null?o:{}}};return r.needsGroupUpdate&&this.applyLocalDropValue(s,r.groupByTaskProp,r.groupByFrontmatterKey,r.newGroupValue),r.needsSwimlaneUpdate&&r.swimlaneFrontmatterKey&&r.newSwimLaneValue!==null&&this.applyLocalDropValue(s,r.swimlaneTaskProp,r.swimlaneFrontmatterKey,r.newSwimLaneValue),a!=null&&a.sortOrder&&(s.sortOrder=a.sortOrder),s}applyLocalDropValue(t,r,a,i){var o;let s=i==="None"?null:i;r&&(t[r]=s),t.customProperties={...(o=t.customProperties)!=null?o:{},[a]:s}}createRenderedTaskWrapper(t){let r=this.containerEl.ownerDocument,a=Ie(r,"div");a.className="kanban-view__card-wrapper",a.setAttribute("draggable","true"),a.setAttribute("data-task-path",t.path);let i=pr(t,this.plugin,this.getVisibleProperties(),this.getCardOptions());return a.appendChild(i),this.setupCardDragHandlers(a,t),a}renderNormalTaskInDropScope(t,r,a,i){let s=this.getTaskContainerForScope(r,a);if(!s)return!1;let o=this.currentTaskElements.get(t.path),l=this.createRenderedTaskWrapper(t);if(this.removeEmptyCellHint(s),o&&s.contains(o))o.replaceWith(l);else{let c=i?this.currentTaskElements.get(i.taskPath):null;c&&s.contains(c)?i!=null&&i.above?s.insertBefore(l,c):s.insertBefore(l,c.nextSibling):s.appendChild(l),o==null||o.remove()}return this.currentTaskElements.set(t.path,l),!0}removeNormalRenderedTask(t){let r=this.currentTaskElements.get(t);r==null||r.remove(),this.currentTaskElements.delete(t)}getTaskContainerForScope(t,r){if(!this.boardEl)return null;let a=cF(t);if(r===null)return this.boardEl.querySelector(`.kanban-view__column[data-group="${a}"] .kanban-view__cards`);let i=cF(r);return this.boardEl.querySelector(`.kanban-view__swimlane-column[data-column="${a}"][data-swimlane="${i}"] .kanban-view__tasks-container`)}updateScopeEmptyHint(t,r){var s;let a=this.getTaskContainerForScope(t,r);if(!a)return;let i=(s=this.getVisibleSortScopePaths(t,r))!=null?s:[];this.removeEmptyCellHint(a),i.length===0&&this.renderEmptyCellHint(a,t,r)}updateCountDisplaysForScope(t,r){this.updateColumnCountDisplay(t),r!==null&&this.updateSwimLaneCountDisplay(r)}updateColumnCountDisplay(t){var o;let r=this.getVisibleColumnTaskCount(t),a=oF(r,this.wipLimits[t]),i=cF(t),s=(o=this.boardEl)==null?void 0:o.querySelector(`.kanban-view__column[data-group="${i}"] .kanban-view__column-count, .kanban-view__column-header-cell[data-column-key="${i}"] .kanban-view__column-count`);s&&(s.textContent=a.text,s.classList.toggle("kanban-view__column-count--exceeded",a.isExceeded))}getVisibleColumnTaskCount(t){var i,s;if(!this.swimLanePropertyId)return(s=(i=this.getVisibleSortScopePaths(t,null))==null?void 0:i.length)!=null?s:0;let r=`::${t}`,a=0;for(let[o,l]of this.sortScopeTaskPaths)o.endsWith(r)&&(a+=l.length);return a}updateSwimLaneCountDisplay(t){var l,c;let r=cF(t),a=(c=(l=this.boardEl)==null?void 0:l.querySelector(`.kanban-view__swimlane-column[data-swimlane="${r}"]`))==null?void 0:c.closest(".kanban-view__swimlane-row"),i=a==null?void 0:a.querySelector(".kanban-view__swimlane-count");if(!i)return;let s=`${t}::`,o=0;for(let[d,u]of this.sortScopeTaskPaths)d.startsWith(s)&&(o+=u.length);i.textContent=`${o}`}async confirmLargeReorder(t,r,a){let i=this.plugin.settings.fieldMapping.sortOrder,s=a===null?this.plugin.i18n.translate("views.kanban.reorder.scope.column",{group:r}):this.plugin.i18n.translate("views.kanban.reorder.scope.columnInSwimlane",{group:r,swimlane:a});return ur(this.plugin.app,{title:this.plugin.i18n.translate("common.reorder.confirmLargeTitle"),message:this.plugin.i18n.translate("common.reorder.confirmLargeMessage",{field:i,count:t,scope:s}),confirmText:this.plugin.i18n.translate("common.reorder.confirmButton"),cancelText:this.plugin.i18n.translate("common.cancel")})}groupTasks(t,r,a){var s,o;let i=this.plugin.settings.fieldMapping.sortOrder;return HCe({taskNotes:t,groupByPropertyId:r,pathToProps:a,explodeListColumns:this.explodeListColumns,groupedData:this.dataAdapter.getGroupedData(),convertGroupKeyToString:l=>this.dataAdapter.convertGroupKeyToString(l),isListTypeProperty:l=>this.isListTypeProperty(l),getListPropertyValue:(l,c)=>this.getListPropertyValue(l,c,a),canonicalizeGroupKey:(l,c)=>this.canonicalizeConfiguredGroupKey(l,c),sortOrderValues:_E(this.dataAdapter,i)?this.getSortOrderValues(t,i):void 0,statusConfigs:this.plugin.settings.customStatuses||[],priorityConfigs:((o=(s=this.plugin.priorityManager)==null?void 0:s.getAllPriorities)==null?void 0:o.call(s))||this.plugin.settings.customPriorities||[],isStatusGroupingProperty:l=>this.isStatusGroupingProperty(l),isPriorityGroupingProperty:l=>this.isPriorityGroupingProperty(l),getStatusGroupKeyAliases:l=>this.getStatusGroupKeyAliases(l),pinnedColumns:this.pinnedColumns})}getSortOrderValues(t,r){var i;let a=new Map;for(let s of t){let o=this.plugin.app.vault.getAbstractFileByPath(s.path),l=o instanceof En.TFile?(i=this.plugin.app.metadataCache.getFileCache(o))==null?void 0:i.frontmatter:void 0,c=l==null?void 0:l[r];c!=null&&a.set(s.path,c)}return a}isListTypeProperty(t){return OCe(t,{contextsField:this.plugin.fieldMapper.toUserField("contexts"),projectsField:this.plugin.fieldMapper.toUserField("projects")},r=>tF(this.plugin.app,r))}getListPropertyValue(t,r,a){return zCe(t,r,a,{contextsField:this.plugin.fieldMapper.toUserField("contexts"),projectsField:this.plugin.fieldMapper.toUserField("projects")})}getSwimLaneKeys(t,r){return UCe({task:t,pathToProps:r,swimLanePropertyId:this.swimLanePropertyId,explodeListColumns:this.explodeListColumns,isListTypeProperty:a=>this.isListTypeProperty(a),getListPropertyValue:(a,i)=>this.getListPropertyValue(a,i,r),canonicalizeGroupKey:(a,i)=>this.canonicalizeConfiguredGroupKey(a,i)})}isStatusGroupingProperty(t){return lF(t,this.plugin.fieldMapper.toUserField("status"))}isPriorityGroupingProperty(t){return y4(t,this.plugin.fieldMapper.toUserField("priority"))}canonicalizeConfiguredGroupKey(t,r){var s,o;let a=this.plugin.fieldMapper.toUserField("status"),i=this.plugin.fieldMapper.toUserField("priority");return jCe({groupKey:t,propertyId:r,fields:{statusField:a,priorityField:i},statuses:lF(r,a)?((o=(s=this.plugin.statusManager)==null?void 0:s.getAllStatuses)==null?void 0:o.call(s))||[]:[],normalizeStatusValue:l=>{var c,d,u;return(u=(d=(c=this.plugin.statusManager)==null?void 0:c.normalizeStatusValue)==null?void 0:d.call(c,l))!=null?u:l},normalizePriorityValue:l=>{var c,d,u;return(u=(d=(c=this.plugin.priorityManager)==null?void 0:c.normalizePriorityValue)==null?void 0:d.call(c,l))!=null?u:l},getStatusGroupKeyAliases:l=>this.getStatusGroupKeyAliases(l)})}findStatusConfigForGroupKey(t){var r,a;return v4(t,((a=(r=this.plugin.statusManager)==null?void 0:r.getAllStatuses)==null?void 0:a.call(r))||[],i=>{var s,o,l;return(l=(o=(s=this.plugin.statusManager)==null?void 0:s.normalizeStatusValue)==null?void 0:o.call(s,i))!=null?l:i},i=>this.getStatusGroupKeyAliases(i))}getStatusGroupKeyAliases(t){return BCe(t,r=>Zo(r,this.plugin.app))}isUnknownStatusGroup(t,r){if(!r||!this.isStatusGroupingProperty(r))return!1;let a=t.trim();return!a||a==="None"?!1:!this.findStatusConfigForGroupKey(a)}markUnknownStatusColumn(t,r){t.addClass("kanban-view__column--unknown-status"),t.setAttribute("data-unknown-status",r),(0,En.setTooltip)(t,"Status is not defined in TaskNotes settings")}markUnknownStatusColumnHeader(t,r){t.addClass("kanban-view__column-header--unknown-status"),t.setAttribute("data-unknown-status",r),(0,En.setTooltip)(t,"Status is not defined in TaskNotes settings")}async renderFlat(t,r){if(!this.boardEl)return;this.boardEl.classList.remove("kanban-view__board--swimlanes"),this.sortScopeTaskPaths.clear(),this.setSortScopeCandidatePaths(Array.from(r.entries()).map(([l,c])=>[this.getSortScopeKey(l),c.map(d=>d.path)])),this.boardEl.style.setProperty("--kanban-column-width",`${this.columnWidth}px`);let a=this.getVisibleProperties(),i=this.getGroupByPropertyId(),s=Array.from(t.keys()),o=i?this.applyColumnOrder(i,s):s;for(let l of o){let c=t.get(l)||[];if(!g4(this.hideEmptyColumns,l,c,this.pinnedColumns))continue;this.sortScopeTaskPaths.set(this.getSortScopeKey(l),c.map(u=>u.path));let d=await this.createColumn(l,c,a,i);this.boardEl&&this.boardEl.appendChild(d)}}async renderWithSwimLanes(t,r,a,i,s,o){if(!this.swimLanePropertyId)return;this.sortScopeTaskPaths.clear();let l=k4(r,t,f=>this.getSwimLaneKeys(f,s)),c=k4(i,a,f=>this.getSwimLaneKeys(f,s));this.setSortScopeCandidatePaths(Array.from(c.entries()).flatMap(([f,h])=>Array.from(h.entries()).map(([g,v])=>[this.getSortScopeKey(g,f),v.map(k=>k.path)])));let d=Array.from(t.keys()),u=this.applyColumnOrder(o,d),p=VCe(u,l,this.hideEmptyColumns,this.pinnedColumns),m=this.applySwimLaneOrderToMap(this.swimLanePropertyId,l,d);await this.renderSwimLaneTable(m,p,s,o)}async renderSwimLaneTable(t,r,a,i){var c;if(!this.boardEl)return;this.boardEl.style.setProperty("--kanban-column-width",`${this.columnWidth}px`),this.boardEl.style.setProperty("--kanban-swimlane-max-height",`${this.maxSwimlaneHeight}px`),this.boardEl.addClass("kanban-view__board--swimlanes");let s=this.boardEl.createDiv({cls:"kanban-view__swimlane-row kanban-view__swimlane-row--header"});s.createDiv({cls:"kanban-view__swimlane-label"});let o=T4(t,r);for(let d of r){let u=s.createDiv({cls:"kanban-view__column-header-cell"});u.setAttribute("draggable","true"),u.setAttribute("data-column-key",d),this.isUnknownStatusGroup(d,i)&&this.markUnknownStatusColumnHeader(u,d);let m=u.createSpan({cls:"kanban-view__drag-handle"});if(m.setAttribute("aria-hidden","true"),(0,En.setIcon)(m,"grip-vertical"),this.consolidateStatusIcon&&this.isGroupedByStatus()){let h=this.plugin.statusManager.getStatusConfig(d);if(h!=null&&h.icon){let g=u.createSpan({cls:"kanban-view__column-icon"});g.style.color=h.color,(0,En.setIcon)(g,h.icon)}}let f=u.createSpan({cls:"kanban-view__column-title"});this.renderGroupTitleWrapper(f,d,!1,!0),this.renderColumnCount(u,d,(c=o.get(d))!=null?c:0),this.setupColumnHeaderDragHandlers(u)}let l=this.getVisibleProperties();for(let[d,u]of t){let p=this.boardEl.createDiv({cls:"kanban-view__swimlane-row"}),m=p.createDiv({cls:"kanban-view__swimlane-label"}),f=m.createDiv({cls:"kanban-view__swimlane-title"});this.renderGroupTitleWrapper(f,d,!0);let h=Array.from(u.values()).reduce((g,v)=>g+v.length,0);m.createDiv({cls:"kanban-view__swimlane-count",text:`${h}`});for(let g of r){let v=u.get(g)||[],k=this.isUnknownStatusGroup(g,i);this.sortScopeTaskPaths.set(this.getSortScopeKey(g,d),v.map(w=>w.path));let T=p.createDiv({cls:"kanban-view__swimlane-column",attr:{"data-column":g,"data-swimlane":d}});k&&this.markUnknownStatusColumn(T,g),this.setupSwimLaneCellDragDrop(T,g,d);let b=T.createDiv({cls:"kanban-view__tasks-container"});if(v.length>=this.VIRTUAL_SCROLL_THRESHOLD)await this.createVirtualSwimLaneCell(b,`${d}:${g}`,v,l);else{let w=this.getCardOptions();for(let S of v){let C=b.createDiv({cls:"kanban-view__card-wrapper"});C.setAttribute("draggable","true"),C.setAttribute("data-task-path",S.path);let x=pr(S,this.plugin,l,w);C.appendChild(x),this.currentTaskElements.set(S.path,C),this.taskInfoCache.set(S.path,S),this.setupCardDragHandlers(C,S)}}v.length===0&&this.renderEmptyCellHint(b,g,d),this.createAddTaskButton(T,i,g,d)}}}async createColumn(t,r,a,i){let s=this.containerEl.ownerDocument,o=Ie(s,"div");o.className="kanban-view__column",o.style.width=`${this.columnWidth}px`,o.setAttribute("data-group",t);let l=this.isUnknownStatusGroup(t,i);l&&this.markUnknownStatusColumn(o,t);let c=o.createDiv({cls:"kanban-view__column-header"});c.setAttribute("draggable","true"),c.setAttribute("data-column-key",t),l&&this.markUnknownStatusColumnHeader(c,t);let d=c.createSpan({cls:"kanban-view__drag-handle"});if(d.setAttribute("aria-hidden","true"),(0,En.setIcon)(d,"grip-vertical"),this.consolidateStatusIcon&&this.isGroupedByStatus()){let f=this.plugin.statusManager.getStatusConfig(t);if(f!=null&&f.icon){let h=c.createSpan({cls:"kanban-view__column-icon"});h.style.color=f.color,(0,En.setIcon)(h,f.icon)}}let u=c.createSpan({cls:"kanban-view__column-title"});this.renderGroupTitleWrapper(u,t,!1,!0),this.renderColumnCount(c,t,r.length),this.setupColumnHeaderDragHandlers(c);let p=o.createDiv({cls:"kanban-view__cards"});this.setupColumnDragDrop(o,p,t);let m=this.getCardOptions();return r.length>=this.VIRTUAL_SCROLL_THRESHOLD?this.createVirtualColumn(p,t,r,a,m):this.createNormalColumn(p,r,a,m),r.length===0&&this.renderEmptyCellHint(p,t),this.createAddTaskButton(o,i,t),o}renderColumnCount(t,r,a){let i=oF(a,this.wipLimits[r]),s=t.createSpan({cls:"kanban-view__column-count",text:i.text});i.isExceeded&&s.addClass("kanban-view__column-count--exceeded")}createAddTaskButton(t,r,a,i=null){let o=t.createDiv({cls:"kanban-view__add-task-footer"}).createEl("button",{cls:"kanban-view__add-task-button clickable-icon",attr:{type:"button","aria-label":this.getAddTaskLabel(a,i)}});(0,En.setIcon)(o,"plus"),(0,En.setTooltip)(o,this.getAddTaskLabel(a,i)),o.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),this.openTaskCreationForKanbanCell(r,a,i)})}getAddTaskLabel(t,r){return r?`Add task to ${t} / ${r}`:`Add task to ${t}`}renderEmptyCellHint(t,r,a=null){let i=this.plugin.i18n.translate("views.kanban.noTasks"),s=a?`${i}: ${r} / ${a}`:`${i}: ${r}`,o=t.createDiv({cls:"kanban-view__empty-cell",attr:{"aria-label":s}}),l=o.createSpan({cls:"kanban-view__empty-cell-icon",attr:{"aria-hidden":"true"}});(0,En.setIcon)(l,"plus-circle"),o.createSpan({cls:"kanban-view__empty-cell-text",text:i})}removeEmptyCellHint(t){var r;(r=t==null?void 0:t.querySelector(".kanban-view__empty-cell"))==null||r.remove()}async openTaskCreationForKanbanCell(t,r,a=null){await this.createFileForView(void 0,i=>{let s=(o,l)=>{ECe({frontmatter:i,propertyId:o,groupKey:l,propertyMapper:this.propertyMapper,fieldMapper:this.plugin.fieldMapper,userFields:this.plugin.settings.userFields,isListTypeProperty:c=>this.isListTypeProperty(c),coerceGroupKeyForFrontmatter:(c,d)=>this.coerceGroupKeyForFrontmatter(c,d)})};s(t,r),s(this.swimLanePropertyId,a)})}coerceGroupKeyForFrontmatter(t,r){return nF(this.plugin.app,t,r,this.plugin.settings.userFields)}createVirtualColumn(t,r,a,i,s){t.addClass("kanban-view__cards--virtual");let o=this.containerEl.ownerDocument,l=new hm({container:t,items:a,overscan:3,renderItem:c=>{let d=Ie(o,"div");d.className="kanban-view__card-wrapper",d.setAttribute("draggable","true"),d.setAttribute("data-task-path",c.path);let u=pr(c,this.plugin,i,s);return d.appendChild(u),this.taskInfoCache.set(c.path,c),this.setupCardDragHandlers(d,c),d},getItemKey:c=>c.path});this.columnScrollers.set(r,l)}async createVirtualSwimLaneCell(t,r,a,i){t.addClass("kanban-view__tasks-container--virtual");let s=this.getCardOptions(),o=this.containerEl.ownerDocument,l=new hm({container:t,items:a,overscan:3,renderItem:c=>{let d=Ie(o,"div");d.className="kanban-view__card-wrapper",d.setAttribute("draggable","true"),d.setAttribute("data-task-path",c.path);let u=pr(c,this.plugin,i,s);return d.appendChild(u),this.taskInfoCache.set(c.path,c),this.setupCardDragHandlers(d,c),d},getItemKey:c=>c.path});this.columnScrollers.set(r,l)}createNormalColumn(t,r,a,i){for(let s of r){let o=t.createDiv({cls:"kanban-view__card-wrapper"});o.setAttribute("draggable","true"),o.setAttribute("data-task-path",s.path);let l=pr(s,this.plugin,a,i);o.appendChild(l),this.currentTaskElements.set(s.path,o),this.taskInfoCache.set(s.path,s),this.setupCardDragHandlers(o,s)}}setupColumnHeaderDragHandlers(t){let r=t.dataset.columnKey;if(!r)return;let a=t.classList.contains("kanban-view__column-header-cell"),i=a?"kanban-view__column-header-cell--dragging":"kanban-view__column-header--dragging",s=a?"kanban-view__column-header-cell--dragover":"kanban-view__column-header--dragover";t.addEventListener("dragstart",o=>{o.dataTransfer&&(o.dataTransfer.effectAllowed="move",o.dataTransfer.setData("text/x-kanban-column",r),t.classList.add(i))}),t.addEventListener("dragover",o=>{var l;(l=o.dataTransfer)!=null&&l.types.includes("text/x-kanban-column")&&(o.preventDefault(),o.stopPropagation(),o.dataTransfer.dropEffect="move",t.classList.add(s))}),t.addEventListener("dragleave",o=>{var l;(l=o.dataTransfer)!=null&&l.types.includes("text/x-kanban-column")&&o.target===t&&t.classList.remove(s)}),t.addEventListener("drop",o=>{(async()=>{var g;if(!((g=o.dataTransfer)!=null&&g.types.includes("text/x-kanban-column")))return;o.preventDefault(),o.stopPropagation(),t.classList.remove(s);let l=o.dataTransfer.getData("text/x-kanban-column"),c=t.dataset.columnKey;if(!c||!l||l===c)return;let d=this.getGroupByPropertyId();if(!d)return;let u=a?".kanban-view__column-header-cell":".kanban-view__column-header",p=Array.from(this.boardEl.querySelectorAll(u)).map(v=>v.dataset.columnKey).filter(Boolean),m=p.indexOf(l),f=p.indexOf(c),h=[...p];h.splice(m,1),h.splice(f,0,l),await this.saveColumnOrder(d,h),await this.render()})()}),t.addEventListener("dragend",()=>{t.classList.remove(i)}),this.setupColumnHeaderTouchHandlers(t,r,a,i)}setupColumnHeaderTouchHandlers(t,r,a,i){KCe(En.Platform.isMobile)&&(t.addEventListener("contextmenu",s=>{(this.longPressTimer||this.touchDragActive)&&(s.preventDefault(),s.stopPropagation())}),t.addEventListener("touchstart",s=>{if(s.touches.length!==1)return;let o=s.touches[0];this.touchStartX=o.clientX,this.touchStartY=o.clientY,this.longPressTimer=window.setTimeout(()=>{var l;this.touchDragActive=!0,this.touchDragType="column",this.draggedColumnKey=r,this.containerEl.ownerDocument.addEventListener("contextmenu",this.boundContextMenuBlocker,!0),t.classList.add(i),this.touchDragGhost=this.createTouchDragGhost(t,o.clientX,o.clientY),(l=navigator.vibrate)==null||l.call(navigator,50)},this.LONG_PRESS_DELAY)},{passive:!0}),t.addEventListener("touchmove",s=>{if(s.touches.length!==1)return;let o=s.touches[0];if(!this.touchDragActive&&this.longPressTimer){let l=Math.abs(o.clientX-this.touchStartX),c=Math.abs(o.clientY-this.touchStartY);(l>this.TOUCH_MOVE_THRESHOLD||c>this.TOUCH_MOVE_THRESHOLD)&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null);return}this.touchDragActive&&this.touchDragType==="column"&&(s.preventDefault(),this.updateTouchDragGhost(o.clientX,o.clientY),this.updateDropTargetFeedback(o.clientX,o.clientY),this.handleAutoScroll(o.clientX))},{passive:!1}),t.addEventListener("touchend",s=>{(async()=>{if(this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),t.classList.remove(i),!this.touchDragActive||this.touchDragType!=="column")return;let o=s.changedTouches[0];if(!o){this.clearTouchDragState();return}let l=this.findDropTargetAt(o.clientX,o.clientY);if(l.type&&l.groupKey&&this.draggedColumnKey&&l.groupKey!==this.draggedColumnKey){let c=this.getGroupByPropertyId();if(c){let d=a?".kanban-view__column-header-cell":".kanban-view__column-header",u=Array.from(this.boardEl.querySelectorAll(d)).map(f=>f.dataset.columnKey).filter(Boolean),p=u.indexOf(this.draggedColumnKey),m=u.indexOf(l.groupKey);if(p!==-1&&m!==-1){let f=[...u];f.splice(p,1),f.splice(m,0,this.draggedColumnKey),await this.saveColumnOrder(c,f),await this.render()}}}this.clearTouchDragState()})()}),t.addEventListener("touchcancel",()=>{t.classList.remove(i),this.clearTouchDragState()}))}setupColumnDragDrop(t,r,a){t.addEventListener("dragover",i=>{var s;(s=i.dataTransfer)!=null&&s.types.includes("text/x-kanban-column")||(i.preventDefault(),i.stopPropagation(),i.dataTransfer&&(i.dataTransfer.dropEffect="move"),t.classList.add("kanban-view__column--dragover"))}),t.addEventListener("dragleave",i=>{let s=t.getBoundingClientRect(),o=i.clientX,l=i.clientY;(o<s.left||o>=s.right||l<s.top||l>=s.bottom)&&t.classList.remove("kanban-view__column--dragover")}),t.addEventListener("drop",i=>{(async()=>{var f,h,g,v,k,T;if((f=i.dataTransfer)!=null&&f.types.includes("text/x-kanban-column"))return;if(i.preventDefault(),i.stopPropagation(),this.debugLog("COLUMN-DROP-EVENT-RECEIVED",{targetColumn:a,draggedTaskPath:((h=this.draggedTaskPath)==null?void 0:h.split("/").pop())||"(null)",dropTargetPath:((g=this.dropTargetPath)==null?void 0:g.split("/").pop())||"(null)",eventTarget:(k=(v=i.target)==null?void 0:v.className)==null?void 0:k.slice(0,60)}),!this.draggedTaskPath){this.debugLog("COLUMN-DROP: bail — draggedTaskPath is null (dragend already fired?)"),t.classList.remove("kanban-view__column--dragover"),this.cleanupDragShift();return}let s=iF(this.dropTargetPath,this.dropAbove),o=t.querySelector(".kanban-view__cards"),l=this.draggedFromColumn!==a,c=!!s&&(o==null?void 0:o.querySelector(`[data-task-path="${CSS.escape(s.taskPath)}"]`))!=null,d=o?u4({cardsContainer:o,draggedTaskPaths:this.draggedTaskPaths,currentInsertionIndex:this.currentInsertionIndex,clientY:i.clientY}):void 0,u=d4({dropTarget:d!=null?d:s,isCrossScope:l,targetInDropScope:!!d||c,fallbackDropTarget:l?void 0:d});this.debugLog("COLUMN-DROP",{draggedTask:(T=this.draggedTaskPath)==null?void 0:T.split("/").pop(),sourceColumn:this.draggedFromColumn,targetColumn:a,isCrossColumn:l,dropTarget:u?{file:u.taskPath.split("/").pop(),above:u.above}:null,cardsContainerFound:!!o,cardsContainerChildCount:o==null?void 0:o.childElementCount,draggedTaskPaths:this.draggedTaskPaths.map(b=>b.split("/").pop())});let p=WE(this.draggedTaskPaths,this.draggedTaskPath),m=this.performOptimisticReorder(p,u,o);this.debugLog("COLUMN-DROP-OPTIMISTIC-RESULT",{success:m}),t.classList.remove("kanban-view__column--dragover"),this.cleanupDragShift(),await this.handleTaskDrop(this.draggedTaskPath,a,null,u,{optimisticReorderApplied:m,draggedPaths:p}),this.draggedTaskPath=null,this.draggedFromColumn=null})()}),t.addEventListener("dragend",()=>{t.classList.remove("kanban-view__column--dragover")})}setupSwimLaneCellDragDrop(t,r,a){t.addEventListener("dragover",i=>{i.preventDefault(),i.stopPropagation(),i.dataTransfer&&(i.dataTransfer.dropEffect="move"),t.classList.add("kanban-view__swimlane-column--dragover")}),t.addEventListener("dragleave",i=>{let s=t.getBoundingClientRect(),o=i.clientX,l=i.clientY;(o<s.left||o>=s.right||l<s.top||l>=s.bottom)&&t.classList.remove("kanban-view__swimlane-column--dragover")}),t.addEventListener("drop",i=>{(async()=>{var g,v,k,T,b;if(i.preventDefault(),i.stopPropagation(),this.debugLog("SWIMLANE-CELL-DROP-EVENT-RECEIVED",{targetColumn:r,targetSwimlane:a,draggedTaskPath:((g=this.draggedTaskPath)==null?void 0:g.split("/").pop())||"(null)",dropTargetPath:((v=this.dropTargetPath)==null?void 0:v.split("/").pop())||"(null)",eventTarget:(T=(k=i.target)==null?void 0:k.className)==null?void 0:T.slice(0,60)}),!this.draggedTaskPath){this.debugLog("SWIMLANE-CELL-DROP: bail — draggedTaskPath is null (dragend already fired?)"),t.classList.remove("kanban-view__swimlane-column--dragover"),this.cleanupDragShift();return}let s=iF(this.dropTargetPath,this.dropAbove),o=t.querySelector(".kanban-view__tasks-container"),l=this.draggedFromColumn!==r,c=this.draggedFromSwimlane!==a,d=l||c,u=!!s&&(o==null?void 0:o.querySelector(`[data-task-path="${CSS.escape(s.taskPath)}"]`))!=null,p=o?u4({cardsContainer:o,draggedTaskPaths:this.draggedTaskPaths,currentInsertionIndex:this.currentInsertionIndex,clientY:i.clientY}):void 0,m=d4({dropTarget:p!=null?p:s,isCrossScope:d,targetInDropScope:!!p||u,fallbackDropTarget:d?void 0:p}),f=WE(this.draggedTaskPaths,this.draggedTaskPath);this.debugLog("SWIMLANE-CELL-DROP",{draggedTask:(b=this.draggedTaskPath)==null?void 0:b.split("/").pop(),isCrossColumn:l,isCrossSwimlane:c,dropTarget:m?{file:m.taskPath.split("/").pop(),above:m.above}:null,cardsContainerFound:!!o,cardsContainerChildCount:o==null?void 0:o.childElementCount});let h=this.performOptimisticReorder(f,m,o);this.debugLog("SWIMLANE-CELL-DROP-OPTIMISTIC-RESULT",{success:h}),t.classList.remove("kanban-view__swimlane-column--dragover"),this.cleanupDragShift(),await this.handleTaskDrop(this.draggedTaskPath,r,a,m,{optimisticReorderApplied:h,draggedPaths:f}),this.draggedTaskPath=null,this.draggedFromColumn=null})()}),t.addEventListener("dragend",()=>{t.classList.remove("kanban-view__swimlane-column--dragover")})}createTouchDragGhost(t,r,a){let i=t.cloneNode(!0);return i.classList.add("kanban-view__touch-ghost"),i.style.cssText=`
position: fixed;
left: ${r}px;
top: ${a}px;
width: ${t.offsetWidth}px;
pointer-events: none;
z-index: 10000;
opacity: 0.8;
transform: translate(-50%, -50%) rotate(3deg);
box-shadow: 0 8px 24px rgba(0,0,0,0.3);
`,this.containerEl.ownerDocument.body.appendChild(i),i}updateTouchDragGhost(t,r){this.touchDragGhost&&(this.touchDragGhost.style.left=`${t}px`,this.touchDragGhost.style.top=`${r}px`)}removeTouchDragGhost(){this.touchDragGhost&&(this.touchDragGhost.remove(),this.touchDragGhost=null)}findDropTargetAt(t,r){this.touchDragGhost&&(this.touchDragGhost.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),this.touchDragGhost.classList.add("tn-static-display-none-6b99de8b"));let i=this.containerEl.ownerDocument.elementFromPoint(t,r);if(this.touchDragGhost&&(this.touchDragGhost.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),this.touchDragGhost.style.removeProperty("display")),!i)return{type:null,groupKey:null,swimLaneKey:null,element:null};let s=i.closest(".kanban-view__card-wrapper"),o=s==null?void 0:s.dataset.taskPath;if(s&&o&&!this.draggedTaskPaths.includes(o)){let u=s.closest("[data-group]"),p=s.closest("[data-column]"),m=s.closest("[data-swimlane]"),f=(u==null?void 0:u.dataset.group)||(p==null?void 0:p.dataset.column)||null,h=s.getBoundingClientRect();return{type:"task",groupKey:f,swimLaneKey:(m==null?void 0:m.dataset.swimlane)||null,element:s,taskPath:o,above:r<h.top+h.height/2,cardsContainer:s.parentElement}}let l=i.closest("[data-column][data-swimlane]");if(l)return{type:"swimlane",groupKey:l.dataset.column||null,swimLaneKey:l.dataset.swimlane||null,element:l};let c=i.closest("[data-group]");if(c)return{type:"column",groupKey:c.dataset.group||null,swimLaneKey:null,element:c};let d=i.closest("[data-column-key]");return d?{type:"columnHeader",groupKey:d.dataset.columnKey||null,swimLaneKey:null,element:d}:{type:null,groupKey:null,swimLaneKey:null,element:null}}clearDragoverFeedback(){var t,r,a,i;(t=this.boardEl)==null||t.querySelectorAll(".kanban-view__column--dragover").forEach(s=>{s.classList.remove("kanban-view__column--dragover")}),(r=this.boardEl)==null||r.querySelectorAll(".kanban-view__swimlane-column--dragover").forEach(s=>{s.classList.remove("kanban-view__swimlane-column--dragover")}),(a=this.boardEl)==null||a.querySelectorAll(".kanban-view__column-header--dragover").forEach(s=>{s.classList.remove("kanban-view__column-header--dragover")}),(i=this.boardEl)==null||i.querySelectorAll(".kanban-view__column-header-cell--dragover").forEach(s=>{s.classList.remove("kanban-view__column-header-cell--dragover")})}updateDropTargetFeedback(t,r){var i;this.clearDragoverFeedback();let a=this.findDropTargetAt(t,r);if(a.element)if(a.type==="column")a.element.classList.add("kanban-view__column--dragover");else if(a.type==="swimlane")a.element.classList.add("kanban-view__swimlane-column--dragover");else if(a.type==="task"){let s=a.element.closest(".kanban-view__swimlane-column");s?s.classList.add("kanban-view__swimlane-column--dragover"):(i=a.element.closest(".kanban-view__column"))==null||i.classList.add("kanban-view__column--dragover")}else a.type==="columnHeader"&&this.touchDragType==="column"&&(a.element.classList.contains("kanban-view__column-header-cell")?a.element.classList.add("kanban-view__column-header-cell--dragover"):a.element.classList.add("kanban-view__column-header--dragover"))}clearTouchDragState(){var t,r;this.touchDragActive=!1,this.containerEl.ownerDocument.removeEventListener("contextmenu",this.boundContextMenuBlocker,!0),this.removeTouchDragGhost(),this.stopAutoScroll(),this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),this.clearDragoverFeedback();for(let a of this.draggedTaskPaths)(t=this.currentTaskElements.get(a))==null||t.classList.remove("kanban-view__card--dragging");(r=this.activeDragSourceElement)==null||r.classList.remove("kanban-view__card--dragging"),this.activeDragSourceElement=null,this.draggedTaskPath=null,this.draggedTaskPaths=[],this.draggedFromColumn=null,this.draggedFromSwimlane=null,this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear(),this.touchDragType=null,this.draggedColumnKey=null}handleAutoScroll(t){if(!this.boardEl)return;let r=this.boardEl.getBoundingClientRect(),a=r.left+this.AUTO_SCROLL_EDGE,i=r.right-this.AUTO_SCROLL_EDGE,s=0;t<a?s=-1:t>i&&(s=1),s!==this.autoScrollDirection&&(this.stopAutoScroll(),this.autoScrollDirection=s,s!==0&&(this.autoScrollTimer=window.setInterval(()=>{this.boardEl&&(this.boardEl.scrollLeft+=this.autoScrollDirection*this.AUTO_SCROLL_SPEED)},16)))}stopAutoScroll(){this.autoScrollTimer&&(window.clearInterval(this.autoScrollTimer),this.autoScrollTimer=null),this.autoScrollDirection=0}setupCardDragHandlers(t,r){let a=null,i=()=>{a=null};t.addEventListener("mousedown",s=>{a=c4(s.target,t)},{capture:!0}),t.addEventListener("mouseup",i),t.addEventListener("click",i,{capture:!0}),t.addEventListener("click",s=>{if(this.handleSelectionClick(s,r.path)){s.stopPropagation();return}}),t.addEventListener("contextmenu",s=>{if(s.preventDefault(),s.stopPropagation(),this.longPressTimer||this.touchDragActive)return;let o=this.plugin.taskSelectionService;if(o&&o.getSelectionCount()>1){o.isSelected(r.path)||o.addToSelection(r.path),this.showBatchContextMenu(s);return}uo(s,r.path,this.plugin,new Date)}),t.addEventListener("dragover",s=>{if(this.draggedTaskPath===r.path)return;s.preventDefault(),s.stopPropagation(),s.dataTransfer&&(s.dataTransfer.dropEffect="move");let o=s.clientY;this.dragOverRafId||(this.dragOverRafId=window.requestAnimationFrame(()=>{this.dragOverRafId=0;let l=t.getBoundingClientRect(),c=o<l.top+l.height/2;this.dropTargetPath=r.path,this.dropAbove=c;let d=t.parentElement;if(!d)return;if(d!==this.dragContainer){this.cleanupDragShift();let m=this.currentTaskElements.get(this.draggedTaskPath||""),f=m&&m.getBoundingClientRect().height||60,h=getComputedStyle(d).gap,g=parseFloat(h)||4,v=f+g;d.style.setProperty("--tn-drag-gap",`${v}px`),d.classList.remove("tn-static-margin-top-12px-91e0f558"),d.style.paddingBottom=`${v}px`;let k=d.closest(".kanban-view__column, .kanban-view__swimlane-column");if(k){let b=k.getBoundingClientRect().height;k.style.maxHeight=`${b+v}px`,this.dragTargetColumnEl=k}let T=d.querySelectorAll(".kanban-view__card-wrapper");for(let b of T)this.draggedTaskPaths.includes(b.dataset.taskPath||"")||b.classList.add("kanban-view__card-wrapper--drag-shift");this.dragContainer=d}let u=Array.from(d.querySelectorAll(".kanban-view__card-wrapper")).filter(m=>!this.draggedTaskPaths.includes(m.dataset.taskPath||"")),p=u.length;for(let m=0;m<u.length;m++)if(u[m].dataset.taskPath===r.path){p=c?m:m+1;break}if(p!==this.currentInsertionIndex){this.currentInsertionIndex=p;for(let m=0;m<u.length;m++)u[m].classList.toggle("kanban-view__card-wrapper--shift-down",m>=p);vCe(d,u,p)}}))}),t.addEventListener("dragleave",()=>{}),t.addEventListener("drop",s=>{(async()=>{var h,g;if((h=s.dataTransfer)!=null&&h.types.includes("text/x-kanban-column")||(s.preventDefault(),s.stopPropagation(),!this.draggedTaskPath))return;let o=t.closest("[data-group]"),l=t.closest("[data-column]"),c=t.closest("[data-swimlane]"),d=(o==null?void 0:o.dataset.group)||(l==null?void 0:l.dataset.column),u=(c==null?void 0:c.dataset.swimlane)||null;if(!d)return;let p=yCe(t,r.path,s.clientY);this.debugLog("CARD-DROP (drop-on-card handler)",{draggedTask:(g=this.draggedTaskPath)==null?void 0:g.split("/").pop(),targetCard:r.path.split("/").pop(),sourceColumn:this.draggedFromColumn,targetColumn:d,isCrossColumn:this.draggedFromColumn!==d,above:p.above,swimLaneKey:u});let m=WE(this.draggedTaskPaths,this.draggedTaskPath),f=this.performOptimisticReorder(m,p);this.cleanupDragShift(),o==null||o.classList.remove("kanban-view__column--dragover"),await this.handleTaskDrop(this.draggedTaskPath,d,u,p,{optimisticReorderApplied:f,draggedPaths:m}),this.draggedTaskPath=null,this.draggedFromColumn=null})()}),t.addEventListener("dragstart",s=>{s.stopPropagation();let o=a!=null?a:{taskPath:r.path,sourceElement:t},l=o.taskPath,c=o.sourceElement;this.debugLog("DRAGSTART",{task:l.split("/").pop(),parentTask:r.path.split("/").pop(),inCurrentTaskElements:this.currentTaskElements.has(l),isNestedSource:l!==r.path}),fCe(s,c,"kanban-view__drag-image");let d=this.plugin.taskSelectionService;if(d&&d.isSelected(l)&&d.getSelectionCount()>1){this.draggedTaskPaths=d.getSelectedPaths(),this.draggedTaskPath=l,this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear();for(let v of this.draggedTaskPaths){let k=this.currentTaskElements.get(v);if(k){k.classList.add("kanban-view__card--dragging");let T=k.closest("[data-group]"),b=k.closest("[data-column]"),w=k.closest("[data-swimlane]"),S=(T==null?void 0:T.dataset.group)||(b==null?void 0:b.dataset.column),C=w==null?void 0:w.dataset.swimlane;S&&this.draggedSourceColumns.set(v,S),C&&this.draggedSourceSwimlanes.set(v,C)}}s.dataTransfer&&(s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("text/plain",this.draggedTaskPaths.join(",")),s.dataTransfer.setData("text/x-batch-drag","true")),c.classList.add("kanban-view__card--dragging")}else this.draggedTaskPath=l,this.draggedTaskPaths=[l],c.classList.add("kanban-view__card--dragging"),s.dataTransfer&&(s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("text/plain",l));this.activeDragSourceElement=c,this.showFloatingDragPreview(c,s);let u=t.closest("[data-group]"),p=t.closest("[data-column]"),m=t.closest("[data-swimlane]");this.draggedFromColumn=(u==null?void 0:u.dataset.group)||(p==null?void 0:p.dataset.column)||null,this.draggedFromSwimlane=(m==null?void 0:m.dataset.swimlane)||null,this.containerEl.ownerDocument.body.classList.add("tn-drag-active");let f=c.getBoundingClientRect().height,h=t.parentElement,g=t.closest(".kanban-view__column, .kanban-view__swimlane-column");g&&(g.style.minHeight=`${g.offsetHeight}px`,this.dragSourceColumnEl=g),window.requestAnimationFrame(()=>{for(let v of this.draggedTaskPaths){let k=this.currentTaskElements.get(v);k&&(k.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),k.classList.add("tn-static-height-0-7a31cef0"),k.classList.remove("tn-static-flex-1-14e3b769"),k.classList.add("tn-static-overflow-hidden-69824400"),k.classList.remove("tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),k.classList.add("tn-static-padding-0-41d7d7e2"),k.classList.remove("tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-12px-43bef435","tn-static-padding-20px-ebe8e48c"),k.classList.add("tn-static-margin-0-11696618"),k.classList.remove("tn-static-border-1px-solid-var-background-mo-b65b5121","tn-static-padding-12px-43bef435"),k.classList.add("tn-static-border-none-2eda1daa"),k.classList.remove("tn-static-opacity-0-6-d95b59ac","tn-static-opacity-1-c6e7979d"),k.classList.add("tn-static-opacity-0-8d919cb5"))}if(h){let v=getComputedStyle(h).gap,k=parseFloat(v)||4;h.style.setProperty("--tn-drag-gap",`${f+k}px`),h.classList.remove("tn-static-margin-top-12px-91e0f558");let T=h.querySelectorAll(".kanban-view__card-wrapper");for(let b of T)this.draggedTaskPaths.includes(b.dataset.taskPath||"")||b.classList.add("kanban-view__card-wrapper--drag-shift");this.dragContainer=h,this.currentInsertionIndex=-1}})}),t.addEventListener("dragend",s=>{var o,l,c,d,u;s.stopPropagation(),this.debugLog("DRAGEND-FIRED",{draggedTask:r.path.split("/").pop(),draggedTaskPath:((o=this.draggedTaskPath)==null?void 0:o.split("/").pop())||"(already null)",draggedTaskPathsCount:this.draggedTaskPaths.length,pendingRender:this.pendingRender,activeDropCount:this.activeDropCount,suppressRenderRemaining:Math.max(0,this.suppressRenderUntil-Date.now())}),this.cleanupFloatingDragPreview();for(let p of this.draggedTaskPaths){let m=this.currentTaskElements.get(p);if(m){let f=((l=m.parentElement)==null?void 0:l.className)||"(detached)";this.debugLog("DRAGEND-RESTORE-CARD",{path:p.split("/").pop(),parentClass:f,currentStyles:m.style.cssText.slice(0,80)}),vm(m),m.classList.remove("kanban-view__card--dragging")}}vm(t),t.classList.remove("kanban-view__card--dragging"),(c=this.activeDragSourceElement)==null||c.classList.remove("kanban-view__card--dragging"),this.activeDragSourceElement=null,i(),this.cleanupDragShift(),this.dragSourceColumnEl&&(this.dragSourceColumnEl.classList.remove("tn-static-flex-1-14e3b769","tn-static-min-height-800px-997b4c8c"),this.dragSourceColumnEl.style.removeProperty("min-height"),this.dragSourceColumnEl=null),this.containerEl.ownerDocument.body.classList.remove("tn-drag-active"),this.draggedTaskPath=null,this.draggedFromColumn=null,this.draggedFromSwimlane=null,this.draggedTaskPaths=[],this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear(),(d=this.boardEl)==null||d.querySelectorAll(".kanban-view__column--dragover").forEach(p=>{p.classList.remove("kanban-view__column--dragover")}),(u=this.boardEl)==null||u.querySelectorAll(".kanban-view__swimlane-column--dragover").forEach(p=>{p.classList.remove("kanban-view__swimlane-column--dragover")}),this.dropTargetPath=null,this.dragOverRafId&&(cancelAnimationFrame(this.dragOverRafId),this.dragOverRafId=0),this.pendingRender?(this.debugLog("DRAGEND-PENDING-RENDER: flushing deferred render via debouncedRefresh"),this.pendingRender=!1,this.debouncedRefresh()):this.debugLog("DRAGEND: no pending render to flush")}),this.setupCardTouchHandlers(t,r)}performOptimisticReorder(t,r,a){return kCe({draggedPaths:t,dropTarget:r,targetContainer:a,currentTaskElements:this.currentTaskElements,removeEmptyCellHint:i=>this.removeEmptyCellHint(i),log:(i,s)=>this.debugLog(i,s)})}cleanupDragShift(){var t;if(this.dragContainer){this.dragContainer.style.removeProperty("--tn-drag-gap"),this.dragContainer.classList.remove("tn-static-margin-top-12px-91e0f558","tn-static-overflow-y-auto-03df744e","tn-static-overflow-y-clip-c5043043"),p4(this.dragContainer),this.dragContainer.style.removeProperty("overflow-y"),this.dragContainer.style.removeProperty("padding-bottom");let r=this.dragContainer.querySelectorAll(".kanban-view__card-wrapper--drag-shift, .kanban-view__card-wrapper--shift-down");for(let a of r)a.classList.remove("kanban-view__card-wrapper--drag-shift","kanban-view__card-wrapper--shift-down");this.dragContainer=null}this.dragTargetColumnEl&&(this.dragTargetColumnEl.classList.remove("tn-static-margin-top-12px-91e0f558","tn-static-max-height-400px-f0787633"),this.dragTargetColumnEl.style.removeProperty("max-height"),this.dragTargetColumnEl=null),this.boardEl&&p4(this.boardEl),(t=this.boardEl)==null||t.querySelectorAll(".kanban-view__card-wrapper--drag-shift, .kanban-view__card-wrapper--shift-down").forEach(r=>{r.classList.remove("kanban-view__card-wrapper--drag-shift","kanban-view__card-wrapper--shift-down")}),this.currentInsertionIndex=-1}showFloatingDragPreview(t,r){this.cleanupFloatingDragPreview();let a=t.ownerDocument,i=a.body;if(!i)return;let s=t.getBoundingClientRect(),o=Ie(a,"div"),l=this.getFloatingDragPreviewTitle(t),c=Ie(a,"span");c.className="kanban-view__floating-drag-preview-title",c.textContent=l,o.classList.add("tasknotes-plugin","kanban-view__floating-drag-preview"),o.appendChild(c),o.setAttribute("aria-hidden","true"),o.setAttribute("draggable","false"),this.draggedTaskPaths.length>1&&(o.dataset.dragCount=`${this.draggedTaskPaths.length}`),this.floatingDragPreviewWidth=Math.min(Math.max(s.width,180),320),this.floatingDragPreviewHeight=40,o.setCssProps({"--tn-kanban-drag-preview-width":`${this.floatingDragPreviewWidth}px`,"--tn-kanban-drag-preview-transform":"translate3d(-9999px, -9999px, 0)"}),i.appendChild(o),this.floatingDragPreviewEl=o,this.floatingDragPreviewDocument=a;let d=u=>{this.positionFloatingDragPreview(u.clientX,u.clientY)};this.floatingDragPreviewMoveHandler=d,a.addEventListener("drag",d,!0),a.addEventListener("dragover",d,!0),this.positionFloatingDragPreview(r.clientX,r.clientY)}positionFloatingDragPreview(t,r){var p;let a=this.floatingDragPreviewEl;if(!a||t===0&&r===0)return;let i=(p=a.ownerDocument.defaultView)!=null?p:window,s=8,o=14,l=this.floatingDragPreviewWidth,c=this.floatingDragPreviewHeight,d=t+o,u=r+o;d+l>i.innerWidth-s&&(d=t-l-o),u+c>i.innerHeight-s&&(u=r-c-o),d=Math.max(s,Math.min(d,Math.max(s,i.innerWidth-l-s))),u=Math.max(s,Math.min(u,Math.max(s,i.innerHeight-c-s))),d+=i.scrollX,u+=i.scrollY,this.floatingDragPreviewPendingX=d,this.floatingDragPreviewPendingY=u,this.floatingDragPreviewRafId===null&&(this.floatingDragPreviewRafId=i.requestAnimationFrame(()=>{var h;this.floatingDragPreviewRafId=null;let m=this.floatingDragPreviewPendingX,f=this.floatingDragPreviewPendingY;(h=this.floatingDragPreviewEl)==null||h.setCssProps({"--tn-kanban-drag-preview-transform":`translate3d(${m}px, ${f}px, 0)`})}))}getFloatingDragPreviewTitle(t){var i,s,o,l;let a=(((i=t.querySelector(".task-card__title-text"))==null?void 0:i.textContent)||((s=t.querySelector(".task-card__title"))==null?void 0:s.textContent)||((l=(o=t.dataset.taskPath)==null?void 0:o.split("/").pop())==null?void 0:l.replace(/\.md$/i,""))||"Task").trim().replace(/\s+/g," ");return a.length>80?`${a.slice(0,77).trimEnd()}...`:a}cleanupFloatingDragPreview(){var t,r,a;this.floatingDragPreviewRafId!==null&&(((r=(t=this.floatingDragPreviewDocument)==null?void 0:t.defaultView)!=null?r:window).cancelAnimationFrame(this.floatingDragPreviewRafId),this.floatingDragPreviewRafId=null),this.floatingDragPreviewMoveHandler&&this.floatingDragPreviewDocument&&(this.floatingDragPreviewDocument.removeEventListener("drag",this.floatingDragPreviewMoveHandler,!0),this.floatingDragPreviewDocument.removeEventListener("dragover",this.floatingDragPreviewMoveHandler,!0)),(a=this.floatingDragPreviewEl)==null||a.remove(),this.floatingDragPreviewEl=null,this.floatingDragPreviewDocument=null,this.floatingDragPreviewMoveHandler=null,this.floatingDragPreviewWidth=280,this.floatingDragPreviewHeight=40,this.floatingDragPreviewPendingX=0,this.floatingDragPreviewPendingY=0}setupCardTouchHandlers(t,r){if(!KCe(En.Platform.isMobile))return;let a=null,i=()=>{a=null};t.addEventListener("touchstart",s=>{if(s.touches.length!==1)return;a=c4(s.target,t);let o=s.touches[0];this.touchStartX=o.clientX,this.touchStartY=o.clientY,this.longPressTimer=window.setTimeout(()=>{this.initiateTouchDrag(t,r,o.clientX,o.clientY,a)},this.LONG_PRESS_DELAY)},{passive:!0}),t.addEventListener("touchmove",s=>{if(s.touches.length!==1)return;let o=s.touches[0];if(!this.touchDragActive&&this.longPressTimer){let l=Math.abs(o.clientX-this.touchStartX),c=Math.abs(o.clientY-this.touchStartY);(l>this.TOUCH_MOVE_THRESHOLD||c>this.TOUCH_MOVE_THRESHOLD)&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null);return}this.touchDragActive&&this.touchDragType==="task"&&(s.preventDefault(),this.updateTouchDragGhost(o.clientX,o.clientY),this.updateDropTargetFeedback(o.clientX,o.clientY),this.handleAutoScroll(o.clientX))},{passive:!1}),t.addEventListener("touchend",s=>{(async()=>{var c,d,u,p;if(this.longPressTimer&&(window.clearTimeout(this.longPressTimer),this.longPressTimer=null),!this.touchDragActive||this.touchDragType!=="task")return;let o=s.changedTouches[0];if(!o){this.clearTouchDragState();return}let l=this.findDropTargetAt(o.clientX,o.clientY);if(l.groupKey&&this.draggedTaskPath){let m=l.type==="task"?iF(l.taskPath,(c=l.above)!=null?c:!0):void 0,f=(p=(u=l.cardsContainer)!=null?u:(d=l.element)==null?void 0:d.querySelector(".kanban-view__cards, .kanban-view__tasks-container"))!=null?p:null,h=WE(this.draggedTaskPaths,this.draggedTaskPath),g=this.performOptimisticReorder(h,m,f);this.cleanupDragShift(),await this.handleTaskDrop(this.draggedTaskPath,l.groupKey,l.swimLaneKey,m,{optimisticReorderApplied:g,draggedPaths:h})}this.clearTouchDragState(),i()})()}),t.addEventListener("touchcancel",()=>{i(),this.clearTouchDragState()})}initiateTouchDrag(t,r,a,i,s=null){var f;this.touchDragActive=!0,this.touchDragType="task",this.containerEl.ownerDocument.addEventListener("contextmenu",this.boundContextMenuBlocker,!0);let o=s!=null?s:{taskPath:r.path,sourceElement:t},l=o.taskPath,c=o.sourceElement,d=this.plugin.taskSelectionService;if(d!=null&&d.isSelected(l)&&d.getSelectionCount()>1){this.draggedTaskPaths=d.getSelectedPaths(),this.draggedTaskPath=l,this.draggedSourceColumns.clear(),this.draggedSourceSwimlanes.clear();for(let h of this.draggedTaskPaths){let g=this.currentTaskElements.get(h);if(g){g.classList.add("kanban-view__card--dragging");let v=g.closest("[data-group]"),k=g.closest("[data-column]"),T=g.closest("[data-swimlane]"),b=(v==null?void 0:v.dataset.group)||(k==null?void 0:k.dataset.column),w=T==null?void 0:T.dataset.swimlane;b&&this.draggedSourceColumns.set(h,b),w&&this.draggedSourceSwimlanes.set(h,w)}}c.classList.add("kanban-view__card--dragging")}else this.draggedTaskPath=l,this.draggedTaskPaths=[l],c.classList.add("kanban-view__card--dragging");this.activeDragSourceElement=c;let u=t.closest("[data-group]"),p=t.closest("[data-column]"),m=t.closest("[data-swimlane]");this.draggedFromColumn=(u==null?void 0:u.dataset.group)||(p==null?void 0:p.dataset.column)||null,this.draggedFromSwimlane=(m==null?void 0:m.dataset.swimlane)||null,this.touchDragGhost=this.createTouchDragGhost(c,a,i),(f=navigator.vibrate)==null||f.call(navigator,50)}async handleTaskDrop(t,r,a,i,s={}){this.activeDropCount++;let o=!0;try{await this.dropQueue.enqueue(t,async()=>{var pe,oe,X,de,Oe,Q;this.suppressRenderUntil=Date.now()+1e4;let l=this.getGroupByPropertyId();if(!l)return;if(l.startsWith("formula.")){new En.Notice(this.plugin.i18n.translate("views.kanban.errors.formulaGroupingReadOnly"));return}if(a!==null&&((pe=this.swimLanePropertyId)!=null&&pe.startsWith("formula."))){new En.Notice(this.plugin.i18n.translate("views.kanban.errors.formulaSwimlaneReadOnly"));return}let c=Ya(l),d=this.explodeListColumns&&this.isListTypeProperty(c),u=this.swimLanePropertyId?Ya(this.swimLanePropertyId):null,p=u&&this.isListTypeProperty(u),m=this.draggedFromColumn,f=this.draggedFromSwimlane,h=new Map(this.draggedSourceColumns),g=new Map(this.draggedSourceSwimlanes),v=s.draggedPaths&&s.draggedPaths.length>0?[...s.draggedPaths]:[...this.draggedTaskPaths],k=v.length>1?v:[t],T=k.length>1,b=this.canFastPatchManualOrderDrop(s,i,k,r,a),w=this.canFastPatchCrossScopeDrop(s,k),S=!1,C=!1,x=_E(this.dataAdapter,this.plugin.settings.fieldMapping.sortOrder),E=this.plugin.settings.fieldMapping.sortOrder,_=Ya(l),F=this.swimLanePropertyId?Ya(this.swimLanePropertyId):null,I=a!==null&&F?[{property:F,value:a}]:void 0,A=this.getVisibleSortScopePaths(r,a),R=this.getCandidateSortScopePaths(r,a);this.debugLog("SORT-ORDER-CHECK",{hasDropTarget:!!i,hasSortOrder:x,dropTarget:i?{file:i.taskPath.split("/").pop(),above:i.above}:null});let O=this.plugin.fieldMapper.lookupMappingKey(c),U=u?this.plugin.fieldMapper.lookupMappingKey(u):null;for(let Z of k){let Ue=T?h.get(Z):m,le=T?g.get(Z):f,at=TCe({path:Z,sourceColumn:Ue,sourceSwimlane:le,newGroupValue:r,newSwimLaneValue:a,groupByPropertyId:l,swimLanePropertyId:this.swimLanePropertyId,groupByTaskProp:O,swimlaneTaskProp:U,isGroupByListProperty:d,isSwimlaneListProperty:!!p});this.debugLog("HANDLE-DROP-TASK",{taskFile:Z.split("/").pop(),sourceColumn:Ue,newGroupValue:r,isSameColumn:!at.needsGroupUpdate,isGroupByListProperty:d,sourceSwimlane:le,newSwimLaneValue:a});let He=null;if(x){if(i){if(this.debugLog("COMPUTE-SORT-ORDER-CALL",{taskFile:Z.split("/").pop(),targetFile:i.taskPath.split("/").pop(),above:i.above,groupKey:r,cleanGroupBy:_,cleanSwimLane:F}),He=await Q_(i.taskPath,i.above,r,_,Z,this.plugin,{scopeFilters:I,taskInfoCache:this.taskInfoCache,visibleTaskPaths:A,candidateTaskPaths:R}),He.sortOrder===null)continue;let ne=He.additionalWrites.length+1;if(ne>this.LARGE_REORDER_WARNING_THRESHOLD&&!await this.confirmLargeReorder(ne,r,a))return}else this.debugLog("SORT-ORDER-CROSS-COLUMN-PRESERVE",{taskFile:Z.split("/").pop(),groupKey:r});this.debugLog("SORT-ORDER-RESULT",{taskFile:Z.split("/").pop(),newSortOrder:(oe=He==null?void 0:He.sortOrder)!=null?oe:null,isNull:(He==null?void 0:He.sortOrder)===null,additionalWrites:(X=He==null?void 0:He.additionalWrites.length)!=null?X:0})}if(!bCe(at,He!==null))continue;let jn=this.plugin.app.vault.getAbstractFileByPath(Z);if(!jn||!(jn instanceof En.TFile))continue;He&&await J_(Z,He,this.plugin,{includeDragged:!1}),await yr(this.plugin.app,jn,ne=>{wCe(ne,at,{coerceGroupValue:(en,Qm)=>this.coerceGroupKeyForFrontmatter(en,Qm)}),(He==null?void 0:He.sortOrder)!==null&&He&&(ne[E]=He.sortOrder);let Ce=SCe({plan:at,task:this.taskInfoCache.get(Z),dateModifiedField:this.plugin.fieldMapper.toUserField("dateModified"),dateModifiedValue:qe()});Ce&&(this.plugin.taskService.updateCompletedDateInFrontmatter(ne,Ce.statusValue,Ce.isRecurring),ne[Ce.dateModifiedField]=Ce.dateModifiedValue)}),this.debugLog("ATOMIC-WRITE-DONE",{taskFile:Z.split("/").pop(),needsGroupUpdate:at.needsGroupUpdate,needsSwimlaneUpdate:at.needsSwimlaneUpdate,hasSortOrder:He!==null}),b&&i&&He&&!at.needsGroupUpdate&&!at.needsSwimlaneUpdate&&(S=this.applyOptimisticSortOrderResult(Z,i.taskPath,i.above,r,a,He));let Dr=!1,cs=null;if(at.changedTaskProp)try{let ne=(de=this.taskInfoCache.get(Z))!=null?de:await this.plugin.cacheManager.getTaskInfo(Z),Ce=CCe({plan:at,originalTask:ne,dateModifiedValue:qe(),isCompletedStatus:en=>this.plugin.statusManager.isCompletedStatus(en)});Ce&&(await this.plugin.taskService.applyPropertyChangeSideEffects(jn,ne,Ce.updatedTask,Ce.changedTaskProp,Ce.oldPropValue,Ce.newPropValue),cs=Ce.updatedTask)}catch(ne){Dr=!0,ag.warn("[TaskNotes][KanbanView] Side-effect error after drop:",{category:"configuration",operation:"side-effect-drop",error:ne})}w&&!Dr&&(at.needsGroupUpdate||at.needsSwimlaneUpdate)&&(C=this.applySuccessfulKanbanDropLocally({path:Z,dropPlan:at,dropTarget:i,sortOrderPlan:He,updatedTask:cs,optimisticReorderApplied:s.optimisticReorderApplied===!0}))}T&&((Oe=this.plugin.taskSelectionService)==null||Oe.clearSelection(),(Q=this.plugin.taskSelectionService)==null||Q.exitSelectionMode()),this.debugLog("HANDLE-DROP-COMPLETE",{pathsUpdated:k.map(Z=>Z.split("/").pop()),fastPatchedManualOrder:S,fastPatchedCrossScopeDrop:C}),(S||C)&&(this.pendingRender=!1,o=!1)})}catch(l){ag.error("[TaskNotes][KanbanView] Error updating task:",{category:"persistence",operation:"updating-task",error:l})}finally{if(this.activeDropCount--,o&&(this.postDropRefreshRequested=!0),this.activeDropCount===0){let l=this.postDropRefreshRequested;this.postDropRefreshRequested=!1,l?this.schedulePostDropRender():this.finishFastPostDrop()}}}setupContainer(){var a;super.setupContainer();let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className="kanban-view__board",(a=this.rootElement)==null||a.appendChild(r),this.boardEl=r,this.registerBoardListeners()}async handleTaskUpdate(t){this.debouncedRefresh()}debouncedRefresh(){this.updateDebounceTimer&&(this.debugLog("DEBOUNCED-REFRESH: cancelling previous pending timer"),window.clearTimeout(this.updateDebounceTimer)),this.debugLog("DEBOUNCED-REFRESH: scheduling render in 150ms",{activeDropCount:this.activeDropCount,suppressRenderRemaining:Math.max(0,this.suppressRenderUntil-Date.now())});let t=this.getEphemeralState(),r=this.containerEl.ownerDocument.defaultView||window;this.updateDebounceTimer=r.setTimeout(()=>{(async()=>{if(this.activeDropCount>0||Date.now()<this.suppressRenderUntil){this.debugLog("DEBOUNCED-REFRESH-TIMER-FIRED: SKIPPED (drop still in-flight)",{activeDropCount:this.activeDropCount,suppressRenderRemaining:Math.max(0,this.suppressRenderUntil-Date.now())}),this.updateDebounceTimer=null;return}this.debugLog("DEBOUNCED-REFRESH-TIMER-FIRED: executing render now",{activeDropCount:this.activeDropCount,suppressRenderRemaining:Math.max(0,this.suppressRenderUntil-Date.now())}),await this.render(),this.updateDebounceTimer=null,this.setEphemeralState(t)})()},150)}debugLog(t,r){this.logger.debug(t,{category:"internal",operation:"kanban-debug",details:r})}schedulePostDropRender(){this.debugLog("SCHEDULE-POST-DROP-RENDER",{delay:nT.POST_DROP_RENDER_DELAY}),this.suppressRenderUntil=Date.now()+nT.POST_DROP_RENDER_DELAY,this.pendingRender=!1,this.postDropTimer&&window.clearTimeout(this.postDropTimer);let t=this.containerEl.ownerDocument.defaultView||window;this.postDropTimer=t.setTimeout(()=>{this.debugLog("POST-DROP-TIMER-FIRED: rendering now"),this.postDropTimer=null,this.suppressRenderUntil=0,this.debouncedRefresh()},nT.POST_DROP_RENDER_DELAY)}finishFastPostDrop(){this.debugLog("FAST-POST-DROP-COMPLETE"),this.postDropTimer&&(window.clearTimeout(this.postDropTimer),this.postDropTimer=null),this.suppressRenderUntil=0,this.pendingRender=!1}renderEmptyState(){if(!this.boardEl)return;let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className="tn-bases-empty",r.textContent="No tasknotes tasks found for this base.",this.boardEl.appendChild(r)}renderNoGroupByError(){if(!this.boardEl)return;let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className="tn-bases-error",r.textContent=this.plugin.i18n.translate("views.kanban.errors.noGroupBy"),this.boardEl.appendChild(r)}renderError(t){if(!this.boardEl)return;let r=this.containerEl.ownerDocument,a=Ie(r,"div");a.className="tn-bases-error",a.textContent=`Error loading kanban: ${t.message||"Unknown error"}`,this.boardEl.appendChild(a)}getGroupDisplayTitle(t,r){if(!r)return t;let a=Ya(r),i=this.plugin.fieldMapper.toUserField("status");if(a===i){let o=this.plugin.statusManager.getStatusConfig(t);if(o!=null&&o.label)return o.label}let s=this.plugin.fieldMapper.toUserField("priority");if(a===s){let o=this.plugin.priorityManager.getPriorityConfig(t);if(o!=null&&o.label)return o.label}return t}renderGroupTitleWrapper(t,r,a=!1,i=!1){if(a?this.isSwimLaneByStatus():this.isGroupedByStatus()){let c=this.plugin.statusManager.getStatusConfig(r);if(c){if(this.consolidateStatusIcon&&!i&&c.icon){let d=t.createSpan({cls:"kanban-view__column-icon"});d.style.color=c.color,(0,En.setIcon)(d,c.icon)}this.renderLinkAwareGroupTitle(t,c.label);return}}let o=a?this.swimLanePropertyId:this.getGroupByPropertyId(),l=this.getGroupDisplayTitle(r,o);this.renderLinkAwareGroupTitle(t,l)}renderLinkAwareGroupTitle(t,r){let a=this.app||this.plugin.app,i={metadataCache:a.metadataCache,workspace:a.workspace};N_(t,r,i)}applyColumnOrder(t,r){return qCe({groupBy:t,actualKeys:r,columnOrders:this.columnOrders,hideEmptyColumns:this.hideEmptyColumns,pinnedColumns:this.pinnedColumns,isPriorityField:a=>this.isPropertyField(a,"priority"),isStatusField:a=>this.isPropertyField(a,"status"),getPriorityWeight:a=>this.plugin.priorityManager.getPriorityWeight(a),findStatusConfig:a=>this.findStatusConfigForGroupKey(a)})}applySwimLaneOrder(t,r){return b4({swimLanePropertyId:t,actualKeys:r,swimLaneOrders:this.swimLaneOrders,hideEmptySwimLanes:this.hideEmptySwimLanes,isPriorityField:a=>this.isPropertyField(a,"priority"),isStatusField:a=>this.isPropertyField(a,"status"),getPriorityWeight:a=>this.plugin.priorityManager.getPriorityWeight(a),getStatusOrder:a=>this.plugin.statusManager.getStatusOrder(a)})}isPropertyField(t,r){return t?Ya(t)===this.plugin.fieldMapper.toUserField(r):!1}applySwimLaneOrderToMap(t,r,a){return GCe({swimLanePropertyId:t,swimLanes:r,columnKeys:a,swimLaneOrders:this.swimLaneOrders,hideEmptySwimLanes:this.hideEmptySwimLanes,priorityKeys:this.plugin.priorityManager.getAllPriorities().map(i=>i.value),isPriorityField:i=>this.isPropertyField(i,"priority"),isStatusField:i=>this.isPropertyField(i,"status"),getPriorityWeight:i=>this.plugin.priorityManager.getPriorityWeight(i),getStatusOrder:i=>this.plugin.statusManager.getStatusOrder(i)})}async saveColumnOrder(t,r){this.columnOrders[t]=r;try{let a=JSON.stringify(this.columnOrders);this.config.set("columnOrder",a)}catch(a){ag.error("[KanbanView] Failed to save column order:",{category:"persistence",operation:"save-column-order",error:a})}}getCardOptions(){let t=new Date,r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),a=this.consolidateStatusIcon&&this.isGroupedByStatus();return this.buildTaskCardOptions({layout:this.cardLayout,targetDate:r,hideStatusIndicator:a,expandedRelationshipFilterMode:this.expandedRelationshipFilterMode,resolveExpandedRelationshipFilterMode:()=>{var i;return YCe((i=this.config)==null?void 0:i.get("expandedRelationshipFilterMode"))},expandedRelationshipTaskPaths:this.expandedRelationshipTaskPaths,expandedRelationshipTaskOrder:this.expandedRelationshipTaskOrder})}getTopLevelRenderTasks(t){return this.hideTopLevelSubtasks?this.filterTopLevelSubtasks(t):[...t]}setExpandedRelationshipTaskScope(t){this.expandedRelationshipTaskPaths.clear(),this.expandedRelationshipTaskOrder.clear(),t.forEach((r,a)=>{this.expandedRelationshipTaskPaths.add(r.path),this.expandedRelationshipTaskOrder.set(r.path,a)})}setCurrentVisibleTaskPaths(t){this.currentVisibleTaskPaths.clear(),this.currentVisibleTaskOrder.clear(),t.forEach((r,a)=>{this.currentVisibleTaskPaths.add(r.path),this.currentVisibleTaskOrder.set(r.path,a)})}isGroupedByStatus(){let t=this.getGroupByPropertyId();if(!t)return!1;let r=this.plugin.fieldMapper.toUserField("status");return t.replace(/^(note\.|file\.|task\.)/,"")===r}isSwimLaneByStatus(){if(!this.swimLanePropertyId)return!1;let t=this.plugin.fieldMapper.toUserField("status");return this.swimLanePropertyId.replace(/^(note\.|file\.|task\.)/,"")===t}registerBoardListeners(){}unregisterBoardListeners(){}getTaskContextFromEvent(t){let r=t.target;if(!r)return null;let a=r.closest(".task-card");if(!a)return null;let i=a.closest(".kanban-view__card-wrapper");if(!i)return null;let s=i.dataset.taskPath;if(!s)return null;let o=this.taskInfoCache.get(s);return o?{task:o,card:a}:null}async handleCardAction(t,r,a,i){await l4({action:t,task:r,target:a,event:i,plugin:this.plugin,app:this.app||this.plugin.app})}async handleToggleStatus(t,r){await l4({action:"toggle-status",task:t,target:this.containerEl,event:r,plugin:this.plugin,app:this.app||this.plugin.app})}getTaskActionDate(t){return VE(t)}destroyColumnScrollers(){for(let t of this.columnScrollers.values())t.destroy();this.columnScrollers.clear()}onunload(){this.postDropTimer&&(window.clearTimeout(this.postDropTimer),this.postDropTimer=null),this.suppressRenderUntil=0,this.unregisterBoardListeners(),this.cleanupFloatingDragPreview(),this.destroyColumnScrollers(),this.currentTaskElements.clear(),this.taskInfoCache.clear(),this.sortScopeTaskPaths.clear(),this.boardEl=null}};nT.POST_DROP_RENDER_DELAY=500;S4=nT});var GE=y(()=>{Jd();yx()});function uF(n,e){let t=[];for(let r=0;r<e;r+=1)t[r]=[];for(let r of n)t[r.row].push(r);return t}function dF(n,e){let t=[];for(let r=0;r<e;r+=1)t[r]=[];for(let r of n)t[r.firstCol].push(r);return t}function JCe(n,e){let t=[];if(n){for(let r=0;r<e;r+=1)t[r]={affectedInstances:n.affectedInstances,isEvent:n.isEvent,segs:[]};for(let r of n.segs)t[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)t[r]=null;return t}function exe(n){let{display:e}=n.eventRange.ui;return e==="list-item"||e==="auto"&&!n.eventRange.def.allDay&&n.firstCol===n.lastCol&&n.isStart&&n.isEnd}function Z7e(n){return P(Ot,null,P("div",{className:"fc-daygrid-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}}),n.timeText&&P("div",{className:"fc-event-time"},n.timeText),P("div",{className:"fc-event-title"},n.event.title||P(Ot,null," ")))}function Q7e(n){let e=[],t=[];for(let r of n)e.push(r.seg),r.isVisible||t.push(r.seg);return{allSegs:e,invisibleSegs:t}}function X7e(n){return n.dayNumberText||P(Ot,null," ")}function eZe(n,e,t){let{start:r,end:a}=e,i=gc(a,-1),s=t.getYear(r),o=t.getMonth(r),l=t.getYear(i),c=t.getMonth(i);return!(s===l&&o===c)&&(n.valueOf()===r.valueOf()||t.getDay(n)===1&&n.valueOf()<a.valueOf())}function txe(n){return n.eventRange.instance.instanceId+":"+n.firstCol}function rxe(n){return txe(n)+":"+n.lastCol}function tZe(n,e,t,r,a,i,s){let o=new P4(v=>{let k=n[v.index].eventRange.instance.instanceId+":"+v.span.start+":"+(v.span.end-1);return a[k]||1});o.allowReslicing=!0,o.strictOrder=r,e===!0||t===!0?(o.maxCoord=i,o.hiddenConsumes=!0):typeof e=="number"?o.maxStackCnt=e:typeof t=="number"&&(o.maxStackCnt=t,o.hiddenConsumes=!0);let l=[],c=[];for(let v=0;v<n.length;v+=1){let k=n[v],T=rxe(k);a[T]!=null?l.push({index:v,span:{start:k.firstCol,end:k.lastCol+1}}):c.push(k)}let d=o.addSegs(l),u=o.toRects(),{singleColPlacements:p,multiColPlacements:m,leftoverMargins:f}=rZe(u,n,s),h=[],g=[];for(let v of c){m[v.firstCol].push({seg:v,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let k=v.firstCol;k<=v.lastCol;k+=1)p[k].push({seg:aT(v,k,k+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<s.length;v+=1)h.push(0);for(let v of d){let k=n[v.index],T=v.span;m[T.start].push({seg:aT(k,T.start,T.end,s),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let b=T.start;b<T.end;b+=1)h[b]+=1,p[b].push({seg:aT(k,b,b+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<s.length;v+=1)g.push(f[v]);return{singleColPlacements:p,multiColPlacements:m,moreCnts:h,moreMarginTops:g}}function rZe(n,e,t){let r=nZe(n,t.length),a=[],i=[],s=[];for(let o=0;o<t.length;o+=1){let l=r[o],c=[],d=0,u=0;for(let m of l){let f=e[m.index];c.push({seg:aT(f,o,o+1,t),isVisible:!0,isAbsolute:!1,absoluteTop:m.levelCoord,marginTop:m.levelCoord-d}),d=m.levelCoord+m.thickness}let p=[];d=0,u=0;for(let m of l){let f=e[m.index],h=m.span.end-m.span.start>1,g=m.span.start===o;u+=m.levelCoord-d,d=m.levelCoord+m.thickness,h?(u+=m.thickness,g&&p.push({seg:aT(f,m.span.start,m.span.end,t),isVisible:!0,isAbsolute:!0,absoluteTop:m.levelCoord,marginTop:0})):g&&(p.push({seg:aT(f,m.span.start,m.span.end,t),isVisible:!0,isAbsolute:!1,absoluteTop:m.levelCoord,marginTop:u}),u=0)}a.push(c),i.push(p),s.push(u)}return{singleColPlacements:a,multiColPlacements:i,leftoverMargins:s}}function nZe(n,e){let t=[];for(let r=0;r<e;r+=1)t.push([]);for(let r of n)for(let a=r.span.start;a<r.span.end;a+=1)t[a].push(r);return t}function aT(n,e,t,r){if(n.firstCol===e&&n.lastCol===t-1)return n;let a=n.eventRange,i=a.range,s=fi(i,{start:r[e].date,end:Kr(r[t-1].date,1)});return Object.assign(Object.assign({},n),{firstCol:e,lastCol:t-1,eventRange:{def:a.def,ui:Object.assign(Object.assign({},a.ui),{durationEditable:!1}),instance:a.instance,range:s},isStart:n.isStart&&s.start.valueOf()===i.start.valueOf(),isEnd:n.isEnd&&s.end.valueOf()===i.end.valueOf()})}function aZe(n,e){if(!n.length)return[];let t=iZe(e);return n.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:t[r.eventRange.instance.instanceId],marginTop:0}))}function iZe(n){let e={};for(let t of n)for(let r of t)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}function sZe(n,e){return uF(n.filter(oZe),e)}function oZe(n){return n.eventRange.def.allDay}function lZe(n,e){let t;return e.currentRangeUnit.match(/year|month/)&&(t=n.querySelector(`[data-date="${pk(e.currentDate)}-01"]`)),t||(t=n.querySelector(`[data-date="${Wp(e.currentDate)}"]`)),t}function M4(n,e){let t=new yh(n.renderRange,e);return new vh(t,/year|month|week/.test(n.currentRangeUnit))}function I4(n){let{dateEnv:e,currentRange:t}=n,{start:r,end:a}=t,i;if(n.snapToWeek&&(r=e.startOfWeek(r),i=e.startOfWeek(a),i.valueOf()!==a.valueOf()&&(a=WN(i,1))),n.fixedWeekCount){let s=e.startOfWeek(e.startOfMonth(Kr(t.end,-1))),o=Math.ceil(TV(s,a));a=WN(a,6-o)}return{start:r,end:a}}var x4,XCe,pF,mF,E4,J7e,D4,P4,fF,YE,A4,KE,ZE,hF,iT,cZe,gF=y(()=>{Dh();GE();x4=class extends On{constructor(){super(...arguments),this.headerElRef=sn()}renderSimpleLayout(e,t){let{props:r,context:a}=this,i=[],s=xh(a.options);return e&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),P(As,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},P(Up,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,r,a){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:s,context:o}=this,l=!s.forPrint&&xh(o.options),c=!s.forPrint&&Yx(o.options),d=[];return e&&d.push({type:"header",key:"header",isSticky:l,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),d.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),c&&d.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Tk}]}),P(As,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},P(i,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:r,minWidth:a}]}],sections:d}))}};XCe=zt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});pF=class extends Tt{render(){let{props:e}=this;return P(Hp,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:XCe,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},mF=class extends Tt{render(){let{props:e,context:t}=this,{options:r}=t,{seg:a}=e,i=r.eventTimeFormat||XCe,s=Gp(a,i,t,!0,e.defaultDisplayEventEnd);return P(nu,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:yk(e.seg,t),defaultGenerator:Z7e,timeText:s,isResizing:!1,isDateSelecting:!1}))}};E4=class extends Tt{constructor(){super(...arguments),this.compileSegs=Ae(Q7e)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return P(bh,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let a=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return P(Ot,null,t.map(i=>{let s=i.eventRange.instance.instanceId;return P("div",{className:"fc-daygrid-event-harness",key:s,style:{visibility:a[s]?"hidden":""}},exe(i)?P(mF,Object.assign({seg:i,isDragging:!1,isSelected:s===e.eventSelection,defaultDisplayEventEnd:!1},Is(i,e.todayRange))):P(pF,Object.assign({seg:i,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:s===e.eventSelection,defaultDisplayEventEnd:!1},Is(i,e.todayRange))))}))}})}};J7e=zt({week:"narrow"}),D4=class extends On{constructor(){super(...arguments),this.rootElRef=sn(),this.state={dayNumberId:Hi()},this.handleRootEl=e=>{Ms(this.rootElRef,e),Ms(this.props.elRef,e)}}render(){let{context:e,props:t,state:r,rootElRef:a}=this,{options:i,dateEnv:s}=e,{date:o,dateProfile:l}=t,c=t.showDayNumber&&eZe(o,l.currentRange,s);return P(Vp,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:X7e,date:o,dateProfile:l,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(d,u)=>P("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&P(Qx,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Cc(e,o,"week"),date:o,defaultFormat:J7e}),!u.isDisabled&&(t.showDayNumber||bk(i)||t.forceDayTop)?P("div",{className:"fc-daygrid-day-top"},P(d,{elTag:"a",elClasses:["fc-daygrid-day-number",c&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Cc(e,o)),{id:r.dayNumberId})})):t.showDayNumber?P("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},P("a",{className:"fc-daygrid-day-number"}," ")):void 0,P("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,P("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},P(E4,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:a,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),P("div",{className:"fc-daygrid-day-bg"},t.bgContent)))}};P4=class extends gh{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:r}=this,a=i=>!this.forceHidden[vc(i)];for(let i=0;i<r.length;i+=1)r[i]=r[i].filter(a);return t}handleInvalidInsertion(e,t,r){let{entriesByLevel:a,forceHidden:i}=this,{touchingEntry:s,touchingLevel:o,touchingLateral:l}=e;if(this.hiddenConsumes&&s){let c=vc(s);if(!i[c])if(this.allowReslicing){let d=Object.assign(Object.assign({},s),{span:Wx(s.span,t.span)}),u=vc(d);i[u]=!0,a[o][l]=d,r.push(d),this.splitEntry(s,t,r)}else i[c]=!0,r.push(s)}super.handleInvalidInsertion(e,t,r)}},fF=class extends On{constructor(){super(...arguments),this.cellElRefs=new Ui,this.frameElRefs=new Ui,this.fgElRefs=new Ui,this.segHarnessRefs=new Ui,this.rootElRef=sn(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:r}=this,{options:a}=r,i=e.cells.length,s=dF(e.businessHourSegs,i),o=dF(e.bgEventSegs,i),l=dF(this.getHighlightSegs(),i),c=dF(this.getMirrorSegs(),i),{singleColPlacements:d,multiColPlacements:u,moreCnts:p,moreMarginTops:m}=tZe(Sh(e.fgEventSegs,a.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,a.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),f=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return P("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((h,g)=>{let v=this.renderFgSegs(g,e.forPrint?d[g]:u[g],e.todayRange,f),k=this.renderFgSegs(g,aZe(c[g],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return P(D4,{key:h.key,elRef:this.cellElRefs.createRef(h.key),innerElRef:this.frameElRefs.createRef(h.key),dateProfile:e.dateProfile,date:h.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&g===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:h.extraRenderProps,extraDataAttrs:h.extraDataAttrs,extraClassNames:h.extraClassNames,extraDateSpan:h.extraDateSpan,moreCnt:p[g],moreMarginTop:m[g],singlePlacements:d[g],fgContentElRef:this.fgElRefs.createRef(h.key),fgContent:P(Ot,null,P(Ot,null,v),P(Ot,null,k)),bgContent:P(Ot,null,this.renderFillSegs(l[g],"highlight"),this.renderFillSegs(s[g],"non-business"),this.renderFillSegs(o[g],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let r=this.props;this.updateSizing(!Va(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,r,a,i,s,o){let{context:l}=this,{eventSelection:c}=this.props,{framePositions:d}=this.state,u=this.props.cells.length===1,p=i||s||o,m=[];if(d)for(let f of t){let{seg:h}=f,{instanceId:g}=h.eventRange.instance,v=f.isVisible&&!a[g],k=f.isAbsolute,T="",b="";k&&(l.isRtl?(b=0,T=d.lefts[h.lastCol]-d.lefts[h.firstCol]):(T=0,b=d.rights[h.firstCol]-d.rights[h.lastCol])),m.push(P("div",{className:"fc-daygrid-event-harness"+(k?" fc-daygrid-event-harness-abs":""),key:txe(h),ref:p?null:this.segHarnessRefs.createRef(rxe(h)),style:{visibility:v?"":"hidden",marginTop:k?"":f.marginTop,top:k?f.absoluteTop:"",left:T,right:b}},exe(h)?P(mF,Object.assign({seg:h,isDragging:i,isSelected:g===c,defaultDisplayEventEnd:u},Is(h,r))):P(pF,Object.assign({seg:h,isDragging:i,isResizing:s,isDateSelecting:o,isSelected:g===c,defaultDisplayEventEnd:u},Is(h,r)))))}return m}renderFillSegs(e,t){let{isRtl:r}=this.context,{todayRange:a}=this.props,{framePositions:i}=this.state,s=[];if(i)for(let o of e){let l=r?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};s.push(P("div",{key:$x(o.eventRange),className:"fc-daygrid-bg-harness",style:l},t==="bg-event"?P(Th,Object.assign({seg:o},Is(o,a))):Zx(t)))}return P(Ot,{},...s)}updateSizing(e){let{props:t,state:r,frameElRefs:a}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let l=t.cells.map(c=>a.currentMap[c.key]);if(l.length){let c=this.rootElRef.current,d=new gl(c,l,!0,!1);(!r.framePositions||!r.framePositions.similarTo(d))&&this.setState({framePositions:new gl(c,l,!0,!1)})}}let i=this.state.segHeights,s=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),s),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let r in e){let a=Math.round(e[r].getBoundingClientRect().height);t[r]=Math.max(t[r]||0,a)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};fF.addStateEquality({segHeights:Va});YE=class extends On{constructor(){super(...arguments),this.splitBusinessHourSegs=Ae(uF),this.splitBgEventSegs=Ae(sZe),this.splitFgEventSegs=Ae(uF),this.splitDateSelectionSegs=Ae(uF),this.splitEventDrag=Ae(JCe),this.splitEventResize=Ae(JCe),this.rowRefs=new Ui}render(){let{props:e,context:t}=this,r=e.cells.length,a=this.splitBusinessHourSegs(e.businessHourSegs,r),i=this.splitBgEventSegs(e.bgEventSegs,r),s=this.splitFgEventSegs(e.fgEventSegs,r),o=this.splitDateSelectionSegs(e.dateSelectionSegs,r),l=this.splitEventDrag(e.eventDrag,r),c=this.splitEventResize(e.eventResize,r),d=r>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return P($i,{unit:"day"},(u,p)=>P(Ot,null,e.cells.map((m,f)=>P(fF,{ref:this.rowRefs.createRef(f),key:m.length?m[0].date.toISOString():f,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:p,dateProfile:e.dateProfile,cells:m,renderIntro:e.renderRowIntro,businessHourSegs:a[f],eventSelection:e.eventSelection,bgEventSegs:i[f],fgEventSegs:s[f],dateSelectionSegs:o[f],eventDrag:l[f],eventResize:c[f],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:d,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new gl(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new gl(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:r,rowPositions:a}=this,i=r.leftToIndex(e),s=a.topToIndex(t);if(s!=null&&i!=null){let o=this.props.cells[s][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,i),allDay:!0},o.extraDateSpan),dayEl:this.getCellEl(s,i),rect:{left:r.lefts[i],right:r.rights[i],top:a.tops[s],bottom:a.bottoms[s]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let r=this.props.cells[e][t].date,a=Kr(r,1);return{start:r,end:a}}};A4=class extends On{constructor(){super(...arguments),this.elRef=sn(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:r,expandRows:a}=e,i=r===!0||t===!0;i&&!a&&(i=!1,t=null,r=null);let s=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",a?"":"fc-daygrid-body-natural"];return P("div",{ref:this.elRef,className:s.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},P("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:a?e.clientHeight:""}},e.colGroupNode,P("tbody",{role:"presentation"},P(YE,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=lZe(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(".fc-daygrid-body"),r=t.closest(".fc-scroller"),a=e.getBoundingClientRect().top-t.getBoundingClientRect().top;r.scrollTop=a?a+1:0}this.needsScrollReset=!1}}};KE=class extends kh{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},ZE=class extends On{constructor(){super(...arguments),this.slicer=new KE,this.tableRef=sn()}render(){let{props:e,context:t}=this;return P(A4,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},hF=class extends x4{constructor(){super(...arguments),this.buildDayTableModel=Ae(M4),this.headerRef=sn(),this.tableRef=sn()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:r}=this,a=this.buildDayTableModel(r.dateProfile,t),i=e.dayHeaders&&P(ru,{ref:this.headerRef,dateProfile:r.dateProfile,dates:a.headerDates,datesRepDistinctDays:a.rowCnt===1}),s=o=>P(ZE,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:a,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,s,a.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,s)}};iT=class extends ph{buildRenderRange(e,t,r){let a=super.buildRenderRange(e,t,r),{props:i}=this;return I4({currentRange:a,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};cZe=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';kc(cZe)});var nxe,axe=y(()=>{Eh();gF();nxe=Wa({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:hF,dateProfileGeneratorClass:iT},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}})});function cxe(n){let e=["fc-timegrid-slot","fc-timegrid-slot-label",n.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return P(bo.Consumer,null,t=>{if(!n.isLabeled)return P("td",{className:e.join(" "),"data-time":n.isoTimeStr});let{dateEnv:r,options:a,viewApi:i}=t,s=a.slotLabelFormat==null?dZe:Array.isArray(a.slotLabelFormat)?zt(a.slotLabelFormat[0]):zt(a.slotLabelFormat),o={level:0,time:n.time,date:r.toDate(n.date),view:i,text:r.format(n.date,s)};return P(gn,{elTag:"td",elClasses:e,elAttrs:{"data-time":n.isoTimeStr},renderProps:o,generatorName:"slotLabelContent",customGenerator:a.slotLabelContent,defaultGenerator:uZe,classNameGenerator:a.slotLabelClassNames,didMount:a.slotLabelDidMount,willUnmount:a.slotLabelWillUnmount},l=>P("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},P(l,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function uZe(n){return n.text}function fZe(n){return n.text}function hZe(n,e){return e.map(t=>n[t.key])}function QE(n,e){let t=[],r;for(r=0;r<e;r+=1)t.push([]);if(n)for(r=0;r<n.length;r+=1)t[n[r].col].push(n[r]);return t}function ixe(n,e){let t=[];if(n){for(let r=0;r<e;r+=1)t[r]={affectedInstances:n.affectedInstances,isEvent:n.isEvent,segs:[]};for(let r of n.segs)t[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)t[r]=null;return t}function gZe(n){return n.shortText}function yZe(n,e,t){let r=new gh;e!=null&&(r.strictOrder=e),t!=null&&(r.maxStackCnt=t);let a=r.addSegs(n),i=ZV(a),s=vZe(r);return s=wZe(s,1),{segRects:SZe(s),hiddenGroups:i}}function vZe(n){let{entriesByLevel:e}=n,t=W4((r,a)=>r+":"+a,(r,a)=>{let i=bZe(n,r,a),s=sxe(i,t),o=e[r][a];return[Object.assign(Object.assign({},o),{nextLevelNodes:s[0]}),o.thickness+s[1]]});return sxe(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,t)[0]}function sxe(n,e){if(!n)return[[],0];let{level:t,lateralStart:r,lateralEnd:a}=n,i=r,s=[];for(;i<a;)s.push(e(t,i)),i+=1;return s.sort(kZe),[s.map(TZe),s[0][1]]}function kZe(n,e){return e[1]-n[1]}function TZe(n){return n[0]}function bZe(n,e,t){let{levelCoords:r,entriesByLevel:a}=n,i=a[e][t],s=r[e]+i.thickness,o=r.length,l=e;for(;l<o&&r[l]<s;l+=1);for(;l<o;l+=1){let c=a[l],d,u=Ix(c,i.span.start,Mx),p=u[0]+u[1],m=p;for(;(d=c[m])&&d.span.start<i.span.end;)m+=1;if(p<m)return{level:l,lateralStart:p,lateralEnd:m}}return null}function wZe(n,e){let t=W4((r,a,i)=>vc(r),(r,a,i)=>{let{nextLevelNodes:s,thickness:o}=r,l=o+i,c=o/l,d,u=[];if(!s.length)d=e;else for(let m of s)if(d===void 0){let f=t(m,a,l);d=f[0],u.push(f[1])}else{let f=t(m,d,0);u.push(f[1])}let p=(d-a)*c;return[d-p,Object.assign(Object.assign({},r),{thickness:p,nextLevelNodes:u})]});return n.map(r=>t(r,0,0)[1])}function SZe(n){let e=[],t=W4((a,i,s)=>vc(a),(a,i,s)=>{let o=Object.assign(Object.assign({},a),{levelCoord:i,stackDepth:s,stackForward:0});return e.push(o),o.stackForward=r(a.nextLevelNodes,i+a.thickness,s+1)+1});function r(a,i,s){let o=0;for(let l of a)o=Math.max(t(l,i,s),o);return o}return r(n,0,0),e}function W4(n,e){let t={};return(...r)=>{let a=n(...r);return a in t?t[a]:t[a]=e(...r)}}function oxe(n,e,t=null,r=0){let a=[];if(t)for(let i=0;i<n.length;i+=1){let s=n[i],o=t.computeDateTop(s.start,e),l=Math.max(o+(r||0),t.computeDateTop(s.end,e));a.push({start:Math.round(o),end:Math.round(l)})}return a}function CZe(n,e,t,r){let a=[],i=[];for(let c=0;c<n.length;c+=1){let d=e[c];d?a.push({index:c,thickness:1,span:d}):i.push(n[c])}let{segRects:s,hiddenGroups:o}=yZe(a,t,r),l=[];for(let c of s)l.push({seg:n[c.index],rect:c});for(let c of i)l.push({seg:c,rect:null});return{segPlacements:l,hiddenGroups:o}}function dxe(n,{todayRange:e,nowDate:t,eventSelection:r,eventDrag:a,eventResize:i}){let s=(a?a.affectedInstances:null)||(i?i.affectedInstances:null)||{};return P(Ot,null,n.map(o=>{let l=o.eventRange.instance.instanceId;return P("div",{key:l,style:{visibility:s[l]?"hidden":""}},P(yF,Object.assign({seg:o,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===r,isShort:!1},Is(o,e,t))))}))}function N4(n){return n?{top:n.start,bottom:-n.end}:{top:"",bottom:""}}function EZe(n,e){return n.map(t=>e[t.index])}function DZe(n,e){return e.map(t=>n[t.key])}function PZe(n,e){let t=e||n,r=Lx(n,t);return r===null&&(t=n,r=1),{snapDuration:t,snapsPerSlot:r}}function AZe(n,e,t){let r=[];for(let a of n.headerDates)r.push({start:t.add(a,e.slotMinTime),end:t.add(a,e.slotMaxTime)});return r}function MZe(n,e,t,r,a){let i=new Date(0),s=n,o=lt(0),l=t||IZe(r),c=[];for(;Ps(s)<Ps(e);){let d=a.add(i,s),u=Lx(o,l)!==null;c.push({date:d,time:s,key:d.toISOString(),isoTimeStr:wV(d),isLabeled:u}),s=Fx(s,r),o=Fx(o,r)}return c}function IZe(n){let e,t,r;for(e=lxe.length-1;e>=0;e-=1)if(t=lt(lxe[e]),r=Lx(t,n),r!==null&&r>1)return t;return n}function NZe(n,e){let t=new yh(n.renderRange,e);return new vh(t,!1)}var R4,dZe,_4,pZe,mZe,F4,L4,O4,z4,B4,xZe,yF,j4,$4,U4,H4,V4,lxe,vF,RZe,uxe=y(()=>{Dh();GE();gF();R4=class extends Dx{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?BV(e)?["timed","allDay"]:["allDay"]:["timed"]}},dZe=zt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});_4=class extends Tt{render(){return this.props.slatMetas.map(e=>P("tr",{key:e.key},P(cxe,Object.assign({},e))))}},pZe=zt({week:"short"}),mZe=5,F4=class extends On{constructor(){super(...arguments),this.allDaySplitter=new R4,this.headerElRef=sn(),this.rootElRef=sn(),this.scrollerElRef=sn(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:r}=this.context,{dateProfile:a}=this.props,i=a.renderRange,o=bc(i.start,i.end)===1?Cc(this.context,i.start,"week"):{};return r.weekNumbers&&e==="day"?P(Qx,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:pZe},l=>P("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},P(l,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:o}))):P("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},P("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:r}=this.context,a={text:t.allDayText,view:r};return P(gn,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:a,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:fZe,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},i=>P("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},P(i,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,r){let{context:a,props:i}=this,s=[],o=xh(a.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(s.push({type:"body",key:"all-day",chunk:{content:t}}),s.push({type:"body",key:"all-day-divider",outerContent:P("tr",{role:"presentation",className:"fc-scrollgrid-section"},P("td",{className:"fc-timegrid-divider "+a.theme.getClass("tableCellShaded")}))})),s.push({type:"body",key:"body",liquid:!0,expandRows:!!a.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),P(As,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:a.viewSpec},P(Up,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:s}))}renderHScrollLayout(e,t,r,a,i,s,o){let l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");let{context:c,props:d}=this,u=!d.forPrint&&xh(c.options),p=!d.forPrint&&Yx(c.options),m=[];e&&m.push({type:"header",key:"header",isSticky:u,syncRowHeights:!0,chunks:[{key:"axis",rowContent:h=>P("tr",{role:"presentation"},this.renderHeadAxis("day",h.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(m.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:h=>P("tr",{role:"presentation"},this.renderTableRowAxis(h.rowSyncHeights[0]))},{key:"cols",content:t}]}),m.push({key:"all-day-divider",type:"body",outerContent:P("tr",{role:"presentation",className:"fc-scrollgrid-section"},P("td",{colSpan:2,className:"fc-timegrid-divider "+c.theme.getClass("tableCellShaded")}))}));let f=c.options.nowIndicator;return m.push({type:"body",key:"body",liquid:!0,expandRows:!!c.options.expandRows,chunks:[{key:"axis",content:h=>P("div",{className:"fc-timegrid-axis-chunk"},P("table",{"aria-hidden":!0,style:{height:h.expandRows?h.clientHeight:""}},h.tableColGroupNode,P("tbody",null,P(_4,{slatMetas:s}))),P("div",{className:"fc-timegrid-now-indicator-container"},P($i,{unit:f?"minute":"day"},g=>{let v=f&&o&&o.safeComputeTop(g);return typeof v=="number"?P(Kx,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:v},isAxis:!0,date:g}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),p&&m.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Tk},{key:"cols",content:Tk}]}),P(As,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:c.viewSpec},P(l,{liquid:!d.isHeightAuto&&!d.forPrint,forPrint:d.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:a,minWidth:i}]}],sections:m}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return(e===!0||t===!0)&&(e=void 0,t=mZe),{dayMaxEvents:e,dayMaxEventRows:t}}};L4=class{constructor(e,t,r){this.positions=e,this.dateProfile=t,this.slotDuration=r}safeComputeTop(e){let{dateProfile:t}=this;if(ko(t.currentRange,e)){let r=nr(e),a=e.valueOf()-r.valueOf();if(a>=Ps(t.slotMinTime)&&a<Ps(t.slotMaxTime))return this.computeTimeTop(lt(a))}return null}computeDateTop(e,t){return t||(t=nr(e)),this.computeTimeTop(lt(e.valueOf()-t.valueOf()))}computeTimeTop(e){let{positions:t,dateProfile:r}=this,a=t.els.length,i=(e.milliseconds-Ps(r.slotMinTime))/Ps(this.slotDuration),s,o;return i=Math.max(0,i),i=Math.min(a,i),s=Math.floor(i),s=Math.min(s,a-1),o=i-s,t.tops[s]+t.getHeight(s)*o}},O4=class extends Tt{render(){let{props:e,context:t}=this,{options:r}=t,{slatElRefs:a}=e;return P("tbody",null,e.slatMetas.map((i,s)=>{let o={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi};return P("tr",{key:i.key,ref:a.createRef(i.key)},e.axis&&P(cxe,Object.assign({},i)),P(gn,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!i.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}},z4=class extends Tt{constructor(){super(...arguments),this.rootElRef=sn(),this.slatElRefs=new Ui}render(){let{props:e,context:t}=this;return P("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},P("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,P(O4,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;t.onCoords&&t.clientWidth!==null&&this.rootElRef.current.offsetHeight&&t.onCoords(new L4(new gl(this.rootElRef.current,hZe(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}};B4=class extends Tt{render(){let{props:e}=this;return P(bh,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>dxe(e.hiddenSegs,e),defaultGenerator:gZe,forceTimed:!0},t=>P(t,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}};xZe=zt({hour:"numeric",minute:"2-digit",meridiem:!1}),yF=class extends Tt{render(){return P(Hp,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:xZe}))}},j4=class extends Tt{constructor(){super(...arguments),this.sortEventSegs=Ae(Sh)}render(){let{props:e,context:t}=this,{options:r}=t,a=r.selectMirror,i=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||a&&e.dateSelectionSegs||[],s=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return P(Vp,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},l=>P("div",{className:"fc-timegrid-col-frame"},P("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),P("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,s,!1,!1,!1)),P("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(i,{},!!e.eventDrag,!!e.eventResize,!!a,"mirror")),P("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),bk(r)&&P(l,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,t,r,a,i,s){let{props:o}=this;return o.forPrint?dxe(e,o):this.renderPositionedFgSegs(e,t,r,a,i,s)}renderPositionedFgSegs(e,t,r,a,i,s){let{eventMaxStack:o,eventShortHeight:l,eventOrderStrict:c,eventMinHeight:d}=this.context.options,{date:u,slatCoords:p,eventSelection:m,todayRange:f,nowDate:h}=this.props,g=r||a||i,v=oxe(e,u,p,d),{segPlacements:k,hiddenGroups:T}=CZe(e,v,c,o);return P(Ot,null,this.renderHiddenGroups(T,e),k.map(b=>{let{seg:w,rect:S}=b,C=w.eventRange.instance.instanceId,x=g||!!(!t[C]&&S),E=N4(S&&S.span),_=!g&&S?this.computeSegHStyle(S):{left:0,right:0},F=!!S&&S.stackForward>0,I=!!S&&S.span.end-S.span.start<l;return P("div",{className:"fc-timegrid-event-harness"+(F?" fc-timegrid-event-harness-inset":""),key:s||C,style:Object.assign(Object.assign({visibility:x?"":"hidden"},E),_)},P(yF,Object.assign({seg:w,isDragging:r,isResizing:a,isDateSelecting:i,isSelected:C===m,isShort:I},Is(w,f,h))))}))}renderHiddenGroups(e,t){let{extraDateSpan:r,dateProfile:a,todayRange:i,nowDate:s,eventSelection:o,eventDrag:l,eventResize:c}=this.props;return P(Ot,null,e.map(d=>{let u=N4(d.span),p=EZe(d.entries,t);return P(B4,{key:qN(nR(p)),hiddenSegs:p,top:u.top,bottom:u.bottom,extraDateSpan:r,dateProfile:a,todayRange:i,nowDate:s,eventSelection:o,eventDrag:l,eventResize:c})}))}renderFillSegs(e,t){let{props:r,context:a}=this,s=oxe(e,r.date,r.slatCoords,a.options.eventMinHeight).map((o,l)=>{let c=e[l];return P("div",{key:$x(c.eventRange),className:"fc-timegrid-bg-harness",style:N4(o)},t==="bg-event"?P(Th,Object.assign({seg:c},Is(c,r.todayRange,r.nowDate))):Zx(t))});return P(Ot,null,s)}renderNowIndicator(e){let{slatCoords:t,date:r}=this.props;return t?e.map((a,i)=>P(Kx,{key:i,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(a.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:t,options:r}=this.context,a=r.slotEventOverlap,i=e.levelCoord,s=e.levelCoord+e.thickness,o,l;a&&(s=Math.min(1,i+(s-i)*2)),t?(o=1-s,l=i):(o=i,l=1-s);let c={zIndex:e.stackDepth+1,left:o*100+"%",right:l*100+"%"};return a&&!e.stackForward&&(c[t?"marginLeft":"marginRight"]=20),c}};$4=class extends Tt{constructor(){super(...arguments),this.splitFgEventSegs=Ae(QE),this.splitBgEventSegs=Ae(QE),this.splitBusinessHourSegs=Ae(QE),this.splitNowIndicatorSegs=Ae(QE),this.splitDateSelectionSegs=Ae(QE),this.splitEventDrag=Ae(ixe),this.splitEventResize=Ae(ixe),this.rootElRef=sn(),this.cellElRefs=new Ui}render(){let{props:e,context:t}=this,r=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),a=e.cells.length,i=this.splitFgEventSegs(e.fgEventSegs,a),s=this.splitBgEventSegs(e.bgEventSegs,a),o=this.splitBusinessHourSegs(e.businessHourSegs,a),l=this.splitNowIndicatorSegs(e.nowIndicatorSegs,a),c=this.splitDateSelectionSegs(e.dateSelectionSegs,a),d=this.splitEventDrag(e.eventDrag,a),u=this.splitEventResize(e.eventResize,a);return P("div",{className:"fc-timegrid-cols",ref:this.rootElRef},P("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,P("tbody",{role:"presentation"},P("tr",{role:"row"},e.axis&&P("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},P("div",{className:"fc-timegrid-col-frame"},P("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&P(Kx,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((p,m)=>P(j4,{key:p.key,elRef:this.cellElRefs.createRef(p.key),dateProfile:e.dateProfile,date:p.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:p.extraRenderProps,extraDataAttrs:p.extraDataAttrs,extraClassNames:p.extraClassNames,extraDateSpan:p.extraDateSpan,fgEventSegs:i[m],bgEventSegs:s[m],businessHourSegs:o[m],nowIndicatorSegs:l[m],dateSelectionSegs:c[m],eventDrag:d[m],eventResize:u[m],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new gl(this.rootElRef.current,DZe(this.cellElRefs.currentMap,e.cells),!0,!1))}};U4=class extends On{constructor(){super(...arguments),this.processSlotOptions=Ae(PZe),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:r}=this.state;if(t&&r){if(e.time){let a=r.computeTimeTop(e.time);a=Math.ceil(a),a&&(a+=1),t(a)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return P("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},P(z4,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),P($4,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:r,options:a}=this.context,{colCoords:i}=this,{dateProfile:s}=this.props,{slatCoords:o}=this.state,{snapDuration:l,snapsPerSlot:c}=this.processSlotOptions(this.props.slotDuration,a.snapDuration),d=i.leftToIndex(e),u=o.positions.topToIndex(t);if(d!=null&&u!=null){let p=this.props.cells[d],m=o.positions.tops[u],f=o.positions.getHeight(u),h=(t-m)/f,g=Math.floor(h*c),v=u*c+g,k=this.props.cells[d].date,T=Fx(s.slotMinTime,kV(l,v)),b=r.add(k,T),w=r.add(b,l);return{dateProfile:s,dateSpan:Object.assign({range:{start:b,end:w},allDay:!1},p.extraDateSpan),dayEl:i.els[d],rect:{left:i.lefts[d],right:i.rights[d],top:m,bottom:m+f},layer:0}}return null}};H4=class extends kh{sliceRange(e,t){let r=[];for(let a=0;a<t.length;a+=1){let i=fi(e,t[a]);i&&r.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:a})}return r}},V4=class extends On{constructor(){super(...arguments),this.buildDayRanges=Ae(AZe),this.slicer=new H4,this.timeColsRef=sn()}render(){let{props:e,context:t}=this,{dateProfile:r,dayTableModel:a}=e,{nowIndicator:i,nextDayThreshold:s}=t.options,o=this.buildDayRanges(a,r,t.dateEnv);return P($i,{unit:i?"minute":"day"},(l,c)=>P(U4,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:a.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:l,nowIndicatorSegs:i&&this.slicer.sliceNowDate(l,r,s,t,o),todayRange:c,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}};lxe=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];vF=class extends F4{constructor(){super(...arguments),this.buildTimeColsModel=Ae(NZe),this.buildSlatMetas=Ae(MZe)}render(){let{options:e,dateEnv:t,dateProfileGenerator:r}=this.context,{props:a}=this,{dateProfile:i}=a,s=this.buildTimeColsModel(i,r),o=this.allDaySplitter.splitProps(a),l=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:c}=e,d=!c,u=c,p=e.dayHeaders&&P(ru,{dates:s.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:d?this.renderHeadAxis:null}),m=e.allDaySlot!==!1&&(h=>P(ZE,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:s,nextDayThreshold:e.nextDayThreshold,tableMinWidth:h.tableMinWidth,colGroupNode:h.tableColGroupNode,renderRowIntro:d?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:h.clientWidth,clientHeight:h.clientHeight,forPrint:a.forPrint},this.getAllDayMaxEventProps()))),f=h=>P(V4,Object.assign({},o.timed,{dayTableModel:s,dateProfile:i,axis:d,slotDuration:e.slotDuration,slatMetas:l,forPrint:a.forPrint,tableColGroupNode:h.tableColGroupNode,tableMinWidth:h.tableMinWidth,clientWidth:h.clientWidth,clientHeight:h.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:h.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return u?this.renderHScrollLayout(p,m,f,s.colCnt,c,l,this.state.slatCoords):this.renderSimpleLayout(p,m,f)}};RZe='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';kc(RZe)});var _Ze,pxe,mxe=y(()=>{Eh();uxe();_Ze={allDaySlot:Boolean},pxe=Wa({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:_Ze,views:{timeGrid:{component:vF,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}})});function FZe(n){return P(Ot,null,n.text&&P("a",Object.assign({id:n.textId,className:"fc-list-day-text"},n.navLinkAttrs),n.text),n.sideText&&P("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},n.sideNavLinkAttrs),n.sideText))}function OZe(n,e){let t=yk(n,e);return P("a",Object.assign({},t),n.eventRange.def.title)}function zZe(n,e,t,r,a){let{options:i}=t;if(i.displayEventTime!==!1){let s=n.eventRange.def,o=n.eventRange.instance,l=!1,c;if(s.allDay?l=!0:IV(n.eventRange.range)?n.isStart?c=Gp(n,e,t,null,null,o.range.start,n.end):n.isEnd?c=Gp(n,e,t,null,null,n.start,o.range.end):l=!0:c=Gp(n,e,t),l){let d={text:t.options.allDayText,view:t.viewApi};return P(gn,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${a}`},renderProps:d,generatorName:"allDayContent",customGenerator:i.allDayContent,defaultGenerator:BZe,classNameGenerator:i.allDayClassNames,didMount:i.allDayDidMount,willUnmount:i.allDayWillUnmount})}return P("td",{className:"fc-list-event-time"},c)}return null}function BZe(n){return n.text}function jZe(n){return n.text}function $Ze(n){let e=nr(n.renderRange.start),t=n.renderRange.end,r=[],a=[];for(;e<t;)r.push(e),a.push({start:e,end:Kr(e,1)}),e=Kr(e,1);return{dayDates:r,dayRanges:a}}function UZe(n){let e=[],t,r;for(t=0;t<n.length;t+=1)r=n[t],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var q4,LZe,G4,kF,HZe,fxe=y(()=>{Dh();GE();q4=class extends Tt{constructor(){super(...arguments),this.state={textId:Hi()}}render(){let{theme:e,dateEnv:t,options:r,viewApi:a}=this.context,{cellId:i,dayDate:s,todayRange:o}=this.props,{textId:l}=this.state,c=Hx(s,o),d=r.listDayFormat?t.format(s,r.listDayFormat):"",u=r.listDaySideFormat?t.format(s,r.listDaySideFormat):"",p=Object.assign({date:t.toDate(s),view:a,textId:l,text:d,sideText:u,navLinkAttrs:Cc(this.context,s),sideNavLinkAttrs:Cc(this.context,s,"day",!1)},c);return P(gn,{elTag:"tr",elClasses:["fc-list-day",...vk(c,e)],elAttrs:{"data-date":Wp(s)},renderProps:p,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:FZe,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},m=>P("th",{scope:"colgroup",colSpan:3,id:i,"aria-labelledby":l},P(m,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}};LZe=zt({hour:"numeric",minute:"2-digit",meridiem:"short"}),G4=class extends Tt{render(){let{props:e,context:t}=this,{options:r}=t,{seg:a,timeHeaderId:i,eventHeaderId:s,dateHeaderId:o}=e,l=r.eventTimeFormat||LZe;return P(nu,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",a.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>OZe(a,t),seg:a,timeText:"",disableDragging:!0,disableResizing:!0}),(c,d)=>P(Ot,null,zZe(a,l,t,i,o),P("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},P("span",{className:"fc-list-event-dot",style:{borderColor:d.borderColor||d.backgroundColor}})),P(c,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${s} ${o}`}})))}};kF=class extends On{constructor(){super(...arguments),this.computeDateVars=Ae($Ze),this.eventStoreToSegs=Ae(this._eventStoreToSegs),this.state={timeHeaderId:Hi(),eventHeaderId:Hi(),dateHeaderIdRoot:Hi()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:r,dayRanges:a}=this.computeDateVars(e.dateProfile),i=this.eventStoreToSegs(e.eventStore,e.eventUiBases,a);return P(As,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),t.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:t.viewSpec},P(lk,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},i.length>0?this.renderSegList(i,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,r={text:e.noEventsText,view:t};return P(gn,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:jZe,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},a=>P(a,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,t){let{theme:r,options:a}=this.context,{timeHeaderId:i,eventHeaderId:s,dateHeaderIdRoot:o}=this.state,l=UZe(e);return P($i,{unit:"day"},(c,d)=>{let u=[];for(let p=0;p<l.length;p+=1){let m=l[p];if(m){let f=Wp(t[p]),h=o+"-"+f;u.push(P(q4,{key:f,cellId:h,dayDate:t[p],todayRange:d})),m=Sh(m,a.eventOrder);for(let g of m)u.push(P(G4,Object.assign({key:f+":"+g.eventRange.instance.instanceId,seg:g,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:i,eventHeaderId:s,dateHeaderId:h},Is(g,d,c))))}}return P("table",{className:"fc-list-table "+r.getClass("table")},P("thead",null,P("tr",null,P("th",{scope:"col",id:i},a.timeHint),P("th",{scope:"col","aria-hidden":!0}),P("th",{scope:"col",id:s},a.eventHint))),P("tbody",null,u))})}_eventStoreToSegs(e,t,r){return this.eventRangesToSegs(ok(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,t){let r=[];for(let a of e)r.push(...this.eventRangeToSegs(a,t));return r}eventRangeToSegs(e,t){let{dateEnv:r}=this.context,{nextDayThreshold:a}=this.context.options,i=e.range,s=e.def.allDay,o,l,c,d=[];for(o=0;o<t.length;o+=1)if(l=fi(i,t[o]),l&&(c={component:this,eventRange:e,start:l.start,end:l.end,isStart:e.isStart&&l.start.valueOf()===i.start.valueOf(),isEnd:e.isEnd&&l.end.valueOf()===i.end.valueOf(),dayIndex:o},d.push(c),!c.isEnd&&!s&&o+1<t.length&&i.end<r.add(t[o+1].start,a))){c.end=i.end,c.isEnd=!0;break}return d}};HZe=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';kc(HZe)});function hxe(n){return n===!1?null:zt(n)}var VZe,gxe,yxe=y(()=>{Eh();fxe();Dh();VZe={listDayFormat:hxe,listDaySideFormat:hxe,noEventsClassNames:B,noEventsContent:B,noEventsDidMount:B,noEventsWillUnmount:B};gxe=Wa({name:"@fullcalendar/list",optionRefiners:VZe,views:{list:{component:kF,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}})});function qZe(n,e,t,r,a){let{start:i,end:s}=e.currentRange,o=i,l=[];for(;o.valueOf()<s.valueOf();){let c=t.add(o,WZe),d={start:n.skipHiddenDays(o),end:n.skipHiddenDays(c,-1,!0)},u=I4({currentRange:d,snapToWeek:!0,fixedWeekCount:r,dateEnv:t});u={start:n.skipHiddenDays(u.start),end:n.skipHiddenDays(u.end,-1,!0)};let p=e.activeRange?fi(e.activeRange,a?u:d):null;l.push({currentDate:e.currentDate,isValid:e.isValid,validRange:e.validRange,renderRange:u,activeRange:p,currentRange:d,currentRangeUnit:"month",isRangeAllDay:!0,dateIncrement:e.dateIncrement,slotMinTime:e.slotMaxTime,slotMaxTime:e.slotMinTime}),o=c}return l}function KZe(n,e){return n||(e[0].currentRange.start.getUTCFullYear()!==e[e.length-1].currentRange.start.getUTCFullYear()?GZe:YZe)}var Y4,K4,WZe,GZe,YZe,ZZe,QZe,vxe,kxe=y(()=>{Eh();gF();Dh();GE();Y4=class extends On{constructor(){super(...arguments),this.buildDayTableModel=Ae(M4),this.slicer=new KE,this.state={labelId:Hi()}}render(){let{props:e,state:t,context:r}=this,{dateProfile:a,forPrint:i}=e,{options:s}=r,o=this.buildDayTableModel(a,r.dateProfileGenerator),l=this.slicer.sliceProps(e,a,s.nextDayThreshold,r,o),c=e.tableWidth!=null?e.tableWidth/s.aspectRatio:null,d=o.cells.length,u=c!=null?c/d:null;return P("div",{ref:e.elRef,"data-date":e.isoDateStr,className:"fc-multimonth-month",style:{width:e.width},role:"grid","aria-labelledby":t.labelId},P("div",{className:"fc-multimonth-header",style:{marginBottom:u},role:"presentation"},P("div",{className:"fc-multimonth-title",id:t.labelId},r.dateEnv.format(e.dateProfile.currentRange.start,e.titleFormat)),P("table",{className:["fc-multimonth-header-table",r.theme.getClass("table")].join(" "),role:"presentation"},P("thead",{role:"rowgroup"},P(ru,{dateProfile:e.dateProfile,dates:o.headerDates,datesRepDistinctDays:!1})))),P("div",{className:["fc-multimonth-daygrid","fc-daygrid","fc-daygrid-body",!i&&"fc-daygrid-body-balanced",i&&"fc-daygrid-body-unbalanced",i&&"fc-daygrid-body-natural"].join(" "),style:{marginTop:-u}},P("table",{className:["fc-multimonth-daygrid-table",r.theme.getClass("table")].join(" "),style:{height:i?"":c},role:"presentation"},P("tbody",{role:"rowgroup"},P(YE,Object.assign({},l,{dateProfile:a,cells:o.cells,eventSelection:e.eventSelection,dayMaxEvents:!i,dayMaxEventRows:!i,showWeekNumbers:s.weekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:i}))))))}},K4=class extends On{constructor(){super(...arguments),this.splitDateProfileByMonth=Ae(qZe),this.buildMonthFormat=Ae(KZe),this.scrollElRef=sn(),this.firstMonthElRef=sn(),this.needsScrollReset=!1,this.handleSizing=e=>{e&&this.updateSize()}}render(){let{context:e,props:t,state:r}=this,{options:a}=e,{clientWidth:i,clientHeight:s}=r,o=r.monthHPadding||0,l=Math.min(i!=null?Math.floor(i/(a.multiMonthMinWidth+o)):1,a.multiMonthMaxColumns)||1,c=100/l+"%",d=i==null?null:i/l-o,u=i!=null&&l===1,p=this.splitDateProfileByMonth(e.dateProfileGenerator,t.dateProfile,e.dateEnv,u?!1:a.fixedWeekCount,a.showNonCurrentDates),m=this.buildMonthFormat(a.multiMonthTitleFormat,p),f=["fc-multimonth",u?"fc-multimonth-singlecol":"fc-multimonth-multicol",d!=null&&d<400?"fc-multimonth-compact":"",t.isHeightAuto?"":"fc-scroller"];return P(As,{elRef:this.scrollElRef,elClasses:f,viewSpec:e.viewSpec},p.map((h,g)=>{let v=pk(h.currentRange.start);return P(Y4,Object.assign({},t,{key:v,isoDateStr:v,elRef:g===0?this.firstMonthElRef:void 0,titleFormat:m,dateProfile:h,width:c,tableWidth:d,clientWidth:i,clientHeight:s}))}))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleSizing),this.requestScrollReset()}componentDidUpdate(e){Va(e,this.props)||this.handleSizing(!1),e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}updateSize(){let e=this.scrollElRef.current,t=this.firstMonthElRef.current;e&&this.setState({clientWidth:e.clientWidth,clientHeight:e.clientHeight}),t&&e&&this.state.monthHPadding==null&&this.setState({monthHPadding:e.clientWidth-t.firstChild.offsetWidth})}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.state.monthHPadding!=null){let{currentDate:e}=this.props.dateProfile,t=this.scrollElRef.current,r=t.querySelector(`[data-date="${pk(e)}"]`);t.scrollTop=r.getBoundingClientRect().top-this.firstMonthElRef.current.getBoundingClientRect().top,this.needsScrollReset=!1}}shouldComponentUpdate(){return!0}},WZe=lt(1,"month");GZe=zt({year:"numeric",month:"long"}),YZe=zt({month:"long"});ZZe={multiMonthTitleFormat:zt,multiMonthMaxColumns:Number,multiMonthMinWidth:Number},QZe=".fc .fc-multimonth{border:1px solid var(--fc-border-color);display:flex;flex-wrap:wrap;overflow-x:hidden;overflow-y:auto}.fc .fc-multimonth-title{font-size:1.2em;font-weight:700;padding:1em 0;text-align:center}.fc .fc-multimonth-daygrid{background:var(--fc-page-bg-color)}.fc .fc-multimonth-daygrid-table,.fc .fc-multimonth-header-table{table-layout:fixed;width:100%}.fc .fc-multimonth-daygrid-table{border-top-style:hidden!important}.fc .fc-multimonth-singlecol .fc-multimonth{position:relative}.fc .fc-multimonth-singlecol .fc-multimonth-header{background:var(--fc-page-bg-color);position:relative;top:0;z-index:2}.fc .fc-multimonth-singlecol .fc-multimonth-daygrid{position:relative;z-index:1}.fc .fc-multimonth-singlecol .fc-multimonth-daygrid-table,.fc .fc-multimonth-singlecol .fc-multimonth-header-table{border-left-style:hidden;border-right-style:hidden}.fc .fc-multimonth-singlecol .fc-multimonth-month:last-child .fc-multimonth-daygrid-table{border-bottom-style:hidden}.fc .fc-multimonth-multicol{line-height:1}.fc .fc-multimonth-multicol .fc-multimonth-month{padding:0 1.2em 1.2em}.fc .fc-multimonth-multicol .fc-daygrid-more-link{border:1px solid var(--fc-event-border-color);display:block;float:none;padding:1px}.fc .fc-multimonth-compact{line-height:1}.fc .fc-multimonth-compact .fc-multimonth-daygrid-table,.fc .fc-multimonth-compact .fc-multimonth-header-table{font-size:.9em}.fc-media-screen .fc-multimonth-singlecol .fc-multimonth-header{position:sticky}.fc-media-print .fc-multimonth{overflow:visible}";kc(QZe);vxe=Wa({name:"@fullcalendar/multimonth",initialView:"multiMonthYear",optionRefiners:ZZe,views:{multiMonth:{component:K4,dateProfileGeneratorClass:iT,multiMonthMinWidth:350,multiMonthMaxColumns:3},multiMonthYear:{type:"multiMonth",duration:{years:1},fixedWeekCount:!0,showNonCurrentDates:!1}}})});function Txe(n,e){return(0,_t.moment)(n,e)}function bxe(n){let e=(0,_t.parseYaml)(n);return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}var _t,ku,JE,TF,wxe=y(()=>{_t=require("obsidian");SC();co();ku=tt(od());xe();Ll();va();ya();q();JE=M({tag:"Modals/TimeblockInfoModal"});TF=class extends _t.Modal{constructor(t,r,a,i,s,o){super(t);this.selectedAttachments=[];this.keyboardHandler=null;this.plugin=r,this.timeblock={...a},this.originalTimeblock=a,this.eventDate=i,this.timeblockDate=s||ae(i),this.translate=r.i18n.translate.bind(r.i18n),this.onChange=o}async onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("timeblock-info-modal"),this.keyboardHandler=d=>{d.key==="Enter"&&(d.ctrlKey||d.metaKey)&&(d.preventDefault(),this.handleSave())},this.containerEl.addEventListener("keydown",this.keyboardHandler),new _t.Setting(t).setName(this.translate("modals.timeblockInfo.editHeading")).setHeading();let r=t.createDiv({cls:"timeblock-date-display"});r.createEl("strong",{text:this.translate("modals.timeblockInfo.dateTimeLabel")});let a=`${this.eventDate.toLocaleDateString()} from ${this.timeblock.startTime} to ${this.timeblock.endTime}`;r.createSpan({text:a}),new _t.Setting(t).setName(this.translate("modals.timeblockInfo.titleLabel")).setDesc(this.translate("modals.timeblockInfo.titleDesc")).addText(d=>{this.titleInput=d.inputEl,d.setPlaceholder(this.translate("modals.timeblockInfo.titlePlaceholder")).setValue(this.timeblock.title||"").onChange(()=>this.validateForm())}),new _t.Setting(t).setName(this.translate("modals.timeblockInfo.descriptionLabel")).setDesc(this.translate("modals.timeblockInfo.descriptionDesc")).addTextArea(d=>{this.descriptionInput=d.inputEl,d.setPlaceholder(this.translate("modals.timeblockInfo.descriptionPlaceholder")).setValue(this.timeblock.description||""),this.descriptionInput.rows=3}),new _t.Setting(t).setName(this.translate("modals.timeblockInfo.colorLabel")).setDesc(this.translate("modals.timeblockInfo.colorDesc")).addText(d=>{this.colorInput=d.inputEl,d.setPlaceholder(this.translate("modals.timeblockInfo.colorPlaceholder")).setValue(xd(this.timeblock.color||this.plugin.settings.calendarViewSettings.defaultTimeblockColor)),qf(this.colorInput)}),new _t.Setting(t).setName(this.translate("modals.timeblockInfo.attachmentsLabel")).setDesc(this.translate("modals.timeblockInfo.attachmentsDesc")).addButton(d=>{d.setButtonText(this.translate("modals.timeblockInfo.addAttachmentButton")).setTooltip(this.translate("modals.timeblockInfo.addAttachmentTooltip")).onClick(()=>{pp(this.plugin,u=>{u instanceof _t.TAbstractFile&&this.addAttachment(u)},{placeholder:"Search files or type to create new...",filter:"all",sortOrder:this.plugin.settings.calendarViewSettings.timeblockAttachmentSearchOrder})})}).addButton(d=>{d.setButtonText("Add task").setTooltip("Select task").onClick(()=>{this.openTaskSelectorForTitle()})}),this.attachmentsList=t.createDiv({cls:"timeblock-attachments-list"}),await this.initializeAttachments(),this.renderAttachmentsList();let i=t.createDiv({cls:"timeblock-modal-buttons"});i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-flex-75816cae"),i.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-flex-end-455f8cca"),i.classList.add("tn-static-justify-content-space-between-a562f4fd"),i.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),i.classList.add("tn-static-align-items-center-7c619740"),i.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),i.classList.add("tn-static-margin-top-20px-a26bda7d"),i.createEl("button",{text:this.translate("modals.timeblockInfo.deleteButton"),cls:"mod-warning timeblock-delete-button"}).addEventListener("click",()=>{this.handleDelete()});let o=i.createDiv({cls:"timeblock-modal-buttons-right"});o.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),o.classList.add("tn-static-display-flex-75816cae"),o.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db"),o.classList.add("tn-static-gap-8px-33fcd4c3"),o.createEl("button",{text:this.translate("common.cancel")}).addEventListener("click",()=>this.close()),o.createEl("button",{text:this.translate("modals.timeblockInfo.saveButton"),cls:"mod-cta timeblock-save-button"}).addEventListener("click",()=>{this.handleSave()}),this.validateForm(),window.setTimeout(()=>this.titleInput.focus(),50)}validateForm(){var i;let t=this.contentEl.querySelector(".timeblock-save-button");if(!t)return;let a=!!((i=this.titleInput)==null?void 0:i.value.trim());t.disabled=!a,t.style.opacity=a?"1":"0.5"}async initializeAttachments(){if(this.timeblock.attachments)for(let t of this.timeblock.attachments){let r=t.replace(/^\[\[|\]\]$/g,""),a=this.app.vault.getAbstractFileByPath(r);a&&this.selectedAttachments.push(a)}}addAttachment(t){if(this.selectedAttachments.some(r=>r.path===t.path)){new _t.Notice(this.translate("notices.timeblockAttachmentExists",{fileName:t.name}));return}if(this.titleInput&&!this.titleInput.value.trim()){let r=t instanceof _t.TFile?t.basename:t.name;this.titleInput.value=r,this.timeblock.title=r,this.validateForm()}this.selectedAttachments.push(t),this.renderAttachmentsList(),new _t.Notice(this.translate("notices.timeblockAttachmentAdded",{fileName:t.name}))}async openTaskSelectorForTitle(){var t,r,a;try{let s=((a=await((r=(t=this.plugin.cacheManager).getAllTasks)==null?void 0:r.call(t)))!=null?a:[]).filter(o=>!o.archived);if(s.length===0){new _t.Notice("No tasks available to select");return}fn(this.plugin,s,o=>{if(!o)return;this.titleInput.value=o.title||"",this.timeblock.title=o.title||"",this.validateForm();let l=this.app.vault.getAbstractFileByPath(o.path);l&&this.addAttachment(l)},{title:"Select task"})}catch(i){JE.error("Failed to open task selector for timeblock edit:",{category:"persistence",operation:"open-task-selector-timeblock-edit",error:i}),new _t.Notice("Failed to open task selector")}}removeAttachment(t){this.selectedAttachments=this.selectedAttachments.filter(r=>r.path!==t.path),this.renderAttachmentsList(),new _t.Notice(this.translate("notices.timeblockAttachmentRemoved",{fileName:t.name}))}openAttachment(t){t instanceof _t.TFile?this.app.workspace.getLeaf(!1).openFile(t):new _t.Notice(this.translate("notices.timeblockFileTypeNotSupported",{fileName:t.name}))}renderAttachmentsList(){if(this.attachmentsList.empty(),this.selectedAttachments.length===0){let t=this.attachmentsList.createDiv({cls:"timeblock-attachments-empty"});t.textContent="No attachments";return}this.selectedAttachments.forEach(t=>{let r=this.attachmentsList.createDiv({cls:"timeblock-attachment-item"}),a=r.createDiv({cls:"timeblock-attachment-info"});a.classList.remove("tn-static-cursor-grab-dad79857","tn-static-cursor-pointer-2723efcc"),a.classList.add("tn-static-cursor-pointer-3b6a3a65"),(0,_t.setTooltip)(a,"Click to open",{placement:"top"}),a.addEventListener("click",()=>this.openAttachment(t));let i=a.createSpan({cls:"timeblock-attachment-name"});if(i.textContent=t.name,t.path!==t.name){let o=a.createDiv({cls:"timeblock-attachment-path"});o.textContent=t.path}let s=r.createEl("button",{cls:"timeblock-attachment-remove",text:"×"});(0,_t.setTooltip)(s,"Remove attachment",{placement:"top"}),s.addEventListener("click",o=>{o.stopPropagation(),this.removeAttachment(t)})})}async handleSave(){var t;try{let r=this.titleInput.value.trim();if(!r){new _t.Notice(this.translate("notices.timeblockTitleRequired"));return}this.timeblock.title=r,this.timeblock.description=this.descriptionInput.value.trim()||void 0,this.timeblock.color=hr(this.colorInput.value||void 0)||void 0;let a=this.selectedAttachments.map(i=>`[[${i.path}]]`);this.timeblock.attachments=a.length>0?a:void 0,await this.updateTimeblockInDailyNote(),(t=this.onChange)==null||t.call(this),this.plugin.emitter.trigger("data-changed"),new _t.Notice(this.translate("notices.timeblockUpdatedSuccess",{title:r})),this.close()}catch(r){JE.error("Error updating timeblock:",{category:"internal",operation:"updating-timeblock",error:r}),new _t.Notice(this.translate("notices.timeblockUpdateFailed"))}}async updateTimeblockInDailyNote(){if(!(0,ku.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let t=this.timeblockDate,r=Txe(t,"YYYY-MM-DD"),a=(0,ku.getAllDailyNotes)(),i=(0,ku.getDailyNote)(r,a);if(!i)throw new Error("Daily note not found");let s=await this.app.vault.read(i),o={},l=s;if(s.startsWith("---")){let u=s.indexOf("---",3);if(u!==-1){let p=s.substring(3,u);l=s.substring(u+3);try{o=bxe(p)}catch(m){JE.error("Error parsing existing frontmatter:",{category:"validation",operation:"parsing-existing-frontmatter",error:m}),o={}}}}if(o.timeblocks&&Array.isArray(o.timeblocks)){let u=o.timeblocks.findIndex(p=>p.id===this.originalTimeblock.id||p.title===this.originalTimeblock.title&&p.startTime===this.originalTimeblock.startTime&&p.endTime===this.originalTimeblock.endTime);if(u>=0)o.timeblocks[u]=this.timeblock;else throw new Error("Timeblock not found in daily note")}else throw new Error("No timeblocks found in daily note");let d=`---
${(0,_t.stringifyYaml)(o)}---${l}`;await Gs(this.app,i,d)}async handleDelete(){var r;if(await this.showDeleteConfirmation())try{await this.deleteTimeblockFromDailyNote(),(r=this.onChange)==null||r.call(this),this.plugin.emitter.trigger("data-changed"),new _t.Notice(this.translate("notices.timeblockDeletedSuccess",{title:this.timeblock.title})),this.close()}catch(a){JE.error("Error deleting timeblock:",{category:"internal",operation:"deleting-timeblock",error:a}),new _t.Notice(this.translate("notices.timeblockDeleteFailed"))}}async showDeleteConfirmation(){return new Promise(t=>{let r=new _t.Modal(this.app);r.titleEl.setText(this.translate("modals.timeblockInfo.deleteConfirmationTitle"));let a=r.contentEl;a.createEl("p",{text:`Are you sure you want to delete the timeblock "${this.timeblock.title}"?`}),a.createEl("p",{text:"This action cannot be undone.",cls:"mod-warning"});let i=a.createDiv({cls:"modal-button-container"});i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-flex-75816cae"),i.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),i.classList.add("tn-static-justify-content-flex-end-455f8cca"),i.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db"),i.classList.add("tn-static-gap-8px-33fcd4c3"),i.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),i.classList.add("tn-static-margin-top-20px-a26bda7d");let s=i.createEl("button",{text:this.translate("common.cancel")});s.addEventListener("click",()=>{r.close(),t(!1)}),i.createEl("button",{text:"Delete",cls:"mod-warning"}).addEventListener("click",()=>{r.close(),t(!0)}),r.open(),window.setTimeout(()=>s.focus(),50)})}async deleteTimeblockFromDailyNote(){if(!(0,ku.appHasDailyNotesPluginLoaded)())throw new Error("Daily Notes plugin is not enabled");let t=this.timeblockDate,r=Txe(t,"YYYY-MM-DD"),a=(0,ku.getAllDailyNotes)(),i=(0,ku.getDailyNote)(r,a);if(!i)throw new Error("Daily note not found");let s=await this.app.vault.read(i),o={},l=s;if(s.startsWith("---")){let u=s.indexOf("---",3);if(u!==-1){let p=s.substring(3,u);l=s.substring(u+3);try{o=bxe(p)}catch(m){JE.error("Error parsing existing frontmatter:",{category:"validation",operation:"parsing-existing-frontmatter",error:m}),o={}}}}if(o.timeblocks&&Array.isArray(o.timeblocks)){let u=o.timeblocks.findIndex(p=>p.id===this.originalTimeblock.id||p.title===this.originalTimeblock.title&&p.startTime===this.originalTimeblock.startTime&&p.endTime===this.originalTimeblock.endTime);if(u>=0)o.timeblocks.splice(u,1),o.timeblocks.length===0&&delete o.timeblocks;else throw new Error("Timeblock not found in daily note")}else throw new Error("No timeblocks found in daily note");let c=Object.keys(o).length>0?(0,_t.stringifyYaml)(o):"",d=c?`---
${c}---${l}`:l.trim();await Gs(this.app,i,d)}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}}});function sT(n,e){if(!e)return;let t=Math.ceil(e/1440),r=st(n),a=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()+t));return ae(a)}function Sxe(n,e){if(!n.scheduled)return null;let t=Jt(n.scheduled),r=n.scheduled,a;if(t&&n.timeEstimate){let o=et(r),l=new Date(o.getTime()+n.timeEstimate*60*1e3);a=D(l,"yyyy-MM-dd'T'HH:mm")}else t||(a=sT(r,n.timeEstimate));let i=hr(e.getPriorityColor(n.priority),"var(--color-accent)"),s=Ed(i)?e.getThemeTextColor(!0):i;return{id:`scheduled-${n.path}`,title:n.title,start:r,end:a,allDay:!t,backgroundColor:"transparent",borderColor:i,textColor:s,editable:!0,extendedProps:{taskInfo:n,eventType:"scheduled",isCompleted:e.isCompletedStatus(n.status)}}}function Cxe(n,e){if(!n.due)return null;let t=Jt(n.due),r=n.due,a;if(t){let o=et(r),l=new Date(o.getTime()+1800*1e3);a=D(l,"yyyy-MM-dd'T'HH:mm")}let i=hr(e.getPriorityColor(n.priority),"var(--color-orange)"),s=Ed(i)?e.getThemeTextColor(!0):i;return{id:`due-${n.path}`,title:n.title,start:r,end:a,allDay:!t,backgroundColor:iy(i,.15),borderColor:i,textColor:s,editable:!0,extendedProps:{taskInfo:n,eventType:"due",isCompleted:e.isCompletedStatus(n.status)}}}function xxe(n,e,t){if(!e||!t)return!0;let r=et(n.start),a=n.end?et(n.end):r;return r.getTime()<t.getTime()&&a.getTime()>=e.getTime()}function JZe(n,e){if(!n.scheduled||!n.due)return null;let t=et(n.scheduled),r=et(n.due);if(r<=t)return null;let a=new Date(r);a.setDate(a.getDate()+1);let i=hr(e.getPriorityColor(n.priority),"var(--color-accent)"),s=Ed(i)?e.getThemeTextColor(!0):i;return{id:`span-${n.path}`,title:n.title,start:D(t,"yyyy-MM-dd"),end:D(a,"yyyy-MM-dd"),allDay:!0,backgroundColor:iy(i,.2),borderColor:i,textColor:s,editable:!0,extendedProps:{taskInfo:n,eventType:"scheduledToDueSpan",isCompleted:e.isCompletedStatus(n.status)}}}function XZe(n,e,t,r){if(!n.scheduled||!n.due)return[];let a=et(n.scheduled);if(et(n.due)<=a)return[];let s=si(n.scheduled);if(!s)return[];let[o,l]=s.split(":").map(Number),c=et(re(n.scheduled)),d=et(re(n.due)),u=hr(e.getPriorityColor(n.priority),"var(--color-accent)"),p=Ed(u)?e.getThemeTextColor(!0):u,m=e.isCompletedStatus(n.status),f=[];for(let h=new Date(c);h.getTime()<=d.getTime();h.setDate(h.getDate()+1)){let g=new Date(h);g.setHours(o,l,0,0);let v;if(n.timeEstimate){let b=new Date(g.getTime()+n.timeEstimate*60*1e3);v=D(b,"yyyy-MM-dd'T'HH:mm")}let k=D(h,"yyyy-MM-dd"),T={id:`span-${n.path}-${k}`,title:n.title,start:D(g,"yyyy-MM-dd'T'HH:mm"),end:v,allDay:!1,backgroundColor:iy(u,.2),borderColor:u,textColor:p,editable:!0,extendedProps:{taskInfo:n,eventType:"scheduledToDueSpan",isCompleted:m}};xxe(T,t,r)&&f.push(T)}return f}function Exe(n,e,t,r){if(!n.scheduled||!n.due)return[];if(Jt(n.scheduled))return XZe(n,e,t,r);let a=JZe(n,e);return!a||!xxe(a,t,r)?[]:[a]}function eQe(n){return typeof n.endTime=="string"&&n.endTime.length>0}function Dxe(n,e){if(!n.timeEntries)return[];let t=e.isCompletedStatus(n.status);return n.timeEntries.map((r,a)=>({entry:r,index:a})).filter(({entry:r})=>eQe(r)).map(({entry:r,index:a})=>({id:`timeentry-${n.path}-${a}`,title:n.title,start:r.startTime,end:r.endTime,allDay:!1,editable:!0,extendedProps:{taskInfo:n,eventType:"timeEntry",isCompleted:t,timeEntryIndex:a}}))}var Z4=y(()=>{Cr();xe();Ll()});function eD(n,e){return(e?re(e):"")||D(n,"yyyy-MM-dd")}function Rxe(n){return n instanceof Error?n.message:String(n)}function _xe(n){return!!(n!=null&&n.ctrlKey||n!=null&&n.metaKey||n!=null&&n.altKey)}function Fxe(n){return window.moment(n)}function bF(n,e){return iy(n,e)}function nQe(){return activeDocument.body.classList.contains("theme-dark")}function ig(n=!1){return n?nQe()?"#e8eaed":"#202124":""}function wF(n){return Ed(n)}function Lxe(n,e){let t=n.title;if(n.projects&&n.projects.length>0&&(t+=`
Project: ${n.projects[0]}`),n.priority){let r=e.priorityManager.getPriorityConfig(n.priority);t+=`
Priority: ${(r==null?void 0:r.label)||n.priority}`}if(n.status){let r=e.statusManager.getStatusConfig(n.status);t+=`
Status: ${(r==null?void 0:r.label)||n.status}`}if(n.timeEstimate){let r=Math.floor(n.timeEstimate/60),a=n.timeEstimate%60;t+=`
Estimate: ${r>0?`${r}h `:""}${a}m`}return t}function Oxe(n,e){let{isNextScheduledOccurrence:t=!1,isPatternInstance:r=!1,isRecurringInstance:a=!1,isCompleted:i=!1}=e;if(t?(n.classList.remove("tn-static-border-style-dashed-12296c91"),n.classList.add("tn-static-border-style-solid-11080b69"),n.classList.add("tn-static-border-width-2px-a1222254"),n.setAttribute("data-next-scheduled","true"),n.classList.add("fc-next-scheduled-event"),i&&(n.classList.remove("tn-static-opacity-0-8d919cb5","tn-static-opacity-1-c6e7979d"),n.classList.add("tn-static-opacity-0-6-d95b59ac"))):r?(n.classList.remove("tn-static-border-style-solid-11080b69"),n.classList.add("tn-static-border-style-dashed-12296c91"),n.classList.add("tn-static-border-width-2px-a1222254"),n.style.opacity=i?"0.4":"0.7",n.setAttribute("data-pattern-instance","true"),n.classList.add("fc-pattern-instance-event")):a&&(n.classList.remove("tn-static-border-style-solid-11080b69"),n.classList.add("tn-static-border-style-dashed-12296c91"),n.classList.add("tn-static-border-width-2px-a1222254"),n.setAttribute("data-recurring","true"),n.classList.add("fc-recurring-event"),i&&(n.classList.remove("tn-static-opacity-0-8d919cb5","tn-static-opacity-1-c6e7979d"),n.classList.add("tn-static-opacity-0-6-d95b59ac"))),e.isMaterializedOccurrence&&(n.setAttribute("data-materialized-occurrence","true"),n.classList.add("fc-materialized-occurrence-event")),i){let s=n.querySelector(".fc-event-title, .fc-event-title-container");s?(s.classList.remove("tn-static-text-decoration-none-80d654f9"),s.classList.add("tn-static-text-decoration-line-through-7059a4e5")):(n.classList.remove("tn-static-text-decoration-none-80d654f9"),n.classList.add("tn-static-text-decoration-line-through-7059a4e5")),n.classList.add("fc-completed-event")}}async function aQe(n,e,t,r){try{if(!n.recurrence||typeof n.recurrence!="string")throw new Error("Task does not have a valid RRULE string");let a=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/),i;if(a){let s=a[1],o;if(t)o=s.slice(0,8);else{let l=s.slice(0,8),c=String(e.getHours()).padStart(2,"0"),d=String(e.getMinutes()).padStart(2,"0");o=`${l}T${c}${d}00Z`}i=n.recurrence.replace(/DTSTART:[^;]+/,`DTSTART:${o}`),new Dn.Notice("Updated recurring pattern time. All future instances now appear at this time.")}else{let s=Qte(n,e,t);if(!s)throw new Error("Failed to add DTSTART to recurrence rule");i=s,new Dn.Notice("Added time information to recurring pattern. All future instances now appear at this time.")}await r.taskService.updateProperty(n,"recurrence",i)}catch(a){throw Hc.error("Error updating pattern instance time:",{category:"provider",operation:"updating-pattern-instance-time",error:a}),a}}async function zxe(n,e,t){var l,c;let{isRecurringInstance:r,isNextScheduledOccurrence:a,isPatternInstance:i}=(l=n.event.extendedProps)!=null?l:{},s=n.event.start;if(!s){n.revert();return}let o=(c=n.event.allDay)!=null?c:!1;if(a){let d;o?d=D(s,"yyyy-MM-dd"):d=D(s,"yyyy-MM-dd'T'HH:mm"),await t.taskService.updateProperty(e,"scheduled",d),new Dn.Notice("Rescheduled next occurrence. This does not change the recurrence pattern.")}else if(i)await aQe(e,s,o,t);else if(r){let d=re(e.scheduled),u;if(o)u=d,new Dn.Notice("Updated recurring task to all-day. This affects all future instances.");else{let p=D(s,"HH:mm");u=`${d}T${p}`,new Dn.Notice(`Updated recurring task time to ${p}. This affects all future instances.`)}await t.taskService.updateProperty(e,"scheduled",u)}}function Bxe(n,e){var i;if(!n.recurrence)return;let t=e,a=(i=(t.event||t).extendedProps)==null?void 0:i.instanceDate;if(!(typeof a!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(a)))return st(a)}function SF(n){let e=n,t=e.event||e,r=t.extendedProps||{},{isRecurringInstance:a,isNextScheduledOccurrence:i,isPatternInstance:s,isMaterializedOccurrence:o,instanceDate:l}=r;if((a||i||s||o)&&l)return st(l);let c=t.start;if(c){let d=D(c,"yyyy-MM-dd");return st(d)}return Xt()}function CF(n){return{getPriorityColor:e=>{var t;return(t=n.priorityManager.getPriorityConfig(e))==null?void 0:t.color},isCompletedStatus:e=>n.statusManager.isCompletedStatus(e),getThemeTextColor:(e=!1)=>ig(e)}}function iQe(n){return n?typeof n.has=="function"?n:new Set(n):new Set}function sQe(n,e){var l,c;let t=n.recurrence_parent;if(!t)return"";let r=eh(t),a=(l=e.app)==null?void 0:l.metadataCache,i=vt(t),s=(c=a==null?void 0:a.getFirstLinkpathDest)==null?void 0:c.call(a,i,n.path),o=s&&typeof s.path=="string"?s.path:void 0;return o?eh(o):r}function oQe(n){return eh(n.path)}function lQe(n,e){let t=new Map;for(let r of n){if(!FC(r))continue;let a=sQe(r,e),i=re(r.occurrence_date);if(!a||!i)continue;let s=t.get(a);s||(s=new Set,t.set(a,s)),s.add(i)}return t}function oT(n,e){if(!FC(e))return n;let t=re(e.occurrence_date);return{...n,extendedProps:{...n.extendedProps,isMaterializedOccurrence:!0,instanceDate:t,occurrenceDate:t,occurrenceParent:e.recurrence_parent}}}function Pxe(n,e){return Sxe(n,CF(e))}function Axe(n,e){return Cxe(n,CF(e))}function jxe(n,e,t,r){return Exe(n,CF(e),t,r)}function cQe(n,e){return Dxe(n,CF(e))}function X4(n,e,t={}){var r;try{let a=n.subscriptionId.startsWith("google-"),i=n.subscriptionId.startsWith("microsoft-"),s,o,l,c;if(a)o=n.color||"#4285F4",s=bF(o,.2),l=ig(!0),c="Google Calendar";else if(i)o=n.color||"#0078D4",s=bF(o,.2),l=ig(!0),c="Microsoft Calendar";else{let p=(r=e.icsSubscriptionService)==null?void 0:r.getSubscriptions().find(m=>m.id===n.subscriptionId);if(!p||!p.enabled)return null;o=hr(p.color,"#3788d8"),s=bF(o,.2),l=wF(o)?ig(!0):o,c=p.name}let{start:d,end:u}=dQe(n.start,n.end,n.allDay);return{id:n.id,title:n.title,start:d,end:u,allDay:n.allDay,backgroundColor:s,borderColor:o,textColor:l,editable:a||i,extendedProps:{icsEvent:n,eventType:"ics",subscriptionName:c,isGoogleCalendar:a,isMicrosoftCalendar:i,relatedNoteCount:t.relatedNoteCount&&t.relatedNoteCount>0?t.relatedNoteCount:void 0}}}catch(a){return Hc.error("Error creating ICS event:",{category:"provider",operation:"creating-ics-event",error:a}),null}}function dQe(n,e,t){if(t||!e)return{start:n,end:e};let r=new Date(n),a=new Date(e);if(Number.isNaN(r.getTime())||Number.isNaN(a.getTime())||a.getTime()!==r.getTime())return{start:n,end:e};let i=new Date(a.getTime()+tQe);return{start:n,end:uQe(i,e)}}function uQe(n,e){if(/Z$/i.test(e))return n.toISOString();let t=e.match(/([+-])(\d{2}):?(\d{2})$/);if(t){let[,r,a,i]=t,o=(Number(a)*60+Number(i))*60*1e3*(r==="+"?1:-1),l=new Date(n.getTime()+o),c=(p,m=2)=>String(p).padStart(m,"0"),d=`${l.getUTCFullYear()}-${c(l.getUTCMonth()+1)}-${c(l.getUTCDate())}`,u=`${c(l.getUTCHours())}:${c(l.getUTCMinutes())}:${c(l.getUTCSeconds())}.${c(l.getUTCMilliseconds(),3)}`;return`${d}T${u}${r}${a}:${i}`}return D(n,"yyyy-MM-dd'T'HH:mm:ss.SSS")}function pQe(n){if(n.recurrence&&typeof n.recurrence=="string"){let e=n.recurrence.match(/DTSTART:(\d{8}(?:T\d{6}Z?)?)/);if(e&&e[1].includes("T")){let t=e[1].split("T")[1];if(t.length>=4){let r=t.slice(0,2),a=t.slice(2,4);return`${r}:${a}`}}}if(n.scheduled){let e=si(n.scheduled);if(e)return e}return"09:00"}function mQe(n){if(!n.scheduled||!n.due)return null;let e=et(n.scheduled);if(et(n.due)<=e)return null;let r=et(re(n.scheduled)),a=et(re(n.due)),i=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate()),s=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate());return Math.round((s-i)/rQe)}function fQe(n,e){let t=new Date(n);return t.setDate(t.getDate()+e),t}function hQe(n,e){let t=new Date(n);return t.setUTCDate(t.getUTCDate()+e),t}function $xe(n,e){let t=si(n);return t?`${e}T${t}`:e}function gQe(n){return!!(n.scheduled&&n.due&&!Jt(n.due)&&re(n.scheduled)===re(n.due))}function Q4(n,e,t,r,a,i,s,o){var h,g;if(!n.scheduled||!n.due)return[];let l=fQe(et(e),a),c=D(l,"yyyy-MM-dd"),d=Jt(n.scheduled)?t:null,u={...n,scheduled:d?`${e}T${d}`:e,due:$xe(n.due,c)},p=((h=n.complete_instances)==null?void 0:h.includes(e))||!1,m=((g=n.skipped_instances)==null?void 0:g.includes(e))||!1,f={isCompleted:p,isSkipped:m,isNextScheduledOccurrence:r==="next-scheduled",isPatternInstance:r==="pattern",isRecurringInstance:r==="recorded",instanceDate:e,recurringTemplateTime:t};return jxe(u,i,s,o).map(v=>{let k=re(v.start);return{...v,id:`span-${r}-${n.path}-${e}-${k}`,editable:!1,extendedProps:{...v.extendedProps,taskInfo:n,...f}}})}function yQe(n,e,t,r,a){var m,f;let i=Jt(e),s;if(i&&n.timeEstimate){let h=et(e),g=new Date(h.getTime()+n.timeEstimate*60*1e3);s=D(g,"yyyy-MM-dd'T'HH:mm")}else i||(s=sT(e,n.timeEstimate));let o=a.priorityManager.getPriorityConfig(n.priority),l=hr(o==null?void 0:o.color,"var(--color-accent)"),c=((m=n.complete_instances)==null?void 0:m.includes(t))||!1,d=((f=n.skipped_instances)==null?void 0:f.includes(t))||!1,u=wF(l)?ig(!0):l,p="transparent";return c?p="rgba(0,0,0,0.3)":d&&(p="rgba(128,128,128,0.2)"),{id:`next-scheduled-${n.path}-${t}`,title:n.title,start:e,end:s,allDay:!i,backgroundColor:p,borderColor:l,textColor:u,editable:!0,extendedProps:{taskInfo:n,eventType:"scheduled",isCompleted:c,isSkipped:d,isNextScheduledOccurrence:!0,instanceDate:t,recurringTemplateTime:r}}}function vQe(n,e,t,r,a){var f,h;let i=Jt(e),s;if(i&&n.timeEstimate){let g=et(e),v=new Date(g.getTime()+n.timeEstimate*60*1e3);s=D(v,"yyyy-MM-dd'T'HH:mm")}else i||(s=sT(e,n.timeEstimate));let o=a.priorityManager.getPriorityConfig(n.priority),l=hr(o==null?void 0:o.color,"var(--color-accent)"),c=((f=n.complete_instances)==null?void 0:f.includes(t))||!1,d=((h=n.skipped_instances)==null?void 0:h.includes(t))||!1,u=bF(l,.5),p=wF(l)?ig(!0):u,m="transparent";return c?m="rgba(0,0,0,0.2)":d&&(m="rgba(128,128,128,0.15)"),{id:`recurring-${n.path}-${t}`,title:n.title,start:e,end:s,allDay:!i,backgroundColor:m,borderColor:u,textColor:p,editable:!0,extendedProps:{taskInfo:n,eventType:"recurring",isCompleted:c,isSkipped:d,isPatternInstance:!0,instanceDate:t,recurringTemplateTime:r}}}function kQe(n,e,t,r,a){var m,f;let i=Jt(e),s;if(i&&n.timeEstimate){let h=et(e),g=new Date(h.getTime()+n.timeEstimate*60*1e3);s=D(g,"yyyy-MM-dd'T'HH:mm")}else i||(s=sT(e,n.timeEstimate));let o=a.priorityManager.getPriorityConfig(n.priority),l=hr(o==null?void 0:o.color,"var(--color-accent)"),c=((m=n.complete_instances)==null?void 0:m.includes(t))||!1,d=((f=n.skipped_instances)==null?void 0:f.includes(t))||!1,u=wF(l)?ig(!0):l,p="transparent";return c?p="rgba(0,0,0,0.3)":d&&(p="rgba(128,128,128,0.2)"),{id:`recurring-recorded-${n.path}-${t}`,title:n.title,start:e,end:s,allDay:!i,backgroundColor:p,borderColor:l,textColor:u,editable:!1,extendedProps:{taskInfo:n,eventType:"recurring",isCompleted:c,isSkipped:d,isRecurringInstance:!0,instanceDate:t,recurringTemplateTime:r}}}function TQe(n,e,t,r,a={}){if(!n.recurrence||!n.scheduled)return[];let{showCompletedRecurringInstances:i=!0,showSkippedRecurringInstances:s=!0,showProjectedRecurringInstances:o=!0,showScheduledToDueSpan:l=!1,materializedOccurrenceDates:c,visibleStartDate:d,visibleEndDate:u}=a,p=[],m=new Set,f=iQe(c),h=eD(e,d),g=eD(t,u),v=Jt(n.scheduled),k=pQe(n),T=re(n.scheduled),b=new Set(n.googleCalendarMovedOriginalDates||[]);n.googleCalendarExceptionOriginalScheduled&&b.add(re(n.googleCalendarExceptionOriginalScheduled));let w=l?mQe(n):null,S=w!==null,C=S?hQe(e,-Math.max(w,0)):e;if(o){let x=v?si(n.scheduled):null,E=x?`${T}T${x}`:T,_=yQe(n,E,T,x||"09:00",r);if(_&&!f.has(T)&&Mxe(n,T,i,s))if(S){let R=Q4(n,T,x||k,"next-scheduled",w,r,e,t);R.length>0&&(p.push(...R),m.add(T))}else p.push(_),m.add(T);let F=t;typeof n.recurrence=="string"&&n.recurrence.includes("FREQ=YEARLY")&&(F=new Date(e.getTime()+800*24*60*60*1e3));let I=ly(n,C,F),A=S?eD(C):h;for(let R of I){let O=ae(R);if(O<A||O>=g||O===T||b.has(O)||f.has(O)||!Mxe(n,O,i,s))continue;if(S){let oe=Q4(n,O,k,"pattern",w,r,e,t);oe.length>0&&(p.push(...oe),m.add(O));continue}let U=v?`${O}T${k}`:O,pe=vQe(n,U,O,k,r);pe&&(p.push(pe),m.add(O))}}for(let x of bQe(n,C,t,i,s,h,g)){if(f.has(x)||m.has(x))continue;if(S){let F=Q4(n,x,k,"recorded",w,r,e,t);F.length>0&&(p.push(...F),m.add(x));continue}let E=v?`${x}T${k}`:x,_=kQe(n,E,x,k,r);_&&(p.push(_),m.add(x))}return p}function bQe(n,e,t,r,a,i=eD(e),s=eD(t)){let o=new Set;if(r)for(let l of n.complete_instances||[])l>=i&&l<s&&o.add(l);if(a)for(let l of n.skipped_instances||[])l>=i&&l<s&&o.add(l);return[...o].sort()}function Mxe(n,e,t,r){var a,i;return!(!t&&((a=n.complete_instances)!=null&&a.includes(e))||!r&&((i=n.skipped_instances)!=null&&i.includes(e)))}function wQe(n,e,t="#6366f1"){let r=`${e}T${n.startTime}:00`,a=`${e}T${n.endTime}:00`,i=hr(n.color||t,"#6366f1"),s=i;return{id:`timeblock-${n.id}`,title:n.title,start:r,end:a,allDay:!1,backgroundColor:i,borderColor:s,textColor:"var(--text-on-accent)",editable:!0,extendedProps:{eventType:"timeblock",timeblock:n,originalDate:e}}}function SQe(n,e){let t=n;if(!(t!=null&&t.timeblocks)||!Array.isArray(t.timeblocks))return[];let r=[];for(let a of t.timeblocks){let i=a;i&&typeof i.id=="string"&&typeof i.startTime=="string"&&typeof i.endTime=="string"&&r.push(i)}return r}async function xQe(n,e,t){try{let r=Date.now();(!J4||r-Ixe>CQe)&&(J4=(0,Vc.getAllDailyNotes)(),Ixe=r);let a=J4,i=[];for(let s=new Date(e);s<=t;s.setUTCDate(s.getUTCDate()+1)){let o=ae(s),l=new Date(`${o}T12:00:00`),c=(0,Vc.getDailyNote)(Fxe(l),a);if(c){let d=n.app.metadataCache.getFileCache(c);if(d!=null&&d.frontmatter){let u=SQe(d.frontmatter,c.path);for(let p of u)i.push(wQe(p,o,n.settings.calendarViewSettings.defaultTimeblockColor))}}}return i}catch(r){return Hc.error("Error getting timeblock events:",{category:"provider",operation:"getting-timeblock-events",error:r}),[]}}function XE(n,e,t,r){if(!e||!t)return!0;try{let i=et(n).getTime();if(isNaN(i))return!0;let s=i;return r&&(s=i+r*60*1e3),i<t.getTime()&&s>=e.getTime()}catch(a){return!0}}function EQe(n,e){return e?D(n,"yyyy-MM-dd'T'HH:mm"):D(n,"yyyy-MM-dd")}function Uxe(n,e){if(n)return $xe(n,e)}function DQe(n,e){if(n.end)try{let t=et(n.start),r=et(n.end),a=et(e),i=new Date(a.getTime()+(r.getTime()-t.getTime()));return EQe(i,Jt(n.end))}catch(t){return Uxe(n.end,re(e))}}function Nxe(n,e,t,r,a,i){if(!e||!XE(t,a,i)||re(e)===t)return null;let s=!!n.extendedProps.isCompleted;if(!ps(e,s,r))return null;let o=Uxe(n.start,t);return o?{...n,id:`${n.id}-overdue-today`,start:o,end:DQe(n,o),extendedProps:{...n.extendedProps,isOverdueOnToday:!0}}:null}async function Hxe(n,e,t={}){var S,C,x;let{showScheduled:r=!0,showDue:a=!0,showScheduledToDueSpan:i=!1,showTimeEntries:s=!0,showRecurring:o=!0,showCompletedRecurringInstances:l=!0,showSkippedRecurringInstances:c=!0,showICSEvents:d=!0,showTimeblocks:u=!1,showOverdueOnToday:p=!1,visibleStart:m,visibleEnd:f,visibleStartDate:h,visibleEndDate:g}=t,v=[],k=lQe(n,e),T=p?Yo():null,b=(C=(S=e.settings)==null?void 0:S.hideCompletedFromOverdue)!=null?C:!0,w=(E,_,F,I=a,A=!1,R=!1)=>{let O=!1,U=!1;if(F&&i&&E.scheduled&&E.due){let X=jxe(E,e,m,f).map(de=>oT(de,E));X.length>0&&(v.push(...X),O=!0)}if(O)return;if(_&&E.scheduled){if(XE(E.scheduled,m,f,E.timeEstimate)){let X=Pxe(E,e);X&&v.push(oT(X,E))}else if(T){let X=Pxe(E,e),de=X?Nxe(oT(X,E),E.scheduled,T,b,m,f):null;de&&(v.push(de),U=!0)}}let pe=I&&(_||A)&&gQe(E);if(I&&!pe&&E.due){if(XE(E.due,m,f)){let X=Axe(E,e);X&&v.push(oT(X,E))}else if(T&&!((U||R)&&!Jt(E.due))){let X=Axe(E,e),de=X?Nxe(oT(X,E),E.due,T,b,m,f):null;de&&v.push(de)}}};for(let E of n)try{if(E.recurrence){let _=r,F=a,I=!0,A=!1,R=!1;if((o||l||c)&&m&&f&&E.scheduled){let O=TQe(E,m,f,e,{showCompletedRecurringInstances:l,showSkippedRecurringInstances:c,showProjectedRecurringInstances:o,showScheduledToDueSpan:i,materializedOccurrenceDates:(x=k.get(oQe(E)))!=null?x:new Set,visibleStartDate:h,visibleEndDate:g});v.push(...O),o&&(A=O.length>0,R=!!(T&&O.some(U=>re(U.start)===T)),_=!1,I=!1,O.some(U=>U.extendedProps.eventType==="scheduledToDueSpan")&&(F=!1))}w(E,_,I,F,A,R)}else w(E,r,!0);if(s&&E.timeEntries){let _=cQe(E,e);for(let F of _)XE(F.start,m,f)&&v.push(oT(F,E))}}catch(_){Hc.warn(`[TaskNotes][Calendar] Error processing task "${E.title}" (${E.path}):`,{category:"provider",operation:"processing-task",error:_})}if(d&&e.icsSubscriptionService){let E=e.icsSubscriptionService.getAllEvents();for(let _ of E)if(XE(_.start,m,f)){let F=X4(_,e);F&&v.push(F)}}if(u&&m&&f){let E=await xQe(e,m,f);v.push(...E)}return v}async function Vxe(n,e,t,r,a){if(t){new Dn.Notice("Timeblocks must have specific times. Please select a time range in week or day view.");return}let i=D(n,"yyyy-MM-dd"),s=D(n,"HH:mm"),o=D(e,"HH:mm");new dv(r.app,r,{date:i,startTime:s,endTime:o,onCreated:a}).open()}async function Wxe(n,e,t,r){if(t){new Dn.Notice(r.i18n.translate("modals.timeEntry.mustHaveSpecificTime"));return}try{let i=(await r.cacheManager.getAllTasks()).filter(s=>!s.archived);if(i.length===0){new Dn.Notice(r.i18n.translate("modals.timeEntry.noTasksAvailable"));return}fn(r,i,s=>{(async()=>{if(s)try{let o=Math.round((e.getTime()-n.getTime())/6e4),l={startTime:n.toISOString(),endTime:e.toISOString(),description:""},c=[...s.timeEntries||[],l].map(d=>{let u={...d};return delete u.duration,u});await r.taskService.updateTask(s,{timeEntries:c}),r.emitter.trigger(Ra),new Dn.Notice(r.i18n.translate("modals.timeEntry.created",{taskTitle:s.title,duration:o.toString()}))}catch(o){Hc.error("Error creating time entry:",{category:"provider",operation:"creating-time-entry",error:o}),new Dn.Notice(r.i18n.translate("modals.timeEntry.createFailed"))}})()})}catch(a){Hc.error("Error opening task selector for time entry:",{category:"provider",operation:"opening-task-selector-time-entry",error:a}),new Dn.Notice(r.i18n.translate("modals.timeEntry.createFailed"))}}async function qxe(n,e,t,r,a=!1){try{let i=n.event.start,s=n.event.end;if(!i||!s){n.revert();return}let o=D(i,"yyyy-MM-dd"),l=D(i,"HH:mm"),c=D(s,"HH:mm");if(a){await Yte(r.app,o,e,l,c),n.revert(),r.emitter.trigger(Ra),new Dn.Notice("Timeblock duplicated successfully");return}await Xz(r.app,e.id,t,o,l,c),new Dn.Notice("Timeblock moved successfully")}catch(i){Hc.error("Error moving timeblock:",{category:"provider",operation:"moving-timeblock",error:i}),new Dn.Notice(`Failed to move timeblock: ${Rxe(i)}`),n.revert()}}async function Gxe(n,e,t,r){try{let a=n.event.start,i=n.event.end;if(!a||!i){n.revert();return}let s=D(a,"HH:mm"),o=D(i,"HH:mm");await Xz(r.app,e.id,t,t,s,o),new Dn.Notice("Timeblock duration updated")}catch(a){Hc.error("Error resizing timeblock:",{category:"provider",operation:"resizing-timeblock",error:a}),new Dn.Notice(`Failed to resize timeblock: ${Rxe(a)}`),n.revert()}}async function xF(n,e,t,r,a){new TF(r.app,r,n,e,t,a).open()}function Yxe(n,e){n.setAttribute("data-timeblock-id",e.id||""),n.classList.remove("tn-static-border-style-dashed-12296c91"),n.classList.add("tn-static-border-style-solid-11080b69"),n.classList.add("tn-static-border-width-2px-a1222254"),n.classList.add("fc-timeblock-event")}function Kxe(n){var t;let e=((t=n.attachments)==null?void 0:t.length)||0;return`${n.title||"Timeblock"}${n.description?` - ${n.description}`:""}${e>0?` (${e} attachment${e>1?"s":""})`:""}`}function Zxe(n,e,t,r="tasknotes-calendar"){n.addEventListener("mouseover",a=>{t.app.vault.getAbstractFileByPath(e.path)&&t.app.workspace.trigger("hover-link",{event:a,source:r,hoverParent:n,targetEl:n,linktext:e.path,sourcePath:e.path})})}async function e3(n,e,t={}){try{let{createIfMissing:r=!0}=t;if(!(0,Vc.appHasDailyNotesPluginLoaded)()){new Dn.Notice("Daily notes core plugin is not enabled. Please enable it in settings > core plugins.");return}let a=Fxe(n),i=(0,Vc.getAllDailyNotes)(),s=(0,Vc.getDailyNote)(a,i);if(!s){if(!r){new Dn.Notice(e.i18n.translate("views.basesCalendar.notices.noDailyNoteForDate"));return}try{s=await(0,Vc.createDailyNote)(a)}catch(o){let l=o instanceof Error?o.message:String(o);Hc.error("Failed to create daily note:",{category:"provider",operation:"create-daily-note",error:o}),new Dn.Notice(`Failed to create daily note: ${l}`);return}}s&&await e.app.workspace.getLeaf(!1).openFile(s)}catch(r){let a=r instanceof Error?r.message:String(r);Hc.error("Failed to navigate to daily note:",{category:"provider",operation:"navigate-daily-note",error:r}),new Dn.Notice(`Failed to navigate to daily note: ${a}`)}}function t3(n,e,t,r,a=e3){if(t!=="timeGridDay")return;let i=n.querySelector(".fc-col-header-cell-cushion")||n,s=`Go to ${D(e,"d MMMM yyyy")}`;i.setAttribute("data-navlink",""),i.setAttribute("title",s),i.setAttribute("aria-label",s),i.classList.add("tasknotes-calendar-daily-note-link"),i.dataset.tasknotesDailyNoteDate=e.toISOString(),i.matches("a")&&!i.getAttribute("href")&&i.setAttribute("href","#"),i.dataset.tasknotesDailyNoteLinkAttached!=="true"&&(i.dataset.tasknotesDailyNoteLinkAttached="true",i.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation();let l=o.currentTarget,c=l!=null&&l.dataset.tasknotesDailyNoteDate?new Date(l.dataset.tasknotesDailyNoteDate):e;a(c,r)}))}function Qxe(n,e,t,r){let a=t?D(n,"yyyy-MM-dd"):D(n,"yyyy-MM-dd'T'HH:mm"),i=Math.round((e.getTime()-n.getTime())/(1e3*60)),s=!t&&i>r,o={scheduled:a};if(t){let c=Math.round((e.getTime()-n.getTime())/864e5);c>1&&(o.timeEstimate=c*1440)}else s&&(o.timeEstimate=i);return o}var Dn,Vc,Hc,tQe,rQe,J4,Ixe,CQe,tD=y(()=>{Cr();Pr();xe();yt();Cn();Dn=require("obsidian");TU();Vc=tt(od());x2();co();wxe();Ll();Z4();q();Z4();Hc=M({tag:"Bases/CalendarCore"}),tQe=1,rQe=1440*60*1e3;J4=null,Ixe=0,CQe=5e3});function PQe(n,e){return e?D(n,"yyyy-MM-dd"):D(n,"yyyy-MM-dd'T'HH:mm")}function EF(n){return n?n.includes(".")?n.split(".").pop()||null:n:null}function Jxe(n,e){let t=et(n),r=new Date(t.getTime()+e);return Jt(n)?D(r,"yyyy-MM-dd'T'HH:mm"):D(r,"yyyy-MM-dd")}function eEe(n){let{eventType:e,taskInfo:t,newStart:r,oldStart:a,allDay:i}=n;if(e==="scheduled"||e==="due")return r?{kind:"update-date-property",property:e,value:PQe(r,i)}:{kind:"revert",reason:"missing-new-start"};if(e==="scheduledToDueSpan"){if(!a)return{kind:"revert",reason:"missing-old-start"};if(!r)return{kind:"revert",reason:"missing-new-start"};let s=r.getTime()-a.getTime();return{kind:"update-scheduled-due-span",scheduled:t.scheduled?Jxe(t.scheduled,s):void 0,due:t.due?Jxe(t.due,s):void 0}}return{kind:"ignore",reason:"unsupported-event-type"}}function tEe(n){let{eventType:e,start:t,end:r,allDay:a}=n;return e!=="scheduled"&&e!=="recurring"?{kind:"revert",reason:"unsupported-event-type"}:!t||!r?{kind:"ignore",reason:"missing-range"}:{kind:"update-time-estimate",value:a?Math.round((r.getTime()-t.getTime())/(1440*60*1e3))*60*24:Math.round((r.getTime()-t.getTime())/(1e3*60))}}function rEe(n){return n.map(e=>{let t={...e};return delete t.duration,t})}function sg(n){return Number.isNaN(n.getTime())}function nEe(n,e){return D(n,e?"yyyy-MM-dd":"yyyy-MM-dd'T'HH:mm")}function Xxe(n){if(!n.value)return null;let e=new Date(Y(n.value));if(sg(e))return null;let t=new Date(e.getTime()+n.timeDiffMs);return sg(t)?null:nEe(t,n.allDay)}function aEe(n){let{frontmatter:e,startProperty:t,endProperty:r,oldStart:a,newStart:i,allDay:s}=n;if(!t)return{kind:"revert",reason:"missing-start-property"};if(!a||!i)return{kind:"revert",reason:"missing-start-date"};let o=i.getTime()-a.getTime(),l={},c=e[t];if(c){let d=Xxe({value:c,timeDiffMs:o,allDay:s});if(!d)return{kind:"ignore",reason:"invalid-start-value"};l[t]=d}if(r){let d=e[r],u=Xxe({value:d,timeDiffMs:o,allDay:s});u&&(l[r]=u)}return Object.keys(l).length===0?{kind:"ignore",reason:"no-date-values"}:{kind:"update-frontmatter",updates:l}}function iEe(n){let{endProperty:e,newEnd:t,allDay:r}=n;return e?t?sg(t)?{kind:"ignore",reason:"invalid-end-date"}:{kind:"update-frontmatter",updates:{[e]:nEe(t,r)}}:{kind:"revert",reason:"missing-end-date"}:{kind:"revert",reason:"missing-end-property"}}function sEe(n){let{timeEntries:e,timeEntryIndex:t,oldStart:r,newStart:a,newEnd:i}=n;if(typeof t!="number")return{kind:"revert",reason:"missing-index"};if(!a||!i)return{kind:"revert",reason:"missing-new-range"};if(!r)return{kind:"revert",reason:"missing-old-start"};let s=rEe(e!=null?e:[]),o=s[t];if(!o)return{kind:"ignore",reason:"missing-entry"};if(!o.endTime)return{kind:"revert",reason:"missing-entry-end"};let l=new Date(o.startTime),c=new Date(o.endTime);if(sg(l)||sg(c))return{kind:"revert",reason:"invalid-date"};let d=a.getTime()-r.getTime();return o.startTime=new Date(l.getTime()+d).toISOString(),o.endTime=new Date(c.getTime()+d).toISOString(),{kind:"update-time-entries",timeEntries:s}}function oEe(n){let{timeEntries:e,timeEntryIndex:t,newStart:r,newEnd:a}=n;if(typeof t!="number")return{kind:"revert",reason:"missing-index"};if(!r||!a)return{kind:"revert",reason:"missing-new-range"};if(sg(r)||sg(a))return{kind:"revert",reason:"invalid-date"};let i=rEe(e!=null?e:[]),s=i[t];return s?(s.startTime=r.toISOString(),s.endTime=a.toISOString(),{kind:"update-time-entries",timeEntries:i}):{kind:"ignore",reason:"missing-entry"}}function r3(n){let{start:e,allDay:t,timezone:r,requireEnd:a=!1}=n,{end:i}=n;if(!e)return{kind:"revert",reason:"missing-start"};if(!i){if(a)return{kind:"revert",reason:"missing-end"};i=new Date(e),t?i.setDate(i.getDate()+1):i.setHours(i.getHours()+1)}return t?{kind:"update-provider-event",updates:{start:{date:D(e,"yyyy-MM-dd")},end:{date:D(i,"yyyy-MM-dd")}}}:{kind:"update-provider-event",updates:{start:{dateTime:D(e,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:r},end:{dateTime:D(i,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:r}}}}var lEe=y(()=>{Cr();xe();dr()});function MQe(n,e){if(e){let r=n.findIndex(a=>a.provider.providerId==="google"&&a.calendar.id===e);if(r>=0)return r}let t=n.findIndex(r=>r.calendar.primary);return t>=0?t:0}var Ls,AQe,DF,cEe=y(()=>{Ls=require("obsidian");Cr();q();AQe=M({tag:"Modals/CalendarEventCreationModal"});DF=class extends Ls.Modal{constructor(t,r,a){super(t);this.writableCalendars=[];this.keyboardHandler=null;this.plugin=r,this.options=a,this.translate=r.i18n.translate.bind(r.i18n),this.writableCalendars=this.getWritableCalendars()}getWritableCalendars(){let t=[],r=this.plugin.calendarProviderRegistry;if(!r)return t;for(let a of r.getAllProviders())for(let i of a.getAvailableCalendars())t.push({provider:a,calendar:i});return t}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("tasknotes-plugin","calendar-event-creation-modal"),this.keyboardHandler=l=>{l.key==="Enter"&&(l.ctrlKey||l.metaKey)&&(l.preventDefault(),this.handleSubmit())},this.containerEl.addEventListener("keydown",this.keyboardHandler),new Ls.Setting(t).setName(this.translate("modals.calendarEventCreation.heading")).setHeading();let r=t.createDiv({cls:"calendar-event-date-display"});r.createEl("strong",{text:this.translate("modals.calendarEventCreation.dateTimeLabel")});let a=this.options.allDay?D(this.options.start,"PPP"):`${D(this.options.start,"PPP p")} – ${D(this.options.end,"p")}`;r.createSpan({text:a}),new Ls.Setting(t).setName(this.translate("modals.calendarEventCreation.titleLabel")).setDesc(this.translate("modals.calendarEventCreation.titleDesc")).addText(l=>{this.titleInput=l.inputEl,l.setPlaceholder(this.translate("modals.calendarEventCreation.titlePlaceholder")).onChange(()=>this.validateForm()),window.setTimeout(()=>this.titleInput.focus(),100)}),this.writableCalendars.length>1&&new Ls.Setting(t).setName(this.translate("modals.calendarEventCreation.calendarLabel")).setDesc(this.translate("modals.calendarEventCreation.calendarDesc")).addDropdown(l=>{this.calendarDropdown=l.selectEl;for(let d=0;d<this.writableCalendars.length;d++){let u=this.writableCalendars[d],p=`${u.calendar.summary} (${u.provider.providerName})`;l.addOption(String(d),p)}let c=MQe(this.writableCalendars,this.plugin.settings.googleCalendarExport.targetCalendarId);l.setValue(String(c))}),new Ls.Setting(t).setName(this.translate("modals.calendarEventCreation.descriptionLabel")).setDesc(this.translate("modals.calendarEventCreation.descriptionDesc")).addTextArea(l=>{this.descriptionInput=l.inputEl,l.setPlaceholder(this.translate("modals.calendarEventCreation.descriptionPlaceholder")),this.descriptionInput.rows=3}),new Ls.Setting(t).setName(this.translate("modals.calendarEventCreation.locationLabel")).setDesc(this.translate("modals.calendarEventCreation.locationDesc")).addText(l=>{this.locationInput=l.inputEl,l.setPlaceholder(this.translate("modals.calendarEventCreation.locationPlaceholder"))});let i=t.createDiv({cls:"calendar-event-modal-buttons"});i.createEl("button",{text:this.translate("common.cancel")}).addEventListener("click",()=>this.close()),i.createEl("button",{text:this.translate("modals.calendarEventCreation.createButton"),cls:"mod-cta calendar-event-create-button"}).addEventListener("click",()=>{this.handleSubmit()}),this.validateForm()}validateForm(){var a;let t=this.contentEl.querySelector(".calendar-event-create-button");if(!t)return;let r=!!((a=this.titleInput)!=null&&a.value.trim());t.disabled=!r,t.style.opacity=r?"1":"0.5"}async handleSubmit(){var i,s,o,l;let t=this.titleInput.value.trim();if(!t){new Ls.Notice(this.translate("modals.calendarEventCreation.titleRequired"));return}let r=this.calendarDropdown?parseInt(this.calendarDropdown.value):0,a=this.writableCalendars[r];if(!a){new Ls.Notice(this.translate("modals.calendarEventCreation.noCalendarSelected"));return}try{let{start:c,end:d,allDay:u}=this.options,p=Intl.DateTimeFormat().resolvedOptions().timeZone,m={summary:t,start:u?{date:D(c,"yyyy-MM-dd")}:{dateTime:D(c,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:p},end:u?{date:D(d,"yyyy-MM-dd")}:{dateTime:D(d,"yyyy-MM-dd'T'HH:mm:ss"),timeZone:p}},f=(i=this.descriptionInput)==null?void 0:i.value.trim();f&&(m.description=f);let h=(s=this.locationInput)==null?void 0:s.value.trim();h&&(m.location=h),await a.provider.createEvent(a.calendar.id,m),new Ls.Notice(this.translate("modals.calendarEventCreation.success",{title:t})),(l=(o=this.options).onEventCreated)==null||l.call(o),this.close()}catch(c){AQe.error("[TaskNotes] Error creating calendar event:",{category:"provider",operation:"creating-calendar-event",error:c}),new Ls.Notice(this.translate("modals.calendarEventCreation.error",{message:c instanceof Error?c.message:String(c)}))}}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}}});function n3(n,{showNotice:e=!0,noticeHandler:t}){e&&(t==null||t(n))}var dEe,Xi,PF=y(()=>{q();dEe=M({tag:"Utils/SafeAsync"});Xi=class{static async execute(e,t={}){let{fallback:r,errorMessage:a="An error occurred",showNotice:i=!0,noticeHandler:s,logError:o=!0}=t;try{return await e()}catch(l){if(o&&dEe.error(a,{category:"provider",operation:"execute-safe-operation",error:l}),i){let c=l instanceof Error?l.message:String(l);n3(`${a}: ${c}`,{showNotice:i,noticeHandler:s})}return r}}static async executeWithRetry(e,t={}){let{maxRetries:r=3,retryDelay:a=1e3,errorMessage:i="Operation failed",showNotice:s=!0,noticeHandler:o}=t,l;for(let c=0;c<=r;c++)try{return await e()}catch(d){if(l=d instanceof Error?d:new Error(String(d)),c<r){await new Promise(u=>window.setTimeout(u,a));continue}dEe.error(`${i} after ${r+1} attempts:`,{category:"provider",operation:"execute-with-retry",details:{attempts:r+1},error:l}),s&&n3(`${i}: ${l.message}`,{showNotice:s,noticeHandler:o});return}}static async executeWithValidation(e,t,r={}){let{showNotice:a=!0,noticeHandler:i}=r;for(let s of t)if(!s.condition){a&&n3(s.message,{showNotice:a,noticeHandler:i});return}return this.execute(e,r)}}});var Tu,lT,a3=y(()=>{Tu=require("obsidian");Cr();PF();Wd();lT=class extends Tu.Modal{constructor(t,r,a){super(t);this.title="";this.folder="";this.template="";this.useTemplate=!1;this.keyboardHandler=null;this.plugin=r,this.options=a,this.translate=r.i18n.translate.bind(r.i18n),this.title=this.generateDefaultTitle(),this.folder=this.getDefaultFolder(),this.template=this.getDefaultTemplate()}onOpen(){this.containerEl.addClass("tasknotes-plugin","ics-note-creation-modal"),this.keyboardHandler=t=>{t.key==="Enter"&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),this.handleCreate())},this.containerEl.addEventListener("keydown",this.keyboardHandler),this.createModalContent()}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null),this.contentEl.empty()}createModalContent(){let{contentEl:t}=this;t.empty(),t.createDiv("modal-header").createEl("h2",{text:this.translate("modals.icsNoteCreation.heading")});let a=t.createDiv("ics-event-preview");this.createEventPreview(a),new Tu.Setting(t).setName(this.translate("modals.icsNoteCreation.titleLabel")).setDesc(this.translate("modals.icsNoteCreation.titleDesc")).addText(l=>{this.titleInput=l.inputEl,l.setValue(this.title).onChange(c=>{this.title=c,this.updatePreview()})}),new Tu.Setting(t).setName(this.translate("modals.icsNoteCreation.folderLabel")).setDesc(this.translate("modals.icsNoteCreation.folderDesc")).addText(l=>{this.folderInput=l.inputEl,l.setValue(this.folder).setPlaceholder(this.translate("modals.icsNoteCreation.folderPlaceholder")).onChange(c=>{this.folder=c,this.updatePreview()})}),this.templateContainer=t.createDiv("template-settings"),this.createTemplateSettings(),this.previewContainer=t.createDiv("content-preview"),this.updatePreview();let i=t.createDiv("modal-button-container"),s=i.createEl("button",{text:this.translate("modals.icsNoteCreation.createButton"),cls:"mod-cta"});s.onclick=l=>{l.preventDefault(),l.stopPropagation(),this.handleCreate()};let o=i.createEl("button",{text:this.translate("common.cancel")});o.onclick=l=>{l.preventDefault(),l.stopPropagation(),this.close()},window.setTimeout(()=>{var l;return(l=this.titleInput)==null?void 0:l.focus()},100)}createEventPreview(t){let{icsEvent:r,subscriptionName:a}=this.options;t.createEl("h3",{text:r.title});let i=t.createDiv("event-details");if(r.start){let o=r.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(r.start)?r.start+"T00:00:00":r.start,l=new Date(o),c=i.createDiv();c.createEl("strong",{text:this.translate("modals.icsNoteCreation.startLabel")}),c.appendText(D(l,"PPPp"))}if(r.end&&!r.allDay){let o=/^\d{4}-\d{2}-\d{2}$/.test(r.end)?r.end+"T00:00:00":r.end,l=new Date(o),c=i.createDiv();c.createEl("strong",{text:this.translate("modals.icsNoteCreation.endLabel")}),c.appendText(D(l,"PPPp"))}if(r.location){let o=i.createDiv();o.createEl("strong",{text:this.translate("modals.icsNoteCreation.locationLabel")}),o.appendText(r.location)}let s=i.createDiv();s.createEl("strong",{text:this.translate("modals.icsNoteCreation.calendarLabel")}),s.appendText(a)}createTemplateSettings(){this.templateContainer.empty(),new Tu.Setting(this.templateContainer).setName(this.translate("modals.icsNoteCreation.useTemplateLabel")).setDesc(this.translate("modals.icsNoteCreation.useTemplateDesc")).addToggle(t=>{t.setValue(this.useTemplate).onChange(r=>{this.useTemplate=r,this.updateTemplateInput(),this.updatePreview()})}),this.useTemplate&&new Tu.Setting(this.templateContainer).setName(this.translate("modals.icsNoteCreation.templatePathLabel")).setDesc(this.translate("modals.icsNoteCreation.templatePathDesc")).addText(t=>{this.templateInput=t.inputEl,t.setValue(this.template).setPlaceholder(this.translate("modals.icsNoteCreation.templatePathPlaceholder")).onChange(r=>{this.template=r,this.updatePreview()})})}updateDefaultsForContentType(){var t,r;this.folder=((t=this.plugin.settings.icsIntegration)==null?void 0:t.defaultNoteFolder)||"",this.template=((r=this.plugin.settings.icsIntegration)==null?void 0:r.defaultNoteTemplate)||"",this.folderInput&&(this.folderInput.value=this.folder),this.templateInput&&(this.templateInput.value=this.template)}updateTemplateInput(){this.createTemplateSettings()}updatePreview(){if(!this.previewContainer)return;this.previewContainer.empty(),this.previewContainer.createEl("h4",{text:"Summary"});let t=this.previewContainer.createDiv("preview-details"),r=t.createDiv();r.createEl("strong",{text:"Type: "}),r.appendText("Note");let a=t.createDiv();a.createEl("strong",{text:"Title: "}),a.appendText(this.title||"Untitled");let i=t.createDiv();if(i.createEl("strong",{text:"Folder: "}),i.appendText(this.folder||"Vault root"),this.useTemplate&&this.template){let c=t.createDiv();c.createEl("strong",{text:"Template: "}),c.appendText(this.template)}else{let c=t.createDiv();c.createEl("strong",{text:"Template: "}),c.appendText("Default format")}let s=this.previewContainer.createDiv("template-variables");s.createEl("h5",{text:"Available template variables"});let o=["{{title}}","{{icsEventTitle}}","{{icsEventStart}}","{{icsEventEnd}}","{{icsEventLocation}}","{{icsEventDescription}}","{{icsEventUrl}}","{{icsEventSubscription}}","{{icsEventId}}","{{date}}","{{time}}"],l=s.createDiv("variables-list");o.forEach(c=>{l.createSpan({text:c,cls:"template-variable"})})}generateDefaultTitle(){let{icsEvent:t}=this.options,r=t.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(t.start)?t.start+"T00:00:00":t.start,a=new Date(r);return`${t.title} - ${D(a,"PPP")}`}getDefaultFolder(){var t;return((t=this.plugin.settings.icsIntegration)==null?void 0:t.defaultNoteFolder)||""}getDefaultTemplate(){var t;return((t=this.plugin.settings.icsIntegration)==null?void 0:t.defaultNoteTemplate)||""}async handleCreate(){await Xi.executeWithValidation(async()=>{var a,i;let{icsEvent:t}=this.options,r=await this.plugin.icsNoteService.createNoteFromICS(t,{title:this.title,folder:this.folder||void 0,template:this.useTemplate&&this.template?this.template:void 0});new Tu.Notice(`Note created: ${this.title}`),(i=(a=this.options).onContentCreated)==null||i.call(a,r.file,r.noteInfo),this.close()},[{condition:!!this.title.trim(),message:"Title is required"}],{errorMessage:"Failed to create note from ICS event",noticeHandler:Ze})}}});var kr,i3,Wc,rD=y(()=>{kr=require("obsidian");a3();SC();PF();q();Wd();i3=M({tag:"Modals/ICSEventInfoModal"}),Wc=class extends kr.Modal{constructor(t,r,a,i){super(t);this.relatedNotes=[];this.plugin=r,this.icsEvent=a,this.subscriptionName=i,this.translate=r.i18n.translate.bind(r.i18n)}async onOpen(){await this.renderContent()}async renderContent(){let{contentEl:t}=this;t.empty(),await this.loadRelatedNotes(),new kr.Setting(t).setName(this.translate("modals.icsEventInfo.calendarEventHeading")).setHeading(),new kr.Setting(t).setName(this.translate("modals.icsEventInfo.titleLabel")).setDesc(this.icsEvent.title||this.translate("ui.icsCard.untitledEvent")),this.subscriptionName&&new kr.Setting(t).setName(this.translate("modals.icsEventInfo.calendarLabel")).setDesc(this.subscriptionName);let r=this.icsEvent.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(this.icsEvent.start)?this.icsEvent.start+"T00:00:00":this.icsEvent.start,a=new Date(r),i=a.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});if(!this.icsEvent.allDay&&(i+=` at ${a.toLocaleTimeString()}`,this.icsEvent.end)){let s=/^\d{4}-\d{2}-\d{2}$/.test(this.icsEvent.end)?this.icsEvent.end+"T00:00:00":this.icsEvent.end,o=new Date(s);i+=` - ${o.toLocaleTimeString()}`}new kr.Setting(t).setName(this.translate("modals.icsEventInfo.dateTimeLabel")).setDesc(i),this.icsEvent.location&&new kr.Setting(t).setName(this.translate("modals.icsEventInfo.locationLabel")).setDesc(this.icsEvent.location),this.icsEvent.description&&new kr.Setting(t).setName(this.translate("modals.icsEventInfo.descriptionLabel")).setDesc(this.icsEvent.description),this.icsEvent.url&&new kr.Setting(t).setName(this.translate("modals.icsEventInfo.urlLabel")).descEl.createEl("a",{cls:"external-link",href:this.icsEvent.url,text:this.icsEvent.url}).setAttribute("target","_blank"),new kr.Setting(t).setName(this.translate("modals.icsEventInfo.relatedNotesHeading")).setHeading(),this.relatedNotes.length===0?new kr.Setting(t).setDesc(this.translate("modals.icsEventInfo.noRelatedItems")):this.relatedNotes.forEach(s=>{let l=this.isTaskNote(s)?this.translate("modals.icsEventInfo.typeTask"):this.translate("modals.icsEventInfo.typeNote");new kr.Setting(t).setName(s.title).setDesc(`Type: ${l}`).addButton(c=>{c.setButtonText("Open").onClick(async()=>{await this.safeOpenFile(s.path),this.close()})})}),new kr.Setting(t).setName(this.translate("modals.icsEventInfo.actionsHeading")).setHeading(),new kr.Setting(t).setName(this.translate("modals.icsEventInfo.createFromEventLabel")).setDesc(this.translate("modals.icsEventInfo.createFromEventDesc")).addButton(s=>{s.setButtonText("Create note").onClick(()=>{this.openCreationModal()})}).addButton(s=>{s.setButtonText("Create task").onClick(async()=>{await this.createTaskDirectly()})}),new kr.Setting(t).setName(this.translate("modals.icsEventInfo.linkExistingLabel")).setDesc(this.translate("modals.icsEventInfo.linkExistingDesc")).addButton(s=>{s.setButtonText("Link note").onClick(()=>{this.linkExistingNote()})}).addButton(s=>{s.setButtonText("Refresh").onClick(()=>{this.refreshRelatedNotes()})})}async loadRelatedNotes(){let t=await Xi.execute(()=>this.plugin.icsNoteService.findRelatedNotes(this.icsEvent),{fallback:[],errorMessage:"Failed to load related notes",showNotice:!1});this.relatedNotes=t||[]}openCreationModal(){try{new lT(this.app,this.plugin,{icsEvent:this.icsEvent,subscriptionName:this.subscriptionName||"Unknown Calendar",onContentCreated:(r,a)=>{(async()=>(new kr.Notice(this.translate("notices.icsNoteCreatedSuccess")),this.refreshRelatedNotes(),await this.safeOpenFile(r.path)))()}}).open()}catch(t){i3.error("Error opening creation modal:",{category:"provider",operation:"opening-creation-modal",error:t}),new kr.Notice(this.translate("notices.icsCreationModalOpenFailed"))}}async linkExistingNote(){await Xi.execute(async()=>{pp(this.plugin,t=>{t instanceof kr.TAbstractFile&&Xi.execute(async()=>{await this.plugin.icsNoteService.linkNoteToICS(t.path,this.icsEvent),new kr.Notice(this.translate("notices.icsNoteLinkSuccess",{fileName:t.name})),this.refreshRelatedNotes()},{errorMessage:"Failed to link note",noticeHandler:Ze})},{placeholder:"Search notes to link...",filter:"markdown"})},{errorMessage:"Failed to open note selection",noticeHandler:Ze})}async createTaskDirectly(){await Xi.execute(async()=>{let t=await this.plugin.icsNoteService.createTaskFromICS(this.icsEvent);new kr.Notice(this.translate("notices.icsTaskCreatedSuccess",{taskTitle:t.taskInfo.title})),await this.safeOpenFile(t.file.path),this.refreshRelatedNotes()},{errorMessage:"Failed to create task from ICS event",noticeHandler:Ze})}async refreshRelatedNotes(){await Xi.execute(async()=>{await this.loadRelatedNotes(),await this.renderContent(),new kr.Notice(this.translate("notices.icsRelatedItemsRefreshed"))},{errorMessage:"Failed to refresh related notes",noticeHandler:Ze})}isTaskNote(t){var a;let r=this.plugin.settings.taskTag;return((a=t.tags)==null?void 0:a.includes(r))||!1}async safeOpenFile(t){try{let r=this.app.vault.getAbstractFileByPath(t);r instanceof kr.TFile?await this.app.workspace.getLeaf().openFile(r):(new kr.Notice(this.translate("notices.icsFileNotFound")),i3.error("Invalid file path or file not found:",{category:"provider",operation:"invalid-file-path-or-file-not-found",details:{value:t}}))}catch(r){i3.error("Error opening file:",{category:"provider",operation:"opening-file",error:r}),new kr.Notice(this.translate("notices.icsFileOpenFailed"))}}onClose(){let{contentEl:t}=this;t.empty()}}});var Ca,IQe,cT,s3=y(()=>{Ca=require("obsidian");rD();a3();SC();PF();Md();Id();q();Wd();IQe=M({tag:"Components/ICSEventContextMenu"}),cT=class{constructor(e){this.menu=new ra,this.options=e,this.buildMenu()}t(e,t){return this.options.plugin.i18n.translate(e,t)}getLocale(){return this.options.plugin.i18n.getCurrentLocale()||"en"}buildMenu(){let{icsEvent:e,plugin:t,subscriptionName:r}=this.options;this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.showDetails")).setIcon("info").onClick(()=>{new Wc(t.app,t,e,r).open()})),this.menu.addSeparator(),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.createTask")).setIcon("check-circle").onClick(async()=>{await this.createTaskFromEvent()})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.createNote")).setIcon("file-plus").onClick(()=>{this.createNoteFromEvent()})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.linkNote")).setIcon("link").onClick(()=>{this.linkExistingNote()})),this.menu.addSeparator(),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyTitle")).setIcon("copy").onClick(async()=>{try{await navigator.clipboard.writeText(e.title),new Ca.Notice(this.t("contextMenus.ics.notices.copyTitleSuccess"))}catch(i){new Ca.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),e.location&&this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyLocation")).setIcon("map-pin").onClick(async()=>{try{await navigator.clipboard.writeText(e.location||""),new Ca.Notice(this.t("contextMenus.ics.notices.copyLocationSuccess"))}catch(i){new Ca.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),e.url&&this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyUrl")).setIcon("external-link").onClick(async()=>{try{await navigator.clipboard.writeText(e.url||""),new Ca.Notice(this.t("contextMenus.ics.notices.copyUrlSuccess"))}catch(i){new Ca.Notice(this.t("contextMenus.ics.notices.copyFailure"))}})),this.menu.addItem(a=>a.setTitle(this.t("contextMenus.ics.copyMarkdown")).setIcon("file-text").onClick(async()=>{let i=this.formatEventAsMarkdown();try{await navigator.clipboard.writeText(i),new Ca.Notice(this.t("contextMenus.ics.notices.copyMarkdownSuccess"))}catch(s){new Ca.Notice(this.t("contextMenus.ics.notices.copyFailure"))}}))}async createTaskFromEvent(){await Xi.execute(async()=>{let e=await this.options.plugin.icsNoteService.createTaskFromICS(this.options.icsEvent);new Ca.Notice(this.t("contextMenus.ics.notices.taskCreated",{title:e.taskInfo.title}));let t=this.options.plugin.app.vault.getAbstractFileByPath(e.file.path);t instanceof Ca.TFile&&await this.options.plugin.app.workspace.getLeaf().openFile(t),this.options.onUpdate&&this.options.onUpdate()},{errorMessage:this.t("contextMenus.ics.notices.taskCreateFailure"),noticeHandler:Ze})}createNoteFromEvent(){try{new lT(this.options.plugin.app,this.options.plugin,{icsEvent:this.options.icsEvent,subscriptionName:this.options.subscriptionName||this.t("contextMenus.ics.subscriptionUnknown"),onContentCreated:t=>{(async()=>(new Ca.Notice(this.t("contextMenus.ics.notices.noteCreated")),await this.options.plugin.app.workspace.getLeaf().openFile(t),this.options.onUpdate&&this.options.onUpdate()))()}}).open()}catch(e){IQe.error("Error opening creation modal:",{category:"provider",operation:"opening-creation-modal",error:e}),new Ca.Notice(this.t("contextMenus.ics.notices.creationFailure"))}}async linkExistingNote(){await Xi.execute(async()=>{pp(this.options.plugin,e=>{e instanceof Ca.TAbstractFile&&Xi.execute(async()=>{await this.options.plugin.icsNoteService.linkNoteToICS(e.path,this.options.icsEvent),new Ca.Notice(this.t("contextMenus.ics.notices.linkSuccess",{name:e.name})),this.options.onUpdate&&this.options.onUpdate()},{errorMessage:this.t("contextMenus.ics.notices.linkFailure"),noticeHandler:Ze})},{placeholder:"Search notes to link...",filter:"markdown"})},{errorMessage:this.t("contextMenus.ics.notices.linkSelectionFailure"),noticeHandler:Ze})}formatEventAsMarkdown(){let{icsEvent:e,subscriptionName:t}=this.options,r=[],a=e.title||this.t("contextMenus.ics.markdown.titleFallback");r.push(`## ${a}`),r.push(""),t&&r.push(this.t("contextMenus.ics.markdown.calendar",{value:t}));let i=this.getLocale(),s=e.allDay&&/^\d{4}-\d{2}-\d{2}$/.test(e.start)?e.start+"T00:00:00":e.start,o=new Date(s),l=new Intl.DateTimeFormat(i,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),c=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit"}),d=l.format(o);if(!e.allDay&&(d+=this.t("contextMenus.ics.markdown.at",{time:c.format(o)}),e.end)){let u=/^\d{4}-\d{2}-\d{2}$/.test(e.end)?e.end+"T00:00:00":e.end,p=new Date(u);d+=` - ${c.format(p)}`}return r.push(this.t("contextMenus.ics.markdown.date",{value:d})),e.location&&r.push(this.t("contextMenus.ics.markdown.location",{value:e.location})),e.description&&(r.push(""),r.push(this.t("contextMenus.ics.markdown.descriptionHeading")),r.push(e.description)),e.url&&(r.push(""),r.push(this.t("contextMenus.ics.markdown.url",{value:e.url}))),r.join(`
`)}show(e){za(this.menu,e)}showAtElement(e){jl(this.menu,e)}}});function uEe(n,e){return n.initialDate===e.initialDate&&n.initialDateProperty===e.initialDateProperty&&n.initialDateStrategy===e.initialDateStrategy}var pEe=y(()=>{});function nD(n){if(typeof n=="string"){let e=n.trim(),t=e.toLowerCase();if(!e||t==="null"||t==="undefined")return null;if(Jt(e)){let r=et(e);return Number.isNaN(r.getTime())?null:{value:D(r,"yyyy-MM-dd'T'HH:mm"),isAllDay:!1}}try{let r=st(e);return{value:ae(r),isAllDay:!0}}catch(r){return null}}if(typeof n=="number"){let e=new Date(n);return Number.isNaN(e.getTime())?null:{value:ae(e),isAllDay:!0}}return n instanceof Date?Number.isNaN(n.getTime())?null:n.getHours()!==0||n.getMinutes()!==0||n.getSeconds()!==0||n.getMilliseconds()!==0?{value:D(n,"yyyy-MM-dd'T'HH:mm"),isAllDay:!1}:{value:ae(n),isAllDay:!0}:null}function mEe(n){return typeof n.value=="string"?n.value:D(n.value,"yyyy-MM-dd'T'HH:mm")}function NQe(n,e,t,r){if(e){let a=r(n,e);if(typeof a=="string"&&a.trim())return a.trim()}return t.basename||t.name||t.path}function fEe({entry:n,file:e,startDateProperty:t,endDateProperty:r,titleProperty:a,getPropertyValue:i}){if(!e)return null;let s=nD(i(n,t));if(!s)return null;let o=mEe(s),l,c=s.isAllDay;if(r){let d=nD(i(n,r));d&&(l=mEe(d),c=d.isAllDay)}return{id:`property-${e.path}`,title:NQe(n,a,e,i),start:o,end:l,allDay:s.isAllDay&&(l?c:!0),backgroundColor:"var(--color-accent)",borderColor:"var(--color-accent)",textColor:"var(--text-on-accent)",editable:!0,extendedProps:{eventType:"property-based",filePath:e.path,file:e,basesEntry:n}}}var o3=y(()=>{Cr();xe()});function hEe({viewOptions:n,taskNotes:e,entries:t,getEntryPropertyValue:r,getContextPropertyValue:a,mapPropertyToTaskField:i}){var o;if(n.initialDate){let l=nD(n.initialDate);return(o=l==null?void 0:l.value)!=null?o:n.initialDate}if(!n.initialDateProperty)return;let s=RQe({propertyId:n.initialDateProperty,taskNotes:e,entries:t,getEntryPropertyValue:r,mapPropertyToTaskField:i});if(s.length===0){let l=a?l3(a(n.initialDateProperty)):null;return l==null?void 0:l.value}return n.initialDateStrategy==="earliest"?s.reduce((l,c)=>c.compare.getTime()<l.compare.getTime()?c:l).value:n.initialDateStrategy==="latest"?s.reduce((l,c)=>c.compare.getTime()>l.compare.getTime()?c:l).value:s[0].value}function RQe({propertyId:n,taskNotes:e,entries:t,getEntryPropertyValue:r,mapPropertyToTaskField:a}){var o,l;let i=[];if(t&&r)for(let c of t){let d=l3(r(c,n));d&&i.push(d)}if(i.length>0)return i;let s=a(n);for(let c of e){let d=c,u=c.customProperties,p=(l=(o=d[s])!=null?o:u==null?void 0:u[s])!=null?l:u==null?void 0:u[n],m=l3(p);m&&i.push(m)}return i}function l3(n){let e=nD(n);if(!e)return null;let t=e.isAllDay?st(e.value):new Date(e.value);return Number.isNaN(t.getTime())?null:{compare:t,value:e.value}}function gEe(n){return{initialDate:n.initialDate,initialDateProperty:n.initialDateProperty,initialDateStrategy:n.initialDateStrategy}}var yEe=y(()=>{xe();o3()});function LQe(n){return typeof n=="object"&&n!==null}function OQe(n){let e=n.split(".");return e.length>1&&["note","file","formula"].includes(e[0])?e.slice(1).join("."):n}function zQe(n,e){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];let t=OQe(e);return t!==e&&Object.prototype.hasOwnProperty.call(n,t)?n[t]:null}function c3(n,e=new WeakSet){return n===void 0||typeof n=="function"||typeof n=="symbol"?null:typeof n=="bigint"?n.toString():n instanceof Date?n.toISOString():Array.isArray(n)?n.map(t=>c3(t,e)):LQe(n)?e.has(n)?"[Circular]":(e.add(n),Object.keys(n).sort().reduce((t,r)=>(t[r]=c3(n[r],e),t),{})):n}function vEe(n){var r,a,i;let e=new Set,t=s=>{if(typeof s!="string")return;let o=s.trim();o&&e.add(o)};for(let s of _Qe)t((a=(r=n.mapField(s))!=null?r:FQe[s])!=null?a:s);t("tags"),t("archived");for(let s of(i=n.visiblePropertyIds)!=null?i:[])t(s);return n.showPropertyBasedEvents&&(t(n.startDateProperty),t(n.endDateProperty),t(n.titleProperty)),Array.from(e)}function kEe(n,e){let t=n.map(r=>{let a=r.properties||r.frontmatter||{},i=e.map(s=>[s,c3(zQe(a,s))]);return{path:r.path||"",values:i}});return JSON.stringify({propertyIds:e,rows:t})}function TEe(n){return n.map(e=>{var t,r;return(r=(t=e.file)==null?void 0:t.path)!=null?r:""}).join("\0")}var _Qe,FQe,bEe=y(()=>{_Qe=["title","status","priority","due","scheduled","contexts","projects","timeEstimate","completedDate","recurrence","recurrenceAnchor","timeEntries","completeInstances","skippedInstances","blockedBy","icsEventId","googleCalendarEventId","googleCalendarExceptionOriginalScheduled","googleCalendarMovedOriginalDates","reminders","sortOrder"],FQe={completeInstances:"complete_instances",recurrenceAnchor:"recurrence_anchor",skippedInstances:"skipped_instances"}});function jQe(n){return typeof n=="object"&&n!==null}function d3(n){let e=[];for(let t of n!=null?n:[]){if(typeof t!="string")continue;let r=t.trim();r&&e.push(r)}return e.sort()}function u3(n,e){if(!n||typeof n.get!="function")return;let t=n.get(e);if(t!=null)return t;let r=n.get("options");if(jQe(r))return r[e]}function p3(n,e,t){let r=u3(n,e);return r==null?t:r}function $Qe(n={}){return[...BQe,...d3(n.icsCalendarIds).map(e=>`showICS_${e}`),...d3(n.googleCalendarIds).map(e=>`showGoogleCalendar_${e}`),...d3(n.microsoftCalendarIds).map(e=>`showMicrosoftCalendar_${e}`)]}function wEe(n){if(!n.config||typeof n.config.get!="function")return"";let e=$Qe({icsCalendarIds:n.icsCalendarIds,googleCalendarIds:n.googleCalendarIds,microsoftCalendarIds:n.microsoftCalendarIds});return JSON.stringify(e.map(t=>u3(n.config,t)))}var BQe,m3=y(()=>{BQe=["showScheduled","showDue","showScheduledToDueSpan","showRecurring","showCompletedRecurringInstances","showSkippedRecurringInstances","showTimeEntries","showTimeblocks","showPropertyBasedEvents","showOverdueOnToday","calendarView","heightMode","customDayCount","listDayCount","slotMinTime","slotMaxTime","slotDuration","snapDuration","firstDay","weekNumbers","nowIndicator","showWeekends","showAllDaySlot","showTimeGrid","showTodayHighlight","todayColumnWidthMultiplier","selectMirror","timeFormat","scrollTime","eventMinHeight","slotEventOverlap","eventMaxStack","dayMaxEvents","dayMaxEventRows","startDateProperty","endDateProperty","titleProperty","initialDate","initialDateProperty","initialDateStrategy","createDailyNotesFromDateLinks"]});function UQe(n,e){return e==="google"?n.subscriptionId.replace("google-",""):e==="microsoft"?n.subscriptionId.replace("microsoft-",""):n.subscriptionId}function AF(n,e,t){n.set(e.id,t),e.primary&&n.set(nq,t)}function HQe(n,e,t){return(t==null?void 0:t.get(UQe(n,e)))!==!1}function MF({events:n,provider:e,plugin:t,toggles:r,relatedNoteCountsByEventId:a,createEvent:i=X4}){let s=[];for(let o of n){if(!HQe(o,e,r))continue;let l=i(o,t,{relatedNoteCount:a==null?void 0:a.get(o.id)});l&&s.push(l)}return s}var f3=y(()=>{tD();nm()});function SEe(n,e){return`${n.i18n.translate("modals.icsEventInfo.relatedNotesHeading")}: ${e}`}function WQe(n,e,t){let r=typeof t=="number"&&t>0?t:0,a=n.querySelector(".ics-card__related-note-indicator");if(!r){a==null||a.remove();return}let i=a||n.createSpan({cls:"ics-card__related-note-indicator"});i.dataset.relatedNoteCount=String(r),i.setAttribute("aria-label",SEe(e,r)),(0,aD.setIcon)(i,"file-text"),(0,aD.setTooltip)(i,SEe(e,r),{placement:"top"})}function qQe(n,e,t){var a;if(t!=null&&t.name)return t.name;let r=(a=e.calendarProviderRegistry)==null?void 0:a.findProviderForEvent(n);if(r){let{calendarId:i}=r.extractEventIds(n),s=rm(r.getAvailableCalendars(),i);return(s==null?void 0:s.summary)||r.providerName}return e.i18n.translate("ui.icsCard.calendarFallback")}function GQe(n,e){try{if(!n.start)return"";let t=new Date(n.start);if(n.allDay)return e.i18n.translate("ui.icsCard.allDay");let r=e.settings.calendarViewSettings.timeFormat,a=Wu(t,r);if(n.end){let i=new Date(n.end),s=Wu(i,r);return`${a} – ${s}`}return a}catch(t){return""}}function CEe(n,e,t={}){var v;let r={...VQe,...t},a=activeWindow.createDiv();a.className="task-card task-card--ics",a.dataset.key=n.id,r.relatedNoteCount&&r.relatedNoteCount>0&&(a.classList.add("has-related-note","task-card--ics-has-related-note"),a.dataset.relatedNoteCount=String(r.relatedNoteCount));let i=(v=e.icsSubscriptionService)==null?void 0:v.getSubscriptions().find(k=>k.id===n.subscriptionId),s=n.color||(i==null?void 0:i.color)||"var(--color-accent)",o=qQe(n,e,i),l=a.createDiv({cls:"task-card__main-row"}),c=l.createSpan({cls:"ics-card__icon"}),d=c.createDiv({attr:{"aria-label":e.i18n.translate("ui.icsCard.calendarEvent")}});(0,aD.setIcon)(d,"calendar");let u=c;u.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),u.classList.add("tn-static-display-inline-flex-f984c520"),u.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),u.classList.add("tn-static-width-16px-7375d50b"),u.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),u.classList.add("tn-static-height-16px-30de4aee"),u.classList.remove("tn-static-margin-right-4px-c6b76b85"),u.classList.add("tn-static-margin-right-8px-539fa9a0"),u.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),u.classList.add("tn-static-align-items-center-7c619740"),u.classList.remove("tn-static-justify-content-flex-end-455f8cca","tn-static-justify-content-space-between-a562f4fd"),u.classList.add("tn-static-justify-content-center-03c4bb6f"),u.classList.add("tn-static-flex-shrink-0-6ee0661e"),d.classList.remove("tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),d.classList.add("tn-static-width-100-0466783d"),d.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),d.classList.add("tn-static-height-100-62264068"),d.style.color=s;let p=l.createDiv({cls:"task-card__content"}),m=p.createDiv({cls:"task-card__title",text:n.title||e.i18n.translate("ui.icsCard.untitledEvent")});WQe(m,e,r.relatedNoteCount);let f=p.createDiv({cls:"task-card__metadata"}),h=[],g=GQe(n,e);return g&&h.push(g),n.location&&h.push(n.location),h.push(o),f.textContent=h.join(" • "),a.addEventListener("click",()=>{new Wc(e.app,e,n,o).open()}),a.addEventListener("contextmenu",k=>{k.preventDefault(),k.stopPropagation(),new cT({icsEvent:n,plugin:e,subscriptionName:o,onUpdate:()=>{e.app.workspace.trigger("tasknotes:refresh-views")}}).show(k)}),a.style.setProperty("--current-status-color",s),a}var aD,VQe,xEe=y(()=>{aD=require("obsidian");s3();xe();rD();nm();VQe={showDate:!0}});function DEe(n,e,t,r={}){var u,p,m;let a={...KQe,...r},i=activeWindow.createDiv();i.className="task-card task-card--property-event";let s=n.file;if(!s)return i.textContent=e.i18n.translate("ui.propertyEventCard.unknownFile"),i;i.dataset.key=`property-${s.path}`,i.dataset.filePath=s.path;let o=i.createDiv({cls:"task-card__main-row"}),l=o.createSpan({cls:"property-event-card__icon"}),c=l.createDiv();(0,EEe.setIcon)(c,"file-text"),l.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),l.classList.add("tn-static-display-inline-flex-f984c520"),l.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),l.classList.add("tn-static-width-16px-7375d50b"),l.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),l.classList.add("tn-static-height-16px-30de4aee"),l.classList.remove("tn-static-margin-right-4px-c6b76b85"),l.classList.add("tn-static-margin-right-8px-539fa9a0"),l.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),l.classList.add("tn-static-align-items-center-7c619740"),l.classList.remove("tn-static-justify-content-flex-end-455f8cca","tn-static-justify-content-space-between-a562f4fd"),l.classList.add("tn-static-justify-content-center-03c4bb6f"),l.classList.add("tn-static-flex-shrink-0-6ee0661e"),c.classList.remove("tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),c.classList.add("tn-static-width-100-0466783d"),c.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),c.classList.add("tn-static-height-100-62264068"),c.classList.remove("tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),c.classList.add("tn-static-color-var-color-accent-d2cad743");let d=o.createDiv({cls:"task-card__content"});if(d.createDiv({cls:"task-card__title",text:s.basename||s.name}),a.showProperties&&t){let f=d.createDiv({cls:"task-card__metadata"}),h=0;try{let g=f.ownerDocument,v=((u=t.getOrder)==null?void 0:u.call(t))||[],k=(p=t.getAsPropertyId)==null?void 0:p.call(t,"startDateProperty"),T=(m=t.getAsPropertyId)==null?void 0:m.call(t,"endDateProperty");for(let b of v){if(b===k||b===T)continue;let w=n.getValue(b);if(!lC(w)){h>0&&f.appendChild(g.createTextNode(" • "));let S=t.getDisplayName(b)||b,C=f.createSpan({cls:"property-event-card__metadata-property"});C.createSpan({text:`${S}: `});let x=C.createSpan({cls:"property-event-card__metadata-value"});GA(x,w,e.app.renderContext),h++}}}catch(g){YQe.debug("[TaskNotes][PropertyEventCard] Error reading properties:",{category:"persistence",operation:"reading-properties",error:g})}h===0&&(f.textContent=s.path)}return i.addEventListener("click",f=>{let h=f.ctrlKey||f.metaKey;e.app.workspace.openLinkText(s.path,"",h)}),i.addEventListener("mouseover",f=>{e.app.workspace.trigger("hover-link",{event:f,source:"tasknotes-property-event-card",hoverParent:i,targetEl:i,linktext:s.path,sourcePath:s.path})}),i.setCssProps({"--current-status-color":"var(--color-accent)"}),i}var EEe,YQe,KQe,PEe=y(()=>{EEe=require("obsidian");cC();q();YQe=M({tag:"Ui/PropertyEventCard"}),KQe={showProperties:!0}});function MEe(n,e,t={}){let r={...ZQe,...t},a=activeWindow.createDiv();a.className="task-card task-card--timeblock",a.dataset.key=`timeblock-${n.id}`;let i=a.createDiv({cls:"task-card__main-row"}),s=i.createSpan({cls:"timeblock-card__icon"}),o=s.createDiv();(0,AEe.setIcon)(o,"clock"),s.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),s.classList.add("tn-static-display-inline-flex-f984c520"),s.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),s.classList.add("tn-static-width-16px-7375d50b"),s.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),s.classList.add("tn-static-height-16px-30de4aee"),s.classList.remove("tn-static-margin-right-4px-c6b76b85"),s.classList.add("tn-static-margin-right-8px-539fa9a0"),s.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-flex-start-0486f781"),s.classList.add("tn-static-align-items-center-7c619740"),s.classList.remove("tn-static-justify-content-flex-end-455f8cca","tn-static-justify-content-space-between-a562f4fd"),s.classList.add("tn-static-justify-content-center-03c4bb6f"),s.classList.add("tn-static-flex-shrink-0-6ee0661e"),o.classList.remove("tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),o.classList.add("tn-static-width-100-0466783d"),o.classList.remove("tn-static-display-flex-4d51fc62","tn-static-height-0-7a31cef0","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37","tn-static-min-height-800px-997b4c8c"),o.classList.add("tn-static-height-100-62264068"),o.style.color=n.color||"var(--color-accent)";let l=i.createDiv({cls:"task-card__content"}),c=n.title||"Timeblock",d=`${n.startTime} - ${n.endTime}`;l.createDiv({cls:"task-card__title",text:c});let u=l.createDiv({cls:"task-card__metadata"});if(u.textContent=d,r.showDescription&&n.description){let p=l.createDiv({cls:"task-card__description",text:n.description});p.classList.remove("tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-0-9em-65025e95","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),p.classList.add("tn-static-font-size-var-tn-font-size-sm-0274a31d"),p.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),p.classList.add("tn-static-color-var-tn-text-muted-a90fb6f3"),p.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),p.classList.add("tn-static-margin-top-4px-96ad6099")}if(r.showAttachments&&n.attachments&&n.attachments.length>0){let p=l.createDiv({cls:"timeblock-card__attachments"});p.classList.remove("tn-static-font-size-0-75em-948e16e5","tn-static-font-size-0-8em-19dc7c13","tn-static-font-size-0-9em-65025e95","tn-static-font-size-1-2em-3a352995","tn-static-font-size-12px-65574819","tn-static-font-size-12px-b0cc7e05","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-margin-top-8px-f4f01e68"),p.classList.add("tn-static-font-size-var-tn-font-size-sm-0274a31d"),p.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),p.classList.add("tn-static-color-var-tn-text-muted-a90fb6f3"),p.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),p.classList.add("tn-static-margin-top-4px-96ad6099");let m=n.attachments.length===1?"1 attachment":`${n.attachments.length} attachments`;p.textContent=`📎 ${m}`}return a.addEventListener("click",p=>{r.eventDate&&r.originalDate&&xF(n,r.eventDate,r.originalDate,e)}),n.color?a.style.setProperty("--current-status-color",n.color):a.setCssProps({"--current-status-color":"var(--color-accent)"}),a}var AEe,ZQe,IEe=y(()=>{AEe=require("obsidian");tD();ZQe={showDescription:!0,showAttachments:!0}});function IF(n,e){return`${n.i18n.translate("modals.icsEventInfo.relatedNotesHeading")}: ${e}`}function h3(n){return typeof n=="number"&&n>0?n:0}function QQe(n,e,t){if(t<=0||n.querySelector(".ics-related-note-indicator"))return;let r=n.ownerDocument,a=Ie(r,"span");a.classList.add("ics-related-note-indicator"),a.setAttribute("aria-label",IF(e,t)),a.dataset.relatedNoteCount=String(t),(0,iD.setIcon)(a,"file-text"),(0,iD.setTooltip)(a,IF(e,t),{placement:"top"}),n.appendChild(a)}function NEe({element:n,viewType:e,icsEvent:t,relatedNoteCount:r,plugin:a}){var o;if(!t||(n.setAttribute("data-ics-event","true"),n.classList.add("fc-ics-event"),r>0&&(n.classList.add("has-related-note","fc-event--has-related-note"),n.dataset.relatedNoteCount=String(r)),e==="listWeek"))return;if(((o=a.calendarProviderRegistry)==null?void 0:o.findProviderForEvent(t))&&!n.querySelector(".fc-event-provider-icon")){let l=Ie(n.ownerDocument,"span");l.classList.add("fc-event-provider-icon"),l.setAttribute("aria-hidden","true"),(0,iD.setIcon)(l,"calendar"),n.appendChild(l)}let s=n.querySelector(".fc-event-title");s&&r>0&&QQe(s,a,r)}function JQe({taskInfo:n,basesEntry:e,visibleProperties:t,logDebug:r}){var i,s,o;let a={...n};if(!e)return a;a.basesData=e;for(let l of t)if(l.startsWith("formula."))try{(i=e.getValue)==null||i.call(e,l)}catch(c){r==null||r("[TaskNotes][CalendarView] Error getting formula:",l,c)}if(!a.dateCreated)try{let l=(s=e.getValue)==null?void 0:s.call(e,"file.ctime");l!=null&&l.data&&(a.dateCreated=l.data)}catch(l){r==null||r("[TaskNotes][CalendarView] Error getting file.ctime:",l)}if(!a.dateModified)try{let l=(o=e.getValue)==null?void 0:o.call(e,"file.mtime");l!=null&&l.data&&(a.dateModified=l.data)}catch(l){r==null||r("[TaskNotes][CalendarView] Error getting file.mtime:",l)}return a}function REe({arg:n,plugin:e,config:t,visibleProperties:r,basesEntryByPath:a,buildTaskCardOptions:i,logDebug:s,factories:o={}}){var v,k,T,b,w;if(n.view.type!=="listWeek")return!1;n.el.innerHTML="";let{taskInfo:l,timeblock:c,icsEvent:d,eventType:u,basesEntry:p,relatedNoteCount:m}=n.event.extendedProps||{},f=h3(m),h=null;if(l&&u!=="ics"&&u!=="property-based"){let S=JQe({taskInfo:l,basesEntry:a.get(l.path),visibleProperties:r,logDebug:s}),C=SF(n);h=((v=o.createTaskCard)!=null?v:pr)(S,e,r,i({targetDate:C,promoteOccurrenceControlsInContextMenu:!!(l.recurrence||l.recurrence_parent&&l.occurrence_date)}))}else if(d&&u==="ics")h=((k=o.createICSEventCard)!=null?k:CEe)(d,e,{relatedNoteCount:f});else if(u==="property-based"&&p)h=((T=o.createPropertyEventCard)!=null?T:DEe)(p,e,t);else if(u==="timeblock"&&c){let S=n.event.start?D(n.event.start,"yyyy-MM-dd"):void 0;h=((b=o.createTimeBlockCard)!=null?b:MEe)(c,e,{eventDate:(w=n.event.start)!=null?w:void 0,originalDate:S})}if(!h)return n.el.classList.add("fc-event-default-list"),!1;let g=Ie(n.el.ownerDocument,"td");return g.className="fc-list-event-title fc-list-card-content",g.colSpan=3,g.appendChild(h),n.el.appendChild(g),l!=null&&l.path&&(n.el.setAttribute("data-task-path",l.path),n.el.classList.add("fc-task-event")),n.el.classList.add("fc-list-task-card"),n.el.classList.remove("fc-event","fc-event-start","fc-event-end"),!0}var iD,_Ee=y(()=>{iD=require("obsidian");Cr();Ua();xEe();PEe();IEe();tD();Li()});function NF(n,e,t={}){var l,c,d;if(!n)return{value:e,isValid:!0};let r=/^(\d{2}):([0-5]\d)(?::([0-5]\d))?$/.exec(n);if(!r)return{value:e,isValid:!1};let a=Number(r[1]),i=Number(r[2]),s=Number((l=r[3])!=null?l:"00"),o=(c=t.maxHour)!=null?c:23;return a<0||a>o?{value:e,isValid:!1}:t.allowMaxHourOnlyAtZero&&a===o&&(i!==0||s!==0)?{value:e,isValid:!1}:{value:`${r[1]}:${r[2]}:${(d=r[3])!=null?d:"00"}`,isValid:!0}}var g3=y(()=>{});function XQe(n){Jn.Platform.isMobile&&(n.classList.add("tn-calendar-event-touch-target"),n.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopImmediatePropagation()},{capture:!0}))}function eJe(n,e){let t=n.querySelector(".fc-refreshCalendars-button");if(!t)return;let r=e.trim()||"Refresh calendar subscriptions";t.replaceChildren(),(0,Jn.setIcon)(t,"refresh-cw"),t.classList.add("tasknotes-calendar-refresh-button--icon"),t.setAttribute("aria-label",r),t.setAttribute("title",r)}function og(n){return typeof n=="object"&&n!==null}function jEe(n){return Array.isArray(n)?n.length>0:!!n}function LEe(n){return jEe(n)?`start,allDay,${BEe},-duration,title`:rJe}function aJe(n){let e=n.extendedProps;if(!og(e))return null;let t=e.taskInfo;return og(t)&&typeof t.path=="string"?t.path:typeof e.filePath=="string"?e.filePath:null}function OEe(n,e){if(e.size!==0)for(let t of n){let r=aJe(t);if(!r)continue;let a=e.get(r);a!==void 0&&(t.extendedProps={...og(t.extendedProps)?t.extendedProps:{},[BEe]:a})}}function iJe(n,e){return!e&&!!(n!=null&&n.startsWith("list"))}function sJe(n,e,t){return iJe(e,t)?n.filter(r=>r.allDay!==!0):n}function oJe(n){return og(n)}function lJe(n){return og(n)&&typeof n.scrollTop=="number"&&typeof n.scrollLeft=="number"}function cJe(n,e){return e<=1?!1:n==="timeGridWeek"||n==="timeGridCustom"}function dJe(n){return n==="timeGridWeek"||n==="timeGridCustom"||n==="timeGridDay"}function zEe(n,e){return!n&&dJe(e)}function uJe(n){return typeof n=="string"&&n.trim().toLowerCase()==="auto"?"auto":"fill"}function pJe(n){return n==="auto"?{height:"auto",contentHeight:"auto",expandRows:!1}:{height:"100%",expandRows:!0}}function mJe(n,e,t){return n==="auto"||!!(t!=null&&t.closest(".internal-embed, .markdown-embed"))?"auto":"fill"}function $Ee(n){let e=n.closest("table");if(!e)return null;let t=Array.from(e.children).find(a=>a.tagName==="COLGROUP");if(!t)return null;let r=t.children[n.cellIndex];return(r==null?void 0:r.tagName)==="COL"?r:null}function hJe(n){n.querySelectorAll(fJe).forEach(t=>{t.style.removeProperty("width"),t.style.removeProperty("min-width"),t.style.removeProperty("max-width");let r=$Ee(t);r&&r.style.removeProperty("width")})}function gJe(n,e){return!n||!n.isConnected||!e.isConnected||n.ownerDocument!==e.ownerDocument?!1:n.clientWidth>0&&n.clientHeight>0}function yJe(n,e=window){if(!n)return!1;let t=n.ownerDocument.defaultView;return!!(t&&t!==e)}function UEe(n){return n?[n,...Array.from(n.querySelectorAll(".fc-scroller"))]:[]}function vJe(n){return UEe(n).map(e=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}))}function kJe(n,e){if(!Array.isArray(e))return;let t=UEe(n);e.forEach((r,a)=>{if(!lJe(r))return;let i=t[a];i&&(i.scrollTop=r.scrollTop,i.scrollLeft=r.scrollLeft)})}function TJe(n,e,t){if(t<=1||n.length<=1)return null;let r=Array.from(new Set(n));if(!r.includes(e))return null;let a=100/(r.length-1+t),i=a*t;return new Map(r.map(s=>[s,`${s===e?i:a}%`]))}function HEe(n){return function(e,t){if(!t)throw Nr.error("[TaskNotes][CalendarView] No containerEl provided",{category:"provider",operation:"no-containerel-provided"}),new Error("CalendarView requires a containerEl");return new v3(e,t,n)}}var Jn,Nr,FEe,tJe,y3,rJe,BEe,nJe,fJe,v3,VEe=y(()=>{Li();IE();ME();Eh();axe();mxe();yxe();SW();kxe();tD();lEe();oB();UM();cEe();rD();Jn=require("obsidian");Cr();DC();s3();xe();pEe();yEe();bEe();m3();o3();f3();_Ee();g3();yt();ya();q();m3();Nr=M({tag:"Bases/CalendarView"});FEe=5e3,tJe=250,y3=2e3,rJe="start,-duration,allDay,title",BEe="tasknotesSortIndex",nJe=sR;fJe=".fc-col-header-cell[data-date], .fc-timegrid-col[data-date], .fc-daygrid-day[data-date], .fc-timegrid-axis, .fc-timegrid-slot-label";v3=class extends Bc{constructor(t,r,a){super(t,r,a);this.type="tasknotesCalendar";this.calendar=null;this.calendarEl=null;this.currentTasks=[];this.basesEntryByPath=new Map;this.basesSortIndexByPath=new Map;this._isRendering=!1;this._pendingRender=!1;this._expectingImmediateUpdate=!1;this._isFirstDataUpdate=!0;this._previousConfigSnapshot=null;this._saveViewTypeTimer=null;this._configChangedNeedsRecreate=!1;this._recreateTargetDate=null;this._previousDataSignature=null;this._previousControllerViewName=null;this.icsCalendarToggles=new Map;this.googleCalendarToggles=new Map;this.microsoftCalendarToggles=new Map;this.configLoaded=!1;this.basesController=t,this.dataAdapter.basesView=this;let i=this.plugin.settings.calendarViewSettings;this.viewOptions={showScheduled:i.defaultShowScheduled,showDue:i.defaultShowDue,showScheduledToDueSpan:i.defaultShowScheduledToDueSpan,showRecurring:i.defaultShowRecurring,showCompletedRecurringInstances:!0,showSkippedRecurringInstances:!0,showTimeEntries:i.defaultShowTimeEntries,showTimeblocks:i.defaultShowTimeblocks,showPropertyBasedEvents:!0,showOverdueOnToday:!1,initialDate:"",initialDateProperty:null,initialDateStrategy:"first",createDailyNotesFromDateLinks:!0,calendarView:i.defaultView,heightMode:"fill",customDayCount:i.customDayCount,listDayCount:7,slotMinTime:this.validateTimeValue(i.slotMinTime,"00:00:00"),slotMaxTime:this.validateTimeValue(i.slotMaxTime,"24:00:00",48,!0),slotDuration:this.validateTimeValue(i.slotDuration,"00:30:00"),snapDuration:this.validateTimeValue(i.slotDuration,"00:30:00"),scrollTime:this.validateTimeValue(i.scrollTime,"08:00:00"),firstDay:i.firstDay,weekNumbers:i.weekNumbers,nowIndicator:i.nowIndicator,showWeekends:i.showWeekends,showAllDaySlot:!0,showTimeGrid:!0,showTodayHighlight:i.showTodayHighlight,todayColumnWidthMultiplier:1,selectMirror:i.selectMirror,timeFormat:i.timeFormat,eventMinHeight:i.eventMinHeight,slotEventOverlap:i.slotEventOverlap,eventMaxStack:i.eventMaxStack,dayMaxEvents:i.dayMaxEvents,dayMaxEventRows:i.dayMaxEventRows,locale:i.locale,startDateProperty:null,endDateProperty:null,titleProperty:null}}onload(){this.readViewOptions(),this._previousConfigSnapshot=this.getConfigSnapshot(),this._previousDataSignature=this.getDataSignature(),this._previousControllerViewName=this.getControllerViewName(),super.onload()}onResize(){if(this.isPopoutWindow()){this.renderPopoutUnsupported();return}!this.calendar||!this.canUpdateCalendarSize()||(this.calendar.updateSize(),this.scheduleTodayColumnWidthUpdate(),this.scheduleDailyNoteHeaderLinkUpdate())}onDataUpdated(){var i;if(!((i=this.rootElement)!=null&&i.isConnected))return;if(this.dataUpdateDebounceTimer&&(window.clearTimeout(this.dataUpdateDebounceTimer),this.dataUpdateDebounceTimer=null),this._isFirstDataUpdate){this._isFirstDataUpdate=!1,this.render();return}if(this._expectingImmediateUpdate){this._expectingImmediateUpdate=!1,this.renderPreservingEphemeralState();return}let t=this.hasConfigChanged(),r=this.hasControllerViewChanged(),a=this.hasDataSignatureChanged();if(t){this._configChangedNeedsRecreate=!0,this.renderPreservingEphemeralState();return}if(a){this.renderPreservingEphemeralState();return}this.scheduleDeferredDataUpdate(Date.now(),r)}expectImmediateUpdate(){this._expectingImmediateUpdate=!0,window.setTimeout(()=>{this._expectingImmediateUpdate=!1},2e3)}getConfigSnapshot(){var t,r,a,i,s,o;return wEe({config:this.config,icsCalendarIds:(r=(t=this.plugin.icsSubscriptionService)==null?void 0:t.getSubscriptions().map(l=>l.id))!=null?r:[],googleCalendarIds:(i=(a=this.plugin.googleCalendarService)==null?void 0:a.getAvailableCalendars().map(l=>l.id))!=null?i:[],microsoftCalendarIds:(o=(s=this.plugin.microsoftCalendarService)==null?void 0:s.getAvailableCalendars().map(l=>l.id))!=null?o:[]})}hasConfigChanged(){let t=this.getConfigSnapshot();return this._previousConfigSnapshot===null?(this._previousConfigSnapshot=t,!1):t!==this._previousConfigSnapshot?(this._previousConfigSnapshot=t,!0):!1}getDataSignature(){var r;if(!((r=this.data)!=null&&r.data))return"";let t=this.getDataSignaturePropertyIds();try{return kEe(this.dataAdapter.extractDataItems(),t)}catch(a){return TEe(this.data.data)}}getDataSignaturePropertyIds(){var r,a,i,s;let t=[];try{t=this.dataAdapter.getVisiblePropertyIds()}catch(o){}return vEe({mapField:o=>{var l,c;return(c=(l=this.plugin)==null?void 0:l.fieldMapper)==null?void 0:c.toUserField(o)},visiblePropertyIds:t,showPropertyBasedEvents:!!((r=this.viewOptions)!=null&&r.showPropertyBasedEvents),startDateProperty:(a=this.viewOptions)==null?void 0:a.startDateProperty,endDateProperty:(i=this.viewOptions)==null?void 0:i.endDateProperty,titleProperty:(s=this.viewOptions)==null?void 0:s.titleProperty})}hasDataSignatureChanged(){let t=this.getDataSignature();return this._previousDataSignature===null?(this._previousDataSignature=t,!1):t!==this._previousDataSignature?(this._previousDataSignature=t,!0):!1}getControllerViewName(){if(!og(this.basesController))return null;let t=this.basesController.viewName;return typeof t=="string"?t:null}hasControllerViewChanged(){let t=this.getControllerViewName();return this._previousControllerViewName===null?(this._previousControllerViewName=t,t!==null):t!==this._previousControllerViewName?(this._previousControllerViewName=t,!0):!1}scheduleDeferredDataUpdate(t=Date.now(),r=!1){let a=this.containerEl.ownerDocument.defaultView||window,i=Date.now()-t,s;i<y3?s=tJe:r?s=0:s=Math.max(0,FEe-i),this.dataUpdateDebounceTimer=a.setTimeout(()=>{this.dataUpdateDebounceTimer=null;let o=Date.now()-t;if(this.hasDataSignatureChanged()){this.renderPreservingEphemeralState();return}if(o<y3){this.scheduleDeferredDataUpdate(t,r);return}if(!r&&o<FEe){this.scheduleDeferredDataUpdate(t,!1);return}r&&this.renderPreservingEphemeralState()},s)}validateTimeValue(t,r,a=23,i=!1){let s=NF(t,r,{maxHour:a,allowMaxHourOnlyAtZero:i});return s.isValid||Nr.warn(`[TaskNotes][CalendarView] Invalid time value: ${t}, using default: ${r}`,{category:"provider",operation:"invalid-time-value"}),s.value}getConfigOption(t,r){return p3(this.config,t,r)}readEventToggles(){if(!(!this.config||typeof this.config.get!="function"))try{if(this.viewOptions.showScheduled=this.getConfigOption("showScheduled",this.viewOptions.showScheduled),this.viewOptions.showDue=this.getConfigOption("showDue",this.viewOptions.showDue),this.viewOptions.showScheduledToDueSpan=this.getConfigOption("showScheduledToDueSpan",this.viewOptions.showScheduledToDueSpan),this.viewOptions.showRecurring=this.getConfigOption("showRecurring",this.viewOptions.showRecurring),this.viewOptions.showCompletedRecurringInstances=this.getConfigOption("showCompletedRecurringInstances",this.viewOptions.showCompletedRecurringInstances),this.viewOptions.showSkippedRecurringInstances=this.getConfigOption("showSkippedRecurringInstances",this.viewOptions.showSkippedRecurringInstances),this.viewOptions.showTimeEntries=this.getConfigOption("showTimeEntries",this.viewOptions.showTimeEntries),this.viewOptions.showTimeblocks=this.getConfigOption("showTimeblocks",this.viewOptions.showTimeblocks),this.viewOptions.showPropertyBasedEvents=this.getConfigOption("showPropertyBasedEvents",this.viewOptions.showPropertyBasedEvents),this.viewOptions.showOverdueOnToday=this.getConfigOption("showOverdueOnToday",this.viewOptions.showOverdueOnToday),this.plugin.icsSubscriptionService){let t=this.plugin.icsSubscriptionService.getSubscriptions();for(let r of t){let a=`showICS_${r.id}`;this.icsCalendarToggles.set(r.id,this.getConfigOption(a,!0))}}if(this.plugin.googleCalendarService){let t=this.plugin.googleCalendarService.getAvailableCalendars();for(let r of t){let a=`showGoogleCalendar_${r.id}`;AF(this.googleCalendarToggles,r,this.getConfigOption(a,!0))}}if(this.plugin.microsoftCalendarService){let t=this.plugin.microsoftCalendarService.getAvailableCalendars();for(let r of t){let a=`showMicrosoftCalendar_${r.id}`;this.microsoftCalendarToggles.set(r.id,this.getConfigOption(a,!0))}}}catch(t){Nr.error("[TaskNotes][CalendarView] Error reading event toggles:",{category:"provider",operation:"reading-event-toggles",error:t})}}readViewOptions(){if(!(!this.config||typeof this.config.get!="function"))try{this.readEventToggles(),this.viewOptions.initialDate=this.getConfigOption("initialDate",this.viewOptions.initialDate),this.viewOptions.initialDateProperty=this.getConfigOption("initialDateProperty",this.viewOptions.initialDateProperty),this.viewOptions.initialDateStrategy=this.getConfigOption("initialDateStrategy",this.viewOptions.initialDateStrategy),this.viewOptions.createDailyNotesFromDateLinks=this.getConfigOption("createDailyNotesFromDateLinks",this.viewOptions.createDailyNotesFromDateLinks),this.viewOptions.calendarView=this.getConfigOption("calendarView",this.viewOptions.calendarView),this.viewOptions.heightMode=uJe(this.getConfigOption("heightMode",this.viewOptions.heightMode)),this.applyHeightModeClass(),this.viewOptions.customDayCount=this.getConfigOption("customDayCount",this.viewOptions.customDayCount),this.viewOptions.listDayCount=this.getConfigOption("listDayCount",this.viewOptions.listDayCount),this.viewOptions.slotMinTime=this.validateTimeValue(this.getConfigOption("slotMinTime",void 0),this.viewOptions.slotMinTime),this.viewOptions.slotMaxTime=this.validateTimeValue(this.getConfigOption("slotMaxTime",void 0),this.viewOptions.slotMaxTime,48,!0),this.viewOptions.slotDuration=this.validateTimeValue(this.getConfigOption("slotDuration",void 0),this.viewOptions.slotDuration),this.viewOptions.snapDuration=this.validateTimeValue(this.getConfigOption("snapDuration",void 0),this.viewOptions.slotDuration),this.viewOptions.scrollTime=this.validateTimeValue(this.getConfigOption("scrollTime",void 0),this.viewOptions.scrollTime),this.viewOptions.firstDay=Number(this.getConfigOption("firstDay",this.viewOptions.firstDay)),this.viewOptions.weekNumbers=this.getConfigOption("weekNumbers",this.viewOptions.weekNumbers),this.viewOptions.nowIndicator=this.getConfigOption("nowIndicator",this.viewOptions.nowIndicator),this.viewOptions.showWeekends=this.getConfigOption("showWeekends",this.viewOptions.showWeekends),this.viewOptions.showAllDaySlot=this.getConfigOption("showAllDaySlot",this.viewOptions.showAllDaySlot),this.viewOptions.showTimeGrid=this.getConfigOption("showTimeGrid",this.viewOptions.showTimeGrid),this.viewOptions.showTodayHighlight=this.getConfigOption("showTodayHighlight",this.viewOptions.showTodayHighlight);let t=Number(this.getConfigOption("todayColumnWidthMultiplier",1));this.viewOptions.todayColumnWidthMultiplier=t>=1&&t<=5?Math.round(t*2)/2:1,this.viewOptions.selectMirror=this.getConfigOption("selectMirror",this.viewOptions.selectMirror),this.viewOptions.timeFormat=this.getConfigOption("timeFormat",this.viewOptions.timeFormat),this.viewOptions.eventMinHeight=this.getConfigOption("eventMinHeight",this.viewOptions.eventMinHeight),this.viewOptions.slotEventOverlap=this.getConfigOption("slotEventOverlap",this.viewOptions.slotEventOverlap);let r=this.getConfigOption("eventMaxStack",void 0);r!==void 0&&(this.viewOptions.eventMaxStack=r===0?null:r);let a=this.getConfigOption("dayMaxEvents",void 0);a!==void 0&&(this.viewOptions.dayMaxEvents=a===0?!0:a);let i=this.getConfigOption("dayMaxEventRows",void 0);i!==void 0&&(this.viewOptions.dayMaxEventRows=i===0?!1:i),this.viewOptions.startDateProperty=this.getConfigOption("startDateProperty",this.viewOptions.startDateProperty),this.viewOptions.endDateProperty=this.getConfigOption("endDateProperty",this.viewOptions.endDateProperty),this.viewOptions.titleProperty=this.getConfigOption("titleProperty",this.viewOptions.titleProperty),this.enableSearch=this.getConfigOption("enableSearch",!1),this.configLoaded=!0,this.applyLayoutClasses(),this.calendar&&(this.applyTodayHighlightStyling(),this.scheduleTodayColumnWidthUpdate(),this.scheduleDailyNoteHeaderLinkUpdate())}catch(t){Nr.error("[TaskNotes][CalendarView] Error reading view options:",{category:"provider",operation:"reading-view-options",error:t})}}async render(){var t,r,a;if(this._isRendering){this._pendingRender=!0;return}if(this._isRendering=!0,this._pendingRender=!1,!this.calendarEl||!this.rootElement){this._isRendering=!1;return}if(this.isPopoutWindow()){this.renderPopoutUnsupported(),this._isRendering=!1;return}if(!((t=this.data)!=null&&t.data)){this._isRendering=!1;return}if(!this.configLoaded&&this.config)this.readViewOptions();else if(this.config)if(this._configChangedNeedsRecreate){this._configChangedNeedsRecreate=!1;let i=this.getNavigationConfigState();if(this.readViewOptions(),this.calendar){let s=this.getNavigationConfigState();this._recreateTargetDate=uEe(i,s)?this.calendar.getDate():null,this.calendar.destroy(),this.calendar=null}}else this.readEventToggles();this.rootElement&&this.setupSearch(this.rootElement);try{let i=this.dataAdapter.extractDataItems(),s=await yu(i,this.plugin),o=this.applySearchFilter(s);if(this.currentTasks=o,this.updateBasesSortIndexes(o),this.basesEntryByPath.clear(),(r=this.data)!=null&&r.data)for(let l of this.data.data)(a=l.file)!=null&&a.path&&this.basesEntryByPath.set(l.file.path,l);this.calendar?await this.updateCalendarEvents(o):await this.initializeCalendar(o)}catch(i){Nr.error("[TaskNotes][CalendarView] Error rendering:",{category:"provider",operation:"rendering",error:i}),this.renderError(i instanceof Error?i:new Error(String(i)))}finally{this._isRendering=!1}this._pendingRender&&(this._pendingRender=!1,window.setTimeout(()=>void this.render(),0))}async initializeCalendar(t){var i,s;if(!this.calendarEl)return;let r=(i=this._recreateTargetDate)!=null?i:this.determineInitialDate(t),a={plugins:[nxe,pxe,gxe,Eye,vxe],initialView:this.viewOptions.calendarView,initialDate:r,headerToolbar:{left:"prev,next today refreshCalendars",center:"title",right:"multiMonthYear,dayGridMonth,timeGridWeek,timeGridCustom,timeGridDay,listWeek"},buttonText:{today:this.plugin.i18n.translate("views.basesCalendar.today"),month:this.plugin.i18n.translate("views.basesCalendar.buttonText.month"),week:this.plugin.i18n.translate("views.basesCalendar.buttonText.week"),day:this.plugin.i18n.translate("views.basesCalendar.buttonText.day"),year:this.plugin.i18n.translate("views.basesCalendar.buttonText.year"),list:this.plugin.i18n.translate("views.basesCalendar.buttonText.list")},buttonHints:{today:this.plugin.i18n.translate("views.basesCalendar.hints.today")||"Go to today",prev:this.plugin.i18n.translate("views.basesCalendar.hints.prev")||"Previous",next:this.plugin.i18n.translate("views.basesCalendar.hints.next")||"Next",month:this.plugin.i18n.translate("views.basesCalendar.hints.month")||"Month view",week:this.plugin.i18n.translate("views.basesCalendar.hints.week")||"Week view",day:this.plugin.i18n.translate("views.basesCalendar.hints.day")||"Day view",year:this.plugin.i18n.translate("views.basesCalendar.hints.year")||"Year view",list:this.plugin.i18n.translate("views.basesCalendar.hints.list")||"List view"},customButtons:{refreshCalendars:{text:this.plugin.i18n.translate("views.basesCalendar.buttonText.refresh")||"Refresh",hint:this.plugin.i18n.translate("views.basesCalendar.hints.refresh")||"Refresh calendar subscriptions",click:()=>{this.refreshExternalCalendars()}}},views:{timeGridCustom:{type:"timeGrid",duration:{days:this.viewOptions.customDayCount},buttonText:this.plugin.i18n.translate("views.basesCalendar.buttonText.customDays",{count:this.viewOptions.customDayCount.toString()}),titleFormat:{year:"numeric",month:"short",day:"numeric"}},listWeek:{type:"list",duration:{days:this.viewOptions.listDayCount},buttonText:this.plugin.i18n.translate("views.basesCalendar.buttonText.list")}},...pJe(this.getEffectiveHeightMode()),handleWindowResize:!1,stickyHeaderDates:!1,locale:this.viewOptions.locale||this.plugin.settings.uiLanguage||navigator.language||"en",slotMinTime:this.viewOptions.slotMinTime,slotMaxTime:this.viewOptions.slotMaxTime,slotDuration:this.viewOptions.slotDuration,snapDuration:this.viewOptions.snapDuration,firstDay:this.viewOptions.firstDay,weekNumbers:this.viewOptions.weekNumbers,nowIndicator:this.viewOptions.nowIndicator,weekends:this.viewOptions.showWeekends,allDaySlot:this.viewOptions.showAllDaySlot,dayMaxEvents:this.viewOptions.dayMaxEvents,dayMaxEventRows:this.viewOptions.dayMaxEventRows,eventMaxStack:(s=this.viewOptions.eventMaxStack)!=null?s:void 0,navLinks:!0,navLinkDayClick:o=>{this.openDailyNoteFromDateLink(o)},dayHeaderDidMount:o=>{t3(o.el,o.date,o.view.type,this.plugin,l=>this.openDailyNoteFromDateLink(l))},editable:!0,selectable:!0,...Jn.Platform.isMobile?{longPressDelay:350,eventLongPressDelay:350,selectLongPressDelay:350}:{},selectMirror:this.viewOptions.selectMirror,eventTimeFormat:this.viewOptions.timeFormat==="12"?{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short",hour12:!0}:{hour:"2-digit",minute:"2-digit",hour12:!1},slotLabelFormat:{hour:"2-digit",minute:"2-digit",hour12:this.viewOptions.timeFormat==="12"},scrollTime:this.viewOptions.scrollTime,eventMinHeight:this.viewOptions.eventMinHeight,slotEventOverlap:this.viewOptions.slotEventOverlap,eventAllow:()=>!0,eventOrder:LEe(this.dataAdapter.getSortConfig()),events:(o,l,c)=>{this.fetchEvents(o,l,c)},eventDidMount:o=>this.handleEventDidMount(o),eventClick:o=>{this.handleEventClick(o)},eventDrop:o=>{this.handleEventDrop(o)},eventResize:o=>{this.handleEventResize(o)},select:o=>{this.handleDateSelect(o)},viewDidMount:o=>{let l=o.view.type;l&&l!==this.viewOptions.calendarView&&(this.viewOptions.calendarView=l,this.debouncedSaveViewType(l)),this.applyLayoutClasses(),this.scheduleTodayColumnWidthUpdate(),this.scheduleDailyNoteHeaderLinkUpdate(),this.scheduleRefreshButtonIconUpdate()},datesSet:()=>{this.applyLayoutClasses(),this.scheduleTodayColumnWidthUpdate(),this.scheduleDailyNoteHeaderLinkUpdate(),this.scheduleRefreshButtonIconUpdate()}};this.calendar=new nJe(this.calendarEl,a),this.calendar.render(),this._recreateTargetDate=null,this.applyLayoutClasses(),this.applyTodayHighlightStyling(),this.scheduleTodayColumnWidthUpdate(),this.scheduleDailyNoteHeaderLinkUpdate(),this.scheduleRefreshButtonIconUpdate()}updateBasesSortIndexes(t){var r,a;this.basesSortIndexByPath.clear(),jEe(this.dataAdapter.getSortConfig())&&(t.forEach((i,s)=>{this.basesSortIndexByPath.set(i.path,s)}),(a=(r=this.data)==null?void 0:r.data)==null||a.forEach((i,s)=>{var l;let o=(l=i.file)==null?void 0:l.path;o&&!this.basesSortIndexByPath.has(o)&&this.basesSortIndexByPath.set(o,s)}))}scheduleDailyNoteHeaderLinkUpdate(){let t=this.containerEl.ownerDocument.defaultView||window;t.setTimeout(()=>this.attachDailyNoteHeaderLinks(),0),t.setTimeout(()=>this.attachDailyNoteHeaderLinks(),50)}scheduleRefreshButtonIconUpdate(){let t=this.containerEl.ownerDocument.defaultView||window;t.setTimeout(()=>this.applyRefreshButtonIcon(),0),t.setTimeout(()=>this.applyRefreshButtonIcon(),50)}applyRefreshButtonIcon(){this.calendarEl&&eJe(this.calendarEl,this.plugin.i18n.translate("views.basesCalendar.hints.refresh")||this.plugin.i18n.translate("views.basesCalendar.buttonText.refresh")||"Refresh calendar subscriptions")}attachDailyNoteHeaderLinks(){var s;if(!this.calendar||!this.calendarEl||!(((s=this.calendar.view)==null?void 0:s.type)==="timeGridDay"||!!this.calendarEl.querySelector(".fc-timeGridDay-view")))return;let a=this.calendar.getDate();this.calendarEl.querySelectorAll(".fc-col-header-cell").forEach(o=>{let l=o.dataset.date?et(o.dataset.date):a;t3(o,l,"timeGridDay",this.plugin,c=>this.openDailyNoteFromDateLink(c))})}openDailyNoteFromDateLink(t){e3(t,this.plugin,{createIfMissing:this.viewOptions.createDailyNotesFromDateLinks})}async refreshExternalCalendars(){var t;try{this.plugin.icsSubscriptionService&&await this.plugin.icsSubscriptionService.refreshAllSubscriptions(),this.plugin.googleCalendarService&&await this.plugin.googleCalendarService.refreshAllCalendars(),this.plugin.microsoftCalendarService&&await this.plugin.microsoftCalendarService.refreshAllCalendars(),(t=this.calendar)==null||t.refetchEvents()}catch(r){Nr.error("[TaskNotes][CalendarView] Error refreshing calendars:",{category:"provider",operation:"refreshing-calendars",error:r})}}applyTodayHighlightStyling(){this.calendarEl&&(this.viewOptions.showTodayHighlight?this.calendarEl.classList.remove("hide-today-highlight"):this.calendarEl.classList.add("hide-today-highlight"))}applyHeightModeClass(){var r;let t=this.getEffectiveHeightMode()==="auto";this.rootElement&&(this.rootElement.classList.toggle("advanced-calendar-view--auto-height",t),this.rootElement.classList.toggle("tn-static-min-height-800px-997b4c8c",!t)),(r=this.calendarEl)==null||r.classList.toggle("advanced-calendar-view__calendar--auto-height",t)}applyTimeGridVisibilityClass(){var r,a;let t=zEe(this.viewOptions.showTimeGrid,this.viewOptions.calendarView);(r=this.rootElement)==null||r.classList.toggle("advanced-calendar-view--hide-time-grid",t),(a=this.calendarEl)==null||a.classList.toggle("advanced-calendar-view__calendar--hide-time-grid",t)}applyCalendarModeClass(){var r,a;let t=this.viewOptions.calendarView.startsWith("list");(r=this.rootElement)==null||r.classList.toggle("advanced-calendar-view--list",t),(a=this.calendarEl)==null||a.classList.toggle("advanced-calendar-view__calendar--list",t)}applyLayoutClasses(){this.applyHeightModeClass(),this.applyTimeGridVisibilityClass(),this.applyCalendarModeClass()}getEffectiveHeightMode(){return zEe(this.viewOptions.showTimeGrid,this.viewOptions.calendarView)?"auto":mJe(this.viewOptions.heightMode,this.viewOptions.calendarView,this.containerEl)}scheduleTodayColumnWidthUpdate(){if(!this.canUpdateCalendarSize())return;(this.containerEl.ownerDocument.defaultView||window).setTimeout(()=>{this.canUpdateCalendarSize()&&this.applyTodayColumnWidth()},0)}applyTodayColumnWidth(){var d;let t=this.calendar;if(!this.calendarEl||!t||!this.canUpdateCalendarSize())return;let r=(d=t.view)==null?void 0:d.type;if(!r)return;let a=Array.from(this.calendarEl.querySelectorAll(".fc-col-header-cell[data-date]")),i=a.map(u=>u.dataset.date).filter(u=>!!u);if(this.resetTodayColumnWidths(),!cJe(r,this.viewOptions.todayColumnWidthMultiplier))return;let s=a.find(u=>u.classList.contains("fc-day-today")),o=s==null?void 0:s.dataset.date;if(!o)return;let l=TJe(i,o,this.viewOptions.todayColumnWidthMultiplier);if(!l)return;this.calendarEl.querySelectorAll(".fc-col-header-cell[data-date], .fc-timegrid-col[data-date], .fc-daygrid-day[data-date]").forEach(u=>{let p=u.dataset.date;if(!p)return;let m=l.get(p);if(!m)return;u.style.width=m,u.style.minWidth=m,u.style.maxWidth=m;let f=$Ee(u);f?f.style.width=m:Nr.warn("Calendar column width target was not found",{category:"provider",operation:"apply-today-column-width",details:{dateKey:p,reason:"FullCalendar DOM may have changed; today-column width skipped."}})})}canUpdateCalendarSize(){return gJe(this.calendarEl,this.containerEl)}isPopoutWindow(){return yJe(this.containerEl)}renderPopoutUnsupported(){if(!this.calendarEl)return;this.calendar&&(this.calendar.destroy(),this.calendar=null),this.calendarEl.replaceChildren(),this.calendarEl.classList.add("advanced-calendar-view__calendar--popout-blocked");let t=this.calendarEl.ownerDocument,r=Ie(t,"div");r.className="advanced-calendar-view__popout-blocked";let a=Ie(t,"h3");a.textContent="Calendar view is unavailable in a separate window",r.appendChild(a);let i=Ie(t,"p");i.textContent="Open this calendar view in the main Obsidian window. The calendar can freeze Obsidian when restored inside a separate window.",r.appendChild(i),this.calendarEl.appendChild(r)}resetTodayColumnWidths(){this.calendarEl&&hJe(this.calendarEl)}debouncedSaveViewType(t){this._saveViewTypeTimer&&window.clearTimeout(this._saveViewTypeTimer),this._saveViewTypeTimer=window.setTimeout(()=>{this._saveViewTypeTimer=null;try{this.config&&typeof this.config.set=="function"&&(this.config.set("calendarView",t),Nr.debug("[TaskNotes][CalendarView] View type saved to config:",{category:"provider",operation:"view-type-saved-config",details:{value:t}}))}catch(r){Nr.error("[TaskNotes][CalendarView] Failed to save view type:",{category:"provider",operation:"save-view-type",error:r})}},1e3)}determineInitialDate(t){var r;return hEe({viewOptions:this.viewOptions,taskNotes:t,entries:(r=this.data)==null?void 0:r.data,getEntryPropertyValue:(a,i)=>this.dataAdapter.getPropertyValue(a,i),getContextPropertyValue:a=>this.getEmbeddedMarkdownDateNavigationPropertyValue(a),mapPropertyToTaskField:a=>this.propertyMapper.basesToTaskCardProperty(a)})}getEmbeddedMarkdownDateNavigationPropertyValue(t){var s;if(!this.containerEl.closest(".internal-embed, .markdown-embed"))return null;let r=this.getContainingMarkdownFile();if(!r)return null;let a=(s=this.plugin.app.metadataCache.getFileCache(r))==null?void 0:s.frontmatter;if(!a)return null;let i=[t,this.propertyMapper.basesToTaskCardProperty(t),t.replace(/^(note\.|task\.)/,"")];for(let o of new Set(i))if(Object.prototype.hasOwnProperty.call(a,o))return a[o];return null}getContainingMarkdownFile(){var r;let t=this.plugin.app.workspace.getLeavesOfType("markdown");for(let a of t){let i=a.view;if((r=i.containerEl)!=null&&r.contains(this.containerEl)&&i.file instanceof Jn.TFile&&i.file.extension==="md")return i.file}return null}getNavigationConfigState(){return gEe(this.viewOptions)}async fetchEvents(t,r,a){try{let i=await this.buildAllEvents(t);r(i)}catch(i){Nr.error("[TaskNotes][CalendarView] Error fetching events:",{category:"provider",operation:"fetching-events",error:i}),a(i instanceof Error?i:new Error(String(i)))}}async buildAllEvents(t){var l,c,d,u,p;let r=[],a={showScheduled:this.viewOptions.showScheduled,showDue:this.viewOptions.showDue,showScheduledToDueSpan:this.viewOptions.showScheduledToDueSpan,showRecurring:this.viewOptions.showRecurring,showCompletedRecurringInstances:this.viewOptions.showCompletedRecurringInstances,showSkippedRecurringInstances:this.viewOptions.showSkippedRecurringInstances,showTimeEntries:this.viewOptions.showTimeEntries,showTimeblocks:this.viewOptions.showTimeblocks,showICSEvents:!1,showOverdueOnToday:this.viewOptions.showOverdueOnToday,visibleStart:t.start,visibleEnd:t.end,visibleStartDate:t.startStr,visibleEndDate:t.endStr},i=await Hxe(this.currentTasks,this.plugin,a);if(OEe(i,this.basesSortIndexByPath),r.push(...i),this.viewOptions.showPropertyBasedEvents&&this.viewOptions.startDateProperty){let m=await this.buildPropertyBasedEvents();OEe(m,this.basesSortIndexByPath),r.push(...m)}let o=!!((l=this.plugin.icsSubscriptionService)!=null&&l.getAllEvents().length||(c=this.plugin.googleCalendarService)!=null&&c.getAllEvents().length||(d=this.plugin.microsoftCalendarService)!=null&&d.getAllEvents().length)?await this.plugin.icsNoteService.getRelatedNoteCountsByEventId():new Map;return this.plugin.icsSubscriptionService&&r.push(...MF({events:this.plugin.icsSubscriptionService.getAllEvents(),provider:"ics",plugin:this.plugin,toggles:this.icsCalendarToggles,relatedNoteCountsByEventId:o})),this.plugin.googleCalendarService&&r.push(...MF({events:this.plugin.googleCalendarService.getAllEvents(),provider:"google",plugin:this.plugin,toggles:this.googleCalendarToggles,relatedNoteCountsByEventId:o})),this.plugin.microsoftCalendarService&&r.push(...MF({events:this.plugin.microsoftCalendarService.getAllEvents(),provider:"microsoft",plugin:this.plugin,toggles:this.microsoftCalendarToggles,relatedNoteCountsByEventId:o})),sJe(r,((p=(u=this.calendar)==null?void 0:u.view)==null?void 0:p.type)||this.viewOptions.calendarView,this.viewOptions.showAllDaySlot)}async buildPropertyBasedEvents(){var r;if(!((r=this.data)!=null&&r.data))return[];if(!this.viewOptions.startDateProperty)return[];let t=[];for(let a of this.data.data)try{let i=a.file;if(!i)continue;let s=fEe({entry:a,file:i,startDateProperty:this.viewOptions.startDateProperty,endDateProperty:this.viewOptions.endDateProperty,titleProperty:this.viewOptions.titleProperty,getPropertyValue:(o,l)=>this.dataAdapter.getPropertyValue(o,l)});s&&t.push(s)}catch(i){Nr.warn("[TaskNotes][CalendarView] Error processing property-based entry:",{category:"provider",operation:"processing-property-based-entry",error:i})}return t}async updateCalendarEvents(t){this.calendar&&(this.calendar.setOption("eventOrder",LEe(this.dataAdapter.getSortConfig())),this.calendar.refetchEvents())}async refreshCalendarWithFreshData(t){var r;if(this.calendar)try{let a=[],i=!1;for(let s of this.currentTasks){let o=(t==null?void 0:t.path)===s.path?t:this.plugin.cacheManager.getCachedTaskInfoSync(s.path);if(o){if(o.archived)continue;let l={...o,basesData:s.basesData};(t==null?void 0:t.path)===o.path&&(i=!0),a.push(l)}}t!=null&&t.path&&!i&&!t.archived&&a.push((r=this.plugin.cacheManager.getCachedTaskInfoSync(t.path))!=null?r:t),this.currentTasks=a,this.calendar.refetchEvents()}catch(a){Nr.error("[TaskNotes][CalendarView] Error refreshing calendar:",{category:"provider",operation:"refreshing-calendar",error:a})}}async refreshAfterExpectedCalendarTaskWrite(t){this._expectingImmediateUpdate&&(this._expectingImmediateUpdate=!1,await this.refreshCalendarWithFreshData(t))}clearPendingCalendarRefreshTimers(){this.updateDebounceTimer&&(window.clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=null),this.dataUpdateDebounceTimer&&(window.clearTimeout(this.dataUpdateDebounceTimer),this.dataUpdateDebounceTimer=null)}async refreshAfterDirectCalendarTaskWrite(t){this.clearPendingCalendarRefreshTimers(),await this.refreshCalendarWithFreshData(t),this.clearPendingCalendarRefreshTimers()}async handleEventClick(t){let{taskInfo:r,timeblock:a,eventType:i,filePath:s,icsEvent:o,subscriptionName:l}=t.event.extendedProps||{},c=t.jsEvent;if(i==="timeblock"&&a){let d=t.event.start;if(!d)return;let u=D(d,"yyyy-MM-dd");xF(a,d,u,this.plugin,()=>this.expectImmediateUpdate());return}if(i==="timeEntry"&&r&&c.button===0){this.plugin.openTimeEntryEditor(r,()=>this.expectImmediateUpdate());return}if(i==="ics"&&o){new Wc(this.plugin.app,this.plugin,o,l).open();return}if(i==="property-based"&&s){let d=this.plugin.app.vault.getAbstractFileByPath(s);if(d instanceof Jn.TFile){let p=c.ctrlKey||c.metaKey||c.button===1;this.plugin.app.workspace.getLeaf(p).openFile(d)}return}r!=null&&r.path&&c.button===0&&gre(r,this.plugin,c,t.event.id,()=>this.expectImmediateUpdate())}refetchWhenCreatedTimeblockIsIndexed(t){var c;let r=()=>{var u,p;let d=(p=(u=this.plugin.app.metadataCache.getFileCache(t.dailyNote))==null?void 0:u.frontmatter)==null?void 0:p.timeblocks;return Array.isArray(d)&&d.some(m=>!m||typeof m!="object"?!1:m.id===t.timeblock.id)};if(r()){(c=this.calendar)==null||c.refetchEvents();return}let a=this.containerEl.ownerDocument.defaultView||window,i=null,s=null,o=!1,l=()=>{o||(o=!0,i!==null&&(a.clearTimeout(i),i=null),s&&(this.plugin.app.metadataCache.offref(s),s=null))};s=this.plugin.app.metadataCache.on("changed",d=>{var u;d.path!==t.dailyNote.path||!r()||(l(),(u=this.calendar)==null||u.refetchEvents())}),i=a.setTimeout(()=>{var d;l(),(d=this.calendar)==null||d.refetchEvents()},y3),this.register(l)}async handleEventDrop(t){var p,m,f,h;if(!((p=t==null?void 0:t.event)!=null&&p.extendedProps)){Nr.warn("[TaskNotes][CalendarView] Event dropped without extendedProps",{category:"provider",operation:"event-dropped-without-extendedprops"});return}let{taskInfo:r,timeblock:a,eventType:i,isRecurringInstance:s,isNextScheduledOccurrence:o,isPatternInstance:l,filePath:c,icsEvent:d}=t.event.extendedProps;if(i==="timeblock"){if(!t.oldEvent.start){t.revert();return}let g=D(t.oldEvent.start,"yyyy-MM-dd");await qxe(t,a,g,this.plugin,_xe(t.jsEvent));return}if(i==="property-based"&&c){try{let g=this.plugin.app.vault.getAbstractFileByPath(c);if(!g||!(g instanceof Jn.TFile)){t.revert();return}let v=this.viewOptions.startDateProperty,k=this.viewOptions.endDateProperty,T=EF(v),b=EF(k);if(!T){t.revert();return}let w=t.oldEvent.start,S=t.event.start;if(!w||!S){t.revert();return}await yr(this.plugin.app,g,C=>{let x=aEe({frontmatter:C,startProperty:T,endProperty:b,oldStart:w,newStart:S,allDay:t.event.allDay});if(x.kind==="update-frontmatter")for(let[E,_]of Object.entries(x.updates))C[E]=_})}catch(g){Nr.error("[TaskNotes][CalendarView] Error updating property-based event:",{category:"provider",operation:"updating-property-based-event",error:g}),t.revert()}return}if(i==="ics"&&d){let g=(m=this.plugin.calendarProviderRegistry)==null?void 0:m.findProviderForEvent(d);if(g){try{let{calendarId:v,eventId:k}=g.extractEventIds(d),T=r3({start:t.event.start,end:t.event.end,allDay:t.event.allDay,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"});if(T.kind==="revert"){t.revert();return}await g.updateEvent(v,k,T.updates)}catch(v){Nr.error(`[TaskNotes][CalendarView] Error updating ${g.providerName} event:`,{category:"provider",operation:"updating",error:v}),t.revert()}return}else{t.revert();return}}if(i==="timeEntry"){let g=sEe({timeEntries:r.timeEntries,timeEntryIndex:t.event.extendedProps.timeEntryIndex,oldStart:t.oldEvent.start,newStart:t.event.start,newEnd:t.event.end});if(g.kind==="revert"){t.revert();return}if(g.kind==="update-time-entries")try{let v=await this.plugin.taskService.updateTask(r,{timeEntries:g.timeEntries});await this.refreshAfterDirectCalendarTaskWrite(v)}catch(v){Nr.error("Error updating time entry:",{category:"provider",operation:"updating-time-entry",error:v}),t.revert()}return}let u=!!(r!=null&&r.recurrence_parent&&(r!=null&&r.occurrence_date));if(r&&!u&&(s||o||l)){await zxe(t,r,this.plugin);return}if(r)try{let g=eEe({eventType:i,taskInfo:r,newStart:t.event.start,oldStart:t.oldEvent.start,allDay:t.event.allDay});if(g.kind==="revert"){t.revert();return}if(g.kind==="update-date-property"){let v=await this.plugin.taskService.updateProperty(r,g.property,g.value);await this.refreshAfterDirectCalendarTaskWrite(v)}else if(g.kind==="update-scheduled-due-span"){let v=this.plugin.app.vault.getAbstractFileByPath(r.path);if(v instanceof Jn.TFile){let k=this.plugin.fieldMapper.toUserField("scheduled"),T=this.plugin.fieldMapper.toUserField("due");await yr(this.plugin.app,v,b=>{g.scheduled&&(b[k]=g.scheduled),g.due&&(b[T]=g.due)}),await this.refreshAfterDirectCalendarTaskWrite({...r,scheduled:(f=g.scheduled)!=null?f:r.scheduled,due:(h=g.due)!=null?h:r.due})}}}catch(g){Nr.error("[TaskNotes][CalendarView] Error updating task date:",{category:"provider",operation:"updating-task-date",error:g}),t.revert()}}async handleEventResize(t){var d,u;if(!((d=t==null?void 0:t.event)!=null&&d.extendedProps)){Nr.warn("[TaskNotes][CalendarView] Event resized without extendedProps",{category:"provider",operation:"event-resized-without-extendedprops"});return}let{taskInfo:r,timeblock:a,eventType:i,filePath:s,timeEntryIndex:o,icsEvent:l}=t.event.extendedProps;if(i==="timeEntry"){let p=oEe({timeEntries:r.timeEntries,timeEntryIndex:o,newStart:t.event.start,newEnd:t.event.end});if(p.kind==="revert"){t.revert();return}if(p.kind==="update-time-entries")try{let m=await this.plugin.taskService.updateTask(r,{timeEntries:p.timeEntries});await this.refreshAfterDirectCalendarTaskWrite(m)}catch(m){Nr.error("Error resizing time entry:",{category:"provider",operation:"resizing-time-entry",error:m}),t.revert()}return}if(i==="timeblock"){if(!t.event.start){t.revert();return}let p=D(t.event.start,"yyyy-MM-dd");await Gxe(t,a,p,this.plugin);return}if(i==="property-based"&&s){try{let p=this.plugin.app.vault.getAbstractFileByPath(s);if(!p||!(p instanceof Jn.TFile)){t.revert();return}let m=this.viewOptions.endDateProperty,f=EF(m),h=iEe({endProperty:f,newEnd:t.event.end,allDay:t.event.allDay});if(h.kind==="revert"){t.revert();return}if(h.kind==="ignore")return;await yr(this.plugin.app,p,g=>{for(let[v,k]of Object.entries(h.updates))g[v]=k})}catch(p){Nr.error("[TaskNotes][CalendarView] Error resizing property-based event:",{category:"provider",operation:"resizing-property-based-event",error:p}),t.revert()}return}if(i==="ics"&&l){let p=(u=this.plugin.calendarProviderRegistry)==null?void 0:u.findProviderForEvent(l);if(p){try{let{calendarId:m,eventId:f}=p.extractEventIds(l),h=r3({start:t.event.start,end:t.event.end,allDay:t.event.allDay,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",requireEnd:!0});if(h.kind==="revert"){t.revert();return}await p.updateEvent(m,f,h.updates)}catch(m){Nr.error(`[TaskNotes][CalendarView] Error resizing ${p.providerName} event:`,{category:"provider",operation:"resizing",error:m}),t.revert()}return}}let c=tEe({eventType:i,start:t.event.start,end:t.event.end,allDay:t.event.allDay});if(c.kind==="revert"){t.revert();return}if(c.kind!=="ignore")try{let p=await this.plugin.taskService.updateProperty(r,"timeEstimate",c.value);await this.refreshAfterDirectCalendarTaskWrite(p)}catch(p){Nr.error("[TaskNotes][CalendarView] Error updating task duration:",{category:"provider",operation:"updating-task-duration",error:p}),t.revert()}}async handleDateSelect(t){var s,o,l,c;let r=new Jn.Menu;r.addItem(d=>{d.setTitle("Create task").setIcon("check-square").onClick(async()=>{let u=this.viewOptions.slotDuration.split(":"),p=parseInt(u[0])*60+parseInt(u[1]||"0"),m=Qxe(t.start,t.end,t.allDay,p);new kp(this.plugin.app,this.plugin,{prePopulatedValues:m,onTaskCreated:h=>{this.refreshAfterDirectCalendarTaskWrite(h)}}).open()})}),this.plugin.settings.calendarViewSettings.enableTimeblocking&&r.addItem(d=>{d.setTitle("Create timeblock").setIcon("clock").onClick(async()=>{await Vxe(t.start,t.end,t.allDay,this.plugin,u=>this.refetchWhenCreatedTimeblockIsIndexed(u))})}),r.addItem(d=>{d.setTitle("Create time entry").setIcon("play").onClick(async()=>{this.expectImmediateUpdate(),await Wxe(t.start,t.end,t.allDay,this.plugin)})});let a=this.plugin.calendarProviderRegistry;a&&a.getAllProviders().some(u=>u.getAvailableCalendars().length>0)&&(r.addSeparator(),r.addItem(u=>{u.setTitle("Create external calendar event").setIcon("calendar-plus").onClick(()=>{new DF(this.plugin.app,this.plugin,{start:t.start,end:t.end,allDay:t.allDay,onEventCreated:()=>{this.expectImmediateUpdate(),a.refreshAll()}}).open()})})),r.onHide(()=>{var d;(d=this.calendar)==null||d.unselect()});let i=t.jsEvent;if(i&&"changedTouches"in i){let d=i,u=(s=d.changedTouches[0])!=null?s:d.touches[0];if(u)r.showAtPosition({x:u.clientX,y:u.clientY});else{let p=(o=this.calendarEl)==null?void 0:o.getBoundingClientRect();r.showAtPosition({x:(l=p==null?void 0:p.left)!=null?l:0,y:(c=p==null?void 0:p.top)!=null?c:0})}}else t.jsEvent?r.showAtMouseEvent(t.jsEvent):r.showAtPosition({x:0,y:0})}handleEventDidMount(t){var m;let r;try{let f=(m=t==null?void 0:t.event)==null?void 0:m.extendedProps;if(!f||typeof f!="object")return;r=f}catch(f){Nr.warn("[TaskNotes][CalendarView] Event mounted without readable props",{category:"provider",operation:"event-mounted-readable-props",error:f});return}let{taskInfo:a,timeblock:i,icsEvent:s,eventType:o,relatedNoteCount:l,isRecurringInstance:c,isNextScheduledOccurrence:d,isPatternInstance:u}=r;XQe(t.el);let p=h3(l);if(NEe({element:t.el,viewType:t.view.type,icsEvent:s,relatedNoteCount:p,plugin:this.plugin}),!REe({arg:t,plugin:this.plugin,config:this.config,visibleProperties:this.getVisibleProperties(),basesEntryByPath:this.basesEntryByPath,buildTaskCardOptions:f=>this.buildTaskCardOptions(f),logDebug:(f,...h)=>Nr.debug(f,{category:"provider",operation:"mount-calendar-list-event-card",details:h.length>0?{values:h}:void 0})})){if(t.el.setAttribute("data-event-type",o||"unknown"),o==="timeblock"&&i){Yxe(t.el,i),t.event.setProp&&t.event.setProp("editable",!0);let f=Kxe(i);(0,Jn.setTooltip)(t.el,f,{placement:"top"});return}if(a&&a.path){if(t.el.setAttribute("data-task-path",a.path),t.el.classList.add("fc-task-event"),this.attachTaskEventHoverLink(t.el,a.path),a.tags&&a.tags.length>0&&a.tags.forEach(f=>{let h=f.replace(/[^a-zA-Z0-9-_]/g,"");h&&t.el.classList.add(`fc-tag-${h}`)}),Ko(a.projects||[]).forEach(f=>{let h=Dd(f);h&&t.el.classList.add(`fc-project-${h}`)}),t.event.setProp)switch(o){case"scheduled":case"recurring":case"timeEntry":case"due":case"scheduledToDueSpan":t.event.setProp("editable",o!=="scheduledToDueSpan"||!(c||d||u));break;default:break}Oxe(t.el,r)}if(a){let f=Lxe(a,this.plugin);(0,Jn.setTooltip)(t.el,f)}else if(s){let f=p>0?`
${IF(this.plugin,p)}`:"",h=s.description?`${s.title}
${s.description}${f}`:`${s.title}${f}`;(0,Jn.setTooltip)(t.el,h)}a&&o!=="ics"&&Zxe(t.el,a,this.plugin,"tasknotes-bases-calendar"),a&&t.el.addEventListener("contextmenu",f=>{f.preventDefault(),f.stopPropagation();let h=SF(t);new ll({task:a,plugin:this.plugin,targetDate:h,occurrenceDate:Bxe(a,t),promoteOccurrenceControls:!!(a.recurrence||a.recurrence_parent&&a.occurrence_date),onUpdate:()=>{this.refreshCalendarWithFreshData()}}).show(f)}),s&&o==="ics"&&t.el.addEventListener("contextmenu",f=>{f.preventDefault(),f.stopPropagation();let h=r.subscriptionName;new cT({icsEvent:s,plugin:this.plugin,subscriptionName:h,onUpdate:()=>{this.refreshCalendarWithFreshData()}}).show(f)}),o==="property-based"&&r.filePath&&t.el.addEventListener("mouseover",f=>{this.plugin.app.vault.getAbstractFileByPath(r.filePath)&&this.plugin.app.workspace.trigger("hover-link",{event:f,source:"tasknotes-bases-calendar",hoverParent:t.el,targetEl:t.el,linktext:r.filePath,sourcePath:r.filePath})}),o==="property-based"&&r.filePath&&t.el.addEventListener("contextmenu",f=>{f.preventDefault(),f.stopPropagation();let h=this.plugin.app.vault.getAbstractFileByPath(r.filePath);if(h instanceof Jn.TFile){let g=new Jn.Menu;this.plugin.app.workspace.trigger("file-menu",g,h,"tasknotes-bases-calendar"),g.showAtPosition({x:f.clientX,y:f.clientY})}})}}attachTaskEventHoverLink(t,r){let a=i=>{var l,c;let s=`.fc-task-event[data-task-path="${CSS.escape(r)}"]`;((c=(l=this.rootElement)==null?void 0:l.querySelectorAll(s))!=null?c:[]).forEach(d=>{d===t?d.classList.toggle("fc-task-event--hover-source",i):d.classList.toggle("fc-task-event--related-hover",i)})};t.addEventListener("mouseenter",()=>a(!0)),t.addEventListener("mouseleave",()=>a(!1))}setupContainer(){if(super.setupContainer(),this.rootElement){this.rootElement.className="tn-bases-integration tasknotes-plugin advanced-calendar-view",this.rootElement.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-flex-1-14e3b769","tn-static-flex-direction-column-06c8b5ed","tn-static-height-0-7a31cef0","tn-static-height-100-62264068","tn-static-height-12px-06c0747e","tn-static-height-16px-30de4aee","tn-static-height-24px-29a11d37"),this.rootElement.classList.add("tn-static-min-height-800px-997b4c8c");let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.id="bases-calendar",r.classList.remove("tn-static-flex-1-97445a8d","tn-static-margin-top-12px-91e0f558","tn-static-min-height-800px-997b4c8c","tn-static-overflow-hidden-69824400"),r.classList.add("tn-static-flex-1-14e3b769"),this.rootElement.appendChild(r),this.calendarEl=r,this.applyLayoutClasses()}}async handleTaskUpdate(t,r){if(this._expectingImmediateUpdate){await this.refreshAfterExpectedCalendarTaskWrite(t);return}if(r==="tasknotes-service"){await this.refreshCalendarWithFreshData(t);return}this.debouncedRefresh()}debouncedRefresh(){this.updateDebounceTimer&&window.clearTimeout(this.updateDebounceTimer);let t=this.containerEl.ownerDocument.defaultView||window;this.updateDebounceTimer=t.setTimeout(()=>{this.updateDebounceTimer=null,this.renderPreservingEphemeralState()},300)}renderPreservingEphemeralState(){let t=this.getEphemeralState();this.render().catch(r=>{Nr.error("[TaskNotes][CalendarView] Render error:",{category:"provider",operation:"render",error:r}),this.renderError(r instanceof Error?r:new Error(String(r)))}).finally(()=>this.setEphemeralState(t))}renderError(t){if(!this.calendarEl)return;let r=this.calendarEl.ownerDocument,a=Ie(r,"div");a.className="tn-bases-error",a.classList.remove("tn-static-border-radius-4px-c290c56e","tn-static-border-radius-6px-0dc8408c","tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-0-11696618","tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),a.classList.add("tn-static-padding-20px-ebe8e48c"),a.textContent=`Error loading calendar: ${t.message||"Unknown error"}`,this.calendarEl.appendChild(a)}onunload(){this._saveViewTypeTimer&&(window.clearTimeout(this._saveViewTypeTimer),this._saveViewTypeTimer=null),this.calendar&&(this.calendar.destroy(),this.calendar=null),this.calendarEl=null,this.currentTasks=[]}getEphemeralState(){let t=super.getEphemeralState(),r=og(t)?t:{};if(this.calendar){let a=this.calendar.getDate();return{...r,calendarDate:a?a.toISOString():null,calendarScroll:vJe(this.calendarEl)}}return t}setEphemeralState(t){if(super.setEphemeralState(t),!!oJe(t)){if(this.calendar&&typeof t.calendarDate=="string")try{this.calendar.gotoDate(new Date(t.calendarDate))}catch(r){Nr.debug("[CalendarView] Failed to restore calendar date:",{category:"provider",operation:"restore-calendar-date",error:r})}if(Array.isArray(t.calendarScroll)){let r=this.containerEl.ownerDocument.defaultView||window,a=()=>{kJe(this.calendarEl,t.calendarScroll)};r.requestAnimationFrame(()=>{a(),r.requestAnimationFrame(a)})}}}}});function qEe(n){if(n==null||typeof n=="string"&&n.trim()==="")return lg;let e=typeof n=="number"?n:typeof n=="string"?Number(n.trim()):NaN;return Number.isFinite(e)?Math.max(1,Math.round(e)):lg}function bJe(n,e=lg){let t=Math.max(0,Math.floor(n));if(t===0)return"none";let r=qEe(e);if(t>=r)return"very-high";let a=t/r;return a<=1/lg?"low":a<=.5?"medium":"high"}function WEe(n){return(0,ki.moment)(n)}function GEe(n){return function(e,t){if(!t)throw km.error("[TaskNotes][MiniCalendarView] No containerEl provided",{category:"provider",operation:"no-containerel-provided"}),new Error("MiniCalendarView requires a containerEl");return new k3(e,t,n)}}var ki,Ka,km,lg,k3,_F,T3=y(()=>{ki=require("obsidian");IE();Cr();xe();dr();yt();Ka=tt(od());rD();q();Li();nm();f3();km=M({tag:"Bases/MiniCalendarView"}),lg=6;k3=class extends Bc{constructor(t,r,a){super(t,r,a);this.type="tasknotesMiniCalendar";this.calendarEl=null;this.dateProperty=null;this.titleProperty=null;this.heatMapMaxCount=lg;this.icsCalendarToggles=new Map;this.googleCalendarToggles=new Map;this.microsoftCalendarToggles=new Map;this.configLoaded=!1;this.isInitialRender=!0;this.shouldRestoreFocus=!1;this.multiSelectMode=!1;this.selectedDates=new Set;this.notesByDate=new Map;this.monthCalculationCache=new Map;this.keyboardHandler=null;this.dataAdapter.basesView=this;let i=Xt(),s=Br(i);this.selectedDate=s,this.displayedMonth=s.getUTCMonth(),this.displayedYear=s.getUTCFullYear()}onload(){this.readViewOptions(),super.onload()}readViewOptions(){if(!(!this.config||typeof this.config.get!="function"))try{this.dateProperty=this.config.get("dateProperty")||"file.ctime",this.titleProperty=this.config.get("titleProperty")||"file.name",this.heatMapMaxCount=qEe(this.config.get("heatMapMaxCount")),this.readCalendarToggles(),this.configLoaded=!0}catch(t){km.error("[TaskNotes][MiniCalendarView] Error reading view options:",{category:"provider",operation:"reading-view-options",error:t})}}readCalendarToggles(){if(this.icsCalendarToggles.clear(),this.googleCalendarToggles.clear(),this.microsoftCalendarToggles.clear(),!this.config||typeof this.config.get!="function")return;let t=r=>this.config.get(r)!==!1;if(this.plugin.icsSubscriptionService)for(let r of this.plugin.icsSubscriptionService.getSubscriptions())this.icsCalendarToggles.set(r.id,t(`showICS_${r.id}`));if(this.plugin.googleCalendarService)for(let r of this.plugin.googleCalendarService.getAvailableCalendars())AF(this.googleCalendarToggles,r,t(`showGoogleCalendar_${r.id}`));if(this.plugin.microsoftCalendarService)for(let r of this.plugin.microsoftCalendarService.getAvailableCalendars())this.microsoftCalendarToggles.set(r.id,t(`showMicrosoftCalendar_${r.id}`))}async render(){var t;if(!(!this.calendarEl||!this.rootElement)&&(t=this.data)!=null&&t.data){this.config&&this.readViewOptions();try{let r=this.containerEl.ownerDocument,a=this.calendarEl.querySelector(".mini-calendar-view__grid")===r.activeElement;this.calendarEl.empty();let i=this.data.data;this.indexNotesByDate(i),this.renderCalendarControls(),this.renderCalendarGrid(),(this.isInitialRender||this.shouldRestoreFocus||a)&&(this.isInitialRender&&(this.isInitialRender=!1),this.shouldRestoreFocus=!1,window.setTimeout(()=>{var l;let o=(l=this.calendarEl)==null?void 0:l.querySelector(".mini-calendar-view__grid");o&&o.focus()},10))}catch(r){km.error("[TaskNotes][MiniCalendarView] Error rendering:",{category:"provider",operation:"rendering",error:r}),this.renderError(r instanceof Error?r:new Error(String(r)))}}}indexNotesByDate(t){var r;if(this.notesByDate.clear(),!this.dateProperty){this.indexExternalCalendarEvents();return}for(let a of t)try{let i=a.file;if(!i)continue;let s=this.getDateValueFromProperty(a,this.dateProperty);if(!s)continue;let o=re(s);if(!o)continue;let l=i.basename||i.name;if(this.titleProperty)try{let u=(r=a.getValue)==null?void 0:r.call(a,this.titleProperty);if(u!=null)if(typeof u=="object"&&u.toString){let p=u.toString();p&&p!=="null"&&p!==""&&(l=p)}else if(typeof u=="string")l=u;else{let p=Y(u);p&&p!=="null"&&p!==""&&(l=p)}else{let p=this.dataAdapter.getPropertyValue(a,this.titleProperty);if(p!=null)if(typeof p=="object"){let m=Y(p);m&&m!=="null"&&m!==""&&(l=m)}else if(typeof p=="string")l=p;else{let m=Y(p);m&&m!=="null"&&m!==""&&(l=m)}}}catch(u){km.warn("[TaskNotes][MiniCalendarView] Error getting title property:",{category:"provider",operation:"getting-title-property",error:u})}let c={kind:"note",file:i,title:l,path:i.path,dateValue:s,basesEntry:a};this.notesByDate.has(o)||this.notesByDate.set(o,[]);let d=this.notesByDate.get(o);d&&d.push(c)}catch(i){km.warn("[TaskNotes][MiniCalendarView] Error indexing note:",{category:"provider",operation:"indexing-note",error:i})}this.indexExternalCalendarEvents()}addEntryToDate(t,r){var a;this.notesByDate.has(t)||this.notesByDate.set(t,[]),(a=this.notesByDate.get(t))==null||a.push(r)}indexExternalCalendarEvents(){this.indexICSEvents(),this.indexGoogleCalendarEvents(),this.indexMicrosoftCalendarEvents()}indexICSEvents(){if(!this.plugin.icsSubscriptionService)return;let t=new Map(this.plugin.icsSubscriptionService.getSubscriptions().map(r=>[r.id,r]));for(let r of this.plugin.icsSubscriptionService.getAllEvents()){if(this.icsCalendarToggles.get(r.subscriptionId)===!1)continue;let a=t.get(r.subscriptionId);a&&!a.enabled||this.indexExternalEvent(r,(a==null?void 0:a.name)||"Calendar subscription",r.color||(a==null?void 0:a.color))}}indexGoogleCalendarEvents(){if(!this.plugin.googleCalendarService)return;let t=this.plugin.googleCalendarService.getAvailableCalendars();for(let r of this.plugin.googleCalendarService.getAllEvents()){let a=r.subscriptionId.replace("google-","");if(this.googleCalendarToggles.get(a)===!1)continue;let i=rm(t,a);this.indexExternalEvent(r,(i==null?void 0:i.summary)||"Google Calendar",r.color||"#4285F4")}}indexMicrosoftCalendarEvents(){if(!this.plugin.microsoftCalendarService)return;let t=new Map(this.plugin.microsoftCalendarService.getAvailableCalendars().map(r=>[r.id,r]));for(let r of this.plugin.microsoftCalendarService.getAllEvents()){let a=r.subscriptionId.replace("microsoft-","");if(this.microsoftCalendarToggles.get(a)===!1)continue;let i=t.get(a);this.indexExternalEvent(r,(i==null?void 0:i.summary)||"Microsoft Calendar",r.color||"#0078D4")}}indexExternalEvent(t,r,a){for(let i of this.getDateKeysForExternalEvent(t))this.addEntryToDate(i,{kind:"external",title:t.title,path:r,dateValue:t.start,externalEvent:t,sourceName:r,color:a})}getDateKeysForExternalEvent(t){let r=this.extractDateFromString(t.start);if(!r)return[];let a=this.extractDateFromString(t.end||"");if(!a||a===r)return[r];let i=this.createUTCDateFromDateKey(r),s=this.createUTCDateFromDateKey(a);if(!i||!s)return[r];if(t.allDay&&s.setUTCDate(s.getUTCDate()-1),s<i)return[r];let o=[],l=new Date(i.getTime());for(let c=0;l<=s&&c<370;c++)o.push(ae(l)),l.setUTCDate(l.getUTCDate()+1);return o.length>0?o:[r]}createUTCDateFromDateKey(t){let r=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!r)return null;let[,a,i,s]=r;return w0(Number(a),Number(i)-1,Number(s))}getDateValueFromProperty(t,r){try{let a=this.dataAdapter.getPropertyValue(t,r);if(!a)return null;if(typeof a=="string")return this.extractDateFromString(a);if(typeof a=="number")return this.toAnchoredDateString(new Date(a));if(a instanceof Date)return this.toAnchoredDateString(a);if(typeof a=="object"){let i=a.date;if(i instanceof Date)return this.toAnchoredDateString(i);let s=a.toISOString;if(typeof s=="function")return this.extractDateFromString(s.call(a))}return null}catch(a){return km.warn("[TaskNotes][MiniCalendarView] Error getting date value:",{category:"provider",operation:"getting-date-value",error:a}),null}}extractDateFromString(t){let r=t==null?void 0:t.trim();if(!r)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(r))return this.validateCalendarDate(r);if(r.includes("T")||/\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}/.test(r)||/[+-]\d{2}:\d{2}$/.test(r)){let s=r.includes(" ")&&!r.includes("T")?r.replace(" ","T"):r,o=new Date(s);if(!isNaN(o.getTime()))return this.toAnchoredDateString(o)}let a=r.match(/^(\d{4})[/.](\d{2})[/.](\d{2})$/);if(a){let[,s,o,l]=a;return this.validateCalendarDate(`${s}-${o}-${l}`)}let i=r.match(/(\d{4}-\d{2}-\d{2})/);return i?this.validateCalendarDate(i[1]):null}toAnchoredDateString(t){if(!(t instanceof Date)||isNaN(t.getTime()))return null;let r=Br(t);return ae(r)}validateCalendarDate(t){if(!t)return null;let a=t.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!a)return null;let[,i,s,o]=a,l=Number(i),c=Number(s)-1,d=Number(o);if(Number.isNaN(l)||Number.isNaN(c)||Number.isNaN(d))return null;let u=w0(l,c,d);return u.getUTCFullYear()!==l||u.getUTCMonth()!==c||u.getUTCDate()!==d?null:ae(u)}renderCalendarControls(){if(!this.calendarEl)return;let r=this.calendarEl.createDiv({cls:"mini-calendar-view__controls"}).createDiv({cls:"mini-calendar-view__header"}),a=r.createDiv({cls:"mini-calendar-view__navigation"});a.createEl("button",{text:"‹",cls:"mini-calendar-view__nav-button mini-calendar-view__nav-button--prev tn-btn tn-btn--icon tn-btn--ghost",attr:{"aria-label":"Previous month",title:"Previous month"}}).addEventListener("click",()=>this.navigateToPreviousMonth()),a.createDiv({cls:"mini-calendar-view__month-display",text:D(bd(this.selectedDate),"MMMM yyyy")}),a.createEl("button",{text:"›",cls:"mini-calendar-view__nav-button mini-calendar-view__nav-button--next tn-btn tn-btn--icon tn-btn--ghost",attr:{"aria-label":"Next month",title:"Next month"}}).addEventListener("click",()=>this.navigateToNextMonth()),r.createEl("button",{text:"Today",cls:"mini-calendar-view__today-button tn-btn tn-btn--ghost tn-btn--sm",attr:{"aria-label":"Go to today",title:"Go to today"}}).addEventListener("click",()=>this.navigateToToday())}renderCalendarGrid(){if(!this.calendarEl)return;let t=this.calendarEl.createDiv({cls:"mini-calendar-view__grid-container"}),r=this.displayedMonth,a=this.displayedYear,i=new Date(Date.UTC(a,r,1)),s=new Date(Date.UTC(a,r+1,0)),o=this.plugin.settings.calendarViewSettings.firstDay||0,l=(i.getUTCDay()-o+7)%7,c=t.createDiv({cls:"mini-calendar-view__grid",attr:{role:"grid","aria-label":`Calendar for ${D(bd(new Date(Date.UTC(a,r,1))),"MMMM yyyy")}`,tabindex:"0"}});this.setupKeyboardNavigation(c),c.addEventListener("click",()=>{c.focus()});let d=c.createDiv({cls:"mini-calendar-view__grid-header",attr:{role:"row"}});d.createDiv({text:"",cls:"mini-calendar-view__week-header",attr:{role:"columnheader"}});let u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];[...u.slice(o),...u.slice(0,o)].forEach(b=>{d.createDiv({text:b,cls:"mini-calendar-view__day-header",attr:{role:"columnheader","aria-label":b}})});let m=l,f=42,h=s.getUTCDate(),g=f-h-m,v=new Date(Date.UTC(a,r,0)).getUTCDate(),k=[],T=[];for(let b=0;b<m;b++){let w=v-m+b+1,S=new Date(Date.UTC(a,r-1,w));T.push(S)}for(let b=1;b<=h;b++){T.length===7&&(k.push(T),T=[]);let w=new Date(Date.UTC(a,r,b));T.push(w)}for(let b=1;b<=g;b++){T.length===7&&(k.push(T),T=[]);let w=new Date(Date.UTC(a,r+1,b));T.push(w)}T.length>0&&k.push(T),k.forEach(b=>{this.renderWeekRow(c,b)})}renderWeekRow(t,r){let a=t.createDiv({cls:"mini-calendar-view__week",attr:{role:"row"}}),i=this.getWeekNumber(r[0]),s=a.createDiv({cls:"mini-calendar-week-number",text:`W${i}`});s.addEventListener("click",o=>{var c;o.preventDefault(),o.stopPropagation(),this.selectWeek(r);let l=(c=this.calendarEl)==null?void 0:c.querySelector(".mini-calendar-view__grid");l&&l.focus()}),s.addEventListener("contextmenu",o=>{o.preventDefault(),o.stopPropagation(),this.showWeekContextMenu(o,r[0])}),r.forEach((o,l)=>{let c=this.displayedMonth,d=this.displayedYear,u=o.getUTCMonth()!==c||o.getUTCFullYear()!==d,p=o.getUTCDate();this.renderDay(a,o,p,u)})}renderDay(t,r,a,i){let s=Xt(),o=Br(s),l=Qz(r,o),c=Qz(r,this.selectedDate),d="mini-calendar-view__day";l&&(d+=" mini-calendar-view__day--today"),c&&(d+=" mini-calendar-view__day--selected"),i&&(d+=" mini-calendar-view__day--outside-month");let u=t.createDiv({cls:d,text:a.toString(),attr:{role:"gridcell","aria-label":D(bd(r),"EEEE, MMMM d, yyyy")+(l?" (Today)":""),"aria-selected":c?"true":"false","aria-current":l?"date":null}}),p=ae(r),m=this.notesByDate.get(p);if(m&&m.length>0){let f=this.getHeatMapIntensity(m.length);u.addClass(`mini-calendar-view__day--intensity-${f}`);let h=this.createNotePreviewText(m);(0,ki.setTooltip)(u,h,{placement:"top"}),this.renderExternalEventIndicators(u,m)}u.addEventListener("click",f=>{var g;f.preventDefault(),f.stopPropagation(),this.handleDayClick(r,f);let h=(g=this.calendarEl)==null?void 0:g.querySelector(".mini-calendar-view__grid");h&&h.focus()}),u.addEventListener("contextmenu",f=>{f.preventDefault(),f.stopPropagation(),this.showDayContextMenu(f,r)})}async handleDayClick(t,r){if(this.selectedDate=t,r&&(r.ctrlKey||r.metaKey)){await this.openDailyNoteForDate(t);return}this.refresh();let a=ae(t),i=this.notesByDate.get(a);i&&i.length>0&&new _F(this.plugin.app,this.plugin,i,o=>{o&&this.openCalendarEntry(o)}).open()}renderExternalEventIndicators(t,r){let a=r.filter(s=>s.kind==="external");if(a.length===0)return;let i=t.createDiv({cls:"mini-calendar-view__external-event-indicators"});for(let s of a){let o=i.createSpan({cls:"mini-calendar-view__external-event-dot",attr:{"aria-label":`${s.title} (${s.sourceName||"Calendar"})`}});s.color&&(o.style.backgroundColor=s.color)}}openCalendarEntry(t){if(t.file){this.plugin.app.workspace.getLeaf(!1).openFile(t.file);return}t.externalEvent&&new Wc(this.plugin.app,this.plugin,t.externalEvent,t.sourceName).open()}showDayContextMenu(t,r){let a=new ki.Menu;a.addItem(i=>{i.setTitle(this.plugin.i18n.translate("views.miniCalendar.contextMenu.openDailyNote")),i.setIcon("calendar-days"),i.onClick(()=>{this.openDailyNoteForDate(r)})}),a.showAtMouseEvent(t)}showWeekContextMenu(t,r){let a=new ki.Menu;a.addItem(i=>{i.setTitle(this.plugin.i18n.translate("views.miniCalendar.contextMenu.openWeeklyNote")),i.setIcon("calendar-range"),i.onClick(()=>{this.openWeeklyNoteForDate(r)})}),a.showAtMouseEvent(t)}async openDailyNoteForDate(t){if(!(0,Ka.appHasDailyNotesPluginLoaded)()){new ki.Notice("Daily notes core plugin is not enabled. Please enable it in settings > core plugins.");return}let r=bd(t),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,0),i=WEe(a),s=(0,Ka.getAllDailyNotes)(),o=(0,Ka.getDailyNote)(i,s);if(!o)try{o=await(0,Ka.createDailyNote)(i)}catch(l){let c=l instanceof Error?l.message:String(l);km.error("Failed to create daily note:",{category:"provider",operation:"create-daily-note",error:l}),new ki.Notice(`Failed to create daily note: ${c}`);return}o&&await this.plugin.app.workspace.getLeaf(!1).openFile(o)}async openWeeklyNoteForDate(t){if(!(0,Ka.appHasWeeklyNotesPluginLoaded)()){new ki.Notice("Weekly notes core plugin is not enabled. Please enable it in settings > core plugins.");return}let r=bd(t),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,0),i=WEe(a),s=(0,Ka.getAllWeeklyNotes)(),o=(0,Ka.getWeeklyNote)(i,s);if(!o)try{o=await(0,Ka.createWeeklyNote)(i)}catch(l){let c=l instanceof Error?l.message:String(l);km.error("Failed to create weekly note:",{category:"provider",operation:"create-weekly-note",error:l}),new ki.Notice(`Failed to create weekly note: ${c}`);return}o&&await this.plugin.app.workspace.getLeaf(!1).openFile(o)}navigateToPreviousMonth(){let t=new Date(this.selectedDate.getTime());t.setUTCMonth(this.selectedDate.getUTCMonth()-1),this.selectedDate=t,this.displayedMonth=t.getUTCMonth(),this.displayedYear=t.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}navigateToNextMonth(){let t=new Date(this.selectedDate.getTime());t.setUTCMonth(this.selectedDate.getUTCMonth()+1),this.selectedDate=t,this.displayedMonth=t.getUTCMonth(),this.displayedYear=t.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}navigateToToday(){let t=Xt(),r=Br(t);this.selectedDate=r,this.displayedMonth=r.getUTCMonth(),this.displayedYear=r.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}setupKeyboardNavigation(t){this.keyboardHandler&&t.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=r=>{(async()=>{if(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"){r.preventDefault(),this.navigateByArrowKey(r.key);return}if(r.key==="PageUp"){r.preventDefault(),r.shiftKey?this.navigateToYear(-1):this.navigateToPreviousMonth();return}if(r.key==="PageDown"){r.preventDefault(),r.shiftKey?this.navigateToYear(1):this.navigateToNextMonth();return}if(r.key==="Home"){r.preventDefault(),r.ctrlKey||r.metaKey?this.navigateToStartOfMonth():this.navigateToStartOfWeek();return}if(r.key==="End"){r.preventDefault(),r.ctrlKey||r.metaKey?this.navigateToEndOfMonth():this.navigateToEndOfWeek();return}if(r.key==="t"||r.key==="T"){r.preventDefault(),this.navigateToToday();return}if(r.key==="Escape"){this.multiSelectMode&&(r.preventDefault(),this.multiSelectMode=!1,this.selectedDates.clear(),this.refresh());return}if(r.key==="Enter"||r.key===" "){r.preventDefault(),r.ctrlKey||r.metaKey?await this.openDailyNoteForDate(this.selectedDate):await this.handleDayClick(this.selectedDate);return}})()},t.addEventListener("keydown",this.keyboardHandler)}navigateByArrowKey(t){let r=new Date(this.selectedDate.getTime());switch(t){case"ArrowLeft":r.setUTCDate(r.getUTCDate()-1);break;case"ArrowRight":r.setUTCDate(r.getUTCDate()+1);break;case"ArrowUp":r.setUTCDate(r.getUTCDate()-7);break;case"ArrowDown":r.setUTCDate(r.getUTCDate()+7);break}this.selectedDate=r,(r.getUTCMonth()!==this.displayedMonth||r.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=r.getUTCMonth(),this.displayedYear=r.getUTCFullYear(),this.monthCalculationCache.clear()),this.shouldRestoreFocus=!0,this.refresh()}navigateToStartOfWeek(){let t=this.plugin.settings.calendarViewSettings.firstDay||0,a=(this.selectedDate.getUTCDay()-t+7)%7,i=new Date(this.selectedDate.getTime());i.setUTCDate(i.getUTCDate()-a),this.selectedDate=i,(i.getUTCMonth()!==this.displayedMonth||i.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=i.getUTCMonth(),this.displayedYear=i.getUTCFullYear(),this.monthCalculationCache.clear()),this.shouldRestoreFocus=!0,this.refresh()}navigateToEndOfWeek(){let t=this.plugin.settings.calendarViewSettings.firstDay||0,r=this.selectedDate.getUTCDay(),i=((t+6)%7-r+7)%7,s=new Date(this.selectedDate.getTime());s.setUTCDate(s.getUTCDate()+i),this.selectedDate=s,(s.getUTCMonth()!==this.displayedMonth||s.getUTCFullYear()!==this.displayedYear)&&(this.displayedMonth=s.getUTCMonth(),this.displayedYear=s.getUTCFullYear(),this.monthCalculationCache.clear()),this.shouldRestoreFocus=!0,this.refresh()}navigateToStartOfMonth(){let t=new Date(Date.UTC(this.selectedDate.getUTCFullYear(),this.selectedDate.getUTCMonth(),1));this.selectedDate=t,this.shouldRestoreFocus=!0,this.refresh()}navigateToEndOfMonth(){let t=new Date(Date.UTC(this.selectedDate.getUTCFullYear(),this.selectedDate.getUTCMonth()+1,0));this.selectedDate=t,this.shouldRestoreFocus=!0,this.refresh()}navigateToYear(t){let r=new Date(this.selectedDate.getTime());r.setUTCFullYear(r.getUTCFullYear()+t),this.selectedDate=r,this.displayedMonth=r.getUTCMonth(),this.displayedYear=r.getUTCFullYear(),this.monthCalculationCache.clear(),this.shouldRestoreFocus=!0,this.refresh()}getWeekNumber(t){let r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())),a=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-a);let i=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-i.getTime())/864e5+1)/7)}selectWeek(t){this.multiSelectMode=!0,this.selectedDates.clear(),t.forEach(r=>{this.selectedDates.add(ae(r))}),this.shouldRestoreFocus=!0,this.refresh(),this.showCombinedNotes()}showCombinedNotes(){let t=[];this.selectedDates.forEach(r=>{let a=this.notesByDate.get(r);a&&t.push(...a)}),t.length>0?new _F(this.plugin.app,this.plugin,t,a=>{a&&this.openCalendarEntry(a)}).open():new ki.Notice("No notes found for selected dates")}createNotePreviewText(t){let r=[],a=t.filter(s=>s.kind==="note").length,i=t.length-a;return a>0&&i>0?r.push(`${a} note${a>1?"s":""}, ${i} event${i>1?"s":""}`):i>0?r.push(`${i} event${i>1?"s":""}`):r.push(`${a} note${a>1?"s":""}`),r.push(""),t.slice(0,5).forEach(s=>{var c,d;let o=`• ${s.title}`;if(s.kind==="external"){s.sourceName&&(o+=` (${s.sourceName})`),r.push(o);return}let l=(d=(c=s.basesEntry)==null?void 0:c.getValue)==null?void 0:d.call(c,"note.type");if(l){let u=null;if(typeof l=="object"&&l.toString){let p=l.toString();p&&p!=="null"&&p!==""&&(u=p)}else typeof l=="string"&&(u=l);u&&(o+=` (${u})`)}r.push(o)}),t.length>5&&r.push(`+ ${t.length-5} more...`),r.join(`
`)}getHeatMapIntensity(t){return bJe(t,this.heatMapMaxCount)}setupContainer(){var a;super.setupContainer();let t=this.containerEl.ownerDocument,r=Ie(t,"div");r.className="mini-calendar-bases-view",(a=this.rootElement)==null||a.appendChild(r),this.calendarEl=r}async handleTaskUpdate(t){this.debouncedRefresh()}renderError(t){if(!this.calendarEl)return;let r=this.calendarEl.ownerDocument,a=Ie(r,"div");a.className="tn-bases-error",a.classList.remove("tn-static-border-radius-4px-c290c56e","tn-static-border-radius-6px-0dc8408c","tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-text-warning-783d5f03","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-0-11696618","tn-static-margin-0-auto-266e9b04","tn-static-margin-0-db0d5f36","tn-static-margin-0-var-size-4-2-77f7dc08","tn-static-margin-2px-0-edce9b14","tn-static-margin-8px-0-0-0-a2eb8382","tn-static-padding-0-16px-16px-16px-f1aa998c","tn-static-padding-0-41d7d7e2","tn-static-padding-12px-43bef435","tn-static-padding-16px-287f770e","tn-static-padding-20px-769fed37","tn-static-padding-20px-7a035d95","tn-static-padding-2px-8px-c8eea84a","tn-static-padding-2rem-42aa6d9c"),a.classList.add("tn-static-padding-20px-ebe8e48c"),a.textContent=`Error loading mini calendar: ${t.message||"Unknown error"}`,this.calendarEl.appendChild(a)}onunload(){this.calendarEl=null,this.notesByDate.clear(),this.monthCalculationCache.clear(),this.keyboardHandler=null}},_F=class extends ki.FuzzySuggestModal{constructor(e,t,r,a){super(e),this.plugin=t,this.notes=r,this.onChooseNote=a,this.setPlaceholder("Select an item to open"),this.setInstructions([{command:"↑↓",purpose:"Navigate"},{command:"↵",purpose:"Open item"},{command:"esc",purpose:"Dismiss"}])}getItems(){return this.notes.sort((e,t)=>e.title.localeCompare(t.title))}getItemText(e){return e.title}renderSuggestion(e,t){let r=e.item,a=t.createDiv({cls:"note-selector-modal__suggestion"});a.createDiv({cls:"note-selector-modal__title",text:r.title});let i=r.kind==="external"&&r.sourceName||r.path;i!==r.title&&a.createDiv({cls:"note-selector-modal__path",text:i})}onChooseItem(e,t){this.onChooseNote(e)}}});function wJe(n,e=b3){var t,r;try{let a=n.internalPlugins;if(!a)return e.debug("Internal plugins manager not available",{category:"configuration",operation:"get-api"}),null;let i=(t=a.getEnabledPluginById)==null?void 0:t.call(a,"bases");return i?!i.registrations||typeof i.registrations!="object"?(e.warn("Bases plugin found but registrations API is not available",{category:"provider",operation:"get-api"}),null):{registrations:i.registrations,isEnabled:!0,version:((r=i.manifest)==null?void 0:r.version)||"unknown"}:(e.debug("Bases plugin not found or not enabled",{category:"configuration",operation:"get-api"}),null)}catch(a){return e.warn("Error accessing Bases plugin API",{category:"provider",operation:"get-api",error:a}),null}}function sD(n,e,t,r=b3){if(typeof n.registerBasesView=="function")try{return n.registerBasesView(e,t)?(r.debug("Successfully registered view via public API",{category:"configuration",operation:"register-view",details:{viewId:e}}),!0):(r.debug("Public API returned false",{category:"configuration",operation:"register-view",details:{viewId:e}}),!1)}catch(a){return a instanceof Error&&a.message.includes("already exists")?(r.debug("View already registered via public API",{category:"configuration",operation:"register-view",details:{viewId:e}}),!0):(r.warn("Public API registration failed",{category:"provider",operation:"register-view",details:{viewId:e},error:a}),!1)}return r.warn("Cannot register view because Bases public API is not available",{category:"configuration",operation:"register-view",details:{viewId:e}}),!1}function oD(n,e,t=b3){let r=wJe(n.app,t);if(!r)return!0;try{return r.registrations[e]&&delete r.registrations[e],!0}catch(a){return t.error("Error unregistering view",{category:"provider",operation:"unregister-view",details:{viewId:e},error:a}),!1}}var b3,YEe=y(()=>{q();b3=M({tag:"Bases/API"})});function lD(n){return n.startsWith("note.")||n.startsWith("file.")||n.startsWith("formula.")}var KEe=y(()=>{});function ZEe(n){return e=>n.i18n.translate(`views.basesCalendar.settings.${e}`)}function QEe(n,e,t){let r=n.get(e);return r==null?t:r}function CJe(n,e,t){let r=QEe(n,e,t);return typeof r=="string"?r:t}function cD(n,e,t){let r=QEe(n,e,t);return typeof r=="boolean"?r:t}function xJe(n,e){let t=n.get(e);return t==null?!1:typeof t=="string"?t.trim().length>0:!0}function dT(n,e){return CJe(n,"calendarView",e)}function w3(n){return n==="timeGridWeek"||n==="timeGridCustom"||n==="timeGridDay"}function JEe(n){return n==="dayGridMonth"||n==="multiMonthYear"}function EJe(n){return n==="timeGridWeek"||n==="timeGridCustom"}function FF(n,e,t){return t(dT(n,e))}function DJe(n){return{0:n.i18n.translate("common.weekdays.sunday"),1:n.i18n.translate("common.weekdays.monday"),2:n.i18n.translate("common.weekdays.tuesday"),3:n.i18n.translate("common.weekdays.wednesday"),4:n.i18n.translate("common.weekdays.thursday"),5:n.i18n.translate("common.weekdays.friday"),6:n.i18n.translate("common.weekdays.saturday")}}function XEe(n,e){var s,o,l,c,d,u;let t=[],r=(o=(s=n.icsSubscriptionService)==null?void 0:s.getSubscriptions())!=null?o:[];r.length>0&&t.push({type:"group",displayName:e("groups.calendarSubscriptions"),items:r.map(p=>({type:"toggle",key:`showICS_${p.id}`,displayName:p.name,default:!0}))});let a=(c=(l=n.googleCalendarService)==null?void 0:l.getAvailableCalendars())!=null?c:[];a.length>0&&t.push({type:"group",displayName:e("groups.googleCalendars")||"Google Calendars",items:a.map(p=>({type:"toggle",key:`showGoogleCalendar_${p.id}`,displayName:p.summary||p.id,default:!0}))});let i=(u=(d=n.microsoftCalendarService)==null?void 0:d.getAvailableCalendars())!=null?u:[];return i.length>0&&t.push({type:"group",displayName:e("groups.microsoftCalendars")||"Microsoft Calendars",items:i.map(p=>({type:"toggle",key:`showMicrosoftCalendar_${p.id}`,displayName:p.summary||p.id,default:!0}))}),t}function PJe(n,e,t){let r=n.settings.calendarViewSettings;return{type:"group",displayName:t("groups.events"),items:[{type:"toggle",key:"showScheduled",displayName:t("events.showScheduledTasks"),default:r.defaultShowScheduled},{type:"toggle",key:"showDue",displayName:t("events.showDueTasks"),default:r.defaultShowDue},{type:"toggle",key:"showOverdueOnToday",displayName:t("events.showOverdueOnToday"),default:!1,shouldHide:()=>dT(e,r.defaultView)!=="listWeek"},{type:"toggle",key:"showScheduledToDueSpan",displayName:t("layout.spanScheduledToDue"),default:r.defaultShowScheduledToDueSpan,shouldHide:()=>!cD(e,"showScheduled",r.defaultShowScheduled)||!cD(e,"showDue",r.defaultShowDue)},{type:"toggle",key:"showRecurring",displayName:t("events.showRecurringTasks"),default:r.defaultShowRecurring},{type:"toggle",key:"showCompletedRecurringInstances",displayName:t("events.showCompletedRecurringInstances"),default:!0,shouldHide:()=>!cD(e,"showRecurring",r.defaultShowRecurring)},{type:"toggle",key:"showSkippedRecurringInstances",displayName:t("events.showSkippedRecurringInstances"),default:!0,shouldHide:()=>!cD(e,"showRecurring",r.defaultShowRecurring)},{type:"toggle",key:"showTimeEntries",displayName:t("events.showTimeEntries"),default:r.defaultShowTimeEntries},{type:"toggle",key:"showTimeblocks",displayName:t("events.showTimeblocks"),default:r.defaultShowTimeblocks},{type:"toggle",key:"showPropertyBasedEvents",displayName:t("events.showPropertyBasedEvents"),default:!0}]}}function AJe(n,e){return{type:"group",displayName:e("groups.dateNavigation"),items:[{type:"text",key:"initialDate",displayName:e("dateNavigation.navigateToDate"),default:"",placeholder:e("dateNavigation.navigateToDatePlaceholder")},{type:"property",key:"initialDateProperty",displayName:e("dateNavigation.navigateToDateFromProperty"),placeholder:e("dateNavigation.navigateToDateFromPropertyPlaceholder"),filter:t=>t.startsWith("note.")||t.startsWith("file.")},{type:"dropdown",key:"initialDateStrategy",displayName:e("dateNavigation.propertyNavigationStrategy"),default:"first",options:{first:e("dateNavigation.strategies.first"),earliest:e("dateNavigation.strategies.earliest"),latest:e("dateNavigation.strategies.latest")},shouldHide:()=>!xJe(n,"initialDateProperty")},{type:"toggle",key:"createDailyNotesFromDateLinks",displayName:e("dateNavigation.createDailyNotesFromDateLinks"),default:!0}]}}function MJe(n,e,t){let r=n.settings.calendarViewSettings,a=r.defaultView;return{type:"group",displayName:t("groups.view"),items:[{type:"dropdown",key:"calendarView",displayName:t("layout.calendarView"),default:a,options:SJe},{type:"slider",key:"customDayCount",displayName:t("layout.customDayCount"),default:r.customDayCount||3,min:1,max:14,step:1,shouldHide:()=>dT(e,a)!=="timeGridCustom"},{type:"slider",key:"listDayCount",displayName:t("layout.listDayCount"),default:7,min:1,max:365,step:1,shouldHide:()=>dT(e,a)!=="listWeek"},{type:"dropdown",key:"heightMode",displayName:t("layout.heightMode"),default:"fill",options:{fill:t("layout.heightModeFill"),auto:t("layout.heightModeAuto")}}]}}function IJe(n,e,t){let r=n.settings.calendarViewSettings,a=r.defaultView;return{type:"group",displayName:t("groups.display"),items:[{type:"dropdown",key:"firstDay",displayName:t("layout.weekStartsOn"),default:String(r.firstDay),options:DJe(n)},{type:"dropdown",key:"timeFormat",displayName:t("layout.timeFormat"),default:r.timeFormat,options:{12:t("layout.timeFormat12"),24:t("layout.timeFormat24")}},{type:"toggle",key:"weekNumbers",displayName:t("layout.showWeekNumbers"),default:r.weekNumbers,shouldHide:()=>dT(e,a)==="listWeek"},{type:"toggle",key:"showWeekends",displayName:t("layout.showWeekends"),default:r.showWeekends},{type:"toggle",key:"showAllDaySlot",displayName:t("layout.showAllDaySlot"),default:!0},{type:"toggle",key:"showTodayHighlight",displayName:t("layout.showTodayHighlight"),default:r.showTodayHighlight},{type:"slider",key:"todayColumnWidthMultiplier",displayName:t("layout.todayColumnWidthMultiplier"),default:1,min:1,max:5,step:.5,shouldHide:()=>!FF(e,a,i=>EJe(i))},{type:"toggle",key:"enableSearch",displayName:t("layout.enableSearch"),default:!1}]}}function NJe(n,e){let t=n.settings.calendarViewSettings;return[{type:"text",key:"slotMinTime",displayName:e("layout.dayStartTime"),default:t.slotMinTime,placeholder:e("layout.dayStartTimePlaceholder")},{type:"text",key:"slotMaxTime",displayName:e("layout.dayEndTime"),default:t.slotMaxTime,placeholder:e("layout.dayEndTimePlaceholder")},{type:"text",key:"slotDuration",displayName:e("layout.timeSlotDuration"),default:t.slotDuration,placeholder:e("layout.timeSlotDurationPlaceholder")},{type:"text",key:"snapDuration",displayName:e("layout.dragDropResolution"),default:t.slotDuration,placeholder:e("layout.dragDropResolutionPlaceholder")},{type:"text",key:"scrollTime",displayName:e("layout.initialScrollTime"),default:t.scrollTime,placeholder:e("layout.initialScrollTimePlaceholder")},{type:"toggle",key:"nowIndicator",displayName:e("layout.showNowIndicator"),default:t.nowIndicator},{type:"toggle",key:"showTimeGrid",displayName:e("layout.showTimeGrid"),default:!0},{type:"toggle",key:"selectMirror",displayName:e("layout.showSelectionPreview"),default:t.selectMirror}]}function RJe(n,e,t){var o;let r=n.settings.calendarViewSettings,a=r.defaultView,i=()=>!FF(e,a,l=>w3(l)),s=()=>!FF(e,a,l=>JEe(l));return[{type:"toggle",key:"slotEventOverlap",displayName:t("layout.slotEventOverlap"),default:r.slotEventOverlap,shouldHide:i},{type:"slider",key:"eventMinHeight",displayName:t("layout.minimumEventHeight"),default:r.eventMinHeight,min:15,max:100,step:5,shouldHide:i},{type:"slider",key:"eventMaxStack",displayName:t("layout.eventMaxStack"),default:(o=r.eventMaxStack)!=null?o:0,min:0,max:10,step:1,shouldHide:i},{type:"slider",key:"dayMaxEvents",displayName:t("layout.dayMaxEvents"),default:typeof r.dayMaxEvents=="number"?r.dayMaxEvents:0,min:0,max:20,step:1,shouldHide:s},{type:"slider",key:"dayMaxEventRows",displayName:t("layout.dayMaxEventRows"),default:typeof r.dayMaxEventRows=="number"?r.dayMaxEventRows:0,min:0,max:10,step:1,shouldHide:s}]}function _Je(n,e){return{type:"group",displayName:e("groups.propertyBasedEvents"),shouldHide:()=>!cD(n,"showPropertyBasedEvents",!0),items:[{type:"property",key:"startDateProperty",displayName:e("propertyBasedEvents.startDateProperty"),placeholder:e("propertyBasedEvents.startDatePropertyPlaceholder"),filter:t=>lD(t)},{type:"property",key:"endDateProperty",displayName:e("propertyBasedEvents.endDateProperty"),placeholder:e("propertyBasedEvents.endDatePropertyPlaceholder"),filter:t=>lD(t)},{type:"property",key:"titleProperty",displayName:e("propertyBasedEvents.titleProperty"),placeholder:e("propertyBasedEvents.titlePropertyPlaceholder"),filter:t=>lD(t)}]}}function eDe(n,e){let t=ZEe(n),r=n.settings.calendarViewSettings.defaultView;return[PJe(n,e,t),AJe(e,t),MJe(n,e,t),IJe(n,e,t),{type:"group",displayName:t("groups.timeGrid"),shouldHide:()=>!FF(e,r,a=>w3(a)),items:NJe(n,t)},{type:"group",displayName:t("groups.eventLayout"),shouldHide:()=>{let a=dT(e,r);return!w3(a)&&!JEe(a)},items:RJe(n,e,t)},_Je(e,t),...XEe(n,t)]}function tDe(n){let e=ZEe(n),t=[{type:"property",key:"dateProperty",displayName:"Date Property",placeholder:"Select property to show on calendar",default:"file.ctime",filter:r=>r.startsWith("note.")||r.startsWith("file.")||r.startsWith("task.")},{type:"property",key:"titleProperty",displayName:"Title Property",placeholder:"Select property to use as title",default:"file.name",filter:r=>lD(r)},{type:"slider",key:"heatMapMaxCount",displayName:"Max color note count",default:lg,min:1,max:20,step:1}];return t.push(...XEe(n,e)),t}var SJe,rDe=y(()=>{T3();KEe();SJe={dayGridMonth:"Month",timeGridWeek:"Week",timeGridCustom:"Custom days",timeGridDay:"Day",listWeek:"List",multiMonthYear:"Year"}});var iDe={};Xe(iDe,{registerBasesTaskList:()=>OJe,unregisterBasesViews:()=>S3});async function OJe(n){if(!n.settings.enableBases||!(0,aDe.requireApiVersion)("1.10.1"))return!1;let e=M({tag:"Bases/Registration",isDebugEnabled:()=>n.settings.enableDebugLogging});return(async()=>{try{let r=sD(n,"tasknotesTaskList",{name:"TaskNotes Task List",icon:"tasknotes-simple",factory:dCe(n),options:()=>[{type:"property",key:"subGroup",displayName:"Sub-group by",placeholder:"Select property for sub-grouping (optional)",filter:o=>o.startsWith("note.")||o.startsWith("task.")||o.startsWith("formula.")},{type:"toggle",key:"enableSearch",displayName:"Enable search box",default:!1},{type:"dropdown",key:"defaultCollapsedState",displayName:"Default collapsed state",default:"Expanded",options:LJe},{type:"dropdown",key:"expandedRelationshipFilterMode",displayName:"Expanded relationships",default:"inherit",options:nDe},{type:"toggle",key:"hideTopLevelSubtasks",displayName:"Hide top-level subtasks",default:!1}]},e),a=sD(n,"tasknotesKanban",{name:"TaskNotes Kanban",icon:"tasknotes-simple",factory:ZCe(n),options:()=>[{type:"property",key:"swimLane",displayName:"Swim Lane",placeholder:"Select property for swim lanes (optional)",filter:o=>o.startsWith("note.")||o.startsWith("task.")||o.startsWith("formula.")},{type:"slider",key:"columnWidth",displayName:"Column Width",default:280,min:200,max:500,step:20},{type:"slider",key:"maxSwimlaneHeight",displayName:"Max Swimlane Height",default:600,min:300,max:1200,step:50},{type:"toggle",key:"hideEmptyColumns",displayName:"Hide Empty Columns",default:!1},{type:"text",key:"pinnedColumns",displayName:"Pinned Columns",placeholder:"Comma-separated column values to keep visible",default:""},{type:"toggle",key:"hideEmptySwimLanes",displayName:"Hide Empty Swimlanes",default:!1},{type:"toggle",key:"enableSearch",displayName:"Enable search box",default:!1},{type:"toggle",key:"explodeListColumns",displayName:"Show items in multiple columns",default:!0},{type:"toggle",key:"consolidateStatusIcon",displayName:"Show status icon in column header only",default:!1},{type:"dropdown",key:"cardLayout",displayName:"Card layout",default:"default",options:FJe},{type:"text",key:"columnOrder",displayName:"Column Order (Advanced)",placeholder:"Auto-managed when dragging columns",default:"{}"},{type:"text",key:"swimLaneOrder",displayName:"Swim Lane Order (Advanced)",placeholder:"JSON object keyed by swim lane property",default:"{}"},{type:"dropdown",key:"expandedRelationshipFilterMode",displayName:"Expanded relationships",default:"inherit",options:nDe},{type:"toggle",key:"hideTopLevelSubtasks",displayName:"Hide top-level subtasks",default:!1}]},e),i=sD(n,"tasknotesCalendar",{name:"TaskNotes Calendar",icon:"tasknotes-simple",factory:HEe(n),options:o=>eDe(n,o)},e),s=sD(n,"tasknotesMiniCalendar",{name:"TaskNotes Mini Calendar",icon:"tasknotes-simple",factory:GEe(n),options:()=>tDe(n)},e);return!r&&!a&&!i&&!s?(e.debug("Bases plugin not available for registration",{category:"configuration",operation:"register-views"}),!1):!r||!a||!i||!s?(e.warn("Some TaskNotes Bases views failed to register",{category:"configuration",operation:"register-views",details:{taskListSuccess:r,kanbanSuccess:a,calendarSuccess:i,miniCalendarSuccess:s}}),!1):(n.app.workspace.iterateAllLeaves(o=>{var l,c;if(((c=(l=o.view)==null?void 0:l.getViewType)==null?void 0:c.call(l))==="bases"){let d=o.view;if(typeof d.refresh=="function")try{d.refresh()}catch(u){e.debug("Error refreshing Bases view after registration",{category:"provider",operation:"refresh-existing-view",error:u})}}}),!0)}catch(r){return e.warn("Registration attempt failed",{category:"provider",operation:"register-views",error:r}),!1}})()}function S3(n){let e=M({tag:"Bases/Registration",isDebugEnabled:()=>n.settings.enableDebugLogging});try{oD(n,"tasknotesTaskList",e),oD(n,"tasknotesKanban",e),oD(n,"tasknotesCalendar",e),oD(n,"tasknotesMiniCalendar",e)}catch(t){e.error("Error during view unregistration",{category:"provider",operation:"unregister-views",error:t})}}var aDe,FJe,LJe,nDe,C3=y(()=>{aDe=require("obsidian");uCe();QCe();VEe();T3();YEe();rDe();q();FJe={default:"Default",compact:"Compact"},LJe={Expanded:"Expanded",Collapsed:"Collapsed"},nDe={inherit:"Inherit","show-all":"Show all"}});var oDe=te(()=>{var sDe;(function(n){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:o(),r=a(n);typeof t.Reflect!="undefined"&&(r=a(t.Reflect,r)),e(r,t),typeof t.Reflect=="undefined"&&(t.Reflect=n);function a(l,c){return function(d,u){Object.defineProperty(l,d,{configurable:!0,writable:!0,value:u}),c&&c(d,u)}}function i(){try{return Function("return this;")()}catch(l){}}function s(){try{return(0,eval)("(function() { return this; })()")}catch(l){}}function o(){return i()||s()}})(function(e,t){var r=Object.prototype.hasOwnProperty,a=typeof Symbol=="function",i=a&&typeof Symbol.toPrimitive!="undefined"?Symbol.toPrimitive:"@@toPrimitive",s=a&&typeof Symbol.iterator!="undefined"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",l={__proto__:[]}instanceof Array,c=!o&&!l,d={create:o?function(){return h1(Object.create(null))}:l?function(){return h1({__proto__:null})}:function(){return h1({})},has:c?function(L,$){return r.call(L,$)}:function(L,$){return $ in L},get:c?function(L,$){return r.call(L,$)?L[$]:void 0}:function(L,$){return L[$]}},u=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:mFe(),m=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:fFe(),f=typeof WeakMap=="function"?WeakMap:hFe(),h=a?Symbol.for("@reflect-metadata:registry"):void 0,g=dFe(),v=uFe(g);function k(L,$,G,se){if(Q(G)){if(!cs(L))throw new TypeError;if(!Ce($))throw new TypeError;return I(L,$)}else{if(!cs(L))throw new TypeError;if(!le($))throw new TypeError;if(!le(se)&&!Q(se)&&!Z(se))throw new TypeError;return Z(se)&&(se=void 0),G=Dr(G),A(L,$,G,se)}}e("decorate",k);function T(L,$){function G(se,$e){if(!le(se))throw new TypeError;if(!Q($e)&&!en($e))throw new TypeError;oe(L,$,se,$e)}return G}e("metadata",T);function b(L,$,G,se){if(!le(G))throw new TypeError;return Q(se)||(se=Dr(se)),oe(L,$,G,se)}e("defineMetadata",b);function w(L,$,G){if(!le($))throw new TypeError;return Q(G)||(G=Dr(G)),R(L,$,G)}e("hasMetadata",w);function S(L,$,G){if(!le($))throw new TypeError;return Q(G)||(G=Dr(G)),O(L,$,G)}e("hasOwnMetadata",S);function C(L,$,G){if(!le($))throw new TypeError;return Q(G)||(G=Dr(G)),U(L,$,G)}e("getMetadata",C);function x(L,$,G){if(!le($))throw new TypeError;return Q(G)||(G=Dr(G)),pe(L,$,G)}e("getOwnMetadata",x);function E(L,$){if(!le(L))throw new TypeError;return Q($)||($=Dr($)),X(L,$)}e("getMetadataKeys",E);function _(L,$){if(!le(L))throw new TypeError;return Q($)||($=Dr($)),de(L,$)}e("getOwnMetadataKeys",_);function F(L,$,G){if(!le($))throw new TypeError;if(Q(G)||(G=Dr(G)),!le($))throw new TypeError;Q(G)||(G=Dr(G));var se=ab($,G,!1);return Q(se)?!1:se.OrdinaryDeleteMetadata(L,$,G)}e("deleteMetadata",F);function I(L,$){for(var G=L.length-1;G>=0;--G){var se=L[G],$e=se($);if(!Q($e)&&!Z($e)){if(!Ce($e))throw new TypeError;$=$e}}return $}function A(L,$,G,se){for(var $e=L.length-1;$e>=0;--$e){var vn=L[$e],$n=vn($,G,se);if(!Q($n)&&!Z($n)){if(!le($n))throw new TypeError;se=$n}}return se}function R(L,$,G){var se=O(L,$,G);if(se)return!0;var $e=f1($);return Z($e)?!1:R(L,$e,G)}function O(L,$,G){var se=ab($,G,!1);return Q(se)?!1:qr(se.OrdinaryHasOwnMetadata(L,$,G))}function U(L,$,G){var se=O(L,$,G);if(se)return pe(L,$,G);var $e=f1($);if(!Z($e))return U(L,$e,G)}function pe(L,$,G){var se=ab($,G,!1);if(!Q(se))return se.OrdinaryGetOwnMetadata(L,$,G)}function oe(L,$,G,se){var $e=ab(G,se,!0);$e.OrdinaryDefineOwnMetadata(L,$,G,se)}function X(L,$){var G=de(L,$),se=f1(L);if(se===null)return G;var $e=X(se,$);if($e.length<=0)return G;if(G.length<=0)return $e;for(var vn=new m,$n=[],Ct=0,he=G;Ct<he.length;Ct++){var Se=he[Ct],Ee=vn.has(Se);Ee||(vn.add(Se),$n.push(Se))}for(var Re=0,Mt=$e;Re<Mt.length;Re++){var Se=Mt[Re],Ee=vn.has(Se);Ee||(vn.add(Se),$n.push(Se))}return $n}function de(L,$){var G=ab(L,$,!1);return G?G.OrdinaryOwnMetadataKeys(L,$):[]}function Oe(L){if(L===null)return 1;switch(typeof L){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return L===null?1:6;default:return 6}}function Q(L){return L===void 0}function Z(L){return L===null}function Ue(L){return typeof L=="symbol"}function le(L){return typeof L=="object"?L!==null:typeof L=="function"}function at(L,$){switch(Oe(L)){case 0:return L;case 1:return L;case 2:return L;case 3:return L;case 4:return L;case 5:return L}var G=$===3?"string":$===5?"number":"default",se=tK(L,i);if(se!==void 0){var $e=se.call(L,G);if(le($e))throw new TypeError;return $e}return He(L,G==="default"?"number":G)}function He(L,$){if($==="string"){var G=L.toString;if(ne(G)){var se=G.call(L);if(!le(se))return se}var $e=L.valueOf;if(ne($e)){var se=$e.call(L);if(!le(se))return se}}else{var $e=L.valueOf;if(ne($e)){var se=$e.call(L);if(!le(se))return se}var vn=L.toString;if(ne(vn)){var se=vn.call(L);if(!le(se))return se}}throw new TypeError}function qr(L){return!!L}function jn(L){return""+L}function Dr(L){var $=at(L,3);return Ue($)?$:jn($)}function cs(L){return Array.isArray?Array.isArray(L):L instanceof Object?L instanceof Array:Object.prototype.toString.call(L)==="[object Array]"}function ne(L){return typeof L=="function"}function Ce(L){return typeof L=="function"}function en(L){switch(Oe(L)){case 3:return!0;case 4:return!0;default:return!1}}function Qm(L,$){return L===$||L!==L&&$!==$}function tK(L,$){var G=L[$];if(G!=null){if(!ne(G))throw new TypeError;return G}}function rK(L){var $=tK(L,s);if(!ne($))throw new TypeError;var G=$.call(L);if(!le(G))throw new TypeError;return G}function nK(L){return L.value}function aK(L){var $=L.next();return $.done?!1:$}function iK(L){var $=L.return;$&&$.call(L)}function f1(L){var $=Object.getPrototypeOf(L);if(typeof L!="function"||L===u||$!==u)return $;var G=L.prototype,se=G&&Object.getPrototypeOf(G);if(se==null||se===Object.prototype)return $;var $e=se.constructor;return typeof $e!="function"||$e===L?$:$e}function cFe(){var L;!Q(h)&&typeof t.Reflect!="undefined"&&!(h in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(L=pFe(t.Reflect));var $,G,se,$e=new f,vn={registerProvider:$n,getProvider:he,setProvider:Ee};return vn;function $n(Re){if(!Object.isExtensible(vn))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case L===Re:break;case Q($):$=Re;break;case $===Re:break;case Q(G):G=Re;break;case G===Re:break;default:se===void 0&&(se=new m),se.add(Re);break}}function Ct(Re,Mt){if(!Q($)){if($.isProviderFor(Re,Mt))return $;if(!Q(G)){if(G.isProviderFor(Re,Mt))return $;if(!Q(se))for(var Or=rK(se);;){var kn=aK(Or);if(!kn)return;var Uo=nK(kn);if(Uo.isProviderFor(Re,Mt))return iK(Or),Uo}}}if(!Q(L)&&L.isProviderFor(Re,Mt))return L}function he(Re,Mt){var Or=$e.get(Re),kn;return Q(Or)||(kn=Or.get(Mt)),Q(kn)&&(kn=Ct(Re,Mt),Q(kn)||(Q(Or)&&(Or=new p,$e.set(Re,Or)),Or.set(Mt,kn))),kn}function Se(Re){if(Q(Re))throw new TypeError;return $===Re||G===Re||!Q(se)&&se.has(Re)}function Ee(Re,Mt,Or){if(!Se(Or))throw new Error("Metadata provider not registered.");var kn=he(Re,Mt);if(kn!==Or){if(!Q(kn))return!1;var Uo=$e.get(Re);Q(Uo)&&(Uo=new p,$e.set(Re,Uo)),Uo.set(Mt,Or)}return!0}}function dFe(){var L;return!Q(h)&&le(t.Reflect)&&Object.isExtensible(t.Reflect)&&(L=t.Reflect[h]),Q(L)&&(L=cFe()),!Q(h)&&le(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,h,{enumerable:!1,configurable:!1,writable:!1,value:L}),L}function uFe(L){var $=new f,G={isProviderFor:function(Se,Ee){var Re=$.get(Se);return Q(Re)?!1:Re.has(Ee)},OrdinaryDefineOwnMetadata:$n,OrdinaryHasOwnMetadata:$e,OrdinaryGetOwnMetadata:vn,OrdinaryOwnMetadataKeys:Ct,OrdinaryDeleteMetadata:he};return g.registerProvider(G),G;function se(Se,Ee,Re){var Mt=$.get(Se),Or=!1;if(Q(Mt)){if(!Re)return;Mt=new p,$.set(Se,Mt),Or=!0}var kn=Mt.get(Ee);if(Q(kn)){if(!Re)return;if(kn=new p,Mt.set(Ee,kn),!L.setProvider(Se,Ee,G))throw Mt.delete(Ee),Or&&$.delete(Se),new Error("Wrong provider for target.")}return kn}function $e(Se,Ee,Re){var Mt=se(Ee,Re,!1);return Q(Mt)?!1:qr(Mt.has(Se))}function vn(Se,Ee,Re){var Mt=se(Ee,Re,!1);if(!Q(Mt))return Mt.get(Se)}function $n(Se,Ee,Re,Mt){var Or=se(Re,Mt,!0);Or.set(Se,Ee)}function Ct(Se,Ee){var Re=[],Mt=se(Se,Ee,!1);if(Q(Mt))return Re;for(var Or=Mt.keys(),kn=rK(Or),Uo=0;;){var sK=aK(kn);if(!sK)return Re.length=Uo,Re;var gFe=nK(sK);try{Re[Uo]=gFe}catch(yFe){try{iK(kn)}finally{throw yFe}}Uo++}}function he(Se,Ee,Re){var Mt=se(Ee,Re,!1);if(Q(Mt)||!Mt.delete(Se))return!1;if(Mt.size===0){var Or=$.get(Ee);Q(Or)||(Or.delete(Re),Or.size===0&&$.delete(Or))}return!0}}function pFe(L){var $=L.defineMetadata,G=L.hasOwnMetadata,se=L.getOwnMetadata,$e=L.getOwnMetadataKeys,vn=L.deleteMetadata,$n=new f,Ct={isProviderFor:function(he,Se){var Ee=$n.get(he);return!Q(Ee)&&Ee.has(Se)?!0:$e(he,Se).length?(Q(Ee)&&(Ee=new m,$n.set(he,Ee)),Ee.add(Se),!0):!1},OrdinaryDefineOwnMetadata:$,OrdinaryHasOwnMetadata:G,OrdinaryGetOwnMetadata:se,OrdinaryOwnMetadataKeys:$e,OrdinaryDeleteMetadata:vn};return Ct}function ab(L,$,G){var se=g.getProvider(L,$);if(!Q(se))return se;if(G){if(g.setProvider(L,$,v))return v;throw new Error("Illegal state.")}}function mFe(){var L={},$=[],G=(function(){function Ct(he,Se,Ee){this._index=0,this._keys=he,this._values=Se,this._selector=Ee}return Ct.prototype["@@iterator"]=function(){return this},Ct.prototype[s]=function(){return this},Ct.prototype.next=function(){var he=this._index;if(he>=0&&he<this._keys.length){var Se=this._selector(this._keys[he],this._values[he]);return he+1>=this._keys.length?(this._index=-1,this._keys=$,this._values=$):this._index++,{value:Se,done:!1}}return{value:void 0,done:!0}},Ct.prototype.throw=function(he){throw this._index>=0&&(this._index=-1,this._keys=$,this._values=$),he},Ct.prototype.return=function(he){return this._index>=0&&(this._index=-1,this._keys=$,this._values=$),{value:he,done:!0}},Ct})(),se=(function(){function Ct(){this._keys=[],this._values=[],this._cacheKey=L,this._cacheIndex=-2}return Object.defineProperty(Ct.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Ct.prototype.has=function(he){return this._find(he,!1)>=0},Ct.prototype.get=function(he){var Se=this._find(he,!1);return Se>=0?this._values[Se]:void 0},Ct.prototype.set=function(he,Se){var Ee=this._find(he,!0);return this._values[Ee]=Se,this},Ct.prototype.delete=function(he){var Se=this._find(he,!1);if(Se>=0){for(var Ee=this._keys.length,Re=Se+1;Re<Ee;Re++)this._keys[Re-1]=this._keys[Re],this._values[Re-1]=this._values[Re];return this._keys.length--,this._values.length--,Qm(he,this._cacheKey)&&(this._cacheKey=L,this._cacheIndex=-2),!0}return!1},Ct.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=L,this._cacheIndex=-2},Ct.prototype.keys=function(){return new G(this._keys,this._values,$e)},Ct.prototype.values=function(){return new G(this._keys,this._values,vn)},Ct.prototype.entries=function(){return new G(this._keys,this._values,$n)},Ct.prototype["@@iterator"]=function(){return this.entries()},Ct.prototype[s]=function(){return this.entries()},Ct.prototype._find=function(he,Se){if(!Qm(this._cacheKey,he)){this._cacheIndex=-1;for(var Ee=0;Ee<this._keys.length;Ee++)if(Qm(this._keys[Ee],he)){this._cacheIndex=Ee;break}}return this._cacheIndex<0&&Se&&(this._cacheIndex=this._keys.length,this._keys.push(he),this._values.push(void 0)),this._cacheIndex},Ct})();return se;function $e(Ct,he){return Ct}function vn(Ct,he){return he}function $n(Ct,he){return[Ct,he]}}function fFe(){var L=(function(){function $(){this._map=new p}return Object.defineProperty($.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),$.prototype.has=function(G){return this._map.has(G)},$.prototype.add=function(G){return this._map.set(G,G),this},$.prototype.delete=function(G){return this._map.delete(G)},$.prototype.clear=function(){this._map.clear()},$.prototype.keys=function(){return this._map.keys()},$.prototype.values=function(){return this._map.keys()},$.prototype.entries=function(){return this._map.entries()},$.prototype["@@iterator"]=function(){return this.keys()},$.prototype[s]=function(){return this.keys()},$})();return L}function hFe(){var L=16,$=d.create(),G=se();return(function(){function he(){this._key=se()}return he.prototype.has=function(Se){var Ee=$e(Se,!1);return Ee!==void 0?d.has(Ee,this._key):!1},he.prototype.get=function(Se){var Ee=$e(Se,!1);return Ee!==void 0?d.get(Ee,this._key):void 0},he.prototype.set=function(Se,Ee){var Re=$e(Se,!0);return Re[this._key]=Ee,this},he.prototype.delete=function(Se){var Ee=$e(Se,!1);return Ee!==void 0?delete Ee[this._key]:!1},he.prototype.clear=function(){this._key=se()},he})();function se(){var he;do he="@@WeakMap@@"+Ct();while(d.has($,he));return $[he]=!0,he}function $e(he,Se){if(!r.call(he,G)){if(!Se)return;Object.defineProperty(he,G,{value:d.create()})}return he[G]}function vn(he,Se){for(var Ee=0;Ee<Se;++Ee)he[Ee]=Math.random()*255|0;return he}function $n(he){if(typeof Uint8Array=="function"){var Se=new Uint8Array(he);return typeof crypto!="undefined"?crypto.getRandomValues(Se):typeof msCrypto!="undefined"?msCrypto.getRandomValues(Se):vn(Se,he),Se}return vn(new Array(he),he)}function Ct(){var he=$n(L);he[6]=he[6]&79|64,he[8]=he[8]&191|128;for(var Se="",Ee=0;Ee<L;++Ee){var Re=he[Ee];(Ee===4||Ee===6||Ee===8)&&(Se+="-"),Re<16&&(Se+="0"),Se+=Re.toString(16).toLowerCase()}return Se}}function h1(L){return L.__=void 0,delete L.__,L}})})(sDe||(sDe={}))});function cDe(n){Reflect.hasMetadata(dD,n)||Reflect.defineMetadata(dD,[],n)}function LF(n,e){return function(t,r,a){Reflect.defineMetadata(lDe,{method:n.toLowerCase(),path:e,handler:r},t,r);let i=Reflect.getMetadata("routes",t.constructor)||[];i.push({method:n.toLowerCase(),path:e,handler:r}),Reflect.defineMetadata("routes",i,t.constructor)}}function Rr(n){return LF("GET",n)}function ln(n){return LF("POST",n)}function dDe(n){return LF("PUT",n)}function OF(n){return LF("DELETE",n)}function zF(n){return function(e,t,r){Reflect.defineMetadata(BJe,n,e,t);let a=Reflect.getMetadata(dD,e.constructor)||[],i=Reflect.getMetadata(lDe,e,t),{path:s,method:o}=i||jJe(t);a.push({path:s,method:o,operation:n}),Reflect.defineMetadata(dD,a,e.constructor)}}function jJe(n){return zJe.warn(`extractPathAndMethod is deprecated. Use @Route decorators on method: ${n}`,{category:"provider",operation:"extractpathandmethod-deprecated-use-route-decorators-on-method"}),{path:"/api/unknown",method:"get"}}function uD(n){let e=Reflect.getMetadata(dD,n.constructor)||[],t=x3(n.constructor)||[],r={openapi:"3.0.0",info:{title:"TaskNotes API",version:"1.0.0",description:"RESTful API for managing tasks, time tracking, and automation in TaskNotes",contact:{name:"TaskNotes",url:"https://github.com/your-repo/tasknotes"}},servers:[{url:"http://localhost:8080",description:"Local development server"}],security:[{bearerAuth:[]}],paths:{},components:{securitySchemes:{bearerAuth:{type:"http",scheme:"bearer",bearerFormat:"JWT",description:"Optional bearer token for API authentication"}},schemas:$Je()}};for(let a of e)r.paths[a.path]||(r.paths[a.path]={}),r.paths[a.path][a.method.toLowerCase()]=a.operation;for(let a of t)r.paths[a.path]||(r.paths[a.path]={}),r.paths[a.path][a.method.toLowerCase()]||(r.paths[a.path][a.method.toLowerCase()]={summary:`${a.method.toUpperCase()} ${a.path}`,description:`${a.method.toUpperCase()} endpoint for ${a.path}`,responses:{200:{description:"Success",content:{"application/json":{schema:{$ref:"#/components/schemas/APIResponse"}}}},400:{description:"Bad Request",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}},500:{description:"Internal Server Error",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}}}});return r}function $Je(){return{APIResponse:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was successful"},data:{description:"Response data (varies by endpoint)"},error:{type:"string",description:"Error message (present when success is false)"},message:{type:"string",description:"Optional success message"}},required:["success"]},Task:{type:"object",properties:{id:{type:"string",description:"Unique task identifier (file path)"},title:{type:"string",description:"Task title",maxLength:200},status:{type:"string",description:"Current task status",enum:["todo","open","completed","in-progress","cancelled"]},priority:{type:"string",description:"Task priority level",enum:["low","normal","medium","high","urgent"]},due:{type:"string",format:"date-time",description:"Due date and time (ISO 8601 format)",nullable:!0},scheduled:{type:"string",format:"date-time",description:"Scheduled date and time (ISO 8601 format)",nullable:!0},path:{type:"string",description:"File path of the task"},archived:{type:"boolean",description:"Whether the task is archived"},tags:{type:"array",items:{type:"string"},description:"Task tags"},contexts:{type:"array",items:{type:"string"},description:"Task contexts (GTD-style)"},projects:{type:"array",items:{type:"string"},description:"Associated projects"},timeEstimate:{type:"integer",minimum:0,description:"Estimated time in minutes",nullable:!0},recurrence:{type:"string",description:"RFC 5545 recurrence rule string",nullable:!0},recurrence_anchor:{type:"string",enum:["scheduled","completion"],description:"Whether recurrence advances from the scheduled date or completion date",nullable:!0},reminders:{type:"array",items:{$ref:"#/components/schemas/Reminder"},description:"Task reminders"},blockedBy:{type:"array",items:{$ref:"#/components/schemas/TaskDependency"},description:"Dependencies that must be satisfied before this task can start"},blocking:{type:"array",items:{type:"string"},description:"Task paths this task blocks. This is derived from other tasks' blockedBy fields.",readOnly:!0},isBlocked:{type:"boolean",description:"Whether this task has incomplete blocking dependencies",readOnly:!0},isBlocking:{type:"boolean",description:"Whether this task blocks at least one other task",readOnly:!0},hasSubtasks:{type:"boolean",description:"Whether another task references this task as a project",readOnly:!0},details:{type:"string",description:"Additional task details/description",nullable:!0},dateCreated:{type:"string",format:"date-time",description:"Task creation timestamp"},dateModified:{type:"string",format:"date-time",description:"Last modification timestamp"}},required:["id","title","status","path"]},TaskCreationData:{type:"object",properties:{title:{type:"string",description:"Task title",maxLength:200},status:{type:"string",description:"Initial task status",enum:["todo","open","in-progress"]},priority:{type:"string",description:"Task priority level",enum:["low","normal","medium","high","urgent"]},due:{type:"string",format:"date-time",description:"Due date and time (ISO 8601 format)"},scheduled:{type:"string",format:"date-time",description:"Scheduled date and time (ISO 8601 format)"},tags:{type:"array",items:{type:"string"},description:"Task tags"},contexts:{type:"array",items:{type:"string"},description:"Task contexts"},projects:{type:"array",items:{type:"string"},description:"Associated projects"},details:{type:"string",description:"Task details/description"},timeEstimate:{type:"integer",minimum:0,description:"Estimated time in minutes"},recurrence:{type:"string",description:"RFC 5545 recurrence rule string"},recurrence_anchor:{type:"string",enum:["scheduled","completion"],description:"Whether recurrence advances from the scheduled date or completion date"},reminders:{type:"array",items:{$ref:"#/components/schemas/Reminder"},description:"Task reminders"},blockedBy:{type:"array",items:{$ref:"#/components/schemas/TaskDependency"},description:"Dependencies that must be satisfied before this task can start"}},required:["title"]},FilterQuery:{allOf:[{$ref:"#/components/schemas/FilterGroup"},{type:"object",properties:{sortKey:{type:"string",description:"Optional task sort key, such as due, scheduled, priority, status, title, or a user field key."},sortDirection:{type:"string",enum:["asc","desc"],description:"Sort direction."},groupKey:{type:"string",description:"Optional grouping key, such as none, priority, context, project, due, scheduled, status, tags, completedDate, or a user field key."},subgroupKey:{type:"string",description:"Optional secondary grouping key."}}}]},FilterGroup:{type:"object",properties:{type:{type:"string",enum:["group"]},id:{type:"string",description:"Client-provided identifier for this group."},conjunction:{type:"string",enum:["and","or"],description:"How child conditions and groups are combined."},children:{type:"array",items:{oneOf:[{$ref:"#/components/schemas/FilterCondition"},{$ref:"#/components/schemas/FilterGroup"}]}}},required:["type","id","conjunction","children"]},FilterCondition:{type:"object",properties:{type:{type:"string",enum:["condition"]},id:{type:"string",description:"Client-provided identifier for this condition."},property:{type:"string",enum:["title","path","status","priority","tags","contexts","projects","blockedBy","blocking","due","scheduled","completedDate","dateCreated","dateModified","archived","hasSubtasks","dependencies.isBlocked","dependencies.isBlocking","timeEstimate","recurrence","status.isCompleted"],description:"Task property to filter on. User fields use user:<fieldId>."},operator:{type:"string",enum:["is","is-not","contains","does-not-contain","is-before","is-after","is-on-or-before","is-on-or-after","is-empty","is-not-empty","is-checked","is-not-checked","is-greater-than","is-less-than","is-greater-than-or-equal","is-less-than-or-equal"],description:"Comparison operator. Use an operator supported by the selected property."},value:{description:"Comparison value. Empty and checked operators do not require a value.",nullable:!0,oneOf:[{type:"string"},{type:"array",items:{type:"string"}},{type:"number"},{type:"boolean"}]}},required:["type","id","property","operator"]},TaskDependency:{type:"object",properties:{uid:{type:"string",description:"Link or identifier for the blocking task"},reltype:{type:"string",enum:["FINISHTOSTART","FINISHTOFINISH","STARTTOSTART","STARTTOFINISH"],description:"Dependency relationship type"},gap:{type:"string",description:"Optional ISO 8601 duration offset between tasks"}},required:["uid","reltype"]},Reminder:{type:"object",properties:{id:{type:"string",description:"Reminder identifier"},type:{type:"string",enum:["absolute","relative"],description:"Reminder type"},absoluteTime:{type:"string",format:"date-time",description:"Absolute reminder timestamp"},relatedTo:{type:"string",enum:["due","scheduled"],description:"Date field used as the relative reminder anchor"},offset:{type:"string",description:"ISO 8601 duration relative to the anchor date"}},required:["id","type"]},TaskStats:{type:"object",properties:{total:{type:"integer",description:"Total number of tasks"},completed:{type:"integer",description:"Number of completed tasks"},active:{type:"integer",description:"Number of active (non-completed, non-archived) tasks"},overdue:{type:"integer",description:"Number of overdue tasks"},archived:{type:"integer",description:"Number of archived tasks"},withTimeTracking:{type:"integer",description:"Number of tasks with time tracking entries"}},required:["total","completed","active","overdue","archived","withTimeTracking"]},WebhookConfig:{type:"object",properties:{id:{type:"string",description:"Unique webhook identifier"},url:{type:"string",format:"uri",description:"Webhook endpoint URL"},events:{type:"array",items:{type:"string",enum:["task.created","task.updated","task.deleted","task.completed","task.archived","task.unarchived","time.started","time.stopped","pomodoro.started","pomodoro.completed","pomodoro.interrupted","recurring.instance.completed","reminder.triggered"]},description:"Events to subscribe to",minItems:1},active:{type:"boolean",description:"Whether the webhook is active"},transformFile:{type:"string",description:"Optional transform file path for payload customization"},corsHeaders:{type:"boolean",description:"Whether to include custom headers (disable for strict CORS services)"}},required:["url","events"]},PomodoroSession:{type:"object",properties:{id:{type:"string",description:"Unique session identifier"},type:{type:"string",enum:["work","short-break","long-break"],description:"Type of pomodoro session"},duration:{type:"integer",description:"Session duration in seconds"},startTime:{type:"string",format:"date-time",description:"Session start timestamp"},endTime:{type:"string",format:"date-time",description:"Session end timestamp",nullable:!0},task:{$ref:"#/components/schemas/Task",nullable:!0,description:"Associated task (if any)"}},required:["id","type","duration","startTime"]},PomodoroState:{type:"object",properties:{isRunning:{type:"boolean",description:"Whether a pomodoro session is currently running"},timeRemaining:{type:"integer",description:"Time remaining in current session (seconds)"},currentSession:{$ref:"#/components/schemas/PomodoroSession",nullable:!0,description:"Current active session (if any)"},nextSessionType:{type:"string",enum:["work","short-break","long-break"],nullable:!0,description:"Suggested next session type"},totalPomodoros:{type:"integer",description:"Total completed pomodoros (all time)"},currentStreak:{type:"integer",description:"Current consecutive pomodoro streak"},totalMinutesToday:{type:"integer",description:"Total focused minutes today"}},required:["isRunning","timeRemaining"]},PomodoroSessionHistory:{type:"object",properties:{id:{type:"string",description:"Session identifier"},type:{type:"string",enum:["work","short-break","long-break"]},startTime:{type:"string",format:"date-time"},endTime:{type:"string",format:"date-time"},duration:{type:"integer",description:"Actual session duration in seconds"},completed:{type:"boolean",description:"Whether the session was completed (not interrupted)"},taskPath:{type:"string",nullable:!0,description:"Associated task file path"},taskTitle:{type:"string",nullable:!0,description:"Associated task title"}},required:["id","type","startTime","endTime","duration","completed"]},PomodoroStats:{type:"object",properties:{totalSessions:{type:"integer",description:"Total number of sessions"},completedSessions:{type:"integer",description:"Number of completed sessions"},interruptedSessions:{type:"integer",description:"Number of interrupted sessions"},totalFocusTime:{type:"integer",description:"Total focused time in minutes"},workSessions:{type:"integer",description:"Number of work sessions"},breakSessions:{type:"integer",description:"Number of break sessions"},longestStreak:{type:"integer",description:"Longest consecutive completed sessions"},averageSessionLength:{type:"number",description:"Average session length in minutes"}},required:["totalSessions","completedSessions","interruptedSessions","totalFocusTime"]},TimeEntry:{type:"object",properties:{startTime:{type:"string",format:"date-time",description:"ISO timestamp when time tracking started"},endTime:{type:"string",format:"date-time",nullable:!0,description:"ISO timestamp when time tracking ended (null if still running)"},description:{type:"string",nullable:!0,description:"Optional description of work being tracked"},duration:{type:"integer",minimum:0,description:"Duration in minutes (calculated or manually set)"},isActive:{type:"boolean",description:"Whether this time entry is currently active"}},required:["startTime","duration","isActive"]},ActiveTimeSession:{type:"object",properties:{task:{type:"object",properties:{id:{type:"string",description:"Task identifier (file path)"},title:{type:"string",description:"Task title"},status:{type:"string",description:"Task status"},priority:{type:"string",description:"Task priority"},tags:{type:"array",items:{type:"string"},description:"Task tags"},projects:{type:"array",items:{type:"string"},description:"Associated projects"}},required:["id","title","status"]},session:{type:"object",properties:{startTime:{type:"string",format:"date-time",description:"When the session started"},description:{type:"string",nullable:!0,description:"Session description"},elapsedMinutes:{type:"integer",minimum:0,description:"Minutes elapsed since session started"}},required:["startTime","elapsedMinutes"]},elapsedMinutes:{type:"integer",minimum:0,description:"Total elapsed minutes for this session"}},required:["task","session","elapsedMinutes"]},TimeSummary:{type:"object",properties:{period:{type:"string",enum:["today","week","month","all","custom"],description:"Time period for the summary"},dateRange:{type:"object",properties:{from:{type:"string",format:"date-time",description:"Start date of the summary period"},to:{type:"string",format:"date-time",description:"End date of the summary period"}},required:["from","to"]},summary:{type:"object",properties:{totalMinutes:{type:"integer",minimum:0,description:"Total tracked time in minutes"},totalHours:{type:"number",minimum:0,description:"Total tracked time in hours (rounded to 2 decimals)"},tasksWithTime:{type:"integer",minimum:0,description:"Number of tasks with time tracking data"},activeTasks:{type:"integer",minimum:0,description:"Number of tasks with active time tracking"},completedTasks:{type:"integer",minimum:0,description:"Number of completed tasks with time tracking"}},required:["totalMinutes","totalHours","tasksWithTime","activeTasks","completedTasks"]},topTasks:{type:"array",items:{type:"object",properties:{task:{type:"string",description:"Task identifier"},title:{type:"string",description:"Task title"},minutes:{type:"integer",minimum:0,description:"Total minutes tracked for this task"}},required:["task","title","minutes"]},description:"Top 10 tasks by time tracked"},topProjects:{type:"array",items:{type:"object",properties:{project:{type:"string",description:"Project name"},minutes:{type:"integer",minimum:0,description:"Total minutes tracked for this project"}},required:["project","minutes"]},description:"Top 10 projects by time tracked"},topTags:{type:"array",items:{type:"object",properties:{tag:{type:"string",description:"Tag name"},minutes:{type:"integer",minimum:0,description:"Total minutes tracked for this tag"}},required:["tag","minutes"]},description:"Top 10 tags by time tracked"}},required:["period","dateRange","summary","topTasks","topProjects","topTags"]},TaskTimeData:{type:"object",properties:{task:{type:"object",properties:{id:{type:"string",description:"Task identifier (file path)"},title:{type:"string",description:"Task title"},status:{type:"string",description:"Task status"},priority:{type:"string",description:"Task priority"}},required:["id","title","status"]},summary:{type:"object",properties:{totalMinutes:{type:"integer",minimum:0,description:"Total time tracked for this task in minutes"},totalHours:{type:"number",minimum:0,description:"Total time tracked for this task in hours"},totalSessions:{type:"integer",minimum:0,description:"Total number of time tracking sessions"},completedSessions:{type:"integer",minimum:0,description:"Number of completed sessions"},activeSessions:{type:"integer",minimum:0,maximum:1,description:"Number of active sessions (0 or 1)"},averageSessionMinutes:{type:"number",minimum:0,description:"Average session length in minutes"}},required:["totalMinutes","totalHours","totalSessions","completedSessions","activeSessions","averageSessionMinutes"]},activeSession:{type:"object",nullable:!0,properties:{startTime:{type:"string",format:"date-time",description:"When the active session started"},description:{type:"string",nullable:!0,description:"Description of the active session"},elapsedMinutes:{type:"integer",minimum:0,description:"Minutes elapsed since session started"}},required:["startTime","elapsedMinutes"]},timeEntries:{type:"array",items:{$ref:"#/components/schemas/TimeEntry"},description:"All time entries for this task"}},required:["task","summary","timeEntries"]},Error:{type:"object",properties:{success:{type:"boolean",enum:[!1]},error:{type:"string",description:"Error message describing what went wrong"}},required:["success","error"]}}}function x3(n){return Reflect.getMetadata("routes",n)||[]}var wlr,zJe,BJe,dD,lDe,qc=y(()=>{wlr=tt(oDe());q();zJe=M({tag:"Utils/OpenAPIDecorators"}),BJe=Symbol("openapi:operation"),dD=Symbol("openapi:endpoints"),lDe=Symbol("route")});function Os(n){var e;return new URL((e=n.url)!=null?e:"","http://localhost")}var cg=y(()=>{});var BF,uDe=y(()=>{cg();qc();BF=class{constructor(){this.routes=[]}compilePattern(e){let t=[],r=e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(i,s)=>(t.push(s),"([^/]+)"));return{regex:new RegExp(`^${r}$`),paramNames:t}}register(e,t,r){let{regex:a,paramNames:i}=this.compilePattern(t);this.routes.push({method:e,pattern:t,handler:r,regex:a,paramNames:i})}get(e,t){this.register("GET",e,t)}post(e,t){this.register("POST",e,t)}put(e,t){this.register("PUT",e,t)}delete(e,t){this.register("DELETE",e,t)}options(e,t){this.register("OPTIONS",e,t)}async route(e,t){let r=Os(e).pathname,a=e.method;for(let i of this.routes)if(i.method===a){let s=r.match(i.regex);if(s){let o={};for(let l=0;l<i.paramNames.length;l++){let c=i.paramNames[l],d=s[l+1];d&&(o[c]=decodeURIComponent(d))}return await i.handler(e,t,o),!0}}return!1}registerController(e){let t=e,r=x3(e.constructor);for(let a of r){let i=t[a.handler];typeof i=="function"&&this.register(a.method.toUpperCase(),a.path,i.bind(e))}}getRoutes(){return this.routes}}});function pDe(n,e){if(!n)return e;try{let t=new URL(n);return WJe.has(t.protocol)?!t.username&&!t.password&&!t.port&&!t.search&&!t.hash&&(t.pathname===""||t.pathname==="/")&&t.hostname?`${t.protocol}//${t.hostname}`:void 0:t.protocol!=="http:"&&t.protocol!=="https:"?void 0:VJe.has(t.hostname)?t.origin:void 0}catch(t){return}}function jF(n,e){var t,r;e!=null&&e.allowOrigin&&n.setHeader("Access-Control-Allow-Origin",e.allowOrigin),n.setHeader("Access-Control-Allow-Methods",(t=e==null?void 0:e.allowMethods)!=null?t:UJe),n.setHeader("Access-Control-Allow-Headers",(r=e==null?void 0:e.allowHeaders)!=null?r:HJe)}function $F(n,e,t,r){n.statusCode=e,n.setHeader("Content-Type","application/json"),jF(n,r),n.end(JSON.stringify(t))}function UF(n){return new Promise((e,t)=>{let r="";n.on("data",a=>{r+=a.toString()}),n.on("end",()=>{try{e(r?JSON.parse(r):{})}catch(a){t(new Error("Invalid JSON"))}}),n.on("error",t)})}var UJe,HJe,VJe,WJe,E3=y(()=>{UJe="GET, POST, PUT, DELETE, OPTIONS",HJe="Content-Type, Authorization",VJe=new Set(["localhost","127.0.0.1","::1","[::1]"]),WJe=new Set(["chrome-extension:"])});var Za,Tm=y(()=>{E3();Za=class{sendResponse(e,t,r){$F(e,t,r)}successResponse(e,t){return{success:!0,data:e,message:t}}errorResponse(e){return{success:!1,error:e}}getErrorMessage(e){return e instanceof Error?e.message:String(e)}async parseRequestBody(e){return await UF(e)}}});async function HF(n,e){let t=n.vault.getAbstractFileByPath(e.path);if(!(t instanceof mDe.TFile))return e;let r=await n.vault.read(t),{body:a}=Gu(r);return{...e,details:a.replace(/\r\n/g,`
`).trimEnd()}}var mDe,D3=y(()=>{mDe=require("obsidian");yt()});var Qa,fDe=y(()=>{cg();Tm();D3();qc();Qa=class extends Za{constructor(t,r,a,i,s){super();this.plugin=t;this.taskService=r;this.filterService=a;this.cacheManager=i;this.taskStatsService=s}async getTasks(t,r){try{let a=Os(t).searchParams;if(["status","priority","project","context","tag","overdue","completed","archived","due_before","due_after","sort"].some(h=>a.has(h))){this.sendResponse(r,400,this.errorResponse("For filtering tasks, please use POST /api/tasks/query which supports advanced filtering capabilities. GET /api/tasks is for basic listing only. See API documentation for details."));return}let o=await this.cacheManager.getAllTasks(),l=0,c=50,d=a.get("offset");d&&(l=parseInt(d,10),(isNaN(l)||l<0)&&(l=0));let u=a.get("limit");u&&(c=parseInt(u,10),(isNaN(c)||c<1)&&(c=50),c>200&&(c=200));let p=o.slice(l,l+c),m=this.plugin.app.vault.adapter,f=null;try{"basePath"in m&&typeof m.basePath=="string"?f=m.basePath:"path"in m&&typeof m.path=="string"&&(f=m.path)}catch(h){}this.sendResponse(r,200,this.successResponse({tasks:p,pagination:{total:o.length,offset:l,limit:c,hasMore:l+c<o.length},vault:{name:this.plugin.app.vault.getName(),path:f},note:"For filtering and advanced queries, use POST /api/tasks/query"}))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async createTask(t,r){try{let a=await this.parseRequestBody(t);if(!a.title||!a.title.trim()){this.sendResponse(r,400,this.errorResponse("Title is required"));return}let i=await this.taskService.createTask(a);this.sendResponse(r,201,this.successResponse(i.taskInfo))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async getTask(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=await HF(this.plugin.app,s);this.sendResponse(r,200,this.successResponse(o))}catch(i){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(i)))}}async updateTask(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.parseRequestBody(t),o=await this.cacheManager.getTaskInfo(i);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let l=await this.taskService.updateTask(o,s);this.sendResponse(r,200,this.successResponse(l))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async deleteTask(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}await this.taskService.deleteTask(s),this.sendResponse(r,200,this.successResponse({message:"Task deleted successfully"}))}catch(i){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(i)))}}async toggleStatus(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=await this.taskService.toggleStatus(s);this.sendResponse(r,200,this.successResponse(o))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async toggleArchive(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=await this.taskService.toggleArchive(s);this.sendResponse(r,200,this.successResponse(o))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async completeRecurringInstance(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let{date:s}=await this.parseRequestBody(t),o=await this.cacheManager.getTaskInfo(i);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let l=s?new Date(s):void 0,c=await this.taskService.toggleRecurringTaskCompleteWithOccurrenceNotes(o,l);this.sendResponse(r,200,this.successResponse(c))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async materializeOccurrence(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let{date:s}=await this.parseRequestBody(t);if(!s){this.sendResponse(r,400,this.errorResponse("Date is required"));return}let o=await this.cacheManager.getTaskInfo(i);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let l=await this.taskService.materializeOccurrence(o,s);this.sendResponse(r,200,this.successResponse(l))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async queryTasks(t,r){try{let a=await this.parseRequestBody(t),i=await this.filterService.getGroupedTasks(a),s=[];for(let d of i.values())s.push(...d);let o=await this.cacheManager.getAllTasks(),l=this.plugin.app.vault.adapter,c=null;try{"basePath"in l&&typeof l.basePath=="string"?c=l.basePath:"path"in l&&typeof l.path=="string"&&(c=l.path)}catch(d){}this.sendResponse(r,200,this.successResponse({tasks:s,total:o.length,filtered:s.length,vault:{name:this.plugin.app.vault.getName(),path:c}}))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async getFilterOptions(t,r){try{let a=await this.filterService.getFilterOptions();this.sendResponse(r,200,this.successResponse(a))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getStats(t,r){try{let a=await this.cacheManager.getAllTasks(),i=this.taskStatsService.getStats(a),s={total:i.total,completed:i.completed,active:i.active,overdue:i.overdue,archived:i.archived,withTimeTracking:i.withTimeEntries};this.sendResponse(r,200,this.successResponse(s))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}};Qe([Rr("/api/tasks")],Qa.prototype,"getTasks",1),Qe([ln("/api/tasks")],Qa.prototype,"createTask",1),Qe([Rr("/api/tasks/:id")],Qa.prototype,"getTask",1),Qe([dDe("/api/tasks/:id")],Qa.prototype,"updateTask",1),Qe([OF("/api/tasks/:id")],Qa.prototype,"deleteTask",1),Qe([ln("/api/tasks/:id/toggle-status")],Qa.prototype,"toggleStatus",1),Qe([ln("/api/tasks/:id/archive")],Qa.prototype,"toggleArchive",1),Qe([ln("/api/tasks/:id/complete-instance")],Qa.prototype,"completeRecurringInstance",1),Qe([ln("/api/tasks/:id/materialize-occurrence")],Qa.prototype,"materializeOccurrence",1),Qe([zF({summary:"Query tasks",description:"Filter, sort, and group tasks with a TaskNotes FilterQuery payload.",operationId:"queryTasks",tags:["Tasks"],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FilterQuery"},example:{type:"group",id:"root",conjunction:"and",children:[{type:"condition",id:"context",property:"contexts",operator:"contains",value:"@office"}],sortKey:"due",sortDirection:"asc"}}}},responses:{200:{description:"Tasks matching the query",content:{"application/json":{schema:{$ref:"#/components/schemas/APIResponse"}}}},400:{description:"Invalid query payload",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}}}}),ln("/api/tasks/query")],Qa.prototype,"queryTasks",1),Qe([Rr("/api/filter-options")],Qa.prototype,"getFilterOptions",1),Qe([Rr("/api/stats")],Qa.prototype,"getStats",1)});var Gc,hDe=y(()=>{cg();Tm();qc();CE();Gc=class extends Za{constructor(t,r,a,i){super();this.plugin=t;this.taskService=r;this.cacheManager=a;this.statusManager=i}async startTimeTracking(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=await this.taskService.startTimeTracking(s);this.sendResponse(r,200,this.successResponse(o))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async stopTimeTracking(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=await this.taskService.stopTimeTracking(s);this.sendResponse(r,200,this.successResponse(o))}catch(i){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(i)))}}async startTimeTrackingWithDescription(t,r,a){var i;try{let s=a==null?void 0:a.id;if(!s){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let o=await this.cacheManager.getTaskInfo(s);if(!o){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let c=(i=(await this.parseRequestBody(t)).description)!=null?i:"",d=await this.taskService.startTimeTracking(o);if(c&&d.timeEntries&&d.timeEntries.length>0){let u=d.timeEntries[d.timeEntries.length-1];u&&!u.endTime&&(u.description=c,d=await this.taskService.updateTask(d,{timeEntries:d.timeEntries}))}this.sendResponse(r,200,this.successResponse({task:d,message:c?`Time tracking started with description: ${c}`:"Time tracking started"}))}catch(s){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(s)))}}async getActiveTimeSessions(t,r){try{let a=await this.cacheManager.getAllTasks(),i=Qk(a,s=>this.plugin.getActiveTimeSession(s));this.sendResponse(r,200,this.successResponse(i))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getTimeSummary(t,r){try{let a=Os(t).searchParams,i=await this.cacheManager.getAllTasks(),s=a.get("period")||"today",o=a.get("from"),l=a.get("to"),c=o?new Date(o):null,d=l?new Date(l):null,u=Jk(i,{period:s,fromDate:c,toDate:d,includeTags:!0},p=>this.statusManager.isCompletedStatus(p));this.sendResponse(r,200,this.successResponse(u))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getTaskTimeData(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Task ID is required"));return}let s=await this.cacheManager.getTaskInfo(i);if(!s){this.sendResponse(r,404,this.errorResponse("Task not found"));return}let o=pm(s,l=>this.plugin.getActiveTimeSession(l));this.sendResponse(r,200,this.successResponse(o))}catch(i){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(i)))}}};Qe([ln("/api/tasks/:id/time/start")],Gc.prototype,"startTimeTracking",1),Qe([ln("/api/tasks/:id/time/stop")],Gc.prototype,"stopTimeTracking",1),Qe([ln("/api/tasks/:id/time/start-with-description")],Gc.prototype,"startTimeTrackingWithDescription",1),Qe([Rr("/api/time/active")],Gc.prototype,"getActiveTimeSessions",1),Qe([Rr("/api/time/summary")],Gc.prototype,"getTimeSummary",1),Qe([Rr("/api/tasks/:id/time")],Gc.prototype,"getTaskTimeData",1)});var kl,gDe=y(()=>{cg();Tm();qc();kl=class extends Za{constructor(t,r){super();this.plugin=t;this.cacheManager=r}async startPomodoro(t,r){try{let a=await this.parseRequestBody(t),i;if(a.taskId){let c=await this.cacheManager.getTaskInfo(a.taskId);if(!c){this.sendResponse(r,404,this.errorResponse("Task not found"));return}i=c}if(this.plugin.pomodoroService.getState().isRunning){this.sendResponse(r,400,this.errorResponse("Pomodoro session is already running. Stop or pause the current session first."));return}let o=a.duration!==void 0?parseInt(String(a.duration),10):void 0;await this.plugin.pomodoroService.startPomodoro(i,o);let l=this.plugin.pomodoroService.getState();this.sendResponse(r,200,this.successResponse({session:l.currentSession,task:i||null,message:"Pomodoro session started"}))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async stopPomodoro(t,r){try{if(!this.plugin.pomodoroService.getState().currentSession){this.sendResponse(r,400,this.errorResponse("No active pomodoro session to stop"));return}await this.plugin.pomodoroService.stopPomodoro(),this.sendResponse(r,200,this.successResponse({message:"Pomodoro session stopped and reset"}))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async pausePomodoro(t,r){try{let a=this.plugin.pomodoroService.getState();if(!a.isRunning||!a.currentSession){this.sendResponse(r,400,this.errorResponse("No running pomodoro session to pause"));return}await this.plugin.pomodoroService.pausePomodoro();let i=this.plugin.pomodoroService.getState();this.sendResponse(r,200,this.successResponse({timeRemaining:i.timeRemaining,message:"Pomodoro session paused"}))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async resumePomodoro(t,r){try{let a=this.plugin.pomodoroService.getState();if(a.isRunning){this.sendResponse(r,400,this.errorResponse("Pomodoro session is already running"));return}if(!a.currentSession){this.sendResponse(r,400,this.errorResponse("No paused session to resume"));return}await this.plugin.pomodoroService.resumePomodoro();let i=this.plugin.pomodoroService.getState();this.sendResponse(r,200,this.successResponse({timeRemaining:i.timeRemaining,message:"Pomodoro session resumed"}))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async getPomodoroStatus(t,r){try{let i={...this.plugin.pomodoroService.getState(),totalPomodoros:await this.plugin.pomodoroService.getPomodorosCompleted(),currentStreak:await this.plugin.pomodoroService.getCurrentStreak(),totalMinutesToday:await this.plugin.pomodoroService.getTotalMinutesToday()};this.sendResponse(r,200,this.successResponse(i))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getPomodoroSessions(t,r){try{let a=Os(t).searchParams,i=await this.plugin.pomodoroService.getSessionHistory(),s=a.get("date");if(s){let c=s;i=i.filter(d=>new Date(d.startTime).toISOString().split("T")[0]===c)}let o=i.length,l=a.get("limit");if(l){let c=parseInt(l,10);c>0&&(i=i.slice(-c))}this.sendResponse(r,200,this.successResponse({sessions:i,total:o}))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getPomodoroStats(t,r){try{let a=Os(t).searchParams,i,s=a.get("date");if(s){let o=new Date(s);i=await this.plugin.pomodoroService.getStatsForDate(o)}else i=await this.plugin.pomodoroService.getTodayStats();this.sendResponse(r,200,this.successResponse(i))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}};Qe([ln("/api/pomodoro/start")],kl.prototype,"startPomodoro",1),Qe([ln("/api/pomodoro/stop")],kl.prototype,"stopPomodoro",1),Qe([ln("/api/pomodoro/pause")],kl.prototype,"pausePomodoro",1),Qe([ln("/api/pomodoro/resume")],kl.prototype,"resumePomodoro",1),Qe([Rr("/api/pomodoro/status")],kl.prototype,"getPomodoroStatus",1),Qe([Rr("/api/pomodoro/sessions")],kl.prototype,"getPomodoroSessions",1),Qe([Rr("/api/pomodoro/stats")],kl.prototype,"getPomodoroStats",1)});var yDe,bu,vDe=y(()=>{Tm();TC();qc();q();yDe=M({tag:"Api/SystemController"}),bu=class extends Za{constructor(t,r,a,i){super();this.plugin=t;this.taskService=r;this.nlParser=a;this.httpAPIService=i}async healthCheck(t,r){let a=this.plugin.app.vault.getName(),i=this.plugin.app.vault.adapter,s=null;try{"basePath"in i&&typeof i.basePath=="string"?s=i.basePath:"path"in i&&typeof i.path=="string"&&(s=i.path)}catch(o){}this.sendResponse(r,200,this.successResponse({status:"ok",timestamp:new Date().toISOString(),vault:{name:a,path:s}}))}async handleNLPParse(t,r){try{let a=await this.parseRequestBody(t);if(!a.text||typeof a.text!="string"){this.sendResponse(r,400,this.errorResponse("Text field is required and must be a string"));return}let i=this.nlParser.parseInput(a.text),s=Vd(this.plugin,i);this.sendResponse(r,200,this.successResponse({parsed:i,taskData:s}))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async handleNLPCreate(t,r){try{let a=await this.parseRequestBody(t);if(!a.text||typeof a.text!="string"){this.sendResponse(r,400,this.errorResponse("Text field is required and must be a string"));return}let i=this.nlParser.parseInput(a.text),s=Vd(this.plugin,i,{creationContext:"api"}),o=await this.taskService.createTask(s);this.sendResponse(r,201,this.successResponse({task:o.taskInfo,parsed:i}))}catch(a){this.sendResponse(r,400,this.errorResponse(this.getErrorMessage(a)))}}async handleOpenAPISpec(t,r){try{let a=this.httpAPIService&&this.httpAPIService.generateOpenAPISpec?this.httpAPIService.generateOpenAPISpec():uD(this);r.statusCode=200,r.setHeader("Content-Type","application/json"),r.end(JSON.stringify(a,null,2))}catch(a){yDe.error("OpenAPI spec generation error:",{category:"provider",operation:"openapi-spec-generation",error:a}),this.sendResponse(r,500,this.errorResponse("Failed to generate API specification"))}}async handleSwaggerUI(t,r){try{let a=this.generateSwaggerUIHTML();r.statusCode=200,r.setHeader("Content-Type","text/html"),r.end(a)}catch(a){yDe.error("Swagger UI generation error:",{category:"provider",operation:"swagger-ui-generation",error:a}),this.sendResponse(r,500,this.errorResponse("Failed to generate API documentation"))}}generateSwaggerUIHTML(){return`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TaskNotes API Documentation</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css" />
<style>
body { margin: 0; }
.swagger-ui .topbar { display: none; }
.swagger-ui .info .title { color: #663399; }
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-bundle.js"><\/script>
<script src="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-standalone-preset.js"><\/script>
<script>
SwaggerUIBundle({
url: 'http://localhost:${this.plugin.settings.apiPort}/api/docs',
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
tryItOutEnabled: true,
displayRequestDuration: true,
docExpansion: 'list',
filter: true,
validatorUrl: null
});
<\/script>
</body>
</html>`}};Qe([Rr("/api/health")],bu.prototype,"healthCheck",1),Qe([ln("/api/nlp/parse")],bu.prototype,"handleNLPParse",1),Qe([ln("/api/nlp/create")],bu.prototype,"handleNLPCreate",1),Qe([Rr("/api/docs")],bu.prototype,"handleOpenAPISpec",1),Qe([Rr("/api/docs/ui")],bu.prototype,"handleSwaggerUI",1)});function VF(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function GJe(n){return typeof n=="string"&&qJe.has(n)}function bm(n){return n instanceof Error?n.message:String(n)}function P3(n){return typeof n=="string"&&n.length>0?n:void 0}var kDe,uT,qJe,wm,TDe=y(()=>{kDe=require("obsidian");Tm();qc();q();uT=M({tag:"Api/WebhookController"}),qJe=new Set(["task.created","task.updated","task.deleted","task.completed","task.archived","task.unarchived","time.started","time.stopped","pomodoro.started","pomodoro.completed","pomodoro.interrupted","recurring.instance.completed","recurring.instance.skipped","reminder.triggered"]);wm=class extends Za{constructor(t){super();this.plugin=t;this.webhooks=new Map;this.webhookDeliveryQueue=[];this.loadWebhooks()}async registerWebhook(t,r){var a,i;try{let s=await this.parseRequestBody(t),o=VF(s)?s:{};if(typeof o.url!="string"){this.sendResponse(r,400,this.errorResponse("URL is required and must be a string"));return}if(!Array.isArray(o.events)||o.events.length===0||!o.events.every(GJe)){this.sendResponse(r,400,this.errorResponse("Events array is required and must contain valid webhook events"));return}let l=(a=P3(o.id))!=null?a:this.generateWebhookId(),c=(i=P3(o.secret))!=null?i:this.generateWebhookSecret(),d={id:l,url:o.url,events:o.events,secret:c,active:o.active!==!1,createdAt:new Date().toISOString(),failureCount:0,successCount:0,transformFile:P3(o.transformFile),corsHeaders:o.corsHeaders!==!1};this.webhooks.set(l,d),await this.saveWebhooks(),this.sendResponse(r,201,this.successResponse({webhook:d,message:"Webhook registered successfully. Save the secret for signature validation."}))}catch(s){this.sendResponse(r,400,this.errorResponse(bm(s)))}}async listWebhooks(t,r){try{let a=Array.from(this.webhooks.values()).map(i=>({...i,secret:void 0}));this.sendResponse(r,200,this.successResponse({webhooks:a,total:a.length}))}catch(a){this.sendResponse(r,500,this.errorResponse(bm(a)))}}async deleteWebhook(t,r,a){try{let i=a==null?void 0:a.id;if(!i){this.sendResponse(r,400,this.errorResponse("Webhook ID is required"));return}if(!this.webhooks.has(i)){this.sendResponse(r,404,this.errorResponse("Webhook not found"));return}this.webhooks.delete(i),await this.saveWebhooks(),this.sendResponse(r,200,this.successResponse({message:"Webhook deleted successfully"}))}catch(i){this.sendResponse(r,500,this.errorResponse(bm(i)))}}async getWebhookDeliveries(t,r){try{let a=this.webhookDeliveryQueue.slice(-100);this.sendResponse(r,200,this.successResponse({deliveries:a,total:a.length}))}catch(a){this.sendResponse(r,500,this.errorResponse(bm(a)))}}async triggerWebhook(t,r){setImmediate(()=>{this.processWebhookTrigger(t,r).catch(a=>{uT.error("Webhook processing error:",{category:"provider",operation:"webhook-processing",error:a})})})}async processWebhookTrigger(t,r){let a=Array.from(this.webhooks.values()).filter(l=>l.active&&l.events.includes(t));if(a.length===0)return;let i=this.plugin.app.vault.adapter,s;try{"basePath"in i&&typeof i.basePath=="string"?s=i.basePath:"path"in i&&typeof i.path=="string"&&(s=i.path)}catch(l){}let o={event:t,timestamp:new Date().toISOString(),vault:{name:this.plugin.app.vault.getName(),path:s},data:r};for(let l of a){let c=o;if(l.transformFile)try{c=await this.applyTransformation(l.transformFile,o)}catch(u){uT.error(`Transform error for ${l.transformFile}:`,{category:"provider",operation:"transform",error:u})}let d={id:this.generateDeliveryId(),webhookId:l.id,event:t,payload:c,status:"pending",attempts:0};this.webhookDeliveryQueue.push(d),this.deliverWebhook(l,d)}this.webhookDeliveryQueue.length>100&&(this.webhookDeliveryQueue=this.webhookDeliveryQueue.slice(-100))}async deliverWebhook(t,r,a=0){try{r.attempts++,r.lastAttempt=new Date().toISOString();let s=await this.generateSignature(r.payload,t.secret),o={"Content-Type":"application/json"};t.corsHeaders!==!1&&(o["X-TaskNotes-Event"]=r.event,o["X-TaskNotes-Signature"]=s,o["X-TaskNotes-Delivery-ID"]=r.id);let l=await(0,kDe.requestUrl)({url:t.url,method:"POST",headers:o,body:JSON.stringify(r.payload),throw:!1});if(r.responseStatus=l.status,l.status>=200&&l.status<300)r.status="success",t.successCount++,t.lastTriggered=new Date().toISOString();else throw new Error(`HTTP ${l.status}: ${l.text}`)}catch(s){if(r.error=bm(s),t.failureCount++,a<3){let o=Math.pow(2,a)*1e3;window.setTimeout(()=>{this.deliverWebhook(t,r,a+1)},o)}else r.status="failed",t.failureCount>10&&(t.active=!1,uT.warn(`Webhook ${t.id} disabled after ${t.failureCount} failures`,{category:"provider",operation:"webhook"}))}await this.saveWebhooks()}async generateSignature(t,r){let a=new TextEncoder,i=await crypto.subtle.importKey("raw",a.encode(r),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),s=await crypto.subtle.sign("HMAC",i,a.encode(JSON.stringify(t)));return this.bytesToHex(new Uint8Array(s))}generateWebhookId(){return`wh_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}generateWebhookSecret(){return this.bytesToHex(crypto.getRandomValues(new Uint8Array(32)))}generateDeliveryId(){return`del_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}bytesToHex(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}async saveWebhooks(){let t=Array.from(this.webhooks.values());this.plugin.settings.webhooks=t,await this.plugin.saveSettings()}loadWebhooks(){if(this.plugin.settings.webhooks){this.webhooks.clear();for(let t of this.plugin.settings.webhooks)this.webhooks.set(t.id,t)}}syncFromSettings(){this.loadWebhooks()}async applyTransformation(t,r){try{if(t.endsWith(".js"))throw new Error("JavaScript webhook transforms are no longer supported. Use a JSON transform template instead.");return t.endsWith(".json")?await this.applyJSONTransformation(t,r):(uT.warn(`⚠️ Unknown transform file type for ${t}, using original payload`,{category:"provider",operation:"unknown-transform-file-type"}),r)}catch(a){throw uT.error(`❌ Transformation failed for ${t}:`,{category:"provider",operation:"transformation",error:a}),a}}async applyJSONTransformation(t,r){var a;try{let i;try{i=await this.plugin.app.vault.adapter.read(t)}catch(c){throw new Error(`Failed to read template file '${t}': ${bm(c)}. Please check the file path and ensure it exists in your vault.`)}if(!i.trim())throw new Error(`Template file '${t}' is empty. Please add JSON template content.`);let s;try{s=JSON.parse(i)}catch(c){throw new Error(`Invalid JSON in template file '${t}': ${bm(c)}`)}if(!VF(s))throw new Error(`Invalid JSON in template file '${t}': expected an object with event templates`);let o=(a=s[r.event])!=null?a:s.default;if(!o){let c=Object.keys(s).filter(d=>d!=="default");throw new Error(`No template found for event '${r.event}' and no default template. Available templates: ${c.join(", ")}`)}return this.interpolateTemplate(o,r)}catch(i){throw uT.error(`❌ JSON transformation error for '${t}':`,{category:"provider",operation:"json-transformation",details:{value:bm(i)}}),i}}interpolateTemplate(t,r){if(typeof t=="string")return t.replace(/\$\{([^}]+)\}/g,(a,i)=>{let s=this.getNestedValue(r,i);return s==null?a:this.formatTemplateValue(s)});if(Array.isArray(t))return t.map(a=>this.interpolateTemplate(a,r));if(VF(t)){let a={};for(let[i,s]of Object.entries(t))a[i]=this.interpolateTemplate(s,r);return a}else return t}getNestedValue(t,r){return r.split(".").reduce((a,i)=>{if(VF(a))return a[i]!==void 0?a[i]:void 0},t)}formatTemplateValue(t){if(typeof t=="string")return t;if(typeof t=="number")return Number.prototype.toString.call(t);if(typeof t=="bigint")return BigInt.prototype.toString.call(t);if(typeof t=="boolean")return t?"true":"false";try{let r=JSON.stringify(t);return typeof r=="string"?r:""}catch(r){return""}}};Qe([ln("/api/webhooks")],wm.prototype,"registerWebhook",1),Qe([Rr("/api/webhooks")],wm.prototype,"listWebhooks",1),Qe([OF("/api/webhooks/:id")],wm.prototype,"deleteWebhook",1),Qe([Rr("/api/webhooks/deliveries")],wm.prototype,"getWebhookDeliveries",1)});function bDe(n,e,t){if(!e&&!t)return!0;let r=new Date(n.start),a=n.end?new Date(n.end):r;return!(e&&a<e||t&&r>t)}function YJe(n){return n.startsWith("google-")?"google":n.startsWith("microsoft-")?"microsoft":"unknown"}function WF(n,e,t){var l,c;let r=(l=t.start)!=null?l:null,a=(c=t.end)!=null?c:null,i=[],s={},o=n.getAllEvents();for(let d of o){let u=YJe(d.subscriptionId);bDe(d,r,a)&&(i.push({...d,provider:u}),s[u]=(s[u]||0)+1)}if(e){let d=e.getAllEvents();for(let u of d)bDe(u,r,a)&&(i.push({...u,provider:"ics"}),s.ics=(s.ics||0)+1)}return i.sort((d,u)=>new Date(d.start).getTime()-new Date(u.start).getTime()),{events:i,total:i.length,sources:s}}var A3=y(()=>{});var wu,wDe=y(()=>{cg();Tm();qc();A3();wu=class extends Za{constructor(t,r,a,i){super();this.plugin=t;this.oauthService=r;this.icsSubscriptionService=a;this.calendarProviderRegistry=i}async getCalendars(t,r){try{let a=await this.getProvidersOverview(),i=this.icsSubscriptionService.getSubscriptions();this.sendResponse(r,200,this.successResponse({providers:a,subscriptions:{total:i.length,enabled:i.filter(s=>s.enabled).length}}))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getGoogleCalendars(t,r){try{let a=await this.getProviderDetails("google");this.sendResponse(r,200,this.successResponse(a))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getMicrosoftCalendars(t,r){try{let a=await this.getProviderDetails("microsoft");this.sendResponse(r,200,this.successResponse(a))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getSubscriptions(t,r){try{let i=this.icsSubscriptionService.getSubscriptions().map(s=>({...s,lastFetched:this.icsSubscriptionService.getLastFetched(s.id)||null,lastError:this.icsSubscriptionService.getLastError(s.id)||null}));this.sendResponse(r,200,this.successResponse({subscriptions:i}))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getEvents(t,r){try{let a=Os(t).searchParams,i=a.get("start"),s=a.get("end"),o=i?new Date(i):null,l=s?new Date(s):null,c=WF(this.calendarProviderRegistry,this.icsSubscriptionService,{start:o,end:l});this.sendResponse(r,200,this.successResponse(c))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}async getProvidersOverview(){var c,d;let t=[],r=await this.oauthService.isConnected("google"),a=r?await this.oauthService.getConnection("google"):null,i=((c=this.plugin.googleCalendarService)==null?void 0:c.getAvailableCalendars())||[];t.push({id:"google",name:"Google Calendar",connected:r,...r&&{email:a==null?void 0:a.userEmail,calendarCount:i.length}});let s=await this.oauthService.isConnected("microsoft"),o=s?await this.oauthService.getConnection("microsoft"):null,l=((d=this.plugin.microsoftCalendarService)==null?void 0:d.getAvailableCalendars())||[];return t.push({id:"microsoft",name:"Microsoft Calendar",connected:s,...s&&{email:o==null?void 0:o.userEmail,calendarCount:l.length}}),t}async getProviderDetails(t){let r=await this.oauthService.isConnected(t),a=r?await this.oauthService.getConnection(t):null;if(!r)return{connected:!1};let i=t==="google"?this.plugin.googleCalendarService:this.plugin.microsoftCalendarService,s=(i==null?void 0:i.getAvailableCalendars())||[];return{connected:!0,email:a==null?void 0:a.userEmail,connectedAt:a==null?void 0:a.connectedAt,calendars:s}}};Qe([Rr("/api/calendars")],wu.prototype,"getCalendars",1),Qe([Rr("/api/calendars/google")],wu.prototype,"getGoogleCalendars",1),Qe([Rr("/api/calendars/microsoft")],wu.prototype,"getMicrosoftCalendars",1),Qe([Rr("/api/calendars/subscriptions")],wu.prototype,"getSubscriptions",1),Qe([Rr("/api/calendars/events")],wu.prototype,"getEvents",1)});var pD,SDe=y(()=>{Tm();qc();pD=class extends Za{constructor(t){super();this.plugin=t}async updateDefaultFiles(t,r){try{let a=await this.plugin.updateDefaultBasesFiles();this.sendResponse(r,200,this.successResponse(a))}catch(a){this.sendResponse(r,500,this.errorResponse(this.getErrorMessage(a)))}}};Qe([zF({summary:"Update default Base files",description:"Overwrite the configured default TaskNotes .base files with templates generated from current settings.",operationId:"updateDefaultBaseFiles",tags:["Bases"],responses:{200:{description:"Default Base files updated",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean"},data:{type:"object",properties:{created:{type:"array",items:{type:"string"}},updated:{type:"array",items:{type:"string"}},skipped:{type:"array",items:{type:"string"}}},required:["created","updated","skipped"]}},required:["success","data"]}}}},500:{description:"Default Base files could not be updated",content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}}}}}),ln("/api/bases/default-files/update")],pD.prototype,"updateDefaultFiles",1)});var mD=y(()=>{v_()});function W(n,e,t){var o;function r(l,c){var u,p;var d;Object.defineProperty(l,"_zod",{value:(u=l._zod)!=null?u:{},enumerable:!1}),(p=(d=l._zod).traits)!=null||(d.traits=new Set),l._zod.traits.add(n),e(l,c);for(let m in s.prototype)m in l||Object.defineProperty(l,m,{value:s.prototype[m].bind(l)});l._zod.constr=s,l._zod.def=c}let a=(o=t==null?void 0:t.Parent)!=null?o:Object;class i extends a{}Object.defineProperty(i,"name",{value:n});function s(l){var u;var c;let d=t!=null&&t.Parent?new i:this;r(d,l),(u=(c=d._zod).deferred)!=null||(c.deferred=[]);for(let p of d._zod.deferred)p();return d}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:l=>{var c,d;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(d=(c=l==null?void 0:l._zod)==null?void 0:c.traits)==null?void 0:d.has(n)}}),Object.defineProperty(s,"name",{value:n}),s}function zs(n){return n&&Object.assign(qF,n),qF}var ZJe,QJe,Su,qF,pT=y(()=>{ZJe=Object.freeze({status:"aborted"});QJe=Symbol("zod_brand"),Su=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},qF={}});var At={};Xe(At,{BIGINT_FORMAT_RANGES:()=>xDe,Class:()=>I3,NUMBER_FORMAT_RANGES:()=>z3,aborted:()=>ug,allowsEval:()=>F3,assert:()=>rXe,assertEqual:()=>JJe,assertIs:()=>eXe,assertNever:()=>tXe,assertNotEqual:()=>XJe,assignProp:()=>_3,cached:()=>gD,captureStackTrace:()=>YF,cleanEnum:()=>hXe,cleanRegex:()=>vD,clone:()=>Bs,createTransparentProxy:()=>lXe,defineLazy:()=>_r,esc:()=>dg,escapeRegex:()=>Sm,extend:()=>uXe,finalizeIssue:()=>Tl,floatSafeRemainder:()=>R3,getElementAtPath:()=>nXe,getEnumValues:()=>hD,getLengthableOrigin:()=>kD,getParsedType:()=>oXe,getSizableOrigin:()=>EDe,isObject:()=>mT,isPlainObject:()=>fT,issue:()=>B3,joinValues:()=>GF,jsonStringifyReplacer:()=>N3,merge:()=>pXe,normalizeParams:()=>Ke,nullish:()=>yD,numKeys:()=>sXe,omit:()=>dXe,optionalKeys:()=>O3,partial:()=>mXe,pick:()=>cXe,prefixIssues:()=>Yc,primitiveTypes:()=>CDe,promiseAllObject:()=>aXe,propertyKeyTypes:()=>L3,randomString:()=>iXe,required:()=>fXe,stringifyPrimitive:()=>KF,unwrapMessage:()=>fD});function JJe(n){return n}function XJe(n){return n}function eXe(n){}function tXe(n){throw new Error}function rXe(n){}function hD(n){let e=Object.values(n).filter(r=>typeof r=="number");return Object.entries(n).filter(([r,a])=>e.indexOf(+r)===-1).map(([r,a])=>a)}function GF(n,e="|"){return n.map(t=>KF(t)).join(e)}function N3(n,e){return typeof e=="bigint"?e.toString():e}function gD(n){return{get value(){{let t=n();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function yD(n){return n==null}function vD(n){let e=n.startsWith("^")?1:0,t=n.endsWith("$")?n.length-1:n.length;return n.slice(e,t)}function R3(n,e){let t=(n.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,i=Number.parseInt(n.toFixed(a).replace(".","")),s=Number.parseInt(e.toFixed(a).replace(".",""));return i%s/10**a}function _r(n,e,t){Object.defineProperty(n,e,{get(){{let a=t();return n[e]=a,a}throw new Error("cached value already set")},set(a){Object.defineProperty(n,e,{value:a})},configurable:!0})}function _3(n,e,t){Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}function nXe(n,e){return e?e.reduce((t,r)=>t==null?void 0:t[r],n):n}function aXe(n){let e=Object.keys(n),t=e.map(r=>n[r]);return Promise.all(t).then(r=>{let a={};for(let i=0;i<e.length;i++)a[e[i]]=r[i];return a})}function iXe(n=10){let e="abcdefghijklmnopqrstuvwxyz",t="";for(let r=0;r<n;r++)t+=e[Math.floor(Math.random()*e.length)];return t}function dg(n){return JSON.stringify(n)}function mT(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function fT(n){if(mT(n)===!1)return!1;let e=n.constructor;if(e===void 0)return!0;let t=e.prototype;return!(mT(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function sXe(n){let e=0;for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&e++;return e}function Sm(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bs(n,e,t){let r=new n._zod.constr(e!=null?e:n._zod.def);return(!e||t!=null&&t.parent)&&(r._zod.parent=n),r}function Ke(n){let e=n;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function lXe(n){let e;return new Proxy({},{get(t,r,a){return e!=null||(e=n()),Reflect.get(e,r,a)},set(t,r,a,i){return e!=null||(e=n()),Reflect.set(e,r,a,i)},has(t,r){return e!=null||(e=n()),Reflect.has(e,r)},deleteProperty(t,r){return e!=null||(e=n()),Reflect.deleteProperty(e,r)},ownKeys(t){return e!=null||(e=n()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(t,r){return e!=null||(e=n()),Reflect.getOwnPropertyDescriptor(e,r)},defineProperty(t,r,a){return e!=null||(e=n()),Reflect.defineProperty(e,r,a)}})}function KF(n){return typeof n=="bigint"?n.toString()+"n":typeof n=="string"?`"${n}"`:`${n}`}function O3(n){return Object.keys(n).filter(e=>n[e]._zod.optin==="optional"&&n[e]._zod.optout==="optional")}function cXe(n,e){let t={},r=n._zod.def;for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(t[a]=r.shape[a])}return Bs(n,{...n._zod.def,shape:t,checks:[]})}function dXe(n,e){let t={...n._zod.def.shape},r=n._zod.def;for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete t[a]}return Bs(n,{...n._zod.def,shape:t,checks:[]})}function uXe(n,e){if(!fT(e))throw new Error("Invalid input to extend: expected a plain object");let t={...n._zod.def,get shape(){let r={...n._zod.def.shape,...e};return _3(this,"shape",r),r},checks:[]};return Bs(n,t)}function pXe(n,e){return Bs(n,{...n._zod.def,get shape(){let t={...n._zod.def.shape,...e._zod.def.shape};return _3(this,"shape",t),t},catchall:e._zod.def.catchall,checks:[]})}function mXe(n,e,t){let r=e._zod.def.shape,a={...r};if(t)for(let i in t){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=n?new n({type:"optional",innerType:r[i]}):r[i])}else for(let i in r)a[i]=n?new n({type:"optional",innerType:r[i]}):r[i];return Bs(e,{...e._zod.def,shape:a,checks:[]})}function fXe(n,e,t){let r=e._zod.def.shape,a={...r};if(t)for(let i in t){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=new n({type:"nonoptional",innerType:r[i]}))}else for(let i in r)a[i]=new n({type:"nonoptional",innerType:r[i]});return Bs(e,{...e._zod.def,shape:a,checks:[]})}function ug(n,e=0){var t;for(let r=e;r<n.issues.length;r++)if(((t=n.issues[r])==null?void 0:t.continue)!==!0)return!0;return!1}function Yc(n,e){return e.map(t=>{var a;var r;return(a=(r=t).path)!=null||(r.path=[]),t.path.unshift(n),t})}function fD(n){return typeof n=="string"?n:n==null?void 0:n.message}function Tl(n,e,t){var a,i,s,o,l,c,d,u,p,m,f;let r={...n,path:(a=n.path)!=null?a:[]};if(!n.message){let h=(f=(m=(u=(c=fD((o=(s=(i=n.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,n)))!=null?c:fD((l=e==null?void 0:e.error)==null?void 0:l.call(e,n)))!=null?u:fD((d=t.customError)==null?void 0:d.call(t,n)))!=null?m:fD((p=t.localeError)==null?void 0:p.call(t,n)))!=null?f:"Invalid input";r.message=h}return delete r.inst,delete r.continue,e!=null&&e.reportInput||delete r.input,r}function EDe(n){return n instanceof Set?"set":n instanceof Map?"map":n instanceof File?"file":"unknown"}function kD(n){return Array.isArray(n)?"array":typeof n=="string"?"string":"unknown"}function B3(...n){let[e,t,r]=n;return typeof e=="string"?{message:e,code:"custom",input:t,inst:r}:{...e}}function hXe(n){return Object.entries(n).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var YF,F3,oXe,L3,CDe,z3,xDe,I3,Kc=y(()=>{YF=Error.captureStackTrace?Error.captureStackTrace:(...n)=>{};F3=gD(()=>{var n;if(typeof navigator!="undefined"&&((n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Cloudflare")))return!1;try{let e=Function;return new e(""),!0}catch(e){return!1}});oXe=n=>{let e=typeof n;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(n)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(n)?"array":n===null?"null":n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?"promise":typeof Map!="undefined"&&n instanceof Map?"map":typeof Set!="undefined"&&n instanceof Set?"set":typeof Date!="undefined"&&n instanceof Date?"date":typeof File!="undefined"&&n instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},L3=new Set(["string","number","symbol"]),CDe=new Set(["string","number","bigint","boolean","symbol","undefined"]);z3={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},xDe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};I3=class{constructor(...e){}}});function j3(n,e=t=>t.message){let t={},r=[];for(let a of n.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):r.push(e(a));return{formErrors:r,fieldErrors:t}}function $3(n,e){let t=e||function(i){return i.message},r={_errors:[]},a=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>a({issues:o}));else if(s.code==="invalid_key")a({issues:s.issues});else if(s.code==="invalid_element")a({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let o=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return a(n),r}var DDe,ZF,TD,U3=y(()=>{pT();Kc();DDe=(n,e)=>{n.name="$ZodError",Object.defineProperty(n,"_zod",{value:n._zod,enumerable:!1}),Object.defineProperty(n,"issues",{value:e,enumerable:!1}),Object.defineProperty(n,"message",{get(){return JSON.stringify(e,N3,2)},enumerable:!0}),Object.defineProperty(n,"toString",{value:()=>n.message,enumerable:!1})},ZF=W("$ZodError",DDe),TD=W("$ZodError",DDe,{Parent:Error})});var H3,V3,W3,q3,G3,pg,Y3,mg,K3=y(()=>{pT();U3();Kc();H3=n=>(e,t,r,a)=>{var o;let i=r?Object.assign(r,{async:!1}):{async:!1},s=e._zod.run({value:t,issues:[]},i);if(s instanceof Promise)throw new Su;if(s.issues.length){let l=new((o=a==null?void 0:a.Err)!=null?o:n)(s.issues.map(c=>Tl(c,i,zs())));throw YF(l,a==null?void 0:a.callee),l}return s.value},V3=H3(TD),W3=n=>async(e,t,r,a)=>{var o;let i=r?Object.assign(r,{async:!0}):{async:!0},s=e._zod.run({value:t,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let l=new((o=a==null?void 0:a.Err)!=null?o:n)(s.issues.map(c=>Tl(c,i,zs())));throw YF(l,a==null?void 0:a.callee),l}return s.value},q3=W3(TD),G3=n=>(e,t,r)=>{let a=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:t,issues:[]},a);if(i instanceof Promise)throw new Su;return i.issues.length?{success:!1,error:new(n!=null?n:ZF)(i.issues.map(s=>Tl(s,a,zs())))}:{success:!0,data:i.value}},pg=G3(TD),Y3=n=>async(e,t,r)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},i=e._zod.run({value:t,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new n(i.issues.map(s=>Tl(s,a,zs())))}:{success:!0,data:i.value}},mg=Y3(TD)});function ODe(){return new RegExp(yXe,"u")}function GDe(n){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof n.precision=="number"?n.precision===-1?`${e}`:n.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${n.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function YDe(n){return new RegExp(`^${GDe(n)}$`)}function KDe(n){let e=GDe({precision:n.precision}),t=["Z"];n.local&&t.push(""),n.offset&&t.push("([+-]\\d{2}:\\d{2})");let r=`${e}(?:${t.join("|")})`;return new RegExp(`^${WDe}T(?:${r})$`)}var PDe,ADe,MDe,IDe,NDe,RDe,_De,FDe,Z3,LDe,yXe,zDe,BDe,jDe,$De,UDe,Q3,HDe,VDe,WDe,qDe,ZDe,QDe,JDe,XDe,ePe,tPe,rPe,X3=y(()=>{PDe=/^[cC][^\s-]{8,}$/,ADe=/^[0-9a-z]+$/,MDe=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,IDe=/^[0-9a-vA-V]{20}$/,NDe=/^[A-Za-z0-9]{27}$/,RDe=/^[a-zA-Z0-9_-]{21}$/,_De=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,FDe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Z3=n=>n?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,LDe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yXe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";zDe=/^(?:(?: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])$/,BDe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,jDe=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,$De=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,UDe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Q3=/^[A-Za-z0-9_-]*$/,HDe=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,VDe=/^\+(?:[0-9]){6,14}[0-9]$/,WDe="(?:(?:\\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])))",qDe=new RegExp(`^${WDe}$`);ZDe=n=>{var t,r;let e=n?`[\\s\\S]{${(t=n==null?void 0:n.minimum)!=null?t:0},${(r=n==null?void 0:n.maximum)!=null?r:""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},QDe=/^\d+$/,JDe=/^-?\d+(?:\.\d+)?/i,XDe=/true|false/i,ePe=/null/i,tPe=/^[^A-Z]*$/,rPe=/^[^a-z]*$/});var xa,nPe,e6,t6,aPe,iPe,sPe,oPe,lPe,bD,cPe,dPe,uPe,pPe,mPe,fPe,hPe,QF=y(()=>{pT();X3();Kc();xa=W("$ZodCheck",(n,e)=>{var r,a;var t;(r=n._zod)!=null||(n._zod={}),n._zod.def=e,(a=(t=n._zod).onattach)!=null||(t.onattach=[])}),nPe={number:"number",bigint:"bigint",object:"date"},e6=W("$ZodCheckLessThan",(n,e)=>{xa.init(n,e);let t=nPe[typeof e.value];n._zod.onattach.push(r=>{var s;let a=r._zod.bag,i=(s=e.inclusive?a.maximum:a.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?a.maximum=e.value:a.exclusiveMaximum=e.value)}),n._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:t,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:n,continue:!e.abort})}}),t6=W("$ZodCheckGreaterThan",(n,e)=>{xa.init(n,e);let t=nPe[typeof e.value];n._zod.onattach.push(r=>{var s;let a=r._zod.bag,i=(s=e.inclusive?a.minimum:a.exclusiveMinimum)!=null?s:Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?a.minimum=e.value:a.exclusiveMinimum=e.value)}),n._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:t,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:n,continue:!e.abort})}}),aPe=W("$ZodCheckMultipleOf",(n,e)=>{xa.init(n,e),n._zod.onattach.push(t=>{var a;var r;(a=(r=t._zod.bag).multipleOf)!=null||(r.multipleOf=e.value)}),n._zod.check=t=>{if(typeof t.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?t.value%e.value===BigInt(0):R3(t.value,e.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:e.value,input:t.value,inst:n,continue:!e.abort})}}),iPe=W("$ZodCheckNumberFormat",(n,e)=>{var s;xa.init(n,e),e.format=e.format||"float64";let t=(s=e.format)==null?void 0:s.includes("int"),r=t?"int":"number",[a,i]=z3[e.format];n._zod.onattach.push(o=>{let l=o._zod.bag;l.format=e.format,l.minimum=a,l.maximum=i,t&&(l.pattern=QDe)}),n._zod.check=o=>{let l=o.value;if(t){if(!Number.isInteger(l)){o.issues.push({expected:r,format:e.format,code:"invalid_type",input:l,inst:n});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,continue:!e.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,continue:!e.abort});return}}l<a&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:a,inclusive:!0,inst:n,continue:!e.abort}),l>i&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inst:n})}}),sPe=W("$ZodCheckMaxLength",(n,e)=>{var r;var t;xa.init(n,e),(r=(t=n._zod.def).when)!=null||(t.when=a=>{let i=a.value;return!yD(i)&&i.length!==void 0}),n._zod.onattach.push(a=>{var s;let i=(s=a._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;e.maximum<i&&(a._zod.bag.maximum=e.maximum)}),n._zod.check=a=>{let i=a.value;if(i.length<=e.maximum)return;let o=kD(i);a.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:n,continue:!e.abort})}}),oPe=W("$ZodCheckMinLength",(n,e)=>{var r;var t;xa.init(n,e),(r=(t=n._zod.def).when)!=null||(t.when=a=>{let i=a.value;return!yD(i)&&i.length!==void 0}),n._zod.onattach.push(a=>{var s;let i=(s=a._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;e.minimum>i&&(a._zod.bag.minimum=e.minimum)}),n._zod.check=a=>{let i=a.value;if(i.length>=e.minimum)return;let o=kD(i);a.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:n,continue:!e.abort})}}),lPe=W("$ZodCheckLengthEquals",(n,e)=>{var r;var t;xa.init(n,e),(r=(t=n._zod.def).when)!=null||(t.when=a=>{let i=a.value;return!yD(i)&&i.length!==void 0}),n._zod.onattach.push(a=>{let i=a._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),n._zod.check=a=>{let i=a.value,s=i.length;if(s===e.length)return;let o=kD(i),l=s>e.length;a.issues.push({origin:o,...l?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:a.value,inst:n,continue:!e.abort})}}),bD=W("$ZodCheckStringFormat",(n,e)=>{var a,i;var t,r;xa.init(n,e),n._zod.onattach.push(s=>{var l;let o=s._zod.bag;o.format=e.format,e.pattern&&((l=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(a=(t=n._zod).check)!=null||(t.check=s=>{e.pattern.lastIndex=0,!e.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:e.format,input:s.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:n,continue:!e.abort})}):(i=(r=n._zod).check)!=null||(r.check=()=>{})}),cPe=W("$ZodCheckRegex",(n,e)=>{bD.init(n,e),n._zod.check=t=>{e.pattern.lastIndex=0,!e.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:e.pattern.toString(),inst:n,continue:!e.abort})}}),dPe=W("$ZodCheckLowerCase",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=tPe),bD.init(n,e)}),uPe=W("$ZodCheckUpperCase",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=rPe),bD.init(n,e)}),pPe=W("$ZodCheckIncludes",(n,e)=>{xa.init(n,e);let t=Sm(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${t}`:t);e.pattern=r,n._zod.onattach.push(a=>{var s;let i=a._zod.bag;(s=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(r)}),n._zod.check=a=>{a.value.includes(e.includes,e.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:a.value,inst:n,continue:!e.abort})}}),mPe=W("$ZodCheckStartsWith",(n,e)=>{var r;xa.init(n,e);let t=new RegExp(`^${Sm(e.prefix)}.*`);(r=e.pattern)!=null||(e.pattern=t),n._zod.onattach.push(a=>{var s;let i=a._zod.bag;(s=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(t)}),n._zod.check=a=>{a.value.startsWith(e.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:a.value,inst:n,continue:!e.abort})}}),fPe=W("$ZodCheckEndsWith",(n,e)=>{var r;xa.init(n,e);let t=new RegExp(`.*${Sm(e.suffix)}$`);(r=e.pattern)!=null||(e.pattern=t),n._zod.onattach.push(a=>{var s;let i=a._zod.bag;(s=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(t)}),n._zod.check=a=>{a.value.endsWith(e.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:a.value,inst:n,continue:!e.abort})}}),hPe=W("$ZodCheckOverwrite",(n,e)=>{xa.init(n,e),n._zod.check=t=>{t.value=e.tx(t.value)}})});var JF,r6=y(()=>{JF=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
`).filter(s=>s),a=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(a)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){var i;let e=Function,t=this==null?void 0:this.args,a=[...((i=this==null?void 0:this.content)!=null?i:[""]).map(s=>` ${s}`)];return new e(...t,a.join(`
`))}}});var yPe,n6=y(()=>{yPe={major:4,minor:0,patch:0}});function IPe(n){if(n==="")return!0;if(n.length%4!==0)return!1;try{return atob(n),!0}catch(e){return!1}}function vXe(n){if(!Q3.test(n))return!1;let e=n.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=e.padEnd(Math.ceil(e.length/4)*4,"=");return IPe(t)}function kXe(n,e=null){try{let t=n.split(".");if(t.length!==3)return!1;let[r]=t;if(!r)return!1;let a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&(!("alg"in a)||a.alg!==e))}catch(t){return!1}}function vPe(n,e,t){n.issues.length&&e.issues.push(...Yc(t,n.issues)),e.value[t]=n.value}function XF(n,e,t){n.issues.length&&e.issues.push(...Yc(t,n.issues)),e.value[t]=n.value}function kPe(n,e,t,r){n.issues.length?r[t]===void 0?t in r?e.value[t]=void 0:e.value[t]=n.value:e.issues.push(...Yc(t,n.issues)):n.value===void 0?t in r&&(e.value[t]=void 0):e.value[t]=n.value}function TPe(n,e,t,r){for(let a of n)if(a.issues.length===0)return e.value=a.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:n.map(a=>a.issues.map(i=>Tl(i,r,zs())))}),e}function a6(n,e){if(n===e)return{valid:!0,data:n};if(n instanceof Date&&e instanceof Date&&+n==+e)return{valid:!0,data:n};if(fT(n)&&fT(e)){let t=Object.keys(e),r=Object.keys(n).filter(i=>t.indexOf(i)!==-1),a={...n,...e};for(let i of r){let s=a6(n[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};a[i]=s.data}return{valid:!0,data:a}}if(Array.isArray(n)&&Array.isArray(e)){if(n.length!==e.length)return{valid:!1,mergeErrorPath:[]};let t=[];for(let r=0;r<n.length;r++){let a=n[r],i=e[r],s=a6(a,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function bPe(n,e,t){if(e.issues.length&&n.issues.push(...e.issues),t.issues.length&&n.issues.push(...t.issues),ug(n))return n;let r=a6(e.value,t.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return n.value=r.data,n}function wPe(n,e){return n.value===void 0&&(n.value=e.defaultValue),n}function SPe(n,e){return!n.issues.length&&n.value===void 0&&n.issues.push({code:"invalid_type",expected:"nonoptional",input:n.value,inst:e}),n}function CPe(n,e,t){return ug(n)?n:e.out._zod.run({value:n.value,issues:n.issues},t)}function xPe(n){return n.value=Object.freeze(n.value),n}function EPe(n,e,t,r){var a;if(!n){let i={code:"custom",input:t,inst:r,path:[...(a=r._zod.def.path)!=null?a:[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),e.issues.push(B3(i))}}var Tr,wD,Fr,i6,s6,o6,l6,c6,d6,u6,p6,m6,f6,h6,DPe,PPe,APe,MPe,g6,y6,v6,k6,T6,b6,w6,S6,eL,C6,x6,E6,D6,P6,A6,tL,rL,M6,I6,N6,R6,_6,F6,L6,O6,z6,B6,j6,$6,U6,H6,V6,NPe=y(()=>{QF();pT();r6();K3();X3();Kc();n6();Kc();Tr=W("$ZodType",(n,e)=>{var a,i,s;var t;n!=null||(n={}),n._zod.def=e,n._zod.bag=n._zod.bag||{},n._zod.version=yPe;let r=[...(a=n._zod.def.checks)!=null?a:[]];n._zod.traits.has("$ZodCheck")&&r.unshift(n);for(let o of r)for(let l of o._zod.onattach)l(n);if(r.length===0)(i=(t=n._zod).deferred)!=null||(t.deferred=[]),(s=n._zod.deferred)==null||s.push(()=>{n._zod.run=n._zod.parse});else{let o=(l,c,d)=>{let u=ug(l),p;for(let m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(u)continue;let f=l.issues.length,h=m._zod.check(l);if(h instanceof Promise&&(d==null?void 0:d.async)===!1)throw new Su;if(p||h instanceof Promise)p=(p!=null?p:Promise.resolve()).then(async()=>{await h,l.issues.length!==f&&(u||(u=ug(l,f)))});else{if(l.issues.length===f)continue;u||(u=ug(l,f))}}return p?p.then(()=>l):l};n._zod.run=(l,c)=>{let d=n._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new Su;return d.then(u=>o(u,r,c))}return o(d,r,c)}}n["~standard"]={validate:o=>{var l;try{let c=pg(n,o);return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}}catch(c){return mg(n,o).then(d=>{var u;return d.success?{value:d.data}:{issues:(u=d.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}}),wD=W("$ZodString",(n,e)=>{var t,r,a;Tr.init(n,e),n._zod.pattern=(a=[...(r=(t=n==null?void 0:n._zod.bag)==null?void 0:t.patterns)!=null?r:[]].pop())!=null?a:ZDe(n._zod.bag),n._zod.parse=(i,s)=>{if(e.coerce)try{i.value=String(i.value)}catch(o){}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:n}),i}}),Fr=W("$ZodStringFormat",(n,e)=>{bD.init(n,e),wD.init(n,e)}),i6=W("$ZodGUID",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=FDe),Fr.init(n,e)}),s6=W("$ZodUUID",(n,e)=>{var t,r;if(e.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);(t=e.pattern)!=null||(e.pattern=Z3(i))}else(r=e.pattern)!=null||(e.pattern=Z3());Fr.init(n,e)}),o6=W("$ZodEmail",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=LDe),Fr.init(n,e)}),l6=W("$ZodURL",(n,e)=>{Fr.init(n,e),n._zod.check=t=>{try{let r=t.value,a=new URL(r),i=a.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(a.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:HDe.source,input:t.value,inst:n,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:t.value,inst:n,continue:!e.abort})),!r.endsWith("/")&&i.endsWith("/")?t.value=i.slice(0,-1):t.value=i;return}catch(r){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:n,continue:!e.abort})}}}),c6=W("$ZodEmoji",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=ODe()),Fr.init(n,e)}),d6=W("$ZodNanoID",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=RDe),Fr.init(n,e)}),u6=W("$ZodCUID",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=PDe),Fr.init(n,e)}),p6=W("$ZodCUID2",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=ADe),Fr.init(n,e)}),m6=W("$ZodULID",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=MDe),Fr.init(n,e)}),f6=W("$ZodXID",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=IDe),Fr.init(n,e)}),h6=W("$ZodKSUID",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=NDe),Fr.init(n,e)}),DPe=W("$ZodISODateTime",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=KDe(e)),Fr.init(n,e)}),PPe=W("$ZodISODate",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=qDe),Fr.init(n,e)}),APe=W("$ZodISOTime",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=YDe(e)),Fr.init(n,e)}),MPe=W("$ZodISODuration",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=_De),Fr.init(n,e)}),g6=W("$ZodIPv4",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=zDe),Fr.init(n,e),n._zod.onattach.push(r=>{let a=r._zod.bag;a.format="ipv4"})}),y6=W("$ZodIPv6",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=BDe),Fr.init(n,e),n._zod.onattach.push(r=>{let a=r._zod.bag;a.format="ipv6"}),n._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch(a){r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:n,continue:!e.abort})}}}),v6=W("$ZodCIDRv4",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=jDe),Fr.init(n,e)}),k6=W("$ZodCIDRv6",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=$De),Fr.init(n,e),n._zod.check=r=>{let[a,i]=r.value.split("/");try{if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${a}]`)}catch(s){r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:n,continue:!e.abort})}}});T6=W("$ZodBase64",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=UDe),Fr.init(n,e),n._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),n._zod.check=r=>{IPe(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:n,continue:!e.abort})}});b6=W("$ZodBase64URL",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Q3),Fr.init(n,e),n._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),n._zod.check=r=>{vXe(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:n,continue:!e.abort})}}),w6=W("$ZodE164",(n,e)=>{var t;(t=e.pattern)!=null||(e.pattern=VDe),Fr.init(n,e)});S6=W("$ZodJWT",(n,e)=>{Fr.init(n,e),n._zod.check=t=>{kXe(t.value,e.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:n,continue:!e.abort})}}),eL=W("$ZodNumber",(n,e)=>{var t;Tr.init(n,e),n._zod.pattern=(t=n._zod.bag.pattern)!=null?t:JDe,n._zod.parse=(r,a)=>{if(e.coerce)try{r.value=Number(r.value)}catch(o){}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:n,...s?{received:s}:{}}),r}}),C6=W("$ZodNumber",(n,e)=>{iPe.init(n,e),eL.init(n,e)}),x6=W("$ZodBoolean",(n,e)=>{Tr.init(n,e),n._zod.pattern=XDe,n._zod.parse=(t,r)=>{if(e.coerce)try{t.value=!!t.value}catch(i){}let a=t.value;return typeof a=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:n}),t}}),E6=W("$ZodNull",(n,e)=>{Tr.init(n,e),n._zod.pattern=ePe,n._zod.values=new Set([null]),n._zod.parse=(t,r)=>{let a=t.value;return a===null||t.issues.push({expected:"null",code:"invalid_type",input:a,inst:n}),t}}),D6=W("$ZodUnknown",(n,e)=>{Tr.init(n,e),n._zod.parse=t=>t}),P6=W("$ZodNever",(n,e)=>{Tr.init(n,e),n._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:n}),t)});A6=W("$ZodArray",(n,e)=>{Tr.init(n,e),n._zod.parse=(t,r)=>{let a=t.value;if(!Array.isArray(a))return t.issues.push({expected:"array",code:"invalid_type",input:a,inst:n}),t;t.value=Array(a.length);let i=[];for(let s=0;s<a.length;s++){let o=a[s],l=e.element._zod.run({value:o,issues:[]},r);l instanceof Promise?i.push(l.then(c=>vPe(c,t,s))):vPe(l,t,s)}return i.length?Promise.all(i).then(()=>t):t}});tL=W("$ZodObject",(n,e)=>{Tr.init(n,e);let t=gD(()=>{let u=Object.keys(e.shape);for(let m of u)if(!(e.shape[m]instanceof Tr))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);let p=O3(e.shape);return{shape:e.shape,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(p)}});_r(n._zod,"propValues",()=>{var m;let u=e.shape,p={};for(let f in u){let h=u[f]._zod;if(h.values){(m=p[f])!=null||(p[f]=new Set);for(let g of h.values)p[f].add(g)}}return p});let r=u=>{let p=new JF(["shape","payload","ctx"]),m=t.value,f=k=>{let T=dg(k);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};p.write("const input = payload.value;");let h=Object.create(null),g=0;for(let k of m.keys)h[k]=`key_${g++}`;p.write("const newResult = {}");for(let k of m.keys)if(m.optionalKeys.has(k)){let T=h[k];p.write(`const ${T} = ${f(k)};`);let b=dg(k);p.write(`
if (${T}.issues.length) {
if (input[${b}] === undefined) {
if (${b} in input) {
newResult[${b}] = undefined;
}
} else {
payload.issues = payload.issues.concat(
${T}.issues.map((iss) => ({
...iss,
path: iss.path ? [${b}, ...iss.path] : [${b}],
}))
);
}
} else if (${T}.value === undefined) {
if (${b} in input) newResult[${b}] = undefined;
} else {
newResult[${b}] = ${T}.value;
}
`)}else{let T=h[k];p.write(`const ${T} = ${f(k)};`),p.write(`
if (${T}.issues.length) payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
...iss,
path: iss.path ? [${dg(k)}, ...iss.path] : [${dg(k)}]
})));`),p.write(`newResult[${dg(k)}] = ${T}.value`)}p.write("payload.value = newResult;"),p.write("return payload;");let v=p.compile();return(k,T)=>v(u,k,T)},a,i=mT,s=!qF.jitless,l=s&&F3.value,c=e.catchall,d;n._zod.parse=(u,p)=>{d!=null||(d=t.value);let m=u.value;if(!i(m))return u.issues.push({expected:"object",code:"invalid_type",input:m,inst:n}),u;let f=[];if(s&&l&&(p==null?void 0:p.async)===!1&&p.jitless!==!0)a||(a=r(e.shape)),u=a(u,p);else{u.value={};let T=d.shape;for(let b of d.keys){let w=T[b],S=w._zod.run({value:m[b],issues:[]},p),C=w._zod.optin==="optional"&&w._zod.optout==="optional";S instanceof Promise?f.push(S.then(x=>C?kPe(x,u,b,m):XF(x,u,b))):C?kPe(S,u,b,m):XF(S,u,b)}}if(!c)return f.length?Promise.all(f).then(()=>u):u;let h=[],g=d.keySet,v=c._zod,k=v.def.type;for(let T of Object.keys(m)){if(g.has(T))continue;if(k==="never"){h.push(T);continue}let b=v.run({value:m[T],issues:[]},p);b instanceof Promise?f.push(b.then(w=>XF(w,u,T))):XF(b,u,T)}return h.length&&u.issues.push({code:"unrecognized_keys",keys:h,input:m,inst:n}),f.length?Promise.all(f).then(()=>u):u}});rL=W("$ZodUnion",(n,e)=>{Tr.init(n,e),_r(n._zod,"optin",()=>e.options.some(t=>t._zod.optin==="optional")?"optional":void 0),_r(n._zod,"optout",()=>e.options.some(t=>t._zod.optout==="optional")?"optional":void 0),_r(n._zod,"values",()=>{if(e.options.every(t=>t._zod.values))return new Set(e.options.flatMap(t=>Array.from(t._zod.values)))}),_r(n._zod,"pattern",()=>{if(e.options.every(t=>t._zod.pattern)){let t=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${t.map(r=>vD(r.source)).join("|")})$`)}}),n._zod.parse=(t,r)=>{let a=!1,i=[];for(let s of e.options){let o=s._zod.run({value:t.value,issues:[]},r);if(o instanceof Promise)i.push(o),a=!0;else{if(o.issues.length===0)return o;i.push(o)}}return a?Promise.all(i).then(s=>TPe(s,t,n,r)):TPe(i,t,n,r)}}),M6=W("$ZodDiscriminatedUnion",(n,e)=>{rL.init(n,e);let t=n._zod.parse;_r(n._zod,"propValues",()=>{let a={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[o,l]of Object.entries(s)){a[o]||(a[o]=new Set);for(let c of l)a[o].add(c)}}return a});let r=gD(()=>{let a=e.options,i=new Map;for(let s of a){let o=s._zod.propValues[e.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let l of o){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});n._zod.parse=(a,i)=>{let s=a.value;if(!mT(s))return a.issues.push({code:"invalid_type",expected:"object",input:s,inst:n}),a;let o=r.value.get(s==null?void 0:s[e.discriminator]);return o?o._zod.run(a,i):e.unionFallback?t(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[e.discriminator],inst:n}),a)}}),I6=W("$ZodIntersection",(n,e)=>{Tr.init(n,e),n._zod.parse=(t,r)=>{let a=t.value,i=e.left._zod.run({value:a,issues:[]},r),s=e.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>bPe(t,l,c)):bPe(t,i,s)}});N6=W("$ZodRecord",(n,e)=>{Tr.init(n,e),n._zod.parse=(t,r)=>{let a=t.value;if(!fT(a))return t.issues.push({expected:"record",code:"invalid_type",input:a,inst:n}),t;let i=[];if(e.keyType._zod.values){let s=e.keyType._zod.values;t.value={};for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){let c=e.valueType._zod.run({value:a[l],issues:[]},r);c instanceof Promise?i.push(c.then(d=>{d.issues.length&&t.issues.push(...Yc(l,d.issues)),t.value[l]=d.value})):(c.issues.length&&t.issues.push(...Yc(l,c.issues)),t.value[l]=c.value)}let o;for(let l in a)s.has(l)||(o=o!=null?o:[],o.push(l));o&&o.length>0&&t.issues.push({code:"unrecognized_keys",input:a,inst:n,keys:o})}else{t.value={};for(let s of Reflect.ownKeys(a)){if(s==="__proto__")continue;let o=e.keyType._zod.run({value:s,issues:[]},r);if(o instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(o.issues.length){t.issues.push({origin:"record",code:"invalid_key",issues:o.issues.map(c=>Tl(c,r,zs())),input:s,path:[s],inst:n}),t.value[o.value]=o.value;continue}let l=e.valueType._zod.run({value:a[s],issues:[]},r);l instanceof Promise?i.push(l.then(c=>{c.issues.length&&t.issues.push(...Yc(s,c.issues)),t.value[o.value]=c.value})):(l.issues.length&&t.issues.push(...Yc(s,l.issues)),t.value[o.value]=l.value)}}return i.length?Promise.all(i).then(()=>t):t}}),R6=W("$ZodEnum",(n,e)=>{Tr.init(n,e);let t=hD(e.entries);n._zod.values=new Set(t),n._zod.pattern=new RegExp(`^(${t.filter(r=>L3.has(typeof r)).map(r=>typeof r=="string"?Sm(r):r.toString()).join("|")})$`),n._zod.parse=(r,a)=>{let i=r.value;return n._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t,input:i,inst:n}),r}}),_6=W("$ZodLiteral",(n,e)=>{Tr.init(n,e),n._zod.values=new Set(e.values),n._zod.pattern=new RegExp(`^(${e.values.map(t=>typeof t=="string"?Sm(t):t?t.toString():String(t)).join("|")})$`),n._zod.parse=(t,r)=>{let a=t.value;return n._zod.values.has(a)||t.issues.push({code:"invalid_value",values:e.values,input:a,inst:n}),t}}),F6=W("$ZodTransform",(n,e)=>{Tr.init(n,e),n._zod.parse=(t,r)=>{let a=e.transform(t.value,t);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(s=>(t.value=s,t));if(a instanceof Promise)throw new Su;return t.value=a,t}}),L6=W("$ZodOptional",(n,e)=>{Tr.init(n,e),n._zod.optin="optional",n._zod.optout="optional",_r(n._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),_r(n._zod,"pattern",()=>{let t=e.innerType._zod.pattern;return t?new RegExp(`^(${vD(t.source)})?$`):void 0}),n._zod.parse=(t,r)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(t,r):t.value===void 0?t:e.innerType._zod.run(t,r)}),O6=W("$ZodNullable",(n,e)=>{Tr.init(n,e),_r(n._zod,"optin",()=>e.innerType._zod.optin),_r(n._zod,"optout",()=>e.innerType._zod.optout),_r(n._zod,"pattern",()=>{let t=e.innerType._zod.pattern;return t?new RegExp(`^(${vD(t.source)}|null)$`):void 0}),_r(n._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),n._zod.parse=(t,r)=>t.value===null?t:e.innerType._zod.run(t,r)}),z6=W("$ZodDefault",(n,e)=>{Tr.init(n,e),n._zod.optin="optional",_r(n._zod,"values",()=>e.innerType._zod.values),n._zod.parse=(t,r)=>{if(t.value===void 0)return t.value=e.defaultValue,t;let a=e.innerType._zod.run(t,r);return a instanceof Promise?a.then(i=>wPe(i,e)):wPe(a,e)}});B6=W("$ZodPrefault",(n,e)=>{Tr.init(n,e),n._zod.optin="optional",_r(n._zod,"values",()=>e.innerType._zod.values),n._zod.parse=(t,r)=>(t.value===void 0&&(t.value=e.defaultValue),e.innerType._zod.run(t,r))}),j6=W("$ZodNonOptional",(n,e)=>{Tr.init(n,e),_r(n._zod,"values",()=>{let t=e.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),n._zod.parse=(t,r)=>{let a=e.innerType._zod.run(t,r);return a instanceof Promise?a.then(i=>SPe(i,n)):SPe(a,n)}});$6=W("$ZodCatch",(n,e)=>{Tr.init(n,e),n._zod.optin="optional",_r(n._zod,"optout",()=>e.innerType._zod.optout),_r(n._zod,"values",()=>e.innerType._zod.values),n._zod.parse=(t,r)=>{let a=e.innerType._zod.run(t,r);return a instanceof Promise?a.then(i=>(t.value=i.value,i.issues.length&&(t.value=e.catchValue({...t,error:{issues:i.issues.map(s=>Tl(s,r,zs()))},input:t.value}),t.issues=[]),t)):(t.value=a.value,a.issues.length&&(t.value=e.catchValue({...t,error:{issues:a.issues.map(i=>Tl(i,r,zs()))},input:t.value}),t.issues=[]),t)}}),U6=W("$ZodPipe",(n,e)=>{Tr.init(n,e),_r(n._zod,"values",()=>e.in._zod.values),_r(n._zod,"optin",()=>e.in._zod.optin),_r(n._zod,"optout",()=>e.out._zod.optout),n._zod.parse=(t,r)=>{let a=e.in._zod.run(t,r);return a instanceof Promise?a.then(i=>CPe(i,e,r)):CPe(a,e,r)}});H6=W("$ZodReadonly",(n,e)=>{Tr.init(n,e),_r(n._zod,"propValues",()=>e.innerType._zod.propValues),_r(n._zod,"values",()=>e.innerType._zod.values),_r(n._zod,"optin",()=>e.innerType._zod.optin),_r(n._zod,"optout",()=>e.innerType._zod.optout),n._zod.parse=(t,r)=>{let a=e.innerType._zod.run(t,r);return a instanceof Promise?a.then(xPe):xPe(a)}});V6=W("$ZodCustom",(n,e)=>{xa.init(n,e),Tr.init(n,e),n._zod.parse=(t,r)=>t,n._zod.check=t=>{let r=t.value,a=e.fn(r);if(a instanceof Promise)return a.then(i=>EPe(i,t,r,n));EPe(a,t,r,n)}})});function RPe(){return{localeError:bXe()}}var TXe,bXe,_Pe=y(()=>{Kc();TXe=n=>{let e=typeof n;switch(e){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return e},bXe=()=>{let n={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(r){var a;return(a=n[r])!=null?a:null}let t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{var a,i,s,o;switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${TXe(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${KF(r.values[0])}`:`Invalid option: expected one of ${GF(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",c=e(r.origin);return c?`Too big: expected ${(a=r.origin)!=null?a:"value"} to have ${l}${r.maximum.toString()} ${(i=c.unit)!=null?i:"elements"}`:`Too big: expected ${(s=r.origin)!=null?s:"value"} to be ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",c=e(r.origin);return c?`Too small: expected ${r.origin} to have ${l}${r.minimum.toString()} ${c.unit}`:`Too small: expected ${r.origin} to be ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Invalid string: must start with "${l.prefix}"`:l.format==="ends_with"?`Invalid string: must end with "${l.suffix}"`:l.format==="includes"?`Invalid string: must include "${l.includes}"`:l.format==="regex"?`Invalid string: must match pattern ${l.pattern}`:`Invalid ${(o=t[l.format])!=null?o:r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${GF(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function FPe(){return new SD}var wXe,SXe,SD,Cm,W6=y(()=>{wXe=Symbol("ZodOutput"),SXe=Symbol("ZodInput"),SD=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){var r;let t=e._zod.parent;if(t){let a={...(r=this.get(t))!=null?r:{}};return delete a.id,{...a,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};Cm=FPe()});function q6(n,e){return new n({type:"string",...Ke(e)})}function G6(n,e){return new n({type:"string",format:"email",check:"string_format",abort:!1,...Ke(e)})}function nL(n,e){return new n({type:"string",format:"guid",check:"string_format",abort:!1,...Ke(e)})}function Y6(n,e){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,...Ke(e)})}function K6(n,e){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ke(e)})}function Z6(n,e){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ke(e)})}function Q6(n,e){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ke(e)})}function J6(n,e){return new n({type:"string",format:"url",check:"string_format",abort:!1,...Ke(e)})}function X6(n,e){return new n({type:"string",format:"emoji",check:"string_format",abort:!1,...Ke(e)})}function e9(n,e){return new n({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ke(e)})}function t9(n,e){return new n({type:"string",format:"cuid",check:"string_format",abort:!1,...Ke(e)})}function r9(n,e){return new n({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ke(e)})}function n9(n,e){return new n({type:"string",format:"ulid",check:"string_format",abort:!1,...Ke(e)})}function a9(n,e){return new n({type:"string",format:"xid",check:"string_format",abort:!1,...Ke(e)})}function i9(n,e){return new n({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ke(e)})}function s9(n,e){return new n({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ke(e)})}function o9(n,e){return new n({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ke(e)})}function l9(n,e){return new n({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ke(e)})}function c9(n,e){return new n({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ke(e)})}function d9(n,e){return new n({type:"string",format:"base64",check:"string_format",abort:!1,...Ke(e)})}function u9(n,e){return new n({type:"string",format:"base64url",check:"string_format",abort:!1,...Ke(e)})}function p9(n,e){return new n({type:"string",format:"e164",check:"string_format",abort:!1,...Ke(e)})}function m9(n,e){return new n({type:"string",format:"jwt",check:"string_format",abort:!1,...Ke(e)})}function LPe(n,e){return new n({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ke(e)})}function OPe(n,e){return new n({type:"string",format:"date",check:"string_format",...Ke(e)})}function zPe(n,e){return new n({type:"string",format:"time",check:"string_format",precision:null,...Ke(e)})}function BPe(n,e){return new n({type:"string",format:"duration",check:"string_format",...Ke(e)})}function f9(n,e){return new n({type:"number",checks:[],...Ke(e)})}function h9(n,e){return new n({type:"number",check:"number_format",abort:!1,format:"safeint",...Ke(e)})}function g9(n,e){return new n({type:"boolean",...Ke(e)})}function y9(n,e){return new n({type:"null",...Ke(e)})}function v9(n){return new n({type:"unknown"})}function k9(n,e){return new n({type:"never",...Ke(e)})}function aL(n,e){return new e6({check:"less_than",...Ke(e),value:n,inclusive:!1})}function CD(n,e){return new e6({check:"less_than",...Ke(e),value:n,inclusive:!0})}function iL(n,e){return new t6({check:"greater_than",...Ke(e),value:n,inclusive:!1})}function xD(n,e){return new t6({check:"greater_than",...Ke(e),value:n,inclusive:!0})}function sL(n,e){return new aPe({check:"multiple_of",...Ke(e),value:n})}function oL(n,e){return new sPe({check:"max_length",...Ke(e),maximum:n})}function hT(n,e){return new oPe({check:"min_length",...Ke(e),minimum:n})}function lL(n,e){return new lPe({check:"length_equals",...Ke(e),length:n})}function T9(n,e){return new cPe({check:"string_format",format:"regex",...Ke(e),pattern:n})}function b9(n){return new dPe({check:"string_format",format:"lowercase",...Ke(n)})}function w9(n){return new uPe({check:"string_format",format:"uppercase",...Ke(n)})}function S9(n,e){return new pPe({check:"string_format",format:"includes",...Ke(e),includes:n})}function C9(n,e){return new mPe({check:"string_format",format:"starts_with",...Ke(e),prefix:n})}function x9(n,e){return new fPe({check:"string_format",format:"ends_with",...Ke(e),suffix:n})}function fg(n){return new hPe({check:"overwrite",tx:n})}function E9(n){return fg(e=>e.normalize(n))}function D9(){return fg(n=>n.trim())}function P9(){return fg(n=>n.toLowerCase())}function A9(){return fg(n=>n.toUpperCase())}function jPe(n,e,t){return new n({type:"array",element:e,...Ke(t)})}function M9(n,e,t){var i;let r=Ke(t);return(i=r.abort)!=null||(r.abort=!0),new n({type:"custom",check:"custom",fn:e,...r})}function I9(n,e,t){return new n({type:"custom",check:"custom",fn:e,...Ke(t)})}var $Pe=y(()=>{QF();Kc()});var UPe=y(()=>{});function N9(n,e){if(n instanceof SD){let r=new cL(e),a={};for(let o of n._idmap.entries()){let[l,c]=o;r.process(c)}let i={},s={registry:n,uri:e==null?void 0:e.uri,defs:a};for(let o of n._idmap.entries()){let[l,c]=o;i[l]=r.emit(c,{...e,external:s})}if(Object.keys(a).length>0){let o=r.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[o]:a}}return{schemas:i}}let t=new cL(e);return t.process(n),t.emit(n,e)}function Xn(n,e){let t=e!=null?e:{seen:new Set};if(t.seen.has(n))return!1;t.seen.add(n);let a=n._zod.def;switch(a.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Xn(a.element,t);case"object":{for(let i in a.shape)if(Xn(a.shape[i],t))return!0;return!1}case"union":{for(let i of a.options)if(Xn(i,t))return!0;return!1}case"intersection":return Xn(a.left,t)||Xn(a.right,t);case"tuple":{for(let i of a.items)if(Xn(i,t))return!0;return!!(a.rest&&Xn(a.rest,t))}case"record":return Xn(a.keyType,t)||Xn(a.valueType,t);case"map":return Xn(a.keyType,t)||Xn(a.valueType,t);case"set":return Xn(a.valueType,t);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Xn(a.innerType,t);case"lazy":return Xn(a.getter(),t);case"default":return Xn(a.innerType,t);case"prefault":return Xn(a.innerType,t);case"custom":return!1;case"transform":return!0;case"pipe":return Xn(a.in,t)||Xn(a.out,t);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${a.type}`)}var cL,HPe=y(()=>{W6();Kc();cL=class{constructor(e){var t,r,a,i,s;this.counter=0,this.metadataRegistry=(t=e==null?void 0:e.metadata)!=null?t:Cm,this.target=(r=e==null?void 0:e.target)!=null?r:"draft-2020-12",this.unrepresentable=(a=e==null?void 0:e.unrepresentable)!=null?a:"throw",this.override=(i=e==null?void 0:e.override)!=null?i:(()=>{}),this.io=(s=e==null?void 0:e.io)!=null?s:"output",this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var u,p,m,f,h;var r;let a=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,t.schemaPath.includes(e)&&(s.cycle=t.path),s.schema;let o={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,o);let l=(p=(u=e._zod).toJSONSchema)==null?void 0:p.call(u);if(l)o.schema=l;else{let g={...t,schemaPath:[...t.schemaPath,e],path:t.path},v=e._zod.parent;if(v)o.ref=v,this.process(v,g),this.seen.get(v).isParent=!0;else{let k=o.schema;switch(a.type){case"string":{let T=k;T.type="string";let{minimum:b,maximum:w,format:S,patterns:C,contentEncoding:x}=e._zod.bag;if(typeof b=="number"&&(T.minLength=b),typeof w=="number"&&(T.maxLength=w),S&&(T.format=(m=i[S])!=null?m:S,T.format===""&&delete T.format),x&&(T.contentEncoding=x),C&&C.size>0){let E=[...C];E.length===1?T.pattern=E[0].source:E.length>1&&(o.schema.allOf=[...E.map(_=>({...this.target==="draft-7"?{type:"string"}:{},pattern:_.source}))])}break}case"number":{let T=k,{minimum:b,maximum:w,format:S,multipleOf:C,exclusiveMaximum:x,exclusiveMinimum:E}=e._zod.bag;typeof S=="string"&&S.includes("int")?T.type="integer":T.type="number",typeof E=="number"&&(T.exclusiveMinimum=E),typeof b=="number"&&(T.minimum=b,typeof E=="number"&&(E>=b?delete T.minimum:delete T.exclusiveMinimum)),typeof x=="number"&&(T.exclusiveMaximum=x),typeof w=="number"&&(T.maximum=w,typeof x=="number"&&(x<=w?delete T.maximum:delete T.exclusiveMaximum)),typeof C=="number"&&(T.multipleOf=C);break}case"boolean":{let T=k;T.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{k.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{k.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let T=k,{minimum:b,maximum:w}=e._zod.bag;typeof b=="number"&&(T.minItems=b),typeof w=="number"&&(T.maxItems=w),T.type="array",T.items=this.process(a.element,{...g,path:[...g.path,"items"]});break}case"object":{let T=k;T.type="object",T.properties={};let b=a.shape;for(let C in b)T.properties[C]=this.process(b[C],{...g,path:[...g.path,"properties",C]});let w=new Set(Object.keys(b)),S=new Set([...w].filter(C=>{let x=a.shape[C]._zod;return this.io==="input"?x.optin===void 0:x.optout===void 0}));S.size>0&&(T.required=Array.from(S)),((f=a.catchall)==null?void 0:f._zod.def.type)==="never"?T.additionalProperties=!1:a.catchall?a.catchall&&(T.additionalProperties=this.process(a.catchall,{...g,path:[...g.path,"additionalProperties"]})):this.io==="output"&&(T.additionalProperties=!1);break}case"union":{let T=k;T.anyOf=a.options.map((b,w)=>this.process(b,{...g,path:[...g.path,"anyOf",w]}));break}case"intersection":{let T=k,b=this.process(a.left,{...g,path:[...g.path,"allOf",0]}),w=this.process(a.right,{...g,path:[...g.path,"allOf",1]}),S=x=>"allOf"in x&&Object.keys(x).length===1,C=[...S(b)?b.allOf:[b],...S(w)?w.allOf:[w]];T.allOf=C;break}case"tuple":{let T=k;T.type="array";let b=a.items.map((C,x)=>this.process(C,{...g,path:[...g.path,"prefixItems",x]}));if(this.target==="draft-2020-12"?T.prefixItems=b:T.items=b,a.rest){let C=this.process(a.rest,{...g,path:[...g.path,"items"]});this.target==="draft-2020-12"?T.items=C:T.additionalItems=C}a.rest&&(T.items=this.process(a.rest,{...g,path:[...g.path,"items"]}));let{minimum:w,maximum:S}=e._zod.bag;typeof w=="number"&&(T.minItems=w),typeof S=="number"&&(T.maxItems=S);break}case"record":{let T=k;T.type="object",T.propertyNames=this.process(a.keyType,{...g,path:[...g.path,"propertyNames"]}),T.additionalProperties=this.process(a.valueType,{...g,path:[...g.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let T=k,b=hD(a.entries);b.every(w=>typeof w=="number")&&(T.type="number"),b.every(w=>typeof w=="string")&&(T.type="string"),T.enum=b;break}case"literal":{let T=k,b=[];for(let w of a.values)if(w===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof w=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(w))}else b.push(w);if(b.length!==0)if(b.length===1){let w=b[0];T.type=w===null?"null":typeof w,T.const=w}else b.every(w=>typeof w=="number")&&(T.type="number"),b.every(w=>typeof w=="string")&&(T.type="string"),b.every(w=>typeof w=="boolean")&&(T.type="string"),b.every(w=>w===null)&&(T.type="null"),T.enum=b;break}case"file":{let T=k,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:w,maximum:S,mime:C}=e._zod.bag;w!==void 0&&(b.minLength=w),S!==void 0&&(b.maxLength=S),C?C.length===1?(b.contentMediaType=C[0],Object.assign(T,b)):T.anyOf=C.map(x=>({...b,contentMediaType:x})):Object.assign(T,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let T=this.process(a.innerType,g);k.anyOf=[T,{type:"null"}];break}case"nonoptional":{this.process(a.innerType,g),o.ref=a.innerType;break}case"success":{let T=k;T.type="boolean";break}case"default":{this.process(a.innerType,g),o.ref=a.innerType,k.default=JSON.parse(JSON.stringify(a.defaultValue));break}case"prefault":{this.process(a.innerType,g),o.ref=a.innerType,this.io==="input"&&(k._prefault=JSON.parse(JSON.stringify(a.defaultValue)));break}case"catch":{this.process(a.innerType,g),o.ref=a.innerType;let T;try{T=a.catchValue(void 0)}catch(b){throw new Error("Dynamic catch values are not supported in JSON Schema")}k.default=T;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let T=k,b=e._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");T.type="string",T.pattern=b.source;break}case"pipe":{let T=this.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;this.process(T,g),o.ref=T;break}case"readonly":{this.process(a.innerType,g),o.ref=a.innerType,k.readOnly=!0;break}case"promise":{this.process(a.innerType,g),o.ref=a.innerType;break}case"optional":{this.process(a.innerType,g),o.ref=a.innerType;break}case"lazy":{let T=e._zod.innerType;this.process(T,g),o.ref=T;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let c=this.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),this.io==="input"&&Xn(e)&&(delete o.schema.examples,delete o.schema.default),this.io==="input"&&o.schema._prefault&&((h=(r=o.schema).default)!=null||(r.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(e).schema}emit(e,t){var d,u,p,m,f,h,g,v,k,T;let r={cycles:(d=t==null?void 0:t.cycles)!=null?d:"ref",reused:(u=t==null?void 0:t.reused)!=null?u:"inline",external:(p=t==null?void 0:t.external)!=null?p:void 0},a=this.seen.get(e);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=b=>{var E,_,F,I,A;let w=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let R=(E=r.external.registry.get(b[0]))==null?void 0:E.id,O=(_=r.external.uri)!=null?_:(pe=>pe);if(R)return{ref:O(R)};let U=(I=(F=b[1].defId)!=null?F:b[1].schema.id)!=null?I:`schema${this.counter++}`;return b[1].defId=U,{defId:U,ref:`${O("__shared")}#/${w}/${U}`}}if(b[1]===a)return{ref:"#"};let C=`#/${w}/`,x=(A=b[1].schema.id)!=null?A:`__schema${this.counter++}`;return{defId:x,ref:C+x}},s=b=>{if(b[1].schema.$ref)return;let w=b[1],{ref:S,defId:C}=i(b);w.def={...w.schema},C&&(w.defId=C);let x=w.schema;for(let E in x)delete x[E];x.$ref=S};if(r.cycles==="throw")for(let b of this.seen.entries()){let w=b[1];if(w.cycle)throw new Error(`Cycle detected: #/${(m=w.cycle)==null?void 0:m.join("/")}/<root>
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let b of this.seen.entries()){let w=b[1];if(e===b[0]){s(b);continue}if(r.external){let C=(f=r.external.registry.get(b[0]))==null?void 0:f.id;if(e!==b[0]&&C){s(b);continue}}if((h=this.metadataRegistry.get(b[0]))==null?void 0:h.id){s(b);continue}if(w.cycle){s(b);continue}if(w.count>1&&r.reused==="ref"){s(b);continue}}let o=(b,w)=>{var _,F,I;let S=this.seen.get(b),C=(_=S.def)!=null?_:S.schema,x={...C};if(S.ref===null)return;let E=S.ref;if(S.ref=null,E){o(E,w);let A=this.seen.get(E).schema;A.$ref&&w.target==="draft-7"?(C.allOf=(F=C.allOf)!=null?F:[],C.allOf.push(A)):(Object.assign(C,A),Object.assign(C,x))}S.isParent||this.override({zodSchema:b,jsonSchema:C,path:(I=S.path)!=null?I:[]})};for(let b of[...this.seen.entries()].reverse())o(b[0],{target:this.target});let l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(g=r.external)!=null&&g.uri){let b=(v=r.external.registry.get(e))==null?void 0:v.id;if(!b)throw new Error("Schema is missing an `id` property");l.$id=r.external.uri(b)}Object.assign(l,a.def);let c=(T=(k=r.external)==null?void 0:k.defs)!=null?T:{};for(let b of this.seen.entries()){let w=b[1];w.def&&w.defId&&(c[w.defId]=w.def)}r.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch(b){throw new Error("Error converting schema to JSON.")}}}});var js=y(()=>{pT();K3();U3();NPe();QF();n6();Kc();W6();r6();UPe();$Pe();HPe()});var R9=y(()=>{js()});function _9(n,e){let t={type:"object",get shape(){return At.assignProp(this,"shape",{...n}),this.shape},...At.normalizeParams(e)};return new iet(t)}var aet,iet,VPe=y(()=>{js();js();R9();aet=W("ZodMiniType",(n,e)=>{if(!n._zod)throw new Error("Uninitialized schema in ZodMiniType.");Tr.init(n,e),n.def=e,n.parse=(t,r)=>V3(n,t,r,{callee:n.parse}),n.safeParse=(t,r)=>pg(n,t,r),n.parseAsync=async(t,r)=>q3(n,t,r,{callee:n.parseAsync}),n.safeParseAsync=async(t,r)=>mg(n,t,r),n.check=(...t)=>{var r;return n.clone({...e,checks:[...(r=e.checks)!=null?r:[],...t.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]})},n.clone=(t,r)=>Bs(n,t,r),n.brand=()=>n,n.register=((t,r)=>(t.add(n,r),n))}),iet=W("ZodMiniObject",(n,e)=>{tL.init(n,e),aet.init(n,e),At.defineLazy(n,"shape",()=>e.shape)})});var WPe=y(()=>{});var qPe=y(()=>{R9();VPe();WPe();js()});var GPe=y(()=>{qPe()});var F9=y(()=>{GPe()});function No(n){return!!n._zod}function hg(n){let e=Object.values(n);if(e.length===0)return _9({});let t=e.every(No),r=e.every(a=>!No(a));if(t)return _9(n);if(r)return fq(n);throw new Error("Mixed Zod versions detected in object shape.")}function xm(n,e){return No(n)?pg(n,e):n.safeParse(e)}async function dL(n,e){return No(n)?await mg(n,e):await n.safeParseAsync(e)}function Em(n){var t,r;if(!n)return;let e;if(No(n)?e=(r=(t=n._zod)==null?void 0:t.def)==null?void 0:r.shape:e=n.shape,!!e){if(typeof e=="function")try{return e()}catch(a){return}return e}}function gT(n){var e;if(n){if(typeof n=="object"){let t=n,r=n;if(!t._def&&!r._zod){let a=Object.values(n);if(a.length>0&&a.every(i=>typeof i=="object"&&i!==null&&(i._def!==void 0||i._zod!==void 0||typeof i.parse=="function")))return hg(n)}}if(No(n)){let r=(e=n._zod)==null?void 0:e.def;if(r&&(r.type==="object"||r.shape!==void 0))return n}else if(n.shape!==void 0)return n}}function uL(n){if(n&&typeof n=="object"){if("message"in n&&typeof n.message=="string")return n.message;if("issues"in n&&Array.isArray(n.issues)&&n.issues.length>0){let e=n.issues[0];if(e&&typeof e=="object"&&"message"in e)return String(e.message)}try{return JSON.stringify(n)}catch(e){return String(n)}}return String(n)}function KPe(n){return n.description}function ZPe(n){var t,r,a;if(No(n))return((r=(t=n._zod)==null?void 0:t.def)==null?void 0:r.type)==="optional";let e=n;return typeof n.isOptional=="function"?n.isOptional():((a=e._def)==null?void 0:a.typeName)==="ZodOptional"}function pL(n){var a;if(No(n)){let s=(a=n._zod)==null?void 0:a.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let t=n._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let r=n.value;if(r!==void 0)return r}var DD=y(()=>{mD();F9()});var L9=y(()=>{js()});var yT={};Xe(yT,{ZodISODate:()=>JPe,ZodISODateTime:()=>QPe,ZodISODuration:()=>e0e,ZodISOTime:()=>XPe,date:()=>z9,datetime:()=>O9,duration:()=>j9,time:()=>B9});function O9(n){return LPe(QPe,n)}function z9(n){return OPe(JPe,n)}function B9(n){return zPe(XPe,n)}function j9(n){return BPe(e0e,n)}var QPe,JPe,XPe,e0e,$9=y(()=>{js();U9();QPe=W("ZodISODateTime",(n,e)=>{DPe.init(n,e),Zr.init(n,e)});JPe=W("ZodISODate",(n,e)=>{PPe.init(n,e),Zr.init(n,e)});XPe=W("ZodISOTime",(n,e)=>{APe.init(n,e),Zr.init(n,e)});e0e=W("ZodISODuration",(n,e)=>{MPe.init(n,e),Zr.init(n,e)})});var t0e,Edr,PD,H9=y(()=>{js();js();t0e=(n,e)=>{ZF.init(n,e),n.name="ZodError",Object.defineProperties(n,{format:{value:t=>$3(n,t)},flatten:{value:t=>j3(n,t)},addIssue:{value:t=>n.issues.push(t)},addIssues:{value:t=>n.issues.push(...t)},isEmpty:{get(){return n.issues.length===0}}})},Edr=W("ZodError",t0e),PD=W("ZodError",t0e,{Parent:Error})});var r0e,n0e,a0e,i0e,V9=y(()=>{js();H9();r0e=H3(PD),n0e=W3(PD),a0e=G3(PD),i0e=Y3(PD)});function V(n){return q6(fet,n)}function gr(n){return f9(d0e,n)}function o0e(n){return h9(Ret,n)}function da(n){return g9(_et,n)}function G9(n){return y9(Fet,n)}function Qr(){return v9(Let)}function zet(n){return k9(Oet,n)}function Bt(n,e){return jPe(Bet,n,e)}function ke(n,e){let t={type:"object",get shape(){return At.assignProp(this,"shape",{...n}),this.shape},...At.normalizeParams(e)};return new u0e(t)}function Ti(n,e){return new u0e({type:"object",get shape(){return At.assignProp(this,"shape",{...n}),this.shape},catchall:Qr(),...At.normalizeParams(e)})}function Lr(n,e){return new p0e({type:"union",options:n,...At.normalizeParams(e)})}function Y9(n,e,t){return new jet({type:"union",options:e,discriminator:n,...At.normalizeParams(t)})}function fL(n,e){return new $et({type:"intersection",left:n,right:e})}function Jr(n,e,t){return new Uet({type:"record",keyType:n,valueType:e,...At.normalizeParams(t)})}function es(n,e){let t=Array.isArray(n)?Object.fromEntries(n.map(r=>[r,r])):n;return new W9({type:"enum",entries:t,...At.normalizeParams(e)})}function Fe(n,e){return new Het({type:"literal",values:Array.isArray(n)?n:[n],...At.normalizeParams(e)})}function m0e(n){return new Vet({type:"transform",transform:n})}function cn(n){return new f0e({type:"optional",innerType:n})}function l0e(n){return new Wet({type:"nullable",innerType:n})}function Get(n,e){return new qet({type:"default",innerType:n,get defaultValue(){return typeof e=="function"?e():e}})}function Ket(n,e){return new Yet({type:"prefault",innerType:n,get defaultValue(){return typeof e=="function"?e():e}})}function Zet(n,e){return new h0e({type:"nonoptional",innerType:n,...At.normalizeParams(e)})}function Jet(n,e){return new Qet({type:"catch",innerType:n,catchValue:typeof e=="function"?e:()=>e})}function q9(n,e){return new Xet({type:"pipe",in:n,out:e})}function ttt(n){return new ett({type:"readonly",innerType:n})}function rtt(n){let e=new xa({check:"custom"});return e._zod.check=n,e}function y0e(n,e){return M9(g0e,n!=null?n:(()=>!0),e)}function ntt(n,e={}){return I9(g0e,n,e)}function att(n){let e=rtt(t=>(t.addIssue=r=>{var a,i,s,o;if(typeof r=="string")t.issues.push(At.issue(r,t.value,e._zod.def));else{let l=r;l.fatal&&(l.continue=!1),(a=l.code)!=null||(l.code="custom"),(i=l.input)!=null||(l.input=t.value),(s=l.inst)!=null||(l.inst=e),(o=l.continue)!=null||(l.continue=!e._zod.def.abort),t.issues.push(At.issue(l))}},n(t.value,t)));return e}function K9(n,e){return q9(m0e(n),e)}var dn,c0e,fet,Zr,het,s0e,mL,get,yet,vet,ket,Tet,bet,wet,Cet,xet,Eet,Det,Pet,Aet,Met,Iet,Net,d0e,Ret,_et,Fet,Let,Oet,Bet,u0e,p0e,jet,$et,Uet,W9,Het,Vet,f0e,Wet,qet,Yet,h0e,Qet,Xet,ett,g0e,U9=y(()=>{js();js();L9();$9();V9();dn=W("ZodType",(n,e)=>(Tr.init(n,e),n.def=e,Object.defineProperty(n,"_def",{value:e}),n.check=(...t)=>{var r;return n.clone({...e,checks:[...(r=e.checks)!=null?r:[],...t.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]})},n.clone=(t,r)=>Bs(n,t,r),n.brand=()=>n,n.register=((t,r)=>(t.add(n,r),n)),n.parse=(t,r)=>r0e(n,t,r,{callee:n.parse}),n.safeParse=(t,r)=>a0e(n,t,r),n.parseAsync=async(t,r)=>n0e(n,t,r,{callee:n.parseAsync}),n.safeParseAsync=async(t,r)=>i0e(n,t,r),n.spa=n.safeParseAsync,n.refine=(t,r)=>n.check(ntt(t,r)),n.superRefine=t=>n.check(att(t)),n.overwrite=t=>n.check(fg(t)),n.optional=()=>cn(n),n.nullable=()=>l0e(n),n.nullish=()=>cn(l0e(n)),n.nonoptional=t=>Zet(n,t),n.array=()=>Bt(n),n.or=t=>Lr([n,t]),n.and=t=>fL(n,t),n.transform=t=>q9(n,m0e(t)),n.default=t=>Get(n,t),n.prefault=t=>Ket(n,t),n.catch=t=>Jet(n,t),n.pipe=t=>q9(n,t),n.readonly=()=>ttt(n),n.describe=t=>{let r=n.clone();return Cm.add(r,{description:t}),r},Object.defineProperty(n,"description",{get(){var t;return(t=Cm.get(n))==null?void 0:t.description},configurable:!0}),n.meta=(...t)=>{if(t.length===0)return Cm.get(n);let r=n.clone();return Cm.add(r,t[0]),r},n.isOptional=()=>n.safeParse(void 0).success,n.isNullable=()=>n.safeParse(null).success,n)),c0e=W("_ZodString",(n,e)=>{var r,a,i;wD.init(n,e),dn.init(n,e);let t=n._zod.bag;n.format=(r=t.format)!=null?r:null,n.minLength=(a=t.minimum)!=null?a:null,n.maxLength=(i=t.maximum)!=null?i:null,n.regex=(...s)=>n.check(T9(...s)),n.includes=(...s)=>n.check(S9(...s)),n.startsWith=(...s)=>n.check(C9(...s)),n.endsWith=(...s)=>n.check(x9(...s)),n.min=(...s)=>n.check(hT(...s)),n.max=(...s)=>n.check(oL(...s)),n.length=(...s)=>n.check(lL(...s)),n.nonempty=(...s)=>n.check(hT(1,...s)),n.lowercase=s=>n.check(b9(s)),n.uppercase=s=>n.check(w9(s)),n.trim=()=>n.check(D9()),n.normalize=(...s)=>n.check(E9(...s)),n.toLowerCase=()=>n.check(P9()),n.toUpperCase=()=>n.check(A9())}),fet=W("ZodString",(n,e)=>{wD.init(n,e),c0e.init(n,e),n.email=t=>n.check(G6(het,t)),n.url=t=>n.check(J6(get,t)),n.jwt=t=>n.check(m9(Net,t)),n.emoji=t=>n.check(X6(yet,t)),n.guid=t=>n.check(nL(s0e,t)),n.uuid=t=>n.check(Y6(mL,t)),n.uuidv4=t=>n.check(K6(mL,t)),n.uuidv6=t=>n.check(Z6(mL,t)),n.uuidv7=t=>n.check(Q6(mL,t)),n.nanoid=t=>n.check(e9(vet,t)),n.guid=t=>n.check(nL(s0e,t)),n.cuid=t=>n.check(t9(ket,t)),n.cuid2=t=>n.check(r9(Tet,t)),n.ulid=t=>n.check(n9(bet,t)),n.base64=t=>n.check(d9(Aet,t)),n.base64url=t=>n.check(u9(Met,t)),n.xid=t=>n.check(a9(wet,t)),n.ksuid=t=>n.check(i9(Cet,t)),n.ipv4=t=>n.check(s9(xet,t)),n.ipv6=t=>n.check(o9(Eet,t)),n.cidrv4=t=>n.check(l9(Det,t)),n.cidrv6=t=>n.check(c9(Pet,t)),n.e164=t=>n.check(p9(Iet,t)),n.datetime=t=>n.check(O9(t)),n.date=t=>n.check(z9(t)),n.time=t=>n.check(B9(t)),n.duration=t=>n.check(j9(t))});Zr=W("ZodStringFormat",(n,e)=>{Fr.init(n,e),c0e.init(n,e)}),het=W("ZodEmail",(n,e)=>{o6.init(n,e),Zr.init(n,e)}),s0e=W("ZodGUID",(n,e)=>{i6.init(n,e),Zr.init(n,e)}),mL=W("ZodUUID",(n,e)=>{s6.init(n,e),Zr.init(n,e)}),get=W("ZodURL",(n,e)=>{l6.init(n,e),Zr.init(n,e)}),yet=W("ZodEmoji",(n,e)=>{c6.init(n,e),Zr.init(n,e)}),vet=W("ZodNanoID",(n,e)=>{d6.init(n,e),Zr.init(n,e)}),ket=W("ZodCUID",(n,e)=>{u6.init(n,e),Zr.init(n,e)}),Tet=W("ZodCUID2",(n,e)=>{p6.init(n,e),Zr.init(n,e)}),bet=W("ZodULID",(n,e)=>{m6.init(n,e),Zr.init(n,e)}),wet=W("ZodXID",(n,e)=>{f6.init(n,e),Zr.init(n,e)}),Cet=W("ZodKSUID",(n,e)=>{h6.init(n,e),Zr.init(n,e)}),xet=W("ZodIPv4",(n,e)=>{g6.init(n,e),Zr.init(n,e)}),Eet=W("ZodIPv6",(n,e)=>{y6.init(n,e),Zr.init(n,e)}),Det=W("ZodCIDRv4",(n,e)=>{v6.init(n,e),Zr.init(n,e)}),Pet=W("ZodCIDRv6",(n,e)=>{k6.init(n,e),Zr.init(n,e)}),Aet=W("ZodBase64",(n,e)=>{T6.init(n,e),Zr.init(n,e)}),Met=W("ZodBase64URL",(n,e)=>{b6.init(n,e),Zr.init(n,e)}),Iet=W("ZodE164",(n,e)=>{w6.init(n,e),Zr.init(n,e)}),Net=W("ZodJWT",(n,e)=>{S6.init(n,e),Zr.init(n,e)}),d0e=W("ZodNumber",(n,e)=>{var r,a,i,s,o,l,c,d,u;eL.init(n,e),dn.init(n,e),n.gt=(p,m)=>n.check(iL(p,m)),n.gte=(p,m)=>n.check(xD(p,m)),n.min=(p,m)=>n.check(xD(p,m)),n.lt=(p,m)=>n.check(aL(p,m)),n.lte=(p,m)=>n.check(CD(p,m)),n.max=(p,m)=>n.check(CD(p,m)),n.int=p=>n.check(o0e(p)),n.safe=p=>n.check(o0e(p)),n.positive=p=>n.check(iL(0,p)),n.nonnegative=p=>n.check(xD(0,p)),n.negative=p=>n.check(aL(0,p)),n.nonpositive=p=>n.check(CD(0,p)),n.multipleOf=(p,m)=>n.check(sL(p,m)),n.step=(p,m)=>n.check(sL(p,m)),n.finite=()=>n;let t=n._zod.bag;n.minValue=(i=Math.max((r=t.minimum)!=null?r:Number.NEGATIVE_INFINITY,(a=t.exclusiveMinimum)!=null?a:Number.NEGATIVE_INFINITY))!=null?i:null,n.maxValue=(l=Math.min((s=t.maximum)!=null?s:Number.POSITIVE_INFINITY,(o=t.exclusiveMaximum)!=null?o:Number.POSITIVE_INFINITY))!=null?l:null,n.isInt=((c=t.format)!=null?c:"").includes("int")||Number.isSafeInteger((d=t.multipleOf)!=null?d:.5),n.isFinite=!0,n.format=(u=t.format)!=null?u:null});Ret=W("ZodNumberFormat",(n,e)=>{C6.init(n,e),d0e.init(n,e)});_et=W("ZodBoolean",(n,e)=>{x6.init(n,e),dn.init(n,e)});Fet=W("ZodNull",(n,e)=>{E6.init(n,e),dn.init(n,e)});Let=W("ZodUnknown",(n,e)=>{D6.init(n,e),dn.init(n,e)});Oet=W("ZodNever",(n,e)=>{P6.init(n,e),dn.init(n,e)});Bet=W("ZodArray",(n,e)=>{A6.init(n,e),dn.init(n,e),n.element=e.element,n.min=(t,r)=>n.check(hT(t,r)),n.nonempty=t=>n.check(hT(1,t)),n.max=(t,r)=>n.check(oL(t,r)),n.length=(t,r)=>n.check(lL(t,r)),n.unwrap=()=>n.element});u0e=W("ZodObject",(n,e)=>{tL.init(n,e),dn.init(n,e),At.defineLazy(n,"shape",()=>e.shape),n.keyof=()=>es(Object.keys(n._zod.def.shape)),n.catchall=t=>n.clone({...n._zod.def,catchall:t}),n.passthrough=()=>n.clone({...n._zod.def,catchall:Qr()}),n.loose=()=>n.clone({...n._zod.def,catchall:Qr()}),n.strict=()=>n.clone({...n._zod.def,catchall:zet()}),n.strip=()=>n.clone({...n._zod.def,catchall:void 0}),n.extend=t=>At.extend(n,t),n.merge=t=>At.merge(n,t),n.pick=t=>At.pick(n,t),n.omit=t=>At.omit(n,t),n.partial=(...t)=>At.partial(f0e,n,t[0]),n.required=(...t)=>At.required(h0e,n,t[0])});p0e=W("ZodUnion",(n,e)=>{rL.init(n,e),dn.init(n,e),n.options=e.options});jet=W("ZodDiscriminatedUnion",(n,e)=>{p0e.init(n,e),M6.init(n,e)});$et=W("ZodIntersection",(n,e)=>{I6.init(n,e),dn.init(n,e)});Uet=W("ZodRecord",(n,e)=>{N6.init(n,e),dn.init(n,e),n.keyType=e.keyType,n.valueType=e.valueType});W9=W("ZodEnum",(n,e)=>{R6.init(n,e),dn.init(n,e),n.enum=e.entries,n.options=Object.values(e.entries);let t=new Set(Object.keys(e.entries));n.extract=(r,a)=>{let i={};for(let s of r)if(t.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new W9({...e,checks:[],...At.normalizeParams(a),entries:i})},n.exclude=(r,a)=>{let i={...e.entries};for(let s of r)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new W9({...e,checks:[],...At.normalizeParams(a),entries:i})}});Het=W("ZodLiteral",(n,e)=>{_6.init(n,e),dn.init(n,e),n.values=new Set(e.values),Object.defineProperty(n,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});Vet=W("ZodTransform",(n,e)=>{F6.init(n,e),dn.init(n,e),n._zod.parse=(t,r)=>{t.addIssue=i=>{var s,o,l,c;if(typeof i=="string")t.issues.push(At.issue(i,t.value,e));else{let d=i;d.fatal&&(d.continue=!1),(s=d.code)!=null||(d.code="custom"),(o=d.input)!=null||(d.input=t.value),(l=d.inst)!=null||(d.inst=n),(c=d.continue)!=null||(d.continue=!0),t.issues.push(At.issue(d))}};let a=e.transform(t.value,t);return a instanceof Promise?a.then(i=>(t.value=i,t)):(t.value=a,t)}});f0e=W("ZodOptional",(n,e)=>{L6.init(n,e),dn.init(n,e),n.unwrap=()=>n._zod.def.innerType});Wet=W("ZodNullable",(n,e)=>{O6.init(n,e),dn.init(n,e),n.unwrap=()=>n._zod.def.innerType});qet=W("ZodDefault",(n,e)=>{z6.init(n,e),dn.init(n,e),n.unwrap=()=>n._zod.def.innerType,n.removeDefault=n.unwrap});Yet=W("ZodPrefault",(n,e)=>{B6.init(n,e),dn.init(n,e),n.unwrap=()=>n._zod.def.innerType});h0e=W("ZodNonOptional",(n,e)=>{j6.init(n,e),dn.init(n,e),n.unwrap=()=>n._zod.def.innerType});Qet=W("ZodCatch",(n,e)=>{$6.init(n,e),dn.init(n,e),n.unwrap=()=>n._zod.def.innerType,n.removeCatch=n.unwrap});Xet=W("ZodPipe",(n,e)=>{U6.init(n,e),dn.init(n,e),n.in=e.in,n.out=e.out});ett=W("ZodReadonly",(n,e)=>{H6.init(n,e),dn.init(n,e)});g0e=W("ZodCustom",(n,e)=>{V6.init(n,e),dn.init(n,e)})});var v0e=y(()=>{});var k0e=y(()=>{U9();L9();H9();V9();v0e();js();_Pe();$9();zs(RPe())});var T0e=y(()=>{k0e()});var b0e=y(()=>{T0e()});function L0e(n){if(n.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${n.params.ref.type}`)}function O0e(n){if(n.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${n.params.ref.type}`)}var Q9,w0e,AD,Dm,gL,Ea,S0e,C0e,Udr,stt,ott,J9,$s,MD,x0e,Da,Ro,_o,Pa,yL,E0e,Pm,D0e,P0e,X9,Cu,je,eG,kT,tG,Hdr,vL,ltt,kL,ctt,ID,vT,A0e,dtt,utt,ptt,mtt,ftt,htt,TL,rG,gtt,ytt,nG,bL,vtt,ktt,wL,Ttt,ND,RD,btt,_D,TT,wtt,FD,SL,CL,xL,Vdr,EL,DL,PL,M0e,I0e,N0e,aG,R0e,LD,bT,_0e,Stt,AL,Ctt,ML,xtt,iG,Ett,IL,Dtt,Ptt,Att,Mtt,Itt,Ntt,Rtt,_tt,Ftt,Ltt,NL,Ott,ztt,RL,sG,oG,lG,Btt,jtt,$tt,cG,Utt,Htt,Vtt,Wtt,qtt,F0e,_L,Gtt,FL,Wdr,Ytt,wT,Ktt,qdr,OD,Ztt,dG,Qtt,Jtt,Xtt,ert,trt,rrt,nrt,hL,art,irt,srt,uG,pG,ort,lrt,crt,drt,urt,prt,mrt,frt,hrt,grt,yrt,vrt,krt,Trt,brt,wrt,Srt,Crt,LL,xrt,Ert,Drt,OL,Prt,Art,Mrt,mG,Irt,Gdr,Ydr,Kdr,Zdr,Qdr,Jdr,_e,Z9,zD=y(()=>{b0e();Q9="2025-11-25",w0e="2025-03-26",AD=[Q9,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Dm="io.modelcontextprotocol/related-task",gL="2.0",Ea=y0e(n=>n!==null&&(typeof n=="object"||typeof n=="function")),S0e=Lr([V(),gr().int()]),C0e=V(),Udr=Ti({ttl:Lr([gr(),G9()]).optional(),pollInterval:gr().optional()}),stt=ke({ttl:gr().optional()}),ott=ke({taskId:V()}),J9=Ti({progressToken:S0e.optional(),[Dm]:ott.optional()}),$s=ke({_meta:J9.optional()}),MD=$s.extend({task:stt.optional()}),x0e=n=>MD.safeParse(n).success,Da=ke({method:V(),params:$s.loose().optional()}),Ro=ke({_meta:J9.optional()}),_o=ke({method:V(),params:Ro.loose().optional()}),Pa=Ti({_meta:J9.optional()}),yL=Lr([V(),gr().int()]),E0e=ke({jsonrpc:Fe(gL),id:yL,...Da.shape}).strict(),Pm=n=>E0e.safeParse(n).success,D0e=ke({jsonrpc:Fe(gL),..._o.shape}).strict(),P0e=n=>D0e.safeParse(n).success,X9=ke({jsonrpc:Fe(gL),id:yL,result:Pa}).strict(),Cu=n=>X9.safeParse(n).success;(function(n){n[n.ConnectionClosed=-32e3]="ConnectionClosed",n[n.RequestTimeout=-32001]="RequestTimeout",n[n.ParseError=-32700]="ParseError",n[n.InvalidRequest=-32600]="InvalidRequest",n[n.MethodNotFound=-32601]="MethodNotFound",n[n.InvalidParams=-32602]="InvalidParams",n[n.InternalError=-32603]="InternalError",n[n.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(je||(je={}));eG=ke({jsonrpc:Fe(gL),id:yL.optional(),error:ke({code:gr().int(),message:V(),data:Qr().optional()})}).strict(),kT=n=>eG.safeParse(n).success,tG=Lr([E0e,D0e,X9,eG]),Hdr=Lr([X9,eG]),vL=Pa.strict(),ltt=Ro.extend({requestId:yL.optional(),reason:V().optional()}),kL=_o.extend({method:Fe("notifications/cancelled"),params:ltt}),ctt=ke({src:V(),mimeType:V().optional(),sizes:Bt(V()).optional(),theme:es(["light","dark"]).optional()}),ID=ke({icons:Bt(ctt).optional()}),vT=ke({name:V(),title:V().optional()}),A0e=vT.extend({...vT.shape,...ID.shape,version:V(),websiteUrl:V().optional(),description:V().optional()}),dtt=fL(ke({applyDefaults:da().optional()}),Jr(V(),Qr())),utt=K9(n=>n&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length===0?{form:{}}:n,fL(ke({form:dtt.optional(),url:Ea.optional()}),Jr(V(),Qr()).optional())),ptt=Ti({list:Ea.optional(),cancel:Ea.optional(),requests:Ti({sampling:Ti({createMessage:Ea.optional()}).optional(),elicitation:Ti({create:Ea.optional()}).optional()}).optional()}),mtt=Ti({list:Ea.optional(),cancel:Ea.optional(),requests:Ti({tools:Ti({call:Ea.optional()}).optional()}).optional()}),ftt=ke({experimental:Jr(V(),Ea).optional(),sampling:ke({context:Ea.optional(),tools:Ea.optional()}).optional(),elicitation:utt.optional(),roots:ke({listChanged:da().optional()}).optional(),tasks:ptt.optional()}),htt=$s.extend({protocolVersion:V(),capabilities:ftt,clientInfo:A0e}),TL=Da.extend({method:Fe("initialize"),params:htt}),rG=n=>TL.safeParse(n).success,gtt=ke({experimental:Jr(V(),Ea).optional(),logging:Ea.optional(),completions:Ea.optional(),prompts:ke({listChanged:da().optional()}).optional(),resources:ke({subscribe:da().optional(),listChanged:da().optional()}).optional(),tools:ke({listChanged:da().optional()}).optional(),tasks:mtt.optional()}),ytt=Pa.extend({protocolVersion:V(),capabilities:gtt,serverInfo:A0e,instructions:V().optional()}),nG=_o.extend({method:Fe("notifications/initialized"),params:Ro.optional()}),bL=Da.extend({method:Fe("ping"),params:$s.optional()}),vtt=ke({progress:gr(),total:cn(gr()),message:cn(V())}),ktt=ke({...Ro.shape,...vtt.shape,progressToken:S0e}),wL=_o.extend({method:Fe("notifications/progress"),params:ktt}),Ttt=$s.extend({cursor:C0e.optional()}),ND=Da.extend({params:Ttt.optional()}),RD=Pa.extend({nextCursor:C0e.optional()}),btt=es(["working","input_required","completed","failed","cancelled"]),_D=ke({taskId:V(),status:btt,ttl:Lr([gr(),G9()]),createdAt:V(),lastUpdatedAt:V(),pollInterval:cn(gr()),statusMessage:cn(V())}),TT=Pa.extend({task:_D}),wtt=Ro.merge(_D),FD=_o.extend({method:Fe("notifications/tasks/status"),params:wtt}),SL=Da.extend({method:Fe("tasks/get"),params:$s.extend({taskId:V()})}),CL=Pa.merge(_D),xL=Da.extend({method:Fe("tasks/result"),params:$s.extend({taskId:V()})}),Vdr=Pa.loose(),EL=ND.extend({method:Fe("tasks/list")}),DL=RD.extend({tasks:Bt(_D)}),PL=Da.extend({method:Fe("tasks/cancel"),params:$s.extend({taskId:V()})}),M0e=Pa.merge(_D),I0e=ke({uri:V(),mimeType:cn(V()),_meta:Jr(V(),Qr()).optional()}),N0e=I0e.extend({text:V()}),aG=V().refine(n=>{try{return atob(n),!0}catch(e){return!1}},{message:"Invalid Base64 string"}),R0e=I0e.extend({blob:aG}),LD=es(["user","assistant"]),bT=ke({audience:Bt(LD).optional(),priority:gr().min(0).max(1).optional(),lastModified:yT.datetime({offset:!0}).optional()}),_0e=ke({...vT.shape,...ID.shape,uri:V(),description:cn(V()),mimeType:cn(V()),annotations:bT.optional(),_meta:cn(Ti({}))}),Stt=ke({...vT.shape,...ID.shape,uriTemplate:V(),description:cn(V()),mimeType:cn(V()),annotations:bT.optional(),_meta:cn(Ti({}))}),AL=ND.extend({method:Fe("resources/list")}),Ctt=RD.extend({resources:Bt(_0e)}),ML=ND.extend({method:Fe("resources/templates/list")}),xtt=RD.extend({resourceTemplates:Bt(Stt)}),iG=$s.extend({uri:V()}),Ett=iG,IL=Da.extend({method:Fe("resources/read"),params:Ett}),Dtt=Pa.extend({contents:Bt(Lr([N0e,R0e]))}),Ptt=_o.extend({method:Fe("notifications/resources/list_changed"),params:Ro.optional()}),Att=iG,Mtt=Da.extend({method:Fe("resources/subscribe"),params:Att}),Itt=iG,Ntt=Da.extend({method:Fe("resources/unsubscribe"),params:Itt}),Rtt=Ro.extend({uri:V()}),_tt=_o.extend({method:Fe("notifications/resources/updated"),params:Rtt}),Ftt=ke({name:V(),description:cn(V()),required:cn(da())}),Ltt=ke({...vT.shape,...ID.shape,description:cn(V()),arguments:cn(Bt(Ftt)),_meta:cn(Ti({}))}),NL=ND.extend({method:Fe("prompts/list")}),Ott=RD.extend({prompts:Bt(Ltt)}),ztt=$s.extend({name:V(),arguments:Jr(V(),V()).optional()}),RL=Da.extend({method:Fe("prompts/get"),params:ztt}),sG=ke({type:Fe("text"),text:V(),annotations:bT.optional(),_meta:Jr(V(),Qr()).optional()}),oG=ke({type:Fe("image"),data:aG,mimeType:V(),annotations:bT.optional(),_meta:Jr(V(),Qr()).optional()}),lG=ke({type:Fe("audio"),data:aG,mimeType:V(),annotations:bT.optional(),_meta:Jr(V(),Qr()).optional()}),Btt=ke({type:Fe("tool_use"),name:V(),id:V(),input:Jr(V(),Qr()),_meta:Jr(V(),Qr()).optional()}),jtt=ke({type:Fe("resource"),resource:Lr([N0e,R0e]),annotations:bT.optional(),_meta:Jr(V(),Qr()).optional()}),$tt=_0e.extend({type:Fe("resource_link")}),cG=Lr([sG,oG,lG,$tt,jtt]),Utt=ke({role:LD,content:cG}),Htt=Pa.extend({description:V().optional(),messages:Bt(Utt)}),Vtt=_o.extend({method:Fe("notifications/prompts/list_changed"),params:Ro.optional()}),Wtt=ke({title:V().optional(),readOnlyHint:da().optional(),destructiveHint:da().optional(),idempotentHint:da().optional(),openWorldHint:da().optional()}),qtt=ke({taskSupport:es(["required","optional","forbidden"]).optional()}),F0e=ke({...vT.shape,...ID.shape,description:V().optional(),inputSchema:ke({type:Fe("object"),properties:Jr(V(),Ea).optional(),required:Bt(V()).optional()}).catchall(Qr()),outputSchema:ke({type:Fe("object"),properties:Jr(V(),Ea).optional(),required:Bt(V()).optional()}).catchall(Qr()).optional(),annotations:Wtt.optional(),execution:qtt.optional(),_meta:Jr(V(),Qr()).optional()}),_L=ND.extend({method:Fe("tools/list")}),Gtt=RD.extend({tools:Bt(F0e)}),FL=Pa.extend({content:Bt(cG).default([]),structuredContent:Jr(V(),Qr()).optional(),isError:da().optional()}),Wdr=FL.or(Pa.extend({toolResult:Qr()})),Ytt=MD.extend({name:V(),arguments:Jr(V(),Qr()).optional()}),wT=Da.extend({method:Fe("tools/call"),params:Ytt}),Ktt=_o.extend({method:Fe("notifications/tools/list_changed"),params:Ro.optional()}),qdr=ke({autoRefresh:da().default(!0),debounceMs:gr().int().nonnegative().default(300)}),OD=es(["debug","info","notice","warning","error","critical","alert","emergency"]),Ztt=$s.extend({level:OD}),dG=Da.extend({method:Fe("logging/setLevel"),params:Ztt}),Qtt=Ro.extend({level:OD,logger:V().optional(),data:Qr()}),Jtt=_o.extend({method:Fe("notifications/message"),params:Qtt}),Xtt=ke({name:V().optional()}),ert=ke({hints:Bt(Xtt).optional(),costPriority:gr().min(0).max(1).optional(),speedPriority:gr().min(0).max(1).optional(),intelligencePriority:gr().min(0).max(1).optional()}),trt=ke({mode:es(["auto","required","none"]).optional()}),rrt=ke({type:Fe("tool_result"),toolUseId:V().describe("The unique identifier for the corresponding tool call."),content:Bt(cG).default([]),structuredContent:ke({}).loose().optional(),isError:da().optional(),_meta:Jr(V(),Qr()).optional()}),nrt=Y9("type",[sG,oG,lG]),hL=Y9("type",[sG,oG,lG,Btt,rrt]),art=ke({role:LD,content:Lr([hL,Bt(hL)]),_meta:Jr(V(),Qr()).optional()}),irt=MD.extend({messages:Bt(art),modelPreferences:ert.optional(),systemPrompt:V().optional(),includeContext:es(["none","thisServer","allServers"]).optional(),temperature:gr().optional(),maxTokens:gr().int(),stopSequences:Bt(V()).optional(),metadata:Ea.optional(),tools:Bt(F0e).optional(),toolChoice:trt.optional()}),srt=Da.extend({method:Fe("sampling/createMessage"),params:irt}),uG=Pa.extend({model:V(),stopReason:cn(es(["endTurn","stopSequence","maxTokens"]).or(V())),role:LD,content:nrt}),pG=Pa.extend({model:V(),stopReason:cn(es(["endTurn","stopSequence","maxTokens","toolUse"]).or(V())),role:LD,content:Lr([hL,Bt(hL)])}),ort=ke({type:Fe("boolean"),title:V().optional(),description:V().optional(),default:da().optional()}),lrt=ke({type:Fe("string"),title:V().optional(),description:V().optional(),minLength:gr().optional(),maxLength:gr().optional(),format:es(["email","uri","date","date-time"]).optional(),default:V().optional()}),crt=ke({type:es(["number","integer"]),title:V().optional(),description:V().optional(),minimum:gr().optional(),maximum:gr().optional(),default:gr().optional()}),drt=ke({type:Fe("string"),title:V().optional(),description:V().optional(),enum:Bt(V()),default:V().optional()}),urt=ke({type:Fe("string"),title:V().optional(),description:V().optional(),oneOf:Bt(ke({const:V(),title:V()})),default:V().optional()}),prt=ke({type:Fe("string"),title:V().optional(),description:V().optional(),enum:Bt(V()),enumNames:Bt(V()).optional(),default:V().optional()}),mrt=Lr([drt,urt]),frt=ke({type:Fe("array"),title:V().optional(),description:V().optional(),minItems:gr().optional(),maxItems:gr().optional(),items:ke({type:Fe("string"),enum:Bt(V())}),default:Bt(V()).optional()}),hrt=ke({type:Fe("array"),title:V().optional(),description:V().optional(),minItems:gr().optional(),maxItems:gr().optional(),items:ke({anyOf:Bt(ke({const:V(),title:V()}))}),default:Bt(V()).optional()}),grt=Lr([frt,hrt]),yrt=Lr([prt,mrt,grt]),vrt=Lr([yrt,ort,lrt,crt]),krt=MD.extend({mode:Fe("form").optional(),message:V(),requestedSchema:ke({type:Fe("object"),properties:Jr(V(),vrt),required:Bt(V()).optional()})}),Trt=MD.extend({mode:Fe("url"),message:V(),elicitationId:V(),url:V().url()}),brt=Lr([krt,Trt]),wrt=Da.extend({method:Fe("elicitation/create"),params:brt}),Srt=Ro.extend({elicitationId:V()}),Crt=_o.extend({method:Fe("notifications/elicitation/complete"),params:Srt}),LL=Pa.extend({action:es(["accept","decline","cancel"]),content:K9(n=>n===null?void 0:n,Jr(V(),Lr([V(),gr(),da(),Bt(V())])).optional())}),xrt=ke({type:Fe("ref/resource"),uri:V()}),Ert=ke({type:Fe("ref/prompt"),name:V()}),Drt=$s.extend({ref:Lr([Ert,xrt]),argument:ke({name:V(),value:V()}),context:ke({arguments:Jr(V(),V()).optional()}).optional()}),OL=Da.extend({method:Fe("completion/complete"),params:Drt});Prt=Pa.extend({completion:Ti({values:Bt(V()).max(100),total:cn(gr().int()),hasMore:cn(da())})}),Art=ke({uri:V().startsWith("file://"),name:V().optional(),_meta:Jr(V(),Qr()).optional()}),Mrt=Da.extend({method:Fe("roots/list"),params:$s.optional()}),mG=Pa.extend({roots:Bt(Art)}),Irt=_o.extend({method:Fe("notifications/roots/list_changed"),params:Ro.optional()}),Gdr=Lr([bL,TL,OL,dG,RL,NL,AL,ML,IL,Mtt,Ntt,wT,_L,SL,xL,EL,PL]),Ydr=Lr([kL,wL,nG,Irt,FD]),Kdr=Lr([vL,uG,pG,LL,mG,CL,DL,TT]),Zdr=Lr([bL,srt,wrt,Mrt,SL,xL,EL,PL]),Qdr=Lr([kL,wL,Jtt,_tt,Ptt,Ktt,Vtt,FD,Crt]),Jdr=Lr([vL,ytt,Prt,Htt,Ott,Ctt,xtt,Dtt,FL,Gtt,CL,DL,TT]),_e=class n extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,t,r){if(e===je.UrlElicitationRequired&&r){let a=r;if(a.elicitations)return new Z9(a.elicitations,t)}return new n(e,t,r)}},Z9=class extends _e{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(je.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){var e,t;return(t=(e=this.data)==null?void 0:e.elicitations)!=null?t:[]}}});function Am(n){return n==="completed"||n==="failed"||n==="cancelled"}var z0e=y(()=>{});var j0e,B0e,$0e,zL=y(()=>{j0e=Symbol("Let zodToJsonSchema decide on which parser to use"),B0e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},$0e=n=>typeof n=="string"?{...B0e,name:n}:{...B0e,...n}});var U0e,fG=y(()=>{zL();U0e=n=>{let e=$0e(n),t=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:t,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([r,a])=>[a._def,{def:a._def,path:[...e.basePath,e.definitionPath,r],jsonSchema:void 0}]))}}});function hG(n,e,t,r){r!=null&&r.errorMessages&&t&&(n.errorMessage={...n.errorMessage,[e]:t})}function jt(n,e,t,r,a){n[e]=t,hG(n,e,r,a)}var Mm=y(()=>{});var BL,jL=y(()=>{BL=(n,e)=>{let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];t++);return[(n.length-t).toString(),...e.slice(t)].join("/")}});function Xr(n){if(n.target!=="openAi")return{};let e=[...n.basePath,n.definitionPath,n.openAiAnyTypeName];return n.flags.hasReferencedOpenAiAnyType=!0,{$ref:n.$refStrategy==="relative"?BL(e,n.currentPath):e.join("/")}}var Fo=y(()=>{jL()});function H0e(n,e){var r,a,i;let t={type:"array"};return(r=n.type)!=null&&r._def&&((i=(a=n.type)==null?void 0:a._def)==null?void 0:i.typeName)!==ee.ZodAny&&(t.items=Je(n.type._def,{...e,currentPath:[...e.currentPath,"items"]})),n.minLength&&jt(t,"minItems",n.minLength.value,n.minLength.message,e),n.maxLength&&jt(t,"maxItems",n.maxLength.value,n.maxLength.message,e),n.exactLength&&(jt(t,"minItems",n.exactLength.value,n.exactLength.message,e),jt(t,"maxItems",n.exactLength.value,n.exactLength.message,e)),t}var gG=y(()=>{mD();Mm();Bn()});function V0e(n,e){let t={type:"integer",format:"int64"};if(!n.checks)return t;for(let r of n.checks)switch(r.kind){case"min":e.target==="jsonSchema7"?r.inclusive?jt(t,"minimum",r.value,r.message,e):jt(t,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(t.exclusiveMinimum=!0),jt(t,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?jt(t,"maximum",r.value,r.message,e):jt(t,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(t.exclusiveMaximum=!0),jt(t,"maximum",r.value,r.message,e));break;case"multipleOf":jt(t,"multipleOf",r.value,r.message,e);break}return t}var yG=y(()=>{Mm()});function W0e(){return{type:"boolean"}}var vG=y(()=>{});function $L(n,e){return Je(n.type._def,e)}var UL=y(()=>{Bn()});var q0e,kG=y(()=>{Bn();q0e=(n,e)=>Je(n.innerType._def,e)});function TG(n,e,t){let r=t!=null?t:e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((a,i)=>TG(n,e,a))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Nrt(n,e)}}var Nrt,bG=y(()=>{Mm();Nrt=(n,e)=>{let t={type:"integer",format:"unix-time"};if(e.target==="openApi3")return t;for(let r of n.checks)switch(r.kind){case"min":jt(t,"minimum",r.value,r.message,e);break;case"max":jt(t,"maximum",r.value,r.message,e);break}return t}});function G0e(n,e){return{...Je(n.innerType._def,e),default:n.defaultValue()}}var wG=y(()=>{Bn()});function Y0e(n,e){return e.effectStrategy==="input"?Je(n.schema._def,e):Xr(e)}var SG=y(()=>{Bn();Fo()});function K0e(n){return{type:"string",enum:Array.from(n.values)}}var CG=y(()=>{});function Z0e(n,e){let t=[Je(n.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),Je(n.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),r=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,a=[];return t.forEach(i=>{if(Rrt(i))a.push(...i.allOf),i.unevaluatedProperties===void 0&&(r=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:o,...l}=i;s=l}else r=void 0;a.push(s)}}),a.length?{allOf:a,...r}:void 0}var Rrt,xG=y(()=>{Bn();Rrt=n=>"type"in n&&n.type==="string"?!1:"allOf"in n});function Q0e(n,e){let t=typeof n.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(n.value)?"array":"object"}:e.target==="openApi3"?{type:t==="bigint"?"integer":t,enum:[n.value]}:{type:t==="bigint"?"integer":t,const:n.value}}var EG=y(()=>{});function HL(n,e){let t={type:"string"};if(n.checks)for(let r of n.checks)switch(r.kind){case"min":jt(t,"minLength",typeof t.minLength=="number"?Math.max(t.minLength,r.value):r.value,r.message,e);break;case"max":jt(t,"maxLength",typeof t.maxLength=="number"?Math.min(t.maxLength,r.value):r.value,r.message,e);break;case"email":switch(e.emailStrategy){case"format:email":wl(t,"email",r.message,e);break;case"format:idn-email":wl(t,"idn-email",r.message,e);break;case"pattern:zod":bi(t,bl.email,r.message,e);break}break;case"url":wl(t,"uri",r.message,e);break;case"uuid":wl(t,"uuid",r.message,e);break;case"regex":bi(t,r.regex,r.message,e);break;case"cuid":bi(t,bl.cuid,r.message,e);break;case"cuid2":bi(t,bl.cuid2,r.message,e);break;case"startsWith":bi(t,RegExp(`^${PG(r.value,e)}`),r.message,e);break;case"endsWith":bi(t,RegExp(`${PG(r.value,e)}$`),r.message,e);break;case"datetime":wl(t,"date-time",r.message,e);break;case"date":wl(t,"date",r.message,e);break;case"time":wl(t,"time",r.message,e);break;case"duration":wl(t,"duration",r.message,e);break;case"length":jt(t,"minLength",typeof t.minLength=="number"?Math.max(t.minLength,r.value):r.value,r.message,e),jt(t,"maxLength",typeof t.maxLength=="number"?Math.min(t.maxLength,r.value):r.value,r.message,e);break;case"includes":{bi(t,RegExp(PG(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&wl(t,"ipv4",r.message,e),r.version!=="v4"&&wl(t,"ipv6",r.message,e);break}case"base64url":bi(t,bl.base64url,r.message,e);break;case"jwt":bi(t,bl.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&bi(t,bl.ipv4Cidr,r.message,e),r.version!=="v4"&&bi(t,bl.ipv6Cidr,r.message,e);break}case"emoji":bi(t,bl.emoji(),r.message,e);break;case"ulid":{bi(t,bl.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{wl(t,"binary",r.message,e);break}case"contentEncoding:base64":{jt(t,"contentEncoding","base64",r.message,e);break}case"pattern:zod":{bi(t,bl.base64,r.message,e);break}}break}case"nanoid":bi(t,bl.nanoid,r.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return t}function PG(n,e){return e.patternStrategy==="escape"?Frt(n):n}function Frt(n){let e="";for(let t=0;t<n.length;t++)_rt.has(n[t])||(e+="\\"),e+=n[t];return e}function wl(n,e,t,r){var a;n.format||(a=n.anyOf)!=null&&a.some(i=>i.format)?(n.anyOf||(n.anyOf=[]),n.format&&(n.anyOf.push({format:n.format,...n.errorMessage&&r.errorMessages&&{errorMessage:{format:n.errorMessage.format}}}),delete n.format,n.errorMessage&&(delete n.errorMessage.format,Object.keys(n.errorMessage).length===0&&delete n.errorMessage)),n.anyOf.push({format:e,...t&&r.errorMessages&&{errorMessage:{format:t}}})):jt(n,"format",e,t,r)}function bi(n,e,t,r){var a;n.pattern||(a=n.allOf)!=null&&a.some(i=>i.pattern)?(n.allOf||(n.allOf=[]),n.pattern&&(n.allOf.push({pattern:n.pattern,...n.errorMessage&&r.errorMessages&&{errorMessage:{pattern:n.errorMessage.pattern}}}),delete n.pattern,n.errorMessage&&(delete n.errorMessage.pattern,Object.keys(n.errorMessage).length===0&&delete n.errorMessage)),n.allOf.push({pattern:J0e(e,r),...t&&r.errorMessages&&{errorMessage:{pattern:t}}})):jt(n,"pattern",J0e(e,r),t,r)}function J0e(n,e){var l;if(!e.applyRegexFlags||!n.flags)return n.source;let t={i:n.flags.includes("i"),m:n.flags.includes("m"),s:n.flags.includes("s")},r=t.i?n.source.toLowerCase():n.source,a="",i=!1,s=!1,o=!1;for(let c=0;c<r.length;c++){if(i){a+=r[c],i=!1;continue}if(t.i){if(s){if(r[c].match(/[a-z]/)){o?(a+=r[c],a+=`${r[c-2]}-${r[c]}`.toUpperCase(),o=!1):r[c+1]==="-"&&((l=r[c+2])!=null&&l.match(/[a-z]/))?(a+=r[c],o=!0):a+=`${r[c]}${r[c].toUpperCase()}`;continue}}else if(r[c].match(/[a-z]/)){a+=`[${r[c]}${r[c].toUpperCase()}]`;continue}}if(t.m){if(r[c]==="^"){a+=`(^|(?<=[\r
]))`;continue}else if(r[c]==="$"){a+=`($|(?=[\r
]))`;continue}}if(t.s&&r[c]==="."){a+=s?`${r[c]}\r
`:`[${r[c]}\r
]`;continue}a+=r[c],r[c]==="\\"?i=!0:s&&r[c]==="]"?s=!1:!s&&r[c]==="["&&(s=!0)}try{new RegExp(a)}catch(c){return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),n.source}return a}var DG,bl,_rt,VL=y(()=>{Mm();bl={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(DG===void 0&&(DG=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),DG),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};_rt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function WL(n,e){var r,a,i,s,o,l,c;if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&((r=n.keyType)==null?void 0:r._def.typeName)===ee.ZodEnum)return{type:"object",required:n.keyType._def.values,properties:n.keyType._def.values.reduce((d,u)=>{var p;return{...d,[u]:(p=Je(n.valueType._def,{...e,currentPath:[...e.currentPath,"properties",u]}))!=null?p:Xr(e)}},{}),additionalProperties:e.rejectedAdditionalProperties};let t={type:"object",additionalProperties:(a=Je(n.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]}))!=null?a:e.allowedAdditionalProperties};if(e.target==="openApi3")return t;if(((i=n.keyType)==null?void 0:i._def.typeName)===ee.ZodString&&((s=n.keyType._def.checks)!=null&&s.length)){let{type:d,...u}=HL(n.keyType._def,e);return{...t,propertyNames:u}}else{if(((o=n.keyType)==null?void 0:o._def.typeName)===ee.ZodEnum)return{...t,propertyNames:{enum:n.keyType._def.values}};if(((l=n.keyType)==null?void 0:l._def.typeName)===ee.ZodBranded&&n.keyType._def.type._def.typeName===ee.ZodString&&((c=n.keyType._def.type._def.checks)!=null&&c.length)){let{type:d,...u}=$L(n.keyType._def,e);return{...t,propertyNames:u}}}return t}var qL=y(()=>{mD();Bn();VL();UL();Fo()});function X0e(n,e){if(e.mapStrategy==="record")return WL(n,e);let t=Je(n.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Xr(e),r=Je(n.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Xr(e);return{type:"array",maxItems:125,items:{type:"array",items:[t,r],minItems:2,maxItems:2}}}var AG=y(()=>{Bn();qL();Fo()});function eAe(n){let e=n.values,r=Object.keys(n.values).filter(i=>typeof e[e[i]]!="number").map(i=>e[i]),a=Array.from(new Set(r.map(i=>typeof i)));return{type:a.length===1?a[0]==="string"?"string":"number":["string","number"],enum:r}}var MG=y(()=>{});function tAe(n){return n.target==="openAi"?void 0:{not:Xr({...n,currentPath:[...n.currentPath,"not"]})}}var IG=y(()=>{Fo()});function rAe(n){return n.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var NG=y(()=>{});function aAe(n,e){if(e.target==="openApi3")return nAe(n,e);let t=n.options instanceof Map?Array.from(n.options.values()):n.options;if(t.every(r=>r._def.typeName in BD&&(!r._def.checks||!r._def.checks.length))){let r=t.reduce((a,i)=>{let s=BD[i._def.typeName];return s&&!a.includes(s)?[...a,s]:a},[]);return{type:r.length>1?r:r[0]}}else if(t.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){let r=t.reduce((a,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...a,s];case"bigint":return[...a,"integer"];case"object":if(i._def.value===null)return[...a,"null"];case"symbol":case"undefined":case"function":default:return a}},[]);if(r.length===t.length){let a=r.filter((i,s,o)=>o.indexOf(i)===s);return{type:a.length>1?a:a[0],enum:t.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(t.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:t.reduce((r,a)=>[...r,...a._def.values.filter(i=>!r.includes(i))],[])};return nAe(n,e)}var BD,nAe,GL=y(()=>{Bn();BD={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};nAe=(n,e)=>{let t=(n.options instanceof Map?Array.from(n.options.values()):n.options).map((r,a)=>Je(r._def,{...e,currentPath:[...e.currentPath,"anyOf",`${a}`]})).filter(r=>!!r&&(!e.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return t.length?{anyOf:t}:void 0}});function iAe(n,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(n.innerType._def.typeName)&&(!n.innerType._def.checks||!n.innerType._def.checks.length))return e.target==="openApi3"?{type:BD[n.innerType._def.typeName],nullable:!0}:{type:[BD[n.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let r=Je(n.innerType._def,{...e,currentPath:[...e.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}let t=Je(n.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return t&&{anyOf:[t,{type:"null"}]}}var RG=y(()=>{Bn();GL()});function sAe(n,e){let t={type:"number"};if(!n.checks)return t;for(let r of n.checks)switch(r.kind){case"int":t.type="integer",hG(t,"type",r.message,e);break;case"min":e.target==="jsonSchema7"?r.inclusive?jt(t,"minimum",r.value,r.message,e):jt(t,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(t.exclusiveMinimum=!0),jt(t,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?jt(t,"maximum",r.value,r.message,e):jt(t,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(t.exclusiveMaximum=!0),jt(t,"maximum",r.value,r.message,e));break;case"multipleOf":jt(t,"multipleOf",r.value,r.message,e);break}return t}var _G=y(()=>{Mm()});function oAe(n,e){let t=e.target==="openAi",r={type:"object",properties:{}},a=[],i=n.shape();for(let o in i){let l=i[o];if(l===void 0||l._def===void 0)continue;let c=Ort(l);c&&t&&(l._def.typeName==="ZodOptional"&&(l=l._def.innerType),l.isNullable()||(l=l.nullable()),c=!1);let d=Je(l._def,{...e,currentPath:[...e.currentPath,"properties",o],propertyPath:[...e.currentPath,"properties",o]});d!==void 0&&(r.properties[o]=d,c||a.push(o))}a.length&&(r.required=a);let s=Lrt(n,e);return s!==void 0&&(r.additionalProperties=s),r}function Lrt(n,e){if(n.catchall._def.typeName!=="ZodNever")return Je(n.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(n.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function Ort(n){try{return n.isOptional()}catch(e){return!0}}var FG=y(()=>{Bn()});var lAe,LG=y(()=>{Bn();Fo();lAe=(n,e)=>{var r;if(e.currentPath.toString()===((r=e.propertyPath)==null?void 0:r.toString()))return Je(n.innerType._def,e);let t=Je(n.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return t?{anyOf:[{not:Xr(e)},t]}:Xr(e)}});var cAe,OG=y(()=>{Bn();cAe=(n,e)=>{if(e.pipeStrategy==="input")return Je(n.in._def,e);if(e.pipeStrategy==="output")return Je(n.out._def,e);let t=Je(n.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),r=Je(n.out._def,{...e,currentPath:[...e.currentPath,"allOf",t?"1":"0"]});return{allOf:[t,r].filter(a=>a!==void 0)}}});function dAe(n,e){return Je(n.type._def,e)}var zG=y(()=>{Bn()});function uAe(n,e){let r={type:"array",uniqueItems:!0,items:Je(n.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return n.minSize&&jt(r,"minItems",n.minSize.value,n.minSize.message,e),n.maxSize&&jt(r,"maxItems",n.maxSize.value,n.maxSize.message,e),r}var BG=y(()=>{Mm();Bn()});function pAe(n,e){return n.rest?{type:"array",minItems:n.items.length,items:n.items.map((t,r)=>Je(t._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((t,r)=>r===void 0?t:[...t,r],[]),additionalItems:Je(n.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:n.items.length,maxItems:n.items.length,items:n.items.map((t,r)=>Je(t._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((t,r)=>r===void 0?t:[...t,r],[])}}var jG=y(()=>{Bn()});function mAe(n){return{not:Xr(n)}}var $G=y(()=>{Fo()});function fAe(n){return Xr(n)}var UG=y(()=>{Fo()});var hAe,HG=y(()=>{Bn();hAe=(n,e)=>Je(n.innerType._def,e)});var gAe,VG=y(()=>{mD();Fo();gG();yG();vG();UL();kG();bG();wG();SG();CG();xG();EG();AG();MG();IG();NG();RG();_G();FG();LG();OG();zG();qL();BG();VL();jG();$G();GL();UG();HG();gAe=(n,e,t)=>{switch(e){case ee.ZodString:return HL(n,t);case ee.ZodNumber:return sAe(n,t);case ee.ZodObject:return oAe(n,t);case ee.ZodBigInt:return V0e(n,t);case ee.ZodBoolean:return W0e();case ee.ZodDate:return TG(n,t);case ee.ZodUndefined:return mAe(t);case ee.ZodNull:return rAe(t);case ee.ZodArray:return H0e(n,t);case ee.ZodUnion:case ee.ZodDiscriminatedUnion:return aAe(n,t);case ee.ZodIntersection:return Z0e(n,t);case ee.ZodTuple:return pAe(n,t);case ee.ZodRecord:return WL(n,t);case ee.ZodLiteral:return Q0e(n,t);case ee.ZodEnum:return K0e(n);case ee.ZodNativeEnum:return eAe(n);case ee.ZodNullable:return iAe(n,t);case ee.ZodOptional:return lAe(n,t);case ee.ZodMap:return X0e(n,t);case ee.ZodSet:return uAe(n,t);case ee.ZodLazy:return()=>n.getter()._def;case ee.ZodPromise:return dAe(n,t);case ee.ZodNaN:case ee.ZodNever:return tAe(t);case ee.ZodEffects:return Y0e(n,t);case ee.ZodAny:return Xr(t);case ee.ZodUnknown:return fAe(t);case ee.ZodDefault:return G0e(n,t);case ee.ZodBranded:return $L(n,t);case ee.ZodReadonly:return hAe(n,t);case ee.ZodCatch:return q0e(n,t);case ee.ZodPipeline:return cAe(n,t);case ee.ZodFunction:case ee.ZodVoid:case ee.ZodSymbol:return;default:return(r=>{})(e)}}});function Je(n,e,t=!1){var o;let r=e.seen.get(n);if(e.override){let l=(o=e.override)==null?void 0:o.call(e,n,e,r,t);if(l!==j0e)return l}if(r&&!t){let l=zrt(r,e);if(l!==void 0)return l}let a={def:n,path:e.currentPath,jsonSchema:void 0};e.seen.set(n,a);let i=gAe(n,n.typeName,e),s=typeof i=="function"?Je(i(),e):i;if(s&&Brt(n,e,s),e.postProcess){let l=e.postProcess(s,n,e);return a.jsonSchema=s,l}return a.jsonSchema=s,s}var zrt,Brt,Bn=y(()=>{zL();VG();jL();Fo();zrt=(n,e)=>{switch(e.$refStrategy){case"root":return{$ref:n.path.join("/")};case"relative":return{$ref:BL(e.currentPath,n.path)};case"none":case"seen":return n.path.length<e.currentPath.length&&n.path.every((t,r)=>e.currentPath[r]===t)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),Xr(e)):e.$refStrategy==="seen"?Xr(e):void 0}},Brt=(n,e,t)=>(n.description&&(t.description=n.description,e.markdownDescription&&(t.markdownDescription=n.description)),t)});var yAe=y(()=>{});var WG,qG=y(()=>{Bn();fG();Fo();WG=(n,e)=>{var l;let t=U0e(e),r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[d,u])=>{var p;return{...c,[d]:(p=Je(u._def,{...t,currentPath:[...t.basePath,t.definitionPath,d]},!0))!=null?p:Xr(t)}},{}):void 0,a=typeof e=="string"?e:(e==null?void 0:e.nameStrategy)==="title"||e==null?void 0:e.name,i=(l=Je(n._def,a===void 0?t:{...t,currentPath:[...t.basePath,t.definitionPath,a]},!1))!=null?l:Xr(t),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(i.title=s),t.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[t.openAiAnyTypeName]||(r[t.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:t.$refStrategy==="relative"?"1":[...t.basePath,t.definitionPath,t.openAiAnyTypeName].join("/")}}));let o=a===void 0?r?{...i,[t.definitionPath]:r}:i:{$ref:[...t.$refStrategy==="relative"?[]:t.basePath,t.definitionPath,a].join("/"),[t.definitionPath]:{...r,[a]:i}};return t.target==="jsonSchema7"?o.$schema="http://json-schema.org/draft-07/schema#":(t.target==="jsonSchema2019-09"||t.target==="openAi")&&(o.$schema="https://json-schema.org/draft/2019-09/schema#"),t.target==="openAi"&&("anyOf"in o||"oneOf"in o||"allOf"in o||"type"in o&&Array.isArray(o.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),o}});var vAe=y(()=>{zL();fG();Mm();jL();Bn();yAe();Fo();gG();yG();vG();UL();kG();bG();wG();SG();CG();xG();EG();AG();MG();IG();NG();RG();_G();FG();LG();OG();zG();HG();qL();BG();VL();jG();$G();GL();UG();VG();qG();qG()});function jrt(n){return!n||n==="jsonSchema7"||n==="draft-7"?"draft-7":n==="jsonSchema2019-09"||n==="draft-2020-12"?"draft-2020-12":"draft-7"}function GG(n,e){var t,r,a;return No(n)?N9(n,{target:jrt(e==null?void 0:e.target),io:(t=e==null?void 0:e.pipeStrategy)!=null?t:"input"}):WG(n,{strictUnions:(r=e==null?void 0:e.strictUnions)!=null?r:!0,pipeStrategy:(a=e==null?void 0:e.pipeStrategy)!=null?a:"input"})}function YG(n){let e=Em(n),t=e==null?void 0:e.method;if(!t)throw new Error("Schema is missing a method literal");let r=pL(t);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function KG(n,e){let t=xm(n,e);if(!t.success)throw t.error;return t.data}var ZG=y(()=>{F9();DD();vAe()});function kAe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function TAe(n,e){let t={...n};for(let r in e){let a=r,i=e[a];if(i===void 0)continue;let s=t[a];kAe(s)&&kAe(i)?t[a]={...s,...i}:t[a]=i}return t}var $rt,YL,bAe=y(()=>{DD();zD();z0e();ZG();$rt=6e4,YL=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(kL,t=>{this._oncancel(t)}),this.setNotificationHandler(wL,t=>{this._onprogress(t)}),this.setRequestHandler(bL,t=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(SL,async(t,r)=>{let a=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!a)throw new _e(je.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(xL,async(t,r)=>{let a=async()=>{var o;let i=t.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(l.type==="response"||l.type==="error"){let c=l.message,d=c.id,u=this._requestResolvers.get(d);if(u)if(this._requestResolvers.delete(d),l.type==="response")u(c);else{let p=c,m=new _e(p.error.code,p.error.message,p.error.data);u(m)}else{let p=l.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${d}`))}continue}await((o=this._transport)==null?void 0:o.send(l.message,{relatedRequestId:r.requestId}))}}let s=await this._taskStore.getTask(i,r.sessionId);if(!s)throw new _e(je.InvalidParams,`Task not found: ${i}`);if(!Am(s.status))return await this._waitForTaskUpdate(i,r.signal),await a();if(Am(s.status)){let l=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...l,_meta:{...l._meta,[Dm]:{taskId:i}}}}return await a()};return await a()}),this.setRequestHandler(EL,async(t,r)=>{var a;try{let{tasks:i,nextCursor:s}=await this._taskStore.listTasks((a=t.params)==null?void 0:a.cursor,r.sessionId);return{tasks:i,nextCursor:s,_meta:{}}}catch(i){throw new _e(je.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(PL,async(t,r)=>{try{let a=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!a)throw new _e(je.InvalidParams,`Task not found: ${t.params.taskId}`);if(Am(a.status))throw new _e(je.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(t.params.taskId);let i=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!i)throw new _e(je.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...i}}catch(a){throw a instanceof _e?a:new _e(je.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let t=this._requestHandlerAbortControllers.get(e.params.requestId);t==null||t.abort(e.params.reason)}_setupTimeout(e,t,r,a,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:a})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),_e.fromError(je.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var i,s,o;if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let t=(i=this.transport)==null?void 0:i.onclose;this._transport.onclose=()=>{t==null||t(),this._onclose()};let r=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=l=>{r==null||r(l),this._onerror(l)};let a=(o=this._transport)==null?void 0:o.onmessage;this._transport.onmessage=(l,c)=>{a==null||a(l,c),Cu(l)||kT(l)?this._onresponse(l):Pm(l)?this._onrequest(l,c):P0e(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var r;let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let a of this._requestHandlerAbortControllers.values())a.abort();this._requestHandlerAbortControllers.clear();let t=_e.fromError(je.ConnectionClosed,"Connection closed");this._transport=void 0,(r=this.onclose)==null||r.call(this);for(let a of e.values())a(t)}_onerror(e){var t;(t=this.onerror)==null||t.call(this,e)}_onnotification(e){var r;let t=(r=this._notificationHandlers.get(e.method))!=null?r:this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){var d,u,p,m,f;let r=(d=this._requestHandlers.get(e.method))!=null?d:this.fallbackRequestHandler,a=this._transport,i=(m=(p=(u=e.params)==null?void 0:u._meta)==null?void 0:p[Dm])==null?void 0:m.taskId;if(r===void 0){let h={jsonrpc:"2.0",id:e.id,error:{code:je.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:h,timestamp:Date.now()},a==null?void 0:a.sessionId).catch(g=>this._onerror(new Error(`Failed to enqueue error response: ${g}`))):a==null||a.send(h).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);let o=x0e(e.params)?e.params.task:void 0,l=this._taskStore?this.requestTaskStore(e,a==null?void 0:a.sessionId):void 0,c={signal:s.signal,sessionId:a==null?void 0:a.sessionId,_meta:(f=e.params)==null?void 0:f._meta,sendNotification:async h=>{if(s.signal.aborted)return;let g={relatedRequestId:e.id};i&&(g.relatedTask={taskId:i}),await this.notification(h,g)},sendRequest:async(h,g,v)=>{var b,w;if(s.signal.aborted)throw new _e(je.ConnectionClosed,"Request was cancelled");let k={...v,relatedRequestId:e.id};i&&!k.relatedTask&&(k.relatedTask={taskId:i});let T=(w=(b=k.relatedTask)==null?void 0:b.taskId)!=null?w:i;return T&&l&&await l.updateTaskStatus(T,"input_required"),await this.request(h,g,k)},authInfo:t==null?void 0:t.authInfo,requestId:e.id,requestInfo:t==null?void 0:t.requestInfo,taskId:i,taskStore:l,taskRequestedTtl:o==null?void 0:o.ttl,closeSSEStream:t==null?void 0:t.closeSSEStream,closeStandaloneSSEStream:t==null?void 0:t.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,c)).then(async h=>{if(s.signal.aborted)return;let g={result:h,jsonrpc:"2.0",id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:g,timestamp:Date.now()},a==null?void 0:a.sessionId):await(a==null?void 0:a.send(g))},async h=>{var v;if(s.signal.aborted)return;let g={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(h.code)?h.code:je.InternalError,message:(v=h.message)!=null?v:"Internal error",...h.data!==void 0&&{data:h.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:g,timestamp:Date.now()},a==null?void 0:a.sessionId):await(a==null?void 0:a.send(g))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,a=Number(t),i=this._progressHandlers.get(a);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(a),o=this._timeoutInfo.get(a);if(o&&s&&o.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(l){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),s(l);return}i(r)}_onresponse(e){let t=Number(e.id),r=this._requestResolvers.get(t);if(r){if(this._requestResolvers.delete(t),Cu(e))r(e);else{let s=new _e(e.error.code,e.error.message,e.error.data);r(s)}return}let a=this._responseHandlers.get(t);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(Cu(e)&&e.result&&typeof e.result=="object"){let s=e.result;if(s.task&&typeof s.task=="object"){let o=s.task;typeof o.taskId=="string"&&(i=!0,this._taskProgressTokens.set(o.taskId,t))}}if(i||this._progressHandlers.delete(t),Cu(e))a(e);else{let s=_e.fromError(e.error.code,e.error.message,e.error.data);a(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,t,r){var s,o,l,c;let{task:a}=r!=null?r:{};if(!a){try{yield{type:"result",result:await this.request(e,t,r)}}catch(d){yield{type:"error",error:d instanceof _e?d:new _e(je.InternalError,String(d))}}return}let i;try{let d=await this.request(e,TT,r);if(d.task)i=d.task.taskId,yield{type:"taskCreated",task:d.task};else throw new _e(je.InternalError,"Task creation did not return a task");for(;;){let u=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:u},Am(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},t,r)}:u.status==="failed"?yield{type:"error",error:new _e(je.InternalError,`Task ${i} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new _e(je.InternalError,`Task ${i} was cancelled`)});return}if(u.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},t,r)};return}let p=(l=(o=u.pollInterval)!=null?o:(s=this._options)==null?void 0:s.defaultTaskPollInterval)!=null?l:1e3;await new Promise(m=>setTimeout(m,p)),(c=r==null?void 0:r.signal)==null||c.throwIfAborted()}}catch(d){yield{type:"error",error:d instanceof _e?d:new _e(je.InternalError,String(d))}}}request(e,t,r){let{relatedRequestId:a,resumptionToken:i,onresumptiontoken:s,task:o,relatedTask:l}=r!=null?r:{};return new Promise((c,d)=>{var k,T,b,w,S,C,x;let u=E=>{d(E)};if(!this._transport){u(new Error("Not connected"));return}if(((k=this._options)==null?void 0:k.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(E){u(E);return}(T=r==null?void 0:r.signal)==null||T.throwIfAborted();let p=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:p};r!=null&&r.onprogress&&(this._progressHandlers.set(p,r.onprogress),m.params={...e.params,_meta:{...((b=e.params)==null?void 0:b._meta)||{},progressToken:p}}),o&&(m.params={...m.params,task:o}),l&&(m.params={...m.params,_meta:{...((w=m.params)==null?void 0:w._meta)||{},[Dm]:l}});let f=E=>{var F;this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),(F=this._transport)==null||F.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(E)}},{relatedRequestId:a,resumptionToken:i,onresumptiontoken:s}).catch(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));let _=E instanceof _e?E:new _e(je.RequestTimeout,String(E));d(_)};this._responseHandlers.set(p,E=>{var _;if(!((_=r==null?void 0:r.signal)!=null&&_.aborted)){if(E instanceof Error)return d(E);try{let F=xm(t,E.result);F.success?c(F.data):d(F.error)}catch(F){d(F)}}}),(S=r==null?void 0:r.signal)==null||S.addEventListener("abort",()=>{var E;f((E=r==null?void 0:r.signal)==null?void 0:E.reason)});let h=(C=r==null?void 0:r.timeout)!=null?C:$rt,g=()=>f(_e.fromError(je.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(p,h,r==null?void 0:r.maxTotalTimeout,g,(x=r==null?void 0:r.resetTimeoutOnProgress)!=null?x:!1);let v=l==null?void 0:l.taskId;if(v){let E=_=>{let F=this._responseHandlers.get(p);F?F(_):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,E),this._enqueueTaskMessage(v,{type:"request",message:m,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(p),d(_)})}else this._transport.send(m,{relatedRequestId:a,resumptionToken:i,onresumptiontoken:s}).catch(E=>{this._cleanupTimeout(p),d(E)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},CL,t)}async getTaskResult(e,t,r){return this.request({method:"tasks/result",params:e},t,r)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},DL,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},M0e,t)}async notification(e,t){var o,l,c,d,u;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let r=(o=t==null?void 0:t.relatedTask)==null?void 0:o.taskId;if(r){let p={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((l=e.params)==null?void 0:l._meta)||{},[Dm]:t.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:p,timestamp:Date.now()});return}if(((d=(c=this._options)==null?void 0:c.debouncedNotificationMethods)!=null?d:[]).includes(e.method)&&!e.params&&!(t!=null&&t.relatedRequestId)&&!(t!=null&&t.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var m,f;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let p={...e,jsonrpc:"2.0"};t!=null&&t.relatedTask&&(p={...p,params:{...p.params,_meta:{...((m=p.params)==null?void 0:m._meta)||{},[Dm]:t.relatedTask}}}),(f=this._transport)==null||f.send(p,t).catch(h=>this._onerror(h))});return}let s={...e,jsonrpc:"2.0"};t!=null&&t.relatedTask&&(s={...s,params:{...s.params,_meta:{...((u=s.params)==null?void 0:u._meta)||{},[Dm]:t.relatedTask}}}),await this._transport.send(s,t)}setRequestHandler(e,t){let r=YG(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(a,i)=>{let s=KG(e,a);return Promise.resolve(t(s,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let r=YG(e);this._notificationHandlers.set(r,a=>{let i=KG(e,a);return Promise.resolve(t(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,r){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let a=(i=this._options)==null?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,r,a)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let r=await this._taskMessageQueue.dequeueAll(e,t);for(let a of r)if(a.type==="request"&&Pm(a.message)){let i=a.message.id,s=this._requestResolvers.get(i);s?(s(new _e(je.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){var a,i,s;let r=(i=(a=this._options)==null?void 0:a.defaultTaskPollInterval)!=null?i:1e3;try{let o=await((s=this._taskStore)==null?void 0:s.getTask(e));o!=null&&o.pollInterval&&(r=o.pollInterval)}catch(o){}return new Promise((o,l)=>{if(t.aborted){l(new _e(je.InvalidRequest,"Request cancelled"));return}let c=setTimeout(o,r);t.addEventListener("abort",()=>{clearTimeout(c),l(new _e(je.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){let r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async a=>{if(!e)throw new Error("No request provided");return await r.createTask(a,e.id,{method:e.method,params:e.params},t)},getTask:async a=>{let i=await r.getTask(a,t);if(!i)throw new _e(je.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(a,i,s)=>{await r.storeTaskResult(a,i,s,t);let o=await r.getTask(a,t);if(o){let l=FD.parse({method:"notifications/tasks/status",params:o});await this.notification(l),Am(o.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>r.getTaskResult(a,t),updateTaskStatus:async(a,i,s)=>{let o=await r.getTask(a,t);if(!o)throw new _e(je.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(Am(o.status))throw new _e(je.InvalidParams,`Cannot update task "${a}" from terminal status "${o.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(a,i,s,t);let l=await r.getTask(a,t);if(l){let c=FD.parse({method:"notifications/tasks/status",params:l});await this.notification(c),Am(l.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>r.listTasks(a,t)}}}});var UD=te(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.regexpCode=Qt.getEsmExportName=Qt.getProperty=Qt.safeStringify=Qt.stringify=Qt.strConcat=Qt.addCodeArg=Qt.str=Qt._=Qt.nil=Qt._Code=Qt.Name=Qt.IDENTIFIER=Qt._CodeOrName=void 0;var jD=class{};Qt._CodeOrName=jD;Qt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var gg=class extends jD{constructor(e){if(super(),!Qt.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Qt.Name=gg;var Lo=class extends jD{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>(r instanceof gg&&(t[r.str]=(t[r.str]||0)+1),t),{})}};Qt._Code=Lo;Qt.nil=new Lo("");function wAe(n,...e){let t=[n[0]],r=0;for(;r<e.length;)JG(t,e[r]),t.push(n[++r]);return new Lo(t)}Qt._=wAe;var QG=new Lo("+");function SAe(n,...e){let t=[$D(n[0])],r=0;for(;r<e.length;)t.push(QG),JG(t,e[r]),t.push(QG,$D(n[++r]));return Urt(t),new Lo(t)}Qt.str=SAe;function JG(n,e){e instanceof Lo?n.push(...e._items):e instanceof gg?n.push(e):n.push(Wrt(e))}Qt.addCodeArg=JG;function Urt(n){let e=1;for(;e<n.length-1;){if(n[e]===QG){let t=Hrt(n[e-1],n[e+1]);if(t!==void 0){n.splice(e-1,3,t);continue}n[e++]="+"}e++}}function Hrt(n,e){if(e==='""')return n;if(n==='""')return e;if(typeof n=="string")return e instanceof gg||n[n.length-1]!=='"'?void 0:typeof e!="string"?`${n.slice(0,-1)}${e}"`:e[0]==='"'?n.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(n instanceof gg))return`"${n}${e.slice(1)}`}function Vrt(n,e){return e.emptyStr()?n:n.emptyStr()?e:SAe`${n}${e}`}Qt.strConcat=Vrt;function Wrt(n){return typeof n=="number"||typeof n=="boolean"||n===null?n:$D(Array.isArray(n)?n.join(","):n)}function qrt(n){return new Lo($D(n))}Qt.stringify=qrt;function $D(n){return JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Qt.safeStringify=$D;function Grt(n){return typeof n=="string"&&Qt.IDENTIFIER.test(n)?new Lo(`.${n}`):wAe`[${n}]`}Qt.getProperty=Grt;function Yrt(n){if(typeof n=="string"&&Qt.IDENTIFIER.test(n))return new Lo(`${n}`);throw new Error(`CodeGen: invalid export name: ${n}, use explicit $id name mapping`)}Qt.getEsmExportName=Yrt;function Krt(n){return new Lo(n.toString())}Qt.regexpCode=Krt});var t5=te(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.ValueScope=rs.ValueScopeName=rs.Scope=rs.varKinds=rs.UsedValueState=void 0;var ts=UD(),XG=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},KL;(function(n){n[n.Started=0]="Started",n[n.Completed=1]="Completed"})(KL||(rs.UsedValueState=KL={}));rs.varKinds={const:new ts.Name("const"),let:new ts.Name("let"),var:new ts.Name("var")};var ZL=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ts.Name?e:this.name(e)}name(e){return new ts.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(!((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};rs.Scope=ZL;var QL=class extends ts.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=(0,ts._)`.${new ts.Name(t)}[${r}]`}};rs.ValueScopeName=QL;var Zrt=(0,ts._)`\n`,e5=class extends ZL{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Zrt:ts.nil}}get(){return this._scope}name(e){return new QL(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:i}=a,s=(r=t.key)!==null&&r!==void 0?r:t.ref,o=this._values[i];if(o){let d=o.get(s);if(d)return d}else o=this._values[i]=new Map;o.set(s,a);let l=this._scope[i]||(this._scope[i]=[]),c=l.length;return l[c]=t.ref,a.setValue(t,{property:i,itemIndex:c}),a}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,ts._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,r)}_reduceValues(e,t,r={},a){let i=ts.nil;for(let s in e){let o=e[s];if(!o)continue;let l=r[s]=r[s]||new Map;o.forEach(c=>{if(l.has(c))return;l.set(c,KL.Started);let d=t(c);if(d){let u=this.opts.es5?rs.varKinds.var:rs.varKinds.const;i=(0,ts._)`${i}${u} ${c} = ${d};${this.opts._n}`}else if(d=a==null?void 0:a(c))i=(0,ts._)`${i}${d}${this.opts._n}`;else throw new XG(c);l.set(c,KL.Completed)})}return i}};rs.ValueScope=e5});var ht=te(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.or=bt.and=bt.not=bt.CodeGen=bt.operators=bt.varKinds=bt.ValueScopeName=bt.ValueScope=bt.Scope=bt.Name=bt.regexpCode=bt.stringify=bt.getProperty=bt.nil=bt.strConcat=bt.str=bt._=void 0;var $t=UD(),Sl=t5(),Im=UD();Object.defineProperty(bt,"_",{enumerable:!0,get:function(){return Im._}});Object.defineProperty(bt,"str",{enumerable:!0,get:function(){return Im.str}});Object.defineProperty(bt,"strConcat",{enumerable:!0,get:function(){return Im.strConcat}});Object.defineProperty(bt,"nil",{enumerable:!0,get:function(){return Im.nil}});Object.defineProperty(bt,"getProperty",{enumerable:!0,get:function(){return Im.getProperty}});Object.defineProperty(bt,"stringify",{enumerable:!0,get:function(){return Im.stringify}});Object.defineProperty(bt,"regexpCode",{enumerable:!0,get:function(){return Im.regexpCode}});Object.defineProperty(bt,"Name",{enumerable:!0,get:function(){return Im.Name}});var tO=t5();Object.defineProperty(bt,"Scope",{enumerable:!0,get:function(){return tO.Scope}});Object.defineProperty(bt,"ValueScope",{enumerable:!0,get:function(){return tO.ValueScope}});Object.defineProperty(bt,"ValueScopeName",{enumerable:!0,get:function(){return tO.ValueScopeName}});Object.defineProperty(bt,"varKinds",{enumerable:!0,get:function(){return tO.varKinds}});bt.operators={GT:new $t._Code(">"),GTE:new $t._Code(">="),LT:new $t._Code("<"),LTE:new $t._Code("<="),EQ:new $t._Code("==="),NEQ:new $t._Code("!=="),NOT:new $t._Code("!"),OR:new $t._Code("||"),AND:new $t._Code("&&"),ADD:new $t._Code("+")};var xu=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},r5=class extends xu{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?Sl.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=CT(this.rhs,e,t)),this}get names(){return this.rhs instanceof $t._CodeOrName?this.rhs.names:{}}},JL=class extends xu{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof $t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=CT(this.rhs,e,t),this}get names(){let e=this.lhs instanceof $t.Name?{}:{...this.lhs.names};return eO(e,this.rhs)}},n5=class extends JL{constructor(e,t,r,a){super(e,r,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},a5=class extends xu{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},i5=class extends xu{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},s5=class extends xu{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},o5=class extends xu{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=CT(this.code,e,t),this}get names(){return this.code instanceof $t._CodeOrName?this.code.names:{}}},HD=class extends xu{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,a=r.length;for(;a--;){let i=r[a];i.optimizeNames(e,t)||(Qrt(e,i.names),r.splice(a,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>kg(e,t.names),{})}},Eu=class extends HD{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},l5=class extends HD{},ST=class extends Eu{};ST.kind="else";var yg=class n extends Eu{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new ST(r):r}if(t)return e===!1?t instanceof n?t:t.nodes:this.nodes.length?this:new n(CAe(e),t instanceof n?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=CT(this.condition,e,t),this}get names(){let e=super.names;return eO(e,this.condition),this.else&&kg(e,this.else.names),e}};yg.kind="if";var vg=class extends Eu{};vg.kind="for";var c5=class extends vg{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=CT(this.iteration,e,t),this}get names(){return kg(super.names,this.iteration.names)}},d5=class extends vg{constructor(e,t,r,a){super(),this.varKind=e,this.name=t,this.from=r,this.to=a}render(e){let t=e.es5?Sl.varKinds.var:this.varKind,{name:r,from:a,to:i}=this;return`for(${t} ${r}=${a}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=eO(super.names,this.from);return eO(e,this.to)}},XL=class extends vg{constructor(e,t,r,a){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=CT(this.iterable,e,t),this}get names(){return kg(super.names,this.iterable.names)}},VD=class extends Eu{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};VD.kind="func";var WD=class extends HD{render(e){return"return "+super.render(e)}};WD.kind="return";var u5=class extends Eu{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,a;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&kg(e,this.catch.names),this.finally&&kg(e,this.finally.names),e}},qD=class extends Eu{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};qD.kind="catch";var GD=class extends Eu{render(e){return"finally"+super.render(e)}};GD.kind="finally";var p5=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
`:""},this._extScope=e,this._scope=new Sl.Scope({parent:e}),this._nodes=[new l5]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,a){let i=this._scope.toName(t);return r!==void 0&&a&&(this._constants[i.str]=r),this._leafNode(new r5(e,i,r)),i}const(e,t,r){return this._def(Sl.varKinds.const,e,t,r)}let(e,t,r){return this._def(Sl.varKinds.let,e,t,r)}var(e,t,r){return this._def(Sl.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new JL(e,t,r))}add(e,t){return this._leafNode(new n5(e,bt.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==$t.nil&&this._leafNode(new o5(e)),this}object(...e){let t=["{"];for(let[r,a]of e)t.length>1&&t.push(","),t.push(r),(r!==a||this.opts.es5)&&(t.push(":"),(0,$t.addCodeArg)(t,a));return t.push("}"),new $t._Code(t)}if(e,t,r){if(this._blockNode(new yg(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new yg(e))}else(){return this._elseNode(new ST)}endIf(){return this._endBlockNode(yg,ST)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new c5(e),t)}forRange(e,t,r,a,i=this.opts.es5?Sl.varKinds.var:Sl.varKinds.let){let s=this._scope.toName(e);return this._for(new d5(i,s,t,r),()=>a(s))}forOf(e,t,r,a=Sl.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=t instanceof $t.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,$t._)`${s}.length`,o=>{this.var(i,(0,$t._)`${s}[${o}]`),r(i)})}return this._for(new XL("of",a,i,t),()=>r(i))}forIn(e,t,r,a=this.opts.es5?Sl.varKinds.var:Sl.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,$t._)`Object.keys(${t})`,r);let i=this._scope.toName(e);return this._for(new XL("in",a,i,t),()=>r(i))}endFor(){return this._endBlockNode(vg)}label(e){return this._leafNode(new a5(e))}break(e){return this._leafNode(new i5(e))}return(e){let t=new WD;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(WD)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new u5;if(this._blockNode(a),this.code(e),t){let i=this.name("e");this._currNode=a.catch=new qD(i),t(i)}return r&&(this._currNode=a.finally=new GD,this.code(r)),this._endBlockNode(qD,GD)}throw(e){return this._leafNode(new s5(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=$t.nil,r,a){return this._blockNode(new VD(e,t,r)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(VD)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof yg))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};bt.CodeGen=p5;function kg(n,e){for(let t in e)n[t]=(n[t]||0)+(e[t]||0);return n}function eO(n,e){return e instanceof $t._CodeOrName?kg(n,e.names):n}function CT(n,e,t){if(n instanceof $t.Name)return r(n);if(!a(n))return n;return new $t._Code(n._items.reduce((i,s)=>(s instanceof $t.Name&&(s=r(s)),s instanceof $t._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=t[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function a(i){return i instanceof $t._Code&&i._items.some(s=>s instanceof $t.Name&&e[s.str]===1&&t[s.str]!==void 0)}}function Qrt(n,e){for(let t in e)n[t]=(n[t]||0)-(e[t]||0)}function CAe(n){return typeof n=="boolean"||typeof n=="number"||n===null?!n:(0,$t._)`!${m5(n)}`}bt.not=CAe;var Jrt=xAe(bt.operators.AND);function Xrt(...n){return n.reduce(Jrt)}bt.and=Xrt;var ent=xAe(bt.operators.OR);function tnt(...n){return n.reduce(ent)}bt.or=tnt;function xAe(n){return(e,t)=>e===$t.nil?t:t===$t.nil?e:(0,$t._)`${m5(e)} ${n} ${m5(t)}`}function m5(n){return n instanceof $t.Name?n:(0,$t._)`(${n})`}});var Gt=te(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.checkStrictMode=St.getErrorPath=St.Type=St.useFunc=St.setEvaluated=St.evaluatedPropsToName=St.mergeEvaluated=St.eachItem=St.unescapeJsonPointer=St.escapeJsonPointer=St.escapeFragment=St.unescapeFragment=St.schemaRefOrVal=St.schemaHasRulesButRef=St.schemaHasRules=St.checkUnknownRules=St.alwaysValidSchema=St.toHash=void 0;var Er=ht(),rnt=UD();function nnt(n){let e={};for(let t of n)e[t]=!0;return e}St.toHash=nnt;function ant(n,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(PAe(n,e),!AAe(e,n.self.RULES.all))}St.alwaysValidSchema=ant;function PAe(n,e=n.schema){let{opts:t,self:r}=n;if(!t.strictSchema||typeof e=="boolean")return;let a=r.RULES.keywords;for(let i in e)a[i]||NAe(n,`unknown keyword: "${i}"`)}St.checkUnknownRules=PAe;function AAe(n,e){if(typeof n=="boolean")return!n;for(let t in n)if(e[t])return!0;return!1}St.schemaHasRules=AAe;function int(n,e){if(typeof n=="boolean")return!n;for(let t in n)if(t!=="$ref"&&e.all[t])return!0;return!1}St.schemaHasRulesButRef=int;function snt({topSchemaRef:n,schemaPath:e},t,r,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Er._)`${t}`}return(0,Er._)`${n}${e}${(0,Er.getProperty)(r)}`}St.schemaRefOrVal=snt;function ont(n){return MAe(decodeURIComponent(n))}St.unescapeFragment=ont;function lnt(n){return encodeURIComponent(h5(n))}St.escapeFragment=lnt;function h5(n){return typeof n=="number"?`${n}`:n.replace(/~/g,"~0").replace(/\//g,"~1")}St.escapeJsonPointer=h5;function MAe(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}St.unescapeJsonPointer=MAe;function cnt(n,e){if(Array.isArray(n))for(let t of n)e(t);else e(n)}St.eachItem=cnt;function EAe({mergeNames:n,mergeToName:e,mergeValues:t,resultToName:r}){return(a,i,s,o)=>{let l=s===void 0?i:s instanceof Er.Name?(i instanceof Er.Name?n(a,i,s):e(a,i,s),s):i instanceof Er.Name?(e(a,s,i),i):t(i,s);return o===Er.Name&&!(l instanceof Er.Name)?r(a,l):l}}St.mergeEvaluated={props:EAe({mergeNames:(n,e,t)=>n.if((0,Er._)`${t} !== true && ${e} !== undefined`,()=>{n.if((0,Er._)`${e} === true`,()=>n.assign(t,!0),()=>n.assign(t,(0,Er._)`${t} || {}`).code((0,Er._)`Object.assign(${t}, ${e})`))}),mergeToName:(n,e,t)=>n.if((0,Er._)`${t} !== true`,()=>{e===!0?n.assign(t,!0):(n.assign(t,(0,Er._)`${t} || {}`),g5(n,t,e))}),mergeValues:(n,e)=>n===!0?!0:{...n,...e},resultToName:IAe}),items:EAe({mergeNames:(n,e,t)=>n.if((0,Er._)`${t} !== true && ${e} !== undefined`,()=>n.assign(t,(0,Er._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(n,e,t)=>n.if((0,Er._)`${t} !== true`,()=>n.assign(t,e===!0?!0:(0,Er._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(n,e)=>n===!0?!0:Math.max(n,e),resultToName:(n,e)=>n.var("items",e)})};function IAe(n,e){if(e===!0)return n.var("props",!0);let t=n.var("props",(0,Er._)`{}`);return e!==void 0&&g5(n,t,e),t}St.evaluatedPropsToName=IAe;function g5(n,e,t){Object.keys(t).forEach(r=>n.assign((0,Er._)`${e}${(0,Er.getProperty)(r)}`,!0))}St.setEvaluated=g5;var DAe={};function dnt(n,e){return n.scopeValue("func",{ref:e,code:DAe[e.code]||(DAe[e.code]=new rnt._Code(e.code))})}St.useFunc=dnt;var f5;(function(n){n[n.Num=0]="Num",n[n.Str=1]="Str"})(f5||(St.Type=f5={}));function unt(n,e,t){if(n instanceof Er.Name){let r=e===f5.Num;return t?r?(0,Er._)`"[" + ${n} + "]"`:(0,Er._)`"['" + ${n} + "']"`:r?(0,Er._)`"/" + ${n}`:(0,Er._)`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Er.getProperty)(n).toString():"/"+h5(n)}St.getErrorPath=unt;function NAe(n,e,t=n.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);n.self.logger.warn(e)}}St.checkStrictMode=NAe});var Du=te(y5=>{"use strict";Object.defineProperty(y5,"__esModule",{value:!0});var Ja=ht(),pnt={data:new Ja.Name("data"),valCxt:new Ja.Name("valCxt"),instancePath:new Ja.Name("instancePath"),parentData:new Ja.Name("parentData"),parentDataProperty:new Ja.Name("parentDataProperty"),rootData:new Ja.Name("rootData"),dynamicAnchors:new Ja.Name("dynamicAnchors"),vErrors:new Ja.Name("vErrors"),errors:new Ja.Name("errors"),this:new Ja.Name("this"),self:new Ja.Name("self"),scope:new Ja.Name("scope"),json:new Ja.Name("json"),jsonPos:new Ja.Name("jsonPos"),jsonLen:new Ja.Name("jsonLen"),jsonPart:new Ja.Name("jsonPart")};y5.default=pnt});var YD=te(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.extendErrors=Xa.resetErrorsCount=Xa.reportExtraError=Xa.reportError=Xa.keyword$DataError=Xa.keywordError=void 0;var Yt=ht(),rO=Gt(),wi=Du();Xa.keywordError={message:({keyword:n})=>(0,Yt.str)`must pass "${n}" keyword validation`};Xa.keyword$DataError={message:({keyword:n,schemaType:e})=>e?(0,Yt.str)`"${n}" keyword must be ${e} ($data)`:(0,Yt.str)`"${n}" keyword is invalid ($data)`};function mnt(n,e=Xa.keywordError,t,r){let{it:a}=n,{gen:i,compositeRule:s,allErrors:o}=a,l=FAe(n,e,t);(r!=null?r:s||o)?RAe(i,l):_Ae(a,(0,Yt._)`[${l}]`)}Xa.reportError=mnt;function fnt(n,e=Xa.keywordError,t){let{it:r}=n,{gen:a,compositeRule:i,allErrors:s}=r,o=FAe(n,e,t);RAe(a,o),i||s||_Ae(r,wi.default.vErrors)}Xa.reportExtraError=fnt;function hnt(n,e){n.assign(wi.default.errors,e),n.if((0,Yt._)`${wi.default.vErrors} !== null`,()=>n.if(e,()=>n.assign((0,Yt._)`${wi.default.vErrors}.length`,e),()=>n.assign(wi.default.vErrors,null)))}Xa.resetErrorsCount=hnt;function gnt({gen:n,keyword:e,schemaValue:t,data:r,errsCount:a,it:i}){if(a===void 0)throw new Error("ajv implementation error");let s=n.name("err");n.forRange("i",a,wi.default.errors,o=>{n.const(s,(0,Yt._)`${wi.default.vErrors}[${o}]`),n.if((0,Yt._)`${s}.instancePath === undefined`,()=>n.assign((0,Yt._)`${s}.instancePath`,(0,Yt.strConcat)(wi.default.instancePath,i.errorPath))),n.assign((0,Yt._)`${s}.schemaPath`,(0,Yt.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(n.assign((0,Yt._)`${s}.schema`,t),n.assign((0,Yt._)`${s}.data`,r))})}Xa.extendErrors=gnt;function RAe(n,e){let t=n.const("err",e);n.if((0,Yt._)`${wi.default.vErrors} === null`,()=>n.assign(wi.default.vErrors,(0,Yt._)`[${t}]`),(0,Yt._)`${wi.default.vErrors}.push(${t})`),n.code((0,Yt._)`${wi.default.errors}++`)}function _Ae(n,e){let{gen:t,validateName:r,schemaEnv:a}=n;a.$async?t.throw((0,Yt._)`new ${n.ValidationError}(${e})`):(t.assign((0,Yt._)`${r}.errors`,e),t.return(!1))}var Tg={keyword:new Yt.Name("keyword"),schemaPath:new Yt.Name("schemaPath"),params:new Yt.Name("params"),propertyName:new Yt.Name("propertyName"),message:new Yt.Name("message"),schema:new Yt.Name("schema"),parentSchema:new Yt.Name("parentSchema")};function FAe(n,e,t){let{createErrors:r}=n.it;return r===!1?(0,Yt._)`{}`:ynt(n,e,t)}function ynt(n,e,t={}){let{gen:r,it:a}=n,i=[vnt(a,t),knt(n,t)];return Tnt(n,e,i),r.object(...i)}function vnt({errorPath:n},{instancePath:e}){let t=e?(0,Yt.str)`${n}${(0,rO.getErrorPath)(e,rO.Type.Str)}`:n;return[wi.default.instancePath,(0,Yt.strConcat)(wi.default.instancePath,t)]}function knt({keyword:n,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:r}){let a=r?e:(0,Yt.str)`${e}/${n}`;return t&&(a=(0,Yt.str)`${a}${(0,rO.getErrorPath)(t,rO.Type.Str)}`),[Tg.schemaPath,a]}function Tnt(n,{params:e,message:t},r){let{keyword:a,data:i,schemaValue:s,it:o}=n,{opts:l,propertyName:c,topSchemaRef:d,schemaPath:u}=o;r.push([Tg.keyword,a],[Tg.params,typeof e=="function"?e(n):e||(0,Yt._)`{}`]),l.messages&&r.push([Tg.message,typeof t=="function"?t(n):t]),l.verbose&&r.push([Tg.schema,s],[Tg.parentSchema,(0,Yt._)`${d}${u}`],[wi.default.data,i]),c&&r.push([Tg.propertyName,c])}});var OAe=te(xT=>{"use strict";Object.defineProperty(xT,"__esModule",{value:!0});xT.boolOrEmptySchema=xT.topBoolOrEmptySchema=void 0;var bnt=YD(),wnt=ht(),Snt=Du(),Cnt={message:"boolean schema is false"};function xnt(n){let{gen:e,schema:t,validateName:r}=n;t===!1?LAe(n,!1):typeof t=="object"&&t.$async===!0?e.return(Snt.default.data):(e.assign((0,wnt._)`${r}.errors`,null),e.return(!0))}xT.topBoolOrEmptySchema=xnt;function Ent(n,e){let{gen:t,schema:r}=n;r===!1?(t.var(e,!1),LAe(n)):t.var(e,!0)}xT.boolOrEmptySchema=Ent;function LAe(n,e){let{gen:t,data:r}=n,a={gen:t,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:n};(0,bnt.reportError)(a,Cnt,void 0,e)}});var v5=te(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.getRules=ET.isJSONType=void 0;var Dnt=["string","number","integer","boolean","null","object","array"],Pnt=new Set(Dnt);function Ant(n){return typeof n=="string"&&Pnt.has(n)}ET.isJSONType=Ant;function Mnt(){let n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}ET.getRules=Mnt});var k5=te(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.shouldUseRule=Nm.shouldUseGroup=Nm.schemaHasRulesForType=void 0;function Int({schema:n,self:e},t){let r=e.RULES.types[t];return r&&r!==!0&&zAe(n,r)}Nm.schemaHasRulesForType=Int;function zAe(n,e){return e.rules.some(t=>BAe(n,t))}Nm.shouldUseGroup=zAe;function BAe(n,e){var t;return n[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(r=>n[r]!==void 0))}Nm.shouldUseRule=BAe});var KD=te(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.reportTypeError=ei.checkDataTypes=ei.checkDataType=ei.coerceAndCheckDataType=ei.getJSONTypes=ei.getSchemaTypes=ei.DataType=void 0;var Nnt=v5(),Rnt=k5(),_nt=YD(),pt=ht(),jAe=Gt(),DT;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(DT||(ei.DataType=DT={}));function Fnt(n){let e=$Ae(n.type);if(e.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&e.push("null")}return e}ei.getSchemaTypes=Fnt;function $Ae(n){let e=Array.isArray(n)?n:n?[n]:[];if(e.every(Nnt.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}ei.getJSONTypes=$Ae;function Lnt(n,e){let{gen:t,data:r,opts:a}=n,i=Ont(e,a.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,Rnt.schemaHasRulesForType)(n,e[0]));if(s){let o=b5(e,r,a.strictNumbers,DT.Wrong);t.if(o,()=>{i.length?znt(n,e,i):w5(n)})}return s}ei.coerceAndCheckDataType=Lnt;var UAe=new Set(["string","number","integer","boolean","null"]);function Ont(n,e){return e?n.filter(t=>UAe.has(t)||e==="array"&&t==="array"):[]}function znt(n,e,t){let{gen:r,data:a,opts:i}=n,s=r.let("dataType",(0,pt._)`typeof ${a}`),o=r.let("coerced",(0,pt._)`undefined`);i.coerceTypes==="array"&&r.if((0,pt._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,pt._)`${a}[0]`).assign(s,(0,pt._)`typeof ${a}`).if(b5(e,a,i.strictNumbers),()=>r.assign(o,a))),r.if((0,pt._)`${o} !== undefined`);for(let c of t)(UAe.has(c)||c==="array"&&i.coerceTypes==="array")&&l(c);r.else(),w5(n),r.endIf(),r.if((0,pt._)`${o} !== undefined`,()=>{r.assign(a,o),Bnt(n,o)});function l(c){switch(c){case"string":r.elseIf((0,pt._)`${s} == "number" || ${s} == "boolean"`).assign(o,(0,pt._)`"" + ${a}`).elseIf((0,pt._)`${a} === null`).assign(o,(0,pt._)`""`);return;case"number":r.elseIf((0,pt._)`${s} == "boolean" || ${a} === null
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,pt._)`+${a}`);return;case"integer":r.elseIf((0,pt._)`${s} === "boolean" || ${a} === null
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,pt._)`+${a}`);return;case"boolean":r.elseIf((0,pt._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,pt._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":r.elseIf((0,pt._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(o,null);return;case"array":r.elseIf((0,pt._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${a} === null`).assign(o,(0,pt._)`[${a}]`)}}}function Bnt({gen:n,parentData:e,parentDataProperty:t},r){n.if((0,pt._)`${e} !== undefined`,()=>n.assign((0,pt._)`${e}[${t}]`,r))}function T5(n,e,t,r=DT.Correct){let a=r===DT.Correct?pt.operators.EQ:pt.operators.NEQ,i;switch(n){case"null":return(0,pt._)`${e} ${a} null`;case"array":i=(0,pt._)`Array.isArray(${e})`;break;case"object":i=(0,pt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,pt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,pt._)`typeof ${e} ${a} ${n}`}return r===DT.Correct?i:(0,pt.not)(i);function s(o=pt.nil){return(0,pt.and)((0,pt._)`typeof ${e} == "number"`,o,t?(0,pt._)`isFinite(${e})`:pt.nil)}}ei.checkDataType=T5;function b5(n,e,t,r){if(n.length===1)return T5(n[0],e,t,r);let a,i=(0,jAe.toHash)(n);if(i.array&&i.object){let s=(0,pt._)`typeof ${e} != "object"`;a=i.null?s:(0,pt._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else a=pt.nil;i.number&&delete i.integer;for(let s in i)a=(0,pt.and)(a,T5(s,e,t,r));return a}ei.checkDataTypes=b5;var jnt={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:e})=>typeof n=="string"?(0,pt._)`{type: ${n}}`:(0,pt._)`{type: ${e}}`};function w5(n){let e=$nt(n);(0,_nt.reportError)(e,jnt)}ei.reportTypeError=w5;function $nt(n){let{gen:e,data:t,schema:r}=n,a=(0,jAe.schemaRefOrVal)(n,r,"type");return{gen:e,keyword:"type",data:t,schema:r.type,schemaCode:a,schemaValue:a,parentSchema:r,params:{},it:n}}});var VAe=te(nO=>{"use strict";Object.defineProperty(nO,"__esModule",{value:!0});nO.assignDefaults=void 0;var PT=ht(),Unt=Gt();function Hnt(n,e){let{properties:t,items:r}=n.schema;if(e==="object"&&t)for(let a in t)HAe(n,a,t[a].default);else e==="array"&&Array.isArray(r)&&r.forEach((a,i)=>HAe(n,i,a.default))}nO.assignDefaults=Hnt;function HAe(n,e,t){let{gen:r,compositeRule:a,data:i,opts:s}=n;if(t===void 0)return;let o=(0,PT._)`${i}${(0,PT.getProperty)(e)}`;if(a){(0,Unt.checkStrictMode)(n,`default is ignored for: ${o}`);return}let l=(0,PT._)`${o} === undefined`;s.useDefaults==="empty"&&(l=(0,PT._)`${l} || ${o} === null || ${o} === ""`),r.if(l,(0,PT._)`${o} = ${(0,PT.stringify)(t)}`)}});var Oo=te(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.validateUnion=br.validateArray=br.usePattern=br.callValidateCode=br.schemaProperties=br.allSchemaProperties=br.noPropertyInData=br.propertyInData=br.isOwnProperty=br.hasPropFunc=br.reportMissingProp=br.checkMissingProp=br.checkReportMissingProp=void 0;var Vr=ht(),S5=Gt(),Rm=Du(),Vnt=Gt();function Wnt(n,e){let{gen:t,data:r,it:a}=n;t.if(x5(t,r,e,a.opts.ownProperties),()=>{n.setParams({missingProperty:(0,Vr._)`${e}`},!0),n.error()})}br.checkReportMissingProp=Wnt;function qnt({gen:n,data:e,it:{opts:t}},r,a){return(0,Vr.or)(...r.map(i=>(0,Vr.and)(x5(n,e,i,t.ownProperties),(0,Vr._)`${a} = ${i}`)))}br.checkMissingProp=qnt;function Gnt(n,e){n.setParams({missingProperty:e},!0),n.error()}br.reportMissingProp=Gnt;function WAe(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Vr._)`Object.prototype.hasOwnProperty`})}br.hasPropFunc=WAe;function C5(n,e,t){return(0,Vr._)`${WAe(n)}.call(${e}, ${t})`}br.isOwnProperty=C5;function Ynt(n,e,t,r){let a=(0,Vr._)`${e}${(0,Vr.getProperty)(t)} !== undefined`;return r?(0,Vr._)`${a} && ${C5(n,e,t)}`:a}br.propertyInData=Ynt;function x5(n,e,t,r){let a=(0,Vr._)`${e}${(0,Vr.getProperty)(t)} === undefined`;return r?(0,Vr.or)(a,(0,Vr.not)(C5(n,e,t))):a}br.noPropertyInData=x5;function qAe(n){return n?Object.keys(n).filter(e=>e!=="__proto__"):[]}br.allSchemaProperties=qAe;function Knt(n,e){return qAe(e).filter(t=>!(0,S5.alwaysValidSchema)(n,e[t]))}br.schemaProperties=Knt;function Znt({schemaCode:n,data:e,it:{gen:t,topSchemaRef:r,schemaPath:a,errorPath:i},it:s},o,l,c){let d=c?(0,Vr._)`${n}, ${e}, ${r}${a}`:e,u=[[Rm.default.instancePath,(0,Vr.strConcat)(Rm.default.instancePath,i)],[Rm.default.parentData,s.parentData],[Rm.default.parentDataProperty,s.parentDataProperty],[Rm.default.rootData,Rm.default.rootData]];s.opts.dynamicRef&&u.push([Rm.default.dynamicAnchors,Rm.default.dynamicAnchors]);let p=(0,Vr._)`${d}, ${t.object(...u)}`;return l!==Vr.nil?(0,Vr._)`${o}.call(${l}, ${p})`:(0,Vr._)`${o}(${p})`}br.callValidateCode=Znt;var Qnt=(0,Vr._)`new RegExp`;function Jnt({gen:n,it:{opts:e}},t){let r=e.unicodeRegExp?"u":"",{regExp:a}=e.code,i=a(t,r);return n.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Vr._)`${a.code==="new RegExp"?Qnt:(0,Vnt.useFunc)(n,a)}(${t}, ${r})`})}br.usePattern=Jnt;function Xnt(n){let{gen:e,data:t,keyword:r,it:a}=n,i=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return s(()=>e.assign(o,!1)),o}return e.var(i,!0),s(()=>e.break()),i;function s(o){let l=e.const("len",(0,Vr._)`${t}.length`);e.forRange("i",0,l,c=>{n.subschema({keyword:r,dataProp:c,dataPropType:S5.Type.Num},i),e.if((0,Vr.not)(i),o)})}}br.validateArray=Xnt;function eat(n){let{gen:e,schema:t,keyword:r,it:a}=n;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(l=>(0,S5.alwaysValidSchema)(a,l))&&!a.opts.unevaluated)return;let s=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((l,c)=>{let d=n.subschema({keyword:r,schemaProp:c,compositeRule:!0},o);e.assign(s,(0,Vr._)`${s} || ${o}`),n.mergeValidEvaluated(d,o)||e.if((0,Vr.not)(s))})),n.result(s,()=>n.reset(),()=>n.error(!0))}br.validateUnion=eat});var KAe=te(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.validateKeywordUsage=Zc.validSchemaType=Zc.funcKeywordCode=Zc.macroKeywordCode=void 0;var Si=ht(),bg=Du(),tat=Oo(),rat=YD();function nat(n,e){let{gen:t,keyword:r,schema:a,parentSchema:i,it:s}=n,o=e.macro.call(s.self,a,i,s),l=YAe(t,r,o);s.opts.validateSchema!==!1&&s.self.validateSchema(o,!0);let c=t.name("valid");n.subschema({schema:o,schemaPath:Si.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),n.pass(c,()=>n.error(!0))}Zc.macroKeywordCode=nat;function aat(n,e){var t;let{gen:r,keyword:a,schema:i,parentSchema:s,$data:o,it:l}=n;sat(l,e);let c=!o&&e.compile?e.compile.call(l.self,i,s,l):e.validate,d=YAe(r,a,c),u=r.let("valid");n.block$data(u,p),n.ok((t=e.valid)!==null&&t!==void 0?t:u);function p(){if(e.errors===!1)h(),e.modifying&&GAe(n),g(()=>n.error());else{let v=e.async?m():f();e.modifying&&GAe(n),g(()=>iat(n,v))}}function m(){let v=r.let("ruleErrs",null);return r.try(()=>h((0,Si._)`await `),k=>r.assign(u,!1).if((0,Si._)`${k} instanceof ${l.ValidationError}`,()=>r.assign(v,(0,Si._)`${k}.errors`),()=>r.throw(k))),v}function f(){let v=(0,Si._)`${d}.errors`;return r.assign(v,null),h(Si.nil),v}function h(v=e.async?(0,Si._)`await `:Si.nil){let k=l.opts.passContext?bg.default.this:bg.default.self,T=!("compile"in e&&!o||e.schema===!1);r.assign(u,(0,Si._)`${v}${(0,tat.callValidateCode)(n,d,k,T)}`,e.modifying)}function g(v){var k;r.if((0,Si.not)((k=e.valid)!==null&&k!==void 0?k:u),v)}}Zc.funcKeywordCode=aat;function GAe(n){let{gen:e,data:t,it:r}=n;e.if(r.parentData,()=>e.assign(t,(0,Si._)`${r.parentData}[${r.parentDataProperty}]`))}function iat(n,e){let{gen:t}=n;t.if((0,Si._)`Array.isArray(${e})`,()=>{t.assign(bg.default.vErrors,(0,Si._)`${bg.default.vErrors} === null ? ${e} : ${bg.default.vErrors}.concat(${e})`).assign(bg.default.errors,(0,Si._)`${bg.default.vErrors}.length`),(0,rat.extendErrors)(n)},()=>n.error())}function sat({schemaEnv:n},e){if(e.async&&!n.$async)throw new Error("async keyword in sync schema")}function YAe(n,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return n.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Si.stringify)(t)})}function oat(n,e,t=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(n):r==="object"?n&&typeof n=="object"&&!Array.isArray(n):typeof n==r||t&&typeof n=="undefined")}Zc.validSchemaType=oat;function lat({schema:n,opts:e,self:t,errSchemaPath:r},a,i){if(Array.isArray(a.keyword)?!a.keyword.includes(i):a.keyword!==i)throw new Error("ajv implementation error");let s=a.dependencies;if(s!=null&&s.some(o=>!Object.prototype.hasOwnProperty.call(n,o)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(a.validateSchema&&!a.validateSchema(n[i])){let l=`keyword "${i}" value is invalid at path "${r}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(l);else throw new Error(l)}}Zc.validateKeywordUsage=lat});var QAe=te(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.extendSubschemaMode=_m.extendSubschemaData=_m.getSubschema=void 0;var Qc=ht(),ZAe=Gt();function cat(n,{keyword:e,schemaProp:t,schema:r,schemaPath:a,errSchemaPath:i,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=n.schema[e];return t===void 0?{schema:o,schemaPath:(0,Qc._)`${n.schemaPath}${(0,Qc.getProperty)(e)}`,errSchemaPath:`${n.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,Qc._)`${n.schemaPath}${(0,Qc.getProperty)(e)}${(0,Qc.getProperty)(t)}`,errSchemaPath:`${n.errSchemaPath}/${e}/${(0,ZAe.escapeFragment)(t)}`}}if(r!==void 0){if(a===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:a,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}_m.getSubschema=cat;function dat(n,e,{dataProp:t,dataPropType:r,data:a,dataTypes:i,propertyName:s}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:c,dataPathArr:d,opts:u}=e,p=o.let("data",(0,Qc._)`${e.data}${(0,Qc.getProperty)(t)}`,!0);l(p),n.errorPath=(0,Qc.str)`${c}${(0,ZAe.getErrorPath)(t,r,u.jsPropertySyntax)}`,n.parentDataProperty=(0,Qc._)`${t}`,n.dataPathArr=[...d,n.parentDataProperty]}if(a!==void 0){let c=a instanceof Qc.Name?a:o.let("data",a,!0);l(c),s!==void 0&&(n.propertyName=s)}i&&(n.dataTypes=i);function l(c){n.data=c,n.dataLevel=e.dataLevel+1,n.dataTypes=[],e.definedProperties=new Set,n.parentData=e.data,n.dataNames=[...e.dataNames,c]}}_m.extendSubschemaData=dat;function uat(n,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:r,createErrors:a,allErrors:i}){r!==void 0&&(n.compositeRule=r),a!==void 0&&(n.createErrors=a),i!==void 0&&(n.allErrors=i),n.jtdDiscriminator=e,n.jtdMetadata=t}_m.extendSubschemaMode=uat});var E5=te((ffr,JAe)=>{"use strict";JAe.exports=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,a,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(a=r;a--!==0;)if(!n(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=r;a--!==0;){var s=i[a];if(!n(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}});var eMe=te((hfr,XAe)=>{"use strict";var Fm=XAe.exports=function(n,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var r=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};aO(e,r,a,n,"",n)};Fm.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Fm.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Fm.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Fm.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function aO(n,e,t,r,a,i,s,o,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,a,i,s,o,l,c);for(var d in r){var u=r[d];if(Array.isArray(u)){if(d in Fm.arrayKeywords)for(var p=0;p<u.length;p++)aO(n,e,t,u[p],a+"/"+d+"/"+p,i,a,d,r,p)}else if(d in Fm.propsKeywords){if(u&&typeof u=="object")for(var m in u)aO(n,e,t,u[m],a+"/"+d+"/"+pat(m),i,a,d,r,m)}else(d in Fm.keywords||n.allKeys&&!(d in Fm.skipKeywords))&&aO(n,e,t,u,a+"/"+d,i,a,d,r)}t(r,a,i,s,o,l,c)}}function pat(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}});var ZD=te(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.getSchemaRefs=ns.resolveUrl=ns.normalizeId=ns._getFullPath=ns.getFullPath=ns.inlineRef=void 0;var mat=Gt(),fat=E5(),hat=eMe(),gat=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function yat(n,e=!0){return typeof n=="boolean"?!0:e===!0?!D5(n):e?tMe(n)<=e:!1}ns.inlineRef=yat;var vat=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function D5(n){for(let e in n){if(vat.has(e))return!0;let t=n[e];if(Array.isArray(t)&&t.some(D5)||typeof t=="object"&&D5(t))return!0}return!1}function tMe(n){let e=0;for(let t in n){if(t==="$ref")return 1/0;if(e++,!gat.has(t)&&(typeof n[t]=="object"&&(0,mat.eachItem)(n[t],r=>e+=tMe(r)),e===1/0))return 1/0}return e}function rMe(n,e="",t){t!==!1&&(e=AT(e));let r=n.parse(e);return nMe(n,r)}ns.getFullPath=rMe;function nMe(n,e){return n.serialize(e).split("#")[0]+"#"}ns._getFullPath=nMe;var kat=/#\/?$/;function AT(n){return n?n.replace(kat,""):""}ns.normalizeId=AT;function Tat(n,e,t){return t=AT(t),n.resolve(e,t)}ns.resolveUrl=Tat;var bat=/^[a-z_][-a-z0-9._]*$/i;function wat(n,e){if(typeof n=="boolean")return{};let{schemaId:t,uriResolver:r}=this.opts,a=AT(n[t]||e),i={"":a},s=rMe(r,a,!1),o={},l=new Set;return hat(n,{allKeys:!0},(u,p,m,f)=>{if(f===void 0)return;let h=s+p,g=i[f];typeof u[t]=="string"&&(g=v.call(this,u[t])),k.call(this,u.$anchor),k.call(this,u.$dynamicAnchor),i[p]=g;function v(T){let b=this.opts.uriResolver.resolve;if(T=AT(g?b(g,T):T),l.has(T))throw d(T);l.add(T);let w=this.refs[T];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?c(u,w.schema,T):T!==AT(h)&&(T[0]==="#"?(c(u,o[T],T),o[T]=u):this.refs[T]=h),T}function k(T){if(typeof T=="string"){if(!bat.test(T))throw new Error(`invalid anchor "${T}"`);v.call(this,`#${T}`)}}}),o;function c(u,p,m){if(p!==void 0&&!fat(u,p))throw d(m)}function d(u){return new Error(`reference "${u}" resolves to more than one schema`)}}ns.getSchemaRefs=wat});var XD=te(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.getData=Lm.KeywordCxt=Lm.validateFunctionCode=void 0;var lMe=OAe(),aMe=KD(),A5=k5(),iO=KD(),Sat=VAe(),JD=KAe(),P5=QAe(),Le=ht(),nt=Du(),Cat=ZD(),Pu=Gt(),QD=YD();function xat(n){if(uMe(n)&&(pMe(n),dMe(n))){Pat(n);return}cMe(n,()=>(0,lMe.topBoolOrEmptySchema)(n))}Lm.validateFunctionCode=xat;function cMe({gen:n,validateName:e,schema:t,schemaEnv:r,opts:a},i){a.code.es5?n.func(e,(0,Le._)`${nt.default.data}, ${nt.default.valCxt}`,r.$async,()=>{n.code((0,Le._)`"use strict"; ${iMe(t,a)}`),Dat(n,a),n.code(i)}):n.func(e,(0,Le._)`${nt.default.data}, ${Eat(a)}`,r.$async,()=>n.code(iMe(t,a)).code(i))}function Eat(n){return(0,Le._)`{${nt.default.instancePath}="", ${nt.default.parentData}, ${nt.default.parentDataProperty}, ${nt.default.rootData}=${nt.default.data}${n.dynamicRef?(0,Le._)`, ${nt.default.dynamicAnchors}={}`:Le.nil}}={}`}function Dat(n,e){n.if(nt.default.valCxt,()=>{n.var(nt.default.instancePath,(0,Le._)`${nt.default.valCxt}.${nt.default.instancePath}`),n.var(nt.default.parentData,(0,Le._)`${nt.default.valCxt}.${nt.default.parentData}`),n.var(nt.default.parentDataProperty,(0,Le._)`${nt.default.valCxt}.${nt.default.parentDataProperty}`),n.var(nt.default.rootData,(0,Le._)`${nt.default.valCxt}.${nt.default.rootData}`),e.dynamicRef&&n.var(nt.default.dynamicAnchors,(0,Le._)`${nt.default.valCxt}.${nt.default.dynamicAnchors}`)},()=>{n.var(nt.default.instancePath,(0,Le._)`""`),n.var(nt.default.parentData,(0,Le._)`undefined`),n.var(nt.default.parentDataProperty,(0,Le._)`undefined`),n.var(nt.default.rootData,nt.default.data),e.dynamicRef&&n.var(nt.default.dynamicAnchors,(0,Le._)`{}`)})}function Pat(n){let{schema:e,opts:t,gen:r}=n;cMe(n,()=>{t.$comment&&e.$comment&&fMe(n),Rat(n),r.let(nt.default.vErrors,null),r.let(nt.default.errors,0),t.unevaluated&&Aat(n),mMe(n),Lat(n)})}function Aat(n){let{gen:e,validateName:t}=n;n.evaluated=e.const("evaluated",(0,Le._)`${t}.evaluated`),e.if((0,Le._)`${n.evaluated}.dynamicProps`,()=>e.assign((0,Le._)`${n.evaluated}.props`,(0,Le._)`undefined`)),e.if((0,Le._)`${n.evaluated}.dynamicItems`,()=>e.assign((0,Le._)`${n.evaluated}.items`,(0,Le._)`undefined`))}function iMe(n,e){let t=typeof n=="object"&&n[e.schemaId];return t&&(e.code.source||e.code.process)?(0,Le._)`/*# sourceURL=${t} */`:Le.nil}function Mat(n,e){if(uMe(n)&&(pMe(n),dMe(n))){Iat(n,e);return}(0,lMe.boolOrEmptySchema)(n,e)}function dMe({schema:n,self:e}){if(typeof n=="boolean")return!n;for(let t in n)if(e.RULES.all[t])return!0;return!1}function uMe(n){return typeof n.schema!="boolean"}function Iat(n,e){let{schema:t,gen:r,opts:a}=n;a.$comment&&t.$comment&&fMe(n),_at(n),Fat(n);let i=r.const("_errs",nt.default.errors);mMe(n,i),r.var(e,(0,Le._)`${i} === ${nt.default.errors}`)}function pMe(n){(0,Pu.checkUnknownRules)(n),Nat(n)}function mMe(n,e){if(n.opts.jtd)return sMe(n,[],!1,e);let t=(0,aMe.getSchemaTypes)(n.schema),r=(0,aMe.coerceAndCheckDataType)(n,t);sMe(n,t,!r,e)}function Nat(n){let{schema:e,errSchemaPath:t,opts:r,self:a}=n;e.$ref&&r.ignoreKeywordsWithRef&&(0,Pu.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function Rat(n){let{schema:e,opts:t}=n;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Pu.checkStrictMode)(n,"default is ignored in the schema root")}function _at(n){let e=n.schema[n.opts.schemaId];e&&(n.baseId=(0,Cat.resolveUrl)(n.opts.uriResolver,n.baseId,e))}function Fat(n){if(n.schema.$async&&!n.schemaEnv.$async)throw new Error("async schema in sync schema")}function fMe({gen:n,schemaEnv:e,schema:t,errSchemaPath:r,opts:a}){let i=t.$comment;if(a.$comment===!0)n.code((0,Le._)`${nt.default.self}.logger.log(${i})`);else if(typeof a.$comment=="function"){let s=(0,Le.str)`${r}/$comment`,o=n.scopeValue("root",{ref:e.root});n.code((0,Le._)`${nt.default.self}.opts.$comment(${i}, ${s}, ${o}.schema)`)}}function Lat(n){let{gen:e,schemaEnv:t,validateName:r,ValidationError:a,opts:i}=n;t.$async?e.if((0,Le._)`${nt.default.errors} === 0`,()=>e.return(nt.default.data),()=>e.throw((0,Le._)`new ${a}(${nt.default.vErrors})`)):(e.assign((0,Le._)`${r}.errors`,nt.default.vErrors),i.unevaluated&&Oat(n),e.return((0,Le._)`${nt.default.errors} === 0`))}function Oat({gen:n,evaluated:e,props:t,items:r}){t instanceof Le.Name&&n.assign((0,Le._)`${e}.props`,t),r instanceof Le.Name&&n.assign((0,Le._)`${e}.items`,r)}function sMe(n,e,t,r){let{gen:a,schema:i,data:s,allErrors:o,opts:l,self:c}=n,{RULES:d}=c;if(i.$ref&&(l.ignoreKeywordsWithRef||!(0,Pu.schemaHasRulesButRef)(i,d))){a.block(()=>gMe(n,"$ref",d.all.$ref.definition));return}l.jtd||zat(n,e),a.block(()=>{for(let p of d.rules)u(p);u(d.post)});function u(p){(0,A5.shouldUseGroup)(i,p)&&(p.type?(a.if((0,iO.checkDataType)(p.type,s,l.strictNumbers)),oMe(n,p),e.length===1&&e[0]===p.type&&t&&(a.else(),(0,iO.reportTypeError)(n)),a.endIf()):oMe(n,p),o||a.if((0,Le._)`${nt.default.errors} === ${r||0}`))}}function oMe(n,e){let{gen:t,schema:r,opts:{useDefaults:a}}=n;a&&(0,Sat.assignDefaults)(n,e.type),t.block(()=>{for(let i of e.rules)(0,A5.shouldUseRule)(r,i)&&gMe(n,i.keyword,i.definition,e.type)})}function zat(n,e){n.schemaEnv.meta||!n.opts.strictTypes||(Bat(n,e),n.opts.allowUnionTypes||jat(n,e),$at(n,n.dataTypes))}function Bat(n,e){if(e.length){if(!n.dataTypes.length){n.dataTypes=e;return}e.forEach(t=>{hMe(n.dataTypes,t)||M5(n,`type "${t}" not allowed by context "${n.dataTypes.join(",")}"`)}),Hat(n,e)}}function jat(n,e){e.length>1&&!(e.length===2&&e.includes("null"))&&M5(n,"use allowUnionTypes to allow union type keyword")}function $at(n,e){let t=n.self.RULES.all;for(let r in t){let a=t[r];if(typeof a=="object"&&(0,A5.shouldUseRule)(n.schema,a)){let{type:i}=a.definition;i.length&&!i.some(s=>Uat(e,s))&&M5(n,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function Uat(n,e){return n.includes(e)||e==="number"&&n.includes("integer")}function hMe(n,e){return n.includes(e)||e==="integer"&&n.includes("number")}function Hat(n,e){let t=[];for(let r of n.dataTypes)hMe(e,r)?t.push(r):e.includes("integer")&&r==="number"&&t.push("integer");n.dataTypes=t}function M5(n,e){let t=n.schemaEnv.baseId+n.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Pu.checkStrictMode)(n,e,n.opts.strictTypes)}var sO=class{constructor(e,t,r){if((0,JD.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Pu.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",yMe(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,JD.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",nt.default.errors))}result(e,t,r){this.failResult((0,Le.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,Le.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,Le._)`${t} !== undefined && (${(0,Le.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?QD.reportExtraError:QD.reportError)(this,this.def.error,t)}$dataError(){(0,QD.reportError)(this,this.def.$dataError||QD.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,QD.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=Le.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=Le.nil,t=Le.nil){if(!this.$data)return;let{gen:r,schemaCode:a,schemaType:i,def:s}=this;r.if((0,Le.or)((0,Le._)`${a} === undefined`,t)),e!==Le.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==Le.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:a,it:i}=this;return(0,Le.or)(s(),o());function s(){if(r.length){if(!(t instanceof Le.Name))throw new Error("ajv implementation error");let l=Array.isArray(r)?r:[r];return(0,Le._)`${(0,iO.checkDataTypes)(l,t,i.opts.strictNumbers,iO.DataType.Wrong)}`}return Le.nil}function o(){if(a.validateSchema){let l=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,Le._)`!${l}(${t})`}return Le.nil}}subschema(e,t){let r=(0,P5.getSubschema)(this.it,e);(0,P5.extendSubschemaData)(r,this.it,e),(0,P5.extendSubschemaMode)(r,e);let a={...this.it,...r,items:void 0,props:void 0};return Mat(a,t),a}mergeEvaluated(e,t){let{it:r,gen:a}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Pu.mergeEvaluated.props(a,e.props,r.props,t)),r.items!==!0&&e.items!==void 0&&(r.items=Pu.mergeEvaluated.items(a,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:a}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,Le.Name)),!0}};Lm.KeywordCxt=sO;function gMe(n,e,t,r){let a=new sO(n,t,e);"code"in t?t.code(a,r):a.$data&&t.validate?(0,JD.funcKeywordCode)(a,t):"macro"in t?(0,JD.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,JD.funcKeywordCode)(a,t)}var Vat=/^\/(?:[^~]|~0|~1)*$/,Wat=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function yMe(n,{dataLevel:e,dataNames:t,dataPathArr:r}){let a,i;if(n==="")return nt.default.rootData;if(n[0]==="/"){if(!Vat.test(n))throw new Error(`Invalid JSON-pointer: ${n}`);a=n,i=nt.default.rootData}else{let c=Wat.exec(n);if(!c)throw new Error(`Invalid JSON-pointer: ${n}`);let d=+c[1];if(a=c[2],a==="#"){if(d>=e)throw new Error(l("property/index",d));return r[e-d]}if(d>e)throw new Error(l("data",d));if(i=t[e-d],!a)return i}let s=i,o=a.split("/");for(let c of o)c&&(i=(0,Le._)`${i}${(0,Le.getProperty)((0,Pu.unescapeJsonPointer)(c))}`,s=(0,Le._)`${s} && ${i}`);return s;function l(c,d){return`Cannot access ${c} ${d} levels up, current level is ${e}`}}Lm.getData=yMe});var oO=te(N5=>{"use strict";Object.defineProperty(N5,"__esModule",{value:!0});var I5=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};N5.default=I5});var eP=te(F5=>{"use strict";Object.defineProperty(F5,"__esModule",{value:!0});var R5=ZD(),_5=class extends Error{constructor(e,t,r,a){super(a||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,R5.resolveUrl)(e,t,r),this.missingSchema=(0,R5.normalizeId)((0,R5.getFullPath)(e,this.missingRef))}};F5.default=_5});var cO=te(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.resolveSchema=zo.getCompilingSchema=zo.resolveRef=zo.compileSchema=zo.SchemaEnv=void 0;var Cl=ht(),qat=oO(),wg=Du(),xl=ZD(),vMe=Gt(),Gat=XD(),MT=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,xl.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}};zo.SchemaEnv=MT;function O5(n){let e=kMe.call(this,n);if(e)return e;let t=(0,xl.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:r,lines:a}=this.opts.code,{ownProperties:i}=this.opts,s=new Cl.CodeGen(this.scope,{es5:r,lines:a,ownProperties:i}),o;n.$async&&(o=s.scopeValue("Error",{ref:qat.default,code:(0,Cl._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");n.validateName=l;let c={gen:s,allErrors:this.opts.allErrors,data:wg.default.data,parentData:wg.default.parentData,parentDataProperty:wg.default.parentDataProperty,dataNames:[wg.default.data],dataPathArr:[Cl.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:n.schema,code:(0,Cl.stringify)(n.schema)}:{ref:n.schema}),validateName:l,ValidationError:o,schema:n.schema,schemaEnv:n,rootId:t,baseId:n.baseId||t,schemaPath:Cl.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Cl._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(n),(0,Gat.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);let u=s.toString();d=`${s.scopeRefs(wg.default.scope)}return ${u}`,this.opts.code.process&&(d=this.opts.code.process(d,n));let m=new Function(`${wg.default.self}`,`${wg.default.scope}`,d)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=n.schema,m.schemaEnv=n,n.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:u,scopeValues:s._values}),this.opts.unevaluated){let{props:f,items:h}=c;m.evaluated={props:f instanceof Cl.Name?void 0:f,items:h instanceof Cl.Name?void 0:h,dynamicProps:f instanceof Cl.Name,dynamicItems:h instanceof Cl.Name},m.source&&(m.source.evaluated=(0,Cl.stringify)(m.evaluated))}return n.validate=m,n}catch(u){throw delete n.validate,delete n.validateName,d&&this.logger.error("Error compiling schema, function code:",d),u}finally{this._compilations.delete(n)}}zo.compileSchema=O5;function Yat(n,e,t){var r;t=(0,xl.resolveUrl)(this.opts.uriResolver,e,t);let a=n.refs[t];if(a)return a;let i=Qat.call(this,n,t);if(i===void 0){let s=(r=n.localRefs)===null||r===void 0?void 0:r[t],{schemaId:o}=this.opts;s&&(i=new MT({schema:s,schemaId:o,root:n,baseId:e}))}if(i!==void 0)return n.refs[t]=Kat.call(this,i)}zo.resolveRef=Yat;function Kat(n){return(0,xl.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:O5.call(this,n)}function kMe(n){for(let e of this._compilations)if(Zat(e,n))return e}zo.getCompilingSchema=kMe;function Zat(n,e){return n.schema===e.schema&&n.root===e.root&&n.baseId===e.baseId}function Qat(n,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||lO.call(this,n,e)}function lO(n,e){let t=this.opts.uriResolver.parse(e),r=(0,xl._getFullPath)(this.opts.uriResolver,t),a=(0,xl.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&r===a)return L5.call(this,t,n);let i=(0,xl.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let o=lO.call(this,n,s);return typeof(o==null?void 0:o.schema)!="object"?void 0:L5.call(this,t,o)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||O5.call(this,s),i===(0,xl.normalizeId)(e)){let{schema:o}=s,{schemaId:l}=this.opts,c=o[l];return c&&(a=(0,xl.resolveUrl)(this.opts.uriResolver,a,c)),new MT({schema:o,schemaId:l,root:n,baseId:a})}return L5.call(this,t,s)}}zo.resolveSchema=lO;var Jat=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function L5(n,{baseId:e,schema:t,root:r}){var a;if(((a=n.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of n.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let l=t[(0,vMe.unescapeFragment)(o)];if(l===void 0)return;t=l;let c=typeof t=="object"&&t[this.opts.schemaId];!Jat.has(o)&&c&&(e=(0,xl.resolveUrl)(this.opts.uriResolver,e,c))}let i;if(typeof t!="boolean"&&t.$ref&&!(0,vMe.schemaHasRulesButRef)(t,this.RULES)){let o=(0,xl.resolveUrl)(this.opts.uriResolver,e,t.$ref);i=lO.call(this,r,o)}let{schemaId:s}=this.opts;if(i=i||new MT({schema:t,schemaId:s,root:r,baseId:e}),i.schema!==i.root.schema)return i}});var TMe=te((bfr,Xat)=>{Xat.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var H5=te((wfr,DMe)=>{"use strict";var eit=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),B5=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),tit=RegExp.prototype.test.bind(/^\d*$/u),Sg=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),j5=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),wMe=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),$5=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),rit=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),as=new Array(256);{let n="0123456789ABCDEF";for(let e=0;e<256;e++)as[e]="%"+n[e>>4]+n[e&15]}function ti(n){return n<2048?as[192|n>>6]+as[128|n&63]:n<65536?as[224|n>>12]+as[128|n>>6&63]+as[128|n&63]:as[240|n>>18]+as[128|n>>12&63]+as[128|n>>6&63]+as[128|n&63]}function nit(n){let e="",t=0,r=0;for(r=0;r<n.length;r++)if(t=n[r].charCodeAt(0),t!==48){if(!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=n[r];break}for(r+=1;r<n.length;r++){if(t=n[r].charCodeAt(0),!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=n[r]}return e}var ait=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),iit=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),sit=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),oit=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function lit(n){if(n.length===0)return!1;for(let e=0;e<n.length;e++)if(!sit(n[e])){if(n[e]==="%"&&e+2<n.length&&Sg(n.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function bMe(n){let e=-1,t=0,r=-1,a=0;for(let o=0;o<n.length;o++)n[o]==="0"?(r===-1&&(r=o),a++,a>t&&(t=a,e=r)):(r=-1,a=0);if(t<2)return n.join(":");let i=n.slice(0,e).join(":"),s=n.slice(e+t).join(":");return i+"::"+s}function cit(n){let e=n.indexOf("::");if(e!==-1&&n.indexOf("::",e+1)!==-1)return;let t=e===-1?n.split(":"):n.slice(0,e).split(":"),r=e===-1?[]:n.slice(e+2).split(":");e!==-1&&(t.length===1&&t[0]===""&&(t.length=0),r.length===1&&r[0]===""&&(r.length=0));let a=t.concat(r),i=0;for(let o=0;o<a.length;o++){let l=a[o];if(l==="")return;if(l.indexOf(".")!==-1){if(o!==a.length-1||e!==-1&&r.length===0||!B5(l))return;i+=2;continue}if(!ait(l))return;a[o]=parseInt(l,16).toString(16),i++}if(e===-1)return i!==8?void 0:bMe(a);if(i>=8)return;let s=a.slice(0,t.length);for(let o=i;o<8;o++)s.push("0");for(let o=t.length;o<a.length;o++)s.push(a[o]);return bMe(s)}function z5(n){let e=n[0]==="["&&n[n.length-1]==="]";if((n[0]==="["||n[n.length-1]==="]")&&!e)return{host:n,isIPV6:!1,error:!0};let r=e?n.slice(1,-1):n;if(e&&iit(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(dit(r,":")<2)return{host:n,isIPV6:!1,error:e};let a="",i=r.indexOf("%");if(i!==-1){let o=r.slice(i,i+3).toLowerCase()==="%25"?3:1;if(a=r.slice(i+o),!lit(a))return{host:n,isIPV6:!1,error:!0};r=r.slice(0,i)}let s=cit(r);return s===void 0?{host:n,isIPV6:!1,error:!0}:{host:s+(a?"%"+a:""),escapedHost:s+(a?"%25"+a:""),isIPV6:!0}}function dit(n,e){let t=0;for(let r=0;r<n.length;r++)n[r]===e&&t++;return t}function uit(n){let e=n,t=[],r=-1,a=0;for(;a=e.length;){if(a===1){if(e===".")break;if(e==="/"){t.push("/");break}else{t.push(e);break}}else if(a===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){t.push("/");break}}else if(a===3&&e==="/.."){t.length!==0&&t.pop(),t.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),t.length!==0&&t.pop();continue}}if((r=e.indexOf("/",1))===-1){t.push(e);break}else t.push(e.slice(0,r)),e=e.slice(r)}return t.join("")}var pit={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},mit=/[@/?#:]/g,fit=/[@/?#]/g;function SMe(n,e){let t=e?fit:mit;return t.lastIndex=0,n.replace(t,r=>pit[r])}function CMe(n,e=!1){if(n.indexOf("%")===-1)return n;let t="";for(let r=0;r<n.length;r++){if(n[r]==="%"&&r+2<n.length){let a=n.slice(r+1,r+3);if(Sg(a)){let i=a.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&j5(s)?t+=s:t+="%"+i,r+=2;continue}}t+=n[r]}return t}function hit(n){let e="";for(let t=0;t<n.length;t++){let r=n[t];if(r==="%"&&t+2<n.length){let a=n.slice(t+1,t+3);if(Sg(a)){let i=a.toUpperCase(),s=String.fromCharCode(parseInt(i,16));s!=="."&&j5(s)?e+=s:e+="%"+i,t+=2;continue}}if(wMe(r))e+=r;else{let a=n.charCodeAt(t);if(a<128)e+=EMe(a)?r:as[a];else if(a<55296||a>57343)e+=ti(a);else if(a<=56319&&t+1<n.length){let i=n.charCodeAt(t+1);i>=56320&&i<=57343?(e+=ti(65536+(a-55296<<10)+(i-56320)),t++):e+=ti(65533)}else e+=ti(65533)}}return e}function git(n,e=!1){let t="",r=e&&n[0]!=="/";for(let a=0;a<n.length;a++){let i=n[a];if(i==="%"&&a+2<n.length){let s=n.slice(a+1,a+3);if(Sg(s)){t+="%"+s.toUpperCase(),a+=2;continue}}if(i==="/"&&(r=!1),wMe(i)&&(i!==":"||!r))t+=i;else{let s=n.charCodeAt(a);if(s<128)t+=as[s];else if(s<55296||s>57343)t+=ti(s);else if(s<=56319&&a+1<n.length){let o=n.charCodeAt(a+1);o>=56320&&o<=57343?(t+=ti(65536+(s-55296<<10)+(o-56320)),a++):t+=ti(65533)}else t+=ti(65533)}}return t}function U5(n,e){let t="";for(let r=0;r<n.length;r++){let a=n[r];if(a==="%"&&r+2<n.length){let i=n.slice(r+1,r+3);if(Sg(i)){t+="%"+i.toUpperCase(),r+=2;continue}}if(e(a))t+=a;else{let i=n.charCodeAt(r);if(i<128)t+=as[i];else if(i<55296||i>57343)t+=ti(i);else if(i<=56319&&r+1<n.length){let s=n.charCodeAt(r+1);s>=56320&&s<=57343?(t+=ti(65536+(i-55296<<10)+(s-56320)),r++):t+=ti(65533)}else t+=ti(65533)}}return t}function xMe(n){return U5(n,rit)}function yit(n){return U5(n,$5)}function vit(n){return U5(n,$5)}function EMe(n){return n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===42||n===43||n===45||n===46||n===47||n===64||n===95}function kit(n){let e="";for(let t=0;t<n.length;t++){let r=n[t];if(r==="%"&&t+2<n.length){let a=n.slice(t+1,t+3);if(Sg(a)){let i=a.toUpperCase(),s=String.fromCharCode(parseInt(i,16));j5(s)?e+=s:e+="%"+i,t+=2;continue}}if($5(r))e+=r;else{let a=n.charCodeAt(t);if(a<128)e+=EMe(a)?r:as[a];else if(a<55296||a>57343)e+=ti(a);else if(a<=56319&&t+1<n.length){let i=n.charCodeAt(t+1);i>=56320&&i<=57343?(e+=ti(65536+(a-55296<<10)+(i-56320)),t++):e+=ti(65533)}else e+=ti(65533)}}return e}function Tit(n){let e="";for(let t=0;t<n.length;t++){if(n[t]==="%"&&t+2<n.length){let r=n.slice(t+1,t+3);if(Sg(r)){e+="%"+r.toUpperCase(),t+=2;continue}}e+=escape(n[t])}return e}function bit(n){let e=[];if(n.userinfo!==void 0&&(e.push(xMe(n.userinfo)),e.push("@")),n.host!==void 0){let t=n.host;if(!B5(t)){let r=z5(t);r.isIPV6!==!0&&r.isIPVFuture!==!0&&(t=CMe(t,!0),r=z5(t)),r.isIPV6===!0||r.isIPVFuture===!0?t=`[${r.escapedHost}]`:t=SMe(t,!1)}e.push(t)}if(typeof n.port=="number"||typeof n.port=="string"){let t=String(n.port);if(!tit(t))throw new TypeError("URI port is malformed.");e.push(":"),e.push(t)}return e.length?e.join(""):void 0}DMe.exports={nonSimpleDomain:oit,recomposeAuthority:bit,reescapeHostDelimiters:SMe,normalizePercentEncoding:CMe,normalizePathEncoding:hit,serializePathEncoding:git,normalizeQueryFragmentEncoding:kit,encodeUserinfo:xMe,encodeQuery:yit,encodeFragment:vit,escapePreservingEscapes:Tit,removeDotSegments:uit,isIPv4:B5,isUUID:eit,normalizeIPv6:z5,stringArrayToHexStripped:nit}});var NMe=te((Sfr,IMe)=>{"use strict";var{isUUID:wit}=H5(),Sit=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,Cit=["http","https","ws","wss","urn","urn:uuid"];function xit(n){return Cit.indexOf(n)!==-1}function V5(n){return n.secure===!0?!0:n.secure===!1?!1:n.scheme?n.scheme.length===3&&(n.scheme[0]==="w"||n.scheme[0]==="W")&&(n.scheme[1]==="s"||n.scheme[1]==="S")&&(n.scheme[2]==="s"||n.scheme[2]==="S"):!1}function PMe(n){return n.host||(n.error=n.error||"HTTP URIs must have a host."),n}function AMe(n){let e=String(n.scheme).toLowerCase()==="https";return(n.port===(e?443:80)||n.port==="")&&(n.port=void 0),n.path||(n.path="/"),n}function Eit(n){return n.secure=V5(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n}function Dit(n){if((n.port===(V5(n)?443:80)||n.port==="")&&(n.port=void 0),typeof n.secure=="boolean"&&(n.scheme=n.secure?"wss":"ws",n.secure=void 0),n.resourceName){let e=n.resourceName.indexOf("?"),t=e===-1?n.resourceName:n.resourceName.slice(0,e);n.path=t&&t!=="/"?t:void 0,n.query=e===-1?void 0:n.resourceName.slice(e+1),n.resourceName=void 0}return n.fragment=void 0,n}function Pit(n,e){if(!n.path)return n.error="URN can not be parsed",n;let t=n.path.match(Sit);if(t&&t[0]===n.path){let r=e.scheme||n.scheme||"urn";n.nid=t[1].toLowerCase(),n.nss=t[2];let a=`${r}:${e.nid||n.nid}`,i=W5(a);n.path=void 0,i&&(n=i.parse(n,e))}else n.error=n.error||"URN can not be parsed.";return n}function Ait(n,e){if(n.nid===void 0)throw new Error("URN without nid cannot be serialized");let t=e.scheme||n.scheme||"urn",r=n.nid.toLowerCase(),a=`${t}:${e.nid||r}`,i=W5(a);i&&(n=i.serialize(n,e));let s=n,o=n.nss;return s.path=`${r||e.nid}:${o}`,e.skipEscape=!0,s}function Mit(n,e){let t=n;return t.uuid=t.nss,t.nss=void 0,!e.tolerant&&(!t.uuid||!wit(t.uuid))&&(t.error=t.error||"UUID is not valid."),t}function Iit(n){let e=n;return e.nss=(n.uuid||"").toLowerCase(),e}var MMe={scheme:"http",domainHost:!0,parse:PMe,serialize:AMe},Nit={scheme:"https",domainHost:MMe.domainHost,parse:PMe,serialize:AMe},dO={scheme:"ws",domainHost:!0,parse:Eit,serialize:Dit},Rit={scheme:"wss",domainHost:dO.domainHost,parse:dO.parse,serialize:dO.serialize},_it={scheme:"urn",parse:Pit,serialize:Ait,skipNormalize:!0},Fit={scheme:"urn:uuid",parse:Mit,serialize:Iit,skipNormalize:!0},uO={http:MMe,https:Nit,ws:dO,wss:Rit,urn:_it,"urn:uuid":Fit};Object.setPrototypeOf(uO,null);function W5(n){return n&&(uO[n]||uO[n.toLowerCase()])||void 0}IMe.exports={wsIsSecure:V5,SCHEMES:uO,isValidSchemeName:xit,getSchemeHandler:W5}});var WMe=te((Cfr,fO)=>{"use strict";var{normalizeIPv6:OMe,removeDotSegments:rP,recomposeAuthority:Lit,normalizePercentEncoding:q5,normalizePathEncoding:Oit,serializePathEncoding:RMe,normalizeQueryFragmentEncoding:_Me,encodeQuery:zit,encodeFragment:Bit,reescapeHostDelimiters:jit,isIPv4:zMe,nonSimpleDomain:$it}=H5(),{SCHEMES:BMe,getSchemeHandler:G5}=NMe(),jMe=/^[A-Za-z][A-Za-z0-9+.-]*$/u,$Me="URI scheme is malformed.";function FMe(n){let e=unescape(String(n));if(!jMe.test(e))throw new TypeError($Me);return e}function Uit(n,e){return typeof n=="string"?n=Zit(n,e):typeof n=="object"&&(n=mO(Cg(n,e),e)),n}function Hit(n,e,t){let r=t?Object.assign({scheme:"null"},t):{scheme:"null"},{parsed:a,malformedAuthorityOrPort:i,malformedPercentEncoding:s,malformedSchemeSpecific:o,malformedHost:l,malformedScheme:c}=pO(n,r),{parsed:d,malformedAuthorityOrPort:u,malformedPercentEncoding:p,malformedSchemeSpecific:m,malformedHost:f,malformedScheme:h}=pO(e,r);if(i||u||s||p||o||m||l||f||c||h)throw new Error(a.error||d.error||"URI is malformed.");let g=UMe(a,d,r,!0),v=G5(t&&t.scheme||g.scheme),k=g.host,T=k!==void 0&&k!==""&&(zMe(k)||OMe(k).isIPV6);HMe(g,t||{},v,T);let b=k&&k.indexOf("%")!==-1&&!/\P{ASCII}/u.test(k);if(g.error&&!b)throw new Error(g.error);return r.skipEscape=!0,Cg(g,r)}function UMe(n,e,t,r){let a={};return r||(n=mO(Cg(n,t),t),e=mO(Cg(e,t),t)),t=t||{},!t.tolerant&&e.scheme?(a.scheme=e.scheme,a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=rP(e.path||""),a.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=rP(e.path||""),a.query=e.query):(e.path?(e.path[0]==="/"?a.path=rP(e.path):((n.userinfo!==void 0||n.host!==void 0||n.port!==void 0)&&!n.path?a.path="/"+e.path:n.path?a.path=n.path.slice(0,n.path.lastIndexOf("/")+1)+e.path:a.path=e.path,a.path=rP(a.path)),a.query=e.query):(a.path=n.path,e.query!==void 0?a.query=e.query:a.query=n.query),a.userinfo=n.userinfo,a.host=n.host,a.port=n.port),a.scheme=n.scheme),a.fragment=e.fragment,a}function Vit(n,e,t){let r=LMe(n,t),a=LMe(e,t);return r!==void 0&&a!==void 0&&r===a}function Cg(n,e){let t={host:n.host,scheme:n.scheme,userinfo:n.userinfo,port:n.port,path:n.path,query:n.query,nid:n.nid,nss:n.nss,uuid:n.uuid,fragment:n.fragment,reference:n.reference,resourceName:n.resourceName,secure:n.secure,error:""},r=Object.assign({},e),a=[];t.scheme&&(t.scheme=FMe(t.scheme));let i=G5(r.scheme||t.scheme);i&&i.serialize&&i.serialize(t,r);let s=t.userinfo!==void 0||t.host!==void 0||t.port!==void 0,o=!r.skipEscape&&t.scheme===void 0&&!s;t.path!==void 0&&(r.skipEscape?t.path=q5(t.path):t.path=RMe(t.path,o)),r.reference!=="suffix"&&t.scheme&&(t.scheme=FMe(t.scheme),a.push(t.scheme,":"));let l=Lit(t);if(l!==void 0&&(r.reference!=="suffix"&&a.push("//"),a.push(l),t.path&&t.path[0]!=="/"&&a.push("/")),t.path!==void 0){let c=t.path;!r.absolutePath&&(!i||!i.absolutePath)&&(c=rP(c)),o&&(c=RMe(c,!0)),l===void 0&&c[0]==="/"&&c[1]==="/"&&(c="/%2F"+c.slice(2)),a.push(c)}return t.query!==void 0&&a.push("?",zit(t.query)),t.fragment!==void 0&&a.push("#",Bit(t.fragment)),a.join("")}var Wit=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,qit=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Git=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Yit(n,e){if(e[2]!==void 0&&n.path&&n.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof n.port=="number"&&(n.port<0||n.port>65535))return"URI port is malformed."}function tP(n){if(n===void 0)return!1;let e=n.indexOf("%");for(;e!==-1;){if(e+2>=n.length||!/^[\da-f]{2}$/iu.test(n.slice(e+1,e+3)))return!0;e=n.indexOf("%",e+3)}return!1}function Y5(n){return n[0]==="["&&n[n.length-1]==="]"}function Kit(n){let e=n[4];return tP(n[3])||e!==void 0&&!Y5(e)&&tP(e)||tP(n[6])||tP(n[7])||tP(n[8])}function HMe(n,e,t,r){if(!e.unicodeSupport&&(!t||!t.unicodeSupport)&&n.host&&!Y5(n.host)&&(e.domainHost||t&&t.domainHost)&&r===!1&&$it(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(a){return n.error=n.error||"Host's domain name can not be converted to ASCII: "+a,!0}return!1}function pO(n,e){let t=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=!1,i=!1,s=!1,o=!1,l=!1,c=!1,d=!1;t.reference==="suffix"&&(t.scheme?n=t.scheme+":"+n:n="//"+n);let u=n.match(qit);u!==null&&u[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",a=!0);let p=n.match(Git);if(p!==null){let f=p[1],h=f.replace(/[\t\n\r]/g,"");h.length>=2&&(h.slice(0,2)!=="//"?(r.error=r.error||"URI authority must not contain a literal backslash.",a=!0):f.length!==h.length&&(r.error=r.error||"URI authority introducer must not contain whitespace.",a=!0))}let m=n.match(Wit);if(m){if(r.scheme=m[1],r.userinfo=m[3],r.host=m[4],r.port=parseInt(m[5],10),r.path=m[6]||"",r.query=m[7],r.fragment=m[8],r.scheme!==void 0){let g=unescape(r.scheme);jMe.test(g)?r.scheme=g.toLowerCase():(r.error=r.error||$Me,c=!0)}i=Kit(m),i&&(r.error=r.error||"URI contains malformed percent-encoding."),isNaN(r.port)&&(r.port=m[5]);let f=Yit(r,m);if(f!==void 0&&(r.error=r.error||f,a=!0),r.host)if(zMe(r.host)===!1){let v=Y5(r.host),k=r.host.indexOf("[")!==-1||r.host.indexOf("]")!==-1,T=OMe(r.host);d=T.isIPV6||T.isIPVFuture===!0,l=k&&(!v||T.error===!0),r.host=d?T.host:T.host.toLowerCase(),l&&(r.error=r.error||"URI host is malformed.",a=!0)}else d=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");let h=G5(t.scheme||r.scheme);if(l||(o=HMe(r,t,h,d)),n.indexOf("%")!==-1&&r.host!==void 0&&!l){let g=d?r.host:q5(r.host,!0);d||(g=q5(g.toLowerCase())),r.host=jit(g,d)}(!h||h&&!h.skipNormalize)&&(r.path&&(r.path=Oit(r.path)),r.query&&(r.query=_Me(r.query)),r.fragment&&(r.fragment=_Me(r.fragment))),h&&h.parse&&(h.parse(r,t),h===BMe.urn&&r.nid===void 0&&(s=!0))}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:a,malformedPercentEncoding:i,malformedSchemeSpecific:s,malformedHost:o,malformedScheme:c}}function mO(n,e){return pO(n,e).parsed}function Zit(n,e){return VMe(n,e).normalized}function VMe(n,e){let{parsed:t,malformedAuthorityOrPort:r,malformedPercentEncoding:a,malformedSchemeSpecific:i,malformedHost:s,malformedScheme:o}=pO(n,e);return{normalized:r||a||i||s||o?n:Cg(t,e),malformedAuthorityOrPort:r,malformedPercentEncoding:a,malformedSchemeSpecific:i,malformedHost:s,malformedScheme:o}}function LMe(n,e){if(typeof n!="string"&&typeof n!="object")return;let t;try{t=typeof n=="string"?n:Cg(n,e)}catch(c){return}let{normalized:r,malformedAuthorityOrPort:a,malformedPercentEncoding:i,malformedSchemeSpecific:s,malformedHost:o,malformedScheme:l}=VMe(t,e);return a||i||s||o||l?void 0:r}var K5={SCHEMES:BMe,normalize:Uit,resolve:Hit,resolveComponent:UMe,equal:Vit,serialize:Cg,parse:mO};fO.exports=K5;fO.exports.default=K5;fO.exports.fastUri=K5});var GMe=te(Z5=>{"use strict";Object.defineProperty(Z5,"__esModule",{value:!0});var qMe=WMe();qMe.code='require("ajv/dist/runtime/uri").default';Z5.default=qMe});var tIe=te(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.CodeGen=Aa.Name=Aa.nil=Aa.stringify=Aa.str=Aa._=Aa.KeywordCxt=void 0;var Qit=XD();Object.defineProperty(Aa,"KeywordCxt",{enumerable:!0,get:function(){return Qit.KeywordCxt}});var IT=ht();Object.defineProperty(Aa,"_",{enumerable:!0,get:function(){return IT._}});Object.defineProperty(Aa,"str",{enumerable:!0,get:function(){return IT.str}});Object.defineProperty(Aa,"stringify",{enumerable:!0,get:function(){return IT.stringify}});Object.defineProperty(Aa,"nil",{enumerable:!0,get:function(){return IT.nil}});Object.defineProperty(Aa,"Name",{enumerable:!0,get:function(){return IT.Name}});Object.defineProperty(Aa,"CodeGen",{enumerable:!0,get:function(){return IT.CodeGen}});var Jit=oO(),JMe=eP(),Xit=v5(),nP=cO(),est=ht(),aP=ZD(),hO=KD(),J5=Gt(),YMe=TMe(),tst=GMe(),XMe=(n,e)=>new RegExp(n,e);XMe.code="new RegExp";var rst=["removeAdditional","useDefaults","coerceTypes"],nst=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),ast={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},ist={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},KMe=200;function sst(n){var e,t,r,a,i,s,o,l,c,d,u,p,m,f,h,g,v,k,T,b,w,S,C,x,E;let _=n.strict,F=(e=n.code)===null||e===void 0?void 0:e.optimize,I=F===!0||F===void 0?1:F||0,A=(r=(t=n.code)===null||t===void 0?void 0:t.regExp)!==null&&r!==void 0?r:XMe,R=(a=n.uriResolver)!==null&&a!==void 0?a:tst.default;return{strictSchema:(s=(i=n.strictSchema)!==null&&i!==void 0?i:_)!==null&&s!==void 0?s:!0,strictNumbers:(l=(o=n.strictNumbers)!==null&&o!==void 0?o:_)!==null&&l!==void 0?l:!0,strictTypes:(d=(c=n.strictTypes)!==null&&c!==void 0?c:_)!==null&&d!==void 0?d:"log",strictTuples:(p=(u=n.strictTuples)!==null&&u!==void 0?u:_)!==null&&p!==void 0?p:"log",strictRequired:(f=(m=n.strictRequired)!==null&&m!==void 0?m:_)!==null&&f!==void 0?f:!1,code:n.code?{...n.code,optimize:I,regExp:A}:{optimize:I,regExp:A},loopRequired:(h=n.loopRequired)!==null&&h!==void 0?h:KMe,loopEnum:(g=n.loopEnum)!==null&&g!==void 0?g:KMe,meta:(v=n.meta)!==null&&v!==void 0?v:!0,messages:(k=n.messages)!==null&&k!==void 0?k:!0,inlineRefs:(T=n.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(b=n.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(w=n.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(S=n.validateSchema)!==null&&S!==void 0?S:!0,validateFormats:(C=n.validateFormats)!==null&&C!==void 0?C:!0,unicodeRegExp:(x=n.unicodeRegExp)!==null&&x!==void 0?x:!0,int32range:(E=n.int32range)!==null&&E!==void 0?E:!0,uriResolver:R}}var iP=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...sst(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new est.ValueScope({scope:{},prefixes:nst,es5:t,lines:r}),this.logger=pst(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Xit.getRules)(),ZMe.call(this,ast,e,"NOT SUPPORTED"),ZMe.call(this,ist,e,"DEPRECATED","warn"),this._metaOpts=dst.call(this),e.formats&&lst.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&cst.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),ost.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,a=YMe;r==="id"&&(a={...YMe},a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let a=r(t);return"$async"in r||(this.errors=r.errors),a}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return a.call(this,e,t);async function a(d,u){await i.call(this,d.$schema);let p=this._addSchema(d,u);return p.validate||s.call(this,p)}async function i(d){d&&!this.getSchema(d)&&await a.call(this,{$ref:d},!0)}async function s(d){try{return this._compileSchemaEnv(d)}catch(u){if(!(u instanceof JMe.default))throw u;return o.call(this,u),await l.call(this,u.missingSchema),s.call(this,d)}}function o({missingSchema:d,missingRef:u}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${u} cannot be resolved`)}async function l(d){let u=await c.call(this,d);this.refs[d]||await i.call(this,u.$schema),this.refs[d]||this.addSchema(u,d,t)}async function c(d){let u=this._loading[d];if(u)return u;try{return await(this._loading[d]=r(d))}finally{delete this._loading[d]}}}addSchema(e,t,r,a=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,a);return this}let i;if(typeof e=="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return t=(0,aP.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,a,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(r,e);if(!a&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return a}getSchema(e){let t;for(;typeof(t=QMe.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:r}=this.opts,a=new nP.SchemaEnv({schema:{},schemaId:r});if(t=nP.resolveSchema.call(this,a,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=QMe.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,aP.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string")r=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(fst.call(this,r,t),!t)return(0,J5.eachItem)(r,i=>Q5.call(this,i)),this;gst.call(this,t);let a={...t,type:(0,hO.getJSONTypes)(t.type),schemaType:(0,hO.getJSONTypes)(t.schemaType)};return(0,J5.eachItem)(r,a.type.length===0?i=>Q5.call(this,i,a):i=>a.type.forEach(s=>Q5.call(this,i,a,s))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let a=r.rules.findIndex(i=>i.keyword===e);a>=0&&r.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${r}${a.instancePath} ${a.message}`).reduce((a,i)=>a+t+i)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let i=a.split("/").slice(1),s=e;for(let o of i)s=s[o];for(let o in r){let l=r[o];if(typeof l!="object")continue;let{$data:c}=l.definition,d=s[o];c&&d&&(s[o]=eIe(d))}}return e}_removeAllSchemas(e,t){for(let r in e){let a=e[r];(!t||t.test(r))&&(typeof a=="string"?delete e[r]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[r]))}}_addSchema(e,t,r,a=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof e=="object")s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;r=(0,aP.normalizeId)(s||r);let c=aP.getSchemaRefs.call(this,e,r);return l=new nP.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(l.schema,l),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),a&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):nP.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{nP.compileSchema.call(this,e)}finally{this.opts=t}}};iP.ValidationError=Jit.default;iP.MissingRefError=JMe.default;Aa.default=iP;function ZMe(n,e,t,r="error"){for(let a in n){let i=a;i in e&&this.logger[r](`${t}: option ${a}. ${n[i]}`)}}function QMe(n){return n=(0,aP.normalizeId)(n),this.schemas[n]||this.refs[n]}function ost(){let n=this.opts.schemas;if(n)if(Array.isArray(n))this.addSchema(n);else for(let e in n)this.addSchema(n[e],e)}function lst(){for(let n in this.opts.formats){let e=this.opts.formats[n];e&&this.addFormat(n,e)}}function cst(n){if(Array.isArray(n)){this.addVocabulary(n);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in n){let t=n[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function dst(){let n={...this.opts};for(let e of rst)delete n[e];return n}var ust={log(){},warn(){},error(){}};function pst(n){if(n===!1)return ust;if(n===void 0)return console;if(n.log&&n.warn&&n.error)return n;throw new Error("logger must implement log, warn and error methods")}var mst=/^[a-z_$][a-z0-9_$:-]*$/i;function fst(n,e){let{RULES:t}=this;if((0,J5.eachItem)(n,r=>{if(t.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!mst.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Q5(n,e,t){var r;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=a?i.post:i.rules.find(({type:l})=>l===t);if(s||(s={type:t,rules:[]},i.rules.push(s)),i.keywords[n]=!0,!e)return;let o={keyword:n,definition:{...e,type:(0,hO.getJSONTypes)(e.type),schemaType:(0,hO.getJSONTypes)(e.schemaType)}};e.before?hst.call(this,s,o,e.before):s.rules.push(o),i.all[n]=o,(r=e.implements)===null||r===void 0||r.forEach(l=>this.addKeyword(l))}function hst(n,e,t){let r=n.rules.findIndex(a=>a.keyword===t);r>=0?n.rules.splice(r,0,e):(n.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function gst(n){let{metaSchema:e}=n;e!==void 0&&(n.$data&&this.opts.$data&&(e=eIe(e)),n.validateSchema=this.compile(e,!0))}var yst={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function eIe(n){return{anyOf:[n,yst]}}});var rIe=te(X5=>{"use strict";Object.defineProperty(X5,"__esModule",{value:!0});var vst={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};X5.default=vst});var sIe=te(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.callRef=xg.getValidate=void 0;var kst=eP(),nIe=Oo(),is=ht(),NT=Du(),aIe=cO(),gO=Gt(),Tst={keyword:"$ref",schemaType:"string",code(n){let{gen:e,schema:t,it:r}=n,{baseId:a,schemaEnv:i,validateName:s,opts:o,self:l}=r,{root:c}=i;if((t==="#"||t==="#/")&&a===c.baseId)return u();let d=aIe.resolveRef.call(l,c,a,t);if(d===void 0)throw new kst.default(r.opts.uriResolver,a,t);if(d instanceof aIe.SchemaEnv)return p(d);return m(d);function u(){if(i===c)return yO(n,s,i,i.$async);let f=e.scopeValue("root",{ref:c});return yO(n,(0,is._)`${f}.validate`,c,c.$async)}function p(f){let h=iIe(n,f);yO(n,h,f,f.$async)}function m(f){let h=e.scopeValue("schema",o.code.source===!0?{ref:f,code:(0,is.stringify)(f)}:{ref:f}),g=e.name("valid"),v=n.subschema({schema:f,dataTypes:[],schemaPath:is.nil,topSchemaRef:h,errSchemaPath:t},g);n.mergeEvaluated(v),n.ok(g)}}};function iIe(n,e){let{gen:t}=n;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,is._)`${t.scopeValue("wrapper",{ref:e})}.validate`}xg.getValidate=iIe;function yO(n,e,t,r){let{gen:a,it:i}=n,{allErrors:s,schemaEnv:o,opts:l}=i,c=l.passContext?NT.default.this:is.nil;r?d():u();function d(){if(!o.$async)throw new Error("async schema referenced by sync schema");let f=a.let("valid");a.try(()=>{a.code((0,is._)`await ${(0,nIe.callValidateCode)(n,e,c)}`),m(e),s||a.assign(f,!0)},h=>{a.if((0,is._)`!(${h} instanceof ${i.ValidationError})`,()=>a.throw(h)),p(h),s||a.assign(f,!1)}),n.ok(f)}function u(){n.result((0,nIe.callValidateCode)(n,e,c),()=>m(e),()=>p(e))}function p(f){let h=(0,is._)`${f}.errors`;a.assign(NT.default.vErrors,(0,is._)`${NT.default.vErrors} === null ? ${h} : ${NT.default.vErrors}.concat(${h})`),a.assign(NT.default.errors,(0,is._)`${NT.default.vErrors}.length`)}function m(f){var h;if(!i.opts.unevaluated)return;let g=(h=t==null?void 0:t.validate)===null||h===void 0?void 0:h.evaluated;if(i.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(i.props=gO.mergeEvaluated.props(a,g.props,i.props));else{let v=a.var("props",(0,is._)`${f}.evaluated.props`);i.props=gO.mergeEvaluated.props(a,v,i.props,is.Name)}if(i.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(i.items=gO.mergeEvaluated.items(a,g.items,i.items));else{let v=a.var("items",(0,is._)`${f}.evaluated.items`);i.items=gO.mergeEvaluated.items(a,v,i.items,is.Name)}}}xg.callRef=yO;xg.default=Tst});var oIe=te(eY=>{"use strict";Object.defineProperty(eY,"__esModule",{value:!0});var bst=rIe(),wst=sIe(),Sst=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",bst.default,wst.default];eY.default=Sst});var lIe=te(tY=>{"use strict";Object.defineProperty(tY,"__esModule",{value:!0});var vO=ht(),Om=vO.operators,kO={maximum:{okStr:"<=",ok:Om.LTE,fail:Om.GT},minimum:{okStr:">=",ok:Om.GTE,fail:Om.LT},exclusiveMaximum:{okStr:"<",ok:Om.LT,fail:Om.GTE},exclusiveMinimum:{okStr:">",ok:Om.GT,fail:Om.LTE}},Cst={message:({keyword:n,schemaCode:e})=>(0,vO.str)`must be ${kO[n].okStr} ${e}`,params:({keyword:n,schemaCode:e})=>(0,vO._)`{comparison: ${kO[n].okStr}, limit: ${e}}`},xst={keyword:Object.keys(kO),type:"number",schemaType:"number",$data:!0,error:Cst,code(n){let{keyword:e,data:t,schemaCode:r}=n;n.fail$data((0,vO._)`${t} ${kO[e].fail} ${r} || isNaN(${t})`)}};tY.default=xst});var cIe=te(rY=>{"use strict";Object.defineProperty(rY,"__esModule",{value:!0});var sP=ht(),Est={message:({schemaCode:n})=>(0,sP.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,sP._)`{multipleOf: ${n}}`},Dst={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Est,code(n){let{gen:e,data:t,schemaCode:r,it:a}=n,i=a.opts.multipleOfPrecision,s=e.let("res"),o=i?(0,sP._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,sP._)`${s} !== parseInt(${s})`;n.fail$data((0,sP._)`(${r} === 0 || (${s} = ${t}/${r}, ${o}))`)}};rY.default=Dst});var uIe=te(nY=>{"use strict";Object.defineProperty(nY,"__esModule",{value:!0});function dIe(n){let e=n.length,t=0,r=0,a;for(;r<e;)t++,a=n.charCodeAt(r++),a>=55296&&a<=56319&&r<e&&(a=n.charCodeAt(r),(a&64512)===56320&&r++);return t}nY.default=dIe;dIe.code='require("ajv/dist/runtime/ucs2length").default'});var pIe=te(aY=>{"use strict";Object.defineProperty(aY,"__esModule",{value:!0});var Eg=ht(),Pst=Gt(),Ast=uIe(),Mst={message({keyword:n,schemaCode:e}){let t=n==="maxLength"?"more":"fewer";return(0,Eg.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:n})=>(0,Eg._)`{limit: ${n}}`},Ist={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Mst,code(n){let{keyword:e,data:t,schemaCode:r,it:a}=n,i=e==="maxLength"?Eg.operators.GT:Eg.operators.LT,s=a.opts.unicode===!1?(0,Eg._)`${t}.length`:(0,Eg._)`${(0,Pst.useFunc)(n.gen,Ast.default)}(${t})`;n.fail$data((0,Eg._)`${s} ${i} ${r}`)}};aY.default=Ist});var mIe=te(iY=>{"use strict";Object.defineProperty(iY,"__esModule",{value:!0});var Nst=Oo(),Rst=Gt(),RT=ht(),_st={message:({schemaCode:n})=>(0,RT.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,RT._)`{pattern: ${n}}`},Fst={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:_st,code(n){let{gen:e,data:t,$data:r,schema:a,schemaCode:i,it:s}=n,o=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:l}=s.opts.code,c=l.code==="new RegExp"?(0,RT._)`new RegExp`:(0,Rst.useFunc)(e,l),d=e.let("valid");e.try(()=>e.assign(d,(0,RT._)`${c}(${i}, ${o}).test(${t})`),()=>e.assign(d,!1)),n.fail$data((0,RT._)`!${d}`)}else{let l=(0,Nst.usePattern)(n,a);n.fail$data((0,RT._)`!${l}.test(${t})`)}}};iY.default=Fst});var fIe=te(sY=>{"use strict";Object.defineProperty(sY,"__esModule",{value:!0});var oP=ht(),Lst={message({keyword:n,schemaCode:e}){let t=n==="maxProperties"?"more":"fewer";return(0,oP.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:n})=>(0,oP._)`{limit: ${n}}`},Ost={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Lst,code(n){let{keyword:e,data:t,schemaCode:r}=n,a=e==="maxProperties"?oP.operators.GT:oP.operators.LT;n.fail$data((0,oP._)`Object.keys(${t}).length ${a} ${r}`)}};sY.default=Ost});var hIe=te(oY=>{"use strict";Object.defineProperty(oY,"__esModule",{value:!0});var lP=Oo(),cP=ht(),zst=Gt(),Bst={message:({params:{missingProperty:n}})=>(0,cP.str)`must have required property '${n}'`,params:({params:{missingProperty:n}})=>(0,cP._)`{missingProperty: ${n}}`},jst={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Bst,code(n){let{gen:e,schema:t,schemaCode:r,data:a,$data:i,it:s}=n,{opts:o}=s;if(!i&&t.length===0)return;let l=t.length>=o.loopRequired;if(s.allErrors?c():d(),o.strictRequired){let m=n.parentSchema.properties,{definedProperties:f}=n.it;for(let h of t)if((m==null?void 0:m[h])===void 0&&!f.has(h)){let g=s.schemaEnv.baseId+s.errSchemaPath,v=`required property "${h}" is not defined at "${g}" (strictRequired)`;(0,zst.checkStrictMode)(s,v,s.opts.strictRequired)}}function c(){if(l||i)n.block$data(cP.nil,u);else for(let m of t)(0,lP.checkReportMissingProp)(n,m)}function d(){let m=e.let("missing");if(l||i){let f=e.let("valid",!0);n.block$data(f,()=>p(m,f)),n.ok(f)}else e.if((0,lP.checkMissingProp)(n,t,m)),(0,lP.reportMissingProp)(n,m),e.else()}function u(){e.forOf("prop",r,m=>{n.setParams({missingProperty:m}),e.if((0,lP.noPropertyInData)(e,a,m,o.ownProperties),()=>n.error())})}function p(m,f){n.setParams({missingProperty:m}),e.forOf(m,r,()=>{e.assign(f,(0,lP.propertyInData)(e,a,m,o.ownProperties)),e.if((0,cP.not)(f),()=>{n.error(),e.break()})},cP.nil)}}};oY.default=jst});var gIe=te(lY=>{"use strict";Object.defineProperty(lY,"__esModule",{value:!0});var dP=ht(),$st={message({keyword:n,schemaCode:e}){let t=n==="maxItems"?"more":"fewer";return(0,dP.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:n})=>(0,dP._)`{limit: ${n}}`},Ust={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:$st,code(n){let{keyword:e,data:t,schemaCode:r}=n,a=e==="maxItems"?dP.operators.GT:dP.operators.LT;n.fail$data((0,dP._)`${t}.length ${a} ${r}`)}};lY.default=Ust});var TO=te(cY=>{"use strict";Object.defineProperty(cY,"__esModule",{value:!0});var yIe=E5();yIe.code='require("ajv/dist/runtime/equal").default';cY.default=yIe});var vIe=te(uY=>{"use strict";Object.defineProperty(uY,"__esModule",{value:!0});var dY=KD(),Ma=ht(),Hst=Gt(),Vst=TO(),Wst={message:({params:{i:n,j:e}})=>(0,Ma.str)`must NOT have duplicate items (items ## ${e} and ${n} are identical)`,params:({params:{i:n,j:e}})=>(0,Ma._)`{i: ${n}, j: ${e}}`},qst={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Wst,code(n){let{gen:e,data:t,$data:r,schema:a,parentSchema:i,schemaCode:s,it:o}=n;if(!r&&!a)return;let l=e.let("valid"),c=i.items?(0,dY.getSchemaTypes)(i.items):[];n.block$data(l,d,(0,Ma._)`${s} === false`),n.ok(l);function d(){let f=e.let("i",(0,Ma._)`${t}.length`),h=e.let("j");n.setParams({i:f,j:h}),e.assign(l,!0),e.if((0,Ma._)`${f} > 1`,()=>(u()?p:m)(f,h))}function u(){return c.length>0&&!c.some(f=>f==="object"||f==="array")}function p(f,h){let g=e.name("item"),v=(0,dY.checkDataTypes)(c,g,o.opts.strictNumbers,dY.DataType.Wrong),k=e.const("indices",(0,Ma._)`{}`);e.for((0,Ma._)`;${f}--;`,()=>{e.let(g,(0,Ma._)`${t}[${f}]`),e.if(v,(0,Ma._)`continue`),c.length>1&&e.if((0,Ma._)`typeof ${g} == "string"`,(0,Ma._)`${g} += "_"`),e.if((0,Ma._)`typeof ${k}[${g}] == "number"`,()=>{e.assign(h,(0,Ma._)`${k}[${g}]`),n.error(),e.assign(l,!1).break()}).code((0,Ma._)`${k}[${g}] = ${f}`)})}function m(f,h){let g=(0,Hst.useFunc)(e,Vst.default),v=e.name("outer");e.label(v).for((0,Ma._)`;${f}--;`,()=>e.for((0,Ma._)`${h} = ${f}; ${h}--;`,()=>e.if((0,Ma._)`${g}(${t}[${f}], ${t}[${h}])`,()=>{n.error(),e.assign(l,!1).break(v)})))}}};uY.default=qst});var kIe=te(mY=>{"use strict";Object.defineProperty(mY,"__esModule",{value:!0});var pY=ht(),Gst=Gt(),Yst=TO(),Kst={message:"must be equal to constant",params:({schemaCode:n})=>(0,pY._)`{allowedValue: ${n}}`},Zst={keyword:"const",$data:!0,error:Kst,code(n){let{gen:e,data:t,$data:r,schemaCode:a,schema:i}=n;r||i&&typeof i=="object"?n.fail$data((0,pY._)`!${(0,Gst.useFunc)(e,Yst.default)}(${t}, ${a})`):n.fail((0,pY._)`${i} !== ${t}`)}};mY.default=Zst});var TIe=te(fY=>{"use strict";Object.defineProperty(fY,"__esModule",{value:!0});var uP=ht(),Qst=Gt(),Jst=TO(),Xst={message:"must be equal to one of the allowed values",params:({schemaCode:n})=>(0,uP._)`{allowedValues: ${n}}`},eot={keyword:"enum",schemaType:"array",$data:!0,error:Xst,code(n){let{gen:e,data:t,$data:r,schema:a,schemaCode:i,it:s}=n;if(!r&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=s.opts.loopEnum,l,c=()=>l!=null?l:l=(0,Qst.useFunc)(e,Jst.default),d;if(o||r)d=e.let("valid"),n.block$data(d,u);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let m=e.const("vSchema",i);d=(0,uP.or)(...a.map((f,h)=>p(m,h)))}n.pass(d);function u(){e.assign(d,!1),e.forOf("v",i,m=>e.if((0,uP._)`${c()}(${t}, ${m})`,()=>e.assign(d,!0).break()))}function p(m,f){let h=a[f];return typeof h=="object"&&h!==null?(0,uP._)`${c()}(${t}, ${m}[${f}])`:(0,uP._)`${t} === ${h}`}}};fY.default=eot});var bIe=te(hY=>{"use strict";Object.defineProperty(hY,"__esModule",{value:!0});var tot=lIe(),rot=cIe(),not=pIe(),aot=mIe(),iot=fIe(),sot=hIe(),oot=gIe(),lot=vIe(),cot=kIe(),dot=TIe(),uot=[tot.default,rot.default,not.default,aot.default,iot.default,sot.default,oot.default,lot.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},cot.default,dot.default];hY.default=uot});var yY=te(pP=>{"use strict";Object.defineProperty(pP,"__esModule",{value:!0});pP.validateAdditionalItems=void 0;var Dg=ht(),gY=Gt(),pot={message:({params:{len:n}})=>(0,Dg.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,Dg._)`{limit: ${n}}`},mot={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:pot,code(n){let{parentSchema:e,it:t}=n,{items:r}=e;if(!Array.isArray(r)){(0,gY.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}wIe(n,r)}};function wIe(n,e){let{gen:t,schema:r,data:a,keyword:i,it:s}=n;s.items=!0;let o=t.const("len",(0,Dg._)`${a}.length`);if(r===!1)n.setParams({len:e.length}),n.pass((0,Dg._)`${o} <= ${e.length}`);else if(typeof r=="object"&&!(0,gY.alwaysValidSchema)(s,r)){let c=t.var("valid",(0,Dg._)`${o} <= ${e.length}`);t.if((0,Dg.not)(c),()=>l(c)),n.ok(c)}function l(c){t.forRange("i",e.length,o,d=>{n.subschema({keyword:i,dataProp:d,dataPropType:gY.Type.Num},c),s.allErrors||t.if((0,Dg.not)(c),()=>t.break())})}}pP.validateAdditionalItems=wIe;pP.default=mot});var vY=te(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:!0});mP.validateTuple=void 0;var SIe=ht(),bO=Gt(),fot=Oo(),hot={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(n){let{schema:e,it:t}=n;if(Array.isArray(e))return CIe(n,"additionalItems",e);t.items=!0,!(0,bO.alwaysValidSchema)(t,e)&&n.ok((0,fot.validateArray)(n))}};function CIe(n,e,t=n.schema){let{gen:r,parentSchema:a,data:i,keyword:s,it:o}=n;d(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=bO.mergeEvaluated.items(r,t.length,o.items));let l=r.name("valid"),c=r.const("len",(0,SIe._)`${i}.length`);t.forEach((u,p)=>{(0,bO.alwaysValidSchema)(o,u)||(r.if((0,SIe._)`${c} > ${p}`,()=>n.subschema({keyword:s,schemaProp:p,dataProp:p},l)),n.ok(l))});function d(u){let{opts:p,errSchemaPath:m}=o,f=t.length,h=f===u.minItems&&(f===u.maxItems||u[e]===!1);if(p.strictTuples&&!h){let g=`"${s}" is ${f}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,bO.checkStrictMode)(o,g,p.strictTuples)}}}mP.validateTuple=CIe;mP.default=hot});var xIe=te(kY=>{"use strict";Object.defineProperty(kY,"__esModule",{value:!0});var got=vY(),yot={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,got.validateTuple)(n,"items")};kY.default=yot});var DIe=te(TY=>{"use strict";Object.defineProperty(TY,"__esModule",{value:!0});var EIe=ht(),vot=Gt(),kot=Oo(),Tot=yY(),bot={message:({params:{len:n}})=>(0,EIe.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,EIe._)`{limit: ${n}}`},wot={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:bot,code(n){let{schema:e,parentSchema:t,it:r}=n,{prefixItems:a}=t;r.items=!0,!(0,vot.alwaysValidSchema)(r,e)&&(a?(0,Tot.validateAdditionalItems)(n,a):n.ok((0,kot.validateArray)(n)))}};TY.default=wot});var PIe=te(bY=>{"use strict";Object.defineProperty(bY,"__esModule",{value:!0});var Bo=ht(),wO=Gt(),Sot={message:({params:{min:n,max:e}})=>e===void 0?(0,Bo.str)`must contain at least ${n} valid item(s)`:(0,Bo.str)`must contain at least ${n} and no more than ${e} valid item(s)`,params:({params:{min:n,max:e}})=>e===void 0?(0,Bo._)`{minContains: ${n}}`:(0,Bo._)`{minContains: ${n}, maxContains: ${e}}`},Cot={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Sot,code(n){let{gen:e,schema:t,parentSchema:r,data:a,it:i}=n,s,o,{minContains:l,maxContains:c}=r;i.opts.next?(s=l===void 0?1:l,o=c):s=1;let d=e.const("len",(0,Bo._)`${a}.length`);if(n.setParams({min:s,max:o}),o===void 0&&s===0){(0,wO.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&s>o){(0,wO.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,wO.alwaysValidSchema)(i,t)){let h=(0,Bo._)`${d} >= ${s}`;o!==void 0&&(h=(0,Bo._)`${h} && ${d} <= ${o}`),n.pass(h);return}i.items=!0;let u=e.name("valid");o===void 0&&s===1?m(u,()=>e.if(u,()=>e.break())):s===0?(e.let(u,!0),o!==void 0&&e.if((0,Bo._)`${a}.length > 0`,p)):(e.let(u,!1),p()),n.result(u,()=>n.reset());function p(){let h=e.name("_valid"),g=e.let("count",0);m(h,()=>e.if(h,()=>f(g)))}function m(h,g){e.forRange("i",0,d,v=>{n.subschema({keyword:"contains",dataProp:v,dataPropType:wO.Type.Num,compositeRule:!0},h),g()})}function f(h){e.code((0,Bo._)`${h}++`),o===void 0?e.if((0,Bo._)`${h} >= ${s}`,()=>e.assign(u,!0).break()):(e.if((0,Bo._)`${h} > ${o}`,()=>e.assign(u,!1).break()),s===1?e.assign(u,!0):e.if((0,Bo._)`${h} >= ${s}`,()=>e.assign(u,!0)))}}};bY.default=Cot});var IIe=te(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.validateSchemaDeps=Jc.validatePropertyDeps=Jc.error=void 0;var wY=ht(),xot=Gt(),fP=Oo();Jc.error={message:({params:{property:n,depsCount:e,deps:t}})=>{let r=e===1?"property":"properties";return(0,wY.str)`must have ${r} ${t} when property ${n} is present`},params:({params:{property:n,depsCount:e,deps:t,missingProperty:r}})=>(0,wY._)`{property: ${n},
missingProperty: ${r},
depsCount: ${e},
deps: ${t}}`};var Eot={keyword:"dependencies",type:"object",schemaType:"object",error:Jc.error,code(n){let[e,t]=Dot(n);AIe(n,e),MIe(n,t)}};function Dot({schema:n}){let e={},t={};for(let r in n){if(r==="__proto__")continue;let a=Array.isArray(n[r])?e:t;a[r]=n[r]}return[e,t]}function AIe(n,e=n.schema){let{gen:t,data:r,it:a}=n;if(Object.keys(e).length===0)return;let i=t.let("missing");for(let s in e){let o=e[s];if(o.length===0)continue;let l=(0,fP.propertyInData)(t,r,s,a.opts.ownProperties);n.setParams({property:s,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(l,()=>{for(let c of o)(0,fP.checkReportMissingProp)(n,c)}):(t.if((0,wY._)`${l} && (${(0,fP.checkMissingProp)(n,o,i)})`),(0,fP.reportMissingProp)(n,i),t.else())}}Jc.validatePropertyDeps=AIe;function MIe(n,e=n.schema){let{gen:t,data:r,keyword:a,it:i}=n,s=t.name("valid");for(let o in e)(0,xot.alwaysValidSchema)(i,e[o])||(t.if((0,fP.propertyInData)(t,r,o,i.opts.ownProperties),()=>{let l=n.subschema({keyword:a,schemaProp:o},s);n.mergeValidEvaluated(l,s)},()=>t.var(s,!0)),n.ok(s))}Jc.validateSchemaDeps=MIe;Jc.default=Eot});var RIe=te(SY=>{"use strict";Object.defineProperty(SY,"__esModule",{value:!0});var NIe=ht(),Pot=Gt(),Aot={message:"property name must be valid",params:({params:n})=>(0,NIe._)`{propertyName: ${n.propertyName}}`},Mot={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Aot,code(n){let{gen:e,schema:t,data:r,it:a}=n;if((0,Pot.alwaysValidSchema)(a,t))return;let i=e.name("valid");e.forIn("key",r,s=>{n.setParams({propertyName:s}),n.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,NIe.not)(i),()=>{n.error(!0),a.allErrors||e.break()})}),n.ok(i)}};SY.default=Mot});var xY=te(CY=>{"use strict";Object.defineProperty(CY,"__esModule",{value:!0});var SO=Oo(),El=ht(),Iot=Du(),CO=Gt(),Not={message:"must NOT have additional properties",params:({params:n})=>(0,El._)`{additionalProperty: ${n.additionalProperty}}`},Rot={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Not,code(n){let{gen:e,schema:t,parentSchema:r,data:a,errsCount:i,it:s}=n;if(!i)throw new Error("ajv implementation error");let{allErrors:o,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,CO.alwaysValidSchema)(s,t))return;let c=(0,SO.allSchemaProperties)(r.properties),d=(0,SO.allSchemaProperties)(r.patternProperties);u(),n.ok((0,El._)`${i} === ${Iot.default.errors}`);function u(){e.forIn("key",a,g=>{!c.length&&!d.length?f(g):e.if(p(g),()=>f(g))})}function p(g){let v;if(c.length>8){let k=(0,CO.schemaRefOrVal)(s,r.properties,"properties");v=(0,SO.isOwnProperty)(e,k,g)}else c.length?v=(0,El.or)(...c.map(k=>(0,El._)`${g} === ${k}`)):v=El.nil;return d.length&&(v=(0,El.or)(v,...d.map(k=>(0,El._)`${(0,SO.usePattern)(n,k)}.test(${g})`))),(0,El.not)(v)}function m(g){e.code((0,El._)`delete ${a}[${g}]`)}function f(g){if(l.removeAdditional==="all"||l.removeAdditional&&t===!1){m(g);return}if(t===!1){n.setParams({additionalProperty:g}),n.error(),o||e.break();return}if(typeof t=="object"&&!(0,CO.alwaysValidSchema)(s,t)){let v=e.name("valid");l.removeAdditional==="failing"?(h(g,v,!1),e.if((0,El.not)(v),()=>{n.reset(),m(g)})):(h(g,v),o||e.if((0,El.not)(v),()=>e.break()))}}function h(g,v,k){let T={keyword:"additionalProperties",dataProp:g,dataPropType:CO.Type.Str};k===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(T,v)}}};CY.default=Rot});var LIe=te(DY=>{"use strict";Object.defineProperty(DY,"__esModule",{value:!0});var _ot=XD(),_Ie=Oo(),EY=Gt(),FIe=xY(),Fot={keyword:"properties",type:"object",schemaType:"object",code(n){let{gen:e,schema:t,parentSchema:r,data:a,it:i}=n;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&FIe.default.code(new _ot.KeywordCxt(i,FIe.default,"additionalProperties"));let s=(0,_Ie.allSchemaProperties)(t);for(let u of s)i.definedProperties.add(u);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=EY.mergeEvaluated.props(e,(0,EY.toHash)(s),i.props));let o=s.filter(u=>!(0,EY.alwaysValidSchema)(i,t[u]));if(o.length===0)return;let l=e.name("valid");for(let u of o)c(u)?d(u):(e.if((0,_Ie.propertyInData)(e,a,u,i.opts.ownProperties)),d(u),i.allErrors||e.else().var(l,!0),e.endIf()),n.it.definedProperties.add(u),n.ok(l);function c(u){return i.opts.useDefaults&&!i.compositeRule&&t[u].default!==void 0}function d(u){n.subschema({keyword:"properties",schemaProp:u,dataProp:u},l)}}};DY.default=Fot});var jIe=te(PY=>{"use strict";Object.defineProperty(PY,"__esModule",{value:!0});var OIe=Oo(),xO=ht(),zIe=Gt(),BIe=Gt(),Lot={keyword:"patternProperties",type:"object",schemaType:"object",code(n){let{gen:e,schema:t,data:r,parentSchema:a,it:i}=n,{opts:s}=i,o=(0,OIe.allSchemaProperties)(t),l=o.filter(h=>(0,zIe.alwaysValidSchema)(i,t[h]));if(o.length===0||l.length===o.length&&(!i.opts.unevaluated||i.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&a.properties,d=e.name("valid");i.props!==!0&&!(i.props instanceof xO.Name)&&(i.props=(0,BIe.evaluatedPropsToName)(e,i.props));let{props:u}=i;p();function p(){for(let h of o)c&&m(h),i.allErrors?f(h):(e.var(d,!0),f(h),e.if(d))}function m(h){for(let g in c)new RegExp(h).test(g)&&(0,zIe.checkStrictMode)(i,`property ${g} matches pattern ${h} (use allowMatchingProperties)`)}function f(h){e.forIn("key",r,g=>{e.if((0,xO._)`${(0,OIe.usePattern)(n,h)}.test(${g})`,()=>{let v=l.includes(h);v||n.subschema({keyword:"patternProperties",schemaProp:h,dataProp:g,dataPropType:BIe.Type.Str},d),i.opts.unevaluated&&u!==!0?e.assign((0,xO._)`${u}[${g}]`,!0):!v&&!i.allErrors&&e.if((0,xO.not)(d),()=>e.break())})})}}};PY.default=Lot});var $Ie=te(AY=>{"use strict";Object.defineProperty(AY,"__esModule",{value:!0});var Oot=Gt(),zot={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){let{gen:e,schema:t,it:r}=n;if((0,Oot.alwaysValidSchema)(r,t)){n.fail();return}let a=e.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),n.failResult(a,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};AY.default=zot});var UIe=te(MY=>{"use strict";Object.defineProperty(MY,"__esModule",{value:!0});var Bot=Oo(),jot={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Bot.validateUnion,error:{message:"must match a schema in anyOf"}};MY.default=jot});var HIe=te(IY=>{"use strict";Object.defineProperty(IY,"__esModule",{value:!0});var EO=ht(),$ot=Gt(),Uot={message:"must match exactly one schema in oneOf",params:({params:n})=>(0,EO._)`{passingSchemas: ${n.passing}}`},Hot={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Uot,code(n){let{gen:e,schema:t,parentSchema:r,it:a}=n;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&r.discriminator)return;let i=t,s=e.let("valid",!1),o=e.let("passing",null),l=e.name("_valid");n.setParams({passing:o}),e.block(c),n.result(s,()=>n.reset(),()=>n.error(!0));function c(){i.forEach((d,u)=>{let p;(0,$ot.alwaysValidSchema)(a,d)?e.var(l,!0):p=n.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&e.if((0,EO._)`${l} && ${s}`).assign(s,!1).assign(o,(0,EO._)`[${o}, ${u}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(o,u),p&&n.mergeEvaluated(p,EO.Name)})})}}};IY.default=Hot});var VIe=te(NY=>{"use strict";Object.defineProperty(NY,"__esModule",{value:!0});var Vot=Gt(),Wot={keyword:"allOf",schemaType:"array",code(n){let{gen:e,schema:t,it:r}=n;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((i,s)=>{if((0,Vot.alwaysValidSchema)(r,i))return;let o=n.subschema({keyword:"allOf",schemaProp:s},a);n.ok(a),n.mergeEvaluated(o)})}};NY.default=Wot});var GIe=te(RY=>{"use strict";Object.defineProperty(RY,"__esModule",{value:!0});var DO=ht(),qIe=Gt(),qot={message:({params:n})=>(0,DO.str)`must match "${n.ifClause}" schema`,params:({params:n})=>(0,DO._)`{failingKeyword: ${n.ifClause}}`},Got={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:qot,code(n){let{gen:e,parentSchema:t,it:r}=n;t.then===void 0&&t.else===void 0&&(0,qIe.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let a=WIe(r,"then"),i=WIe(r,"else");if(!a&&!i)return;let s=e.let("valid",!0),o=e.name("_valid");if(l(),n.reset(),a&&i){let d=e.let("ifClause");n.setParams({ifClause:d}),e.if(o,c("then",d),c("else",d))}else a?e.if(o,c("then")):e.if((0,DO.not)(o),c("else"));n.pass(s,()=>n.error(!0));function l(){let d=n.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);n.mergeEvaluated(d)}function c(d,u){return()=>{let p=n.subschema({keyword:d},o);e.assign(s,o),n.mergeValidEvaluated(p,s),u?e.assign(u,(0,DO._)`${d}`):n.setParams({ifClause:d})}}}};function WIe(n,e){let t=n.schema[e];return t!==void 0&&!(0,qIe.alwaysValidSchema)(n,t)}RY.default=Got});var YIe=te(_Y=>{"use strict";Object.defineProperty(_Y,"__esModule",{value:!0});var Yot=Gt(),Kot={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:e,it:t}){e.if===void 0&&(0,Yot.checkStrictMode)(t,`"${n}" without "if" is ignored`)}};_Y.default=Kot});var KIe=te(FY=>{"use strict";Object.defineProperty(FY,"__esModule",{value:!0});var Zot=yY(),Qot=xIe(),Jot=vY(),Xot=DIe(),elt=PIe(),tlt=IIe(),rlt=RIe(),nlt=xY(),alt=LIe(),ilt=jIe(),slt=$Ie(),olt=UIe(),llt=HIe(),clt=VIe(),dlt=GIe(),ult=YIe();function plt(n=!1){let e=[slt.default,olt.default,llt.default,clt.default,dlt.default,ult.default,rlt.default,nlt.default,tlt.default,alt.default,ilt.default];return n?e.push(Qot.default,Xot.default):e.push(Zot.default,Jot.default),e.push(elt.default),e}FY.default=plt});var ZIe=te(LY=>{"use strict";Object.defineProperty(LY,"__esModule",{value:!0});var Pn=ht(),mlt={message:({schemaCode:n})=>(0,Pn.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,Pn._)`{format: ${n}}`},flt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:mlt,code(n,e){let{gen:t,data:r,$data:a,schema:i,schemaCode:s,it:o}=n,{opts:l,errSchemaPath:c,schemaEnv:d,self:u}=o;if(!l.validateFormats)return;a?p():m();function p(){let f=t.scopeValue("formats",{ref:u.formats,code:l.code.formats}),h=t.const("fDef",(0,Pn._)`${f}[${s}]`),g=t.let("fType"),v=t.let("format");t.if((0,Pn._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>t.assign(g,(0,Pn._)`${h}.type || "string"`).assign(v,(0,Pn._)`${h}.validate`),()=>t.assign(g,(0,Pn._)`"string"`).assign(v,h)),n.fail$data((0,Pn.or)(k(),T()));function k(){return l.strictSchema===!1?Pn.nil:(0,Pn._)`${s} && !${v}`}function T(){let b=d.$async?(0,Pn._)`(${h}.async ? await ${v}(${r}) : ${v}(${r}))`:(0,Pn._)`${v}(${r})`,w=(0,Pn._)`(typeof ${v} == "function" ? ${b} : ${v}.test(${r}))`;return(0,Pn._)`${v} && ${v} !== true && ${g} === ${e} && !${w}`}}function m(){let f=u.formats[i];if(!f){k();return}if(f===!0)return;let[h,g,v]=T(f);h===e&&n.pass(b());function k(){if(l.strictSchema===!1){u.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${i}" ignored in schema at path "${c}"`}}function T(w){let S=w instanceof RegExp?(0,Pn.regexpCode)(w):l.code.formats?(0,Pn._)`${l.code.formats}${(0,Pn.getProperty)(i)}`:void 0,C=t.scopeValue("formats",{key:i,ref:w,code:S});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Pn._)`${C}.validate`]:["string",w,C]}function b(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Pn._)`await ${v}(${r})`}return typeof g=="function"?(0,Pn._)`${v}(${r})`:(0,Pn._)`${v}.test(${r})`}}}};LY.default=flt});var QIe=te(OY=>{"use strict";Object.defineProperty(OY,"__esModule",{value:!0});var hlt=ZIe(),glt=[hlt.default];OY.default=glt});var JIe=te(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.contentVocabulary=_T.metadataVocabulary=void 0;_T.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];_T.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var eNe=te(zY=>{"use strict";Object.defineProperty(zY,"__esModule",{value:!0});var ylt=oIe(),vlt=bIe(),klt=KIe(),Tlt=QIe(),XIe=JIe(),blt=[ylt.default,vlt.default,(0,klt.default)(),Tlt.default,XIe.metadataVocabulary,XIe.contentVocabulary];zY.default=blt});var rNe=te(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});PO.DiscrError=void 0;var tNe;(function(n){n.Tag="tag",n.Mapping="mapping"})(tNe||(PO.DiscrError=tNe={}))});var aNe=te(jY=>{"use strict";Object.defineProperty(jY,"__esModule",{value:!0});var FT=ht(),BY=rNe(),nNe=cO(),wlt=eP(),Slt=Gt(),Clt={message:({params:{discrError:n,tagName:e}})=>n===BY.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:n,tag:e,tagName:t}})=>(0,FT._)`{error: ${n}, tag: ${t}, tagValue: ${e}}`},xlt={keyword:"discriminator",type:"object",schemaType:"object",error:Clt,code(n){let{gen:e,data:t,schema:r,parentSchema:a,it:i}=n,{oneOf:s}=a;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=r.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,FT._)`${t}${(0,FT.getProperty)(o)}`);e.if((0,FT._)`typeof ${c} == "string"`,()=>d(),()=>n.error(!1,{discrError:BY.DiscrError.Tag,tag:c,tagName:o})),n.ok(l);function d(){let m=p();e.if(!1);for(let f in m)e.elseIf((0,FT._)`${c} === ${f}`),e.assign(l,u(m[f]));e.else(),n.error(!1,{discrError:BY.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function u(m){let f=e.name("valid"),h=n.subschema({keyword:"oneOf",schemaProp:m},f);return n.mergeEvaluated(h,FT.Name),f}function p(){var m;let f={},h=v(a),g=!0;for(let b=0;b<s.length;b++){let w=s[b];if(w!=null&&w.$ref&&!(0,Slt.schemaHasRulesButRef)(w,i.self.RULES)){let C=w.$ref;if(w=nNe.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C),w instanceof nNe.SchemaEnv&&(w=w.schema),w===void 0)throw new wlt.default(i.opts.uriResolver,i.baseId,C)}let S=(m=w==null?void 0:w.properties)===null||m===void 0?void 0:m[o];if(typeof S!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);g=g&&(h||v(w)),k(S,b)}if(!g)throw new Error(`discriminator: "${o}" must be required`);return f;function v({required:b}){return Array.isArray(b)&&b.includes(o)}function k(b,w){if(b.const)T(b.const,w);else if(b.enum)for(let S of b.enum)T(S,w);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function T(b,w){if(typeof b!="string"||b in f)throw new Error(`discriminator: "${o}" values must be unique strings`);f[b]=w}}}};jY.default=xlt});var iNe=te((phr,Elt)=>{Elt.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var UY=te((Wr,$Y)=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.MissingRefError=Wr.ValidationError=Wr.CodeGen=Wr.Name=Wr.nil=Wr.stringify=Wr.str=Wr._=Wr.KeywordCxt=Wr.Ajv=void 0;var Dlt=tIe(),Plt=eNe(),Alt=aNe(),sNe=iNe(),Mlt=["/properties"],AO="http://json-schema.org/draft-07/schema",LT=class extends Dlt.default{_addVocabularies(){super._addVocabularies(),Plt.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Alt.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(sNe,Mlt):sNe;this.addMetaSchema(e,AO,!1),this.refs["http://json-schema.org/schema"]=AO}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(AO)?AO:void 0)}};Wr.Ajv=LT;$Y.exports=Wr=LT;$Y.exports.Ajv=LT;Object.defineProperty(Wr,"__esModule",{value:!0});Wr.default=LT;var Ilt=XD();Object.defineProperty(Wr,"KeywordCxt",{enumerable:!0,get:function(){return Ilt.KeywordCxt}});var OT=ht();Object.defineProperty(Wr,"_",{enumerable:!0,get:function(){return OT._}});Object.defineProperty(Wr,"str",{enumerable:!0,get:function(){return OT.str}});Object.defineProperty(Wr,"stringify",{enumerable:!0,get:function(){return OT.stringify}});Object.defineProperty(Wr,"nil",{enumerable:!0,get:function(){return OT.nil}});Object.defineProperty(Wr,"Name",{enumerable:!0,get:function(){return OT.Name}});Object.defineProperty(Wr,"CodeGen",{enumerable:!0,get:function(){return OT.CodeGen}});var Nlt=oO();Object.defineProperty(Wr,"ValidationError",{enumerable:!0,get:function(){return Nlt.default}});var Rlt=eP();Object.defineProperty(Wr,"MissingRefError",{enumerable:!0,get:function(){return Rlt.default}})});var fNe=te(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.formatNames=ed.fastFormats=ed.fullFormats=void 0;function Xc(n,e){return{validate:n,compare:e}}ed.fullFormats={date:Xc(dNe,qY),time:Xc(VY(!0),GY),"date-time":Xc(oNe(!0),pNe),"iso-time":Xc(VY(),uNe),"iso-date-time":Xc(oNe(),mNe),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Blt,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:qlt,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:jlt,int32:{type:"number",validate:Hlt},int64:{type:"number",validate:Vlt},float:{type:"number",validate:cNe},double:{type:"number",validate:cNe},password:!0,binary:!0};ed.fastFormats={...ed.fullFormats,date:Xc(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,qY),time:Xc(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,GY),"date-time":Xc(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,pNe),"iso-time":Xc(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,uNe),"iso-date-time":Xc(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,mNe),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};ed.formatNames=Object.keys(ed.fullFormats);function _lt(n){return n%4===0&&(n%100!==0||n%400===0)}var Flt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Llt=[0,31,28,31,30,31,30,31,31,30,31,30,31];function dNe(n){let e=Flt.exec(n);if(!e)return!1;let t=+e[1],r=+e[2],a=+e[3];return r>=1&&r<=12&&a>=1&&a<=(r===2&&_lt(t)?29:Llt[r])}function qY(n,e){if(n&&e)return n>e?1:n<e?-1:0}var HY=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function VY(n){return function(t){let r=HY.exec(t);if(!r)return!1;let a=+r[1],i=+r[2],s=+r[3],o=r[4],l=r[5]==="-"?-1:1,c=+(r[6]||0),d=+(r[7]||0);if(c>23||d>59||n&&!o)return!1;if(a<=23&&i<=59&&s<60)return!0;let u=i-d*l,p=a-c*l-(u<0?1:0);return(p===23||p===-1)&&(u===59||u===-1)&&s<61}}function GY(n,e){if(!(n&&e))return;let t=new Date("2020-01-01T"+n).valueOf(),r=new Date("2020-01-01T"+e).valueOf();if(t&&r)return t-r}function uNe(n,e){if(!(n&&e))return;let t=HY.exec(n),r=HY.exec(e);if(t&&r)return n=t[1]+t[2]+t[3],e=r[1]+r[2]+r[3],n>e?1:n<e?-1:0}var WY=/t|\s/i;function oNe(n){let e=VY(n);return function(r){let a=r.split(WY);return a.length===2&&dNe(a[0])&&e(a[1])}}function pNe(n,e){if(!(n&&e))return;let t=new Date(n).valueOf(),r=new Date(e).valueOf();if(t&&r)return t-r}function mNe(n,e){if(!(n&&e))return;let[t,r]=n.split(WY),[a,i]=e.split(WY),s=qY(t,a);if(s!==void 0)return s||GY(r,i)}var Olt=/\/|:/,zlt=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Blt(n){return Olt.test(n)&&zlt.test(n)}var lNe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function jlt(n){return lNe.lastIndex=0,lNe.test(n)}var $lt=-(2**31),Ult=2**31-1;function Hlt(n){return Number.isInteger(n)&&n<=Ult&&n>=$lt}function Vlt(n){return Number.isInteger(n)}function cNe(){return!0}var Wlt=/[^\\]\\Z/;function qlt(n){if(Wlt.test(n))return!1;try{return new RegExp(n),!0}catch(e){return!1}}});var hNe=te(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});zT.formatLimitDefinition=void 0;var Glt=UY(),Dl=ht(),zm=Dl.operators,MO={formatMaximum:{okStr:"<=",ok:zm.LTE,fail:zm.GT},formatMinimum:{okStr:">=",ok:zm.GTE,fail:zm.LT},formatExclusiveMaximum:{okStr:"<",ok:zm.LT,fail:zm.GTE},formatExclusiveMinimum:{okStr:">",ok:zm.GT,fail:zm.LTE}},Ylt={message:({keyword:n,schemaCode:e})=>(0,Dl.str)`should be ${MO[n].okStr} ${e}`,params:({keyword:n,schemaCode:e})=>(0,Dl._)`{comparison: ${MO[n].okStr}, limit: ${e}}`};zT.formatLimitDefinition={keyword:Object.keys(MO),type:"string",schemaType:"string",$data:!0,error:Ylt,code(n){let{gen:e,data:t,schemaCode:r,keyword:a,it:i}=n,{opts:s,self:o}=i;if(!s.validateFormats)return;let l=new Glt.KeywordCxt(i,o.RULES.all.format.definition,"format");l.$data?c():d();function c(){let p=e.scopeValue("formats",{ref:o.formats,code:s.code.formats}),m=e.const("fmt",(0,Dl._)`${p}[${l.schemaCode}]`);n.fail$data((0,Dl.or)((0,Dl._)`typeof ${m} != "object"`,(0,Dl._)`${m} instanceof RegExp`,(0,Dl._)`typeof ${m}.compare != "function"`,u(m)))}function d(){let p=l.schema,m=o.formats[p];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${a}": format "${p}" does not define "compare" function`);let f=e.scopeValue("formats",{key:p,ref:m,code:s.code.formats?(0,Dl._)`${s.code.formats}${(0,Dl.getProperty)(p)}`:void 0});n.fail$data(u(f))}function u(p){return(0,Dl._)`${p}.compare(${t}, ${r}) ${MO[a].fail} 0`}},dependencies:["format"]};var Klt=n=>(n.addKeyword(zT.formatLimitDefinition),n);zT.default=Klt});var kNe=te((hP,vNe)=>{"use strict";Object.defineProperty(hP,"__esModule",{value:!0});var BT=fNe(),Zlt=hNe(),YY=ht(),gNe=new YY.Name("fullFormats"),Qlt=new YY.Name("fastFormats"),KY=(n,e={keywords:!0})=>{if(Array.isArray(e))return yNe(n,e,BT.fullFormats,gNe),n;let[t,r]=e.mode==="fast"?[BT.fastFormats,Qlt]:[BT.fullFormats,gNe],a=e.formats||BT.formatNames;return yNe(n,a,t,r),e.keywords&&(0,Zlt.default)(n),n};KY.get=(n,e="full")=>{let r=(e==="fast"?BT.fastFormats:BT.fullFormats)[n];if(!r)throw new Error(`Unknown format "${n}"`);return r};function yNe(n,e,t,r){var a,i;(a=(i=n.opts.code).formats)!==null&&a!==void 0||(i.formats=(0,YY._)`require("ajv-formats/dist/formats").${r}`);for(let s of e)n.addFormat(s,t[s])}vNe.exports=hP=KY;Object.defineProperty(hP,"__esModule",{value:!0});hP.default=KY});function Jlt(){let n=new TNe.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,bNe.default)(n),n}var TNe,bNe,IO,wNe=y(()=>{TNe=tt(UY(),1),bNe=tt(kNe(),1);IO=class{constructor(e){this._ajv=e!=null?e:Jlt()}getValidator(e){var r;let t="$id"in e&&typeof e.$id=="string"?(r=this._ajv.getSchema(e.$id))!=null?r:this._ajv.compile(e):this._ajv.compile(e);return a=>t(a)?{valid:!0,data:a,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}});var NO,SNe=y(()=>{NO=class{constructor(e){this._server=e}requestStream(e,t,r){return this._server.requestStream(e,t,r)}async getTask(e,t){return this._server.getTask({taskId:e},t)}async getTaskResult(e,t,r){return this._server.getTaskResult({taskId:e},t,r)}async listTasks(e,t){return this._server.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._server.cancelTask({taskId:e},t)}}});function CNe(n,e,t){var r;if(!n)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((r=n.tools)!=null&&r.call))throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break;default:break}}function xNe(n,e,t){var r,a;if(!n)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((r=n.sampling)!=null&&r.createMessage))throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((a=n.elicitation)!=null&&a.create))throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var ENe=y(()=>{});var RO,DNe=y(()=>{bAe();zD();wNe();DD();SNe();ENe();RO=class extends YL{constructor(e,t){var r,a;super(t),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(OD.options.map((i,s)=>[i,s])),this.isMessageIgnored=(i,s)=>{let o=this._loggingLevels.get(s);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=(r=t==null?void 0:t.capabilities)!=null?r:{},this._instructions=t==null?void 0:t.instructions,this._jsonSchemaValidator=(a=t==null?void 0:t.jsonSchemaValidator)!=null?a:new IO,this.setRequestHandler(TL,i=>this._oninitialize(i)),this.setNotificationHandler(nG,()=>{var i;return(i=this.oninitialized)==null?void 0:i.call(this)}),this._capabilities.logging&&this.setRequestHandler(dG,async(i,s)=>{var d;let o=s.sessionId||((d=s.requestInfo)==null?void 0:d.headers["mcp-session-id"])||void 0,{level:l}=i.params,c=OD.safeParse(l);return c.success&&this._loggingLevels.set(o,c.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new NO(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=TAe(this._capabilities,e)}setRequestHandler(e,t){var o,l,c;let r=Em(e),a=r==null?void 0:r.method;if(!a)throw new Error("Schema is missing a method literal");let i;if(No(a)){let d=a,u=(o=d._zod)==null?void 0:o.def;i=(l=u==null?void 0:u.value)!=null?l:d.value}else{let d=a,u=d._def;i=(c=u==null?void 0:u.value)!=null?c:d.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let d=async(u,p)=>{let m=xm(wT,u);if(!m.success){let v=m.error instanceof Error?m.error.message:String(m.error);throw new _e(je.InvalidParams,`Invalid tools/call request: ${v}`)}let{params:f}=m.data,h=await Promise.resolve(t(u,p));if(f.task){let v=xm(TT,h);if(!v.success){let k=v.error instanceof Error?v.error.message:String(v.error);throw new _e(je.InvalidParams,`Invalid task creation result: ${k}`)}return v.data}let g=xm(FL,h);if(!g.success){let v=g.error instanceof Error?g.error.message:String(g.error);throw new _e(je.InvalidParams,`Invalid tools/call result: ${v}`)}return g.data};return super.setRequestHandler(e,d)}return super.setRequestHandler(e,t)}assertCapabilityForMethod(e){var t,r,a;switch(e){case"sampling/createMessage":if(!((t=this._clientCapabilities)!=null&&t.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((r=this._clientCapabilities)!=null&&r.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((a=this._clientCapabilities)!=null&&a.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var t,r;switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!((r=(t=this._clientCapabilities)==null?void 0:t.elicitation)!=null&&r.url))throw new Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){var t,r;xNe((r=(t=this._clientCapabilities)==null?void 0:t.tasks)==null?void 0:r.requests,e,"Client")}assertTaskHandlerCapability(e){var t;this._capabilities&&CNe((t=this._capabilities.tasks)==null?void 0:t.requests,e,"Server")}async _oninitialize(e){let t=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:AD.includes(t)?t:Q9,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},vL)}async createMessage(e,t){var r,a;if((e.tools||e.toolChoice)&&!((a=(r=this._clientCapabilities)==null?void 0:r.sampling)!=null&&a.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],o=s.some(u=>u.type==="tool_result"),l=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=l?Array.isArray(l.content)?l.content:[l.content]:[],d=c.some(u=>u.type==="tool_use");if(o){if(s.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!d)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(d){let u=new Set(c.filter(m=>m.type==="tool_use").map(m=>m.id)),p=new Set(s.filter(m=>m.type==="tool_result").map(m=>m.toolUseId));if(u.size!==p.size||![...u].every(m=>p.has(m)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},pG,t):this.request({method:"sampling/createMessage",params:e},uG,t)}async elicitInput(e,t){var a,i,s,o,l;switch((a=e.mode)!=null?a:"form"){case"url":{if(!((s=(i=this._clientCapabilities)==null?void 0:i.elicitation)!=null&&s.url))throw new Error("Client does not support url elicitation.");let c=e;return this.request({method:"elicitation/create",params:c},LL,t)}case"form":{if(!((l=(o=this._clientCapabilities)==null?void 0:o.elicitation)!=null&&l.form))throw new Error("Client does not support form elicitation.");let c=e.mode==="form"?e:{...e,mode:"form"},d=await this.request({method:"elicitation/create",params:c},LL,t);if(d.action==="accept"&&d.content&&c.requestedSchema)try{let p=this._jsonSchemaValidator.getValidator(c.requestedSchema)(d.content);if(!p.valid)throw new _e(je.InvalidParams,`Elicitation response content does not match requested schema: ${p.errorMessage}`)}catch(u){throw u instanceof _e?u:new _e(je.InternalError,`Error validating elicitation response: ${u instanceof Error?u.message:String(u)}`)}return d}}}createElicitationCompletionNotifier(e,t){var r,a;if(!((a=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&a.url))throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this.request({method:"roots/list",params:e},mG,t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}});function ZY(n){return!!n&&typeof n=="object"&&ANe in n}function MNe(n){let e=n[ANe];return e==null?void 0:e.complete}var ANe,PNe,INe=y(()=>{ANe=Symbol.for("mcp.completable");(function(n){n.Completable="McpCompletable"})(PNe||(PNe={}))});var NNe=y(()=>{});function ect(n){let e=[];if(n.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(n.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${n.length})`]};if(n.includes(" ")&&e.push("Tool name contains spaces, which may cause parsing issues"),n.includes(",")&&e.push("Tool name contains commas, which may cause parsing issues"),(n.startsWith("-")||n.endsWith("-"))&&e.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(n.startsWith(".")||n.endsWith("."))&&e.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!Xlt.test(n)){let t=n.split("").filter(r=>!/[A-Za-z0-9._-]/.test(r)).filter((r,a,i)=>i.indexOf(r)===a);return e.push(`Tool name contains invalid characters: ${t.map(r=>`"${r}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:e}}return{isValid:!0,warnings:e}}function tct(n,e){if(e.length>0){console.warn(`Tool name validation warning for "${n}":`);for(let t of e)console.warn(` - ${t}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function QY(n){let e=ect(n);return tct(n,e.warnings),e.isValid}var Xlt,RNe=y(()=>{Xlt=/^[A-Za-z0-9._-]{1,128}$/});var _O,_Ne=y(()=>{_O=class{constructor(e){this._mcpServer=e}registerToolTask(e,t,r){let a={taskSupport:"required",...t.execution};if(a.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,t.title,t.description,t.inputSchema,t.outputSchema,t.annotations,a,t._meta,r)}}});function ONe(n){return n!==null&&typeof n=="object"&&"parse"in n&&typeof n.parse=="function"&&"safeParse"in n&&typeof n.safeParse=="function"}function nct(n){return"_def"in n||"_zod"in n||ONe(n)}function JY(n){return typeof n!="object"||n===null||nct(n)?!1:Object.keys(n).length===0?!0:Object.values(n).some(ONe)}function FNe(n){if(n)return JY(n)?hg(n):n}function act(n){let e=Em(n);return e?Object.entries(e).map(([t,r])=>{let a=KPe(r),i=ZPe(r);return{name:t,description:a,required:!i}}):[]}function Bm(n){let e=Em(n),t=e==null?void 0:e.method;if(!t)throw new Error("Schema is missing a method literal");let r=pL(t);if(typeof r=="string")return r;throw new Error("Schema method literal must be a string")}function LNe(n){return{completion:{values:n.slice(0,100),total:n.length,hasMore:n.length>100}}}var FO,rct,gP,zNe=y(()=>{DNe();DD();ZG();zD();INe();NNe();RNe();_Ne();k_();FO=class{constructor(e,t){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new RO(e,t)}get experimental(){return this._experimental||(this._experimental={tasks:new _O(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Bm(_L)),this.server.assertCanSetRequestHandler(Bm(wT)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(_L,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:(()=>{let a=gT(t.inputSchema);return a?GG(a,{strictUnions:!0,pipeStrategy:"input"}):rct})(),annotations:t.annotations,execution:t.execution,_meta:t._meta};if(t.outputSchema){let a=gT(t.outputSchema);a&&(r.outputSchema=GG(a,{strictUnions:!0,pipeStrategy:"output"}))}return r})})),this.server.setRequestHandler(wT,async(e,t)=>{var r;try{let a=this._registeredTools[e.params.name];if(!a)throw new _e(je.InvalidParams,`Tool ${e.params.name} not found`);if(!a.enabled)throw new _e(je.InvalidParams,`Tool ${e.params.name} disabled`);let i=!!e.params.task,s=(r=a.execution)==null?void 0:r.taskSupport,o="createTask"in a.handler;if((s==="required"||s==="optional")&&!o)throw new _e(je.InternalError,`Tool ${e.params.name} has taskSupport '${s}' but was not registered with registerToolTask`);if(s==="required"&&!i)throw new _e(je.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if(s==="optional"&&!i&&o)return await this.handleAutomaticTaskPolling(a,e,t);let l=await this.validateToolInput(a,e.params.arguments,e.params.name),c=await this.executeToolHandler(a,l,t);return i||await this.validateToolOutput(a,c,e.params.name),c}catch(a){if(a instanceof _e&&a.code===je.UrlElicitationRequired)throw a;return this.createToolError(a instanceof Error?a.message:String(a))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(!e.inputSchema)return;let a=gT(e.inputSchema),i=a!=null?a:e.inputSchema,s=await dL(i,t);if(!s.success){let o="error"in s?s.error:"Unknown error",l=uL(o);throw new _e(je.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${l}`)}return s.data}async validateToolOutput(e,t,r){if(!e.outputSchema||!("content"in t)||t.isError)return;if(!t.structuredContent)throw new _e(je.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let a=gT(e.outputSchema),i=await dL(a,t.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",o=uL(s);throw new _e(je.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${o}`)}}async executeToolHandler(e,t,r){let a=e.handler;if("createTask"in a){if(!r.taskStore)throw new Error("No task store provided.");let s={...r,taskStore:r.taskStore};if(e.inputSchema){let o=a;return await Promise.resolve(o.createTask(t,s))}else{let o=a;return await Promise.resolve(o.createTask(s))}}if(e.inputSchema){let s=a;return await Promise.resolve(s(t,r))}else{let s=a;return await Promise.resolve(s(r))}}async handleAutomaticTaskPolling(e,t,r){var u;if(!r.taskStore)throw new Error("No task store provided for task-capable tool.");let a=await this.validateToolInput(e,t.params.arguments,t.params.name),i=e.handler,s={...r,taskStore:r.taskStore},o=a?await Promise.resolve(i.createTask(a,s)):await Promise.resolve(i.createTask(s)),l=o.task.taskId,c=o.task,d=(u=c.pollInterval)!=null?u:5e3;for(;c.status!=="completed"&&c.status!=="failed"&&c.status!=="cancelled";){await new Promise(m=>setTimeout(m,d));let p=await r.taskStore.getTask(l);if(!p)throw new _e(je.InternalError,`Task ${l} not found during polling`);c=p}return await r.taskStore.getTaskResult(l)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Bm(OL)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(OL,async e=>{switch(e.params.ref.type){case"ref/prompt":return L0e(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return O0e(e),this.handleResourceCompletion(e,e.params.ref);default:throw new _e(je.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new _e(je.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new _e(je.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return gP;let a=Em(r.argsSchema),i=a==null?void 0:a[e.params.argument.name];if(!ZY(i))return gP;let s=MNe(i);if(!s)return gP;let o=await s(e.params.argument.value,e.params.context);return LNe(o)}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return gP;throw new _e(je.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let a=r.resourceTemplate.completeCallback(e.params.argument.name);if(!a)return gP;let i=await a(e.params.argument.value,e.params.context);return LNe(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Bm(AL)),this.server.assertCanSetRequestHandler(Bm(ML)),this.server.assertCanSetRequestHandler(Bm(IL)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(AL,async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),a=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(t);for(let o of s.resources)a.push({...i.metadata,...o})}return{resources:[...r,...a]}}),this.server.setRequestHandler(ML,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([t,r])=>({name:t,uriTemplate:r.resourceTemplate.uriTemplate.toString(),...r.metadata}))})),this.server.setRequestHandler(IL,async(e,t)=>{let r=new URL(e.params.uri),a=this._registeredResources[r.toString()];if(a){if(!a.enabled)throw new _e(je.InvalidParams,`Resource ${r} disabled`);return a.readCallback(r,t)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(r.toString());if(s)return i.readCallback(r,s,t)}throw new _e(je.InvalidParams,`Resource ${r} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Bm(NL)),this.server.assertCanSetRequestHandler(Bm(RL)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(NL,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?act(t.argsSchema):void 0}))})),this.server.setRequestHandler(RL,async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new _e(je.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new _e(je.InvalidParams,`Prompt ${e.params.name} disabled`);if(r.argsSchema){let a=gT(r.argsSchema),i=await dL(a,e.params.arguments);if(!i.success){let l="error"in i?i.error:"Unknown error",c=uL(l);throw new _e(je.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${c}`)}let s=i.data,o=r.callback;return await Promise.resolve(o(s,t))}else{let a=r.callback;return await Promise.resolve(a(t))}}),this._promptHandlersInitialized=!0)}resource(e,t,...r){let a;typeof r[0]=="object"&&(a=r.shift());let i=r[0];if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,void 0,t,a,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,void 0,t,a,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(e,t,r,a){if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let i=this._createRegisteredResource(e,r.title,t,r,a);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let i=this._createRegisteredResourceTemplate(e,r.title,t,r,a);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(e,t,r,a,i){let s={name:e,title:t,metadata:a,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:o=>{typeof o.uri!="undefined"&&o.uri!==r&&(delete this._registeredResources[r],o.uri&&(this._registeredResources[o.uri]=s)),typeof o.name!="undefined"&&(s.name=o.name),typeof o.title!="undefined"&&(s.title=o.title),typeof o.metadata!="undefined"&&(s.metadata=o.metadata),typeof o.callback!="undefined"&&(s.readCallback=o.callback),typeof o.enabled!="undefined"&&(s.enabled=o.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=s,s}_createRegisteredResourceTemplate(e,t,r,a,i){let s={resourceTemplate:r,title:t,metadata:a,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:c=>{typeof c.name!="undefined"&&c.name!==e&&(delete this._registeredResourceTemplates[e],c.name&&(this._registeredResourceTemplates[c.name]=s)),typeof c.title!="undefined"&&(s.title=c.title),typeof c.template!="undefined"&&(s.resourceTemplate=c.template),typeof c.metadata!="undefined"&&(s.metadata=c.metadata),typeof c.callback!="undefined"&&(s.readCallback=c.callback),typeof c.enabled!="undefined"&&(s.enabled=c.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=s;let o=r.uriTemplate.variableNames;return Array.isArray(o)&&o.some(c=>!!r.completeCallback(c))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,t,r,a,i){let s={title:t,description:r,argsSchema:a===void 0?void 0:hg(a),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:o=>{typeof o.name!="undefined"&&o.name!==e&&(delete this._registeredPrompts[e],o.name&&(this._registeredPrompts[o.name]=s)),typeof o.title!="undefined"&&(s.title=o.title),typeof o.description!="undefined"&&(s.description=o.description),typeof o.argsSchema!="undefined"&&(s.argsSchema=hg(o.argsSchema)),typeof o.callback!="undefined"&&(s.callback=o.callback),typeof o.enabled!="undefined"&&(s.enabled=o.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[e]=s,a&&Object.values(a).some(l=>{var d;let c=l instanceof Qi?(d=l._def)==null?void 0:d.innerType:l;return ZY(c)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,t,r,a,i,s,o,l,c){QY(e);let d={title:t,description:r,inputSchema:FNe(a),outputSchema:FNe(i),annotations:s,execution:o,_meta:l,handler:c,enabled:!0,disable:()=>d.update({enabled:!1}),enable:()=>d.update({enabled:!0}),remove:()=>d.update({name:null}),update:u=>{typeof u.name!="undefined"&&u.name!==e&&(typeof u.name=="string"&&QY(u.name),delete this._registeredTools[e],u.name&&(this._registeredTools[u.name]=d)),typeof u.title!="undefined"&&(d.title=u.title),typeof u.description!="undefined"&&(d.description=u.description),typeof u.paramsSchema!="undefined"&&(d.inputSchema=hg(u.paramsSchema)),typeof u.outputSchema!="undefined"&&(d.outputSchema=hg(u.outputSchema)),typeof u.callback!="undefined"&&(d.handler=u.callback),typeof u.annotations!="undefined"&&(d.annotations=u.annotations),typeof u._meta!="undefined"&&(d._meta=u._meta),typeof u.enabled!="undefined"&&(d.enabled=u.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=d,this.setToolRequestHandlers(),this.sendToolListChanged(),d}tool(e,...t){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let r,a,i,s;if(typeof t[0]=="string"&&(r=t.shift()),t.length>1){let l=t[0];JY(l)?(a=t.shift(),t.length>1&&typeof t[0]=="object"&&t[0]!==null&&!JY(t[0])&&(s=t.shift())):typeof l=="object"&&l!==null&&(s=t.shift())}let o=t[0];return this._createRegisteredTool(e,void 0,r,a,i,s,{taskSupport:"forbidden"},void 0,o)}registerTool(e,t,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:a,description:i,inputSchema:s,outputSchema:o,annotations:l,_meta:c}=t;return this._createRegisteredTool(e,a,i,s,o,l,{taskSupport:"forbidden"},c,r)}prompt(e,...t){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let r;typeof t[0]=="string"&&(r=t.shift());let a;t.length>1&&(a=t.shift());let i=t[0],s=this._createRegisteredPrompt(e,void 0,r,a,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:a,description:i,argsSchema:s}=t,o=this._createRegisteredPrompt(e,a,i,s,r);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),o}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},rct={type:"object",properties:{}};gP={completion:{values:[],hasMore:!1}}});var BNe,jNe=y(()=>{BNe="x-hono-already-sent"});var $Ne,UNe=y(()=>{$Ne=n=>((...e)=>{if(typeof e[0]=="function"){let[t,r]=e;return async function(i,s){let o=await t(i),l=await n(i,o,r);if(l)return l;await s()}}else{let[t,r,a]=e;return(async()=>{let i=await n(t,r,a);if(!i)throw new Error("Failed to upgrade WebSocket");return i})()}})});async function Dct(n){return Promise.race([n,Promise.resolve().then(()=>Promise.resolve(void 0))])}function aRe(n,e,t){let r=o=>{n.cancel(o).catch(()=>{})};return e.on("close",r),e.on("error",r),(t!=null?t:n.read()).then(s,a),n.closed.finally(()=>{e.off("close",r),e.off("error",r)});function a(o){o&&e.destroy(o)}function i(){n.read().then(s,a)}function s({done:o,value:l}){try{if(o)e.end();else if(!e.write(l))e.once("drain",i);else return n.read().then(s,a)}catch(c){a(c)}}}function GNe(n,e){if(n.locked)throw new TypeError("ReadableStream is locked.");return e.destroyed?void 0:aRe(n.getReader(),e)}var XNe,Nu,e8,rd,ict,sct,oct,lct,cct,dct,HT,eRe,tRe,uct,pct,XY,kP,rRe,i8,HNe,OO,VNe,mct,Um,Au,VT,TP,nRe,$T,Pg,t8,r8,$m,LO,Ru,WNe,yP,zO,wP,fct,hct,gct,yct,vct,kct,Tct,s8,bct,qNe,wct,ad,Sct,jm,vP,jT,Iu,BO,bP,td,UT,nd,Cct,xct,Ect,n8,jO,YNe,Pct,Act,iRe,Mct,Ict,Nct,sRe,$O,a8,oRe,lRe,Rct,o8,Ag,KNe,ZNe,_ct,Mu,QNe,JNe,Fct,Lct,Oct,zct,Whr,cRe=y(()=>{jNe();XNe=require("node:http"),Nu=require("node:http2"),e8=require("node:stream");UNe();rd=class extends Error{constructor(n,e){super(n,e),this.name="RequestError"}},ict=/^\/[!#$&-;=?-\[\]_a-z~]*$/,sct=/\/\.\.?(?:[/?#]|$)/,oct=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,lct=(n,e,t)=>{let r=`${n}://${e}${t}`;if(oct.test(e)){if(t.length===0)return r+"/";if(t.charCodeAt(0)!==47)throw new rd("Invalid URL");return!ict.test(t)||sct.test(t)?new URL(r).href:r}else{let a=new URL(r);if(a.hostname.length!==e.length&&a.hostname!==(e.includes(":")?e.replace(/:\d+$/,""):e).toLowerCase())throw new rd("Invalid host header");return a.href}},cct=n=>n instanceof rd?n:new rd(n.message,{cause:n}),dct=global.Request,HT=class extends dct{constructor(n,e){var t,r;if(typeof n=="object"&&Um in n){let a=e!==void 0&&"body"in e&&e.body!=null;if(n[Ru]&&!a)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");n=n[Um]()}typeof((t=e==null?void 0:e.body)==null?void 0:t.getReader)!="undefined"&&((r=e.duplex)!=null||(e.duplex="half")),super(n,e)}},eRe=n=>{let e=[],t=n.rawHeaders;for(let r=0,a=t.length;r<a;r+=2){let i=t[r];i.charCodeAt(0)!==58&&e.push([i,t[r+1]])}return new Headers(e)},tRe=Symbol("wrapBodyStream"),uct=new Set(["latin1","binary","hex","base64","base64url"]),pct=n=>n===null||uct.has(n),XY=Symbol("bodyBufferedBeforeDisconnect"),kP=Symbol("bodyBufferedLengthBeforeDisconnect"),rRe=(n,e)=>Buffer.isBuffer(n)?n:Buffer.from(n,e!=null?e:"utf8"),i8=n=>!(n instanceof Nu.Http2ServerRequest)&&!!n.complete&&!!n.readableAborted&&typeof n.read=="function"&&pct(n.readableEncoding),HNe=n=>{var t;if(n.readableDidRead||!i8(n))return;let e=n;(t=e[kP])!=null||(e[kP]=n.readableLength)},OO=(n,e)=>{if(n.readableDidRead&&!e||!i8(n))return;let t=n;if(t[XY]!==void 0)return t[XY];let r,a=n.errored;if(a&&a.code!=="ECONNRESET")r=a;else if(t[kP]!==void 0&&n.readableLength!==t[kP])r=zO();else{let i=e!=null?e:[],s=n.read();s!==null&&i.push(rRe(s,n.readableEncoding));let o=i.length===1?i[0]:Buffer.concat(i);r=o;let l=n.headers["content-length"];if(typeof l=="string"&&/^\d+$/.test(l)){let c=Number(l);Number.isSafeInteger(c)&&o.length!==c&&(r=zO())}}return t[XY]=r,r},VNe=(n,e)=>{if(e instanceof Error){n.error(e);return}e.length>0&&n.enqueue(e),n.close()},mct=(n,e,t,r,a)=>{let i={method:n,headers:t,signal:a.signal};if(n==="TRACE"){i.method="GET";let s=new HT(e,i);return Object.defineProperty(s,"method",{get(){return"TRACE"}}),s}if(!(n==="GET"||n==="HEAD"))if("rawBody"in r&&r.rawBody instanceof Buffer)i.body=new ReadableStream({start(s){s.enqueue(r.rawBody),s.close()}});else if(r[tRe]){let s;i.body=new ReadableStream({async pull(o){try{if(!s){let d=OO(r);if(d!==void 0){VNe(o,d);return}}s||(s=e8.Readable.toWeb(r).getReader());let{done:l,value:c}=await s.read();l?o.close():o.enqueue(c)}catch(l){o.error(l)}}})}else{let s=OO(r);s!==void 0?i.body=new ReadableStream({start(o){VNe(o,s)}}):i.body=e8.Readable.toWeb(r)}return new HT(e,i)},Um=Symbol("getRequestCache"),Au=Symbol("requestCache"),VT=Symbol("incomingKey"),TP=Symbol("urlKey"),nRe=Symbol("methodKey"),$T=Symbol("headersKey"),Pg=Symbol("abortControllerKey"),t8=Symbol("getAbortController"),r8=Symbol("abortRequest"),$m=Symbol("bodyBuffer"),LO=Symbol("bodyReadPromise"),Ru=Symbol("bodyConsumedDirectly"),WNe=Symbol("bodyLockReader"),yP=Symbol("abortReason"),zO=()=>new TypeError("Body is unusable"),wP=()=>Promise.reject(zO()),fct=new TextDecoder,hct=n=>{if(n[Ru])return wP();n[Ru]=!0},gct=n=>n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),yct=n=>(n[$T]||(n[$T]=eRe(n[VT]))).get("content-type")||"",vct=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,kct=n=>{if(typeof n!="string"||n.length===0)return"GET";switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"PATCH":case"POST":case"PUT":case"QUERY":return n}let e=n.toUpperCase();switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return e;default:return n}},Tct=n=>{if(!vct.test(n))return new TypeError(`'${n}' is not a valid HTTP method.`);let e=n.toUpperCase();if(e==="CONNECT"||e==="TRACK"||e==="TRACE"&&n!=="TRACE")return new TypeError(`'${n}' HTTP method is unsupported.`)},s8=(n,e,t)=>{if(n[Ru])return wP();let r=n.method;if(r==="GET"||r==="HEAD")return n[Um]()[e]();let a=Tct(r);if(a)return Promise.reject(a);if(n[Au]&&r!=="TRACE")return n[Au][e]();let i=hct(n);if(i)return i;let s=bct(n);if(s){let o=Promise.resolve(t(s,n));return n[$m]=void 0,o}return wct(n).then(o=>{let l=t(o,n);return n[$m]=void 0,l})},bct=n=>{let e=n[VT];if("rawBody"in e&&e.rawBody instanceof Buffer)return e.rawBody},qNe=(n,e)=>{if(e.errored)return e.errored;let t=n[yP];return t!==void 0?t instanceof Error?t:new Error(String(t)):new Error("Client connection prematurely closed.")},wct=n=>{if(n[$m])return Promise.resolve(n[$m]);if(n[LO])return n[LO];let e=n[VT];if(e.readableDidRead)return wP();let t=OO(e);if(t!==void 0)return t instanceof Error?Promise.reject(t):(n[$m]=t,Promise.resolve(t));let r=new Promise((a,i)=>{let s=[],o=!1,l=h=>{o||(o=!0,f(),h())},c=h=>{var v;let g=(v=e.errored)!=null?v:h;return!i8(e)||g&&g.code!=="ECONNRESET"?!1:(l(()=>{let k=OO(e,s);k instanceof Error?i(k):k===void 0?i(h!=null?h:qNe(n,e)):(n[$m]=k,a(k))}),!0)},d=h=>{s.push(rRe(h,e.readableEncoding))},u=()=>{l(()=>{let h=s.length===1?s[0]:Buffer.concat(s);n[$m]=h,a(h)})},p=h=>{c(h)||l(()=>{i(h)})},m=()=>{if(e.readableEnded){u();return}c()||l(()=>{i(qNe(n,e))})},f=()=>{e.off("data",d),e.off("end",u),e.off("error",p),e.off("close",m),n[LO]=void 0};e.on("data",d),e.on("end",u),e.on("error",p),e.on("close",m),queueMicrotask(()=>{o||(e.readableEnded?u():e.errored?p(e.errored):e.destroyed&&m())})});return n[LO]=r,r},ad={get method(){return this[nRe]},get url(){return this[TP]},get headers(){return this[$T]||(this[$T]=eRe(this[VT]))},[r8](n){this[yP]===void 0&&(this[yP]=n);let e=this[Pg];e&&!e.signal.aborted&&e.abort(n)},[t8](){return this[Pg]||(this[Pg]=new AbortController),this[yP]!==void 0&&!this[Pg].signal.aborted&&this[Pg].abort(this[yP]),this[Pg]},[Um](){let n=this[t8]();if(this[Au])return this[Au];let e=this.method;if(this[Ru]&&!(e==="GET"||e==="HEAD")){this[$m]=void 0;let t={method:e==="TRACE"?"GET":e,headers:this.headers,signal:n.signal};e!=="TRACE"&&(t.body=new ReadableStream({start(a){a.close()}}),t.duplex="half");let r=new HT(this[TP],t);return e==="TRACE"&&Object.defineProperty(r,"method",{get(){return"TRACE"}}),this[Au]=r}return this[Au]=mct(this.method,this[TP],this.headers,this[VT],n)},get body(){if(!this[Ru])return this[Um]().body;let n=this[Um]();return!this[WNe]&&n.body&&(this[WNe]=n.body.getReader()),n.body},get bodyUsed(){return this[Ru]?!0:this[Au]?this[Au].bodyUsed:!1}};Object.defineProperty(ad,"signal",{get(){return this[t8]().signal}});["cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","keepalive"].forEach(n=>{Object.defineProperty(ad,n,{get(){return this[Um]()[n]}})});["clone","formData"].forEach(n=>{Object.defineProperty(ad,n,{value:function(){if(this[Ru]){if(n==="clone")throw zO();return wP()}return this[Um]()[n]()}})});Object.defineProperty(ad,"text",{value:function(){return s8(this,"text",n=>fct.decode(n))}});Object.defineProperty(ad,"arrayBuffer",{value:function(){return s8(this,"arrayBuffer",n=>gct(n))}});Object.defineProperty(ad,"blob",{value:function(){return s8(this,"blob",(n,e)=>{let t=yct(e),r=t?{headers:{"content-type":t}}:void 0;return new Response(n,r).blob()})}});Object.defineProperty(ad,"json",{value:function(){return this[Ru]?wP():this.text().then(JSON.parse)}});Object.defineProperty(ad,Symbol.for("nodejs.util.inspect.custom"),{value:function(n,e,t){return`Request (lightweight) ${t({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[Au]},{...e,depth:n==null?null:n-1})}`}});Object.setPrototypeOf(ad,HT.prototype);Sct=(n,e)=>{let t=Object.create(ad);t[VT]=n,t[nRe]=kct(n.method);let r=n.url||"";if(r[0]!=="/"&&(r.startsWith("http://")||r.startsWith("https://"))){if(n instanceof Nu.Http2ServerRequest)throw new rd("Absolute URL for :path is not allowed in HTTP/2");try{t[TP]=new URL(r).href}catch(s){throw new rd("Invalid absolute URL",{cause:s})}return t}let a=(n instanceof Nu.Http2ServerRequest?n.authority:n.headers.host)||e;if(!a)throw new rd("Missing host header");let i;if(n instanceof Nu.Http2ServerRequest){if(i=n.scheme,!(i==="http"||i==="https"))throw new rd("Unsupported scheme")}else i=n.socket&&n.socket.encrypted?"https":"http";try{t[TP]=lct(i,a,r)}catch(s){throw s instanceof rd?s:new rd("Invalid URL",{cause:s})}return t},jm="text/plain; charset=UTF-8",vP=Symbol("responseCache"),jT=Symbol("getResponseCache"),Iu=Symbol("cache"),BO=global.Response,nd=(UT=class{constructor(e,t){Al(this,bP);Al(this,td);let r;if(Us(this,bP,e),t instanceof BO){let a=t[vP];if(a){Us(this,td,a),this[jT]();return}Us(this,td,t instanceof UT?un(t,td):t),r=new Headers(t.headers)}else Us(this,td,t);(e==null||typeof e=="string"||typeof(e==null?void 0:e.getReader)!="undefined"||e instanceof Blob||e instanceof Uint8Array)&&(this[Iu]=[(t==null?void 0:t.status)||200,e!=null?e:null,r||(t==null?void 0:t.headers)])}[jT](){var r,a;let e=this[Iu],t=e&&e[2]instanceof Headers?e[2]:void 0;return delete this[Iu],this[vP]||(this[vP]=new BO(un(this,bP),t?{status:(r=un(this,td))==null?void 0:r.status,statusText:(a=un(this,td))==null?void 0:a.statusText,headers:t}:un(this,td)))}get headers(){let e=this[Iu];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||(e[1]===null?void 0:{"content-type":jm}))),e[2]):this[jT]().headers}get status(){var e,t;return(t=(e=this[Iu])==null?void 0:e[0])!=null?t:this[jT]().status}get ok(){let e=this.status;return e>=200&&e<300}},bP=new WeakMap,td=new WeakMap,UT);["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(n=>{Object.defineProperty(nd.prototype,n,{get(){return this[jT]()[n]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(n=>{Object.defineProperty(nd.prototype,n,{value:function(){return this[jT]()[n]()}})});Object.defineProperty(nd.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(n,e,t){return`Response (lightweight) ${t({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[vP]},{...e,depth:n==null?null:n-1})}`}});Object.setPrototypeOf(nd,BO);Object.setPrototypeOf(nd.prototype,BO.prototype);Cct=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,xct=n=>n instanceof URL?n.href:Cct.test(n)?n:new URL(n).href,Ect=new Set([301,302,303,307,308]);Object.defineProperty(nd,"redirect",{value:function(e,t=302){if(!Ect.has(t))throw new RangeError("Invalid status code");return new nd(null,{status:t,headers:{location:xct(e)}})},writable:!0,configurable:!0});Object.defineProperty(nd,"json",{value:function(e,t){var s;let r=JSON.stringify(e);if(r===void 0)throw new TypeError("The data is not JSON serializable");let a=t==null?void 0:t.headers,i;return a?(i=new Headers(a),i.has("content-type")||i.set("content-type","application/json")):i={"content-type":"application/json"},new nd(r,{status:(s=t==null?void 0:t.status)!=null?s:200,statusText:t==null?void 0:t.statusText,headers:i})},writable:!0,configurable:!0});n8=(n,e)=>{var r;let t={};if(n instanceof Headers||(n=new Headers(n!=null?n:void 0)),n.has("set-cookie")){let a=[];for(let[i,s]of n)i==="set-cookie"?a.push(s):t[i]=s;a.length>0&&(t["set-cookie"]=a)}else for(let[a,i]of n)t[a]=i;return e&&((r=t["content-type"])!=null||(t["content-type"]=e)),t},jO=Symbol("outgoingEnded"),YNe=Symbol("incomingDraining"),Pct=500,Act=64*1024*1024,iRe=n=>{var o,l,c;let e=n;if(n.destroyed||e[YNe])return;if(e[YNe]=!0,n instanceof Nu.Http2ServerRequest){try{(l=(o=n.stream)==null?void 0:o.close)==null||l.call(o,Nu.constants.NGHTTP2_NO_ERROR)}catch(d){}return}let t=0,r=()=>{clearTimeout(i),n.off("data",s),n.off("end",r),n.off("error",r)},a=()=>{r();let d=n.socket;d&&!d.destroyed&&(typeof d.destroySoon=="function"?d.destroySoon():typeof d.destroy=="function"&&d.destroy())},i=setTimeout(a,Pct);(c=i.unref)==null||c.call(i);let s=d=>{t+=d.length,t>Act&&a()};n.on("data",s),n.on("end",r),n.on("error",r),n.resume()},Mct=(n,e,t,r)=>()=>{e.errored?(HNe(e),n[r8](e.errored.toString())):t.writableFinished||(HNe(e),n[r8]("Client connection prematurely closed.")),r&&!e.readableEnded&&setTimeout(()=>{e.readableEnded||setTimeout(()=>{iRe(e)})})},Ict=n=>{if(!(Iu in n))return!1;let e=n[Iu][1];return e===null||typeof e=="string"||e instanceof Uint8Array},Nct=()=>new Response(null,{status:400}),sRe=n=>new Response(null,{status:n instanceof Error&&(n.name==="TimeoutError"||n.constructor.name==="TimeoutError")?504:500}),$O=(n,e)=>{let t=n instanceof Error?n:new Error("unknown error",{cause:n});t.code==="ERR_STREAM_PREMATURE_CLOSE"?console.info("The user aborted a request."):(console.error(n),e.headersSent||e.writeHead(500,{"Content-Type":"text/plain"}),e.end(`Error: ${t.message}`),e.destroy(t))},a8=n=>{"flushHeaders"in n&&n.writable&&n.flushHeaders()},oRe=async(n,e)=>{var s,o,l,c;let[t,r,a]=n[Iu];if(!a){r===null?(e.writeHead(t),e.end()):typeof r=="string"?(e.writeHead(t,{"Content-Type":jm,"Content-Length":Buffer.byteLength(r)}),e.end(r)):r instanceof Uint8Array?(e.writeHead(t,{"Content-Type":jm,"Content-Length":r.byteLength}),e.end(r)):r instanceof Blob?(e.writeHead(t,{"Content-Type":jm,"Content-Length":r.size}),e.end(new Uint8Array(await r.arrayBuffer()))):(e.writeHead(t,{"Content-Type":jm}),a8(e),await((s=GNe(r,e))==null?void 0:s.catch(d=>$O(d,e)))),(o=e[jO])==null||o.call(e);return}let i=!1;if(a instanceof Headers)i=a.has("content-length"),a=n8(a,r===null?void 0:jm);else if(Array.isArray(a)){let d=new Headers(a);i=d.has("content-length"),a=n8(d,r===null?void 0:jm)}else for(let d in a)if(d.length===14&&d.toLowerCase()==="content-length"){i=!0;break}i||(typeof r=="string"?a["Content-Length"]=Buffer.byteLength(r):r instanceof Uint8Array?a["Content-Length"]=r.byteLength:r instanceof Blob&&(a["Content-Length"]=r.size)),e.writeHead(t,a),r==null?e.end():typeof r=="string"||r instanceof Uint8Array?e.end(r):r instanceof Blob?e.end(new Uint8Array(await r.arrayBuffer())):(a8(e),await((l=GNe(r,e))==null?void 0:l.catch(d=>$O(d,e)))),(c=e[jO])==null||c.call(e)},lRe=n=>typeof n.then=="function",Rct=async(n,e,t={})=>{var a;if(lRe(n))if(t.errorHandler)try{n=await n}catch(i){let s=await t.errorHandler(i);if(!s)return;n=s}else n=await n.catch(sRe);if(Iu in n)return oRe(n,e);let r=n8(n.headers,n.body===null?void 0:jm);if(n.body){let i=n.body.getReader(),s=[],o=!1,l;if(r["transfer-encoding"]!=="chunked"){let c=2;for(let d=0;d<c;d++){l||(l=i.read());let u=await Dct(l).catch(p=>{console.error(p),o=!0});if(!u){if(d===1){await new Promise(p=>setTimeout(p)),c=3;continue}break}if(l=void 0,u.value&&s.push(u.value),u.done){o=!0;break}}o&&!("content-length"in r)&&(r["content-length"]=s.reduce((d,u)=>d+u.length,0))}e.writeHead(n.status,r),s.forEach(c=>{e.write(c)}),o?e.end():(s.length===0&&a8(e),await aRe(i,e,l))}else r[BNe]||(e.writeHead(n.status,r),e.end());(a=e[jO])==null||a.call(e)},o8=(n,e={})=>{var r;let t=(r=e.autoCleanupIncoming)!=null?r:!0;return e.overrideGlobalObjects!==!1&&global.Request!==HT&&(Object.defineProperty(global,"Request",{value:HT}),Object.defineProperty(global,"Response",{value:nd})),async(a,i)=>{let s,o,l=!1,c=!1,d=()=>{!o||c||(c=!0,i.on("close",Mct(o,a,i,l)))};try{if(o=Sct(a,e.hostname),l=t&&!(a.method==="GET"||a.method==="HEAD"),l&&(a[tRe]=!0,a instanceof Nu.Http2ServerRequest&&(i[jO]=()=>{a.readableEnded||setTimeout(()=>{a.readableEnded||setTimeout(()=>{a.destroy(),i.destroy()})})})),s=n(o,{incoming:a,outgoing:i}),!lRe(s)&&Ict(s))return l&&!a.readableEnded&&i.once("finish",()=>{a.readableEnded||iRe(a)}),oRe(s,i);d()}catch(u){if(s)return $O(u,i);if(e.errorHandler){if(d(),s=await e.errorHandler(o?u:cct(u)),!s)return}else o?s=sRe(u):s=Nct()}try{return await Rct(s,i,e)}catch(u){return $O(u,i)}}},_ct=(ZNe=globalThis.CloseEvent)!=null?ZNe:(KNe=class extends Event{constructor(e,t={}){super(e,t);Al(this,Ag);Us(this,Ag,t)}get wasClean(){var e;return(e=un(this,Ag).wasClean)!=null?e:!1}get code(){var e;return(e=un(this,Ag).code)!=null?e:0}get reason(){var e;return(e=un(this,Ag).reason)!=null?e:""}},Ag=new WeakMap,KNe),Fct=(JNe=globalThis.ErrorEvent)!=null?JNe:(QNe=class extends Event{constructor(e,t={}){super(e,t);Al(this,Mu);Us(this,Mu,t)}get message(){var e;return(e=un(this,Mu).message)!=null?e:""}get filename(){var e;return(e=un(this,Mu).filename)!=null?e:""}get lineno(){var e;return(e=un(this,Mu).lineno)!=null?e:0}get colno(){var e;return(e=un(this,Mu).colno)!=null?e:0}get error(){var e;return(e=un(this,Mu).error)!=null?e:null}},Mu=new WeakMap,QNe),Lct=()=>Symbol("connection"),Oct=Symbol("CONNECTION_SYMBOL_KEY"),zct=Symbol("WAIT_FOR_WEBSOCKET_SYMBOL"),Whr=$Ne(async(n,e,t)=>{var s;if(((s=n.req.header("upgrade"))==null?void 0:s.toLowerCase())!=="websocket")return;let r=n.env,a=r[zct];if(!a||!r.incoming)return new Response(null,{status:500});let i=Lct();return r[Oct]=i,(async()=>{var p,m;let o;try{o=await a(r.incoming,i)}catch(f){return}let l=[],c=(f,h)=>{l.push([f,h])};o.on("message",c);let d={binaryType:"arraybuffer",close(f,h){o.close(f,h)},protocol:o.protocol,raw:o,get readyState(){return o.readyState},send(f,h){o.send(f,{compress:h==null?void 0:h.compress})},url:new URL(n.req.url)};try{(p=e==null?void 0:e.onOpen)==null||p.call(e,new Event("open"),d)}catch(f){((m=t==null?void 0:t.onError)!=null?m:console.error)(f)}let u=(f,h)=>{var v,k;let g=Array.isArray(f)?f:[f];for(let T of g)try{(v=e==null?void 0:e.onMessage)==null||v.call(e,new MessageEvent("message",{data:h?T instanceof ArrayBuffer?T:T.buffer.slice(T.byteOffset,T.byteOffset+T.byteLength):typeof T=="string"?T:Buffer.from(T).toString("utf-8")}),d)}catch(b){((k=t==null?void 0:t.onError)!=null?k:console.error)(b)}};o.off("message",c);for(let f of l)u(...f);o.on("message",(f,h)=>{u(f,h)}),o.on("close",(f,h)=>{var g,v;try{(g=e==null?void 0:e.onClose)==null||g.call(e,new _ct("close",{code:f,reason:h.toString()}),d)}catch(k){((v=t==null?void 0:t.onError)!=null?v:console.error)(k)}}),o.on("error",f=>{var h,g;try{(h=e==null?void 0:e.onError)==null||h.call(e,new Fct("error",{error:f}),d)}catch(v){((g=t==null?void 0:t.onError)!=null?g:console.error)(v)}})})(),new Response})});var UO,dRe=y(()=>{zD();UO=class{constructor(e={}){var t,r;this._started=!1,this._hasHandledRequest=!1,this._streamMapping=new Map,this._requestToStreamMapping=new Map,this._requestResponseMap=new Map,this._initialized=!1,this._enableJsonResponse=!1,this._standaloneSseStreamId="_GET_stream",this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=(t=e.enableJsonResponse)!=null?t:!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=(r=e.enableDnsRebindingProtection)!=null?r:!1,this._retryInterval=e.retryInterval}async start(){if(this._started)throw new Error("Transport already started");this._started=!0}createJsonErrorResponse(e,t,r,a){let i={code:t,message:r};return(a==null?void 0:a.data)!==void 0&&(i.data=a.data),new Response(JSON.stringify({jsonrpc:"2.0",error:i,id:null}),{status:e,headers:{"Content-Type":"application/json",...a==null?void 0:a.headers}})}validateRequestHeaders(e){var t,r;if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let a=e.headers.get("host");if(!a||!this._allowedHosts.includes(a)){let i=`Invalid Host header: ${a}`;return(t=this.onerror)==null||t.call(this,new Error(i)),this.createJsonErrorResponse(403,-32e3,i)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let a=e.headers.get("origin");if(a&&!this._allowedOrigins.includes(a)){let i=`Invalid Origin header: ${a}`;return(r=this.onerror)==null||r.call(this,new Error(i)),this.createJsonErrorResponse(403,-32e3,i)}}}}async handleRequest(e,t){if(!this.sessionIdGenerator&&this._hasHandledRequest)throw new Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}async writePrimingEvent(e,t,r,a){if(!this._eventStore||a<"2025-11-25")return;let i=await this._eventStore.storeEvent(r,{}),s=`id: ${i}
data:
`;this._retryInterval!==void 0&&(s=`id: ${i}
retry: ${this._retryInterval}
data:
`),e.enqueue(t.encode(s))}async handleGetRequest(e){let t=e.headers.get("accept");if(!(t!=null&&t.includes("text/event-stream")))return this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept text/event-stream");let r=this.validateSession(e);if(r)return r;let a=this.validateProtocolVersion(e);if(a)return a;if(this._eventStore){let c=e.headers.get("last-event-id");if(c)return this.replayEvents(c)}if(this._streamMapping.get(this._standaloneSseStreamId)!==void 0)return this.createJsonErrorResponse(409,-32e3,"Conflict: Only one SSE stream is allowed per session");let i=new TextEncoder,s,o=new ReadableStream({start:c=>{s=c},cancel:()=>{this._streamMapping.delete(this._standaloneSseStreamId)}}),l={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"};return this.sessionId!==void 0&&(l["mcp-session-id"]=this.sessionId),this._streamMapping.set(this._standaloneSseStreamId,{controller:s,encoder:i,cleanup:()=>{this._streamMapping.delete(this._standaloneSseStreamId);try{s.close()}catch(c){}}}),new Response(o,{headers:l})}async replayEvents(e){var t;if(!this._eventStore)return this.createJsonErrorResponse(400,-32e3,"Event store not configured");try{let r;if(this._eventStore.getStreamIdForEventId){if(r=await this._eventStore.getStreamIdForEventId(e),!r)return this.createJsonErrorResponse(400,-32e3,"Invalid event ID format");if(this._streamMapping.get(r)!==void 0)return this.createJsonErrorResponse(409,-32e3,"Conflict: Stream already has an active connection")}let a={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"};this.sessionId!==void 0&&(a["mcp-session-id"]=this.sessionId);let i=new TextEncoder,s,o=new ReadableStream({start:c=>{s=c},cancel:()=>{}}),l=await this._eventStore.replayEventsAfter(e,{send:async(c,d)=>{var p;if(!this.writeSSEEvent(s,i,d,c)){(p=this.onerror)==null||p.call(this,new Error("Failed replay events"));try{s.close()}catch(m){}}}});return this._streamMapping.set(l,{controller:s,encoder:i,cleanup:()=>{this._streamMapping.delete(l);try{s.close()}catch(c){}}}),new Response(o,{headers:a})}catch(r){return(t=this.onerror)==null||t.call(this,r),this.createJsonErrorResponse(500,-32e3,"Error replaying events")}}writeSSEEvent(e,t,r,a){try{let i=`event: message
`;return a&&(i+=`id: ${a}
`),i+=`data: ${JSON.stringify(r)}
`,e.enqueue(t.encode(i)),!0}catch(i){return!1}}handleUnsupportedRequest(){return new Response(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null}),{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){var r,a,i,s,o;try{let l=e.headers.get("accept");if(!(l!=null&&l.includes("application/json"))||!l.includes("text/event-stream"))return this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");let c=e.headers.get("content-type");if(!c||!c.includes("application/json"))return this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");let d={headers:Object.fromEntries(e.headers.entries())},u;if((t==null?void 0:t.parsedBody)!==void 0)u=t.parsedBody;else try{u=await e.json()}catch(S){return this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}let p;try{Array.isArray(u)?p=u.map(S=>tG.parse(S)):p=[tG.parse(u)]}catch(S){return this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}let m=p.some(rG);if(m){if(this._initialized&&this.sessionId!==void 0)return this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(p.length>1)return this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=(r=this.sessionIdGenerator)==null?void 0:r.call(this),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!m){let S=this.validateSession(e);if(S)return S;let C=this.validateProtocolVersion(e);if(C)return C}if(!p.some(Pm)){for(let S of p)(a=this.onmessage)==null||a.call(this,S,{authInfo:t==null?void 0:t.authInfo,requestInfo:d});return new Response(null,{status:202})}let h=crypto.randomUUID(),g=p.find(S=>rG(S)),v=g?g.params.protocolVersion:(i=e.headers.get("mcp-protocol-version"))!=null?i:w0e;if(this._enableJsonResponse)return new Promise(S=>{var C;this._streamMapping.set(h,{resolveJson:S,cleanup:()=>{this._streamMapping.delete(h)}});for(let x of p)Pm(x)&&this._requestToStreamMapping.set(x.id,h);for(let x of p)(C=this.onmessage)==null||C.call(this,x,{authInfo:t==null?void 0:t.authInfo,requestInfo:d})});let k=new TextEncoder,T,b=new ReadableStream({start:S=>{T=S},cancel:()=>{this._streamMapping.delete(h)}}),w={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"};this.sessionId!==void 0&&(w["mcp-session-id"]=this.sessionId);for(let S of p)Pm(S)&&(this._streamMapping.set(h,{controller:T,encoder:k,cleanup:()=>{this._streamMapping.delete(h);try{T.close()}catch(C){}}}),this._requestToStreamMapping.set(S.id,h));await this.writePrimingEvent(T,k,h,v);for(let S of p){let C,x;Pm(S)&&this._eventStore&&v>="2025-11-25"&&(C=()=>{this.closeSSEStream(S.id)},x=()=>{this.closeStandaloneSSEStream()}),(s=this.onmessage)==null||s.call(this,S,{authInfo:t==null?void 0:t.authInfo,requestInfo:d,closeSSEStream:C,closeStandaloneSSEStream:x})}return new Response(b,{status:200,headers:w})}catch(l){return(o=this.onerror)==null||o.call(this,l),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(l)})}}async handleDeleteRequest(e){var a;let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);return r||(await Promise.resolve((a=this._onsessionclosed)==null?void 0:a.call(this,this.sessionId)),await this.close(),new Response(null,{status:200}))}validateSession(e){if(this.sessionIdGenerator===void 0)return;if(!this._initialized)return this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let t=e.headers.get("mcp-session-id");if(!t)return this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required");if(t!==this.sessionId)return this.createJsonErrorResponse(404,-32001,"Session not found")}validateProtocolVersion(e){let t=e.headers.get("mcp-protocol-version");if(t!==null&&!AD.includes(t))return this.createJsonErrorResponse(400,-32e3,`Bad Request: Unsupported protocol version: ${t} (supported versions: ${AD.join(", ")})`)}async close(){var e;this._streamMapping.forEach(({cleanup:t})=>{t()}),this._streamMapping.clear(),this._requestResponseMap.clear(),(e=this.onclose)==null||e.call(this)}closeSSEStream(e){let t=this._requestToStreamMapping.get(e);if(!t)return;let r=this._streamMapping.get(t);r&&r.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,t){let r=t==null?void 0:t.relatedRequestId;if((Cu(e)||kT(e))&&(r=e.id),r===void 0){if(Cu(e)||kT(e))throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let s;this._eventStore&&(s=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let o=this._streamMapping.get(this._standaloneSseStreamId);if(o===void 0)return;o.controller&&o.encoder&&this.writeSSEEvent(o.controller,o.encoder,e,s);return}let a=this._requestToStreamMapping.get(r);if(!a)throw new Error(`No connection established for request ID: ${String(r)}`);let i=this._streamMapping.get(a);if(!this._enableJsonResponse&&(i!=null&&i.controller)&&(i!=null&&i.encoder)){let s;this._eventStore&&(s=await this._eventStore.storeEvent(a,e)),this.writeSSEEvent(i.controller,i.encoder,e,s)}if(Cu(e)||kT(e)){this._requestResponseMap.set(r,e);let s=Array.from(this._requestToStreamMapping.entries()).filter(([l,c])=>c===a).map(([l])=>l);if(s.every(l=>this._requestResponseMap.has(l))){if(!i)throw new Error(`No connection established for request ID: ${String(r)}`);if(this._enableJsonResponse&&i.resolveJson){let l={"Content-Type":"application/json"};this.sessionId!==void 0&&(l["mcp-session-id"]=this.sessionId);let c=s.map(d=>this._requestResponseMap.get(d));c.length===1?i.resolveJson(new Response(JSON.stringify(c[0]),{status:200,headers:l})):i.resolveJson(new Response(JSON.stringify(c),{status:200,headers:l}))}else i.cleanup();for(let l of s)this._requestResponseMap.delete(l),this._requestToStreamMapping.delete(l)}}}}});var HO,uRe=y(()=>{cRe();dRe();HO=class{constructor(e={}){this._requestContext=new WeakMap,this._webStandardTransport=new UO(e),this._requestListener=o8(async t=>{let r=this._requestContext.get(t);return this._webStandardTransport.handleRequest(t,{authInfo:r==null?void 0:r.authInfo,parsedBody:r==null?void 0:r.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,t){return this._webStandardTransport.send(e,t)}async handleRequest(e,t,r){let a=e.auth;await o8(async s=>this._webStandardTransport.handleRequest(s,{authInfo:a,parsedBody:r}),{overrideGlobalObjects:!1})(e,t)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}}});function mRe(n){let e=Array.isArray(n)?n:[n];for(let t of e){let r=t.params;t.method!=="initialize"||!r||typeof r.protocolVersion!="string"||Bct.has(r.protocolVersion)||(r.protocolVersion=pRe)}return n}var pRe,Bct,fRe=y(()=>{pRe="2025-06-18",Bct=new Set([pRe,"2025-03-26","2024-11-05","2024-10-07"])});function Uct(){let n=[];return function(t,r){if(t!=="basesData"){if(typeof r=="bigint")return r.toString();if(!(typeof r=="function"||typeof r=="symbol")){if(r===null||typeof r!="object")return r;if(!Array.isArray(r)){let a=Object.getPrototypeOf(r);if(a!==Object.prototype&&a!==null)return}for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(!n.includes(r))return n.push(r),r}}}}function yRe(n){return JSON.stringify(n,Uct())}var jct,vRe,$ct,hRe,gRe,VO,kRe=y(()=>{zNe();uRe();k_();Pr();CE();A3();TC();D3();fRe();q();jct=M({tag:"Services/MCPService"}),vRe=FX.map(n=>n.id),$ct=["Filter operator. Valid operators:",vRe.join(", ")].join(" "),hRe=N.object({id:N.string().describe("Unique reminder ID"),type:N.enum(["absolute","relative"]).describe("Reminder type"),relatedTo:N.enum(["scheduled","due"]).optional().describe("Anchor date for relative reminders"),offset:N.string().optional().describe("ISO 8601 duration offset for relative reminders, e.g. -PT1H"),absoluteTime:N.string().optional().describe("Absolute reminder time as an ISO 8601 timestamp"),description:N.string().optional().describe("Optional reminder description")}),gRe=N.record(N.string(),N.unknown()).optional().describe("Configured TaskNotes custom user-field values keyed by frontmatter property key");VO=class{constructor(e,t,r,a,i,s,o){this.plugin=e;this.taskService=t;this.filterService=r;this.cacheManager=a;this.statusManager=i;this.nlParser=s;this.taskStatsService=o}async handleRequest(e,t,r){if(e.method!=="POST"){t.writeHead(405,{Allow:"POST"}),t.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed"},id:null}));return}try{mRe(r);let a=new HO({sessionIdGenerator:void 0}),i=new FO({name:"tasknotes",version:this.plugin.manifest.version});this.registerTools(i),await i.connect(a),await a.handleRequest(e,t,r),await a.close(),await i.close()}catch(a){jct.error("MCP request error:",{category:"provider",operation:"mcp-request",error:a}),t.headersSent||(t.writeHead(500,{"Content-Type":"application/json"}),t.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:"Internal error"},id:null})))}}registerTools(e){this.registerTaskTools(e),this.registerFilterTools(e),this.registerTimeTrackingTools(e),this.registerPomodoroTools(e),this.registerCalendarTools(e),this.registerSystemTools(e)}getErrorMessage(e){return e instanceof Error?e.message:String(e)}getToolRegistrar(e){return e.registerTool.bind(e)}registerTaskTools(e){let t=this.getToolRegistrar(e);t("tasknotes_list_tasks",{description:"List all tasks with optional pagination",inputSchema:{limit:N.number().optional().describe("Max tasks to return"),offset:N.number().optional().describe("Number of tasks to skip")}},async({limit:r,offset:a})=>{try{let i=await this.cacheManager.getAllTasks(),s=a!=null?a:0,o=r?s+r:void 0,l=i.slice(s,o);return this.jsonResult({tasks:l,total:i.length,offset:s,returned:l.length})}catch(i){return this.errorResult(this.getErrorMessage(i))}}),t("tasknotes_get_task",{description:"Get a single task by its file path ID",inputSchema:{id:N.string().describe("Task file path (e.g. 'tasks/My Task.md')")}},async({id:r})=>{try{let a=await this.cacheManager.getTaskInfo(r);if(!a)return this.errorResult("Task not found");let i=await HF(this.plugin.app,a);return this.jsonResult(i)}catch(a){return this.errorResult(this.getErrorMessage(a))}}),t("tasknotes_create_task",{description:"Create a new task",inputSchema:{title:N.string().describe("Task title"),status:N.string().optional().describe("Task status (e.g. 'open', 'in-progress', 'done')"),priority:N.string().optional().describe("Task priority (e.g. 'low', 'normal', 'high', 'urgent')"),due:N.string().optional().describe("Due date (YYYY-MM-DD)"),scheduled:N.string().optional().describe("Scheduled date (YYYY-MM-DD)"),tags:N.array(N.string()).optional().describe("Tags"),contexts:N.array(N.string()).optional().describe("Contexts"),projects:N.array(N.string()).optional().describe("Projects"),recurrence:N.string().optional().describe("RFC 5545 recurrence rule"),timeEstimate:N.number().optional().describe("Time estimate in minutes"),reminders:N.array(hRe).optional().describe("Task reminders"),details:N.string().optional().describe("Task body/description"),customProperties:gRe}},async r=>{try{let a={title:r.title,path:"",archived:!1,status:r.status||this.plugin.settings.defaultTaskStatus,priority:r.priority||this.plugin.settings.defaultTaskPriority,due:r.due,scheduled:r.scheduled,tags:r.tags,contexts:r.contexts,projects:r.projects,recurrence:r.recurrence,timeEstimate:r.timeEstimate,reminders:r.reminders,details:r.details,customProperties:r.customProperties,creationContext:"api"},i=await this.taskService.createTask(a);return this.jsonResult(i.taskInfo)}catch(a){return this.errorResult(this.getErrorMessage(a))}}),t("tasknotes_update_task",{description:"Update an existing task's properties",inputSchema:{id:N.string().describe("Task file path"),title:N.string().optional().describe("New title"),status:N.string().optional().describe("New status"),priority:N.string().optional().describe("New priority"),due:N.string().nullable().optional().describe("New due date (YYYY-MM-DD) or null to clear"),scheduled:N.string().nullable().optional().describe("New scheduled date (YYYY-MM-DD) or null to clear"),tags:N.array(N.string()).optional().describe("New tags"),contexts:N.array(N.string()).optional().describe("New contexts"),projects:N.array(N.string()).optional().describe("New projects"),recurrence:N.string().nullable().optional().describe("New recurrence rule or null to clear"),timeEstimate:N.number().nullable().optional().describe("New time estimate in minutes or null to clear"),reminders:N.array(hRe).nullable().optional().describe("New reminders array or null to clear"),details:N.string().optional().describe("New body/description"),customProperties:gRe}},async({id:r,...a})=>{try{let i=await this.cacheManager.getTaskInfo(r);if(!i)return this.errorResult("Task not found");let s={};for(let[l,c]of Object.entries(a)){if(l==="reminders"&&c===null){s.reminders=void 0;continue}c!==void 0&&(s[l]=c)}let o=await this.taskService.updateTask(i,s);return this.jsonResult(o)}catch(i){return this.errorResult(this.getErrorMessage(i))}}),t("tasknotes_delete_task",{description:"Permanently delete a task file",inputSchema:{id:N.string().describe("Task file path")}},async({id:r})=>{try{let a=await this.cacheManager.getTaskInfo(r);return a?(await this.taskService.deleteTask(a),this.jsonResult({deleted:!0,id:r})):this.errorResult("Task not found")}catch(a){return this.errorResult(this.getErrorMessage(a))}}),t("tasknotes_toggle_status",{description:"Toggle a task's status through the status cycle",inputSchema:{id:N.string().describe("Task file path")}},async({id:r})=>{try{let a=await this.cacheManager.getTaskInfo(r);if(!a)return this.errorResult("Task not found");let i=await this.taskService.toggleStatus(a);return this.jsonResult(i)}catch(a){return this.errorResult(this.getErrorMessage(a))}}),t("tasknotes_toggle_archive",{description:"Toggle a task's archived state",inputSchema:{id:N.string().describe("Task file path")}},async({id:r})=>{try{let a=await this.cacheManager.getTaskInfo(r);if(!a)return this.errorResult("Task not found");let i=await this.taskService.toggleArchive(a);return this.jsonResult(i)}catch(a){return this.errorResult(this.getErrorMessage(a))}}),t("tasknotes_complete_recurring_instance",{description:"Mark a recurring task as completed for a specific date",inputSchema:{id:N.string().describe("Task file path"),date:N.string().optional().describe("Date to mark complete (YYYY-MM-DD), defaults to today")}},async({id:r,date:a})=>{try{let i=await this.cacheManager.getTaskInfo(r);if(!i)return this.errorResult("Task not found");let s=a?new Date(a):void 0,o=await this.taskService.toggleRecurringTaskCompleteWithOccurrenceNotes(i,s);return this.jsonResult(o)}catch(i){return this.errorResult(this.getErrorMessage(i))}}),t("tasknotes_materialize_occurrence",{description:"Create or return a materialized occurrence note for a recurring task",inputSchema:{id:N.string().describe("Parent recurring task file path"),date:N.string().describe("Occurrence date to materialize (YYYY-MM-DD)")}},async({id:r,date:a})=>{try{let i=await this.cacheManager.getTaskInfo(r);if(!i)return this.errorResult("Task not found");let s=await this.taskService.materializeOccurrence(i,a);return this.jsonResult(s)}catch(i){return this.errorResult(this.getErrorMessage(i))}}),t("tasknotes_create_task_from_text",{description:"Create a task by parsing natural language text (e.g. 'Buy groceries tomorrow #shopping @home')",inputSchema:{text:N.string().describe("Natural language task description")}},async({text:r})=>{try{let a=this.nlParser.parseInput(r),i=Vd(this.plugin,a,{creationContext:"api"}),s=await this.taskService.createTask(i);return this.jsonResult({parsed:a,task:s.taskInfo})}catch(a){return this.errorResult(this.getErrorMessage(a))}})}registerFilterTools(e){let t=this.getToolRegistrar(e),r=N.union([N.string(),N.array(N.string()),N.number(),N.boolean(),N.null()]),a=N.enum(vRe).describe($ct),i=N.object({type:N.literal("condition"),id:N.string(),property:N.string().describe("Filter property (e.g. 'status', 'priority', 'due', 'tags', 'projects', 'contexts')"),operator:a,value:r}),s=N.lazy(()=>N.object({type:N.literal("group"),id:N.string(),conjunction:N.enum(["and","or"]),children:N.array(N.union([i,s]))}));t("tasknotes_query_tasks",{description:"Query tasks using advanced filters with AND/OR logic, sorting, and grouping",inputSchema:{conjunction:N.enum(["and","or"]).describe("How to combine filter conditions"),children:N.array(N.union([i,s])).describe("Filter conditions or nested groups"),sortKey:N.string().optional().describe("Sort by field (e.g. 'due', 'priority', 'title', 'status')"),sortDirection:N.enum(["asc","desc"]).optional().describe("Sort direction"),groupKey:N.string().optional().describe("Group by field (e.g. 'priority', 'status', 'projects')")}},async o=>{try{let l={type:"group",id:"mcp-root",conjunction:o.conjunction,children:o.children,sortKey:o.sortKey,sortDirection:o.sortDirection,groupKey:o.groupKey},c=await this.filterService.getGroupedTasks(l),d={};for(let[u,p]of c)d[u]=p;return this.jsonResult(d)}catch(l){return this.errorResult(this.getErrorMessage(l))}}),t("tasknotes_get_filter_options",{description:"Get available filter options (statuses, priorities, tags, contexts, projects)",inputSchema:{}},async()=>{try{let o=await this.filterService.getFilterOptions();return this.jsonResult(o)}catch(o){return this.errorResult(this.getErrorMessage(o))}}),t("tasknotes_get_stats",{description:"Get task statistics (counts by status, priority, overdue, etc.)",inputSchema:{}},async()=>{try{let o=await this.cacheManager.getAllTasks(),l=this.taskStatsService.getStats(o);return this.jsonResult(l)}catch(o){return this.errorResult(this.getErrorMessage(o))}})}registerTimeTrackingTools(e){let t=this.getToolRegistrar(e);t("tasknotes_start_time_tracking",{description:"Start a time tracking session on a task",inputSchema:{id:N.string().describe("Task file path"),description:N.string().optional().describe("Description for the time session")}},async({id:r,description:a})=>{try{let i=await this.cacheManager.getTaskInfo(r);if(!i)return this.errorResult("Task not found");let s=await this.taskService.startTimeTracking(i);if(a&&s.timeEntries&&s.timeEntries.length>0){let o=s.timeEntries[s.timeEntries.length-1];o&&!o.endTime&&(o.description=a,s=await this.taskService.updateTask(s,{timeEntries:s.timeEntries}))}return this.jsonResult(s)}catch(i){return this.errorResult(this.getErrorMessage(i))}}),t("tasknotes_stop_time_tracking",{description:"Stop the active time tracking session on a task",inputSchema:{id:N.string().describe("Task file path")}},async({id:r})=>{try{let a=await this.cacheManager.getTaskInfo(r);if(!a)return this.errorResult("Task not found");let i=await this.taskService.stopTimeTracking(a);return this.jsonResult(i)}catch(a){return this.errorResult(this.getErrorMessage(a))}}),t("tasknotes_get_active_time_sessions",{description:"Get all tasks with currently running time tracking sessions",inputSchema:{}},async()=>{try{let r=await this.cacheManager.getAllTasks(),a=Qk(r,i=>this.plugin.getActiveTimeSession(i));return this.jsonResult(a)}catch(r){return this.errorResult(this.getErrorMessage(r))}}),t("tasknotes_get_time_summary",{description:"Get time tracking summary for a period",inputSchema:{period:N.enum(["today","week","month","all","custom"]).optional().describe("Time period (default: today)"),from:N.string().optional().describe("Start date (ISO string) for custom range"),to:N.string().optional().describe("End date (ISO string) for custom range")}},async({period:r,from:a,to:i})=>{try{let s=await this.cacheManager.getAllTasks(),o=r||"today",l=a?new Date(a):null,c=i?new Date(i):null,d=Jk(s,{period:o,fromDate:l,toDate:c,includeTags:!1},u=>this.statusManager.isCompletedStatus(u));return this.jsonResult(d)}catch(s){return this.errorResult(this.getErrorMessage(s))}}),t("tasknotes_get_task_time_data",{description:"Get detailed time tracking data for a specific task",inputSchema:{id:N.string().describe("Task file path")}},async({id:r})=>{try{let a=await this.cacheManager.getTaskInfo(r);if(!a)return this.errorResult("Task not found");let i=pm(a,s=>this.plugin.getActiveTimeSession(s));return this.jsonResult(i)}catch(a){return this.errorResult(this.getErrorMessage(a))}})}registerPomodoroTools(e){let t=this.getToolRegistrar(e);t("tasknotes_start_pomodoro",{description:"Start a pomodoro timer, optionally linked to a task",inputSchema:{taskId:N.string().optional().describe("Task file path to associate with this pomodoro"),duration:N.number().optional().describe("Duration in minutes (default: work duration from settings)")}},async({taskId:r,duration:a})=>{try{let i;if(r&&(i=await this.cacheManager.getTaskInfo(r),!i))return this.errorResult("Task not found");if(this.plugin.pomodoroService.getState().isRunning)return this.errorResult("Pomodoro session is already running. Stop or pause the current session first.");await this.plugin.pomodoroService.startPomodoro(i,a);let o=this.plugin.pomodoroService.getState();return this.jsonResult({session:o.currentSession,task:i||null,message:"Pomodoro session started"})}catch(i){return this.errorResult(this.getErrorMessage(i))}}),t("tasknotes_stop_pomodoro",{description:"Stop and reset the current pomodoro session",inputSchema:{}},async()=>{try{return this.plugin.pomodoroService.getState().currentSession?(await this.plugin.pomodoroService.stopPomodoro(),this.jsonResult({message:"Pomodoro session stopped and reset"})):this.errorResult("No active pomodoro session to stop")}catch(r){return this.errorResult(this.getErrorMessage(r))}}),t("tasknotes_pause_pomodoro",{description:"Pause the running pomodoro timer",inputSchema:{}},async()=>{try{let r=this.plugin.pomodoroService.getState();if(!r.isRunning||!r.currentSession)return this.errorResult("No running pomodoro session to pause");await this.plugin.pomodoroService.pausePomodoro();let a=this.plugin.pomodoroService.getState();return this.jsonResult({timeRemaining:a.timeRemaining,message:"Pomodoro session paused"})}catch(r){return this.errorResult(this.getErrorMessage(r))}}),t("tasknotes_resume_pomodoro",{description:"Resume a paused pomodoro timer",inputSchema:{}},async()=>{try{let r=this.plugin.pomodoroService.getState();if(r.isRunning)return this.errorResult("Pomodoro session is already running");if(!r.currentSession)return this.errorResult("No paused session to resume");await this.plugin.pomodoroService.resumePomodoro();let a=this.plugin.pomodoroService.getState();return this.jsonResult({timeRemaining:a.timeRemaining,message:"Pomodoro session resumed"})}catch(r){return this.errorResult(this.getErrorMessage(r))}}),t("tasknotes_get_pomodoro_status",{description:"Get the current pomodoro timer status including stats",inputSchema:{}},async()=>{try{let a={...this.plugin.pomodoroService.getState(),totalPomodoros:await this.plugin.pomodoroService.getPomodorosCompleted(),currentStreak:await this.plugin.pomodoroService.getCurrentStreak(),totalMinutesToday:await this.plugin.pomodoroService.getTotalMinutesToday()};return this.jsonResult(a)}catch(r){return this.errorResult(this.getErrorMessage(r))}})}registerCalendarTools(e){this.getToolRegistrar(e)("tasknotes_get_calendar_events",{description:"Get calendar events from all connected providers (Google, Microsoft, ICS subscriptions)",inputSchema:{start:N.string().optional().describe("Start date filter (ISO string)"),end:N.string().optional().describe("End date filter (ISO string)")}},async({start:r,end:a})=>{var i;try{let s=r?new Date(r):null,o=a?new Date(a):null,l=WF(this.plugin.calendarProviderRegistry,(i=this.plugin.icsSubscriptionService)!=null?i:null,{start:s,end:o});return this.jsonResult({events:l.events,total:l.total})}catch(s){return this.errorResult(this.getErrorMessage(s))}})}registerSystemTools(e){this.getToolRegistrar(e)("tasknotes_health_check",{description:"Check if the TaskNotes MCP server is running and return vault info",inputSchema:{}},async()=>{try{let r=this.plugin.app.vault.getName(),a=this.plugin.app.vault.adapter.basePath||"unknown";return this.jsonResult({status:"ok",vault:r,vaultPath:a,version:this.plugin.manifest.version,timestamp:new Date().toISOString()})}catch(r){return this.errorResult(this.getErrorMessage(r))}})}jsonResult(e){return{content:[{type:"text",text:yRe(e)}]}}errorResult(e){return{content:[{type:"text",text:yRe({error:e})}],isError:!0}}}});var TRe={};Xe(TRe,{API_BIND_HOST:()=>c8,HTTPAPIService:()=>SP});var Mg,l8,c8,SP,bRe=y(()=>{Wl();pU();_H();qc();uDe();fDe();hDe();gDe();vDe();TDe();wDe();SDe();kRe();E3();cg();q();Mg=require("obsidian"),l8=M({tag:"Services/HTTPAPIService"}),c8="127.0.0.1",SP=class{constructor(e,t,r,a){this.starting=null;this.plugin=e;let i=Nn.fromPlugin(e),s=new Cv(e.settings.customStatuses,e.settings.defaultTaskStatus),o=new tk(a,s);this.webhookController=new wm(e),this.tasksController=new Qa(e,t,r,a,o),this.timeTrackingController=new Gc(e,t,a,s),this.pomodoroController=new kl(e,a),this.systemController=new bu(e,t,i,this),this.calendarsController=new wu(e,e.oauthService,e.icsSubscriptionService,e.calendarProviderRegistry),this.basesController=new pD(e),e.settings.enableMCP&&(this.mcpService=new VO(e,t,r,a,s,i,o)),this.router=new BF,this.setupRoutes()}setupRoutes(){this.router.registerController(this.tasksController),this.router.registerController(this.timeTrackingController),this.router.registerController(this.pomodoroController),this.router.registerController(this.systemController),this.router.registerController(this.webhookController),this.router.registerController(this.calendarsController),this.router.registerController(this.basesController)}generateOpenAPISpec(){let e=uD(this.systemController),t=[this.tasksController,this.timeTrackingController,this.pomodoroController,this.systemController,this.webhookController,this.calendarsController,this.basesController];e.paths={};for(let r of t){let a=uD(r);a.paths&&(e.paths={...e.paths,...a.paths})}return e.servers=[{url:`http://localhost:${this.plugin.settings.apiPort}`,description:"TaskNotes API Server"}],e}async handleCORSPreflight(e,t){t.statusCode=200,jF(t),t.end()}getFallbackCORSOrigin(){return`http://${c8}:${this.plugin.settings.apiPort}`}getRequestOrigin(e){let t=e.headers.origin;return Array.isArray(t)?t[0]:t}applyCORSPolicy(e,t){let r=this.getRequestOrigin(e),a=pDe(r,this.getFallbackCORSOrigin());return a?(jF(t,{allowOrigin:a}),!0):!1}authenticate(e){let t=this.plugin.settings.apiAuthToken;if(!t)return!1;let r=e.headers.authorization,a=Array.isArray(r)?r[0]:r;return!a||!a.startsWith("Bearer ")?!1:a.substring(7)===t}sendResponse(e,t,r){$F(e,t,r)}successResponse(e,t){return{success:!0,data:e,message:t}}errorResponse(e){return{success:!1,error:e}}async handleRequest(e,t){try{if(!this.applyCORSPolicy(e,t)){t.statusCode=403,t.setHeader("Content-Type","application/json"),t.end(JSON.stringify(this.errorResponse("CORS origin is not allowed")));return}if(e.method==="OPTIONS"){await this.handleCORSPreflight(e,t);return}let r=Os(e).pathname;if(r==="/mcp"){if(!this.mcpService){this.sendResponse(t,404,this.errorResponse("MCP server is not enabled"));return}if(!this.authenticate(e)){this.sendResponse(t,401,this.errorResponse("Authentication required"));return}let i=await this.parseBody(e);await this.mcpService.handleRequest(e,t,i);return}if(r.startsWith("/api/")&&!this.authenticate(e)){this.sendResponse(t,401,this.errorResponse("Authentication required"));return}await this.router.route(e,t)||this.sendResponse(t,404,this.errorResponse("Not found"))}catch(r){l8.error("API Error:",{category:"provider",operation:"api",error:r}),this.sendResponse(t,500,this.errorResponse("Internal server error"))}}async triggerWebhook(e,t){await this.webhookController.triggerWebhook(e,t)}syncWebhookSettings(){this.webhookController.syncFromSettings()}parseBody(e){return UF(e)}async start(){if(this.starting)return this.starting;if(this.isRunning())return;let e=this.startServer();this.starting=e;try{await e}finally{this.starting=null}}async startServer(){if(!Mg.Platform.isDesktop||!Mg.Platform.isDesktopApp)throw new Error("The HTTP API is only available in the desktop app.");if(!this.plugin.settings.apiAuthToken){let e=btoa(String.fromCharCode(...crypto.getRandomValues(new Uint8Array(32)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"");this.plugin.settings.apiAuthToken=e;try{await this.plugin.saveSettings()}catch(t){throw this.plugin.settings.apiAuthToken===e&&(this.plugin.settings.apiAuthToken=""),t}}return new Promise((e,t)=>{if(!Mg.Platform.isDesktop||!Mg.Platform.isDesktopApp){t(new Error("The HTTP API is only available in the desktop app."));return}try{if(Mg.Platform.isDesktop&&Mg.Platform.isDesktopApp){let r=require("http");this.server=r.createServer((a,i)=>{this.handleRequest(a,i).catch(s=>{l8.error("Request handling error:",{category:"provider",operation:"request-handling",error:s}),this.sendResponse(i,500,this.errorResponse("Internal server error"))})}),this.server.listen(this.plugin.settings.apiPort,c8,()=>{e()}),this.server.on("error",a=>{l8.error("API server error:",{category:"provider",operation:"api-server",error:a}),t(a)})}}catch(r){t(r instanceof Error?r:new Error(String(r)))}})}async stop(){return new Promise(e=>{this.server?this.server.close(()=>{e()}):e()})}isRunning(){var e;return((e=this.server)==null?void 0:e.listening)===!0}getPort(){return this.plugin.settings.apiPort}};SP=Qe([cDe],SP)});function d8(n,e){if(!n)return null;let t=n.match(/DTSTART:(\d{8})(T(\d{6})Z?)?;?/);if(!t)return null;let r=t[1],a=t[3],i=!!a,s=`${r.slice(0,4)}-${r.slice(4,6)}-${r.slice(6,8)}`,o=a?`${a.slice(0,2)}:${a.slice(2,4)}:${a.slice(4,6)}`:void 0,l=n.replace(/DTSTART:\d{8}(T\d{6}Z?)?;?/,"").trim();if(!l||!l.includes("FREQ="))return null;let c=[`RRULE:${l}`],d=Hct([...(e==null?void 0:e.completedInstances)||[],...(e==null?void 0:e.skippedInstances)||[],...(e==null?void 0:e.additionalExcludedDates)||[]]);return c.push(...d),{recurrence:c,dtstart:s,hasTime:i,time:o}}function Hct(n){return!n||n.length===0?[]:n.filter(e=>e&&/^\d{4}-\d{2}-\d{2}$/.test(e)).map(e=>`EXDATE;VALUE=DATE:${e.replace(/-/g,"")}`)}var wRe=y(()=>{});var PRe={};Xe(PRe,{TaskCalendarSyncService:()=>p8});function xP(n){if(n===null||typeof n!="object")return;let{status:e,statusCode:t}=n;if(typeof e=="number")return e;if(typeof t=="number")return t}function CP(n){if(n instanceof Error)return n.message;if(n!==null&&typeof n=="object"){let e=n.message;if(e!==void 0)return Y(e)}return Y(n)}function DRe(n){let e=xP(n);return e===404||e===410}var WT,wr,Vct,Wct,qct,u8,SRe,CRe,xRe,Gct,ERe,id,it,p8,ARe=y(()=>{WT=require("obsidian");Cr();wRe();dr();xe();$k();Bk();q();Oi();ya();wr=M({tag:"Services/TaskCalendarSyncService"}),Vct=500,Wct=5,qct=100,u8="googleCalendarDeletionQueue",SRe="googleCalendarEventIndex",CRe="googleCalendarSyncQueue",xRe="googleCalendarTaskFingerprints",Gct=6e4,ERe=900*1e3;id=class extends Error{constructor(){super("Google Calendar connection changed while synchronization was in progress"),this.name="GoogleCalendarConnectionChangedError"}},it=class it{constructor(e,t){this.rateLimitChain=Promise.resolve();this.lastApiCallAt=0;this.recoveryQueueProcessorStarted=!1;this.recoveryQueueProcessorTimeout=null;this.lastEventIndexRecoveryAt=0;this.pendingSyncs=new Map;this.inFlightSyncs=new Map;this.previousTaskState=new Map;this.pendingTasks=new Map;this.calendarFingerprints=null;this.destroyed=!1;this.plugin=e,this.googleCalendarService=t}static getTaskCalendarCacheKey(e,t){return t?`${t}::${e}`:e}static deleteTaskPathEntries(e,t){e.delete(it.getTaskCalendarCacheKey(t));for(let r of Array.from(e.keys()))r.endsWith(`::${t}`)&&e.delete(r)}static clearTaskEventIdCache(e,t){if(t){it.taskEventIdCache.delete(it.getTaskCalendarCacheKey(e,t));return}it.deleteTaskPathEntries(it.taskEventIdCache,e)}static clearTaskExceptionEventIdCache(e,t){if(t){it.taskExceptionEventIdCache.delete(it.getTaskCalendarCacheKey(e,t));return}it.deleteTaskPathEntries(it.taskExceptionEventIdCache,e)}static clearSharedGoogleCalendarSyncStateForTests(){it.pendingEventCreates.clear(),it.pendingExceptionEventCreates.clear(),it.taskEventIdCache.clear(),it.taskExceptionEventIdCache.clear(),it.googleCalendarFrontmatterWrites.clear(),it.googleCalendarDeletionQueueWrite=Promise.resolve()}getTaskEventIdCacheKey(e,t){return it.getTaskCalendarCacheKey(e,t||this.plugin.settings.googleCalendarExport.targetCalendarId)}profileAsync(e,t,r){var a,i;return(i=(a=this.plugin.performanceProfiler)==null?void 0:a.measureAsync(`calendarSync.${e}`,t,r))!=null?i:t()}profileIncrement(e,t=1,r){var a;(a=this.plugin.performanceProfiler)==null||a.increment(`calendarSync.${e}`,t,r)}profileGauge(e,t,r){var a;(a=this.plugin.performanceProfiler)==null||a.recordGauge(`calendarSync.${e}`,t,r)}destroy(){this.destroyed=!0;for(let e of this.pendingSyncs.values())window.clearTimeout(e);this.recoveryQueueProcessorStarted=!1,this.recoveryQueueProcessorTimeout&&(window.clearTimeout(this.recoveryQueueProcessorTimeout),this.recoveryQueueProcessorTimeout=null),this.pendingSyncs.clear(),this.previousTaskState.clear(),this.pendingTasks.clear(),this.calendarFingerprints=null}async processInParallel(e,t){let r=[];for(let a of e){let i=t(a).then(()=>{r.splice(r.indexOf(i),1)});r.push(i),r.length>=Wct&&await Promise.race(r)}await Promise.all(r)}withGoogleRateLimit(e){let t=async()=>{let a=Date.now(),i=Math.max(0,qct-(a-this.lastApiCallAt));i>0&&await new Promise(s=>window.setTimeout(s,i));try{return await e()}finally{this.lastApiCallAt=Date.now()}},r=this.rateLimitChain.then(t,t);return this.rateLimitChain=r.catch(()=>{}),r}isEnabled(){let e=this.plugin.settings.googleCalendarExport,t=e.enabled,r=!!e.targetCalendarId,a=this.googleCalendarService.getAvailableCalendars().length>0;return t&&r&&a}getConnectionGeneration(){var e,t,r;return(r=(t=(e=this.googleCalendarService).getConnectionGeneration)==null?void 0:t.call(e))!=null?r:0}async assertConnectionGenerationCurrent(e){var r,a,i;if(this.destroyed)throw new id;if(e===void 0)return;if(!((i=await((a=(r=this.googleCalendarService).isConnectionGenerationCurrent)==null?void 0:a.call(r,e)))!=null?i:!0))throw new id}startRecoveryQueueProcessor(){this.recoveryQueueProcessorStarted||(this.recoveryQueueProcessorStarted=!0,this.runRecoveryQueueProcessor(!0))}runRecoveryQueueProcessor(e){(e?this.processStartupRecovery():this.processRecoveryQueues()).catch(r=>{wr.error("[TaskCalendarSync] Failed to process recovery queues:",{category:"provider",operation:"process-recovery-queues",error:r})}).finally(()=>{this.scheduleRecoveryQueueProcessor()})}scheduleRecoveryQueueProcessor(){!this.recoveryQueueProcessorStarted||this.recoveryQueueProcessorTimeout||(this.recoveryQueueProcessorTimeout=window.setTimeout(()=>{this.recoveryQueueProcessorTimeout=null,this.runRecoveryQueueProcessor(!1)},Gct))}isDeletionQueueReady(){let e=this.plugin.settings.googleCalendarExport,t=this.googleCalendarService.getAvailableCalendars().length>0;return!!(e!=null&&e.enabled)&&t}isSyncQueueReady(){let e=this.plugin.settings.googleCalendarExport,t=this.googleCalendarService.getAvailableCalendars().length>0;return!!(e!=null&&e.enabled)&&!!(e!=null&&e.targetCalendarId)&&t}getDeletionQueueKey(e){return`${e.calendarId}::${e.eventId}`}getEventIndexTaskCalendarKey(e){return`${e.calendarId}::${e.taskPath}`}isTaskCalendarEligible(e){if(e.archived)return!1;switch(this.plugin.settings.googleCalendarExport.syncTrigger){case"scheduled":return!!e.scheduled;case"due":return!!e.due;case"both":return!!e.scheduled||!!e.due;default:return!1}}async getDeletionQueue(){let e=await this.plugin.loadData();return(e==null?void 0:e[u8])||[]}async mutateDeletionQueue(e){let r=it.googleCalendarDeletionQueueWrite.catch(()=>{}).then(async()=>{let a=await this.plugin.loadPluginDataForSafeWrite("save-google-calendar-deletion-queue");if(!a)return;let i=a[u8]||[],s=e(i);s!==null&&(a[u8]=s,await this.plugin.saveData(a))});it.googleCalendarDeletionQueueWrite=r,await r}async getEventIndex(){let e=await this.plugin.loadData();return(e==null?void 0:e[SRe])||[]}async saveEventIndex(e){let t=await this.plugin.loadPluginDataForSafeWrite("save-google-calendar-event-index");t&&(t[SRe]=e,await this.plugin.saveData(t))}async getSyncQueue(){let e=await this.plugin.loadData();return(e==null?void 0:e[CRe])||[]}async saveSyncQueue(e){let t=await this.plugin.loadPluginDataForSafeWrite("save-google-calendar-sync-queue");t&&(t[CRe]=e,await this.plugin.saveData(t))}async getCalendarFingerprints(){if(this.calendarFingerprints)return this.calendarFingerprints;let e=await this.plugin.loadData(),t=e==null?void 0:e[xRe],r=new Map;if(t&&typeof t=="object")for(let[a,i]of Object.entries(t))typeof a=="string"&&typeof i=="string"&&r.set(a,i);return this.calendarFingerprints=r,r}async saveCalendarFingerprints(e){let t=e||await this.getCalendarFingerprints(),r=await this.plugin.loadPluginDataForSafeWrite("save-google-calendar-fingerprints");r&&(r[xRe]=Object.fromEntries(t.entries()),await this.plugin.saveData(r))}getCalendarRelevantFingerprint(e){var t;return JSON.stringify({title:e.title||"",status:e.status||"",priority:e.priority||"",archived:!!e.archived,scheduled:e.scheduled||null,due:e.due||null,timeEstimate:(t=e.timeEstimate)!=null?t:null,recurrence:e.recurrence||null,recurrence_anchor:e.recurrence_anchor||null,complete_instances:e.complete_instances||[],skipped_instances:e.skipped_instances||[],reminders:e.reminders||[],tags:e.tags||[],contexts:e.contexts||[],projects:e.projects||[]})}parseCalendarRelevantFingerprint(e){if(!e)return null;try{let t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:null}catch(t){return null}}getTaskStateFromFingerprint(e,t){let r=this.parseCalendarRelevantFingerprint(t);if(!r)return;let a=o=>{let l=r[o];return typeof l=="string"?l:void 0},i=o=>{let l=r[o];return Array.isArray(l)?l.filter(c=>typeof c=="string"):void 0},s=r.recurrence_anchor;return{...e,title:a("title")||e.title,status:a("status")||e.status,priority:a("priority")||e.priority,archived:typeof r.archived=="boolean"?r.archived:e.archived,scheduled:a("scheduled"),due:a("due"),timeEstimate:typeof r.timeEstimate=="number"?r.timeEstimate:void 0,recurrence:a("recurrence"),recurrence_anchor:s==="scheduled"||s==="completion"?s:void 0,complete_instances:i("complete_instances"),skipped_instances:i("skipped_instances"),tags:i("tags"),contexts:i("contexts"),projects:i("projects")}}hasTaskCalendarLink(e){return!!this.getTaskEventId(e)}normalizeStatusValue(e){return typeof e=="boolean"?e?"true":"false":String(e)}async reconcileExternalAutoArchive(e,t){if(!t||!this.plugin.autoArchiveService)return;let r=this.normalizeStatusValue(t.status),a=this.normalizeStatusValue(e.status);if(r!==a)try{let i=this.plugin.statusManager.getStatusConfig(a);if(!i)return;i.autoArchive?await this.plugin.autoArchiveService.scheduleAutoArchive(e,i):await this.plugin.autoArchiveService.cancelAutoArchive(e.path)}catch(i){wr.warn("Failed to reconcile auto-archive for external task update:",{category:"persistence",operation:"reconcile-external-auto-archive",error:i})}}async recordCalendarSyncFingerprint(e){let t=await this.getCalendarFingerprints(),r=this.getCalendarRelevantFingerprint(e);t.get(e.path)!==r&&(t.set(e.path,r),await this.saveCalendarFingerprints(t))}async removeCalendarSyncFingerprint(e){let t=await this.getCalendarFingerprints();t.delete(e)&&await this.saveCalendarFingerprints(t)}async upsertEventIndex(e,t,r){let a=await this.getEventIndex(),i=this.getDeletionQueueKey({calendarId:t,eventId:r}),s=a.filter(c=>this.getDeletionQueueKey(c)===i&&c.taskPath===e&&c.calendarId===t&&c.eventId===r),o=a.filter(c=>c.taskPath===e&&c.calendarId===t&&c.eventId!==r),l=a.filter(c=>this.getDeletionQueueKey(c)!==i&&!(c.taskPath===e&&c.calendarId===t));if(!(s.length===1&&o.length===0&&l.length===a.length-1)){l.push({taskPath:e,calendarId:t,eventId:r,updatedAt:Date.now()}),await this.saveEventIndex(l);for(let c of o)await this.deleteOrQueueCalendarEvent(c.taskPath,c.calendarId,c.eventId)||wr.warn(`[TaskCalendarSync] Replaced event cleanup queued for ${c.taskPath}`,{category:"provider",operation:"replaced-event-cleanup-queued"})}}async removeEventIndexForTask(e){let t=await this.getEventIndex(),r=t.filter(a=>a.taskPath!==e);r.length!==t.length&&await this.saveEventIndex(r)}async removeEventIndexForEvent(e,t){let r=await this.getEventIndex(),a=this.getDeletionQueueKey({calendarId:e,eventId:t}),i=r.filter(s=>this.getDeletionQueueKey(s)!==a);i.length!==r.length&&await this.saveEventIndex(i)}async queueTaskSync(e,t,r=!1){let a=Date.now(),i=await this.getSyncQueue(),s=i.find(l=>l.taskPath===e),o=t?CP(t):void 0;s?(s.requestedAt=a,r&&(s.attempts+=1,s.lastAttemptAt=a),o&&(s.lastError=o)):i.push({taskPath:e,requestedAt:a,attempts:r?1:0,lastAttemptAt:r?a:void 0,lastError:o}),await this.saveSyncQueue(i)}async removeFromDeletionQueue(e,t){let r=this.getDeletionQueueKey({calendarId:e,eventId:t});await this.mutateDeletionQueue(a=>{let i=a.filter(s=>this.getDeletionQueueKey(s)!==r);return i.length===a.length?null:i})}async queueCalendarDeletion(e,t,r,a,i=!1){let s=Date.now(),o=this.getDeletionQueueKey({calendarId:t,eventId:r}),l=a?CP(a):void 0;await this.mutateDeletionQueue(c=>{let d=c.find(u=>this.getDeletionQueueKey(u)===o);return d?(d.taskPath=e,i&&(d.attempts+=1,d.lastAttemptAt=s),l&&(d.lastError=l),c):[...c,{taskPath:e,calendarId:t,eventId:r,createdAt:s,attempts:i?1:0,lastAttemptAt:i?s:void 0,lastError:l}]})}async deleteOrQueueCalendarEvent(e,t,r,a){if(!this.plugin.settings.googleCalendarExport.syncOnTaskDelete)return!0;if(!this.isDeletionQueueReady())return await this.queueCalendarDeletion(e,t,r,new Error("Google Calendar sync is not ready")),!1;let i=a!=null?a:this.getConnectionGeneration();try{return await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(i),this.googleCalendarService.deleteEvent(t,r,i))),await this.removeFromDeletionQueue(t,r),!0}catch(s){return DRe(s)?(await this.removeFromDeletionQueue(t,r),!0):(wr.error("[TaskCalendarSync] Failed to delete event:",{category:"provider",operation:"delete-event",details:{value:e},error:s}),await this.queueCalendarDeletion(e,t,r,s,!0),!1)}}async clearTaskEventIdIfMatching(e,t){let r=await this.plugin.cacheManager.getTaskInfo(e.taskPath);if((r==null?void 0:r.googleCalendarEventId)===e.eventId){await this.removeTaskEventId(e.taskPath,t);return}r&&this.getTaskExceptionEventId(r)===e.eventId&&await this.saveTaskExceptionMetadata(e.taskPath,{googleCalendarExceptionEventId:void 0,googleCalendarExceptionOriginalScheduled:void 0},e.calendarId,t)}async isQueuedDeletionStillNeeded(e){let t=await this.plugin.cacheManager.getTaskInfo(e.taskPath);return!t||this.getTaskEventId(t)!==e.eventId?!0:!this.isTaskCalendarEligible(t)}async processStartupRecovery(){await this.profileAsync("processStartupRecovery",async()=>{await this.recoverDeletedTaskEventsFromIndex(),await this.processDeletionQueue(),await this.processPendingSyncQueue()})}async processRecoveryQueues(){await this.profileAsync("processRecoveryQueues",async()=>{await this.recoverDeletedTaskEventsFromIndexIfDue(),await this.processDeletionQueue(),await this.processPendingSyncQueue()})}async recoverDeletedTaskEventsFromIndexIfDue(){let e=Date.now()-this.lastEventIndexRecoveryAt;if(this.lastEventIndexRecoveryAt>0&&e<ERe){this.profileIncrement("recoverDeletedTaskEventsFromIndex.skipped",1,{reason:"interval",nextDueInMs:ERe-e});return}await this.recoverDeletedTaskEventsFromIndex()}async initializeExternalFileReconciliation(){await this.profileAsync("initializeExternalFileReconciliation",async()=>{let e=this.plugin.settings.googleCalendarExport;if(this.profileGauge("initializeExternalFileReconciliation.enabled",e.enabled?1:0),!e.enabled)return;let t=await this.getCalendarFingerprints(),r=await this.plugin.cacheManager.getAllTasks(),a=new Set,i=!1,s=0,o=0,l=0,c=0,d=t.size===0;for(let p of r){a.add(p.path);let m=this.getCalendarRelevantFingerprint(p),f=t.get(p.path);if(f===void 0){if(!d&&e.syncOnTaskCreate&&!this.hasTaskCalendarLink(p)&&this.isTaskCalendarEligible(p)){c++,await this.syncTaskToCalendar(p);continue}t.set(p.path,m),i=!0,l++;continue}let h=this.getTaskStateFromFingerprint(p,f),g=this.hasTaskCalendarLink(p);if(g&&o++,f!==m&&(s++,await this.reconcileExternalAutoArchive(p,h)),g&&f!==m){e.syncOnTaskUpdate?await this.executeTaskUpdate(p,h):(t.set(p.path,m),i=!0);continue}f!==m&&(t.set(p.path,m),i=!0)}let u=0;for(let p of Array.from(t.keys()))a.has(p)||(t.delete(p),i=!0,u++);this.profileGauge("initializeExternalFileReconciliation.tasks",r.length),this.profileGauge("initializeExternalFileReconciliation.linkedTasks",o),this.profileGauge("initializeExternalFileReconciliation.changedTasks",s),this.profileGauge("initializeExternalFileReconciliation.baselineTasks",l),this.profileGauge("initializeExternalFileReconciliation.createdTasks",c),this.profileGauge("initializeExternalFileReconciliation.removedFingerprints",u),i&&await this.saveCalendarFingerprints(t)})}async handleExternalTaskFileUpdated(e,t){await this.profileAsync("handleExternalTaskFileUpdated",async()=>{let r=this.plugin.settings.googleCalendarExport;if(!r.enabled)return;let a=t||await this.plugin.cacheManager.getTaskInfo(e);if(!a){this.profileIncrement("handleExternalTaskFileUpdated.removedTask"),await this.removeCalendarSyncFingerprint(e);return}let i=await this.getCalendarFingerprints(),s=this.getCalendarRelevantFingerprint(a),o=i.get(a.path);if(o===s){this.profileIncrement("handleExternalTaskFileUpdated.unchanged");return}let l=this.getTaskStateFromFingerprint(a,o);if(await this.reconcileExternalAutoArchive(a,l),this.hasTaskCalendarLink(a)){this.profileIncrement("handleExternalTaskFileUpdated.changedLinkedTask"),r.syncOnTaskUpdate?await this.executeTaskUpdate(a,l):await this.recordCalendarSyncFingerprint(a);return}if(this.isTaskCalendarEligible(a)){this.profileIncrement("handleExternalTaskFileUpdated.changedEligibleTask"),r.syncOnTaskCreate?await this.syncTaskToCalendar(a):await this.recordCalendarSyncFingerprint(a);return}this.profileIncrement("handleExternalTaskFileUpdated.changedIneligibleTask"),await this.recordCalendarSyncFingerprint(a)},{hadUpdatedTask:t!==void 0})}async recoverDeletedTaskEventsFromIndex(){await this.profileAsync("recoverDeletedTaskEventsFromIndex",async()=>{if(!this.plugin.settings.googleCalendarExport.syncOnTaskDelete){this.profileGauge("recoverDeletedTaskEventsFromIndex.enabled",0);return}this.profileGauge("recoverDeletedTaskEventsFromIndex.enabled",1);let e=this.plugin.settings.googleCalendarExport.targetCalendarId;if(!e){this.profileGauge("recoverDeletedTaskEventsFromIndex.hasTargetCalendar",0);return}this.profileGauge("recoverDeletedTaskEventsFromIndex.hasTargetCalendar",1);let t=await this.plugin.cacheManager.getAllTasks(),r=await this.getEventIndex(),a=new Map,i=new Map,s=new Map,o=[],l=0,c=!1;for(let u of r){let p=this.getDeletionQueueKey(u),m=this.getEventIndexTaskCalendarKey(u);if(i.has(p)||s.has(m)){c=!0;continue}i.set(p,u),s.set(m,u)}for(let u of t){let p=this.getTaskEventId(u);if(!p)continue;l++;let m=this.getDeletionQueueKey({calendarId:e,eventId:p}),f=this.getEventIndexTaskCalendarKey({taskPath:u.path,calendarId:e});a.set(m,u);let h=s.get(f);if((h==null?void 0:h.taskPath)===u.path&&h.calendarId===e&&h.eventId===p)continue;let g=i.get(m);h&&h.eventId!==p&&o.push(h),g&&g.taskPath!==u.path&&s.delete(this.getEventIndexTaskCalendarKey(g));let v={taskPath:u.path,calendarId:e,eventId:p,updatedAt:(g==null?void 0:g.updatedAt)||(h==null?void 0:h.updatedAt)||Date.now()};s.set(f,v),i.set(m,v),c=!0}c&&await this.saveEventIndex(Array.from(s.values()));let d=0;for(let u of s.values()){let p=a.get(this.getDeletionQueueKey(u));p&&this.isTaskCalendarEligible(p)||(d++,await this.queueCalendarDeletion((p==null?void 0:p.path)||u.taskPath,u.calendarId,u.eventId,p?new Error("Indexed task no longer meets calendar sync criteria"):new Error("Indexed task file no longer exists")))}for(let u of o)await this.deleteOrQueueCalendarEvent(u.taskPath,u.calendarId,u.eventId)||wr.warn(`[TaskCalendarSync] Replaced event cleanup queued for ${u.taskPath}`,{category:"provider",operation:"replaced-event-cleanup-queued"});this.lastEventIndexRecoveryAt=Date.now(),this.profileGauge("recoverDeletedTaskEventsFromIndex.tasks",t.length),this.profileGauge("recoverDeletedTaskEventsFromIndex.linkedTasks",l),this.profileGauge("recoverDeletedTaskEventsFromIndex.indexEntries",s.size),this.profileGauge("recoverDeletedTaskEventsFromIndex.queuedDeletions",d)})}async processPendingSyncQueue(){return this.profileAsync("processPendingSyncQueue",async()=>{let e={synced:0,failed:0,deleted:0,dropped:0,remaining:0},t=await this.getSyncQueue();if(this.profileGauge("processPendingSyncQueue.queueLength",t.length),t.length===0)return e;if(!this.isSyncQueueReady())return e.remaining=t.length,this.profileGauge("processPendingSyncQueue.remaining",e.remaining),e;let r=new Map;for(let i of t)r.set(i.taskPath,i);let a=[];for(let i of r.values()){let s=await this.plugin.cacheManager.getTaskInfo(i.taskPath);if(!s){e.dropped++;continue}if(!this.isTaskCalendarEligible(s)){this.getTaskEventId(s)?(await this.deleteTaskFromCalendar(s)||wr.warn(`[TaskCalendarSync] Calendar deletion queued while replaying sync for ${i.taskPath}`,{category:"provider",operation:"calendar-deletion-queued-replaying-sync"}),e.deleted++):e.dropped++;continue}if(await this.syncTaskToCalendar(s,void 0,{queueOnFailure:!1})){e.synced++;continue}e.failed++,a.push({...i,attempts:i.attempts+1,lastAttemptAt:Date.now(),lastError:"Failed to replay queued Google Calendar sync"})}return e.remaining=a.length,await this.saveSyncQueue(a),this.profileGauge("processPendingSyncQueue.synced",e.synced),this.profileGauge("processPendingSyncQueue.failed",e.failed),this.profileGauge("processPendingSyncQueue.deleted",e.deleted),this.profileGauge("processPendingSyncQueue.dropped",e.dropped),this.profileGauge("processPendingSyncQueue.remaining",e.remaining),e})}async processDeletionQueue(){return this.profileAsync("processDeletionQueue",async()=>{let e={deleted:0,failed:0,remaining:0},t=await this.getDeletionQueue();if(this.profileGauge("processDeletionQueue.queueLength",t.length),t.length===0)return e;if(!this.isDeletionQueueReady())return e.remaining=t.length,this.profileGauge("processDeletionQueue.remaining",e.remaining),e;let r=new Map;for(let o of t)r.set(this.getDeletionQueueKey(o),o);let a=new Map(Array.from(r,([o,l])=>[o,JSON.stringify(l)])),i=[];for(let o of r.values()){let l=this.getConnectionGeneration();try{if(!await this.isQueuedDeletionStillNeeded(o))continue;await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(l),this.googleCalendarService.deleteEvent(o.calendarId,o.eventId,l))),await this.clearTaskEventIdIfMatching(o,l),await this.removeEventIndexForEvent(o.calendarId,o.eventId),e.deleted++}catch(c){if(DRe(c)){await this.clearTaskEventIdIfMatching(o,l),await this.removeEventIndexForEvent(o.calendarId,o.eventId),e.deleted++;continue}e.failed++,i.push({...o,attempts:o.attempts+1,lastAttemptAt:Date.now(),lastError:CP(c)}),wr.error("[TaskCalendarSync] Failed to retry queued event deletion:",{category:"provider",operation:"retry-queued-event-deletion",details:{value:o},error:c})}}let s=new Set(r.keys());return await this.mutateDeletionQueue(o=>{let l=o.filter(c=>{let d=this.getDeletionQueueKey(c);return s.has(d)?a.get(d)!==JSON.stringify(c):!0});for(let c of i){let d=this.getDeletionQueueKey(c);l.some(u=>this.getDeletionQueueKey(u)===d)||l.push(c)}return e.remaining=l.length,l}),this.profileGauge("processDeletionQueue.deleted",e.deleted),this.profileGauge("processDeletionQueue.failed",e.failed),this.profileGauge("processDeletionQueue.remaining",e.remaining),e})}shouldSyncTask(e){if(!this.isEnabled())return!1;let t=this.plugin.settings.googleCalendarExport;if(e.archived)return!1;switch(t.syncTrigger){case"scheduled":return!!e.scheduled;case"due":return!!e.due;case"both":return!!e.scheduled||!!e.due;default:return!1}}getTaskEventId(e){return e.googleCalendarEventId||it.taskEventIdCache.get(this.getTaskEventIdCacheKey(e.path))}getTaskExceptionEventId(e){return e.googleCalendarExceptionEventId||it.taskExceptionEventIdCache.get(this.getTaskEventIdCacheKey(e.path))}shouldSyncAsRecurring(e){return e.recurrence?(e.recurrence_anchor||"scheduled")==="scheduled":!1}hasStoredRecurringExceptionMetadata(e){return!!(this.getTaskExceptionEventId(e)||e.googleCalendarExceptionOriginalScheduled||e.googleCalendarMovedOriginalDates&&e.googleCalendarMovedOriginalDates.length>0)}getAdditionalRecurringExdates(e){let t=new Set;for(let a of e.googleCalendarMovedOriginalDates||[]){let i=re(a);i&&t.add(i)}let r=re(e.googleCalendarExceptionOriginalScheduled||"");return r&&t.add(r),Array.from(t).sort()}isDuplicateYamlKeyError(e){return e&&typeof e=="object"&&e.code==="DUPLICATE_KEY"?!0:CP(e).includes("Map keys must be unique")}async withGoogleCalendarFrontmatterWriteLock(e,t){var i;let a=((i=it.googleCalendarFrontmatterWrites.get(e))!=null?i:Promise.resolve()).catch(()=>{}).then(t);it.googleCalendarFrontmatterWrites.set(e,a);try{return await a}finally{it.googleCalendarFrontmatterWrites.get(e)===a&&it.googleCalendarFrontmatterWrites.delete(e)}}async writeGoogleCalendarFrontmatterFields(e,t,r,a){await this.withGoogleCalendarFrontmatterWriteLock(e,()=>sy(t,async()=>{await this.assertConnectionGenerationCurrent(a);let i=new Map;try{await Lb(this.plugin.app,t,s=>{for(let[o,l]of Object.entries(r))i.set(o,s[o]),this.writeOptionalFrontmatterField(s,o,l,!0)}),await this.assertConnectionGenerationCurrent(a)}catch(s){if(s instanceof id)throw await this.restoreGoogleCalendarFrontmatterFields(t,i),s;if(!this.isDuplicateYamlKeyError(s))throw s;await this.assertConnectionGenerationCurrent(a);let o=await this.rewriteGoogleCalendarFrontmatterFields(t,r);try{await this.assertConnectionGenerationCurrent(a)}catch(l){throw await zb(this.plugin.app,t,()=>o),l}}}))}async rewriteGoogleCalendarFrontmatterFields(e,t){let r=this.getGoogleCalendarFrontmatterFields(),a="";return await zb(this.plugin.app,e,i=>(a=i,this.replaceFrontmatterFields(i,t,r))),a}async restoreGoogleCalendarFrontmatterFields(e,t){t.size!==0&&await Lb(this.plugin.app,e,r=>{for(let[a,i]of t)this.writeOptionalFrontmatterField(r,a,i,!0)})}getGoogleCalendarFrontmatterFields(){return new Set([this.plugin.fieldMapper.toUserField("googleCalendarEventId"),this.plugin.fieldMapper.toUserField("googleCalendarExceptionEventId"),this.plugin.fieldMapper.toUserField("googleCalendarExceptionOriginalScheduled"),this.plugin.fieldMapper.toUserField("googleCalendarMovedOriginalDates")])}replaceFrontmatterFields(e,t,r){let a=e.match(/^(---\r?\n)([\s\S]*?)(\r?\n---)([\s\S]*)$/);if(!a)throw new Error("Cannot repair Google Calendar metadata: missing frontmatter block");let[,i,s,o,l]=a,c=i.includes(`\r
`)?`\r
`:`
`,d=this.deduplicateGoogleCalendarFrontmatterFields(s.split(/\r?\n/),r,new Set(Object.keys(t))),u=Object.entries(t).filter(([,m])=>this.shouldWriteFrontmatterValue(m)).map(([m,f])=>(0,WT.stringifyYaml)({[m]:f}).trimEnd()),p=[...d,...u].filter((m,f,h)=>m.length>0||f<h.length-1).join(c);return`${i}${p}${o}${l}`}deduplicateGoogleCalendarFrontmatterFields(e,t,r){let a=new Map;for(let o=0;o<e.length;o++){let l=this.getTopLevelFrontmatterFieldName(e[o]);l&&t.has(l)&&a.set(l,o)}let i=[],s=0;for(;s<e.length;){let o=this.getTopLevelFrontmatterFieldName(e[s]);if(!o||!t.has(o)){i.push(e[s]),s++;continue}let l=!r.has(o)&&a.get(o)===s;for(l&&i.push(e[s]),s++;s<e.length&&/^[\t ]/.test(e[s]);)l&&i.push(e[s]),s++}for(;i.length>0&&i[i.length-1].trim()==="";)i.pop();return i}getTopLevelFrontmatterFieldName(e){if(/^\s/.test(e))return null;let t=e.indexOf(":");return t<=0?null:e.slice(0,t).trim()}shouldWriteFrontmatterValue(e){return e!=null&&(!Array.isArray(e)||e.length>0)}async saveTaskEventId(e,t,r,a){let i=this.plugin.app.vault.getAbstractFileByPath(e);if(!(i instanceof WT.TFile)){let l=new Error(`Cannot save event ID: file not found at ${e}`);if(wr.warn(l.message,{category:"provider",operation:"save-event-id-file-not-found"}),a!==void 0)throw l;return}let s=this.plugin.fieldMapper.toUserField("googleCalendarEventId");await this.writeGoogleCalendarFrontmatterFields(e,i,{[s]:t},a),it.taskEventIdCache.set(this.getTaskEventIdCacheKey(e,r),t);let o=r||this.plugin.settings.googleCalendarExport.targetCalendarId;o&&await this.upsertEventIndex(e,o,t)}async removeTaskEventId(e,t){let r=this.plugin.app.vault.getAbstractFileByPath(e);if(!(r instanceof WT.TFile)){wr.warn(`Cannot remove event ID: file not found at ${e}`,{category:"provider",operation:"remove-event-id-file-not-found"}),it.clearTaskEventIdCache(e),await this.removeEventIndexForTask(e);return}let a=this.plugin.fieldMapper.toUserField("googleCalendarEventId");await this.writeGoogleCalendarFrontmatterFields(e,r,{[a]:void 0},t),it.clearTaskEventIdCache(e),await this.removeEventIndexForTask(e)}async saveTaskExceptionMetadata(e,t,r,a){let i=this.plugin.app.vault.getAbstractFileByPath(e);if(!(i instanceof WT.TFile)){let d=new Error(`Cannot save recurring exception metadata: file not found at ${e}`);if(wr.warn(d.message,{category:"provider",operation:"save-exception-metadata-file-not-found"}),a!==void 0)throw d;return}let s=this.plugin.fieldMapper.toUserField("googleCalendarExceptionEventId"),o=this.plugin.fieldMapper.toUserField("googleCalendarExceptionOriginalScheduled"),l=this.plugin.fieldMapper.toUserField("googleCalendarMovedOriginalDates"),c={};"googleCalendarExceptionEventId"in t&&(c[s]=t.googleCalendarExceptionEventId),"googleCalendarExceptionOriginalScheduled"in t&&(c[o]=t.googleCalendarExceptionOriginalScheduled),"googleCalendarMovedOriginalDates"in t&&(c[l]=t.googleCalendarMovedOriginalDates),Object.keys(c).length>0&&await this.writeGoogleCalendarFrontmatterFields(e,i,c,a),"googleCalendarExceptionEventId"in t&&(t.googleCalendarExceptionEventId?it.taskExceptionEventIdCache.set(this.getTaskEventIdCacheKey(e,r),t.googleCalendarExceptionEventId):it.clearTaskExceptionEventIdCache(e,r))}writeOptionalFrontmatterField(e,t,r,a){if(a){if(r==null||Array.isArray(r)&&r.length===0){delete e[t];return}e[t]=r}}async clearTaskGoogleCalendarMetadata(e,t){await this.removeTaskEventId(e,t),await this.saveTaskExceptionMetadata(e,{googleCalendarExceptionEventId:void 0,googleCalendarExceptionOriginalScheduled:void 0,googleCalendarMovedOriginalDates:void 0},void 0,t)}applyTitleTemplate(e){let t=this.plugin.settings.googleCalendarExport.eventTitleTemplate,r=e.status?this.plugin.statusManager.getStatusConfig(e.status):null,a=e.priority?this.plugin.priorityManager.getPriorityConfig(e.priority):null,i=this.plugin.i18n.translate("settings.integrations.googleCalendarExport.eventDescription.untitledTask");return t.replace(/\{\{title\}\}/g,e.title||i).replace(/\{\{status\}\}/g,(r==null?void 0:r.label)||e.status||"").replace(/\{\{priority\}\}/g,(a==null?void 0:a.label)||e.priority||"").replace(/\{\{due\}\}/g,e.due||"").replace(/\{\{scheduled\}\}/g,e.scheduled||"").trim()}getCalendarEventTitle(e){let t=this.applyTitleTemplate(e);return this.plugin.statusManager.isCompletedStatus(e.status)?`✓ ${t}`:t}buildEventDescription(e){let t=this.plugin.settings.googleCalendarExport,r=(i,s)=>this.plugin.i18n.translate(`settings.integrations.googleCalendarExport.eventDescription.${i}`,s),a=[];if(e.priority&&e.priority!=="none"){let i=this.plugin.priorityManager.getPriorityConfig(e.priority);a.push(r("priority",{value:(i==null?void 0:i.label)||e.priority}))}if(e.status){let i=this.plugin.statusManager.getStatusConfig(e.status);a.push(r("status",{value:(i==null?void 0:i.label)||e.status}))}if(e.due&&a.push(r("due",{value:e.due})),e.scheduled&&a.push(r("scheduled",{value:e.scheduled})),e.timeEstimate){let i=Math.floor(e.timeEstimate/60),s=e.timeEstimate%60,o=i>0?`${i}h ${s}m`:`${s}m`;a.push(r("timeEstimate",{value:o}))}if(e.tags&&e.tags.length>0&&a.push(r("tags",{value:e.tags.map(i=>`#${i}`).join(", ")})),e.contexts&&e.contexts.length>0&&a.push(r("contexts",{value:e.contexts.map(i=>`@${this.toCalendarDescriptionLabel(i)}`).join(", ")})),e.projects&&e.projects.length>0&&a.push(r("projects",{value:e.projects.map(i=>this.toCalendarDescriptionLabel(i)).join(", ")})),a.length>0&&t.includeObsidianLink&&(a.push(""),a.push("---")),t.includeObsidianLink){let i=this.plugin.app.vault.getName(),s=encodeURIComponent(e.path),o=`obsidian://open?vault=${encodeURIComponent(i)}&file=${s}`,l=r("openInObsidian");a.push(`${l}: ${o}`)}return a.join(`
`)}toCalendarDescriptionLabel(e){return e.replace(/\[\[([^\]|]+)\|([^\]]+)\]\]/g,"$2").replace(/\[\[([^\]]+)\]\]/g,(t,r)=>this.basenameForDisplay(r)).replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").trim()}basenameForDisplay(e){let r=e.split("#")[0].replace(/\.md$/i,"");return r.split("/").pop()||r||e}getEventDate(e){switch(this.plugin.settings.googleCalendarExport.syncTrigger){case"scheduled":return e.scheduled;case"due":return e.due;case"both":return e.scheduled||e.due;default:return}}parseDateForEvent(e){if(e.includes("T")){let t=new Date(e);return{dateTime:D(t,"yyyy-MM-dd'T'HH:mm:ssxxx"),timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,isAllDay:!1}}else return{date:e,isAllDay:!0}}getEventEnd(e,t){let r=this.plugin.settings.googleCalendarExport;if(e.isAllDay||r.createAsAllDay){if(e.date){let s=new Date(e.date+"T00:00:00"),o=new Date(s);return o.setDate(o.getDate()+1),{date:D(o,"yyyy-MM-dd")}}if(!e.dateTime)return{};let a=new Date(e.dateTime),i=new Date(a);return i.setDate(i.getDate()+1),{date:D(i,"yyyy-MM-dd")}}else{let a=t.timeEstimate||r.defaultEventDuration;if(!e.dateTime)return{};let i=new Date(e.dateTime),s=new Date(i.getTime()+a*60*1e3);return{dateTime:D(s,"yyyy-MM-dd'T'HH:mm:ssxxx"),timeZone:e.timeZone}}}parseISO8601Duration(e){let t=e.match(/^(-?)P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/);if(!t)return null;let[,r,a,i,s,o,l,c,d]=t,u=0;return a&&(u+=parseInt(a)*365*24*60*60*1e3),i&&(u+=parseInt(i)*30*24*60*60*1e3),s&&(u+=parseInt(s)*7*24*60*60*1e3),o&&(u+=parseInt(o)*24*60*60*1e3),l&&(u+=parseInt(l)*60*60*1e3),c&&(u+=parseInt(c)*60*1e3),d&&(u+=parseInt(d)*1e3),r==="-"?-u:u}convertTaskRemindersToGoogleFormat(e,t,r){if(!e.reminders||!Array.isArray(e.reminders)||e.reminders.length===0)return null;let a=[],i;try{if(t.includes("T")?i=new Date(t).getTime():i=new Date(t+"T00:00:00").getTime(),isNaN(i))return wr.warn("[TaskCalendarSync] Invalid event start time:",{category:"provider",operation:"invalid-event-start-time",details:{value:t}}),null}catch(s){return wr.warn("[TaskCalendarSync] Error parsing event start time:",{category:"provider",operation:"parsing-event-start-time",error:s}),null}for(let s of e.reminders)if(s.type){if(s.type==="relative"){if(s.relatedTo!==r||!s.offset)continue;let o=this.parseISO8601Duration(s.offset);if(o===null){wr.warn("[TaskCalendarSync] Invalid duration format:",{category:"provider",operation:"invalid-duration-format",details:{value:s.offset}});continue}let l=Math.abs(Math.round(o/(60*1e3)));if(o>0){wr.warn("[TaskCalendarSync] Skipping reminder after event:",{category:"provider",operation:"skipping-reminder-event",details:{value:s}});continue}let c=Math.min(l,_s.MAX_REMINDER_MINUTES);c>=0&&a.push({method:"popup",minutes:c})}else if(s.type==="absolute"){if(!s.absoluteTime)continue;try{let o=new Date(s.absoluteTime).getTime();if(isNaN(o)){wr.warn("[TaskCalendarSync] Invalid absolute time:",{category:"provider",operation:"invalid-absolute-time",details:{value:s.absoluteTime}});continue}let l=i-o,c=Math.round(l/(60*1e3));if(c<0){wr.warn("[TaskCalendarSync] Skipping absolute reminder after event:",{category:"provider",operation:"skipping-absolute-reminder-event",details:{value:s}});continue}let d=Math.min(c,_s.MAX_REMINDER_MINUTES);a.push({method:"popup",minutes:d})}catch(o){wr.warn("[TaskCalendarSync] Error parsing absolute reminder time:",{category:"provider",operation:"parsing-absolute-reminder-time",error:o});continue}}}return a.length>0?a:null}getDefaultReminderOverrides(){let e=this.plugin.settings.googleCalendarExport.defaultReminderMinutes,t=Array.isArray(e)?e:e===null?[]:[e],r=new Set,a=[];for(let i of t){let s=Math.trunc(Number(i));if(!Number.isFinite(s)||s<=0)continue;let o=Math.min(s,_s.MAX_REMINDER_MINUTES);r.has(o)||(r.add(o),a.push({method:"popup",minutes:o}))}return a}taskToCalendarEvent(e,t){let r=this.getEventDate(e);if(!r)return null;let a=this.plugin.settings.googleCalendarExport,i=this.parseDateForEvent(r),s;if(a.createAsAllDay&&!i.isAllDay){let m=new Date(r);s={date:D(m,"yyyy-MM-dd")}}else i.isAllDay?s={date:i.date}:s={dateTime:i.dateTime,timeZone:i.timeZone};let o={...i,isAllDay:a.createAsAllDay||i.isAllDay,date:s.date,dateTime:s.dateTime},l=this.getEventEnd(o,e),c={summary:this.getCalendarEventTitle(e),start:s,end:l};a.includeDescription&&(c.description=this.buildEventDescription(e)),a.eventColorId&&(c.colorId=a.eventColorId);let d;a.syncTrigger==="scheduled"||a.syncTrigger==="both"&&e.scheduled?d="scheduled":d="due";let u=this.convertTaskRemindersToGoogleFormat(e,r,d),p=this.getDefaultReminderOverrides();if(u&&u.length>0?c.reminders={useDefault:!1,overrides:u}:p.length>0&&(a.createAsAllDay||i.isAllDay?c.reminders={useDefault:!0}:c.reminders={useDefault:!1,overrides:p}),this.shouldSyncAsRecurring(e)&&e.recurrence){let m=d8(e.recurrence,{completedInstances:e.complete_instances,skippedInstances:e.skipped_instances,additionalExcludedDates:this.getAdditionalRecurringExdates(e)});if(m&&(c.recurrence=m.recurrence,m.dtstart)){if(a.createAsAllDay||!m.hasTime){c.start={date:m.dtstart};let f=new Date(m.dtstart+"T00:00:00");f.setDate(f.getDate()+1),c.end={date:D(f,"yyyy-MM-dd")}}else if(m.time){let f=`${m.dtstart}T${m.time}`,h=new Date(f);c.start={dateTime:D(h,"yyyy-MM-dd'T'HH:mm:ssxxx"),timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone};let g=e.timeEstimate||a.defaultEventDuration,v=new Date(h.getTime()+g*60*1e3);c.end={dateTime:D(v,"yyyy-MM-dd'T'HH:mm:ssxxx"),timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}}}else t&&(c.recurrence=[]);return c}async createCalendarEventForTask(e,t,r,a){let i=await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(a),this.googleCalendarService.createEvent(r,{...t,isAllDay:!!t.start.date},a))),s=`google-${r}-`,o=i.id.startsWith(s)?i.id.slice(s.length):i.id;try{await this.saveTaskEventId(e.path,o,r,a)}catch(l){throw await this.queueCalendarDeletion(e.path,r,o,l),l}return o}shouldCreateDetachedRecurringException(e){if(!this.shouldSyncAsRecurring(e))return!1;let t=re(e.scheduled||""),r=re(e.googleCalendarExceptionOriginalScheduled||"");return!!(t&&r&&t!==r)}buildRecurringExceptionEvent(e){if(!e.scheduled)return null;let t=this.plugin.settings.googleCalendarExport,r=this.parseDateForEvent(e.scheduled),a;if(t.createAsAllDay&&!r.isAllDay){let c=new Date(e.scheduled);a={date:D(c,"yyyy-MM-dd")}}else r.isAllDay?a={date:r.date}:a={dateTime:r.dateTime,timeZone:r.timeZone};let i={...r,isAllDay:t.createAsAllDay||r.isAllDay,date:a.date,dateTime:a.dateTime},s=this.getEventEnd(i,e),o={summary:this.getCalendarEventTitle(e),start:a,end:s};t.includeDescription&&(o.description=this.buildEventDescription(e)),t.eventColorId&&(o.colorId=t.eventColorId);let l=this.convertTaskRemindersToGoogleFormat(e,e.scheduled,"scheduled");return l&&l.length>0&&(o.reminders={useDefault:!1,overrides:l}),o}async syncRecurringExceptionEvent(e,t,r){let a=this.shouldCreateDetachedRecurringException(e),i=this.getTaskExceptionEventId(e);if(!a){if(i&&!await this.deleteOrQueueCalendarEvent(e.path,t,i,r))throw new Error(`Failed to delete detached recurring exception event: ${e.path}`);await this.saveTaskExceptionMetadata(e.path,{googleCalendarExceptionEventId:void 0,googleCalendarExceptionOriginalScheduled:void 0},t,r);return}let s=this.buildRecurringExceptionEvent(e);if(!s)return;if(i)try{await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(r),this.googleCalendarService.updateEvent(t,i,s,r)));return}catch(d){if(xP(d)!==404)throw d;await this.saveTaskExceptionMetadata(e.path,{googleCalendarExceptionEventId:void 0},t,r)}let o=this.getTaskEventIdCacheKey(e.path,t),l=it.pendingExceptionEventCreates.get(o);if(l){let d=await l;await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(r),this.googleCalendarService.updateEvent(t,d,s,r)));return}let c=this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(r),this.googleCalendarService.createEvent(t,{...s,isAllDay:!!s.start.date},r))).then(async d=>{let u=`google-${t}-`,p=d.id.startsWith(u)?d.id.slice(u.length):d.id;try{await this.saveTaskExceptionMetadata(e.path,{googleCalendarExceptionEventId:p,googleCalendarExceptionOriginalScheduled:re(e.googleCalendarExceptionOriginalScheduled||"")},t,r)}catch(m){throw await this.queueCalendarDeletion(e.path,t,p,m),m}return p});it.pendingExceptionEventCreates.set(o,c);try{await c}finally{it.pendingExceptionEventCreates.get(o)===c&&it.pendingExceptionEventCreates.delete(o)}}async syncTaskToCalendar(e,t,r={}){var c,d;let a=(c=r.queueOnFailure)!=null?c:!0,i=(d=r.connectionGeneration)!=null?d:this.getConnectionGeneration();if(!this.isTaskCalendarEligible(e))return!0;let s=this.plugin.settings.googleCalendarExport,o=this.getTaskEventId(e),l=s.targetCalendarId;try{if(!this.isEnabled())return a&&s.enabled&&await this.queueTaskSync(e.path,new Error("Google Calendar sync is not ready")),!1;let u=!!(t!=null&&t.recurrence&&!e.recurrence),p=this.taskToCalendarEvent(e,u);if(!p)return wr.warn("[TaskCalendarSync] Could not convert task to event:",{category:"provider",operation:"convert-task-event",details:{value:e.path}}),!1;if(!l)return wr.warn("[TaskCalendarSync] Cannot sync task without target calendar:",{category:"provider",operation:"sync-task-without-target-calendar",details:{value:e.path}}),a&&await this.queueTaskSync(e.path,new Error("Google Calendar target calendar is not configured")),!1;if(o)await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(i),this.googleCalendarService.updateEvent(l,o,p,i)));else{let m=this.getTaskEventIdCacheKey(e.path,l),f=it.pendingEventCreates.get(m);if(f){let h=await f;await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(i),this.googleCalendarService.updateEvent(l,h,p,i)))}else{let h=this.createCalendarEventForTask(e,p,l,i);it.pendingEventCreates.set(m,h);try{await h}finally{it.pendingEventCreates.get(m)===h&&it.pendingEventCreates.delete(m)}}}return(this.shouldSyncAsRecurring(e)||this.hasStoredRecurringExceptionMetadata(e))&&await this.syncRecurringExceptionEvent(e,l,i),await this.assertConnectionGenerationCurrent(i),await this.recordCalendarSyncFingerprint(e),!0}catch(u){if(u instanceof id)return a&&s.enabled&&await this.queueTaskSync(e.path,u),!1;if(xP(u)===404&&o){await this.removeTaskEventId(e.path,i);let p=await this.plugin.cacheManager.getTaskInfo(e.path);if(p)return this.syncTaskToCalendar(p,t,{...r,connectionGeneration:i})}return wr.error("[TaskCalendarSync] Failed to sync task:",{category:"provider",operation:"sync-task",details:{value:e.path},error:u}),a&&await this.queueTaskSync(e.path,u,!0),u instanceof Oh?ve(this.plugin.emitter,this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.connectionExpired")):ve(this.plugin.emitter,this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.syncFailed",{message:CP(u)})),!1}}async updateTaskInCalendar(e,t){if(!this.plugin.settings.googleCalendarExport.syncOnTaskUpdate)return;let r=e.path;t&&this.previousTaskState.set(r,t);let a=this.pendingSyncs.get(r);return a&&window.clearTimeout(a),this.pendingTasks.set(r,e),new Promise((i,s)=>{let o=window.setTimeout(()=>{(async()=>{this.pendingSyncs.delete(r);let l=this.inFlightSyncs.get(r);l&&await l.catch(()=>{});let c=this.pendingTasks.get(r);this.pendingTasks.delete(r);let d=c||await this.plugin.cacheManager.getTaskInfo(r);if(!d){i();return}let u=this.executeTaskUpdate(d);this.inFlightSyncs.set(r,u);try{await u,i()}catch(p){s(p instanceof Error?p:new Error(String(p)))}finally{this.inFlightSyncs.delete(r)}})()},Vct);this.pendingSyncs.set(r,o)})}cancelPendingTaskUpdate(e){let t=this.pendingSyncs.get(e);t&&(window.clearTimeout(t),this.pendingSyncs.delete(e),this.pendingTasks.delete(e))}async waitForInFlightTaskSync(e){let t=this.inFlightSyncs.get(e);t&&await t.catch(()=>{})}async executeTaskUpdate(e,t){let r=this.getTaskEventId(e);if(!this.isTaskCalendarEligible(e)){(r||this.hasStoredRecurringExceptionMetadata(e))&&(await this.deleteTaskFromCalendar(e)?await this.removeCalendarSyncFingerprint(e.path):wr.warn(`Google Calendar deletion queued for ${e.path}`,{category:"provider",operation:"google-calendar-deletion-queued"})),this.previousTaskState.delete(e.path);return}let a=t||this.previousTaskState.get(e.path);await this.syncTaskToCalendar(e,a)&&this.previousTaskState.set(e.path,e)}async completeTaskInCalendar(e){if(!this.plugin.settings.googleCalendarExport.syncOnTaskComplete)return;let t=this.getConnectionGeneration();this.cancelPendingTaskUpdate(e.path),await this.waitForInFlightTaskSync(e.path);let r=this.executeTaskCompletion(e,t);this.inFlightSyncs.set(e.path,r);try{await r&&(await this.assertConnectionGenerationCurrent(t),await this.recordCalendarSyncFingerprint(e))}finally{this.inFlightSyncs.get(e.path)===r&&this.inFlightSyncs.delete(e.path)}}async executeTaskCompletion(e,t){let r=this.plugin.settings.googleCalendarExport,a=this.getTaskEventId(e);if(!a&&(!await this.syncTaskToCalendar(e,void 0,{connectionGeneration:t})||(a=this.getTaskEventId(e),!a)))return!1;if(this.shouldSyncAsRecurring(e))return await this.updateRecurringEventExdates(e,t),!0;try{let i=r.includeDescription?this.buildEventDescription(e):void 0;return await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(t),this.googleCalendarService.updateEvent(r.targetCalendarId,a,{summary:this.getCalendarEventTitle(e),description:i},t))),await this.assertConnectionGenerationCurrent(t),!0}catch(i){return i instanceof id?(await this.queueTaskSync(e.path,i),!1):xP(i)===404?(await this.removeTaskEventId(e.path,t),!1):(wr.error("[TaskCalendarSync] Failed to update completed task:",{category:"provider",operation:"update-completed-task",details:{value:e.path},error:i}),!1)}}async updateRecurringEventExdates(e,t){if(!this.shouldSyncAsRecurring(e)||!e.recurrence)return;let r=this.plugin.settings.googleCalendarExport,a=this.getTaskEventId(e);if(a)try{let i=d8(e.recurrence,{completedInstances:e.complete_instances,skippedInstances:e.skipped_instances,additionalExcludedDates:this.getAdditionalRecurringExdates(e)});if(i){let s=r.includeDescription?this.buildEventDescription(e):void 0;await this.withGoogleRateLimit(async()=>(await this.assertConnectionGenerationCurrent(t),this.googleCalendarService.updateEvent(r.targetCalendarId,a,{summary:this.getCalendarEventTitle(e),description:s,recurrence:i.recurrence},t))),await this.syncRecurringExceptionEvent(e,r.targetCalendarId,t)}}catch(i){if(i instanceof id){await this.queueTaskSync(e.path,i);return}if(xP(i)===404){await this.removeTaskEventId(e.path,t);return}wr.error("[TaskCalendarSync] Failed to update recurring event EXDATEs:",{category:"provider",operation:"update-recurring-event-exdates",details:{value:e.path},error:i}),await this.syncTaskToCalendar(e,void 0,{connectionGeneration:t})}}async deleteTaskFromCalendar(e){if(!this.plugin.settings.googleCalendarExport.syncOnTaskDelete)return!0;let t=this.getConnectionGeneration(),r=this.plugin.settings.googleCalendarExport,a=this.getTaskEventId(e),i=this.getTaskExceptionEventId(e);if(!a&&!this.hasStoredRecurringExceptionMetadata(e))return!0;let s=r.targetCalendarId;if(!s)return wr.warn("[TaskCalendarSync] Cannot delete task event without target calendar:",{category:"provider",operation:"delete-task-event-without-target-calendar",details:{value:e.path}}),!1;for(let o of[a,i]){if(!o)continue;if(!await this.deleteOrQueueCalendarEvent(e.path,s,o,t))return!1}try{return await this.clearTaskGoogleCalendarMetadata(e.path,t),await this.assertConnectionGenerationCurrent(t),await this.removeCalendarSyncFingerprint(e.path),!0}catch(o){if(o instanceof id)return!1;throw o}}async deleteTaskFromCalendarByPath(e,t,...r){if(!this.plugin.settings.googleCalendarExport.syncOnTaskDelete)return!0;let a=this.getConnectionGeneration(),i=this.plugin.settings.googleCalendarExport,s=[t,...r].filter(c=>typeof c=="string"&&c.length>0);if(s.length===0)return!0;let o=i.targetCalendarId;if(!o)return wr.warn("[TaskCalendarSync] Cannot delete task events without target calendar:",{category:"provider",operation:"delete-task-events-without-target-calendar",details:{value:e}}),!1;let l=[];for(let c of s){let d=await this.deleteOrQueueCalendarEvent(e,o,c,a);d&&await this.removeEventIndexForEvent(o,c),l.push(d)}return await this.removeCalendarSyncFingerprint(e),l.every(Boolean)}async syncAllTasks(){let e={synced:0,failed:0,skipped:0};if(!this.isEnabled())return ve(this.plugin.emitter,this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.notEnabledOrConfigured")),e;let t=await this.plugin.cacheManager.getAllTasks(),r=t.filter(i=>this.shouldSyncTask(i)?!0:(e.skipped++,!1)),a=t.length;return ve(this.plugin.emitter,this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.syncingTasks",{total:a})),await this.processInParallel(r,async i=>{try{await this.syncTaskToCalendar(i)?e.synced++:e.failed++}catch(s){e.failed++,wr.error(`[TaskCalendarSync] Failed to sync task ${i.path}:`,{category:"provider",operation:"sync-task",error:s})}}),ve(this.plugin.emitter,this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.syncComplete",{synced:e.synced,failed:e.failed,skipped:e.skipped})),e}async unlinkAllTasks(e=!1){let t=this.plugin.settings.googleCalendarExport,r=await this.plugin.cacheManager.getAllTasks(),a=0;for(let i of r){let s=e?this.getConnectionGeneration():void 0;if(!(!i.googleCalendarEventId&&!this.hasStoredRecurringExceptionMetadata(i))){if(e){let o=t.targetCalendarId;if(!o){wr.warn(`[TaskCalendarSync] Cannot delete event without target calendar for ${i.path}`,{category:"provider",operation:"delete-event-without-target-calendar"});continue}let l=!0;for(let c of[i.googleCalendarEventId,this.getTaskExceptionEventId(i)]){if(!c)continue;await this.deleteOrQueueCalendarEvent(i.path,o,c,s)||(l=!1)}if(!l){wr.warn(`[TaskCalendarSync] Event deletion queued; keeping links for ${i.path}`,{category:"provider",operation:"event-deletion-queued-keeping-link"});continue}}try{await this.clearTaskGoogleCalendarMetadata(i.path,s),await this.removeCalendarSyncFingerprint(i.path),a++}catch(o){if(o instanceof id){await this.queueTaskSync(i.path,o);continue}throw o}}}ve(this.plugin.emitter,e?this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.eventsDeletedAndUnlinked",{count:a}):this.plugin.i18n.translate("settings.integrations.googleCalendarExport.notices.tasksUnlinked",{count:a}))}};it.pendingEventCreates=new Map,it.pendingExceptionEventCreates=new Map,it.taskEventIdCache=new Map,it.taskExceptionEventIdCache=new Map,it.googleCalendarFrontmatterWrites=new Map,it.googleCalendarDeletionQueueWrite=Promise.resolve();p8=it});var WO,MRe,Yct,ea,m8=y(()=>{ny();xe();q();WO=M({tag:"Utils/TasksPluginParser"}),MRe={monday:"MO",tuesday:"TU",wednesday:"WE",thursday:"TH",friday:"FR",saturday:"SA",sunday:"SU"},Yct={"🔺":"highest","⏫":"high","🔼":"medium","🔽":"low","⏬":"lowest",highest:"highest",high:"high",medium:"medium",normal:"normal",none:"none",low:"low",lowest:"lowest"},ea=class{static stripBlockquoteMarkers(e){let t=e.trim();for(;/^>\s*/.test(t);)t=t.replace(/^>\s*/,"");return t}static parseTaskLine(e){if(typeof e!="string")return{isTaskLine:!1,originalText:"",error:"Invalid input: line must be a string"};if(e.length>2e3)return{isTaskLine:!1,originalText:e,error:"Line too long to process safely"};let r=this.stripBlockquoteMarkers(e).match(this.CHECKBOX_PATTERN);if(!r)return{isTaskLine:!1,originalText:e};try{let[,,a,,i]=r;if(typeof a!="string"||typeof i!="string")return{isTaskLine:!0,originalText:e,error:"Invalid checkbox format"};let s=a.toLowerCase()==="x",o=this.parseTaskContent(i,s);return!o||!o.title||o.title.trim().length===0?{isTaskLine:!0,originalText:e,error:"Task must have a title"}:{isTaskLine:!0,originalText:e,parsedData:o}}catch(a){return{isTaskLine:!0,originalText:e,error:`Failed to parse task: ${a instanceof Error?a.message:"Unknown error"}`}}}static parseTaskContent(e,t){if(typeof e!="string")throw new Error("Content must be a string");if(e.length>1e3)throw new Error("Content too long to process safely");try{let r={line:e.trim(),parsed:{}},a=this.consumeBlockLink(r);a&&(r.parsed.blockLink=a),this.consumeTrailingFields(r);let i=this.extractTags(e),s=this.extractContexts(e),o=this.extractCleanTitle(r.line),l;if(t||r.parsed.doneDate)l="done";else if(r.parsed.startDate)try{l=!Hz(r.parsed.startDate)&&!_b(r.parsed.startDate)?"scheduled":"open"}catch(c){}return{title:o.trim()||"Untitled Task",status:l,priority:r.parsed.priority,dueDate:r.parsed.dueDate,scheduledDate:r.parsed.scheduledDate,startDate:r.parsed.startDate,createdDate:r.parsed.createdDate,doneDate:r.parsed.doneDate,recurrence:r.parsed.recurrence,recurrenceAnchor:r.parsed.recurrenceAnchor,recurrenceData:r.parsed.recurrenceData,tags:i.length>0?i:void 0,contexts:s.length>0?s:void 0,projects:void 0,isCompleted:t,userFields:r.parsed.userFields,customFrontmatter:r.parsed.customFrontmatter,details:r.parsed.details,blockLink:r.parsed.blockLink,taskPluginId:r.parsed.taskPluginId,dependsOn:r.parsed.dependsOn,onCompletion:r.parsed.onCompletion}}catch(r){throw new Error(`Failed to parse task content: ${r instanceof Error?r.message:"Unknown error"}`)}}static consumeTrailingFields(e){let t=0,r=!1;do r=this.consumeDataviewField(e)||this.consumeEmojiField(e)||this.consumeTrailingTagOrContext(e),t++;while(r&&t<=50)}static consumeBlockLink(e){let t=e.line.match(this.BLOCK_LINK_PATTERN);if(t!=null&&t[1])return e.line=e.line.replace(this.BLOCK_LINK_PATTERN,"").trim(),t[1]}static consumeTrailingTagOrContext(e){return this.TRAILING_TAG_OR_CONTEXT_PATTERN.test(e.line)?(e.line=e.line.replace(this.TRAILING_TAG_OR_CONTEXT_PATTERN,"").trim(),!0):!1}static consumeEmojiField(e){return[()=>this.consumeEmojiDateField(e,/(?:📅|📆|🗓)\uFE0F?\s*(\d{4}-\d{2}-\d{2})\s*$/u,"dueDate"),()=>this.consumeEmojiDateField(e,/(?:⏳|⌛)\uFE0F?\s*(\d{4}-\d{2}-\d{2})\s*$/u,"scheduledDate"),()=>this.consumeEmojiDateField(e,/🛫\uFE0F?\s*(\d{4}-\d{2}-\d{2})\s*$/u,"startDate"),()=>this.consumeEmojiDateField(e,/➕\uFE0F?\s*(\d{4}-\d{2}-\d{2})\s*$/u,"createdDate"),()=>this.consumeEmojiDateField(e,/✅\uFE0F?\s*(\d{4}-\d{2}-\d{2})\s*$/u,"doneDate"),()=>this.consumePriorityField(e,/(🔺|⏫|🔼|🔽|⏬)\uFE0F?\s*$/u),()=>this.consumeRecurrenceField(e,/🔁\uFE0F?\s*([a-zA-Z0-9, !]+?)\s*$/u),()=>this.consumeOnCompletionField(e,/🏁\uFE0F?\s*([a-zA-Z]+)\s*$/u),()=>this.consumeTaskPluginIdField(e,/🆔\uFE0F?\s*([A-Za-z0-9_-]+)\s*$/u),()=>this.consumeDependsOnField(e,/⛔\uFE0F?\s*([A-Za-z0-9_ -]+(?:\s*,\s*[A-Za-z0-9_-]+)*)\s*$/u)].some(r=>r())}static consumeEmojiDateField(e,t,r){return this.consumeField(e,t,a=>{let i=this.normalizeDate(a[1]);i&&(e.parsed[r]=i)})}static consumePriorityField(e,t){return this.consumeField(e,t,r=>{e.parsed.priority=this.normalizePriority(r[1])})}static consumeRecurrenceField(e,t){return this.consumeField(e,t,r=>{Object.assign(e.parsed,this.parseRecurrence(r[1]))})}static consumeOnCompletionField(e,t){return this.consumeField(e,t,r=>{var i;let a=(i=r[1])==null?void 0:i.trim().toLowerCase();(a==="keep"||a==="delete")&&(e.parsed.onCompletion=a)})}static consumeTaskPluginIdField(e,t){return this.consumeField(e,t,r=>{var a;e.parsed.taskPluginId=(a=r[1])==null?void 0:a.trim()})}static consumeDependsOnField(e,t){return this.consumeField(e,t,r=>{let a=this.parseTaskIdList(r[1]);a.length>0&&(e.parsed.dependsOn=a)})}static consumeDataviewField(e){let t=e.line.match(this.DATAVIEW_FIELD_AT_END_PATTERN);if(!t)return!1;let[,r,a,i,s]=t;return r==="["&&s!=="]"||r==="("&&s!==")"?!1:(this.applyDataviewField(e,a,i.trim()),e.line=e.line.replace(this.DATAVIEW_FIELD_AT_END_PATTERN,"").trim(),!0)}static applyDataviewField(e,t,r){switch(t.trim().toLowerCase()){case"priority":e.parsed.priority=this.normalizePriority(r);return;case"start":this.assignDateField(e,"startDate",r);return;case"created":this.assignDateField(e,"createdDate",r);return;case"scheduled":this.assignDateField(e,"scheduledDate",r);return;case"due":this.assignDateField(e,"dueDate",r);return;case"completion":case"done":this.assignDateField(e,"doneDate",r);return;case"repeat":Object.assign(e.parsed,this.parseRecurrence(r));return;case"oncompletion":(r.toLowerCase()==="keep"||r.toLowerCase()==="delete")&&(e.parsed.onCompletion=r.toLowerCase());return;case"id":e.parsed.taskPluginId=r;return;case"dependson":{let i=this.parseTaskIdList(r);i.length>0&&(e.parsed.dependsOn=i);return}case"summary":case"description":case"details":this.appendDetails(e,r);return;default:this.assignCustomFrontmatter(e,t,r)}}static assignDateField(e,t,r){let a=this.normalizeDate(r);a&&(e.parsed[t]=a)}static consumeField(e,t,r){let a=e.line.match(t);return a?(r(a),e.line=e.line.replace(t,"").trim(),!0):!1}static parseTaskIdList(e){return e.split(",").map(t=>t.trim()).filter(t=>/^[A-Za-z0-9_-]+$/.test(t))}static assignCustomFrontmatter(e,t,r){if(!t.trim())return;let a=e.parsed.customFrontmatter||{},i=a[t];i===void 0?a[t]=r:Array.isArray(i)?a[t]=[...i,r]:a[t]=[i,r],e.parsed.customFrontmatter=a}static appendDetails(e,t){t.trim()&&(e.parsed.details=e.parsed.details?`${e.parsed.details}
${t.trim()}`:t.trim())}static normalizeDate(e){if(!e)return;let t=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))try{let r=st(t);if(isNaN(r.getTime()))return;let a=r.getUTCFullYear();return a<1900||a>2100?void 0:ae(r)}catch(r){return}}static normalizePriority(e){if(!e)return;let t=e.trim().toLowerCase();return Yct[t]||t||void 0}static parseRecurrence(e){let t=e==null?void 0:e.trim();if(!t)return{};let a=t.match(/\s+when\s+done$/iu)?"completion":void 0,i=t.replace(/\s+when\s+done$/iu,"").trim(),o=this.normalizeExistingRRule(i)||this.parseTextToRRule(i)||this.parseSimpleRecurrence(i);return o?{recurrence:o,recurrenceAnchor:a,recurrenceData:this.buildRecurrenceData(o,t)}:{recurrenceData:{frequency:"custom",raw:t}}}static normalizeExistingRRule(e){let t=e.trim().replace(/^RRULE:/iu,"");if(/^(DTSTART:[^;]+;)?FREQ=/iu.test(t))return t.toUpperCase()}static parseTextToRRule(e){try{let t=ye.parseText(e);return t?new ye(t).toString().replace(/^RRULE:/u,""):void 0}catch(t){return}}static parseSimpleRecurrence(e){let t=e.trim().toLowerCase(),r=t.match(/^every\s+(\d+)\s+(day|week|month|year)s?$/u);if(r)return`FREQ=${this.frequencyFromText(r[2])};INTERVAL=${r[1]}`;let a=t.match(/^every\s+((?:monday|tuesday|wednesday|thursday|friday|saturday|sunday)(?:\s*(?:,|and)\s*(?:monday|tuesday|wednesday|thursday|friday|saturday|sunday))*)$/u);if(a){let s=a[1].split(/\s*(?:,|and)\s*/u).map(o=>MRe[o]).filter(Boolean);if(s.length>0)return`FREQ=WEEKLY;BYDAY=${s.join(",")}`}let i=t.match(/^every\s+week\s+on\s+((?:monday|tuesday|wednesday|thursday|friday|saturday|sunday)(?:\s*(?:,|and)\s*(?:monday|tuesday|wednesday|thursday|friday|saturday|sunday))*)$/u);if(i){let s=i[1].split(/\s*(?:,|and)\s*/u).map(o=>MRe[o]).filter(Boolean);if(s.length>0)return`FREQ=WEEKLY;BYDAY=${s.join(",")}`}switch(t){case"daily":case"every day":return"FREQ=DAILY";case"weekly":case"every week":return"FREQ=WEEKLY";case"monthly":case"every month":return"FREQ=MONTHLY";case"yearly":case"annually":case"every year":return"FREQ=YEARLY";default:return}}static frequencyFromText(e){switch(e){case"day":return"DAILY";case"week":return"WEEKLY";case"month":return"MONTHLY";case"year":return"YEARLY";default:return"DAILY"}}static buildRecurrenceData(e,t){var o,l;let r=e.match(/(?:^|;)FREQ=([^;]+)/u),a=e.match(/(?:^|;)BYDAY=([^;]+)/u),i=e.match(/(?:^|;)BYMONTHDAY=(\d+)/u),s=e.match(/(?:^|;)BYMONTH=(\d+)/u);return{frequency:((o=r==null?void 0:r[1])==null?void 0:o.toLowerCase())||"custom",days_of_week:(l=a==null?void 0:a[1])==null?void 0:l.split(","),day_of_month:i?Number(i[1]):void 0,month_of_year:s?Number(s[1]):void 0,raw:t}}static extractTags(e){if(typeof e!="string")return[];try{let t=new RegExp(this.TAG_PATTERN.source,this.TAG_PATTERN.flags),r=[],a;for(;(a=t.exec(e))!==null;)if(a[0]){let i=a[0].substring(1);i&&!r.includes(i)&&r.push(i)}return r}catch(t){return WO.debug("Error extracting tags:",{category:"validation",operation:"extracting-tags",error:t}),[]}}static extractContexts(e){if(typeof e!="string")return[];try{let t=new RegExp(this.CONTEXT_PATTERN.source,this.CONTEXT_PATTERN.flags),r=[],a;for(;(a=t.exec(e))!==null;)if(a[0]){let i=a[0].substring(1);i&&!r.includes(i)&&r.push(i)}return r}catch(t){return WO.debug("Error extracting contexts:",{category:"validation",operation:"extracting-contexts",error:t}),[]}}static extractCleanTitle(e){if(typeof e!="string")return"";try{let t=e;t=t.replace(this.TAG_PATTERN,""),t=t.replace(this.CONTEXT_PATTERN,""),t=t.replace(this.DATAVIEW_FIELD_ANY_PATTERN,"");let r=t.replace(/\s+/g," ").trim();return r.length===0?"Untitled Task":r}catch(t){return WO.debug("Error extracting clean title:",{category:"validation",operation:"extracting-clean-title",error:t}),"Untitled Task"}}static isTasksPluginFormat(e){if(typeof e!="string"||e.length>1e3)return!1;try{let r=this.stripBlockquoteMarkers(e).match(this.CHECKBOX_PATTERN);if(!r)return!1;let a=r[4]||"";return this.hasTasksPluginMetadata(a)}catch(t){return WO.debug("Error validating Tasks plugin format:",{category:"validation",operation:"validating-tasks-plugin-format",error:t}),!1}}static hasTasksPluginMetadata(e){return/(?:📅|📆|🗓|⏳|⌛|🛫|➕|✅|🔺|⏫|🔼|🔽|⏬|🔁|🏁|🆔|⛔)/u.test(e)||this.DATAVIEW_FIELD_ANY_PATTERN.test(e)}static getSummary(e){let t=[];return t.push(`Title: "${e.title}"`),t.push(`Status: ${e.status}`),t.push(`Priority: ${e.priority}`),e.dueDate&&t.push(`Due: ${e.dueDate}`),e.startDate&&t.push(`Start: ${e.startDate}`),e.scheduledDate&&t.push(`Scheduled: ${e.scheduledDate}`),e.createdDate&&t.push(`Created: ${e.createdDate}`),e.doneDate&&t.push(`Done: ${e.doneDate}`),e.recurrence&&t.push(`Recurrence: ${e.recurrence}`),e.tags&&e.tags.length>0&&t.push(`Tags: ${e.tags.map(r=>"#"+r).join(", ")}`),e.projects&&e.projects.length>0&&t.push(`Projects: ${e.projects.map(r=>r.includes(" ")?`+[[${r}]]`:`+${r}`).join(", ")}`),t.join(" | ")}};ea.CHECKBOX_PATTERN=/^(\s*(?:[-*+]|\d+\.)\s+\[)([ xX])(\]\s+)(.*)/u,ea.TAG_PATTERN=/#[\p{L}\p{N}\p{M}_/-]+/gu,ea.CONTEXT_PATTERN=/@[\p{L}\p{N}\p{M}_/-]+/gu,ea.BLOCK_LINK_PATTERN=/\s(\^[a-zA-Z0-9-]+)\s*$/u,ea.TRAILING_TAG_OR_CONTEXT_PATTERN=/(?:^|\s)(#[\p{L}\p{N}\p{M}_/-]+|@[\p{L}\p{N}\p{M}_/-]+)\s*$/u,ea.DATAVIEW_FIELD_AT_END_PATTERN=/(?:^|\s)(\[|\()\s*([A-Za-z][A-Za-z0-9_-]*)::\s*([^\])]*?)\s*(\]|\))\s*,?\s*$/u,ea.DATAVIEW_FIELD_ANY_PATTERN=/(\[|\()\s*[A-Za-z][A-Za-z0-9_-]*::\s*[^\])]*?\s*(\]|\))/u});function Kct(n){var t;let e=n.includes("|")&&n.split("|").pop()||n;return((t=e.split("/").pop())==null?void 0:t.replace(/\.md$/i,""))||e}function qT(n){let e=n;for(let t=0;t<4;t++){let r=e;if(e=e.replace(/\[\[([^[\]]+)\]\]/g,(a,i)=>Kct(String(i)).trim()),e=e.replace(/\[([^\]]+)\]\((<[^>]+>|[^)]+)\)/g,(a,i)=>String(i).trim()),e===r)break}return e.replace(/\s+/g," ").trim()}function f8(n){if(n.startsWith("[[")&&n.endsWith("]]")){let e=n.slice(2,-2),t=e.indexOf("|");if(t===-1)return n;let r=e.slice(0,t),a=e.slice(t+1),i=qT(a);return i?`[[${r}|${i}]]`:`[[${r}]]`}if(n.startsWith("[")&&n.endsWith(")")){let e=n.lastIndexOf("](");if(e<=0)return n;let t=n.slice(1,e),r=n.slice(e+2,-1),a=qT(t);return a?`[${a}](${r})`:n}return n}var h8=y(()=>{});var RRe={};Xe(RRe,{InstantTaskConvertService:()=>g8,extractProjectFromHeadingText:()=>NRe,findClosestHeadingAboveLine:()=>IRe});function IRe(n,e){if(!n||!Number.isInteger(e)||e<0)return null;let t=null;for(let r of n)r.position.start.line>=e||(!t||r.position.start.line>t.position.start.line)&&(t=r);return t}function NRe(n){let e=n.trim();if(!e)return null;let t=e.match(/\[\[([^[\]]+)\]\]/);if(t)return`[[${t[1].trim()}]]`;let r=e.match(/\[[^\]]+\]\(([^)]+)\)/);return r?r[0].trim():/^\d{4}(?:-\d{2}){0,2}$/.test(e)?null:e}function Zct(n){var a;let e=((a=n.match(/^(\s*)/))==null?void 0:a[1])||"",t=n.slice(e.length),r="";for(;/^>\s*/.test(t);){let i=t.match(/^(>\s*)/);if(!i)break;r+=i[1],t=t.slice(i[1].length)}return{leadingWhitespace:e,blockquotePrefix:r,content:t}}var ri,g8,_Re=y(()=>{m8();Wl();xe();yt();PR();Ku();kv();q();h8();Oi();ya();ri=M({tag:"Services/InstantTaskConvertService"});g8=class{constructor(e,t,r){this.inFlightConversions=new WeakMap;this.plugin=e,this.statusManager=t,this.priorityManager=r,this.nlParser=Nn.fromPlugin(e)}translate(e,t){return this.plugin.i18n.translate(e,t)}async batchConvertAllTasks(e){try{let t=this.findAllCheckboxTasks(e);if(t.length===0){ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.noCheckboxTasks"));return}let r=t.length===1?"":"s";ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.convertingTasks",{count:t.length,plural:r}));let a=await this.batchConvertTasksOptimized(e,t);if(a.failures.length===0){let i=a.successCount===1?"":"s";ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.conversionSuccess",{count:a.successCount,plural:i}))}else{let i=a.successCount===1?"":"s";ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.partialConversion",{successCount:a.successCount,successPlural:i,failureCount:a.failures.length})),ri.warn("Batch conversion failures:",{category:"configuration",operation:"batch-conversion-failures",details:{value:a.failures}})}}catch(t){ri.error("Error during batch task conversion:",{category:"configuration",operation:"batch-task-conversion",error:t}),ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.batchConversionFailed"))}}async batchConvertTasksOptimized(e,t){let r=[],a=[],i=t.map(async o=>{try{let l=await this.parseTaskForBatch(o.line);if(!l)throw new Error("Failed to parse task");let c=await this.createTaskFile(l,"",o.lineNumber),d=this.generateLinkText(o.line,c);return{lineNumber:o.lineNumber,line:o.line,file:c,linkText:d}}catch(l){return r.push({lineNumber:o.lineNumber+1,error:l instanceof Error?l.message:String(l)}),null}}),s=await Promise.all(i);for(let o of s)o&&a.push(o);return a.length>0&&this.replaceAllTaskLines(e,a),{successCount:a.length,failures:r}}async instantConvertTask(e,t){if(!e){await this.performInstantConversion(e,t);return}let r=this.inFlightConversions.get(e);r||(r=new Map,this.inFlightConversions.set(e,r));let a=r.get(t);if(a){await a;return}let i=this.performInstantConversion(e,t);r.set(t,i);try{await i}finally{r.get(t)===i&&r.delete(t)}}async performInstantConversion(e,t){var r,a,i,s;try{if(!this.validateInputParameters(e,t).isValid){ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.invalidParameters"));return}let l=this.extractSelectionInfo(e,t),c=l.taskLine,d=l.details,u,p=ea.parseTaskLine(c);if(p.isTaskLine){if(p.error||!p.parsedData){ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.parseError",{error:p.error||"No data extracted"}));return}if(this.plugin.settings.enableNaturalLanguageInput){let g=p.parsedData.title,v=d!=null&&d.trim()?`${g}
${d}`:g,k=this.nlParser.parseInput(v),T={title:((r=k.title)==null?void 0:r.trim())||g,isCompleted:k.isCompleted||!1,status:k.status,priority:k.priority,dueDate:k.dueDate,scheduledDate:k.scheduledDate,dueTime:k.dueTime,scheduledTime:k.scheduledTime,recurrence:k.recurrence,timeEstimate:k.estimate,tags:((a=k.tags)==null?void 0:a.length)>0?k.tags:void 0,projects:((i=k.projects)==null?void 0:i.length)>0?k.projects:void 0,contexts:((s=k.contexts)==null?void 0:s.length)>0?k.contexts:void 0,userFields:k.userFields};u=this.mergeParseResults(p.parsedData,T)}else u=p.parsedData}else{let g=this.extractLineContentAsTitle(c);if(!g.trim()){ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.emptyLine"));return}if(this.plugin.settings.enableNaturalLanguageInput){let v=this.tryNLPFallback(g,d||"");v?u=v:u={title:g,isCompleted:!1}}else u={title:g,isCompleted:!1}}if(!this.validateTaskData(u).isValid){ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.invalidTaskData"));return}let f=await this.createTaskFile(u,d,l.startLine);if(!(await this.replaceOriginalTaskLines(e,l,f,u.title)).success){ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.replaceLineFailed"));try{await this.plugin.app.fileManager.trashFile(f)}catch(g){ri.warn("Failed to clean up created file after replacement failure:",{category:"validation",operation:"clean-up-created-file-replacement",error:g})}return}await this.persistSourceNoteAfterReplacement(e),jM(this.plugin.settings,u.title,f.basename)?ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.conversionCompleteShortened",{title:u.title})):ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.conversionComplete",{title:u.title})),await this.refreshTaskLinkOverlays(e,f)}catch(o){ri.error("Error during instant task conversion:",{category:"configuration",operation:"instant-task-conversion",error:o}),o.message.includes("file already exists")?ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.fileExists")):ve(this.plugin.emitter,this.translate("services.instantTaskConvert.notices.conversionFailed"))}}extractSelectionInfo(e,t){let r=e.getSelection();if(r&&r.trim()){let i=e.listSelections()[0],s=Math.min(i.anchor.line,i.head.line),o=Math.max(i.anchor.line,i.head.line);if(t>=s&&t<=o){let l=[];for(let p=s;p<=o;p++)l.push(e.getLine(p));let c=l[0],u=l.slice(1).join(`
`).trimEnd();return{taskLine:c,details:u,startLine:s,endLine:o,originalContent:l}}}let a=e.getLine(t);return{taskLine:a,details:"",startLine:t,endLine:t,originalContent:[a]}}validateInputParameters(e,t){if(!e)return{isValid:!1,error:"Editor is not available."};let r=e.lineCount();if(t<0||t>=r)return{isValid:!1,error:`Line number ${t} is out of bounds (0-${r-1}).`};let a=e.getLine(t);return a==null?{isValid:!1,error:`Cannot read line ${t}.`}:{isValid:!0}}validateTaskData(e){if(!e.title||e.title.trim().length===0)return{isValid:!1,error:"Task title cannot be empty."};let t=["dueDate","scheduledDate","startDate","createdDate","doneDate"];for(let r of t){let a=e[r];if(a&&!this.isValidDateFormat(a))return{isValid:!1,error:`Invalid date format in ${r}: ${a}`}}return{isValid:!0}}isValidDateFormat(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;try{let r=st(e);return ae(r)===e}catch(r){return!1}}async createTaskFile(e,t="",r){var oe,X,de,Oe,Q;let a=((oe=e.title)==null?void 0:oe.trim())||"",i=this.extractTitleLinks(a),s=i.cleanTitle||a,o=this.sanitizeTitle(s)||"Untitled Task",c=[(X=e.details)==null?void 0:X.trim(),t].filter(Boolean).join(`
`),d=this.appendPreservedTitleLinks(c,i.links);if(s.length>200){let Z=this.extractOverflowText(s,200);Z&&(d=Z+(d?`
`+d:""))}let u=this.plugin.app.workspace.getActiveFile(),p=u?this.plugin.app.fileManager.generateMarkdownLink(u,u.path):"",m=this.sanitizeDate(e.dueDate),f=this.sanitizeDate(e.scheduledDate),h=((de=e.dueTime)==null?void 0:de.trim())||void 0,g=((Oe=e.scheduledTime)==null?void 0:Oe.trim())||void 0,v,k,T,b,w=[],S=this.plugin.settings.taskIdentificationMethod==="tag"?[this.plugin.settings.taskTag]:[],C,x,E=e.tags||[],_=e.contexts||[],F=e.projects||[];if(this.plugin.settings.useDefaultsOnInstantConvert){let Z=this.plugin.settings.taskCreationDefaults;if(v=(e.priority?this.sanitizePriority(e.priority):"")||this.plugin.settings.defaultTaskPriority,k=(e.status?this.sanitizeStatus(e.status):"")||this.plugin.settings.defaultTaskStatus,m?T=h?fa(m,h):m:Z.defaultDueDate!=="none"&&(T=Ol(Z.defaultDueDate,Z.defaultDueTime)),f?b=g?fa(f,g):f:Z.defaultScheduledDate!=="none"&&(b=Ol(Z.defaultScheduledDate,Z.defaultScheduledTime)),w=[],_.length>0&&w.push(..._),Z.defaultContexts){let Ue=Z.defaultContexts.split(",").map(le=>le.trim()).filter(le=>le);w.push(...Ue)}if(w=[...new Set(w)],S=this.plugin.settings.taskIdentificationMethod==="tag"?[this.plugin.settings.taskTag]:[],E.length>0&&S.push(...E),Z.defaultTags){let Ue=Z.defaultTags.split(",").map(le=>le.trim()).filter(le=>le);S.push(...Ue)}S=[...new Set(S)],e.timeEstimate!==void 0&&e.timeEstimate>0?C=e.timeEstimate:Z.defaultTimeEstimate&&Z.defaultTimeEstimate>0&&(C=Z.defaultTimeEstimate),e.recurrence?x=e.recurrence:Z.defaultRecurrence&&Z.defaultRecurrence!=="none"&&(x={daily:"FREQ=DAILY",weekly:"FREQ=WEEKLY",monthly:"FREQ=MONTHLY",yearly:"FREQ=YEARLY"}[Z.defaultRecurrence]||void 0)}else v=(e.priority?this.sanitizePriority(e.priority):"")||"none",k=(e.status?this.sanitizeStatus(e.status):"")||"none",T=m?h?fa(m,h):m:void 0,b=f?g?fa(f,g):f:void 0,w=[],_.length>0&&w.push(..._),S=this.plugin.settings.taskIdentificationMethod==="tag"?[this.plugin.settings.taskTag]:[],E.length>0&&S.push(...E),S=[...new Set(S)],C=e.timeEstimate,e.recurrence&&(x=e.recurrence);let I=[];if(this.plugin.settings.useDefaultsOnInstantConvert){let Z=this.plugin.settings.taskCreationDefaults;if(Z.defaultProjects){let Ue=ms(Z.defaultProjects);I.push(...Ue)}if(Z.useParentNoteAsProject&&u&&I.push(p),Z.useParentHeaderAsProject&&u){let Ue=this.getParentHeaderProject(u,r);Ue&&I.push(Ue)}}F.length>0&&I.push(...F);let A=[...new Set(I)],R;if(this.plugin.settings.useDefaultsOnInstantConvert){let Z=this.plugin.settings.taskCreationDefaults;if(Z.defaultReminders&&Z.defaultReminders.length>0){let{convertDefaultRemindersToReminders:Ue}=await Promise.resolve().then(()=>(BM(),lue));R=Ue(Z.defaultReminders)}}let O={...e.customFrontmatter||{}};if(e.userFields)for(let[Z,Ue]of Object.entries(e.userFields)){let le=(Q=this.plugin.settings.userFields)==null?void 0:Q.find(at=>at.id===Z);le?Array.isArray(Ue)?O[le.key]=Ue.join(", "):O[le.key]=Ue:ri.warn(`[InstantTaskConvert] No user field definition found for field ID: ${Z}`,{category:"validation",operation:"no-user-field-definition-found-field-id"})}let U={title:o,status:k,priority:v,due:T,scheduled:b,contexts:w.length>0?w:void 0,projects:A.length>0?A:void 0,tags:S,timeEstimate:C,recurrence:x,recurrence_anchor:e.recurrenceAnchor,reminders:R,details:d,parentNote:p,creationContext:"inline-conversion",dateCreated:qe(),dateModified:qe(),customFrontmatter:Object.keys(O).length>0?O:void 0},{file:pe}=await this.plugin.taskService.createTask(U);return pe}getParentHeaderProject(e,t){var s,o;if(t===void 0)return null;let r=(s=this.plugin.app.metadataCache.getFileCache(e))==null?void 0:s.headings,a=IRe(r,t);if(!a)return null;let i=NRe(a.heading);return i?(o=this.resolveProjectLinks([i])[0])!=null?o:i:null}extractTitleLinks(e){if(!e)return{cleanTitle:"",links:[]};let t=[],r=e.replace(/\[([^\]]+)\]\((<[^>]+>|[^)]+)\)/g,(i,s)=>(t.push(i),String(s).trim()));r=r.replace(/\[\[([^[\]]+)\]\]/g,i=>(t.push(i),qT(i)));let a=[...new Set(t)];return{cleanTitle:r.replace(/\s+/g," ").trim(),links:a}}appendPreservedTitleLinks(e,t){let r=t.filter(i=>!e.includes(i));if(r.length===0)return e;let a=["Source links:",...r.map(i=>`- ${i}`)].join(`
`);return e.trimEnd()?`${e.trimEnd()}
${a}`:a}sanitizeTitle(e){return e?e.trim().substring(0,200):""}extractOverflowText(e,t){if(!e||e.length<=t)return"";let r=e.lastIndexOf(" ",t);return r>0&&r>t-50?e.substring(r).trim():e.substring(t).trim()}sanitizePriority(e){let t=this.priorityManager.getAllPriorities().map(i=>i.value).filter(i=>i!=null);if(t.includes(e))return e;let a={highest:"high",medium:"normal",lowest:"low"}[e];return a&&t.includes(a)?a:""}sanitizeStatus(e){return this.statusManager.getAllStatuses().map(r=>r.value).filter(r=>r!=null).includes(e)?e:""}sanitizeDate(e){return!e||!this.isValidDateFormat(e)?"":e}async replaceOriginalTaskLines(e,t,r,a){try{if(!e||!r)return{success:!1,error:"Invalid editor or file reference."};let{startLine:i,endLine:s,originalContent:o}=t,l=e.lineCount();if(i<0||s>=l)return{success:!1,error:`Line range ${i}-${s} is no longer valid (current line count: ${l}).`};for(let k=0;k<o.length;k++)if(e.getLine(i+k)!==o[k])return{success:!1,error:"Content has changed since parsing. Please try again."};let c=ea.parseTaskLine(o[0]),d=c.isTaskLine;if(d&&!c.isTaskLine)return{success:!1,error:"First line is no longer a valid task."};if(!d&&!this.extractLineContentAsTitle(o[0]).trim())return{success:!1,error:"First line no longer contains valid content."};let u=this.plugin.app.workspace.getActiveFile(),p=(u==null?void 0:u.path)||"",m=f8(this.plugin.app.fileManager.generateMarkdownLink(r,p)),h=`${this.getReplacementPrefix(o[0],d)}${m}`;if(h.length>500)return{success:!1,error:"Generated link text is too long."};let g={line:i,ch:0},v={line:s,ch:e.getLine(s).length};return e.replaceRange(h,g,v),{success:!0}}catch(i){return ri.error("Error replacing task lines:",{category:"validation",operation:"replacing-task-lines",error:i}),{success:!1,error:`Failed to replace lines: ${i.message}`}}}getCheckboxReplacementPrefix(e){if(this.plugin.settings.preserveCheckboxOnConvert){let r=e.match(/^(\s*(?:[-*+]|\d+\.)\s+\[[^\]]\]\s*)/);return(r==null?void 0:r[1])||"- [ ] "}let t=e.match(/^(\s*(?:[-*+]|\d+\.)\s+)\[/);return(t==null?void 0:t[1])||"- "}getNonCheckboxReplacementPrefix(e){let t=e.match(/^(\s*[-*+]\s+)/),r=e.match(/^(\s*\d+\.\s+)/);return t?t[1]:r?r[1]:"- "}getReplacementPrefix(e,t){let{leadingWhitespace:r,blockquotePrefix:a,content:i}=Zct(e),s=t?this.getCheckboxReplacementPrefix(i):this.getNonCheckboxReplacementPrefix(i);return`${r}${a}${s}`}async refreshTaskLinkOverlays(e,t){try{await this.forceMetadataCacheUpdate(t),window.setTimeout(()=>{try{let r=e.cm;if(r){let a=e.getCursor();Qp(r,t.path),window.setTimeout(()=>{try{e.setCursor(a)}catch(i){ri.debug("Error restoring cursor position:",{category:"validation",operation:"restoring-cursor-position",error:i})}},10)}}catch(r){ri.debug("Error dispatching task update for overlays:",{category:"validation",operation:"dispatching-task-update-overlays",error:r})}},100)}catch(r){ri.debug("Error refreshing task link overlays:",{category:"stale-data",operation:"refreshing-task-link-overlays",error:r})}}async persistSourceNoteAfterReplacement(e){var i,s;let t=this.plugin.app.workspace,r=t.activeEditor,a=(r==null?void 0:r.editor)===e?r.file:(s=(i=t.getActiveFile)==null?void 0:i.call(t))!=null?s:null;if(!a)return null;try{await Gs(this.plugin.app,a,e.getValue()),this.plugin.notifyDataChanged(a.path,!1,!1)}catch(o){ri.debug("Error saving source note after instant task conversion:",{category:"configuration",operation:"saving-source-note-instant-task-conversion",error:o})}return a}async forceMetadataCacheUpdate(e){try{await this.plugin.app.vault.cachedRead(e),this.plugin.app.metadataCache.getFileCache(e)===null&&window.setTimeout(()=>{(async()=>{try{await this.plugin.app.vault.cachedRead(e)}catch(t){ri.debug("Error in delayed cache update:",{category:"stale-data",operation:"delayed-cache-update",error:t})}})()},10)}catch(t){ri.debug("Error forcing metadata cache update:",{category:"stale-data",operation:"forcing-metadata-cache-update",error:t})}}mergeParseResults(e,t){var s;if(!t)return e;let r=(o,l)=>{let c=[...o||[],...l||[]],d=[...new Set(c)];return d.length>0?d:void 0},a=(o,l)=>{if(!o&&!l)return;let c={...l||{},...o||{}};return Object.keys(c).length>0?c:void 0},i={...t.customFrontmatter||{},...e.customFrontmatter||{}};return{title:((s=t.title)==null?void 0:s.trim())||e.title,dueDate:e.dueDate||t.dueDate,scheduledDate:e.scheduledDate||t.scheduledDate,dueTime:e.dueTime||t.dueTime,scheduledTime:e.scheduledTime||t.scheduledTime,startDate:e.startDate,createdDate:e.createdDate,doneDate:e.doneDate,priority:e.priority||t.priority,status:e.status||t.status,recurrence:e.recurrence||t.recurrence,recurrenceAnchor:e.recurrenceAnchor,recurrenceData:e.recurrenceData,timeEstimate:e.timeEstimate||t.timeEstimate,tags:r(e.tags,t.tags),contexts:r(e.contexts,t.contexts),projects:r(e.projects,t.projects?this.resolveProjectLinks(t.projects):void 0),userFields:a(e.userFields,t.userFields),customFrontmatter:Object.keys(i).length>0?i:void 0,details:e.details||t.details,blockLink:e.blockLink,taskPluginId:e.taskPluginId,dependsOn:e.dependsOn,onCompletion:e.onCompletion,isCompleted:e.isCompleted}}tryNLPFallback(e,t){var r;try{let a=this.extractTaskContent(e);if(!a.trim())return null;let i=t.trim().length>0?`${a}
${t}`:a,s=this.nlParser.parseInput(i);return(r=s.title)!=null&&r.trim()?{title:s.title.trim(),isCompleted:s.isCompleted||!1,status:s.status,priority:s.priority,dueDate:s.dueDate,scheduledDate:s.scheduledDate,dueTime:s.dueTime,scheduledTime:s.scheduledTime,recurrence:s.recurrence,timeEstimate:s.estimate,tags:s.tags&&s.tags.length>0?s.tags:void 0,projects:s.projects&&s.projects.length>0?this.resolveProjectLinks(s.projects):void 0,contexts:s.contexts&&s.contexts.length>0?s.contexts:void 0,userFields:s.userFields,startDate:void 0,createdDate:void 0,doneDate:void 0,recurrenceData:void 0,recurrenceAnchor:void 0,customFrontmatter:void 0,details:void 0,blockLink:void 0,taskPluginId:void 0,dependsOn:void 0,onCompletion:void 0}:null}catch(a){return ri.debug("NLP fallback parsing failed:",{category:"validation",operation:"nlp-fallback-parsing",error:a}),null}}resolveProjectLinks(e){var t,r,a;try{if(!((r=(t=this.plugin.app)==null?void 0:t.workspace)!=null&&r.getActiveFile)||!((a=this.plugin.app)!=null&&a.metadataCache))return e;let i=this.plugin.app.workspace.getActiveFile(),s=(i==null?void 0:i.path)||"";return e.map(o=>{let l=o.match(/^\[\[([^\]]+)\]\]$/);if(l){let c=l[1],d=c;c.includes("|")&&(d=c.split("|")[0]);try{let u=this.plugin.app.metadataCache.getFirstLinkpathDest(d,s);if(u)return`[[${this.plugin.app.metadataCache.fileToLinktext(u,s,!0)}]]`}catch(u){ri.debug("Error resolving project link:",{category:"validation",operation:"resolving-project-link",error:u})}return o}return o})}catch(i){return ri.debug("Error in resolveProjectLinks:",{category:"validation",operation:"resolveprojectlinks",error:i}),e}}extractTaskContent(e){return e.replace(/^\s*(?:[-*+]|\d+\.)\s*\[[ xX]\]\s*/,"").trim()}extractLineContentAsTitle(e){let t=e.trim();for(;t.match(/^\s*>\s*/);)t=t.replace(/^\s*>\s*/,"");return t=t.replace(/^\s*[-*+]\s+/,""),t=t.replace(/^\s*\d+\.\s+/,""),t=t.replace(/^\s*\[[ xX]\]\s+/,""),t=t.replace(/^\s*#+\s+/,""),t.match(/^\s*(-{3,}|={3,})\s*$/)?"":t.trim()}findAllCheckboxTasks(e){let t=[],r=e.lineCount();for(let a=0;a<r;a++){let i=e.getLine(a);if(ea.parseTaskLine(i).isTaskLine){t.push({lineNumber:a,line:i});continue}if(i.trim().includes("[ ]")||i.trim().includes("[x]")||i.trim().includes("[X]")){let o=i.trim();for(;o.match(/^\s*>\s*/);)o=o.replace(/^\s*>\s*/,"");ea.parseTaskLine(o).isTaskLine&&t.push({lineNumber:a,line:i})}}return t}async parseTaskForBatch(e){var t,r,a,i;try{let s=ea.parseTaskLine(e);if(s.isTaskLine){if(s.error||!s.parsedData)return null;if(this.plugin.settings.enableNaturalLanguageInput){let o=s.parsedData.title,l=this.nlParser.parseInput(o),c={title:((t=l.title)==null?void 0:t.trim())||o,isCompleted:l.isCompleted||!1,status:l.status,priority:l.priority,dueDate:l.dueDate,scheduledDate:l.scheduledDate,dueTime:l.dueTime,scheduledTime:l.scheduledTime,recurrence:l.recurrence,timeEstimate:l.estimate,tags:((r=l.tags)==null?void 0:r.length)>0?l.tags:void 0,projects:((a=l.projects)==null?void 0:a.length)>0?l.projects:void 0,contexts:((i=l.contexts)==null?void 0:i.length)>0?l.contexts:void 0,userFields:l.userFields};return this.mergeParseResults(s.parsedData,c)}return s.parsedData}else{let o=this.extractLineContentAsTitle(e);if(!o.trim())return null;if(this.plugin.settings.enableNaturalLanguageInput){let l=this.tryNLPFallback(o,"");if(l)return l}return{title:o,isCompleted:!1}}}catch(s){return ri.warn("Error parsing task for batch:",{category:"validation",operation:"parsing-task-batch",error:s}),null}}generateLinkText(e,t){let a=ea.parseTaskLine(e).isTaskLine,i=this.plugin.app.workspace.getActiveFile(),s=(i==null?void 0:i.path)||"",o=f8(this.plugin.app.fileManager.generateMarkdownLink(t,s));return`${this.getReplacementPrefix(e,a)}${o}`}replaceAllTaskLines(e,t){let r=t.sort((a,i)=>i.lineNumber-a.lineNumber);for(let a of r){let i=e.getLine(a.lineNumber).length;e.replaceRange(a.linkText,{line:a.lineNumber,ch:0},{line:a.lineNumber,ch:i})}}}});var ORe={};Xe(ORe,{buildConvertButtonDecorations:()=>v8,createInstantConvertButtons:()=>Xct,createInstantConvertField:()=>LRe});function LRe(n){return Hm.ViewPlugin.fromClass(class{constructor(e){var t;this.enabled=!!((t=n==null?void 0:n.settings)!=null&&t.enableInstantTaskConvert),this.decorations=this.enabled?v8(e,n):Hm.Decoration.none}update(e){var r;if(!!!((r=n==null?void 0:n.settings)!=null&&r.enableInstantTaskConvert)){this.enabled=!1,this.decorations=Hm.Decoration.none;return}(!this.enabled||e.docChanged||e.viewportChanged)&&(this.enabled=!0,this.decorations=v8(e.view,n))}},{decorations:e=>e.decorations})}function Qct(n){let e=n.state;return!(n.dom instanceof HTMLElement)||typeof e.field!="function"?!1:Ak(n)}function v8(n,e){var s;let t=new FRe.RangeSetBuilder;if(Qct(n))return t.finish();let r=(s=n.state)==null?void 0:s.doc;if(!r||!e)return ss.warn("Invalid state or plugin for building convert button decorations",{category:"validation",operation:"invalid-state-or-plugin-building-convert-button-decorations"}),t.finish();if(typeof r.lines!="number"||r.lines<0)return ss.warn("Invalid document lines count:",{category:"validation",operation:"invalid-document-lines-count",details:{value:r.lines}}),t.finish();let a=new Set,i=n.visibleRanges.length>0?n.visibleRanges:[{from:0,to:r.length}];for(let o of i)try{let l=r.lineAt(Math.max(0,Math.min(o.from,r.length)));for(;l&&l.from<=o.to&&(a.has(l.number)||(a.add(l.number),Jct(t,e,l)),!(l.number>=r.lines||l.to>=r.length));)l=r.line(l.number+1)}catch(l){ss.debug("Error processing visible range",{category:"validation",operation:"processing-visible-range",details:{values:[o,":"]},error:l})}return t.finish()}function Jct(n,e,t){try{if(!t||typeof t.text!="string")return;let r=t.text;if(r.length>1e3)return;let a=ea.parseTaskLine(r);if(a.isTaskLine&&a.parsedData){if(!a.parsedData.title||a.parsedData.title.trim().length===0||typeof t.to!="number"||t.to<0)return;let i=new y8(e,t.number-1),s=Hm.Decoration.widget({widget:i,side:1});n.add(t.to,t.to,s)}}catch(r){ss.debug("Error processing line",{category:"validation",operation:"processing-line",details:{values:[t.number,":"]},error:r})}}function Xct(n){return LRe(n)}var FRe,Hm,GT,ss,y8,zRe=y(()=>{FRe=require("@codemirror/state"),Hm=require("@codemirror/view"),GT=require("obsidian");m8();q();oE();ss=M({tag:"Editor/InstantConvertButtons"}),y8=class n extends Hm.WidgetType{constructor(e,t){super(),this.plugin=e,this.lineNumber=t}toDOM(e){let t=activeWindow.createSpan();t.className="tasknotes-plugin";let r=t.createEl("button",{cls:"instant-convert-button",attr:{"aria-label":"Convert to tasknote"}});(0,GT.setTooltip)(r,"Convert to TaskNote",{placement:"top"});let a=r.createSpan({cls:"instant-convert-button__icon"});(0,GT.setIcon)(a,"file-plus");let i=!1,s=l=>{l.preventDefault(),l.stopPropagation(),!i&&(i=!0,r.disabled=!0,r.setAttribute("aria-busy","true"),(async()=>{try{if(!this.validateButtonClick())return;let c=this.plugin.app.workspace.getActiveViewOfType(GT.MarkdownView);if(!c){ss.warn("No active markdown view available for task conversion",{category:"configuration",operation:"no-active-markdown-view-task-conversion"});return}let d=c.editor;if(!this.validateEditorState(d))return;this.plugin.instantTaskConvertService&&d&&await this.plugin.instantTaskConvertService.instantConvertTask(d,this.lineNumber)}catch(c){ss.error("Error in convert button click handler:",{category:"validation",operation:"convert-button-click-handler",error:c})}finally{i=!1,r.disabled=!1,r.removeAttribute("aria-busy")}})())},o=typeof window!="undefined"&&"PointerEvent"in window?"pointerdown":"mousedown";return r.addEventListener(o,s),t}eq(e){return e instanceof n&&e.plugin===this.plugin&&e.lineNumber===this.lineNumber}get estimatedHeight(){return-1}ignoreEvent(){return!1}validateButtonClick(){return this.plugin?this.plugin.settings.enableInstantTaskConvert?typeof this.lineNumber!="number"||this.lineNumber<0?(ss.warn("Invalid line number for task conversion:",{category:"configuration",operation:"invalid-line-number-task-conversion",details:{value:this.lineNumber}}),!1):!0:(ss.warn("Instant task conversion is disabled",{category:"configuration",operation:"instant-task-conversion-disabled"}),!1):(ss.warn("Plugin not available for task conversion",{category:"configuration",operation:"plugin-not-task-conversion"}),!1)}validateEditorState(e){if(!e)return ss.warn("Editor not available for task conversion",{category:"configuration",operation:"editor-not-task-conversion"}),!1;let t=e.lineCount();if(this.lineNumber>=t)return ss.warn(`Line number ${this.lineNumber} is out of bounds (total lines: ${t})`,{category:"validation",operation:"line-number"}),!1;try{let r=e.getLine(this.lineNumber);return r?ea.parseTaskLine(r).isTaskLine?!0:(ss.warn(`Line ${this.lineNumber} is no longer a task`,{category:"validation",operation:"line"}),!1):(ss.warn(`Cannot read line ${this.lineNumber}`,{category:"validation",operation:"read-line"}),!1)}catch(r){return ss.warn("Error validating line content:",{category:"validation",operation:"validating-line-content",error:r}),!1}}}});var URe={};Xe(URe,{initializeAfterLayoutReady:()=>x8,initializeCalendarProviders:()=>C8,initializeCoreServices:()=>w8,initializeHTTPAPI:()=>jRe,initializeServicesLazily:()=>$Re,registerBasesIntegration:()=>DP,registerRibbonIcons:()=>S8,registerTaskNotesIcon:()=>b8});function k8(n){var e;if(!(!n||typeof n!="object"))return(e=n.cm)!=null?e:null}function b8(){(0,KT.addIcon)("tasknotes-simple",`<g>
<defs>
<mask id="tasknotes-mask">
<rect width="100" height="100" fill="white"/>
<path fill="black" d="m 5.9,52.4 -0.09,4.51 c 4.71,0.09 7.61,1.48 9.95,3.57 2.35,2.09 4.11,5.01 5.90,8.14 1.80,3.13 3.62,6.46 6.45,9.12 2.23,2.09 5.14,3.67 8.83,4.21 0.46,-1.51 1.05,-2.95 1.77,-4.33 -3.44,-0.21 -5.62,-1.39 -7.53,-3.17 -2.14,-2.01 -3.82,-4.92 -5.63,-8.08 -1.81,-3.16 -3.77,-6.56 -6.82,-9.27 -3.05,-2.71 -7.07,-4.59 -11.83,-4.70 z"/>
<path fill="black" d="M 73.6,18.3 69.9,20.9 c 4.06,5.75 4.40,11.33 2.77,16.78 -1.63,5.45 -5.41,10.67 -9.65,14.78 -8.49,8.20 -16.59,14.11 -21.83,21.18 -5.24,7.07 -7.22,15.59 -3.13,27.21 l 4.25,-1.50 c -3.74,-10.62 -2.11,-16.80 2.50,-23.01 4.61,-6.21 12.63,-12.19 21.34,-20.64 4.65,-4.50 8.89,-10.23 10.84,-16.72 1.95,-6.49 1.42,-13.86 -3.40,-20.68 z"/>
</mask>
</defs>
<path fill="currentColor" mask="url(#tasknotes-mask)" d="m 98.5,0.6 c -0.38,0 -0.83,0.09 -1.33,0.23 -2,0.59 -4.66,2.18 -5.78,3.22 -1.25,1.16 -4.16,4.93 -6.08,7.19 -2.67,3.12 -5.65,6.58 -9.32,11.13 2.58,5.61 2.61,11.38 1.05,16.60 -1.95,6.49 -6.19,12.22 -10.84,16.72 -8.71,8.43 -16.73,14.41 -21.34,20.64 -4.47,6.03 -6.13,12.03 -2.81,22.08 0.19,-0.23 0.37,-0.49 0.54,-0.80 10.57,-19.70 17.89,-27.30 41.9,-47.08 v 0 c 2.40,-1.97 3.71,-4.33 4.52,-7.14 0.81,-2.82 1.11,-6.10 1.52,-9.92 0.81,-7.64 2.02,-17.43 8.43,-29.95 0.37,-0.73 0.57,-1.30 0.62,-1.72 0.05,-0.43 -0.04,-0.71 -0.22,-0.90 -0.19,-0.18 -0.48,-0.27 -0.86,-0.26 z M 72.7,26.3 c -0.75,0.92 -1.51,1.84 -2.27,2.78 -9.09,11.05 -19.45,22.93 -28.54,29.97 -1.48,1.14 -2.98,1.54 -4.46,1.38 -1.49,-0.16 -2.97,-0.89 -4.43,-1.96 -2.91,-2.16 -5.74,-5.74 -8.35,-9.19 -2.62,-3.45 -5.04,-6.77 -7.12,-8.39 -1.04,-0.81 -1.99,-1.19 -2.83,-0.97 -0.84,0.22 -1.60,1.05 -2.26,2.70 -1.03,2.61 -1.60,6.22 -3.42,10.05 4.08,0.62 7.27,2.27 9.73,4.45 3.05,2.71 5.01,6.11 6.82,9.27 1.81,3.16 3.49,6.07 5.63,8.08 1.90,1.78 4.08,2.96 7.53,3.17 0.71,-1.37 1.55,-2.69 2.49,-3.95 5.24,-7.07 13.34,-12.98 21.83,-21.18 4.24,-4.11 8.02,-9.33 9.65,-14.78 1.12,-3.73 1.31,-7.53 0.01,-11.42 z M 10.3,49.1 c -0.09,0.29 -0.18,0.56 -0.28,0.85 0.10,-0.29 0.19,-0.56 0.28,-0.85 z m -4.02,7.84 c -0.01,0.01 -0.02,0.02 -0.03,0.03 0.01,-0.01 0.02,-0.02 0.03,-0.03 0,0 0,0 0,0 z m 0.12,0 c -1.08,1.40 -2.40,2.79 -4.05,4.12 -1.20,1.0 -1.85,1.86 -2.03,2.71 -0.18,0.85 0.10,1.67 0.76,2.53 1.32,1.71 4.16,3.54 7.81,5.91 7.28,4.73 17.75,11.63 25.63,24.16 0.64,1.02 1.74,2.04 2.95,2.65 -0.91,-5.36 -0.91,-8.78 -0.54,-11.88 -3.33,-0.55 -6.07,-2.12 -8.39,-4.72 -2.83,-3.17 -4.69,-6.59 -6.54,-9.85 -1.85,-3.26 -3.69,-6.37 -6.08,-8.47 -2.06,-1.81 -4.61,-3.0 -8.49,-3.17 z"/>
</g>`)}async function w8(n){var a;n.api=new w_(n),n.fieldMapper=new tf(n.settings.fieldMapping,(a=n.settings.userFields)!=null?a:[],n.settings.customStatuses,n.settings.customPriorities),n.statusManager=new Cv(n.settings.customStatuses,n.settings.defaultTaskStatus),n.priorityManager=new ZM(n.settings.customPriorities),n.requestDeduplicator=new wv,n.predictivePrefetcher=new YM(n.requestDeduplicator),n.domReconciler=new Sv,n.uiStateManager=new KM,n.cacheManager=new QM(n.app,n.settings,n.fieldMapper),n.emitter=n.cacheManager,n.registerEvent(n.emitter.on(d2,i=>{Ze(i.message,i.timeout)})),n.dependencyCache=new XM(n.app,n.settings,n.fieldMapper,n.statusManager,i=>n.cacheManager.isTaskFile(i)),n.cacheManager.setDependencyCache(n.dependencyCache),n.taskService=new lN(n),n.filterService=new fN(n.cacheManager,n.statusManager,n.priorityManager,n),n.taskStatsService=new tk(n.cacheManager,n.statusManager),n.viewStateManager=new hN(n.app,n),n.projectSubtasksService=new gN(n),n.expandedProjectsService=new yN(n),n.autoArchiveService=new vN(n);let{TaskSelectionService:e}=await Promise.resolve().then(()=>(nwe(),rwe));n.taskSelectionService=new e(n),n.dragDropManager=new mR(n),n.statusBarService=new yR(n),n.notificationService=new vR(n),n.viewPerformanceService=new kR(n);let{BasesFilterConverter:t}=await Promise.resolve().then(()=>(iwe(),awe));n.basesFilterConverter=new t(n);let{MdbaseSpecService:r}=await Promise.resolve().then(()=>(lwe(),owe));n.mdbaseSpecService=new r(n),n.icsSubscriptionService=new KR(n),n.icsNoteService=new JR(n),n.taskService.setAutoArchiveService(n.autoArchiveService)}function S8(n){n.addRibbonIcon("calendar-days",n.i18n.translate("commands.openCalendarView"),async()=>{await n.activateCalendarView()}),n.addRibbonIcon("calendar",n.i18n.translate("commands.openAdvancedCalendarView"),async()=>{await n.openBasesFileForCommand("open-advanced-calendar-view")}),n.addRibbonIcon("check-square",n.i18n.translate("commands.openTasksView"),async()=>{await n.openBasesFileForCommand("open-tasks-view")}),n.addRibbonIcon("list",n.i18n.translate("commands.openAgendaView"),async()=>{await n.openBasesFileForCommand("open-agenda-view")}),n.addRibbonIcon("columns-3",n.i18n.translate("commands.openKanbanView"),async()=>{await n.openBasesFileForCommand("open-kanban-view")}),n.addRibbonIcon("timer",n.i18n.translate("commands.openPomodoroView"),async()=>{await n.activatePomodoroView()}),n.addRibbonIcon("bar-chart-3",n.i18n.translate("commands.openPomodoroStats"),async()=>{await n.activatePomodoroStatsView()}),n.addRibbonIcon("tasknotes-simple",n.i18n.translate("commands.createNewTask"),()=>{n.openTaskCreationModal()})}function C8(n){n.oauthService=new e_(n,n.oauthSecretStore),n.googleCalendarService=new n_(n,n.oauthService),n.microsoftCalendarService=new a_(n,n.oauthService),n.calendarProviderRegistry=new QR,n.calendarProviderRegistry.register(n.googleCalendarService),n.calendarProviderRegistry.register(n.microsoftCalendarService)}async function DP(n){var e;if(!((e=n.settings)!=null&&e.enableBases)){EP(n);return}if(n.basesRegistered&&T8(n)){EP(n);return}n.basesRegistered=!1;try{let{registerBasesTaskList:t}=await Promise.resolve().then(()=>(C3(),iDe)),r=await t(n);if(n.basesRegistered=r,r){EP(n);return}}catch(t){YT.debug("[TaskNotes][Bases] Registration failed:",{category:"internal",operation:"registration",error:t})}tdt(n)}function BRe(n){var e,t,r;return(r=(t=(e=n.app.internalPlugins)==null?void 0:e.getEnabledPluginById)==null?void 0:t.call(e,"bases"))!=null?r:null}function T8(n){var t;let e=(t=BRe(n))==null?void 0:t.registrations;return!!e&&edt.every(r=>!!e[r])}function EP(n){n.basesRegistrationRetryIntervalId!==null&&(window.clearInterval(n.basesRegistrationRetryIntervalId),n.basesRegistrationRetryIntervalId=null)}function tdt(n){var e;!((e=n.settings)!=null&&e.enableBases)||n.basesRegistrationRetryIntervalId!==null||T8(n)||(n.basesRegistrationRetryIntervalId=window.setInterval(()=>{if(n.basesRegistered&&T8(n)){EP(n);return}BRe(n)&&DP(n)},5e3),n.register(()=>EP(n)))}async function jRe(n){if(!(KT.Platform.isMobile||!n.settings.enableAPI))try{let{HTTPAPIService:e}=await Promise.resolve().then(()=>(bRe(),TRe));n.apiService=new e(n,n.taskService,n.filterService,n.cacheManager),n.taskService.setWebhookNotifier(n.apiService),n.pomodoroService.setWebhookNotifier(n.apiService),await n.apiService.start(),Ze(`TaskNotes API started on port ${n.apiService.getPort()}`)}catch(e){YT.error("Failed to initialize HTTP API:",{category:"provider",operation:"initialize-http-api",error:e}),Ze("Failed to start tasknotes API server. Check console for details.")}}async function x8(n){if(!n.initializationComplete){n.initializationComplete=!0;try{n.settings.autoCreateDefaultBasesFiles&&await n.ensureBasesViewFiles(),await n.ensureStarterNote(),n.injectCustomStyles(),rdt(n),ndt(n),n.cacheManager.initialize(),n.dependencyCache.initialize(),n.filterService.initialize(),n.statusBarService.initialize(),await n.notificationService.initialize(),await n.warmupProjectIndexes(),await n.autoArchiveService.start(),n.setupDateChangeDetection(),$Re(n),await DP(n),n.emitter.trigger(Lc["layout.ready"],{timestamp:new Date().toISOString()})}catch(e){YT.error("Error during post-layout initialization:",{category:"internal",operation:"post-layout-initialization",error:e})}}}function rdt(n){n.registerView(ld,e=>new TR(e,n)),n.registerView(Kg,e=>new wR(e,n)),n.registerView(Zg,e=>new SR(e,n)),n.registerView(nE,e=>new CR(e,n,$ke,jke))}function ndt(n){n.registerEditorExtension(qke(n)),n.registerEditorExtension(hTe(n)),n.taskCardReadingModeCleanup=yTe(n),n.registerEditorExtension(cTe(n)),n.relationshipsReadingModeCleanup=dTe(n),n.registerMarkdownPostProcessor(TTe(n))}function $Re(n){window.setTimeout(()=>{(async()=>{try{n.pomodoroService||(n.pomodoroService=new kE(n),await n.pomodoroService.initialize()),n.autoExportService=new l_(n),n.autoExportService.start(),x_(n.settings)||(await n.icsSubscriptionService.initialize(),n.googleCalendarService.on("data-changed",()=>{n.notifyDataChanged(void 0,!1,!0)}),await n.googleCalendarService.initialize(),n.taskCalendarSyncService=new(await Promise.resolve().then(()=>(ARe(),PRe))).TaskCalendarSyncService(n,n.googleCalendarService),await n.taskCalendarSyncService.initializeExternalFileReconciliation(),n.taskCalendarSyncService.startRecoveryQueueProcessor(),n.registerEvent(n.emitter.on("file-updated",a=>{!n.taskCalendarSyncService||!(a!=null&&a.path)||n.taskCalendarSyncService.handleExternalTaskFileUpdated(a.path,a.updatedTask).catch(i=>{YT.warn("Failed to reconcile externally updated task with Google Calendar:",{category:"provider",operation:"reconcile-external-task-file-update",error:i})})})),n.registerEvent(n.emitter.on("file-deleted",a=>{var d,u;if(!n.taskCalendarSyncService)return;let i=n.fieldMapper.toUserField("googleCalendarEventId"),s=n.fieldMapper.toUserField("googleCalendarExceptionEventId"),o=a.prevCache,l=(d=o==null?void 0:o.frontmatter)==null?void 0:d[i],c=(u=o==null?void 0:o.frontmatter)==null?void 0:u[s];(typeof l=="string"&&l.length>0||typeof c=="string"&&c.length>0)&&n.taskCalendarSyncService.deleteTaskFromCalendarByPath(a.path,typeof l=="string"?l:void 0,typeof c=="string"?c:void 0).catch(p=>{YT.warn("Failed to delete task from Google Calendar on file deletion:",{category:"provider",operation:"delete-task-google-calendar-on-file-deletion",error:p})})})),n.microsoftCalendarService.on("data-changed",()=>{n.notifyDataChanged(void 0,!1,!0)}),await n.microsoftCalendarService.initialize()),n.taskFileLifecycleReconciliationService=new d_(n),await n.taskFileLifecycleReconciliationService.initialize(),await jRe(n);let{TaskLinkDetectionService:e}=await Promise.resolve().then(()=>(DR(),_W));n.taskLinkDetectionService=new e(n);let{InstantTaskConvertService:t}=await Promise.resolve().then(()=>(_Re(),RRe));n.instantTaskConvertService=new t(n,n.statusManager,n.priorityManager);let{createInstantConvertButtons:r}=await Promise.resolve().then(()=>(zRe(),ORe));n.registerEditorExtension(r(n)),n.taskUpdateListenerForEditor=n.emitter.on(rt,a=>{n.app.workspace.iterateRootLeaves(i=>{var s;if(i.view&&i.view.getViewType()==="markdown"){let o=i.view.editor,l=k8(o);if(l){let c=(a==null?void 0:a.path)||((s=a==null?void 0:a.updatedTask)==null?void 0:s.path);Qp(l,c)}}})}),n.registerEvent(n.app.workspace.on("active-leaf-change",a=>{window.setTimeout(()=>{if(a&&a.view&&a.view.getViewType()==="markdown"){let i=a.view.editor,s=k8(i);s&&Qp(s)}},50)})),n.registerEvent(n.app.workspace.on("layout-change",()=>{window.setTimeout(()=>{let a=n.app.workspace.getActiveViewOfType(KT.MarkdownView);if(a){let i=a.editor,s=k8(i);s&&Qp(s)}},100)})),n.setupStatusBarEventListeners(),n.setupTimeTrackingEventListeners(),await n.checkForVersionUpdate(),n.checkForNewReleaseOnStartup()}catch(e){YT.error("Error during lazy service initialization:",{category:"internal",operation:"lazy-service-initialization",error:e})}})()},10)}var KT,YT,edt,qO=y(()=>{KT=require("obsidian");Pr();uU();Yue();Kue();pU();Zue();rpe();mU();Nfe();uhe();_H();phe();fhe();hhe();ghe();Dye();Rye();Fye();Lye();Oye();$ye();Vye();MW();Uke();PR();uTe();vTe();bTe();WTe();qTe();YTe();ebe();tbe();nm();lq();lbe();ube();Xbe();Sq();q();xE();Wd();Oi();YT=M({tag:"Bootstrap/PluginBootstrap"}),edt=["tasknotesTaskList","tasknotesKanban","tasknotesCalendar","tasknotesMiniCalendar"]});var oFe={};Xe(oFe,{TaskActionPaletteModal:()=>eK});function Cut(){return(0,Sr.moment)()}var Sr,sFe,eK,lFe=y(()=>{Sr=require("obsidian");xe();TM();q();py();vC();sFe=M({tag:"Modals/TaskActionPaletteModal"});eK=class extends Sr.FuzzySuggestModal{constructor(e,t,r,a){super(e),this.task=t,this.plugin=r,this.targetDate=a,this.actions=this.buildActionsList(),this.setPlaceholder("Type to search for an action..."),this.setInstructions([{command:"↑↓",purpose:"to navigate"},{command:"↵",purpose:"to execute"},{command:"esc",purpose:"to dismiss"}]),this.titleEl.setText(`Quick actions: ${t.title}`),this.titleEl.setAttribute("id","task-action-palette-title"),this.containerEl.setAttribute("aria-labelledby","task-action-palette-title"),this.containerEl.setAttribute("role","dialog"),this.containerEl.setAttribute("aria-modal","true"),this.containerEl.addClass("task-action-palette-modal")}buildActionsList(){let e=[];(this.task.recurrence?this.plugin.statusManager.getNonCompletionStatuses():this.plugin.statusManager.getAllStatuses()).forEach(a=>{let i=this.task.status===a.value;e.push({id:`status-${a.value}`,title:`Change status to "${a.label}"`,description:`Set task status to ${a.label}`,icon:i?"check":"circle",category:"status",keywords:["status",a.value,a.label,"change","set"],isApplicable:()=>!i,execute:async s=>{await this.plugin.updateTaskProperty(s,"status",a.value),new Sr.Notice(`Status changed to ${a.label}`)}})}),this.plugin.priorityManager.getAllPriorities().forEach(a=>{let i=this.task.priority===a.value;e.push({id:`priority-${a.value}`,title:`Set priority to "${a.label}"`,description:`Change task priority to ${a.label}`,icon:i?"check":"flag",category:"priority",keywords:["priority",a.value,a.label,"change","set"],isApplicable:()=>!i,execute:async s=>{await this.plugin.updateTaskProperty(s,"priority",a.value),new Sr.Notice(`Priority changed to ${a.label}`)}})}),e.push({id:"set-due-date",title:"Set due date",description:"Set or change the task due date",icon:"calendar",category:"dates",keywords:["due","date","deadline","set","change"],isApplicable:()=>!0,execute:async a=>{this.plugin.openDueDateModal(a)}},{id:"set-scheduled-date",title:"Set scheduled date",description:"Set or change when the task is scheduled",icon:"calendar-clock",category:"dates",keywords:["scheduled","date","schedule","set","change"],isApplicable:()=>!0,execute:async a=>{this.plugin.openScheduledDateModal(a)}},{id:"clear-due-date",title:"Clear due date",description:"Remove the due date from this task",icon:"calendar-x",category:"dates",keywords:["clear","remove","due","date"],isApplicable:a=>!!a.due,execute:async a=>{await this.plugin.updateTaskProperty(a,"due",void 0),new Sr.Notice("Due date cleared")}},{id:"clear-scheduled-date",title:"Clear scheduled date",description:"Remove the scheduled date from this task",icon:"calendar-x",category:"dates",keywords:["clear","remove","scheduled","date"],isApplicable:a=>!!a.scheduled,execute:async a=>{await this.plugin.updateTaskProperty(a,"scheduled",void 0),new Sr.Notice("Scheduled date cleared")}}),this.addQuickDatePresetActions(e,"scheduled"),this.addQuickDatePresetActions(e,"due");let r=this.plugin.getActiveTimeSession(this.task);return e.push({id:"toggle-time-tracking",title:r?"Stop time tracking":"Start time tracking",description:r?"Stop tracking time for this task":"Start tracking time for this task",icon:r?"pause":"play",category:"tracking",keywords:["time","tracking","timer",r?"stop":"start"],isApplicable:()=>!0,execute:async a=>{this.plugin.getActiveTimeSession(a)?(await this.plugin.stopTimeTracking(a),new Sr.Notice("Time tracking stopped")):(await this.plugin.startTimeTracking(a),new Sr.Notice("Time tracking started"))}}),this.task.timeEntries&&this.task.timeEntries.length>0&&e.push({id:"edit-time-entries",title:"Edit time entries",description:"View, edit, or add time entries for this task",icon:"clock",category:"tracking",keywords:["time","entries","edit","tracking","history"],isApplicable:()=>!0,execute:async a=>{this.plugin.openTimeEntryEditor(a),this.close()}}),e.push({id:"add-project",title:"Add project",description:"Select a project note and add it to this task",icon:"folder-plus",category:"organization",keywords:["project","organization","add","link"],isApplicable:()=>!0,execute:async a=>{this.openProjectSelector(a)}},{id:"toggle-archive",title:this.task.archived?"Unarchive task":"Archive task",description:this.task.archived?"Move task back to active tasks":"Archive this task",icon:this.task.archived?"archive-restore":"archive",category:"organization",keywords:["archive",this.task.archived?"unarchive":"archive","organize"],isApplicable:()=>!0,execute:async a=>{await this.plugin.toggleTaskArchive(a),new Sr.Notice(a.archived?"Task unarchived":"Task archived")}}),this.task.recurrence&&(e.push({id:"complete-recurring-instance",title:"Complete this occurrence",description:"Mark this specific instance of the recurring task as complete",icon:"check-circle",category:"dates",keywords:["complete","done","finish","recurring","instance","occurrence"],isApplicable:(a,i,s)=>!i.statusManager.isCompletedStatus(a.status),execute:async(a,i,s)=>{await i.toggleRecurringTaskComplete(a,s),new Sr.Notice("Recurring task instance completed")}}),e.push({id:"open-or-create-occurrence-note",title:"Open or create occurrence note",description:"Open the note for this occurrence, creating it if needed",icon:"file-plus",category:"dates",keywords:["open","create","materialize","note","recurring","instance","occurrence"],isApplicable:()=>!0,execute:async(a,i,s)=>{await pv({plugin:i,parentTask:a,targetDate:this.getOccurrenceNoteTargetDate(a,s),openInNewLeaf:!0})}})),this.task.recurrence_parent&&this.task.occurrence_date&&e.push({id:"open-recurring-parent",title:"Open recurring parent",description:"Open the recurring task that generated this occurrence",icon:"refresh-ccw",category:"other",keywords:["open","parent","recurring","materialized","occurrence"],isApplicable:()=>!0,execute:async(a,i)=>{await kM({plugin:i,occurrenceTask:a,openInNewLeaf:!0})}}),e.push({id:"edit-task",title:"Edit task details",description:"Open the full task editor",icon:"edit",category:"other",keywords:["edit","modify","details","properties"],isApplicable:()=>!0,execute:async a=>{await this.plugin.openTaskEditModal(a)}},{id:"open-task-file",title:"Open task file",description:"Open the task file in the editor",icon:"file-text",category:"other",keywords:["open","file","editor","edit"],isApplicable:()=>!0,execute:async a=>{let i=this.plugin.app.vault.getAbstractFileByPath(a.path);i instanceof Sr.TFile&&await this.plugin.app.workspace.getLeaf(!0).openFile(i)}},{id:"copy-task-title",title:"Copy task title",description:"Copy the task title to clipboard",icon:"copy",category:"other",keywords:["copy","clipboard","title"],isApplicable:()=>!0,execute:async a=>{try{await navigator.clipboard.writeText(a.title),new Sr.Notice("Task title copied to clipboard")}catch(i){new Sr.Notice("Failed to copy to clipboard")}}},{id:"copy-task-link",title:"Copy task link",description:"Copy a wikilink to this task",icon:"link",category:"other",keywords:["copy","link","wikilink","reference"],isApplicable:()=>!0,execute:async a=>{try{let i=this.plugin.app.vault.getAbstractFileByPath(a.path);if(i instanceof Sr.TFile){let s=this.plugin.app.metadataCache.fileToLinktext(i,"");await navigator.clipboard.writeText(`[[${s}]]`),new Sr.Notice("Task link copied to clipboard")}}catch(i){new Sr.Notice("Failed to copy to clipboard")}}},{id:"delete-task",title:"Delete task",description:"Permanently delete this task",icon:"trash",category:"other",keywords:["delete","remove","trash"],isApplicable:()=>!0,execute:async a=>{this.close();let{showDeleteConfirmationModal:i}=await Promise.resolve().then(()=>(Ua(),fv));await i(a,this.plugin)}}),e}getOccurrenceNoteTargetDate(e,t){try{let r=re(e.scheduled||"");return r?st(r):t}catch(r){return t}}getQuickDatePresets(){let e=Cut(),t=e.clone().day(6);return(t.isBefore(e)||t.isSame(e,"day"))&&t.add(1,"week"),[{id:"today",label:"today",value:e.format("YYYY-MM-DD"),icon:"calendar-check",keywords:["today"]},{id:"tomorrow",label:"tomorrow",value:e.clone().add(1,"day").format("YYYY-MM-DD"),icon:"calendar-plus",keywords:["tomorrow"]},{id:"this-weekend",label:"this weekend",value:t.format("YYYY-MM-DD"),icon:"calendar-days",keywords:["weekend","saturday"]},{id:"next-week",label:"next week",value:e.clone().day(1).add(1,"week").format("YYYY-MM-DD"),icon:"calendar-plus",keywords:["next","week","monday"]},{id:"next-month",label:"next month",value:e.clone().add(1,"month").startOf("month").format("YYYY-MM-DD"),icon:"calendar-range",keywords:["next","month"]}]}addQuickDatePresetActions(e,t){let r=t==="scheduled"?"scheduled date":"due date",a=t==="scheduled"?"Scheduled date":"Due date",i=t==="scheduled"?"Schedule":"Set due";this.getQuickDatePresets().forEach(s=>{e.push({id:`set-${t}-${s.id}`,title:`${i} for ${s.label}`,description:`Set the task ${r} to ${s.label}`,icon:s.icon,category:"dates",keywords:[t,"date","set","change",...s.keywords],isApplicable:o=>(o[t]?re(o[t]):void 0)!==s.value,execute:async o=>{await this.plugin.updateTaskProperty(o,t,s.value),new Sr.Notice(`${a} set`)}})})}openProjectSelector(e){let t=new Ys(this.plugin.app,this.plugin,r=>{this.addSelectedProjectToTask(e,r)});this.close(),t.open()}async addSelectedProjectToTask(e,t){try{if(!(t instanceof Sr.TFile)){new Sr.Notice(this.plugin.i18n.translate("contextMenus.task.organization.notices.projectSelectFailed"));return}await rv(this.plugin,e,t)}catch(r){sFe.error("Failed to add task to project:",{category:"persistence",operation:"add-task-project",details:{taskPath:e.path},error:r instanceof Error?r.message:String(r)}),new Sr.Notice(this.plugin.i18n.translate("contextMenus.task.organization.notices.addToProjectFailed"))}}getItems(){return this.actions.filter(e=>e.isApplicable(this.task,this.plugin,this.targetDate)).sort((e,t)=>{var s,o;let r={status:0,priority:1,dates:2,tracking:3,organization:4,other:5},a=(s=r[e.category])!=null?s:999,i=(o=r[t.category])!=null?o:999;return a!==i?a-i:e.title.localeCompare(t.title)})}getItemText(e){return[e.title,e.description,e.category,...e.keywords].join(" ")}renderSuggestion(e,t){let r=e.item,a=t.createDiv({cls:"task-action-palette__suggestion"}),i=a.createDiv({cls:"task-action-palette__icon"});(0,Sr.setIcon)(i,r.icon);let s=a.createDiv({cls:"task-action-palette__content"});s.createDiv({cls:"task-action-palette__title",text:r.title}),s.createDiv({cls:"task-action-palette__description",text:r.description}),a.createDiv({cls:"task-action-palette__badge"}).createSpan({cls:`task-action-palette__category task-action-palette__category--${r.category}`,text:r.category})}onChooseItem(e,t){this.executeAction(e,t)}async executeAction(e,t){try{let r=await this.plugin.cacheManager.getTaskInfo(this.task.path);if(!r){new Sr.Notice("Task not found");return}await e.execute(r,this.plugin,this.targetDate)}catch(r){let a=r instanceof Error?r.message:String(r);sFe.error("Error executing action:",{category:"persistence",operation:"executing-action",details:{actionId:e.id,taskPath:this.task.path},error:a}),new Sr.Notice(`Failed to execute action: ${a}`)}}}});var Dut={};Xe(Dut,{default:()=>Eut});module.exports=BP(Dut);var Te=require("obsidian");Cr();var Zm=tt(od());G1();Pr();UM();var qn=require("obsidian");Q2();xe();yt();dr();Fi();var NC=require("obsidian");xe();yt();TM();function xue(n,e){if(!e.task.recurrence)return;let t=n.createDiv("completions-calendar-container"),r=t.createDiv("detail-label");r.textContent=e.translate("modals.taskEdit.sections.completions");let a=t.createDiv("completions-calendar-content");TVe(a,e)}function TVe(n,e){let t=n.createDiv("recurring-calendar"),a=Xt();if(e.task.complete_instances&&e.task.complete_instances.length>0){let i=e.task.complete_instances.filter(s=>s&&typeof s=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(s.trim())).map(s=>df(s).getTime()).filter(s=>!isNaN(s));i.length>0&&(a=new Date(Math.max(...i)))}Tv(t,a,e)}function Tv(n,e,t){n.empty();let r=n.createDiv("recurring-calendar__header"),a=r.createEl("button",{cls:"recurring-calendar__nav",attr:{type:"button","aria-label":"Previous month"}});(0,NC.setIcon)(a,"chevron-left");let i=r.createSpan("recurring-calendar__month"),s=t.plugin.i18n.getCurrentLocale()||"en",o=new Intl.DateTimeFormat(s,{month:"short",year:"numeric"});i.textContent=o.format(e);let l=r.createEl("button",{cls:"recurring-calendar__nav",attr:{type:"button","aria-label":"Next month"}});(0,NC.setIcon)(l,"chevron-right");let c=n.createDiv("recurring-calendar__grid"),d=E0(e),u=D0(e),p=t.plugin.settings.calendarViewSettings.firstDay||0,m=x0(d,p),f=qz(u,p),h=Wz(m,f),g=E0(e);g.setUTCMonth(g.getUTCMonth()-1);let v=D0(e);v.setUTCMonth(v.getUTCMonth()+1);let k=ly(t.task,g,v),T=new Set(k.map(S=>ae(S))),b=nU(t),w=aU(t);h.forEach(S=>{let C=ae(S),x=S.getUTCMonth()===e.getUTCMonth(),E=T.has(C),_=new Date(S),F=c.createDiv("recurring-calendar__day");F.textContent=String(S.getUTCDate()),F.addClass("recurring-calendar__day--clickable"),F.setAttribute("data-occurrence-date",C),x||F.addClass("recurring-calendar__day--faded"),E&&(F.addClass("recurring-calendar__day--recurring"),F.addClass("recurring-calendar__day--contextable"),F.setAttribute("aria-label",`Occurrence ${C}`)),b.has(C)&&F.addClass("recurring-calendar__day--completed"),w.has(C)&&F.addClass("recurring-calendar__day--skipped"),F.addEventListener("click",()=>{rU(t,C,"complete"),Tv(n,e,t)}),E&&F.addEventListener("contextmenu",I=>{bVe(I,n,e,_,t)})}),a.addEventListener("click",()=>{let S=new Date(e);S.setUTCMonth(S.getUTCMonth()-1),Tv(n,S,t)}),l.addEventListener("click",()=>{let S=new Date(e);S.setUTCMonth(S.getUTCMonth()+1),Tv(n,S,t)})}function bVe(n,e,t,r,a){n.preventDefault(),n.stopPropagation();let i=ae(r),o=nU(a).has(i),l=new NC.Menu;l.addItem(u=>{u.setTitle("Open or create occurrence note"),u.setIcon("file-plus"),u.onClick(async()=>{await pv({plugin:a.plugin,parentTask:a.task,targetDate:r,openInNewLeaf:!0})})}),l.addSeparator(),l.addItem(u=>{u.setTitle(o?"Mark incomplete for this date":"Mark complete for this date"),u.setIcon(o?"x":"check"),u.onClick(()=>{rU(a,i,"complete"),Tv(e,t,a)})});let d=aU(a).has(i);l.addItem(u=>{u.setTitle(d?"Unskip instance":"Skip instance"),u.setIcon(d?"undo":"x-circle"),u.onClick(()=>{rU(a,i,"skip"),Tv(e,t,a)})}),l.showAtMouseEvent(n)}function nU(n){let e=new Set(n.task.complete_instances||[]);for(let t of n.completedInstancesChanges)e.has(t)?e.delete(t):e.add(t);return e}function aU(n){let e=new Set(n.task.skipped_instances||[]);for(let t of n.skippedInstancesChanges)e.has(t)?e.delete(t):e.add(t);return e}function rU(n,e,t){let r=nU(n),a=aU(n);t==="complete"?r.has(e)?(r.delete(e),a.delete(e)):(r.add(e),a.delete(e)):a.has(e)?a.delete(e):(a.add(e),r.delete(e)),Cue(n.completedInstancesChanges,n.task.complete_instances||[],r),Cue(n.skippedInstancesChanges,n.task.skipped_instances||[],a)}function Cue(n,e,t){n.splice(0,n.length);let r=new Set(e),a=new Set([...r,...t]);for(let i of a)r.has(i)!==t.has(i)&&n.push(i)}W2();G2();var Aue=require("obsidian");xe();yt();Cn();Ku();ip();xM();function wVe(n,e){if(n.length!==e.length)return!1;let t=i=>[...i].sort((s,o)=>s.uid.localeCompare(o.uid)),r=t(n),a=t(e);for(let i=0;i<r.length;i++){let s=r[i],o=a[i];if(s.uid!==o.uid||s.reltype!==o.reltype||(s.gap||"")!==(o.gap||""))return!1}return!0}function Pue(n){let e={};n.title.trim()!==n.task.title&&(e.title=n.title.trim()),n.dueDate!==(n.task.due||"")&&(e.due=n.dueDate||void 0),n.scheduledDate!==(n.task.scheduled||"")&&(e.scheduled=n.scheduledDate||void 0),n.priority!==n.task.priority&&(e.priority=n.priority),n.status!==n.task.status&&(e.status=n.status);let t=n.contexts.split(",").map(S=>S.trim()).filter(S=>S.length>0),r=iU(n.task.contexts);JSON.stringify(t.sort())!==JSON.stringify(r.sort())&&(e.contexts=t.length>0?t:void 0);let a=ms(n.projects),i=iU(n.task.projects),s=Eue(a).sort(),o=Eue(i).sort();JSON.stringify(s)!==JSON.stringify(o)&&(e.projects=a.length>0?a:[]);let l=ha(n.tags)===ha(n.initialTags),c=n.tags.split(",").map(S=>S.trim()).filter(S=>S.length>0),d=iU(n.task.tags);n.taskIdentificationMethod==="tag"&&n.taskTag&&(c=ale(c,d,n.taskTag,n.hideIdentifyingTagsMode)),!l&&JSON.stringify(c.sort())!==JSON.stringify(d.sort())&&(e.tags=c.length>0?c:void 0);let u=n.timeEstimate>0?n.timeEstimate:void 0;u!==n.task.timeEstimate&&(e.timeEstimate=u);let p=typeof n.task.recurrence=="string"?n.task.recurrence:"";n.recurrenceRule!==p&&(e.recurrence=n.recurrenceRule||void 0);let m=n.task.recurrence_anchor||"scheduled";n.recurrenceAnchor!==m&&(e.recurrence_anchor=n.recurrenceAnchor);let f=n.task.reminders||[],h=n.reminders||[];JSON.stringify(h)!==JSON.stringify(f)&&(e.reminders=h.length>0?h:void 0);let g=n.blockedByItems.map(S=>({...S.dependency}));wVe(g,n.initialBlockedBy)||(e.blockedBy=g.length>0?g:void 0);let{blockingUpdates:v,unresolvedBlockingEntries:k}=SVe(n),T=n.normalizeDetails(n.details),b=n.normalizeDetails(n.originalDetails);T!==b&&(e.details=T.trimEnd()),CVe(n,e);let w=rde(n.userFields,n.frontmatter,n.userFieldConfigs);return Object.keys(w).length>0&&(e.customFrontmatter=w),Object.keys(e).length>0&&(e.dateModified=qe()),{changes:e,blockingUpdates:v,unresolvedBlockingEntries:k}}function Eue(n){return n.map(e=>{if(!e||typeof e!="string")return"";let t=e.trim();return t?vt(t).trim():""}).filter(e=>e.length>0)}function iU(n){return Array.isArray(n)?n.filter(e=>typeof e=="string"):typeof n=="string"?n?[n]:[]:[]}function SVe(n){let e=new Map,t=[];n.blockingItems.forEach(c=>{c.path?e.set(c.path,{...c.dependency}):t.push(c.dependency.uid)});let r=Array.from(e.keys()),a=new Set(n.initialBlockingPaths),i=new Set(r),s=r.filter(c=>!a.has(c)),o=n.initialBlockingPaths.filter(c=>!i.has(c)),l={};for(let c of s){let d=e.get(c);d&&(l[c]={...d})}return{blockingUpdates:{added:s,removed:o,raw:l},unresolvedBlockingEntries:t}}function CVe(n,e){if(n.completedInstancesChanges.length===0&&n.skippedInstancesChanges.length===0)return;let t=new Set(n.task.complete_instances||[]),r=new Set(n.task.skipped_instances||[]),a=new Set(t),i=new Set(r);for(let d of n.completedInstancesChanges)a.has(d)?a.delete(d):a.add(d);for(let d of n.skippedInstancesChanges)i.has(d)?i.delete(d):(i.add(d),a.delete(d));for(let d of a)i.delete(d);for(let d of i)a.delete(d);let s=null;for(let d of n.completedInstancesChanges)!t.has(d)&&a.has(d)&&(!s||d>s)&&(s=d);if(Due(t,a)||(e.complete_instances=Array.from(a)),Due(r,i)||(e.skipped_instances=Array.from(i)),!n.task.recurrence||typeof n.task.recurrence!="string")return;if((n.task.recurrence_anchor||"scheduled")==="completion"&&s){let d=Zte(n.task.recurrence,s);d&&(e.recurrence=d)}let l={...n.task,...e,recurrence:e.recurrence||n.task.recurrence},c=qte(l,n.maintainDueDateOffsetInRecurring);c.scheduled&&(e.scheduled=c.scheduled),c.due&&(e.due=c.due)}function Due(n,e){if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0}q();var xVe=M({tag:"TaskEditModal/Changes"});function Mue(n){let e=sU({app:n.app,taskPath:n.task.path,logger:n.logger});return Pue({task:n.task,title:n.title,dueDate:n.dueDate,scheduledDate:n.scheduledDate,priority:n.priority,status:n.status,contexts:n.contexts,projects:n.projects,tags:n.tags,initialTags:n.initialTags,timeEstimate:n.timeEstimate,recurrenceRule:n.recurrenceRule,recurrenceAnchor:n.recurrenceAnchor,reminders:n.reminders,blockedByItems:n.blockedByItems,initialBlockedBy:n.initialBlockedBy,blockingItems:n.blockingItems,initialBlockingPaths:n.initialBlockingPaths,details:n.details,originalDetails:n.originalDetails,completedInstancesChanges:n.completedInstancesChanges,skippedInstancesChanges:n.skippedInstancesChanges,userFields:n.userFields,frontmatter:e,userFieldConfigs:n.settings.userFields||[],taskIdentificationMethod:n.settings.taskIdentificationMethod||"",taskTag:n.settings.taskTag||"",hideIdentifyingTagsMode:n.settings.hideIdentifyingTagsMode,maintainDueDateOffsetInRecurring:n.settings.maintainDueDateOffsetInRecurring===!0,normalizeDetails:n.normalizeDetails})}function sU(n){var e,t;try{let r=n.app.vault.getAbstractFileByPath(n.taskPath);if(r instanceof Aue.TFile)return((e=n.app.metadataCache.getFileCache(r))==null?void 0:e.frontmatter)||{}}catch(r){((t=n.logger)!=null?t:xVe).warn("Error reading user field frontmatter",{category:"stale-data",operation:"task-edit-frontmatter-read",details:{path:n.taskPath},error:r})}return{}}yt();ip();function Iue(n){let e=sU({app:n.app,taskPath:n.task.path,logger:n.logger});return EVe({task:n.task,details:n.details,frontmatter:e,settings:n.settings,normalizeDetails:n.normalizeDetails})}function EVe(n){let e=oU(n.task.tags),t=k$({taskIdentificationMethod:n.settings.taskIdentificationMethod||"",taskTag:n.settings.taskTag||"",hideIdentifyingTagsInCards:n.settings.hideIdentifyingTagsInCards,hideIdentifyingTagsMode:n.settings.hideIdentifyingTagsMode})?jd(e,n.settings.taskTag||"",n.settings.hideIdentifyingTagsMode):e,r=t.length>0?ha(t.join(", ")):"",a=n.normalizeDetails(n.details),i=oU(n.task.projects),s=oU(n.task.contexts);return{title:n.task.title,dueDate:n.task.due||"",scheduledDate:n.task.scheduled||"",priority:n.task.priority,status:n.task.status,contexts:s.join(", "),projectValues:i,hasValidProjects:i.some(o=>typeof o=="string"&&o.trim()!==""),tags:r,initialTags:r,timeEstimate:n.task.timeEstimate||0,recurrenceRule:typeof n.task.recurrence=="string"?n.task.recurrence:"",recurrenceAnchor:n.task.recurrence_anchor||"scheduled",reminders:n.task.reminders?[...n.task.reminders]:[],details:a,originalDetails:a,userFields:DVe(n.frontmatter,n.settings.userFields||[])}}function oU(n){return Array.isArray(n)?n.filter(e=>typeof e=="string"):typeof n=="string"?n?[n]:[]:[]}function DVe(n,e){let t={};for(let r of e){if(!(r!=null&&r.key))continue;let a=n[r.key];a!==void 0&&(t[r.key]=a)}return t}eU();function Nue(n,e){let t=e.map(a=>a.path).sort(),r=n.map(a=>a.path).sort();return t.length!==r.length||t.some((a,i)=>a!==r[i])}function PVe(n,e){let t=new Set(e.map(a=>a.path)),r=new Set(n.map(a=>a.path));return{toRemove:n.filter(a=>!t.has(a.path)),toAdd:e.filter(a=>!r.has(a.path))}}async function Rue(n){var r,a;let e=PVe(n.initialSubtaskFiles,n.selectedSubtaskFiles),t={nextInitialSubtaskFiles:[...n.selectedSubtaskFiles],added:0,removed:0,skippedMissing:0,skippedExisting:0,errors:0};for(let i of e.toRemove)try{await IVe(n,i)?t.removed+=1:t.skippedMissing+=1}catch(s){t.errors+=1,(r=n.onRemoveError)==null||r.call(n,s,i)}for(let i of e.toAdd)try{await MVe(n,i)?t.added+=1:t.skippedExisting+=1}catch(s){t.errors+=1,(a=n.onAddError)==null||a.call(n,s,i)}return t}function AVe(n,e,t){return(Array.isArray(n)?n:[]).filter(a=>typeof a=="string"&&a!==e&&a!==t)}async function MVe(n,e){let t=await n.getTaskInfo(e.path);if(!t)return!1;let r=n.buildProjectReference(n.parentTaskFile,e.path),a=`[[${n.parentTaskFile.basename}]]`,i=X2(t.projects,r,a);return i?(await n.updateTaskProjects(t,i),!0):!1}async function IVe(n,e){let t=await n.getTaskInfo(e.path);if(!t)return!1;let r=n.buildProjectReference(n.parentTaskFile,e.path),a=`[[${n.parentTaskFile.basename}]]`,i=AVe(t.projects,r,a);return await n.updateTaskProjects(t,i),!0}q();var ic=M({tag:"Modals/TaskEditModal"}),RC=class extends yv{constructor(t,r,a){super(t,r);this.editModalKeyboardHandler=null;this.completedInstancesChanges=[];this.skippedInstancesChanges=[];this.initialBlockedBy=[];this.initialBlockingPaths=[];this.pendingBlockingUpdates={added:[],removed:[],raw:{}};this.unresolvedBlockingEntries=[];this.initialTags="";this.isShowingConfirmation=!1;this.pendingClose=!1;this.isConvertingNoteToTask=!1;this.isExpanded=!0;this.task=a.task,this.options=a}getCurrentTaskPath(){return this.task.path}getModalTitle(){return this.t("modals.taskEdit.title")}isEditMode(){return!0}focusTitleInput(){this.isMobileLikeEnvironment()||super.focusTitleInput()}async initializeFormData(){var r,a,i;let t=Iue({app:this.app,task:this.task,details:this.details,settings:{taskIdentificationMethod:this.plugin.settings.taskIdentificationMethod,taskTag:this.plugin.settings.taskTag,hideIdentifyingTagsInCards:this.plugin.settings.hideIdentifyingTagsInCards,hideIdentifyingTagsMode:this.plugin.settings.hideIdentifyingTagsMode,userFields:(r=this.plugin.settings)==null?void 0:r.userFields},normalizeDetails:s=>this.normalizeDetails(s)});this.title=t.title,this.dueDate=t.dueDate,this.scheduledDate=t.scheduledDate,this.priority=t.priority,this.status=t.status,this.contexts=t.contexts,t.hasValidProjects?this.initializeProjectsFromStrings(t.projectValues):(this.projects="",this.selectedProjectItems=[]),this.tags=t.tags,this.initialTags=t.initialTags,this.timeEstimate=t.timeEstimate,this.recurrenceRule=t.recurrenceRule,this.recurrenceAnchor=t.recurrenceAnchor,this.reminders=t.reminders,this.details=t.details,this.originalDetails=t.originalDetails,this.userFields=t.userFields,await this.initializeSubtasks(),this.blockedByItems=((a=this.task.blockedBy)!=null?a:[]).map(s=>this.createDependencyItemFromDependency(s,this.task.path)),this.initialBlockedBy=this.blockedByItems.map(s=>({...s.dependency})),this.blockingItems=((i=this.task.blocking)!=null?i:[]).map(s=>this.createDependencyItemFromPath(s)),this.initialBlockingPaths=this.blockingItems.filter(s=>s.path).map(s=>s.path),this.pendingBlockingUpdates={added:[],removed:[],raw:{}},this.unresolvedBlockingEntries=[]}showReminderContextMenu(t){MM(this.getActionMenuContext(),t,this.task)}onOpen(){this.openEditModal()}async openEditModal(){this.completedInstancesChanges=[],this.skippedInstancesChanges=[],await this.refreshTaskData(),this.containerEl.addClass("tasknotes-plugin","minimalist-task-modal","expanded"),this.plugin.settings.enableModalSplitLayout&&this.containerEl.addClass("split-layout-enabled"),this.modalEl.addClass("mod-tasknotes"),this.titleEl.setText(this.getModalTitle()),this.editModalKeyboardHandler=t=>{t.key==="Enter"&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),(async()=>(await this.handleSave(),this.forceClose()))())},this.containerEl.addEventListener("keydown",this.editModalKeyboardHandler),this.initializeFormData().then(()=>{this.createModalContent(),this.renderProjectsList(),this.updateIconStates(),this.focusTitleInput()})}async refreshTaskData(){try{let t=this.app.vault.getAbstractFileByPath(this.task.path);if(!t||!(t instanceof qn.TFile)){ic.warn("Could not find file for task:",{category:"stale-data",operation:"find-file-task",details:{value:this.task.path}});return}let r=await this.app.vault.read(t);this.details=this.extractDetailsFromContent(r),this.originalDetails=this.details;let a=this.app.metadataCache.getFileCache(t);if(!((a==null?void 0:a.frontmatter)&&this.plugin.cacheManager.isTaskFile(a.frontmatter))){this.isConvertingNoteToTask=!0,this.task.details=this.details;return}this.isConvertingNoteToTask=!1;let s=await this.plugin.cacheManager.getTaskInfo(this.task.path);if(s)s.details=this.details,this.task=s,this.options.task=s;else{let o=Hte(this.app,r,this.task.path,t,this.plugin.fieldMapper,this.plugin.settings.storeTitleInFilename,this.plugin.settings.defaultTaskStatus);o&&(o.details=this.details,this.task=o,this.options.task=o)}}catch(t){ic.warn("Could not refresh task data:",{category:"stale-data",operation:"refresh-task-data",error:t})}}createPrimaryInput(t){}createAdditionalSections(t){xue(t,{task:this.task,plugin:this.plugin,completedInstancesChanges:this.completedInstancesChanges,skippedInstancesChanges:this.skippedInstancesChanges,translate:(r,a)=>this.t(r,a)}),this.createMetadataSection(t)}forceClose(){this.pendingClose=!0,super.close()}close(){if(this.pendingClose){this.pendingClose=!1,super.close();return}if(this.isShowingConfirmation)return;let t=this.getChanges();if(!(Object.keys(t).length>0)){super.close();return}this.showUnsavedChangesConfirmation()}async showUnsavedChangesConfirmation(){this.isShowingConfirmation=!0;try{let t=await this.showThreeButtonConfirmation();if(t==="save")try{await this.handleSave(),this.forceClose()}catch(r){ic.error("Save failed during close confirmation:",{category:"persistence",operation:"save-close-confirmation",error:r})}else t==="discard"&&this.forceClose()}finally{this.isShowingConfirmation=!1}}showThreeButtonConfirmation(){return new Promise(t=>{new Hy(this.app,{title:this.t("modals.task.unsavedChanges.title"),message:this.t("modals.task.unsavedChanges.message"),confirmText:this.t("modals.task.unsavedChanges.save"),cancelText:this.t("modals.task.unsavedChanges.discard"),thirdButtonText:this.t("modals.task.unsavedChanges.cancel"),defaultToConfirm:!0,onThirdButton:()=>t("cancel")}).show().then(a=>{t(a?"save":"discard")})})}onClose(){this.editModalKeyboardHandler&&(this.containerEl.removeEventListener("keydown",this.editModalKeyboardHandler),this.editModalKeyboardHandler=null),super.onClose()}createMetadataSection(t){var o,l;this.metadataContainer=t.createDiv("metadata-container");let r=this.metadataContainer.createDiv("detail-label");r.textContent=this.t("modals.taskEdit.sections.taskInfo");let a=this.metadataContainer.createDiv("metadata-content"),i=(l=(o=this.plugin.settings.calendarViewSettings)==null?void 0:o.timeFormat)!=null?l:"24",s=oi(this.task.timeEntries||[]);s>0&&this.createMetadataItem(a,this.t("modals.taskEdit.metadata.totalTrackedTime"),_0(s)),this.task.due&&this.createMetadataItem(a,this.t("modals.taskEdit.metadata.due"),Sn(this.task.due,{userTimeFormat:i})),this.task.scheduled&&this.createMetadataItem(a,this.t("modals.taskEdit.metadata.scheduled"),Sn(this.task.scheduled,{userTimeFormat:i})),this.task.dateCreated&&this.createMetadataItem(a,this.t("modals.taskEdit.metadata.created"),S0(this.task.dateCreated)),this.task.dateModified&&this.createMetadataItem(a,this.t("modals.taskEdit.metadata.modified"),S0(this.task.dateModified)),this.task.path&&this.createMetadataItem(a,this.t("modals.taskEdit.metadata.file"),this.task.path)}createMetadataItem(t,r,a){let i=t.createDiv("metadata-item");i.createSpan("metadata-key").textContent=`${r} `,i.createSpan("metadata-value").textContent=a}async handleSave(){if(!this.validateForm()){new qn.Notice(this.t("modals.taskEdit.notices.titleRequired"));return}try{let t=this.getChanges({includeConversionWrite:!0}),r=this.pendingBlockingUpdates.added.length>0||this.pendingBlockingUpdates.removed.length>0,a=Object.keys(t).length>0,i=this.hasSubtaskChanges();if(this.unresolvedBlockingEntries.length>0&&!r&&(new qn.Notice(this.t("modals.taskEdit.notices.blockingUnresolved",{entries:this.unresolvedBlockingEntries.join(", ")})),this.unresolvedBlockingEntries=[]),!a&&!r&&!i){new qn.Notice(this.t("modals.taskEdit.notices.noChanges")),this.close();return}let s=this.task;if(a&&(s=await this.plugin.taskService.updateTask(this.task,t),this.task=s,Object.prototype.hasOwnProperty.call(t,"details"))){let o=Y(t.details);this.details=o,this.originalDetails=o}if(r){await this.plugin.taskService.updateBlockingRelationships(s,this.pendingBlockingUpdates.added,this.pendingBlockingUpdates.removed,this.pendingBlockingUpdates.raw);let o=await this.plugin.cacheManager.getTaskInfo(s.path);o&&(s=o,this.task=o)}i&&await this.applySubtaskChanges(s),this.unresolvedBlockingEntries.length>0&&new qn.Notice(this.t("modals.taskEdit.notices.blockingUnresolved",{entries:this.unresolvedBlockingEntries.join(", ")})),this.options.onTaskUpdated&&this.options.onTaskUpdated(s),a?new qn.Notice(this.t("modals.taskEdit.notices.updateSuccess",{title:s.title})):r&&new qn.Notice(this.t("modals.taskEdit.notices.dependenciesUpdateSuccess")),this.pendingBlockingUpdates={added:[],removed:[],raw:{}},this.unresolvedBlockingEntries=[]}catch(t){ic.error("Failed to update task:",{category:"validation",operation:"update-task",error:t});let r=t instanceof Error&&t.message?t.message:String(t);new qn.Notice(this.t("modals.taskEdit.notices.updateFailure",{message:r}))}}getChanges(t={}){var a;let r=Mue({app:this.app,task:this.task,title:this.title,dueDate:this.dueDate,scheduledDate:this.scheduledDate,priority:this.priority,status:this.status,contexts:this.contexts,projects:this.projects,tags:this.tags,initialTags:this.initialTags,timeEstimate:this.timeEstimate,recurrenceRule:this.recurrenceRule,recurrenceAnchor:this.recurrenceAnchor,reminders:this.reminders,blockedByItems:this.blockedByItems,initialBlockedBy:this.initialBlockedBy,blockingItems:this.blockingItems,initialBlockingPaths:this.initialBlockingPaths,details:this.details,originalDetails:this.originalDetails,completedInstancesChanges:this.completedInstancesChanges,skippedInstancesChanges:this.skippedInstancesChanges,userFields:this.userFields,settings:{userFields:(a=this.plugin.settings)==null?void 0:a.userFields,taskIdentificationMethod:this.plugin.settings.taskIdentificationMethod,taskTag:this.plugin.settings.taskTag,hideIdentifyingTagsMode:this.plugin.settings.hideIdentifyingTagsMode,maintainDueDateOffsetInRecurring:this.plugin.settings.maintainDueDateOffsetInRecurring},normalizeDetails:i=>this.normalizeDetails(i)});return this.pendingBlockingUpdates=r.blockingUpdates,this.unresolvedBlockingEntries=r.unresolvedBlockingEntries,t.includeConversionWrite&&this.isConvertingNoteToTask&&Object.keys(r.changes).length===0&&(r.changes.dateModified=qe()),r.changes}async openTaskNote(){try{let t=this.app.vault.getAbstractFileByPath(this.task.path);if(!(t instanceof qn.TFile)){new qn.Notice(this.t("modals.taskEdit.notices.fileMissing",{path:this.task.path}));return}await this.app.workspace.getLeaf(!0).openFile(t),this.close()}catch(t){ic.error("Failed to open task note:",{category:"persistence",operation:"open-task-note",error:t}),new qn.Notice(this.t("modals.taskEdit.notices.openNoteFailure"))}}async archiveTask(){try{let t=await this.plugin.taskService.toggleArchive(this.task);this.task=t,this.options.onTaskUpdated&&this.options.onTaskUpdated(t);let r=t.archived?"modals.taskEdit.archiveAction.archived":"modals.taskEdit.archiveAction.unarchived",a=this.t(r);new qn.Notice(this.t("modals.taskEdit.notices.archiveSuccess",{action:a})),this.close()}catch(t){ic.error("Failed to archive task:",{category:"persistence",operation:"archive-task",error:t}),new qn.Notice(this.t("modals.taskEdit.notices.archiveFailure"))}}async deleteTask(){if(await ur(this.app,{title:this.t("modals.taskEdit.deleteConfirmation.title"),message:this.t("modals.taskEdit.deleteConfirmation.message",{title:this.task.title}),confirmText:this.t("modals.taskEdit.deleteConfirmation.confirm"),cancelText:this.t("common.cancel"),isDestructive:!0}))try{await this.plugin.taskService.deleteTask(this.task),new qn.Notice(this.t("modals.taskEdit.notices.deleteSuccess",{title:this.task.title})),this.forceClose()}catch(r){let a=r instanceof Error?r.message:String(r);ic.error("Failed to delete task:",{category:"persistence",operation:"delete-task",error:r}),new qn.Notice(this.t("modals.taskEdit.notices.deleteFailure",{message:a}))}}createActionButtons(t){EM(this.getActionButtonContext(),{container:t,leadingButtons:[{className:"tn-task-modal__open-note-button",text:this.t("modals.task.buttons.openNote"),onClick:()=>{this.openTaskNote()}},{className:"mod-warning tn-task-modal__archive-button",text:this.task.archived?this.t("modals.taskEdit.buttons.unarchive"):this.t("modals.taskEdit.buttons.archive"),onClick:()=>{this.archiveTask()}},{className:"mod-warning tn-task-modal__delete-button",text:this.t("contextMenus.task.delete"),onClick:()=>{this.deleteTask()}}],onSave:()=>this.handleSave(),onSaved:()=>{this.forceClose()},onCancel:()=>{this.close()}})}async initializeSubtasks(){try{let t=this.app.vault.getAbstractFileByPath(this.task.path);if(!(t instanceof qn.TFile))return;let r=await this.plugin.projectSubtasksService.getTasksLinkedToProject(t),a=this.plugin.projectSubtasksService.sortTasks([...r]);this.selectedSubtaskFiles=[],this.initialSubtaskFiles=[];for(let i of a){let s=this.app.vault.getAbstractFileByPath(i.path);s&&(this.selectedSubtaskFiles.push(s),this.initialSubtaskFiles.push(s))}}catch(t){ic.error("Error initializing subtasks:",{category:"persistence",operation:"initializing-subtasks",error:t})}}hasSubtaskChanges(){return Nue(this.initialSubtaskFiles,this.selectedSubtaskFiles)}async applySubtaskChanges(t){let r=this.app.vault.getAbstractFileByPath(t.path);if(!(r instanceof qn.TFile))return;let a=await Rue({parentTaskFile:r,selectedSubtaskFiles:this.selectedSubtaskFiles,initialSubtaskFiles:this.initialSubtaskFiles,getTaskInfo:i=>this.plugin.cacheManager.getTaskInfo(i),buildProjectReference:(i,s)=>this.buildProjectReference(i,s),updateTaskProjects:(i,s)=>this.plugin.updateTaskProperty(i,"projects",s),onAddError:i=>{ic.error("Failed to add subtask relation:",{category:"persistence",operation:"add-subtask-relation",error:i})},onRemoveError:i=>{ic.error("Failed to remove subtask relation:",{category:"persistence",operation:"remove-subtask-relation",error:i})}});this.initialSubtaskFiles=a.nextInitialSubtaskFiles}};co();py();yt();xe();xe();var _ue=require("obsidian"),NVe="en";function Fue(n,e=""){let t={};return Object.entries(n).forEach(([r,a])=>{let i=e?`${e}.${r}`:r;typeof a=="string"?t[i]=a:a&&typeof a=="object"&&Object.assign(t,Fue(a,i))}),t}function RVe(n,e){return e?n.replace(/\{(\w+)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(e,r)?String(e[r]):`{${r}}`):n}function HM(n){return n.toLowerCase().split("-")[0]}var VM=class extends _ue.Events{constructor(t){var a,i;super();this.cache={};this.resources=t.resources,this.defaultLocale=t.defaultLocale,this.fallbackLocale=(a=t.fallbackLocale)!=null?a:NVe,this.getSystemLocaleFn=t.getSystemLocale;let r=(i=t.initialLocale)!=null?i:this.defaultLocale;this.currentLocale=this.resolveLocale(r)}getAvailableLocales(){return Object.keys(this.resources)}getNativeLanguageName(t){return{en:"English",fr:"Français",de:"Deutsch",es:"Español",pt:"Português",ru:"Русский",zh:"中文",ja:"日本語"}[t]||t}getCurrentLocale(){return this.currentLocale}setLocale(t){let r=this.resolveLocale(t);if(r===this.currentLocale)return;let a=this.currentLocale;this.currentLocale=r;let i={previous:a,current:r};this.trigger("locale-changed",i)}translate(t,r){var i;let a=(i=this.resolveKey(t))!=null?i:t;return RVe(a,r)}translatePlural(t,r,a){let i=this.getPluralKey(t,r),s={...a,count:r};return this.translate(i,s)}resolveKey(t){let r=[this.currentLocale,this.fallbackLocale,this.defaultLocale];for(let a of r){let i=this.getLocaleMap(a);if(i&&Object.prototype.hasOwnProperty.call(i,t))return i[t]}}getSystemLocale(){if(this.getSystemLocaleFn){let t=this.getSystemLocaleFn();if(t)return HM(t)}return typeof navigator!="undefined"&&navigator.language?HM(navigator.language):this.defaultLocale}getLocaleMap(t){let r=HM(t);if(!this.cache[r]){let a=this.resources[r];if(!a)return{};this.cache[r]=Fue(a)}return this.cache[r]}resolveLocale(t){let r=HM(t);if(this.resources[r])return r;if(t==="system"){let i=this.getSystemLocale();if(this.resources[i])return i}if(this.resources[this.defaultLocale])return this.defaultLocale;let a=this.getAvailableLocales()[0];return a!=null?a:this.fallbackLocale}getPluralKey(t,r){let a;switch(r){case 0:a="zero";break;case 1:a="one";break;default:a="other";break}let i=`${t}.${a}`,s=[this.currentLocale,this.fallbackLocale,this.defaultLocale];for(let o of s)if(this.getLocaleMap(o)[i])return i;return t}};var Lue={common:{appName:"TaskNotes",new:"New",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",reorder:{confirmLargeTitle:"Confirm large reorder",confirmButton:"Reorder notes",confirmLargeMessage:'Reordering here will update "{field}" in {count} notes to create a persistent manual order for {scope}. Hidden or filtered notes in the same scope may also be updated. Continue?'},language:"Language",systemDefault:"System default",loading:"Loading...",languages:{en:"English",fr:"French",ru:"Russian",zh:"Chinese",de:"German",es:"Spanish",ja:"Japanese",pt:"Portuguese (Brazil)",ko:"Korean"},weekdays:{sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday"},months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"}},views:{agenda:{title:"Agenda",today:"Today",overdue:"Overdue",refreshCalendars:"Refresh calendars",actions:{previousPeriod:"Previous period",nextPeriod:"Next period",goToToday:"Go to today",refreshCalendars:"Refresh calendar subscriptions"},loading:"Loading agenda...",dayToggle:"Toggle day",overdueToggle:"Toggle overdue section",expandAllDays:"Expand all days",collapseAllDays:"Collapse all days",notices:{calendarNotReady:"Calendar service not ready yet",calendarRefreshed:"Calendar subscriptions refreshed",refreshFailed:"Failed to refresh"},empty:{noItemsScheduled:"No items scheduled",noItemsFound:"No items found",helpText:"Create tasks with due or scheduled dates, or add notes to see them here."},contextMenu:{showOverdueSection:"Show overdue section",showNotes:"Show notes",calendarSubscriptions:"Calendar subscriptions"},periods:{thisWeek:"This week"},tipPrefix:"Tip: "},taskList:{title:"Tasks",expandAllGroups:"Expand all groups",collapseAllGroups:"Collapse all groups",noTasksFound:"No tasks found for the selected filters.",reorder:{scope:{ungrouped:"this ungrouped list",group:'group "{group}"'}},errors:{formulaGroupingReadOnly:"Cannot reorder tasks in formula-based groups. Formula values are computed and cannot be directly modified."}},notes:{title:"Notes",refreshButton:"Refresh",refreshingButton:"Refreshing...",notices:{indexingDisabled:"Note indexing disabled"},empty:{noNotesFound:"No notes found",helpText:"No notes found for the selected date. Try selecting a different date in the mini calendar view or create some notes."},loading:"Loading notes...",refreshButtonAriaLabel:"Refresh notes list"},miniCalendar:{title:"Mini calendar",contextMenu:{openDailyNote:"Open daily note",openWeeklyNote:"Open weekly note"}},advancedCalendar:{title:"Calendar",filters:{showFilters:"Show filters",hideFilters:"Hide filters"},viewOptions:{calendarSubscriptions:"Calendar subscriptions",timeEntries:"Time entries",timeblocks:"Timeblocks",scheduledDates:"Scheduled dates",dueDates:"Due dates",allDaySlot:"All-day slot",scheduledTasks:"Scheduled tasks",recurringTasks:"Recurring tasks"},buttons:{refresh:"Refresh",refreshHint:"Refresh calendar subscriptions"},notices:{icsServiceNotAvailable:"ICS subscription service not available",calendarRefreshedAll:"All calendar subscriptions refreshed successfully",refreshFailed:"Failed to refresh some calendar subscriptions",timeblockSpecificTime:"Timeblocks must have specific times. Please select a time range in week or day view.",timeblockMoved:'Moved timeblock "{title}" to {date}',timeblockUpdated:'Updated timeblock "{title}" time',timeblockMoveFailed:"Failed to move timeblock: {message}",timeblockResized:'Updated timeblock "{title}" duration',timeblockResizeFailed:"Failed to resize timeblock: {message}",taskScheduled:'Task "{title}" scheduled for {date}',scheduleTaskFailed:"Failed to schedule task",endTimeAfterStart:"End time must be after start time",timeEntryNotFound:"Time entry not found",timeEntryDeleted:"Time entry deleted",deleteTimeEntryFailed:"Failed to delete time entry"},timeEntry:{estimatedSuffix:"estimated",trackedSuffix:"tracked",recurringPrefix:"Recurring: ",completedPrefix:"Completed: ",createdPrefix:"Created: ",modifiedPrefix:"Modified: ",duePrefix:"Due: ",scheduledPrefix:"Scheduled: "},contextMenus:{openTask:"Open task",deleteTimeEntry:"Delete time entry",deleteTimeEntryTitle:"Delete time entry",deleteTimeEntryConfirm:"Are you sure you want to delete this time entry{duration}? This action cannot be undone.",deleteButton:"Delete",cancelButton:"Cancel"}},basesCalendar:{title:"Bases calendar",today:"Today",buttonText:{month:"M",week:"W",day:"D",year:"Y",list:"L",customDays:"{count}D",listDays:"{count}d List",refresh:"Refresh"},hints:{refresh:"Refresh calendar subscriptions",today:"Go to today",prev:"Previous",next:"Next",month:"Month view",week:"Week view",day:"Day view",year:"Year view",list:"List view",customDays:"{count}-day view"},settings:{groups:{dateNavigation:"Date navigation",events:"Events",layout:"Layout",view:"View",display:"Display",timeGrid:"Time grid",eventLayout:"Event layout",propertyBasedEvents:"Property-based events",calendarSubscriptions:"Calendar subscriptions",googleCalendars:"Google calendars",microsoftCalendars:"Microsoft calendars"},dateNavigation:{navigateToDate:"Navigate to date",navigateToDatePlaceholder:"YYYY-MM-DD (e.g., 2025-01-15) - leave empty to use property",navigateToDateFromProperty:"Navigate to date from property",navigateToDateFromPropertyPlaceholder:"Select a date property (optional)",propertyNavigationStrategy:"Property navigation strategy",createDailyNotesFromDateLinks:"Create daily notes from date links",strategies:{first:"First result",earliest:"Earliest date",latest:"Latest date"}},events:{showScheduledTasks:"Show scheduled tasks",showDueTasks:"Show due tasks",showOverdueOnToday:"Show overdue tasks on today",showRecurringTasks:"Show recurring tasks",showCompletedRecurringInstances:"Show completed recurring instances",showSkippedRecurringInstances:"Show skipped recurring instances",showTimeEntries:"Show time entries",showTimeblocks:"Show timeblocks",showPropertyBasedEvents:"Show property-based events"},layout:{calendarView:"Calendar view",heightMode:"Height mode",heightModeFill:"Fill container",heightModeAuto:"Auto height",customDayCount:"Custom day count",listDayCount:"List day count",dayStartTime:"Day start time",dayStartTimePlaceholder:"HH:mm:ss (e.g., 08:00:00)",dayEndTime:"Day end time",dayEndTimePlaceholder:"HH:mm:ss (e.g., 20:00:00)",timeSlotDuration:"Time slot duration",timeSlotDurationPlaceholder:"HH:mm:ss (e.g., 00:30:00)",dragDropResolution:"Drag/drop resolution",dragDropResolutionPlaceholder:"HH:mm:ss (e.g., 00:05:00)",weekStartsOn:"Week starts on",showWeekNumbers:"Show week numbers",showNowIndicator:"Show now indicator",showWeekends:"Show weekends",showAllDaySlot:"Show all-day slot",showTimeGrid:"Show hourly breakdown",showTodayHighlight:"Show today highlight",todayColumnWidthMultiplier:"Today column width multiplier",showSelectionPreview:"Show selection preview",timeFormat:"Time format",timeFormat12:"12-hour (AM/PM)",timeFormat24:"24-hour",initialScrollTime:"Initial scroll time",initialScrollTimePlaceholder:"HH:mm:ss (e.g., 08:00:00)",minimumEventHeight:"Minimum event height (px)",slotEventOverlap:"Allow events to overlap",enableSearch:"Enable search box",eventMaxStack:"Max stacked events (week/day view, 0 = unlimited)",dayMaxEvents:"Max events per day (month view, 0 = auto)",dayMaxEventRows:"Max event rows per day (month view, 0 = unlimited)",spanScheduledToDue:"Span tasks between scheduled and due dates"},propertyBasedEvents:{startDateProperty:"Start date property",startDatePropertyPlaceholder:"Select property for start date/time",endDateProperty:"End date property (optional)",endDatePropertyPlaceholder:"Select property for end date/time",titleProperty:"Title property (optional)",titlePropertyPlaceholder:"Select property for event title"}},notices:{noDailyNoteForDate:"No daily note exists for this date."},errors:{failedToInitialize:"Failed to initialize calendar"}},kanban:{title:"Kanban",newTask:"New task",addCard:"+ Add a card",noTasks:"No tasks",uncategorized:"Uncategorized",noProject:"No project",reorder:{scope:{column:'column "{group}"',columnInSwimlane:'column "{group}" in swimlane "{swimlane}"'}},notices:{loadFailed:"Failed to load Kanban board",movedTask:'Task moved to "{0}"'},errors:{loadingBoard:"Error loading board.",noGroupBy:"Kanban view requires a 'group by' property to be configured. Click the 'sort' button and select a property under 'group by'.",formulaGroupingReadOnly:"Cannot move tasks between formula-based columns. Formula values are computed and cannot be directly modified.",formulaSwimlaneReadOnly:"Cannot move tasks between formula-based swimlanes. Formula values are computed and cannot be directly modified."},columnTitle:"Untitled"},pomodoro:{title:"Pomodoro",status:{focus:"Focus",ready:"Ready to start",paused:"Paused",working:"Working",shortBreak:"Short break",longBreak:"Long break",breakPrompt:"Great work! Time for a {length} break",breakLength:{short:"short",long:"long"},breakComplete:"Break complete! Ready for the next Pomodoro?"},meta:{ready:"{time} planned · {count} completed today",running:"{time} left · Ends at {endTime}",paused:"{type} paused · {time} left",breakReady:"{type} ready · {time} planned"},timer:{editLabel:"Edit timer duration",inputLabel:"Timer duration"},buttons:{start:"Start",startFocus:"Start focus",pause:"Pause",stop:"Stop",resume:"Resume",startShortBreak:"Start short break",startLongBreak:"Start long break",skipBreak:"Skip break",chooseTask:"Choose task...",changeTask:"Change task...",clearTask:"Clear task",selectDifferentTask:"Select a different task",addMinute:"Add one minute",subtractMinute:"Subtract one minute"},notices:{noTasks:"No unarchived tasks found. Create some tasks first.",loadFailed:"Failed to load tasks",invalidDuration:"Enter a duration like 10, 10:30, or 1:30:00."},statsLabel:"completed today"},pomodoroStats:{title:"Pomodoro stats",heading:"Pomodoro statistics",refresh:"Refresh",basesMigration:{title:"Want a base view?",description:"Pomodoro base views use daily notes frontmatter; to see this history in the generated Pomodoro statistics base, migrate Pomodoro data in settings, then set storage to daily notes."},sections:{overview:"Overview",today:"Today",week:"This week",allTime:"All time",recent:"Recent sessions"},overviewCards:{todayPomos:{label:"Today's pomos",change:{more:"{count} more than yesterday",less:"{count} fewer than yesterday"}},totalPomos:{label:"Total pomos"},todayFocus:{label:"Today's focus",change:{more:"{duration} more than yesterday",less:"{duration} less than yesterday"}},totalFocus:{label:"Total focus duration"}},stats:{pomodoros:"Pomodoros",streak:"Streak",minutes:"Minutes",average:"Avg length",completion:"Completion"},recents:{empty:"No sessions recorded yet",duration:"{minutes} min",delete:"Delete session",deleteAria:"Delete Pomodoro session",deleteConfirmTitle:"Delete Pomodoro session?",deleteConfirmMessage:"This removes the session from Pomodoro history. Existing task time entries are not changed.",deleteConfirmButton:"Delete",deleteSuccess:"Pomodoro session deleted",deleteNotFound:"Pomodoro session was not found",status:{completed:"Completed",interrupted:"Interrupted"}}},stats:{title:"Statistics",taskProjectStats:"Task & project statistics",sections:{filters:"Filters",overview:"Overview",today:"Today",thisWeek:"This week",thisMonth:"This month",projectBreakdown:"Project breakdown",dateRange:"Date range"},filters:{minTime:"Min time (minutes)",allTasks:"All tasks",activeOnly:"Active only",completedOnly:"Completed only"},refreshButton:"Refresh",timeRanges:{allTime:"All time",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",customRange:"Custom range"},resetFiltersButton:"Reset filters",dateRangeFrom:"From",dateRangeTo:"To",noProject:"No project",cards:{timeTrackedEstimated:"Time tracked / estimated",totalTasks:"Total tasks",completionRate:"Completion rate",activeProjects:"Active projects",avgTimePerTask:"Avg time per task"},labels:{tasks:"Tasks",completed:"Completed",projects:"Projects"},noProjectData:"No project data available",notAvailable:"N/A",noTasks:"No tasks found",loading:"Loading..."},releaseNotes:{title:"What's new in TaskNotes {version}",header:"What's new in TaskNotes {version}",viewAllLink:"View all release notes on GitHub →",starMessage:"We really appreciate all feedback. If something does not feel right, please let us know on GitHub. If you find TaskNotes useful, please consider giving it a star.",baseFilesNotice:"> [!info] About default `.base` files\n> Updates to default generated `.base` templates do not overwrite your existing `.base` files, so your customizations stay safe.\n> If you want the newest template improvements, regenerate base files in **Settings → TaskNotes → General → Views & base files → Update files**."}},settings:{header:{documentation:"Documentation",documentationUrl:"https://tasknotes.dev"},tabs:{general:"General",taskProperties:"Task properties",modalFields:"Modal fields",defaults:"Defaults & templates",appearance:"Appearance & UI",features:"Features",integrations:"Integrations"},features:{inlineTasks:{header:"Inline tasks",description:"Settings for task links and checkbox-to-task conversion in notes."},taskCreation:{header:"Task creation",description:"Configure what happens after tasks are created.",openAfterCreate:{name:"Open task after creation",description:"Choose whether the task creation modal opens the new task note after saving.",options:{none:"Do not open",sameTab:"Open in the same tab",newTab:"Open in a new tab"}}},overlays:{taskLinkToggle:{name:"Task link overlay",description:"Show interactive overlays when hovering over task links"},aliasExclusion:{name:"Disable overlay for aliased links",description:"Do not show the task widget if the link contains an alias (e.g. [[Task|Alias]])."}},instantConvert:{toggle:{name:"Show convert button next to checkboxes",description:"Display an inline button next to Markdown checkboxes that converts them to TaskNotes"},preserveCheckbox:{name:"Keep checkbox when converting",description:"Leave the original Markdown checkbox marker in place when converting a checkbox to a TaskNote link"},folder:{name:"Folder for inline-created tasks",description:"Folder where tasks created from inline commands or checkbox conversion will be created. Leave empty to use the default tasks folder. Use {{currentNotePath}} for the current note's folder, or {{currentNoteTitle}} for a subfolder named after the current note."}},nlp:{header:"Natural language processing",description:"Parse dates, priorities, and other properties from text input.",enable:{name:"Enable natural language task input",description:"Parse due dates, priorities, and contexts from natural language when creating tasks"},defaultToScheduled:{name:"Default to scheduled",description:"When NLP detects a date without context, treat it as scheduled rather than due"},language:{name:"NLP language",description:"Language for natural language processing patterns and date parsing"},statusTrigger:{name:"Status suggestion trigger",description:"Text to trigger status suggestions (leave empty to disable)"}},pomodoro:{header:"Pomodoro timer",description:"Configure work/break intervals for the Pomodoro timer.",workDuration:{name:"Work duration",description:"Duration of work intervals in minutes"},shortBreak:{name:"Short break duration",description:"Duration of short breaks in minutes"},longBreak:{name:"Long break duration",description:"Duration of long breaks in minutes"},longBreakInterval:{name:"Long break interval",description:"Number of work sessions before a long break"},autoStartBreaks:{name:"Auto-start breaks",description:"Automatically start break timers after work sessions"},autoStartWork:{name:"Auto-start work",description:"Automatically start work sessions after breaks"},notifications:{name:"Pomodoro notifications",description:"Show notifications when Pomodoro sessions end"},statusBar:{name:"Show Pomodoro in status bar",description:"Display the active Pomodoro countdown in Obsidian's status bar"},mobileSidebar:{name:"Mobile sidebar",description:"Where to open the Pomodoro timer on mobile devices",tab:"Note panel",left:"Left sidebar",right:"Right sidebar"}},uiLanguage:{header:"Interface language",description:"Change the language of TaskNotes menus, notices, and views.",dropdown:{name:"UI language",description:"Select the language used for TaskNotes interface text"}},pomodoroSound:{enabledName:"Sound enabled",enabledDesc:"Play sound when Pomodoro sessions end",volumeName:"Sound volume",volumeDesc:"Volume for Pomodoro sounds (0-100)"},dataStorage:{name:"Pomodoro data storage",description:"Configure where Pomodoro session data is stored and how it's managed.",dailyNotes:"Daily notes",pluginData:"Plugin data",notices:{locationChanged:"Pomodoro storage location changed to {location}"}},notifications:{header:"Notifications",description:"Configure task reminder notifications and alerts.",enableName:"Enable notifications",enableDesc:"Enable task reminder notifications",typeName:"Notification type",typeDesc:"Type of notifications to show",systemLabel:"System notifications",inAppLabel:"In-app notifications",soundEnabledName:"Notification sound",soundEnabledDesc:"Play a sound when task reminders trigger",soundVolumeName:"Sound volume",soundVolumeDesc:"Volume for task reminder sounds (0-100)",soundPreviewName:"Preview notification sound",soundPreviewDesc:"Play the configured task reminder sound",soundPreviewButton:"Preview",testReminderName:"Send test reminder",testReminderDesc:"Send a test reminder using the current notification type and sound settings.",testReminderButton:"Send test"},overdue:{hideCompletedName:"Hide completed tasks from overdue",hideCompletedDesc:"Exclude completed tasks from overdue task calculations"},indexing:{disableName:"Disable note indexing",disableDesc:"Disable automatic indexing of note content for better performance"},suggestions:{debounceName:"Suggestion debounce",debounceDesc:"Delay in milliseconds before showing suggestions"},timeTracking:{autoStopName:"Auto-stop time tracking",autoStopDesc:"Automatically stop time tracking when a task is marked complete",stopNotificationName:"Time tracking stop notification",stopNotificationDesc:"Show notification when time tracking is automatically stopped"},recurring:{maintainOffsetName:"Maintain due date offset in recurring tasks",maintainOffsetDesc:"Keep the offset between due date and scheduled date when recurring tasks are completed",resetCheckboxesName:"Reset checkboxes on recurrence",resetCheckboxesDesc:"Reset all Markdown checkboxes in the task body when a recurring task is completed and rescheduled"},timeblocking:{header:"Timeblocking",description:"Configure timeblock functionality for lightweight scheduling in daily notes. Drag on calendar views to create events - select 'Timeblock' from the context menu.",enableName:"Enable timeblocking",enableDesc:"Enable timeblocking feature for lightweight scheduling in daily notes. When enabled, 'Timeblock' option appears in the calendar drag context menu.",showBlocksName:"Show timeblocks",showBlocksDesc:"Display timeblocks from daily notes by default",defaultColorName:"Default timeblock color",defaultColorDesc:"The default color used when creating new timeblocks",usage:"Usage: Drag on the calendar to create events. Select 'Timeblock' from the context menu (only visible when timeblocking is enabled). Drag to move existing timeblocks. Resize edges to adjust duration."},performance:{header:"Performance & behavior",description:"Configure plugin performance and behavioral options."},timeTrackingSection:{header:"Time tracking",description:"Configure automatic time tracking behaviors."},recurringSection:{header:"Recurring tasks",description:"Configure behavior for recurring task management."},debugLogging:{header:"Debug logging",description:"Configure debug log output for troubleshooting.",enableName:"Enable debug logging",enableDesc:"Log detailed drag-and-drop and view diagnostics to the developer console. Useful for troubleshooting."}},defaults:{header:{basicDefaults:"Basic defaults",dateDefaults:"Date defaults",defaultReminders:"Default reminders",bodyTemplate:"Body template",instantTaskConversion:"Instant task conversion"},description:{basicDefaults:"Set default values for new tasks to speed up task creation.",dateDefaults:"Set default due and scheduled dates for new tasks.",defaultReminders:"Configure default reminders that will be added to new tasks.",bodyTemplate:"Configure a template file to use for new task content.",instantTaskConversion:"Configure behavior when converting text to tasks instantly."},basicDefaults:{defaultStatus:{name:"Default status",description:"Default status for new tasks"},defaultPriority:{name:"Default priority",description:"Default priority for new tasks"},defaultContexts:{name:"Default contexts",description:"Comma-separated list of default contexts (e.g., @home, @work)",placeholder:"@home, @work"},defaultTags:{name:"Default tags",description:"Comma-separated list of default tags (without #)",placeholder:"important, urgent"},defaultProjects:{name:"Default projects",description:"Default project links for new tasks",selectButton:"Select projects",selectTooltip:"Choose project notes to link by default",removeTooltip:"Remove {name} from default projects"},useParentNoteForTaskCreation:{name:"Use active note as project for new tasks",description:"Automatically link the active note as a project when opening task creation from the command palette or ribbon"},useParentNoteAsProject:{name:"Use parent note as project for inline and instant conversion",description:"Automatically link the source note as a project when using inline task creation or instant task conversion"},useParentHeaderAsProject:{name:"Use parent heading as project during instant conversion",description:"Automatically link the closest heading above the converted line as a project when using instant task conversion"},defaultTimeEstimate:{name:"Default time estimate",description:"Default time estimate in minutes (0 = no default)",placeholder:"60"},defaultRecurrence:{name:"Default recurrence",description:"Default recurrence pattern for new tasks"}},dateDefaults:{defaultDueDate:{name:"Default due date",description:"Default due date for new tasks"},defaultScheduledDate:{name:"Default scheduled date",description:"Default scheduled date for new tasks"}},reminders:{addReminder:{name:"Add default reminder",description:"Create a new default reminder that will be added to all new tasks",buttonText:"Add reminder"},emptyState:"No default reminders configured. Add a reminder to automatically notify you about new tasks.",emptyStateButton:"Add reminder",reminderDescription:"Reminder description",unnamedReminder:"Unnamed reminder",deleteTooltip:"Delete reminder",fields:{description:"Description:",type:"Type:",offset:"Offset:",unit:"Unit:",direction:"Direction:",relatedTo:"Related to:",date:"Date:",time:"Time:"},types:{relative:"Relative (before/after task dates)",absolute:"Absolute (specific date/time)"},units:{minutes:"minutes",hours:"hours",days:"days"},directions:{before:"before",after:"after"},relatedTo:{due:"due date",scheduled:"scheduled date"}},bodyTemplate:{useBodyTemplate:{name:"Use body template",description:"Use a template file for task body content"},bodyTemplateFile:{name:"Body template file",description:"Path to template file for task body content. Supports template variables like {{title}}, {{date}}, {{time}}, {{priority}}, {{status}}, etc.",placeholder:"Templates/Task Template.md",ariaLabel:"Path to body template file"},useOccurrenceBodyTemplate:{name:"Use occurrence note template",description:"Use a separate fallback template for materialized occurrence notes when the recurring task has no occurrence_template"},occurrenceBodyTemplateFile:{name:"Occurrence note template file",description:"Path to template file for materialized occurrence notes. A recurring task's occurrence_template field takes priority over this fallback.",placeholder:"Templates/Occurrence Template.md",ariaLabel:"Path to occurrence note template file"},variablesHeader:"Template variables:",variables:{title:"{{title}} - Task title",details:"{{details}} - User-provided details from modal",date:"{{date}} - Current date (YYYY-MM-DD)",time:"{{time}} - Current time (HH:MM)",priority:"{{priority}} - Task priority",status:"{{status}} - Task status",contexts:"{{contexts}} - Task contexts",tags:"{{tags}} - Task tags",projects:"{{projects}} - Task projects"}},instantConversion:{useDefaultsOnInstantConvert:{name:"Use task defaults on instant convert",description:"Apply default task settings when converting text to tasks instantly"}},options:{noDefault:"No default",none:"None",today:"Today",tomorrow:"Tomorrow",nextWeek:"Next week",daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"}},general:{taskStorage:{header:"Task storage",description:"Configure where tasks are stored and how they are identified.",defaultFolder:{name:"Default tasks folder",description:"Default location for new tasks. Supports folder template variables like {{currentNotePath}}, {{currentNoteTitle}}, and {{projectFilePath}}, plus Daily Notes-style date tokens like YYYY/MM/DD."},moveArchived:{name:"Move archived tasks to folder",description:"Automatically move archived tasks to an archive folder"},archiveFolder:{name:"Archive folder",description:"Folder to move tasks to when archived. Supports template variables like {{year}}, {{month}}, {{priority}}, etc."}},taskIdentification:{header:"Task identification",description:"Choose how TaskNotes identifies notes as tasks.",identifyBy:{name:"Identify tasks by",description:"Choose whether to identify tasks by tag or by a frontmatter property",options:{tag:"Tag",property:"Property"}},taskTag:{name:"Task tag",description:"Tag that identifies notes as tasks (without #). Existing .base view filters keep their old tag when this changes; update default Base files or edit those filters."},hideIdentifyingTags:{name:"Hide identification tags in task cards",description:"When enabled, tags matching the task identification tag (including hierarchical matches like 'task/project') will be hidden from task card displays"},hideIdentifyingTagsMode:{name:"Hidden tag scope",description:"Choose whether hiding identification tags also hides nested tags.",options:{all:"Task tag and nested tags",exactOnly:"Exact task tag only"}},taskProperty:{name:"Task property name",description:'The frontmatter property name (e.g., "category")'},taskPropertyValue:{name:"Task property value",description:'The value that identifies a note as a task (e.g., "task")'}},folderManagement:{header:"Folder management",excludedFolders:{name:"Excluded folders",description:"Comma-separated list of folders to exclude from task indexing and project suggestions"}},frontmatter:{header:"Frontmatter",description:"Configure how links are formatted in frontmatter properties.",useMarkdownLinks:{name:"Use Markdown links in frontmatter",description:`Generate markdown links ([text](path)) instead of wikilinks ([[link]]) in frontmatter properties.
⚠️ Requires the 'obsidian-frontmatter-markdown-links' plugin to work correctly.`}},taskInteraction:{header:"Task interaction",description:"Configure how clicking on tasks behaves.",singleClick:{name:"Single-click action",description:"Action performed when single-clicking a task card"},doubleClick:{name:"Double-click action",description:"Action performed when double-clicking a task card"},actions:{edit:"Edit task",openNote:"Open note",none:"No action"}},releaseNotes:{header:"Release notes",description:"Current version: {version}",showOnUpdate:{name:"Show release notes after update",description:"Automatically open release notes when TaskNotes is updated to a new version"},checkForUpdates:{name:"Check for new releases on startup",description:"Check GitHub once when TaskNotes starts and show a notice when a newer compatible release is available"},viewButton:{name:"View release notes",description:"See what's new in the latest version of TaskNotes",buttonText:"View release notes"}}},taskProperties:{sections:{coreProperties:"Core properties",corePropertiesDesc:"Status and priority are the core properties that define a task's state and importance.",dateProperties:"Date properties",datePropertiesDesc:"Configure when tasks are due and scheduled.",organizationProperties:"Organization properties",organizationPropertiesDesc:"Organize tasks with contexts, projects, and tags.",taskDetails:"Task details",taskDetailsDesc:"Additional details like time estimates, recurrence, and reminders.",metadataProperties:"Metadata properties",metadataPropertiesDesc:"System-managed properties for tracking task history.",featureProperties:"Feature properties",featurePropertiesDesc:"Properties used by specific TaskNotes features like Pomodoro timer and calendar sync."},propertyCard:{propertyKey:"Property key:",default:"Default:",nlpTrigger:"NLP trigger:",triggerChar:"Trigger character:",triggerEmpty:"Trigger cannot be empty",triggerTooLong:"Trigger is too long (max 10 characters)"},properties:{status:{name:"Status",description:"Tracks the current state of a task (e.g., todo, in-progress, done). Status determines whether a task appears as completed and can trigger auto-archiving."},priority:{name:"Priority",description:"Indicates task importance. Used for sorting and filtering. Values are sorted alphabetically in Bases views, so use prefixes like 1-, 2- to control order."},due:{name:"Due date",description:"The deadline by which a task must be completed. Tasks past their due date appear as overdue. Stored as a date in frontmatter."},scheduled:{name:"Scheduled date",description:"When you plan to work on a task. Unlike due date, this represents your intended start time. Tasks appear on the calendar at their scheduled date/time."},contexts:{name:"Contexts",description:"Locations or conditions where a task can be done (e.g., @home, @office, @phone). Useful for filtering tasks by your current situation. Stored as a list."},projects:{name:"Projects",description:"Links to project notes this task belongs to. Stored as wikilinks (e.g., [[Project Name]]). Tasks can belong to multiple projects."},tags:{name:"Tags",description:"Native Obsidian tags for categorizing tasks. These are stored in the tags frontmatter property and work with Obsidian's tag features."},timeEstimate:{name:"Time estimate",description:"Estimated minutes to complete the task. Used for time-blocking and workload planning. Displayed on task cards and calendar events."},recurrence:{name:"Recurrence",description:"Pattern for repeating tasks (daily, weekly, monthly, yearly, or custom RRULE). When a recurring task is completed, its scheduled date is automatically updated to the next occurrence."},recurrenceAnchor:{name:"Recurrence anchor",description:"Controls how the next occurrence is calculated: 'scheduled' uses the scheduled date, 'completion' uses the actual completion date."},reminders:{name:"Reminders",description:"Notifications triggered before due or scheduled dates. Stored as a list of reminder objects with timing and optional description."},title:{name:"Title",description:"The task name. Can be stored in frontmatter or in the filename (when 'store title in filename' is enabled)."},dateCreated:{name:"Date created",description:"Timestamp when the task was first created. Automatically set and used for sorting by creation order."},dateModified:{name:"Date modified",description:"Timestamp of the last change to the task. Automatically updated when any task property changes."},completedDate:{name:"Completed date",description:"Timestamp when the task was marked complete. Set automatically when status changes to a completed state."},archiveTag:{name:"Archive tag",description:"Tag added to tasks when archived. Used to identify archived tasks and can trigger file movement to archive folder."},timeEntries:{name:"Time entries",description:"Records of time tracking sessions for this task. Each entry stores start and end timestamps. Used to calculate total time spent."},completeInstances:{name:"Complete instances",description:"Completion history for recurring tasks. Stores dates when each instance was completed to prevent duplicate completions."},skippedInstances:{name:"Skipped instances",description:"Skipped occurrences for recurring tasks. Stores dates of instances that were skipped rather than completed."},blockedBy:{name:"Blocked by",description:"Links to tasks that must be completed before this one. Stored as wikilinks. Blocked tasks display a visual indicator."},sortOrder:{name:"Manual order",description:"Frontmatter property used for drag-to-reorder manual ordering. A view must be sorted by this property for drag-and-drop reordering to work."},pomodoros:{name:"Pomodoros",description:"Count of completed Pomodoro sessions. When data storage is set to 'daily notes', this is written to daily notes instead of task files."},icsEventId:{name:"ICS event ID",description:"Unique identifier linking a note to an ICS calendar event. Added automatically when creating notes from calendar events."},icsEventTag:{name:"ICS event tag",description:"Tag identifying notes created from ICS calendar events. Used to distinguish calendar-generated notes from regular tasks."}},statusCard:{valuesHeader:"Status values"},priorityCard:{valuesHeader:"Priority values"},projectsCard:{defaultProjects:"Default projects:",useParentNoteForTaskCreation:"Use active note for new tasks:",useParentNoteForInlineTasks:"Use parent note for inline/instant conversion:",useParentHeader:"Use parent heading as project:",inheritParentTaskProperties:"Inherit parent task properties for subtasks:",noDefaultProjects:"No default projects selected",autosuggestFilters:"Autosuggest filters",customizeDisplay:"Customize display",filtersOn:"Filters on"},titleCard:{storeTitleInFilename:"Store title in filename:",storedInFilename:"Stored in filename",filenameUpdatesWithTitle:"Filename will automatically update when the task title changes.",filenameFormat:"Filename format:",customTemplate:"Custom template:",legacySyntaxWarning:"Single-brace syntax like {title} is deprecated. Please use double-brace syntax {{title}} instead for consistency with body templates.",occurrenceFilenameTemplate:"Occurrence filename template",occurrenceFilenameTemplateHelp:"Filename template for materialized occurrences of recurring tasks. Leave empty to keep the existing name (parent title plus a numeric suffix). Choose the filename granularity explicitly with {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}}, or {{occurrenceMonthName}}. All regular filename variables also work. A parent task can override this template via the frontmatter property configured below.",occurrenceFilenameProperty:"Occurrence template override property",occurrenceFilenamePropertyHelp:"Name of the frontmatter property on a recurring (parent) task that overrides the occurrence filename template for that task's occurrences."},tagsCard:{nativeObsidianTags:"Uses native Obsidian tags"},remindersCard:{defaultReminders:"Default reminders"},taskStatuses:{header:"Task statuses",description:"Customize the status options available for your tasks. These statuses control the task lifecycle and determine when tasks are considered complete.",howTheyWork:{title:"How statuses work:",value:'Value: The internal identifier stored in your task files (e.g., "in-progress")',label:'Label: The display name shown in the interface (e.g., "In Progress")',color:"Color: Visual indicator color for the status dot and badges",icon:'Icon: Optional Lucide icon name to display instead of colored dot (e.g., "check", "circle", "clock"). Browse icons at lucide.dev',completed:"Completed: When checked, tasks with this status are considered finished and may be filtered differently",autoArchive:"Auto-archive: When enabled, tasks will be automatically archived after the specified delay (1-1440 minutes)",orderNote:"The order below determines the sequence when cycling through statuses by clicking on task status badges."},addNew:{name:"Add new status",description:"Create a new status option for your tasks",buttonText:"Add status"},validationNote:'Note: You must have at least 2 statuses, and at least one status must be marked as "completed".',emptyState:"No custom statuses configured. Add a status to get started.",emptyStateButton:"Add status",fields:{value:"Value:",label:"Label:",color:"Color:",icon:"Icon:",completed:"Completed:",excludeFromCycle:"Skip when cycling:",nextStatus:"Next status:",autoArchive:"Auto-archive:",delayMinutes:"Delay (minutes):"},placeholders:{value:"in-progress",label:"In progress",icon:"check, circle, clock",nextStatusDefault:"Use status order"},badges:{completed:"Completed"},deleteConfirm:'Are you sure you want to delete the status "{label}"?'},taskPriorities:{header:"Task priorities",description:"Customize the priority levels available for your tasks. In v4.0+, priorities are sorted alphabetically by their value in Bases views.",howTheyWork:{title:"How priorities work:",value:'Value: The internal identifier stored in your task files. Use prefixes like "1-urgent", "2-high" to control sort order in Bases views.',label:'Display Label: The display name shown in the interface (e.g., "High Priority")',color:"Color: Visual indicator color for the priority dot and badges",icon:"Icon: optional icon to show on task cards instead of the priority dot"},addNew:{name:"Add new priority",description:"Create a new priority level for your tasks",buttonText:"Add priority"},validationNote:"Note: You must have at least 1 priority. Priorities are sorted alphabetically by value in Bases views.",emptyState:"No custom priorities configured. Add a priority to get started.",emptyStateButton:"Add priority",fields:{value:"Value:",label:"Label:",color:"Color:",icon:"Icon:"},placeholders:{value:"high",label:"High priority",icon:"alert-circle"},deleteConfirm:"You must have at least one priority",deleteTooltip:"Delete priority"},fieldMapping:{header:"Field mapping",warning:"⚠️ Warning: TaskNotes will read AND write using these property names. Changing these after creating tasks may cause inconsistencies.",description:"Configure which frontmatter properties TaskNotes should use for each field.",resetButton:{name:"Reset field mappings",description:"Reset all field mappings to default values",buttonText:"Reset to defaults"},notices:{resetSuccess:"Field mappings reset to defaults",resetFailure:"Failed to reset field mappings",updateFailure:"Failed to update field mapping for {label}. Please try again."},table:{fieldHeader:"TaskNotes field",propertyHeader:"Your property name"},fields:{title:"Title",status:"Status",priority:"Priority",due:"Due date",scheduled:"Scheduled date",contexts:"Contexts",projects:"Projects",timeEstimate:"Time estimate",recurrence:"Recurrence",dateCreated:"Created date",completedDate:"Completed date",dateModified:"Modified date",archiveTag:"Archive tag",timeEntries:"Time entries",completeInstances:"Complete instances",blockedBy:"Blocked by",sortOrder:"Manual order",pomodoros:"Pomodoros",icsEventId:"ICS event ID",icsEventTag:"ICS event tag",reminders:"Reminders"}},customUserFields:{header:"Custom user fields",description:"Define custom frontmatter properties to appear as type-aware filter options across views. Each row: Display name, property name, type.",addNew:{name:"Add new user field",description:"Create a new custom field that will appear in filters and views",buttonText:"Add user field"},emptyState:"No custom user fields configured. Add a field to create custom properties for your tasks.",emptyStateButton:"Add user field",fields:{displayName:"Display name:",propertyKey:"Property key:",type:"Type:",defaultValue:"Default value:"},placeholders:{displayName:"Display name",propertyKey:"property-name",defaultValue:"Default value",defaultValueList:"Default values (comma-separated)"},types:{text:"Text",number:"Number",boolean:"Boolean",date:"Date",list:"List"},defaultNames:{unnamedField:"Unnamed field",noKey:"no-key"},deleteTooltip:"Delete field",autosuggestFilters:{header:"Autosuggestion filters (advanced)",description:"Filter which files appear in autocomplete suggestions for this field"}}},appearance:{taskCards:{header:"Task cards",description:"Configure how task cards are displayed across all views.",defaultVisibleProperties:{name:"Default visible properties",description:"Choose which properties appear on task cards by default."},completionSubmenu:{name:"Group complete and skip actions in a submenu",description:"Nest the complete and skip actions under a submenu in the task context menu. Turn off to show them directly in the menu."},propertyGroups:{coreProperties:"Core properties",organization:"ORGANIZATION",customProperties:"Custom properties"},properties:{status:"Status dot",priority:"Priority dot",due:"Due date",scheduled:"Scheduled date",timeEstimate:"Time estimate",totalTrackedTime:"Total tracked time",checklistProgress:"Checklist progress",recurrence:"Recurrence",completedDate:"Completed date",createdDate:"Created date",modifiedDate:"Modified date",projects:"Projects",contexts:"Contexts",tags:"Tags",blocked:"Blocked",blocking:"Blocking"}},taskFilenames:{header:"Task filenames",description:"Configure how task files are named when created.",storeTitleInFilename:{name:"Store title in filename",description:"Use the task title as the filename. Filename will update when the task title is changed (recommended)."},filenameFormat:{name:"Filename format",description:"How task filenames should be generated",options:{title:"Task title (non-updating)",zettel:"Zettelkasten format (YYMMDD + base36 seconds since midnight)",timestamp:"Full timestamp (YYYY-MM-DD-HHMMSS)",uuid:"UUID v4",custom:"Custom template"}},customTemplate:{name:"Custom filename template",description:"Template for custom filenames. Available variables: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"Note: {{dueDate}} and {{scheduledDate}} are in YYYY-MM-DD format and will be empty if not set."}},displayFormatting:{header:"Display formatting",description:"Configure how dates, times, and other data are displayed across the plugin.",timeFormat:{name:"Time format",description:"Display time in 12-hour or 24-hour format throughout the plugin",options:{twelveHour:"12-hour (AM/PM)",twentyFourHour:"24-hour"}}},calendarView:{header:"Calendar view",description:"Customize the appearance and behavior of the calendar view.",defaultView:{name:"Default view",description:"The calendar view shown when opening the calendar tab",options:{monthGrid:"Month grid",weekTimeline:"Week timeline",dayTimeline:"Day timeline",yearView:"Year view",customMultiDay:"Custom multi-day"}},customDayCount:{name:"Custom view day count",description:"Number of days to show in custom multi-day view",placeholder:"3"},firstDayOfWeek:{name:"First day of week",description:"Which day should be the first column in week views"},showWeekends:{name:"Show weekends",description:"Display weekends in calendar views"},showWeekNumbers:{name:"Show week numbers",description:"Display week numbers in calendar views"},showTodayHighlight:{name:"Show today highlight",description:"Highlight the current day in calendar views"},showCurrentTimeIndicator:{name:"Show current time indicator",description:"Display a line showing the current time in timeline views"},selectionMirror:{name:"Selection mirror",description:"Show a visual preview while dragging to select time ranges"},calendarLocale:{name:"Calendar locale",description:'Calendar locale for date formatting and calendar system (e.g., "en", "fa" for Farsi/Persian, "de" for German). Leave empty to auto-detect from browser.',placeholder:"Auto-detect",invalidLocale:"Invalid locale. Please enter a valid language tag (e.g., 'en', 'de', 'fr-FR')."}},defaultEventVisibility:{header:"Default event visibility",description:"Configure which event types are visible by default when opening the calendar. Users can still toggle these on/off in the calendar view.",showScheduledTasks:{name:"Show scheduled tasks",description:"Display tasks with scheduled dates by default"},showDueDates:{name:"Show due dates",description:"Display task due dates by default"},showDueWhenScheduled:{name:"Show due dates when scheduled",description:"Display due dates even for tasks that already have scheduled dates"},showTimeEntries:{name:"Show time entries",description:"Display completed time tracking entries by default"},showRecurringTasks:{name:"Show recurring tasks",description:"Display recurring task instances by default"},showICSEvents:{name:"Show ICS events",description:"Display events from ICS subscriptions by default"}},timeSettings:{header:"Time settings",description:"Configure time-related display settings for timeline views.",timeSlotDuration:{name:"Time slot duration",description:"Duration of each time slot in timeline views",options:{fifteenMinutes:"15 minutes",thirtyMinutes:"30 minutes",sixtyMinutes:"60 minutes"}},startTime:{name:"Start time",description:"Earliest time shown in timeline views (HH:MM format)",placeholder:"06:00"},endTime:{name:"End time",description:"Latest time shown in timeline views (HH:MM format). Use values above 24:00 to show early next-day hours, such as 26:00 for 2 AM.",placeholder:"26:00"},initialScrollTime:{name:"Initial scroll time",description:"Time to scroll to when opening timeline views (HH:MM format)",placeholder:"09:00"},eventMinHeight:{name:"Event minimum height",description:"Minimum height for events in timeline views (pixels)",placeholder:"15"}},uiElements:{header:"UI elements",description:"Configure the display of various UI elements.",showTrackedTasksInStatusBar:{name:"Show tracked tasks in status bar",description:"Display currently tracked tasks in Obsidian's status bar"},showRelationshipsWidget:{name:"Show relationships widget",description:"Display a widget showing all relationships for the current note (subtasks, projects, dependencies)"},relationshipsPosition:{name:"Relationships position",description:"Where to position the relationships widget",options:{top:"Top of note",bottom:"Bottom of note"}},showTaskCardInNote:{name:"Show task card in note",description:"Display a task card widget at the top of task notes showing the task details and actions"},showCompletedTaskStrikethrough:{name:"Strike through completed task titles",description:"Draw a line through completed task card titles. Turn off to keep completed tasks easier to read"},showExpandableSubtasks:{name:"Show expandable subtasks",description:"Allow expanding/collapsing subtask sections in task cards"},expandSubtasksByDefault:{name:"Expand subtasks by default",description:"Show project subtasks expanded when task cards are rendered"},subtaskChevronPosition:{name:"Subtask chevron position",description:"Position of expand/collapse chevrons in task cards",options:{left:"Left side",right:"Right side"}},viewsButtonAlignment:{name:"Views button alignment",description:"Alignment of the views/filters button in the task interface",options:{left:"Left side",right:"Right side"}}},projectAutosuggest:{header:"Project autosuggest",description:"Customize how project suggestions display during task creation.",requiredTags:{name:"Required tags",description:"Show only notes with any of these tags (comma-separated). Leave empty to show all notes.",placeholder:"project, active, important"},includeFolders:{name:"Include folders",description:"Show only notes in these folders (comma-separated paths). Leave empty to show all folders.",placeholder:"Projects/, Work/Active, Personal"},requiredPropertyKey:{name:"Required property key",description:"Show only notes where this frontmatter property matches the value below. Leave empty to ignore.",placeholder:"type"},requiredPropertyValue:{name:"Required property value",description:"Only notes where the property equals this value are suggested. Leave empty to require the property to exist.",placeholder:"project"},customizeDisplay:{name:"Customize suggestion display",description:"Show advanced options to configure how project suggestions appear and what information they display."},enableFuzzyMatching:{name:"Enable fuzzy matching",description:"Allow typos and partial matches in project search. May be slower in large vaults."},displayRowsHelp:"Configure up to 3 lines of information to show for each project suggestion.",displayRows:{row1:{name:"Row 1",description:"Format: {property|flags}. Properties: title, aliases, file.path, file.parent. Flags: n(Label) shows label, s makes searchable. Example: {title|n(Title)|s}",placeholder:"{title|n(Title)}"},row2:{name:"Row 2 (optional)",description:"Common patterns: {aliases|n(Aliases)}, {file.parent|n(Folder)}, literal:Custom Text",placeholder:"{aliases|n(Aliases)}"},row3:{name:"Row 3 (optional)",description:"Additional info like {file.path|n(Path)} or custom frontmatter fields",placeholder:"{file.path|n(Path)}"}},quickReference:{header:"Quick reference",properties:"Available properties: title, aliases, file.path, file.parent, or any frontmatter field",labels:'Add labels: {title|n(Title)} → "Title: My Project"',searchable:"Make searchable: {description|s} includes description in + search",staticText:"Static text: literal:My Custom Label",alwaysSearchable:"Filename, title, and aliases are always searchable by default."}},dataStorage:{name:"Storage location",description:"Where to store Pomodoro session history",pluginData:"Plugin data (recommended)",dailyNotes:"Daily notes",notices:{locationChanged:"Pomodoro storage location changed to {location}"}},notifications:{description:"Configure task reminder notifications and alerts."},performance:{description:"Configure plugin performance and behavioral options."},timeTrackingSection:{description:"Configure automatic time tracking behaviors."},recurringSection:{description:"Configure behavior for recurring task management."}},integrations:{mobileCalendar:{disable:{name:"Disable calendar integrations on mobile",description:"Skip Google, Microsoft, and ICS calendar loading on Obsidian mobile. Desktop calendar integrations are unchanged."},status:{name:"Calendar integrations are disabled on this mobile device",description:"Turn this setting off and reload Obsidian mobile to resume calendar loading."}},basesIntegration:{header:"Bases integration",description:"Configure integration with the Obsidian Bases plugin. This is an experimental feature, and currently relies on undocumented Obsidian APIs. Behaviour may change or break.",enable:{name:"Enable Bases integration",description:"Enable TaskNotes views to be used within Obsidian Bases plugin. Bases plugin must be enabled for this to work."},viewCommands:{header:"Views & base files",description:"TaskNotes uses Obsidian Bases files (.base) to power its views. These files are generated automatically on startup if they don't exist, configured with your current settings (task identification, field mappings, statuses, etc.).",descriptionRegen:'Base files are not automatically updated when you change settings. To apply new settings, use "Update files" below, delete the existing .base files and restart Obsidian, or edit them manually.',pomodoroDailyNotesHint:"The generated Pomodoro statistics base reads Pomodoro history from daily notes; if your history is still stored in plugin data, migrate it in settings before using that base file.",docsLink:"View documentation for available formulas and customization options",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"Open mini calendar view",kanban:"Open Kanban view",tasks:"Open tasks view",advancedCalendar:"Open advanced calendar view",agenda:"Open agenda view",pomodoroStats:"Pomodoro statistics base",relationships:"Relationships widget"},fileLabel:"File: {path}",resetButton:"Reset",resetTooltip:"Reset to default path"},autoCreateDefaultFiles:{name:"Auto-create default files",description:"Automatically create missing default base view files on startup. Disable to prevent deleted sample files from being recreated."},createDefaultFiles:{name:"Create default files",description:"Create the default .base files in TaskNotes/Views/ directory. Existing files will not be overwritten.",buttonText:"Create files"},updateDefaultFiles:{name:"Update default files",description:"Overwrite the configured default .base files with templates generated from your current TaskNotes settings.",buttonText:"Update files",confirmTitle:"Update default base files",confirmMessage:"This will overwrite the configured default .base files with freshly generated templates. Any manual edits in those files will be replaced.",confirmText:"Update files"},exportV3Views:{name:"Export v3 saved views to Bases",description:"Convert all your saved views from TaskNotes v3 into a single .base file with multiple views. This helps migrate your v3 filter configurations to the new Bases system.",buttonText:"Export v3 views",noViews:"No saved views to export",fileExists:"File already exists",confirmOverwrite:'A file named "{fileName}" already exists. Overwrite it?',success:"Exported {count} saved views to {filePath}",error:"Failed to export views: {message}"},notices:{enabled:"Bases integration enabled. Please restart Obsidian to complete the setup.",disabled:"Bases integration disabled. Please restart Obsidian to complete the removal."}},calendarSubscriptions:{header:"Calendar subscriptions",description:"Subscribe to external calendars via ICS/iCal URLs to view events alongside your tasks.",defaultNoteTemplate:{name:"Default note template",description:"Path to template file for notes created from ICS events",placeholder:"Templates/Event Template.md"},defaultNoteFolder:{name:"Default note folder",description:"Folder for notes created from ICS events",placeholder:"Calendar/Events"},filenameFormat:{name:"ICS note filename format",description:"How filenames are generated for notes created from ICS events",options:{title:"Event title",zettel:"Zettelkasten format",timestamp:"Timestamp",custom:"Custom template"}},customTemplate:{name:"Custom ICS filename template",description:"Template for custom ICS event filenames",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"Use ICS event end time as task due date",description:"When enabled, tasks created from calendar events will have their due date set to the event's end time. For all-day events, the due date will be set to the event date. For timed events, the due date will include the end time."},recurringEventRelatedNotesMode:{name:"Recurring event related notes",description:"Choose whether notes linked to one recurrence of an external calendar event appear across the loaded series or only on the selected instance.",options:{series:"Series-wide",instance:"Selected instance only"}}},subscriptionsList:{header:"Calendar subscriptions list",addSubscription:{name:"Add calendar subscription",description:"Add a new calendar subscription from ICS/iCal URL or local file",buttonText:"Add subscription"},refreshAll:{name:"Refresh all subscriptions",description:"Manually refresh all enabled calendar subscriptions",buttonText:"Refresh all"},newCalendarName:"New calendar",emptyState:"No calendar subscriptions configured. Add a subscription to sync external calendars.",notices:{addSuccess:"New calendar subscription added - please configure the details",addFailure:"Failed to add subscription",serviceUnavailable:"ICS subscription service not available",refreshSuccess:"All calendar subscriptions refreshed successfully",refreshFailure:"Failed to refresh some calendar subscriptions",updateFailure:"Failed to update subscription",deleteSuccess:'Deleted subscription "{name}"',deleteFailure:"Failed to delete subscription",enableFirst:"Enable the subscription first",refreshSubscriptionSuccess:'Refreshed "{name}"',refreshSubscriptionFailure:"Failed to refresh subscription"},labels:{enabled:"Enabled:",name:"Name:",type:"Type:",url:"URL:",filePath:"File path:",color:"Color:",refreshMinutes:"Refresh (min):"},typeOptions:{remote:"Remote URL",local:"Local file"},placeholders:{calendarName:"Calendar name",url:"ICS/iCal URL",filePath:"Local file path (e.g., Calendar.ics)",localFile:"Calendar.ics"},statusLabels:{enabled:"Enabled",disabled:"Disabled",remote:"Remote",localFile:"Local file",remoteCalendar:"Remote calendar",localFileCalendar:"Local file",synced:"Synced {timeAgo}",error:"Error"},actions:{refreshNow:"Refresh now",deleteSubscription:"Delete subscription"},refreshNow:"Refresh now",confirmDelete:{title:"Delete subscription",message:'Are you sure you want to delete the subscription "{name}"? This action cannot be undone.',confirmText:"Delete"}},autoExport:{header:"Automatic ICS export",description:"Automatically export all your tasks to an ICS file.",enable:{name:"Enable automatic export",description:"Automatically keep an ICS file updated with all your tasks"},filePath:{name:"Export file path",description:"Path where the ICS file will be saved (relative to vault root)",placeholder:"tasknotes-calendar.ics"},interval:{name:"Update interval (between 5 and 1440 minutes)",description:"How often to update the export file",placeholder:"60"},useDuration:{name:"Use task duration for event length",description:"When enabled, uses the task's time estimate (duration) instead of due date for the calendar event end time. This is useful for GTD workflows where scheduled + duration represents work planning, while due date represents deadlines."},excludeCompleted:{name:"Exclude completed tasks",description:"When enabled, completed tasks are omitted from ICS exports. Completed statuses are taken from your task statuses settings."},excludeArchived:{name:"Exclude archived tasks",description:"When enabled, archived tasks are omitted from ICS exports."},requireDueDate:{name:"Require due date",description:"When enabled, only tasks with a due date are included in ICS exports."},requireScheduledDate:{name:"Require scheduled date",description:"When enabled, only tasks with a scheduled date are included in ICS exports."},exportNow:{name:"Export now",description:"Manually trigger an immediate export",buttonText:"Export now"},status:{title:"Export status:",lastExport:"Last export: {time}",nextExport:"Next export: {time}",noExports:"No exports yet",notScheduled:"Not scheduled",notInitialized:"Auto export service not initialized - please restart Obsidian",serviceNotInitialized:"Service not initialized - please restart Obsidian"},notices:{reloadRequired:"Please reload Obsidian for the automatic export changes to take effect.",exportSuccess:"Tasks exported successfully",exportFailure:"Export failed - check console for details",serviceUnavailable:"Auto export service not available"}},googleCalendarExport:{header:"Export tasks to Google Calendar",description:"Automatically sync your tasks to Google Calendar as events. Requires Google Calendar to be connected above.",enable:{name:"Enable task export",description:"When enabled, tasks with dates will be automatically synced to Google Calendar as events."},targetCalendar:{name:"Target calendar",description:"Select which calendar to create task events in.",placeholder:"Select a calendar...",connectFirst:"Connect Google Calendar first",primarySuffix:" (Primary)"},syncTrigger:{name:"Sync trigger",description:"Which task date should trigger calendar event creation.",options:{scheduled:"Scheduled date",due:"Due date",both:"Both (prefer scheduled)"}},allDayEvents:{name:"Create as all-day events",description:"When enabled, tasks are created as all-day events. When disabled, uses time estimate for duration."},defaultDuration:{name:"Default event duration",description:"Duration in minutes for timed events (used when task has no time estimate)."},eventTitleTemplate:{name:"Event title template",description:"Template for event titles. Available variables: {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"Include task details in description",description:"Add task metadata (priority, status, tags, etc.) to the event description."},includeObsidianLink:{name:"Include Obsidian link",description:"Add a link back to the task in Obsidian in the event description."},defaultReminder:{name:"Default reminder",description:"Add popup reminders to timed Google Calendar events. Enter minutes before the event, separated by commas. Leave empty to use calendar defaults. Common values: 15, 30, 60, 1440."},automaticSyncBehavior:{header:"Automatic sync behavior"},syncOnCreate:{name:"Sync on task create",description:"Automatically create calendar event when a new task is created."},syncOnUpdate:{name:"Sync on task update",description:"Automatically update calendar event when a task is modified."},syncOnComplete:{name:"Sync on task complete",description:"Update calendar event when a task is completed (adds checkmark to title)."},syncOnDelete:{name:"Delete event on task delete",description:"Remove calendar event when the corresponding task is deleted."},manualSyncActions:{header:"Manual sync actions"},syncAllTasks:{name:"Sync all tasks",description:"Sync all existing tasks to Google Calendar. This will create events for tasks that haven't been synced yet.",buttonText:"Sync all"},unlinkAllTasks:{name:"Unlink all tasks",description:"Remove all task-event links without deleting calendar events.",buttonText:"Unlink all",confirmTitle:"Unlink all tasks",confirmMessage:"This will remove all links between tasks and calendar events. The calendar events will remain but will no longer be updated when tasks change. Are you sure?",confirmButtonText:"Unlink all"},notices:{notEnabled:"Google Calendar export is not enabled. Configure it in Settings > Integrations.",notEnabledOrConfigured:"Google Calendar export is not enabled or configured",serviceNotAvailable:"Task calendar sync service not available",syncResults:"Synced: {synced}, Failed: {failed}, Skipped: {skipped}",taskSynced:"Task synced to Google Calendar",noActiveFile:"No file is currently active",notATask:"Current file is not a task",noDateToSync:"Task has no scheduled or due date to sync",syncFailed:"Failed to sync task to Google Calendar: {message}",connectionExpired:"Google Calendar connection expired. Please reconnect in Settings > Integrations.",syncingTasks:"Syncing {total} tasks to Google Calendar...",syncComplete:"Sync complete: {synced} synced, {failed} failed, {skipped} skipped",eventsDeletedAndUnlinked:"All events deleted and unlinked",tasksUnlinked:"All task links removed"},eventDescription:{untitledTask:"Untitled task",priority:"Priority: {value}",status:"Status: {value}",due:"Due: {value}",scheduled:"Scheduled: {value}",timeEstimate:"Time Estimate: {value}",tags:"Tags: {value}",contexts:"Contexts: {value}",projects:"Projects: {value}",openInObsidian:"Open in Obsidian"}},httpApi:{header:"HTTP API",description:"Enable HTTP API for external integrations and automations.",enable:{name:"Enable HTTP API",description:"Start local HTTP server for API access"},port:{name:"API port",description:"Port number for the HTTP API server",placeholder:"3000"},authToken:{name:"API authentication token",description:"TaskNotes token, not your AI provider's API key. To generate one, enable HTTP API, leave this field empty, and restart Obsidian. Then copy the generated token into your client's bearer authentication settings. Update clients whenever this token changes.",placeholder:"your-secret-token"},mcp:{enable:{name:"Enable MCP server",description:"Expose TaskNotes tools via Model Context Protocol at /mcp endpoint. Requires HTTP API to be enabled."}},endpoints:{header:"Available API endpoints",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhooks",description:{overview:"Webhooks send real-time notifications to external services when TaskNotes events occur.",usage:"Configure webhooks to integrate with automation tools, sync services, or custom applications."},addWebhook:{name:"Add webhook",description:"Register a new webhook endpoint",buttonText:"Add webhook"},emptyState:{message:"No webhooks configured. Add a webhook to receive real-time notifications.",buttonText:"Add webhook"},labels:{active:"Active:",url:"URL:",events:"Events:",transform:"Transform:"},placeholders:{url:"Webhook URL",noEventsSelected:"No events selected",rawPayload:"Raw payload (no transform)"},statusLabels:{active:"Active",inactive:"Inactive",created:"Created {timeAgo}"},actions:{editEvents:"Edit events",delete:"Delete"},editEvents:"Edit events",notices:{urlUpdated:"Webhook URL updated",enabled:"Webhook enabled",disabled:"Webhook disabled",created:"Webhook created successfully",deleted:"Webhook deleted",updated:"Webhook updated"},confirmDelete:{title:"Delete webhook",message:`Are you sure you want to delete this webhook?
URL: {url}
This action cannot be undone.`,confirmText:"Delete"},cardHeader:"Webhook",cardFields:{active:"Active:",url:"URL:",events:"Events:",transform:"Transform:"},eventsDisplay:{noEvents:"No events selected"},transformDisplay:{noTransform:"Raw payload (no transform)"},secretModal:{title:"Webhook secret generated",description:"Your webhook secret has been generated. Save this secret as you won't be able to view it again:",usage:"Use this secret to verify webhook payloads in your receiving application.",gotIt:"Got it"},editModal:{title:"Edit webhook",eventsHeader:"Events to subscribe to"},events:{taskCreated:{label:"Task created",description:"When new tasks are created"},taskUpdated:{label:"Task updated",description:"When tasks are modified"},taskCompleted:{label:"Task completed",description:"When tasks are marked complete"},taskDeleted:{label:"Task deleted",description:"When tasks are deleted"},taskArchived:{label:"Task archived",description:"When tasks are archived"},taskUnarchived:{label:"Task unarchived",description:"When tasks are unarchived"},timeStarted:{label:"Time started",description:"When time tracking starts"},timeStopped:{label:"Time stopped",description:"When time tracking stops"},pomodoroStarted:{label:"Pomodoro started",description:"When Pomodoro sessions begin"},pomodoroCompleted:{label:"Pomodoro completed",description:"When Pomodoro sessions finish"},pomodoroInterrupted:{label:"Pomodoro interrupted",description:"When Pomodoro sessions are stopped"},recurringCompleted:{label:"Recurring instance completed",description:"When recurring task instances complete"},reminderTriggered:{label:"Reminder triggered",description:"When task reminders activate"}},modals:{secretGenerated:{title:"Webhook secret generated",description:"Your webhook secret has been generated. Save this secret as you won't be able to view it again:",usage:"Use this secret to verify webhook payloads in your receiving application.",buttonText:"Got it"},edit:{title:"Edit webhook",eventsSection:"Events to subscribe to",transformSection:"Transform configuration (optional)",headersSection:"Headers configuration",transformFile:{name:"Transform file",description:"Path to a .json template file in your vault that transforms webhook payloads",placeholder:"simple-template.json"},customHeaders:{name:"Include custom headers",description:"Include TaskNotes headers (event type, signature, delivery ID). Turn off for Discord, Slack, and other services with strict CORS policies."},buttons:{cancel:"Cancel",save:"Save changes"},notices:{selectAtLeastOneEvent:"Please select at least one event"}},add:{title:"Add webhook",eventsSection:"Events to subscribe to",transformSection:"Transform configuration (optional)",headersSection:"Headers configuration",url:{name:"Webhook URL",description:"The endpoint where webhook payloads will be sent",placeholder:"https://your-service.com/webhook"},transformFile:{name:"Transform file",description:"Path to a .json template file in your vault that transforms webhook payloads",placeholder:"simple-template.json"},customHeaders:{name:"Include custom headers",description:"Include TaskNotes headers (event type, signature, delivery ID). Turn off for Discord, Slack, and other services with strict CORS policies."},transformHelp:{title:"JSON transform templates customize webhook payloads:",jsFiles:"",jsDescription:"",jsonFiles:".json files:",jsonDescription:" Templates with ",jsonVariable:"${data.task.title}",leaveEmpty:"Leave empty:",leaveEmptyDescription:" Send raw data",example:"Example:",exampleFile:"simple-template.json"},buttons:{cancel:"Cancel",add:"Add webhook"},notices:{urlRequired:"Webhook URL is required",selectAtLeastOneEvent:"Please select at least one event"}}}},otherIntegrations:{header:"Other plugin integrations",description:"Configure integrations with other Obsidian plugins."},mdbaseSpec:{header:"mdbase type definitions",learnMore:"Learn more about mdbase-spec",enable:{name:"Generate mdbase type definitions",description:"Generate and maintain mdbase type files (mdbase.yaml and _types/task.md) at the vault root as your settings change."}},timeFormats:{justNow:"Just now",minutesAgo:"{minutes} minute{plural} ago",hoursAgo:"{hours} hour{plural} ago",daysAgo:"{days} day{plural} ago"}}},notices:{languageChanged:"Language changed to {language}.",releaseAvailable:{message:"TaskNotes {version} is available.",action:"Open in community plugins"},exportTasksFailed:"Failed to export tasks as ICS file",icsNoteCreatedSuccess:"Note created successfully",icsCreationModalOpenFailed:"Failed to open creation modal",icsNoteLinkSuccess:'Linked note "{fileName}" to ICS event',icsTaskCreatedSuccess:"Task created: {title}",icsRelatedItemsRefreshed:"Related notes refreshed",icsFileNotFound:"File not found or invalid",icsFileOpenFailed:"Failed to open file",timeblockAttachmentExists:'"{fileName}" is already attached',timeblockAttachmentAdded:'Added "{fileName}" as attachment',timeblockAttachmentRemoved:'Removed "{fileName}" from attachments',timeblockFileTypeNotSupported:'Cannot open "{fileName}" - file type not supported',timeblockTitleRequired:"Please enter a title for the timeblock",timeblockUpdatedSuccess:'Timeblock "{title}" updated successfully',timeblockUpdateFailed:"Failed to update timeblock. Check console for details.",timeblockDeletedSuccess:'Timeblock "{title}" deleted successfully',timeblockDeleteFailed:"Failed to delete timeblock. Check console for details.",timeblockRequiredFieldsMissing:"Please fill in all required fields",agendaLoadingFailed:"Error loading agenda. Please try refreshing.",statsLoadingFailed:"Error loading project details."},commands:{openCalendarView:"Open mini calendar view",openAdvancedCalendarView:"Open calendar view",openTasksView:"Open tasks view",openNotesView:"Open notes view",openAgendaView:"Open agenda view",openPomodoroView:"Open Pomodoro timer",openKanbanView:"Open Kanban board",updateDefaultBaseFiles:"Update default base files",openPomodoroStats:"Open Pomodoro statistics",openStatisticsView:"Open task & project statistics",createNewTask:"Create new task",convertCurrentNoteToTask:{name:"Convert current note to task",noActiveFile:"No active file to convert",alreadyTask:"This note is already a task",success:"Converted '{title}' to a task"},convertToTaskNote:"Convert checkbox task to TaskNote",convertAllTasksInNote:"Convert all tasks in note",insertTaskNoteLink:"Insert tasknote link",createInlineTask:"Create new inline task",quickActionsCurrentTask:"Quick actions for current task",quickActionsTaskUnderCursor:"Quick actions for task under cursor",editCurrentTask:"Edit current task",cycleCurrentTaskStatus:"Cycle current task status",cycleCurrentTaskPriority:"Cycle current task priority",addProjectToCurrentTask:"Add project to current task",addSubtaskToCurrentNote:"Add subtask to current note",goToTodayNote:"Go to today's note",startPomodoro:"Start Pomodoro timer",stopPomodoro:"Stop Pomodoro timer",pauseResumePomodoro:"Pause/resume Pomodoro timer",refreshCache:"Refresh cache",exportAllTasksIcs:"Export all tasks as ICS file",syncAllTasksGoogleCalendar:"Sync all tasks to Google Calendar",syncCurrentTaskGoogleCalendar:"Sync current task to Google Calendar",viewReleaseNotes:"View release notes",startTimeTrackingCurrentTask:"Start time tracking for current task",stopTimeTrackingCurrentTask:"Stop time tracking for current task",startTimeTrackingWithSelector:"Start time tracking (select task)",editTimeEntries:"Edit time entries (select task)",createOrOpenTask:"Create or open task",createOrOpenTaskWithTracking:"Create or open task and start time tracking",rolloverOverdueScheduledTasks:"Postpone overdue scheduled tasks to today"},modals:{deviceCode:{title:"Google Calendar authorization",instructions:{intro:"To connect your Google Calendar, please follow these steps:"},steps:{open:"Open",inBrowser:"in your browser",enterCode:"Enter this code when prompted:",signIn:"Sign in with your Google account and grant access",returnToObsidian:"Return to Obsidian (this window will close automatically)"},codeLabel:"Your code:",copyCodeAriaLabel:"Copy code",waitingForAuthorization:"Waiting for authorization...",openBrowserButton:"Open browser",cancelButton:"Cancel",expiresMinutesSeconds:"Code expires in {minutes}m {seconds}s",expiresSeconds:"Code expires in {seconds}s"},icsEventInfo:{calendarEventHeading:"Calendar event",titleLabel:"Title",calendarLabel:"Calendar",dateTimeLabel:"Date & time",locationLabel:"Location",descriptionLabel:"Description",urlLabel:"URL",relatedNotesHeading:"Related notes & tasks",noRelatedItems:"No related notes or tasks found for this event.",typeTask:"Task",typeNote:"Note",actionsHeading:"Actions",createFromEventLabel:"Create from event",createFromEventDesc:"Create a new note or task from this calendar event",linkExistingLabel:"Link existing",linkExistingDesc:"Link an existing note to this calendar event"},timeblockInfo:{editHeading:"Edit timeblock",dateTimeLabel:"Date & time: ",titleLabel:"Title",titleDesc:"Title for your timeblock",titlePlaceholder:"e.g., Deep work session",descriptionLabel:"Description",descriptionDesc:"Optional description for the timeblock",descriptionPlaceholder:"Focus on new features, no interruptions",colorLabel:"Color",colorDesc:"Optional color for the timeblock",colorPlaceholder:"#3b82f6",attachmentsLabel:"Attachments",attachmentsDesc:"Files or notes linked to this timeblock",addAttachmentButton:"Add attachment",addAttachmentTooltip:"Select a file or note using fuzzy search",deleteButton:"Delete timeblock",saveButton:"Save changes",deleteConfirmationTitle:"Delete timeblock"},timeblockCreation:{heading:"Create timeblock",dateLabel:"Date: ",titleLabel:"Title",titleDesc:"Title for your timeblock",titlePlaceholder:"e.g., Deep work session",startTimeLabel:"Start time",startTimeDesc:"When the timeblock starts",startTimePlaceholder:"09:00",endTimeLabel:"End time",endTimeDesc:"When the timeblock ends",endTimePlaceholder:"11:00",descriptionLabel:"Description",descriptionDesc:"Optional description for the timeblock",descriptionPlaceholder:"Focus on new features, no interruptions",colorLabel:"Color",colorDesc:"Optional color for the timeblock",colorPlaceholder:"#3b82f6",attachmentsLabel:"Attachments",attachmentsDesc:"Files or notes to link to this timeblock",addAttachmentButton:"Add attachment",addAttachmentTooltip:"Select a file or note using fuzzy search",createButton:"Create timeblock"},calendarEventCreation:{heading:"Create calendar event",dateTimeLabel:"Date & time: ",titleLabel:"Title",titleDesc:"Title for the calendar event",titlePlaceholder:"e.g., Team meeting",calendarLabel:"Calendar",calendarDesc:"Which calendar to create the event on",descriptionLabel:"Description",descriptionDesc:"Optional description for the event",descriptionPlaceholder:"Add details about this event...",locationLabel:"Location",locationDesc:"Optional location for the event",locationPlaceholder:"e.g., Conference Room A",createButton:"Create event",titleRequired:"Event title is required",noCalendarSelected:"No calendar selected",success:'Calendar event "{title}" created',error:"Failed to create calendar event: {message}"},icsNoteCreation:{heading:"Create from ICS event",titleLabel:"Title",titleDesc:"Title for the new content",folderLabel:"Folder",folderDesc:"Destination folder (leave empty for vault root)",folderPlaceholder:"folder/subfolder",createButton:"Create",startLabel:"Start: ",endLabel:"End: ",locationLabel:"Location: ",calendarLabel:"Calendar: ",useTemplateLabel:"Use template",useTemplateDesc:"Apply a template when creating the content",templatePathLabel:"Template path",templatePathDesc:"Path to the template file",templatePathPlaceholder:"templates/ics-note-template.md"},unscheduledTasksSelector:{title:"Unscheduled tasks",placeholder:"Type to search for unscheduled tasks...",instructions:{navigate:"to navigate",schedule:"to schedule",dismiss:"to dismiss"}},migration:{title:"Migrate to new recurrence system",description:"TaskNotes now uses industry-standard RRULE patterns for recurrence, which enables more complex schedules and better compatibility with other apps.",tasksFound:"{count} task(s) with old recurrence patterns detected",noMigrationNeeded:"No tasks require migration",warnings:{title:"Before you proceed:",backup:"Back up your vault before migrating",conversion:"Old recurrence patterns will be converted to new format",normalUsage:"You can continue using TaskNotes normally during migration",permanent:"This change is permanent and cannot be automatically undone"},benefits:{title:"Benefits of the new system:",powerfulPatterns:"Complex recurrence patterns (e.g., 'every 2nd Tuesday')",performance:"Better performance with recurring tasks",compatibility:"Standard recurrence format compatible with other apps",nlp:"Enhanced natural language processing support"},progress:{title:"Migration progress",preparing:"Preparing migration...",completed:"Migration completed successfully",failed:"Migration failed"},buttons:{migrate:"Start migration",completed:"Close"},errors:{title:"Errors during migration:"},notices:{completedWithErrors:"Migration completed with some errors. Check the error list above.",success:"All tasks migrated successfully!",failed:"Migration failed. Please check the console for details."},prompt:{message:"TaskNotes detected tasks using the old recurrence format. Would you like to migrate them to the new system now?",migrateNow:"Migrate now",remindLater:"Remind me later"}},task:{titlePlaceholder:"What needs to be done?",titleLabel:"Title",titleDetailedPlaceholder:"Task title...",detailsLabel:"Details",detailsPlaceholder:"Add more details...",projectsLabel:"Projects",projectsAdd:"Add project",projectsTooltip:"Select a project note using fuzzy search",projectsRemoveTooltip:"Remove project",contextsLabel:"Contexts",contextsPlaceholder:"context1, context2",tagsLabel:"Tags",tagsPlaceholder:"tag1, tag2",timeEstimateLabel:"Time estimate (minutes)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"Unsaved changes",message:"You have unsaved changes. Do you want to save them?",save:"Save changes",discard:"Discard changes",cancel:"Keep editing"},dependencies:{blockedBy:"Blocked by",blocking:"Blocking",placeholder:"[[Task Note]]",addTaskButton:"Add task",selectTaskTooltip:"Select a task note using fuzzy search",removeTaskTooltip:"Remove task"},organization:{projects:"Projects",subtasks:"Subtasks",addToProject:"Add to project",addToProjectButton:"Add to project",addSubtasks:"Add subtasks",addSubtasksButton:"Add subtask",addSubtasksTooltip:"Select tasks to make them subtasks of this task",removeSubtaskTooltip:"Remove subtask",notices:{noEligibleSubtasks:"No eligible tasks available to assign as subtasks",subtaskSelectFailed:"Failed to open subtask selector"}},customFieldsLabel:"Custom fields",actions:{due:"Set due date",scheduled:"Set scheduled date",status:"Set status",priority:"Set priority",recurrence:"Set recurrence",reminders:"Set reminders"},buttons:{openNote:"Open note",save:"Save"},tooltips:{dueValue:"Due: {value}",scheduledValue:"Scheduled: {value}",statusValue:"Status: {value}",priorityValue:"Priority: {value}",recurrenceValue:"Recurrence: {value}",remindersSingle:"1 reminder set",remindersPlural:"{count} reminders set"},dateMenu:{dueTitle:"Set due date",scheduledTitle:"Set scheduled date"},userFields:{textPlaceholder:"Enter {field}...",numberPlaceholder:"0",datePlaceholder:"YYYY-MM-DD",listPlaceholder:"item1, item2, item3",pickDate:"Pick {field} date"},recurrence:{daily:"Daily",weekly:"Weekly",everyTwoWeeks:"Every 2 weeks",weekdays:"Weekdays",weeklyOn:"Weekly on {days}",monthly:"Monthly",everyThreeMonths:"Every 3 months",monthlyOnOrdinal:"Monthly on the {ordinal}",monthlyByWeekday:"Monthly (by weekday)",yearly:"Yearly",yearlyOn:"Yearly on {month} {day}",custom:"Custom",countSuffix:"{count} times",untilSuffix:"until {date}",ordinal:"{number}{suffix}"}},taskSelector:{title:"Select task",placeholder:"Type to search for tasks...",instructions:{navigate:"to navigate",select:"to select",dismiss:"to cancel"},notices:{noteNotFound:'Could not find note "{name}"'},dueDate:{overdue:"Due: {date} (overdue)",today:"Due: Today"}},taskSelectorWithCreate:{title:"Create or open task",placeholder:"Search tasks or type to create new...",instructions:{create:"to create new task"},footer:{createLabel:" to create: "},notices:{emptyQuery:"Please enter a task description",invalidTitle:"Could not parse a valid task title"}},taskCreation:{title:"Create task",actions:{fillFromNaturalLanguage:"Fill form from natural language",hideDetailedOptions:"Hide detailed options",showDetailedOptions:"Show detailed options"},nlPlaceholder:"Buy groceries tomorrow at 3pm @home #errands",notices:{titleRequired:"Please enter a task title",success:'Task "{title}" created successfully',successShortened:'Task "{title}" created successfully (filename shortened due to length)',failure:"Failed to create task: {message}",blockingUnresolved:"Could not resolve: {entries}",openCreatedTaskFailure:"Task created, but the task note could not be opened."}},taskEdit:{title:"Edit task",sections:{completions:"Completions",taskInfo:"Task information"},metadata:{totalTrackedTime:"Total tracked time:",due:"Due:",scheduled:"Scheduled:",created:"Created:",modified:"Modified:",file:"File:"},buttons:{archive:"Archive",unarchive:"Unarchive"},notices:{titleRequired:"Please enter a task title",noChanges:"No changes to save",updateSuccess:'Task "{title}" updated successfully',updateFailure:"Failed to update task: {message}",dependenciesUpdateSuccess:"Dependencies updated",blockingUnresolved:"Could not resolve: {entries}",fileMissing:"Could not find task file: {path}",openNoteFailure:"Failed to open task note",archiveSuccess:"Task {action} successfully",archiveFailure:"Failed to archive task",deleteSuccess:'Task "{title}" deleted successfully',deleteFailure:"Failed to delete task: {message}"},deleteConfirmation:{title:"Delete task",message:'Are you sure you want to delete "{title}"? This moves the task note to Obsidian trash.',confirm:"Delete task"},archiveAction:{archived:"archived",unarchived:"unarchived"}},storageLocation:{title:{migrate:"Migrate Pomodoro data?",switch:"Switch to daily notes storage?"},message:{migrate:"This will migrate your existing Pomodoro session data to daily notes frontmatter. The data will be grouped by date and stored in each daily note.",switch:"Pomodoro session data will be stored in daily notes frontmatter instead of the plugin data file."},whatThisMeans:"What this means:",bullets:{dailyNotesRequired:"Daily notes must be enabled in the core daily notes plugin or periodic notes",storedInNotes:"Data will be stored in your daily notes frontmatter",migrateData:"Existing plugin data will be migrated and then cleared",futureSessions:"Future sessions will be saved to daily notes",dataLongevity:"This provides better data longevity with your notes"},finalNote:{migrate:"⚠️ Make sure you have backups if needed. This change cannot be automatically undone.",switch:"You can switch back to plugin storage at any time in the future."},buttons:{migrate:"Migrate data",switch:"Switch storage"}},dueDate:{title:"Set due date",taskLabel:"Task: {title}",sections:{dateTime:"Due date & time",quickOptions:"Quick options"},descriptions:{dateTime:"Set when this task should be completed"},inputs:{date:{ariaLabel:"Due date for task",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"Due time for task (optional)",placeholder:"HH:MM"}},quickOptions:{today:"Today",todayAriaLabel:"Set due date to today",tomorrow:"Tomorrow",tomorrowAriaLabel:"Set due date to tomorrow",nextWeek:"Next week",nextWeekAriaLabel:"Set due date to next week",now:"Now",nowAriaLabel:"Set due date and time to now",clear:"Clear",clearAriaLabel:"Clear due date"},errors:{invalidDateTime:"Please enter a valid date and time format",updateFailed:"Failed to update due date. Please try again."}},scheduledDate:{title:"Set scheduled date",taskLabel:"Task: {title}",sections:{dateTime:"Scheduled date & time",quickOptions:"Quick options"},descriptions:{dateTime:"Set when you plan to work on this task"},inputs:{date:{ariaLabel:"Scheduled date for task",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"Scheduled time for task (optional)",placeholder:"HH:MM"}},quickOptions:{today:"Today",todayAriaLabel:"Set scheduled date to today",tomorrow:"Tomorrow",tomorrowAriaLabel:"Set scheduled date to tomorrow",nextWeek:"Next week",nextWeekAriaLabel:"Set scheduled date to next week",now:"Now",nowAriaLabel:"Set scheduled date and time to now",clear:"Clear",clearAriaLabel:"Clear scheduled date"},errors:{invalidDateTime:"Please enter a valid date and time format",updateFailed:"Failed to update scheduled date. Please try again."}},timeEntryEditor:{title:"Time Entries - {taskTitle}",addEntry:"Add time entry",noEntries:"No time entries yet",deleteEntry:"Delete entry",startTime:"Start time",endTime:"End time (leave empty if still running)",duration:"Duration (minutes)",durationDesc:"Override calculated duration",durationPlaceholder:"Enter duration in minutes",description:"Description",descriptionPlaceholder:"What did you work on?",calculatedDuration:"Calculated: {minutes} minutes",totalTime:"{hours}h {minutes}m total",totalMinutes:"{minutes}m total",saved:"Time entries saved",saveFailed:"Failed to save time entries",openFailed:"Failed to open time entry editor",noTasksWithEntries:"No tasks have time entries to edit",validation:{missingStartTime:"Start time is required",endBeforeStart:"End time must be after start time"}},timeTracking:{noTasksAvailable:"No tasks available to track time for",started:"Started tracking time for: {taskTitle}",startFailed:"Failed to start time tracking"},timeEntry:{mustHaveSpecificTime:"Time entries must have specific times. Please select a time range in week or day view.",noTasksAvailable:"No tasks available to create time entries for",created:"Time entry created for {taskTitle} ({duration} minutes)",createFailed:"Failed to create time entry"}},contextMenus:{task:{status:"Status",statusSelected:"✓ {label}",priority:"Priority",prioritySelected:"✓ {label}",tags:"Tags",addTag:"Add tag…",removeTag:"Remove {tag}",removeTagInput:"Remove tag…",tagPlaceholder:"Tag or #tag",clearTags:"Clear tags",dueDate:"Due date",scheduledDate:"Scheduled date",customDates:"Custom dates",reminders:"Reminders",remindBeforeDue:"Remind before due…",remindBeforeScheduled:"Remind before scheduled…",manageReminders:"Manage all reminders…",clearReminders:"Clear all reminders",startTimeTracking:"Start time tracking",stopTimeTracking:"Stop time tracking",editTimeEntries:"Edit time entries",archive:"Archive",unarchive:"Unarchive",openNote:"Open note",openNoteInNewTab:"Open note in new tab",copyTitle:"Copy task title",quickActions:"Quick actions",noteActions:"Note actions",rename:"Rename",renameTitle:"Rename file",renamePlaceholder:"Enter new name",delete:"Delete",deleteTitle:"Delete file",deleteMessage:'Are you sure you want to delete "{name}"?',deleteConfirm:"Delete",copyPath:"Copy path",copyUrl:"Copy Obsidian URL",showInExplorer:"Show in file explorer",addToCalendar:"Add to calendar",calendar:{google:"Google Calendar",outlook:"Outlook Calendar",yahoo:"Yahoo Calendar",downloadIcs:"Download .ics file",syncToGoogle:"Sync to Google Calendar",syncToGoogleNotConfigured:"Google Calendar sync not configured",syncToGoogleSuccess:"Task synced to Google Calendar",syncToGoogleFailed:"Failed to sync task to Google Calendar"},recurrence:"Recurrence",clearRecurrence:"Clear recurrence",customRecurrence:"Custom recurrence...",createSubtask:"Create subtask",dependencies:{title:"Dependencies",addBlockedBy:"Add “blocked by”…",addBlockedByTitle:"Add tasks this depends on",addBlocking:"Add “blocking”…",addBlockingTitle:"Add tasks this blocks",removeBlockedBy:"Remove blocked-by…",removeBlocking:"Remove blocking…",unknownDependency:"Unknown",inputPlaceholder:"[[Task Note]]",notices:{noEntries:"Please enter at least one task",blockedByAdded:"{count} dependency added",blockedByRemoved:"Dependency removed",blockingAdded:"{count} dependent task added",blockingRemoved:"Dependent task removed",unresolved:"Could not resolve: {entries}",noEligibleTasks:"No matching tasks available",updateFailed:"Failed to update dependencies"}},organization:{title:"Organization",contexts:"Contexts",addContext:"Add context…",contextPlaceholder:"context",contextSelected:"✓ {context}",clearContexts:"Clear contexts",projects:"Projects",addToProject:"Add to project…",subtasks:"Subtasks",addSubtasks:"Add subtasks…",notices:{alreadyInProject:"Task is already in this project",alreadySubtask:"Task is already a subtask of this task",addedToProject:"Added to project: {project}",addedAsSubtask:"Added {subtask} as subtask of {parent}",addToProjectFailed:"Failed to add task to project",addAsSubtaskFailed:"Failed to add task as subtask",updateContextsFailed:"Failed to update contexts",projectSelectFailed:"Failed to open project selector",subtaskSelectFailed:"Failed to open subtask selector",noEligibleSubtasks:"No eligible tasks available to assign as subtasks",currentTaskNotFound:"Current task file not found"}},subtasks:{loading:"Loading subtasks...",noSubtasks:"No subtasks found",loadFailed:"Failed to load subtasks"},markComplete:"Mark complete for this date",markIncomplete:"Mark incomplete for this date",skipInstance:"Skip instance",unskipInstance:"Unskip instance",completion:{submenu:"Mark complete or skip",submenuCompleteOnly:"Mark complete",completeToday:"Completed today",completeAsScheduled:"Completed on schedule",completeOnDue:"Completed on due date",completeOnPicked:"Completed on (pick date)",markIncomplete:"Mark incomplete",noScheduledDate:"No scheduled date on this task",noDueDate:"No due date on this task",noPickedDate:"No date selected",noCompletedStatus:"No completed status configured",pickDateTitle:"Complete on date",completeFailure:"Failed to update task completion: {message}",clearInstancesConfirmTitle:"Clear recorded instances?",clearInstancesConfirmMessage:"Rescheduling will clear these recorded completed/skipped instances on or after the new date: {dates}. They will no longer be marked complete or skipped. Continue?",clearInstancesConfirmButton:"Reschedule and clear"},quickReminders:{atTime:"At time of event",fiveMinutes:"5 minutes before",fifteenMinutes:"15 minutes before",oneHour:"1 hour before",oneDay:"1 day before"},notices:{toggleCompletionFailure:"Failed to toggle recurring task completion: {message}",toggleSkipFailure:"Failed to toggle recurring task skip: {message}",updateDueDateFailure:"Failed to update task due date: {message}",updateScheduledFailure:"Failed to update task scheduled date: {message}",updateCustomDateFailure:"Failed to update {field}: {message}",updateRemindersFailure:"Failed to update reminders",clearRemindersFailure:"Failed to clear reminders",addReminderFailure:"Failed to add reminder",archiveFailure:"Failed to toggle task archive: {message}",copyTitleSuccess:"Task title copied to clipboard",copyFailure:"Failed to copy to clipboard",renameSuccess:'Renamed to "{name}"',renameFailure:"Failed to rename file",copyPathSuccess:"File path copied to clipboard",copyUrlSuccess:"Obsidian URL copied to clipboard",updateRecurrenceFailure:"Failed to update task recurrence: {message}",updateTagsFailed:"Failed to update tags"}},priority:{clearPriority:"Clear priority"},ics:{showDetails:"Show details",createTask:"Create task from event",createNote:"Create note from event",linkNote:"Link existing note",copyTitle:"Copy title",copyLocation:"Copy location",copyUrl:"Copy URL",copyMarkdown:"Copy as Markdown",subscriptionUnknown:"Unknown calendar",notices:{copyTitleSuccess:"Event title copied to clipboard",copyLocationSuccess:"Location copied to clipboard",copyUrlSuccess:"Event URL copied to clipboard",copyMarkdownSuccess:"Event details copied as Markdown",copyFailure:"Failed to copy to clipboard",taskCreated:"Task created: {title}",taskCreateFailure:"Failed to create task from event",noteCreated:"Note created successfully",creationFailure:"Failed to open creation modal",linkSuccess:'Linked note "{name}" to event',linkFailure:"Failed to link note",linkSelectionFailure:"Failed to open note selection"},markdown:{titleFallback:"Untitled event",calendar:"**Calendar:** {value}",date:"**Date & Time:** {value}",location:"**Location:** {value}",descriptionHeading:"### Description",url:"**URL:** {value}",at:" at {time}"}},date:{increment:{plusOneDay:"+1 day",minusOneDay:"-1 day",plusOneWeek:"+1 week",minusOneWeek:"-1 week"},basic:{today:"Today",tomorrow:"Tomorrow",thisWeekend:"This weekend",nextWeek:"Next week",nextMonth:"Next month"},weekdaysLabel:"Weekdays",selected:"✓ {label}",pickDateTime:"Pick date & time…",clearDate:"Clear date",modal:{title:"Set date & time",dateLabel:"Date",timeLabel:"Time (optional)",select:"Select"}}},services:{pomodoro:{notices:{alreadyRunning:"A Pomodoro is already running",resumeCurrentSession:"Resume the current session instead of starting a new one",timerAlreadyRunning:"A timer is already running",resumeSessionInstead:"Resume the current session instead of starting a new one",shortBreakStarted:"Short break started",longBreakStarted:"Long break started",paused:"Pomodoro paused",resumed:"Pomodoro resumed",stoppedAndReset:"Pomodoro stopped and reset",migrationSuccess:"Successfully migrated {count} pomodoro sessions to daily notes.",migrationFailure:"Failed to migrate Pomodoro data. Please try again or check the console for details."}},icsSubscription:{notices:{calendarNotFound:'Calendar "{name}" not found (404). Please check the ICS URL is correct and the calendar is publicly accessible.',calendarAccessDenied:'Calendar "{name}" access denied (500). This may be due to Microsoft Outlook server restrictions. Try regenerating the ICS URL from your calendar settings.',fetchRemoteFailed:'Failed to fetch remote calendar "{name}": {error}',readLocalFailed:'Failed to read local calendar "{name}": {error}'}},calendarExport:{notices:{generateLinkFailed:"Failed to generate calendar link",noTasksToExport:"No tasks found to export",downloadSuccess:"Downloaded {filename} with {count} task{plural}",downloadFailed:"Failed to download calendar file",singleDownloadSuccess:"Downloaded {filename}"}},filter:{groupLabels:{noProject:"No project",noTags:"No tags",invalidDate:"Invalid date",due:{overdue:"Overdue",today:"Today",tomorrow:"Tomorrow",nextSevenDays:"Next seven days",later:"Later",none:"No due date"},scheduled:{past:"Past scheduled",today:"Today",tomorrow:"Tomorrow",nextSevenDays:"Next seven days",later:"Later",none:"No scheduled date"}},errors:{noDatesProvided:"No dates provided"},folders:{root:"(Root)"}},instantTaskConvert:{notices:{noCheckboxTasks:"No checkbox tasks found in the current note.",convertingTasks:"Converting {count} task{plural}...",conversionSuccess:"✅ Successfully converted {count} task{plural} to TaskNotes!",partialConversion:"Converted {successCount} task{successPlural}. {failureCount} failed.",batchConversionFailed:"Failed to perform batch conversion. Please try again.",invalidParameters:"Invalid input parameters.",emptyLine:"Current line is empty or contains no valid content.",parseError:"Error parsing task: {error}",invalidTaskData:"Invalid task data.",replaceLineFailed:"Failed to replace task line.",conversionComplete:"Task converted: {title}",conversionCompleteShortened:'Task converted: "{title}" (filename shortened due to length)',fileExists:"A file with this name already exists. Please try again or rename the task.",conversionFailed:"Failed to convert task. Please try again."}},icsNote:{notices:{templateNotFound:"Template not found: {path}",templateProcessError:"Error processing template: {template}",linkedToEvent:"Linked note to ICS event: {title}"}},task:{notices:{templateNotFound:"Task body template not found: {path}",templateReadError:"Error reading task body template: {template}",occurrenceTemplateNotFound:"Occurrence note template not found: {path}",occurrenceTemplateReadError:"Error reading occurrence note template: {template}",moveTaskFailed:"Failed to move {operation} task: {error}"}},autoExport:{notices:{exportFailed:"TaskNotes auto export failed: {error}"}},notification:{notices:{}}},ui:{icsCard:{untitledEvent:"Untitled event",allDay:"All day",calendarEvent:"Calendar event",calendarFallback:"Calendar"},noteCard:{createdLabel:"Created:",dailyBadge:"Daily",dailyTooltip:"Daily note"},taskCard:{labels:{due:"Due",scheduled:"Scheduled",recurrence:"Recurring",completed:"Completed",created:"Created",modified:"Modified",blocked:"Blocked",blocking:"Blocking"},blockedBadge:"Blocked",blockedBadgeTooltip:"This task is waiting on another task",blockingBadge:"Blocking",blockingBadgeTooltip:"This task is blocking another task",blockingToggle:"Blocking {count} tasks",priorityAriaLabel:"Priority: {label}",taskOptions:"Task options",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"1 reminder set (click to manage)",reminderTooltipMany:"{count} reminders set (click to manage)",detailsTooltip:"Task has details",projectTooltip:"This task is used as a project (click to show/hide subtasks)",projectIndicatorTooltip:"This task is used as a project",expandSubtasks:"Expand subtasks",collapseSubtasks:"Collapse subtasks",dueToday:"{label}: Today",dueTodayAt:"{label}: Today at {time}",dueOverdue:"{label}: {display} (overdue)",dueLabel:"{label}: {display}",scheduledToday:"{label}: Today",scheduledTodayAt:"{label}: Today at {time}",scheduledPast:"{label}: {display} (past)",scheduledLabel:"{label}: {display}",loadingDependencies:"Loading dependencies...",blockingEmpty:"No dependent tasks",blockingLoadError:"Failed to load dependencies",googleCalendarSyncTooltip:"Synced to Google Calendar"},propertyEventCard:{unknownFile:"Unknown file"},filterHeading:{allViewName:"All"},filterBar:{saveView:"Save view",saveViewNamePlaceholder:"Enter view name...",saveButton:"Save",views:"Views",savedFilterViews:"Saved filter views",filters:"Filters",properties:"Properties",sort:"Sort",newTask:"New",expandAllGroups:"Expand all groups",collapseAllGroups:"Collapse all groups",searchTasksPlaceholder:"Search tasks...",searchTasksTooltip:"Search task titles",filterUnavailable:"Filter bar temporarily unavailable",toggleFilter:"Toggle filter",activeFiltersTooltip:"Active filters – click to modify, right-click to clear",configureVisibleProperties:"Configure visible properties",sortAndGroupOptions:"Sort and group options",sortMenuHeader:"Sort",orderMenuHeader:"Order",groupMenuHeader:"Group",createNewTask:"Create new task",filter:"Filter",displayOrganization:"Display & organization",viewOptions:"View options",addFilter:"Add filter",addFilterGroup:"Add filter group",addFilterTooltip:"Add a new filter condition",addFilterGroupTooltip:"Add a nested filter group",clearAllFilters:"Clear all filters and groups",saveCurrentFilter:"Save current filter as view",closeFilterModal:"Close filter modal",deleteFilterGroup:"Delete filter group",deleteCondition:"Delete condition",all:"All",any:"Any",followingAreTrue:"of the following are true:",where:"where",selectProperty:"Select...",chooseProperty:"Choose which task property to filter by",chooseOperator:"Choose how to compare the property value",enterValue:"Enter the value to filter by",selectValue:"Select a {property} to filter by",sortBy:"Sort by:",toggleSortDirection:"Toggle sort direction",chooseSortMethod:"Choose how to sort tasks",groupBy:"Group by:",chooseGroupMethod:"Group tasks by a common property",toggleViewOption:"Toggle {option}",expandCollapseFilters:"Click to expand/collapse filter conditions",expandCollapseSort:"Click to expand/collapse sorting and grouping options",expandCollapseViewOptions:"Click to expand/collapse view-specific options",naturalLanguageDates:"Natural language dates",naturalLanguageExamples:"Show natural language date examples",enterNumericValue:"Enter a numeric value to filter by",enterDateValue:"Enter a date using natural language or ISO format",pickDateTime:"Pick date & time",noSavedViews:"No saved views",savedViews:"Saved views",yourSavedFilters:"Your saved filter configurations",dragToReorder:"Drag to reorder views",loadSavedView:"Load saved view: {name}",deleteView:"Delete view",deleteViewTitle:"Delete view",deleteViewMessage:'Are you sure you want to delete the view "{name}"?',manageAllReminders:"Manage all reminders...",clearAllReminders:"Clear all reminders",customRecurrence:"Custom recurrence...",clearRecurrence:"Clear recurrence",sortOptions:{dueDate:"Due date",scheduledDate:"Scheduled date",priority:"Priority",status:"Status",title:"Title",createdDate:"Created date",tags:"Tags",ascending:"Ascending",descending:"Descending"},group:{none:"None",status:"Status",priority:"Priority",context:"Context",project:"Project",dueDate:"Due date",scheduledDate:"Scheduled date",tags:"Tags",completedDate:"Completed date"},subgroupLabel:"SUBGROUP",notices:{propertiesMenuFailed:"Failed to show properties menu"}}},components:{dateContextMenu:{weekdays:"Weekdays",clearDate:"Clear date",today:"Today",tomorrow:"Tomorrow",thisWeekend:"This weekend",nextWeek:"Next week",nextMonth:"Next month",setDateTime:"Set date & time",dateLabel:"Date",timeLabel:"Time (optional)"},subgroupMenuBuilder:{none:"None",status:"Status",priority:"Priority",context:"Context",project:"Project",dueDate:"Due date",scheduledDate:"Scheduled date",tags:"Tags",completedDate:"Completed date",subgroup:"SUBGROUP"},propertyVisibilityDropdown:{coreProperties:"Core properties",organization:"ORGANIZATION",customProperties:"Custom properties",failed:"Failed to show properties menu",properties:{statusDot:"Status dot",priorityDot:"Priority dot",dueDate:"Due date",scheduledDate:"Scheduled date",timeEstimate:"Time estimate",totalTrackedTime:"Total tracked time",checklistProgress:"Checklist progress",recurrence:"Recurrence",completedDate:"Completed date",createdDate:"Created date",modifiedDate:"Modified date",projects:"Projects",contexts:"Contexts",tags:"Tags",blocked:"Blocked",blocking:"Blocking"}},reminderContextMenu:{remindBeforeDue:"Remind before due...",remindBeforeScheduled:"Remind before scheduled...",manageAllReminders:"Manage all reminders...",clearAllReminders:"Clear all reminders",quickReminders:{atTime:"At time of event",fiveMinutesBefore:"5 minutes before",fifteenMinutesBefore:"15 minutes before",oneHourBefore:"1 hour before",oneDayBefore:"1 day before"}},recurrenceContextMenu:{daily:"Daily",weeklyOn:"Weekly on {day}",everyTwoWeeksOn:"Every 2 weeks on {day}",monthlyOnThe:"Monthly on the {ordinal}",everyThreeMonthsOnThe:"Every 3 months on the {ordinal}",yearlyOn:"Yearly on {month} {ordinal}",weekdaysOnly:"Weekdays only",dailyAfterCompletion:"Daily (after completion)",every3DaysAfterCompletion:"Every 3 days (after completion)",weeklyAfterCompletion:"Weekly (after completion)",monthlyAfterCompletion:"Monthly (after completion)",customRecurrence:"Custom recurrence...",clearRecurrence:"Clear recurrence",customRecurrenceModal:{title:"Custom recurrence",startDate:"Start date",startDateDesc:"The date when the recurrence pattern begins",startTime:"Start time",startTimeDesc:"The time when recurring instances should appear (optional)",recurFrom:"Recur from",recurFromDesc:"When should the next occurrence be calculated?",scheduledDate:"Scheduled date",completionDate:"Completion date",frequency:"Frequency",interval:"Interval",intervalDesc:"Every x days/weeks/months/years",daysOfWeek:"Days of week",daysOfWeekDesc:"Select specific days (for weekly recurrence)",monthlyRecurrence:"Monthly recurrence",monthlyRecurrenceDesc:"Choose how to repeat monthly",yearlyRecurrence:"Yearly recurrence",yearlyRecurrenceDesc:"Choose how to repeat yearly",endCondition:"End condition",endConditionDesc:"Choose when the recurrence should end",neverEnds:"Never ends",endAfterOccurrences:"End after {count} occurrences",endOnDate:"End on {date}",onDayOfMonth:"On day {day} of each month",onTheWeekOfMonth:"On the {week} {day} of each month",onDateOfYear:"On {month} {day} each year",onTheWeekOfYear:"On the {week} {day} of {month} each year",frequencies:{daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},weekPositions:{first:"first",second:"second",third:"third",fourth:"fourth",last:"last"},weekdays:{monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday"},weekdaysShort:{mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat",sun:"Sun"},cancel:"Cancel",save:"Save"}}}};var Oue={common:{appName:"Notes de tâches",new:"Nouveau",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",reorder:{confirmLargeTitle:"Confirmer la réorganisation importante",confirmButton:"Réorganiser les notes",confirmLargeMessage:'La réorganisation ici mettra à jour "{field}" dans {count} notes afin de créer un ordre manuel persistant pour {scope}. Les notes masquées ou filtrées dans le même périmètre peuvent aussi être mises à jour. Continuer ?'},language:"Langue",systemDefault:"Langue du système",loading:"Chargement...",languages:{en:"Anglais",fr:"Français",ru:"Russe",zh:"Chinois",de:"Allemand",es:"Espagnol",ja:"Japonais",pt:"Portugais (Brésil)",ko:"Coréen"},weekdays:{sunday:"Dimanche",monday:"Lundi",tuesday:"Mardi",wednesday:"Mercredi",thursday:"Jeudi",friday:"Vendredi",saturday:"Samedi"},months:{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"}},views:{agenda:{title:"Agenda quotidien",today:"Aujourd'hui",overdue:"En retard",refreshCalendars:"Actualiser les calendriers",actions:{previousPeriod:"Période précédente",nextPeriod:"Période suivante",goToToday:"Aller à aujourd'hui",refreshCalendars:"Actualiser les abonnements calendrier"},loading:"Chargement de l'agenda...",dayToggle:"Basculer l'affichage du jour",overdueToggle:"Basculer la section en retard",expandAllDays:"Déplier tous les jours",collapseAllDays:"Replier tous les jours",notices:{calendarNotReady:"Service de calendrier pas encore prêt",calendarRefreshed:"Abonnements calendrier actualisés",refreshFailed:"Échec de l'actualisation"},empty:{noItemsScheduled:"Aucun élément planifié",noItemsFound:"Aucun élément trouvé",helpText:"Créez des tâches avec des dates d'échéance ou planifiées, ou ajoutez des notes pour les voir ici."},contextMenu:{showOverdueSection:"Afficher la section en retard",showNotes:"Afficher les notes",calendarSubscriptions:"Abonnements au calendrier"},periods:{thisWeek:"Cette semaine"},tipPrefix:"Astuce : "},taskList:{title:"Tâches",expandAllGroups:"Déplier tous les groupes",collapseAllGroups:"Replier tous les groupes",noTasksFound:"Aucune tâche trouvée pour les filtres sélectionnés.",reorder:{scope:{ungrouped:"cette liste non groupée",group:'groupe "{group}"'}},errors:{formulaGroupingReadOnly:"Impossible de réorganiser les tâches dans des groupes basés sur des formules. Les valeurs calculées ne peuvent pas être modifiées directement."}},notes:{title:"Bloc-notes",refreshButton:"Actualiser",refreshingButton:"Actualisation...",notices:{indexingDisabled:"Indexation des notes désactivée"},empty:{noNotesFound:"Aucune note trouvée",helpText:"Aucune note trouvée pour la date sélectionnée. Essayez de sélectionner une date différente dans la vue Mini Calendrier ou créez quelques notes."},loading:"Chargement des notes...",refreshButtonAriaLabel:"Actualiser la liste des notes"},miniCalendar:{title:"Mini calendrier",contextMenu:{openDailyNote:"Ouvrir la note quotidienne",openWeeklyNote:"Ouvrir la note hebdomadaire"}},advancedCalendar:{title:"Calendrier",filters:{showFilters:"Afficher les filtres",hideFilters:"Masquer les filtres"},viewOptions:{calendarSubscriptions:"Abonnements aux calendriers",timeEntries:"Entrées de temps",timeblocks:"Blocs de temps",scheduledDates:"Dates planifiées",dueDates:"Dates d'échéance",allDaySlot:"Créneau toute la journée",scheduledTasks:"Tâches planifiées",recurringTasks:"Tâches récurrentes"},buttons:{refresh:"Actualiser",refreshHint:"Actualiser les abonnements aux calendriers"},notices:{icsServiceNotAvailable:"Service d'abonnement ICS non disponible",calendarRefreshedAll:"Tous les abonnements aux calendriers ont été actualisés avec succès",refreshFailed:"Échec de l'actualisation de certains abonnements aux calendriers",timeblockSpecificTime:"Les blocs de temps doivent avoir des heures spécifiques. Veuillez sélectionner une plage horaire dans la vue semaine ou jour.",timeblockMoved:'Bloc de temps "{title}" déplacé vers {date}',timeblockUpdated:'Horaire du bloc de temps "{title}" mis à jour',timeblockMoveFailed:"Échec du déplacement du bloc de temps : {message}",timeblockResized:'Durée du bloc de temps "{title}" mise à jour',timeblockResizeFailed:"Échec du redimensionnement du bloc de temps : {message}",taskScheduled:'Tâche "{title}" planifiée pour {date}',scheduleTaskFailed:"Échec de la planification de la tâche",endTimeAfterStart:"L'heure de fin doit être après l'heure de début",timeEntryNotFound:"Entrée de temps introuvable",timeEntryDeleted:"Entrée de temps supprimée",deleteTimeEntryFailed:"Échec de la suppression de l'entrée de temps"},timeEntry:{estimatedSuffix:"estimé",trackedSuffix:"suivi",recurringPrefix:"Récurrent : ",completedPrefix:"Terminé : ",createdPrefix:"Créé : ",modifiedPrefix:"Modifié : ",duePrefix:"Échéance : ",scheduledPrefix:"Planifié : "},contextMenus:{openTask:"Ouvrir la tâche",deleteTimeEntry:"Supprimer l'entrée de temps",deleteTimeEntryTitle:"Supprimer l'entrée de temps",deleteTimeEntryConfirm:"Êtes-vous sûr de vouloir supprimer cette entrée de temps{duration} ? Cette action ne peut pas être annulée.",deleteButton:"Supprimer",cancelButton:"Annuler"}},basesCalendar:{title:"Calendrier Bases",today:"Aujourd'hui",buttonText:{month:"M",week:"S",day:"J",year:"A",list:"L",customDays:"{count}J",listDays:"{count}j Liste",refresh:"Actualiser"},hints:{refresh:"Actualiser les abonnements calendrier",today:"Aller à aujourd'hui",prev:"Précédent",next:"Suivant",month:"Vue mensuelle",week:"Vue hebdomadaire",day:"Vue journalière",year:"Vue annuelle",list:"Vue liste",customDays:"Vue {count} jours"},settings:{groups:{dateNavigation:"Navigation par date",events:"Événements",layout:"Mise en page",view:"Vue",display:"Affichage",timeGrid:"Grille horaire",eventLayout:"Disposition des événements",propertyBasedEvents:"Événements basés sur les propriétés",calendarSubscriptions:"Abonnements au calendrier",googleCalendars:"Agendas Google",microsoftCalendars:"Calendriers Microsoft"},dateNavigation:{navigateToDate:"Naviguer vers la date",navigateToDatePlaceholder:"AAAA-MM-JJ (ex. 2025-01-15) - laisser vide pour utiliser la propriété",navigateToDateFromProperty:"Naviguer vers la date depuis la propriété",navigateToDateFromPropertyPlaceholder:"Sélectionner une propriété de date (facultatif)",propertyNavigationStrategy:"Stratégie de navigation par propriété",createDailyNotesFromDateLinks:"Créer des notes quotidiennes depuis les liens de date",strategies:{first:"Premier résultat",earliest:"Date la plus ancienne",latest:"Date la plus récente"}},events:{showScheduledTasks:"Afficher les tâches planifiées",showDueTasks:"Afficher les tâches échues",showOverdueOnToday:"Afficher les tâches en retard aujourd'hui",showRecurringTasks:"Afficher les tâches récurrentes",showTimeEntries:"Afficher les entrées de temps",showTimeblocks:"Afficher les blocs de temps",showPropertyBasedEvents:"Afficher les événements basés sur les propriétés",showCompletedRecurringInstances:"Afficher les instances récurrentes terminées",showSkippedRecurringInstances:"Afficher les instances récurrentes ignorées"},layout:{calendarView:"Vue du calendrier",customDayCount:"Nombre de jours personnalisé",listDayCount:"Nombre de jours de liste",dayStartTime:"Heure de début de journée",dayStartTimePlaceholder:"HH:mm:ss (ex. 08:00:00)",dayEndTime:"Heure de fin de journée",dayEndTimePlaceholder:"HH:mm:ss (ex. 20:00:00)",timeSlotDuration:"Durée de la plage horaire",timeSlotDurationPlaceholder:"HH:mm:ss (ex. 00:30:00)",dragDropResolution:"Résolution du glisser-déposer",dragDropResolutionPlaceholder:"HH:mm:ss (ex. 00:05:00)",weekStartsOn:"La semaine commence le",showWeekNumbers:"Afficher les numéros de semaine",showNowIndicator:"Afficher l'indicateur actuel",showWeekends:"Afficher les week-ends",showAllDaySlot:"Afficher la plage toute la journée",showTimeGrid:"Afficher le détail horaire",showTodayHighlight:"Mettre en surbrillance aujourd'hui",todayColumnWidthMultiplier:"Multiplicateur de largeur de la colonne du jour",showSelectionPreview:"Afficher l'aperçu de sélection",timeFormat:"Format de l'heure",timeFormat12:"12 heures (AM/PM)",timeFormat24:"24 heures",initialScrollTime:"Heure de défilement initial",initialScrollTimePlaceholder:"HH:mm:ss (ex. 08:00:00)",minimumEventHeight:"Hauteur minimale de l'événement (px)",slotEventOverlap:"Autoriser le chevauchement des événements",enableSearch:"Activer la zone de recherche",eventMaxStack:"Max. événements empilés (vue semaine/jour, 0 = illimité)",dayMaxEvents:"Max. événements par jour (vue mois, 0 = automatique)",dayMaxEventRows:"Max. lignes d'événements par jour (vue mois, 0 = illimité)",spanScheduledToDue:"Étendre les tâches entre la date planifiée et la date d'échéance",heightMode:"Mode de hauteur",heightModeFill:"Remplir le conteneur",heightModeAuto:"Hauteur automatique"},propertyBasedEvents:{startDateProperty:"Propriété de date de début",startDatePropertyPlaceholder:"Sélectionner une propriété pour la date/heure de début",endDateProperty:"Propriété de date de fin (facultatif)",endDatePropertyPlaceholder:"Sélectionner une propriété pour la date/heure de fin",titleProperty:"Propriété de titre (facultatif)",titlePropertyPlaceholder:"Sélectionner une propriété pour le titre de l'événement"}},notices:{noDailyNoteForDate:"Aucune note quotidienne n'existe pour cette date."},errors:{failedToInitialize:"Échec de l'initialisation du calendrier"}},kanban:{title:"Tableau Kanban",newTask:"Nouvelle tâche",addCard:"+ Ajouter une carte",noTasks:"Aucune tâche",uncategorized:"Non catégorisé",noProject:"Aucun projet",reorder:{scope:{column:'colonne "{group}"',columnInSwimlane:'colonne "{group}" dans la swimlane "{swimlane}"'}},notices:{loadFailed:"Échec du chargement du tableau Kanban",movedTask:'Tâche déplacée vers "{0}"'},errors:{loadingBoard:"Erreur lors du chargement du tableau.",noGroupBy:"La vue Kanban nécessite qu'une propriété 'Grouper par' soit configurée. Cliquez sur le bouton 'Trier' et sélectionnez une propriété sous 'Grouper par'.",formulaGroupingReadOnly:"Impossible de déplacer les tâches entre les colonnes basées sur des formules. Les valeurs de formule sont calculées et ne peuvent pas être modifiées directement.",formulaSwimlaneReadOnly:"Impossible de déplacer les tâches entre les couloirs basés sur des formules. Les valeurs de formule sont calculées et ne peuvent pas être modifiées directement."},columnTitle:"Sans titre"},pomodoro:{title:"Sessions Pomodoro",status:{focus:"Concentration",ready:"Prêt à démarrer",paused:"En pause",working:"En travail",shortBreak:"Pause courte",longBreak:"Pause longue",breakPrompt:"Bravo ! C'est l'heure d'une pause {length}",breakLength:{short:"courte",long:"longue"},breakComplete:"Pause terminée ! Prêt pour le prochain pomodoro ?"},buttons:{start:"Démarrer",pause:"Mettre en pause",stop:"Arrêter",resume:"Reprendre",startShortBreak:"Commencer la pause courte",startLongBreak:"Commencer la pause longue",skipBreak:"Passer la pause",chooseTask:"Choisir une tâche...",changeTask:"Changer de tâche...",clearTask:"Effacer la tâche",selectDifferentTask:"Sélectionner une autre tâche",startFocus:"Démarrer la concentration",addMinute:"Ajouter une minute",subtractMinute:"Retirer une minute"},notices:{noTasks:"Aucune tâche non archivée retrouvée. Créez d'abord quelques tâches.",loadFailed:"Impossible de charger les tâches",invalidDuration:"Saisissez une durée comme 10, 10:30 ou 1:30:00."},statsLabel:"terminées aujourd'hui",meta:{ready:"{time} prévu · {count} terminés aujourd’hui",running:"{time} restant · Se termine à {endTime}",paused:"{type} en pause · {time} restant",breakReady:"{type} prêt · {time} prévu"},timer:{editLabel:"Modifier la durée du minuteur",inputLabel:"Durée du minuteur"}},pomodoroStats:{title:"Statistiques Pomodoro",heading:"Statistiques Pomodoro",refresh:"Actualiser",sections:{overview:"Aperçu",today:"Aujourd'hui",week:"Cette semaine",allTime:"Historique",recent:"Sessions récentes"},overviewCards:{todayPomos:{label:"Pomodoros du jour",change:{more:"{count} de plus qu'hier",less:"{count} de moins qu'hier"}},totalPomos:{label:"Total des pomodoros"},todayFocus:{label:"Temps de focus du jour",change:{more:"{duration} de plus qu'hier",less:"{duration} de moins qu'hier"}},totalFocus:{label:"Durée de focus cumulée"}},stats:{pomodoros:"Sessions",streak:"Série",minutes:"Minutes totales",average:"Durée moy.",completion:"Taux d'achèvement"},recents:{empty:"Aucune session enregistrée pour le moment",duration:"Durée : {minutes} min",status:{completed:"Terminée",interrupted:"Interrompue"},delete:"Supprimer la session",deleteAria:"Supprimer la session Pomodoro",deleteConfirmTitle:"Supprimer la session Pomodoro ?",deleteConfirmMessage:"Cela supprime la session de l’historique Pomodoro. Les entrées de temps de tâche existantes ne sont pas modifiées.",deleteConfirmButton:"Supprimer",deleteSuccess:"Session Pomodoro supprimée",deleteNotFound:"Session Pomodoro introuvable"},basesMigration:{title:"Vous voulez une vue Base ?",description:"Les vues Base Pomodoro utilisent le frontmatter des notes quotidiennes. Pour voir cet historique dans la Base de statistiques Pomodoro générée, migrez les données Pomodoro dans les paramètres, puis définissez le stockage sur les notes quotidiennes."}},stats:{title:"Statistiques",taskProjectStats:"Statistiques des tâches et projets",sections:{filters:"Filtres",overview:"Aperçu",today:"Aujourd'hui",thisWeek:"Cette semaine",thisMonth:"Ce mois",projectBreakdown:"Répartition par projet",dateRange:"Plage de dates"},filters:{minTime:"Temps min (minutes)",allTasks:"Toutes les tâches",activeOnly:"Actives uniquement",completedOnly:"Terminées uniquement"},refreshButton:"Actualiser",timeRanges:{allTime:"Tout le temps",last7Days:"7 derniers jours",last30Days:"30 derniers jours",last90Days:"90 derniers jours",customRange:"Plage personnalisée"},resetFiltersButton:"Réinitialiser les filtres",dateRangeFrom:"De",dateRangeTo:"À",noProject:"Aucun projet",cards:{timeTrackedEstimated:"Temps suivi / estimé",totalTasks:"Total des tâches",completionRate:"Taux de complétion",activeProjects:"Projets actifs",avgTimePerTask:"Temps moyen par tâche"},labels:{tasks:"Tâches",completed:"Terminées",projects:"Projets"},noProjectData:"Aucune donnée de projet disponible",notAvailable:"N/D",noTasks:"Aucune tâche trouvée",loading:"Chargement..."},releaseNotes:{title:"Nouveautés de TaskNotes {version}",header:"Nouveautés de TaskNotes {version}",viewAllLink:"Voir toutes les notes de version sur GitHub →",starMessage:"Nous apprécions vraiment tous les retours. Si quelque chose ne vous semble pas correct, dites-le-nous sur GitHub. Si TaskNotes vous est utile, pensez à lui donner une étoile.",baseFilesNotice:"> [!info] À propos des fichiers `.base` par défaut\n> Les modifications des modèles `.base` générés par défaut n'écrasent pas vos fichiers `.base` existants, afin de préserver vos personnalisations.\n> Si vous souhaitez profiter des dernières améliorations de modèles, régénérez les fichiers base via **Paramètres → TaskNotes → Général → Vues et fichiers base → Mettre à jour les fichiers**."}},settings:{header:{documentation:"Documentation",documentationUrl:"https://tasknotes.dev"},tabs:{general:"Général",taskProperties:"Propriétés des tâches",modalFields:"Champs du modal",defaults:"Défauts et modèles",appearance:"Apparence et interface",features:"Fonctionnalités",integrations:"Intégrations"},features:{inlineTasks:{header:"Tâches dans les notes",description:"Paramètres des liens de tâches et conversion des cases à cocher en tâches dans les notes."},taskCreation:{header:"Création de tâches",description:"Configurer ce qui se passe après la création des tâches.",openAfterCreate:{name:"Ouvrir la tâche après création",description:"Choisir si la fenêtre normale Créer une tâche ouvre la nouvelle note de tâche après l'enregistrement.",options:{none:"Ne pas ouvrir",sameTab:"Ouvrir dans le même onglet",newTab:"Ouvrir dans un nouvel onglet"}}},overlays:{taskLinkToggle:{name:"Survol des liens de tâches",description:"Afficher des superpositions interactives lorsque la souris passe sur les liens de tâches"},aliasExclusion:{name:"Désactiver la superposition pour les liens avec alias",description:"Ne pas afficher le widget de tâche si le lien contient un alias (ex. [[Tâche|Alias]])."}},instantConvert:{toggle:{name:"Afficher le bouton de conversion à côté des cases à cocher",description:"Afficher un bouton en ligne à côté des cases à cocher Markdown qui les convertit en TaskNotes"},preserveCheckbox:{name:"Conserver la case à cocher lors de la conversion",description:"Laisser le marqueur de case à cocher Markdown d'origine en place lors de la conversion d'une case à cocher en lien TaskNote"},folder:{name:"Dossier des tâches créées en ligne",description:"Dossier où seront créées les tâches issues de commandes en ligne ou de la conversion de cases à cocher. Laissez vide pour utiliser le dossier de tâches par défaut. Utilisez {{currentNotePath}} pour le dossier de la note actuelle, ou {{currentNoteTitle}} pour un sous-dossier nommé d’après la note actuelle."}},nlp:{header:"Traitement du langage naturel",description:"Analyse les dates, priorités et autres propriétés depuis le texte saisi.",enable:{name:"Activer la saisie en langage naturel",description:"Analyser les dates, priorités et contextes lors de la création de tâches"},defaultToScheduled:{name:"Planifié par défaut",description:"Si une date est détectée sans contexte, la considérer comme planifiée plutôt qu'échéance"},language:{name:"Langue du NLP",description:"Langue utilisée pour les modèles de traitement du langage naturel et l'analyse des dates"},statusTrigger:{name:"Déclencheur des statuts suggérés",description:"Texte qui déclenche les suggestions de statut (laisser vide pour désactiver)"}},pomodoro:{header:"Minuteur Pomodoro",description:"Configure les intervalles travail/pause du minuteur Pomodoro.",workDuration:{name:"Durée de travail",description:"Durée des sessions de travail en minutes"},shortBreak:{name:"Durée de la pause courte",description:"Durée des pauses courtes en minutes"},longBreak:{name:"Durée de la pause longue",description:"Durée des pauses longues en minutes"},longBreakInterval:{name:"Intervalle des pauses longues",description:"Nombre de sessions de travail avant une pause longue"},autoStartBreaks:{name:"Lancer automatiquement les pauses",description:"Démarrer automatiquement les pauses après chaque session de travail"},autoStartWork:{name:"Reprise automatique du travail",description:"Démarrer automatiquement une session de travail après les pauses"},notifications:{name:"Notifications Pomodoro",description:"Afficher une notification lorsque les sessions Pomodoro se terminent"},mobileSidebar:{name:"Barre latérale mobile",description:"Où ouvrir le minuteur Pomodoro sur les appareils mobiles",tab:"Panneau de notes",left:"Barre latérale gauche",right:"Barre latérale droite"},statusBar:{name:"Afficher Pomodoro dans la barre d’état",description:"Afficher le compte à rebours Pomodoro actif dans la barre d’état d’Obsidian"}},uiLanguage:{header:"Langue de l'interface",description:"Modifiez la langue des menus, notifications et vues de TaskNotes.",dropdown:{name:"Langue de l'interface",description:"Sélectionnez la langue utilisée pour le texte de l'interface TaskNotes"}},pomodoroSound:{enabledName:"Son activé",enabledDesc:"Jouer un son à la fin des sessions Pomodoro",volumeName:"Volume du son",volumeDesc:"Volume des sons Pomodoro (0-100)"},dataStorage:{name:"Stockage des données Pomodoro",description:"Configurez où les données de session pomodoro sont stockées et comment elles sont gérées.",dailyNotes:"Notes quotidiennes",pluginData:"Données du plugin",notices:{locationChanged:"Emplacement de stockage Pomodoro changé vers {location}"}},notifications:{header:"Notifications",description:"Configurez les notifications de rappel de tâches et les alertes.",enableName:"Activer les notifications",enableDesc:"Activer les notifications de rappel de tâches",typeName:"Type de notification",typeDesc:"Type de notifications à afficher",systemLabel:"Notifications système",inAppLabel:"Notifications dans l'application",soundEnabledName:"Son de notification",soundEnabledDesc:"Jouer un son lorsque les rappels de tâche se déclenchent",soundVolumeName:"Volume du son",soundVolumeDesc:"Volume des sons de rappel de tâche (0-100)",soundPreviewName:"Préécouter le son de notification",soundPreviewDesc:"Jouer le son de rappel de tâche configuré",soundPreviewButton:"Préécouter",testReminderName:"Envoyer un rappel de test",testReminderDesc:"Envoyer un rappel de test avec le type de notification et les paramètres sonores actuels.",testReminderButton:"Envoyer le test"},overdue:{hideCompletedName:"Masquer les tâches terminées des retards",hideCompletedDesc:"Exclure les tâches terminées du calcul des tâches en retard"},indexing:{disableName:"Désactiver l'indexation des notes",disableDesc:"Désactiver l'indexation automatique du contenu des notes pour de meilleures performances"},suggestions:{debounceName:"Délai des suggestions",debounceDesc:"Délai en millisecondes avant d'afficher les suggestions"},timeTracking:{autoStopName:"Arrêt automatique du suivi du temps",autoStopDesc:"Arrêter automatiquement le suivi du temps lorsqu'une tâche est marquée comme terminée",stopNotificationName:"Notification d'arrêt du suivi du temps",stopNotificationDesc:"Afficher une notification lorsque le suivi du temps est automatiquement arrêté"},recurring:{maintainOffsetName:"Maintenir le décalage de date d'échéance dans les tâches récurrentes",maintainOffsetDesc:"Conserver le décalage entre la date d'échéance et la date planifiée lors de l'achèvement des tâches récurrentes",resetCheckboxesName:"Réinitialiser les cases à cocher lors de la récurrence",resetCheckboxesDesc:"Réinitialiser toutes les cases à cocher markdown dans le corps de la tâche lorsqu'une tâche récurrente est terminée et reprogrammée"},timeblocking:{header:"Planification par blocs",description:"Configurez la fonctionnalité de planification par blocs pour une programmation légère dans les notes quotidiennes. Glissez sur les vues calendrier pour créer des événements - sélectionnez 'Timeblock' dans le menu contextuel.",enableName:"Activer la planification par blocs",enableDesc:"Activer la fonctionnalité de planification par blocs pour une programmation légère dans les notes quotidiennes. Lorsqu'activé, l'option 'Timeblock' apparaît dans le menu contextuel de glissement du calendrier.",showBlocksName:"Afficher les blocs de temps",showBlocksDesc:"Afficher les blocs de temps des notes quotidiennes par défaut",defaultColorName:"Couleur par défaut des blocs de temps",defaultColorDesc:"La couleur par défaut utilisée lors de la création de nouveaux blocs de temps",usage:"Utilisation : Glissez sur le calendrier pour créer des événements. Sélectionnez 'Timeblock' dans le menu contextuel (uniquement visible lorsque la planification par blocs est activée). Glissez pour déplacer les blocs de temps existants. Ajustez les bords pour modifier la durée."},performance:{header:"Performance et comportement",description:"Configurez les options de performance et de comportement du plugin."},timeTrackingSection:{header:"Suivi du temps",description:"Configurez les comportements de suivi automatique du temps."},recurringSection:{header:"Tâches récurrentes",description:"Configurez le comportement pour la gestion des tâches récurrentes."},debugLogging:{header:"Journalisation du débogage",description:"Configure la sortie des journaux de débogage pour la résolution des problèmes.",enableName:"Activer la journalisation de débogage",enableDesc:"Consigner les diagnostics détaillés de glisser-déposer et de vue dans la console développeur. Utile pour le dépannage."}},defaults:{header:{basicDefaults:"Paramètres par défaut",dateDefaults:"Dates par défaut",defaultReminders:"Rappels par défaut",bodyTemplate:"Modèle de contenu",instantTaskConversion:"Conversion instantanée en tâche"},description:{basicDefaults:"Définir les valeurs par défaut pour les nouvelles tâches afin d'accélérer la création.",dateDefaults:"Définir les dates d'échéance et de planification par défaut pour les nouvelles tâches.",defaultReminders:"Configurer les rappels par défaut qui seront ajoutés aux nouvelles tâches.",bodyTemplate:"Configurer un fichier modèle à utiliser pour le contenu des nouvelles tâches.",instantTaskConversion:"Configurer le comportement lors de la conversion instantanée de texte en tâches."},basicDefaults:{defaultStatus:{name:"Statut par défaut",description:"Statut par défaut pour les nouvelles tâches"},defaultPriority:{name:"Priorité par défaut",description:"Priorité par défaut pour les nouvelles tâches"},defaultContexts:{name:"Contextes par défaut",description:"Liste de contextes par défaut séparés par des virgules (ex. @maison, @travail)",placeholder:"@maison, @travail"},defaultTags:{name:"Tags par défaut",description:"Liste de tags par défaut séparés par des virgules (sans #)",placeholder:"important, urgent"},defaultProjects:{name:"Projets par défaut",description:"Liens de projets par défaut pour les nouvelles tâches",selectButton:"Sélectionner des projets",selectTooltip:"Choisir les notes de projet à lier par défaut",removeTooltip:"Retirer {name} des projets par défaut"},useParentNoteForTaskCreation:{name:"Utiliser la note active comme projet pour les nouvelles tâches",description:"Associe automatiquement la note active comme projet lors de l'ouverture de la création de tâche depuis la palette de commandes ou le ruban"},useParentNoteAsProject:{name:"Utiliser la note parent comme projet pour la création en ligne et la conversion instantanée",description:"Associe automatiquement la note source comme projet lors de l'utilisation de la création de tâches en ligne ou de la conversion instantanée"},useParentHeaderAsProject:{name:"Utiliser le titre parent comme projet lors de la conversion instantanée",description:"Lier automatiquement le titre le plus proche au-dessus de la ligne convertie comme projet lors de la conversion instantanée de tâche"},defaultTimeEstimate:{name:"Estimation de temps par défaut",description:"Estimation de temps par défaut en minutes (0 = aucune par défaut)",placeholder:"60"},defaultRecurrence:{name:"Récurrence par défaut",description:"Modèle de récurrence par défaut pour les nouvelles tâches"}},dateDefaults:{defaultDueDate:{name:"Date d'échéance par défaut",description:"Date d'échéance par défaut pour les nouvelles tâches"},defaultScheduledDate:{name:"Date planifiée par défaut",description:"Date planifiée par défaut pour les nouvelles tâches"}},reminders:{addReminder:{name:"Ajouter un rappel par défaut",description:"Créer un nouveau rappel par défaut qui sera ajouté à toutes les nouvelles tâches",buttonText:"Ajouter un rappel"},emptyState:"Aucun rappel par défaut configuré. Ajoutez un rappel pour être automatiquement notifié des nouvelles tâches.",emptyStateButton:"Ajouter un rappel",reminderDescription:"Description du rappel",unnamedReminder:"Rappel sans nom",deleteTooltip:"Supprimer le rappel",fields:{description:"Description :",type:"Type :",offset:"Décalage :",unit:"Unité :",direction:"Direction :",relatedTo:"Relatif à :",date:"Date :",time:"Heure :"},types:{relative:"Relatif (avant/après les dates de la tâche)",absolute:"Absolu (date/heure spécifique)"},units:{minutes:"minutes",hours:"heures",days:"jours"},directions:{before:"avant",after:"après"},relatedTo:{due:"date d'échéance",scheduled:"date planifiée"}},bodyTemplate:{useBodyTemplate:{name:"Utiliser un modèle de contenu",description:"Utiliser un fichier modèle pour le contenu du corps de la tâche"},bodyTemplateFile:{name:"Fichier modèle de contenu",description:"Chemin vers le fichier modèle pour le contenu du corps de la tâche. Prend en charge les variables comme {{title}}, {{date}}, {{time}}, {{priority}}, {{status}}, etc.",placeholder:"Templates/Modèle de tâche.md",ariaLabel:"Chemin vers le fichier modèle de contenu"},useOccurrenceBodyTemplate:{name:"Utiliser un modèle de note d'occurrence",description:"Utiliser un modèle de secours séparé pour les notes d'occurrence matérialisées lorsque la tâche récurrente n'a pas de occurrence_template"},occurrenceBodyTemplateFile:{name:"Fichier modèle de note d'occurrence",description:"Chemin vers le fichier modèle pour les notes d'occurrence matérialisées. Le champ occurrence_template d'une tâche récurrente est prioritaire sur ce secours.",placeholder:"Templates/Modèle occurrence.md",ariaLabel:"Chemin vers le fichier modèle de note d'occurrence"},variablesHeader:"Variables du modèle :",variables:{title:"{{title}} - Titre de la tâche",details:"{{details}} - Détails fournis par l'utilisateur depuis la fenêtre",date:"{{date}} - Date actuelle (AAAA-MM-JJ)",time:"{{time}} - Heure actuelle (HH:MM)",priority:"{{priority}} - Priorité de la tâche",status:"{{status}} - Statut de la tâche",contexts:"{{contexts}} - Contextes de la tâche",tags:"{{tags}} - Tags de la tâche",projects:"{{projects}} - Projets de la tâche"}},instantConversion:{useDefaultsOnInstantConvert:{name:"Utiliser les paramètres par défaut lors de la conversion instantanée",description:"Appliquer les paramètres de tâche par défaut lors de la conversion instantanée de texte en tâches"}},options:{noDefault:"Aucune par défaut",none:"Aucune",today:"Aujourd'hui",tomorrow:"Demain",nextWeek:"La semaine prochaine",daily:"Quotidien",weekly:"Hebdomadaire",monthly:"Mensuel",yearly:"Annuel"}},general:{taskStorage:{header:"Stockage des tâches",description:"Configurez où les tâches sont stockées et comment elles sont identifiées.",defaultFolder:{name:"Dossier par défaut des tâches",description:"Emplacement par défaut des nouvelles tâches. Prend en charge les variables de modèle de dossier comme {{currentNotePath}}, {{currentNoteTitle}} et {{projectFilePath}}, ainsi que les jetons de date de style Daily Notes comme YYYY/MM/DD."},moveArchived:{name:"Déplacer les tâches archivées vers un dossier",description:"Déplacer automatiquement les tâches archivées vers un dossier d'archive"},archiveFolder:{name:"Dossier d'archive",description:"Dossier vers lequel déplacer les tâches lorsqu'elles sont archivées. Supporte les variables de modèle comme {{year}}, {{month}}, {{priority}}, etc."}},taskIdentification:{header:"Identification des tâches",description:"Choisissez comment TaskNotes identifie les notes comme des tâches.",identifyBy:{name:"Identifier les tâches par",description:"Choisissez d'identifier les tâches par tag ou par une propriété frontmatter",options:{tag:"Étiquette",property:"Propriété"}},taskTag:{name:"Tag de tâche",description:"Tag qui identifie les notes comme des tâches (sans #). Les filtres des vues .base existantes conservent l'ancien tag après ce changement ; mettez à jour les fichiers Base par défaut ou modifiez ces filtres."},hideIdentifyingTags:{name:"Masquer les tags d'identification dans les cartes de tâches",description:"Lorsque activé, les tags correspondant au tag d'identification de tâche (y compris les correspondances hiérarchiques comme 'task/project') seront masqués dans l'affichage des cartes de tâches"},hideIdentifyingTagsMode:{name:"Portée des tags masqués",description:"Choisissez si le masquage des tags d'identification masque aussi les tags imbriqués.",options:{all:"Tag de tâche et tags imbriqués",exactOnly:"Tag de tâche exact seulement"}},taskProperty:{name:"Nom de la propriété de tâche",description:'Le nom de la propriété frontmatter (ex. "category")'},taskPropertyValue:{name:"Valeur de la propriété de tâche",description:'La valeur qui identifie une note comme une tâche (ex. "task")'}},folderManagement:{header:"Gestion des dossiers",excludedFolders:{name:"Dossiers exclus",description:"Liste séparée par des virgules des dossiers à exclure de l'indexation des tâches et des suggestions de projets"}},frontmatter:{header:"Frontmatter",description:"Configurez la façon dont les liens sont formatés dans les propriétés frontmatter.",useMarkdownLinks:{name:"Utiliser des liens markdown dans le frontmatter",description:`Générer des liens markdown ([text](path)) au lieu de wikilinks ([[link]]) dans les propriétés frontmatter.
⚠️ Nécessite le plugin 'obsidian-frontmatter-markdown-links' pour fonctionner correctement.`}},taskInteraction:{header:"Interaction avec les tâches",description:"Configurez le comportement des clics sur les tâches.",singleClick:{name:"Action du clic simple",description:"Action effectuée lors d'un clic simple sur une carte de tâche"},doubleClick:{name:"Action du double-clic",description:"Action effectuée lors d'un double-clic sur une carte de tâche"},actions:{edit:"Modifier la tâche",openNote:"Ouvrir la note",none:"Aucune action"}},releaseNotes:{header:"Notes de version",description:"Version actuelle : {version}",showOnUpdate:{name:"Afficher les notes de version après la mise à jour",description:"Ouvrir automatiquement les notes de version lorsque TaskNotes est mis à jour vers une nouvelle version"},checkForUpdates:{name:"Vérifier les nouvelles versions au démarrage",description:"Vérifie GitHub une fois au démarrage de TaskNotes et affiche une notification lorsqu'une nouvelle version compatible est disponible"},viewButton:{name:"Voir les notes de version",description:"Découvrez les nouveautés de la dernière version de TaskNotes",buttonText:"Voir les notes de version"}}},taskProperties:{sections:{coreProperties:"Propriétés principales",corePropertiesDesc:"Le statut et la priorité sont les propriétés principales qui définissent l'état et l'importance d'une tâche.",dateProperties:"Propriétés de date",datePropertiesDesc:"Configurez les dates d'échéance et de planification des tâches.",organizationProperties:"Propriétés d'organisation",organizationPropertiesDesc:"Organisez les tâches avec des contextes, projets et étiquettes.",taskDetails:"Détails de la tâche",taskDetailsDesc:"Détails supplémentaires comme les estimations de temps, la récurrence et les rappels.",metadataProperties:"Propriétés de métadonnées",metadataPropertiesDesc:"Propriétés gérées par le système pour suivre l'historique des tâches.",featureProperties:"Propriétés de fonctionnalités",featurePropertiesDesc:"Propriétés utilisées par des fonctionnalités TaskNotes spécifiques comme le minuteur Pomodoro et la synchronisation du calendrier."},propertyCard:{propertyKey:"Clé de propriété :",default:"Par défaut :",nlpTrigger:"Déclencheur NLP :",triggerChar:"Caractère déclencheur :",triggerEmpty:"Le déclencheur ne peut pas être vide",triggerTooLong:"Le déclencheur est trop long (max 10 caractères)"},properties:{status:{name:"Statut",description:"Suit l'état actuel d'une tâche (ex. à faire, en cours, terminé). Le statut détermine si une tâche apparaît comme terminée et peut déclencher l'archivage automatique."},priority:{name:"Priorité",description:"Indique l'importance de la tâche. Utilisé pour le tri et le filtrage. Les valeurs sont triées alphabétiquement dans les vues Bases, utilisez donc des préfixes comme 1-, 2- pour contrôler l'ordre."},due:{name:"Date d'échéance",description:"La date limite à laquelle une tâche doit être terminée. Les tâches dépassant leur date d'échéance apparaissent en retard. Stocké comme date dans le frontmatter."},scheduled:{name:"Date planifiée",description:"Quand vous prévoyez de travailler sur une tâche. Contrairement à la date d'échéance, cela représente votre heure de début prévue. Les tâches apparaissent dans le calendrier à leur date/heure planifiée."},contexts:{name:"Contextes",description:"Lieux ou conditions où une tâche peut être effectuée (ex. @maison, @bureau, @téléphone). Utile pour filtrer les tâches selon votre situation actuelle. Stocké comme liste."},projects:{name:"Projets",description:"Liens vers les notes de projet auxquelles cette tâche appartient. Stocké comme wikilinks (ex. [[Nom du projet]]). Les tâches peuvent appartenir à plusieurs projets."},tags:{name:"Étiquettes",description:"Étiquettes Obsidian natives pour catégoriser les tâches. Stockées dans la propriété tags du frontmatter et fonctionnent avec les fonctionnalités d'étiquettes d'Obsidian."},timeEstimate:{name:"Estimation de temps",description:"Minutes estimées pour terminer la tâche. Utilisé pour la planification du temps et la gestion de la charge de travail. Affiché sur les cartes de tâches et les événements du calendrier."},recurrence:{name:"Récurrence",description:"Modèle pour les tâches répétitives (quotidien, hebdomadaire, mensuel, annuel ou RRULE personnalisée). Quand une tâche récurrente est terminée, sa date planifiée est automatiquement mise à jour à la prochaine occurrence."},recurrenceAnchor:{name:"Ancre de récurrence",description:"Contrôle le calcul de la prochaine occurrence : 'scheduled' utilise la date planifiée, 'completion' utilise la date de complétion réelle."},reminders:{name:"Rappels",description:"Notifications déclenchées avant les dates d'échéance ou planifiées. Stocké comme liste d'objets de rappel avec le timing et une description optionnelle."},title:{name:"Titre",description:"Le nom de la tâche. Peut être stocké dans le frontmatter ou dans le nom du fichier (quand 'Stocker le titre dans le nom du fichier' est activé)."},dateCreated:{name:"Date de création",description:"Horodatage de la création de la tâche. Défini automatiquement et utilisé pour le tri par ordre de création."},dateModified:{name:"Date de modification",description:"Horodatage de la dernière modification de la tâche. Mis à jour automatiquement quand une propriété de tâche change."},completedDate:{name:"Date de complétion",description:"Horodatage quand la tâche a été marquée comme terminée. Défini automatiquement quand le statut passe à un état terminé."},archiveTag:{name:"Étiquette d'archive",description:"Étiquette ajoutée aux tâches lors de l'archivage. Utilisée pour identifier les tâches archivées et peut déclencher le déplacement des fichiers vers le dossier d'archive."},timeEntries:{name:"Entrées de temps",description:"Enregistrements des sessions de suivi du temps pour cette tâche. Chaque entrée stocke les horodatages de début et de fin. Utilisé pour calculer le temps total passé."},completeInstances:{name:"Instances terminées",description:"Historique de complétion pour les tâches récurrentes. Stocke les dates auxquelles chaque instance a été terminée pour éviter les doublons."},skippedInstances:{name:"Instances ignorées",description:"Occurrences ignorées pour les tâches récurrentes. Stocke les dates des instances qui ont été ignorées plutôt que terminées."},blockedBy:{name:"Bloquée par",description:"Liens vers les tâches qui doivent être terminées avant celle-ci. Stocké comme wikilinks. Les tâches bloquées affichent un indicateur visuel."},sortOrder:{name:"Ordre manuel",description:"Propriété de frontmatter utilisée pour le classement manuel par glisser-déposer. Une vue doit être triée par cette propriété pour que le glisser-déposer fonctionne."},pomodoros:{name:"Pomodoros",description:"Nombre de sessions Pomodoro terminées. Quand le stockage de données est configuré sur 'Notes quotidiennes', ceci est écrit dans les notes quotidiennes au lieu des fichiers de tâches."},icsEventId:{name:"ID d'événement ICS",description:"Identifiant unique liant une note à un événement de calendrier ICS. Ajouté automatiquement lors de la création de notes à partir d'événements de calendrier."},icsEventTag:{name:"Étiquette d'événement ICS",description:"Étiquette identifiant les notes créées à partir d'événements de calendrier ICS. Utilisée pour distinguer les notes générées par le calendrier des tâches normales."}},statusCard:{valuesHeader:"Valeurs de statut"},priorityCard:{valuesHeader:"Valeurs de priorité"},projectsCard:{defaultProjects:"Projets par défaut :",useParentNoteForTaskCreation:"Utiliser la note active pour les nouvelles tâches :",useParentNoteForInlineTasks:"Utiliser la note parente pour la création en ligne/conversion instantanée :",useParentHeader:"Utiliser le titre parent comme projet :",inheritParentTaskProperties:"Hériter des propriétés de la tâche parente pour les sous-tâches :",noDefaultProjects:"Aucun projet par défaut sélectionné",autosuggestFilters:"Filtres d'auto-suggestion",customizeDisplay:"Personnaliser l'affichage",filtersOn:"Filtres actifs"},titleCard:{storeTitleInFilename:"Stocker le titre dans le nom du fichier :",storedInFilename:"Stocké dans le nom du fichier",filenameUpdatesWithTitle:"Le nom du fichier sera automatiquement mis à jour quand le titre de la tâche change.",filenameFormat:"Format du nom de fichier :",customTemplate:"Modèle personnalisé :",legacySyntaxWarning:"La syntaxe à accolades simples comme {title} est obsolète. Veuillez utiliser la syntaxe à accolades doubles {{title}} pour la cohérence avec les modèles de corps.",occurrenceFilenameTemplate:"Modèle de nom de fichier des occurrences",occurrenceFilenameTemplateHelp:"Modèle de nom de fichier pour les occurrences matérialisées des tâches récurrentes. Laissez-le vide pour conserver le nom existant (titre de la tâche parente suivi d’un suffixe numérique). Choisissez explicitement la granularité avec {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}} ou {{occurrenceMonthName}}. Toutes les variables de nom de fichier habituelles fonctionnent également. Une tâche parente peut remplacer ce modèle via la propriété de frontmatter configurée ci-dessous.",occurrenceFilenameProperty:"Propriété de remplacement du modèle d’occurrence",occurrenceFilenamePropertyHelp:"Nom de la propriété de frontmatter d’une tâche récurrente parente qui remplace le modèle de nom de fichier de ses occurrences."},tagsCard:{nativeObsidianTags:"Utilise les étiquettes Obsidian natives"},remindersCard:{defaultReminders:"Rappels par défaut"},taskStatuses:{header:"Statuts des tâches",description:"Personnalisez les options de statut disponibles pour vos tâches. Ces statuts contrôlent le cycle de vie des tâches et déterminent quand les tâches sont considérées comme terminées.",howTheyWork:{title:"Comment fonctionnent les statuts :",value:`Valeur : L'identifiant interne stocké dans vos fichiers de tâches (ex. "in-progress")`,label:`Label : Le nom affiché dans l'interface (ex. "En cours")`,color:"Couleur : Couleur d'indicateur visuel pour les points et badges de statut",icon:`Icône : Nom d'icône Lucide optionnel à afficher à la place du point coloré (ex. "check", "circle", "clock"). Parcourir les icônes sur lucide.dev`,completed:"Terminé : Quand coché, les tâches avec ce statut sont considérées comme finies et peuvent être filtrées différemment",autoArchive:"Archivage auto : Quand activé, les tâches seront automatiquement archivées après le délai spécifié (1-1440 minutes)",orderNote:"L'ordre ci-dessous détermine la séquence lors du passage d'un statut à l'autre en cliquant sur les badges de statut des tâches."},addNew:{name:"Ajouter un nouveau statut",description:"Créer une nouvelle option de statut pour vos tâches",buttonText:"Ajouter un statut"},validationNote:'Note : Vous devez avoir au moins 2 statuts, et au moins un statut doit être marqué comme "Terminé".',emptyState:"Aucun statut personnalisé configuré. Ajoutez un statut pour commencer.",emptyStateButton:"Ajouter un statut",fields:{value:"Valeur :",label:"Label :",color:"Couleur :",icon:"Icône :",completed:"Terminé :",excludeFromCycle:"Ignorer au cycle :",nextStatus:"Statut suivant :",autoArchive:"Archivage auto :",delayMinutes:"Délai (minutes) :"},placeholders:{value:"en-cours",label:"En cours",icon:"check, circle, clock",nextStatusDefault:"Utiliser l'ordre des statuts"},badges:{completed:"Terminé"},deleteConfirm:'Voulez-vous vraiment supprimer le statut "{label}" ?'},taskPriorities:{header:"Priorités des tâches",description:"Personnalisez les niveaux de priorité disponibles pour vos tâches. Dans v4.0+, les priorités sont triées alphabétiquement par leur valeur dans les vues Bases.",howTheyWork:{title:"Comment fonctionnent les priorités :",value:`Valeur : L'identifiant interne stocké dans vos fichiers de tâches. Utilisez des préfixes comme "1-urgent", "2-high" pour contrôler l'ordre de tri dans les vues Bases.`,label:`Label d'affichage : Le nom affiché dans l'interface (ex. "Priorité élevée")`,color:"Couleur : Couleur d'indicateur visuel pour les points et badges de priorité",icon:"Icône : Icône Lucide facultative à afficher sur les cartes de tâches à la place du point de priorité",weight:"Poids : Valeur numérique pour le tri (les poids plus élevés apparaissent en premier dans les listes)",weightNote:"Les tâches sont automatiquement triées par poids de priorité en ordre décroissant (le poids le plus élevé en premier). Les poids peuvent être n'importe quel nombre positif."},addNew:{name:"Ajouter une nouvelle priorité",description:"Créer un nouveau niveau de priorité pour vos tâches",buttonText:"Ajouter une priorité"},validationNote:"Note : Vous devez avoir au moins 1 priorité. Les priorités sont triées alphabétiquement par valeur dans les vues Bases.",emptyState:"Aucune priorité personnalisée configurée. Ajoutez une priorité pour commencer.",emptyStateButton:"Ajouter une priorité",fields:{value:"Valeur :",label:"Label :",color:"Couleur :",icon:"Icône :",weight:"Poids :"},placeholders:{value:"elevee",label:"Priorité élevée",icon:"alert-circle"},weightLabel:"Poids : {weight}",deleteConfirm:"Vous devez avoir au moins une priorité",deleteTooltip:"Supprimer la priorité"},fieldMapping:{header:"Mappage des champs",warning:"⚠️ Attention : TaskNotes lira ET écrira en utilisant ces noms de propriétés. Les changer après avoir créé des tâches peut causer des incohérences.",description:"Configurez quelles propriétés frontmatter TaskNotes doit utiliser pour chaque champ.",resetButton:{name:"Réinitialiser les mappages de champs",description:"Réinitialiser tous les mappages de champs aux valeurs par défaut",buttonText:"Réinitialiser aux défauts"},notices:{resetSuccess:"Mappages de champs réinitialisés aux défauts",resetFailure:"Échec de la réinitialisation des mappages de champs",updateFailure:"Échec de la mise à jour du mappage de champ pour {label}. Veuillez réessayer."},table:{fieldHeader:"Champ TaskNotes",propertyHeader:"Nom de votre propriété"},fields:{title:"Titre",status:"Statut",priority:"Priorité",due:"Date d'échéance",scheduled:"Date planifiée",contexts:"Contextes",projects:"Projets",timeEstimate:"Estimation de temps",recurrence:"Récurrence",dateCreated:"Date de création",completedDate:"Date d'achèvement",dateModified:"Date de modification",archiveTag:"Tag d'archive",timeEntries:"Entrées de temps",completeInstances:"Instances complètes",blockedBy:"Bloqué par",sortOrder:"Ordre manuel",pomodoros:"Sessions Pomodoro",icsEventId:"ID d'événement ICS",icsEventTag:"Tag d'événement ICS",reminders:"Rappels"}},customUserFields:{header:"Champs utilisateur personnalisés",description:"Définissez des propriétés frontmatter personnalisées pour qu'elles apparaissent comme options de filtrage conscientes du type dans toutes les vues. Chaque ligne : Nom d'affichage, Nom de propriété, Type.",addNew:{name:"Ajouter un nouveau champ utilisateur",description:"Créer un nouveau champ personnalisé qui apparaîtra dans les filtres et vues",buttonText:"Ajouter un champ utilisateur"},emptyState:"Aucun champ utilisateur personnalisé configuré. Ajoutez un champ pour créer des propriétés personnalisées pour vos tâches.",emptyStateButton:"Ajouter un champ utilisateur",fields:{displayName:"Nom d'affichage :",propertyKey:"Clé de propriété :",type:"Type :",defaultValue:"Valeur par défaut :"},placeholders:{displayName:"Nom d'affichage",propertyKey:"nom-propriete",defaultValue:"Valeur par défaut",defaultValueList:"Valeurs par défaut (séparées par des virgules)"},types:{text:"Texte",number:"Nombre",boolean:"Booléen",date:"Date (AAAA-MM-JJ)",list:"Liste"},defaultNames:{unnamedField:"Champ sans nom",noKey:"aucune-cle"},deleteTooltip:"Supprimer le champ",autosuggestFilters:{header:"Filtres d'auto-suggestion (Avancé)",description:"Filtrer quels fichiers apparaissent dans les suggestions d'auto-complétion pour ce champ"}}},appearance:{taskCards:{header:"Cartes de tâches",description:"Configurez l'affichage des cartes de tâches dans toutes les vues.",defaultVisibleProperties:{name:"Propriétés visibles par défaut",description:"Choisissez quelles propriétés apparaissent sur les cartes de tâches par défaut."},completionSubmenu:{name:"Regrouper les actions de fin et d'omission dans un sous-menu",description:"Place les actions permettant de terminer ou d'ignorer une tâche dans un sous-menu du menu contextuel. Désactivez cette option pour les afficher directement dans le menu."},propertyGroups:{coreProperties:"PROPRIÉTÉS PRINCIPALES",organization:"ORGANISATION",customProperties:"PROPRIÉTÉS PERSONNALISÉES"},properties:{status:"Point de statut",priority:"Point de priorité",due:"Date d'échéance",scheduled:"Date planifiée",timeEstimate:"Estimation de temps",totalTrackedTime:"Temps suivi total",checklistProgress:"Progression de la liste de contrôle",recurrence:"Récurrence",completedDate:"Date d'achèvement",createdDate:"Date de création",modifiedDate:"Date de modification",projects:"Projets",contexts:"Contextes",tags:"Étiquettes",blocked:"Bloqué",blocking:"Bloquant"}},taskFilenames:{header:"Noms de fichiers des tâches",description:"Configurez comment les fichiers de tâches sont nommés lors de leur création.",storeTitleInFilename:{name:"Stocker le titre dans le nom de fichier",description:"Utiliser le titre de la tâche comme nom de fichier. Le nom de fichier sera mis à jour quand le titre de la tâche changera (Recommandé)."},filenameFormat:{name:"Format du nom de fichier",description:"Comment les noms de fichiers de tâches doivent être générés",options:{title:"Titre de la tâche (Non-mis à jour)",zettel:"Format Zettelkasten (AAMMJJ + secondes base36 depuis minuit)",timestamp:"Horodatage complet (AAAA-MM-JJ-HHMMSS)",custom:"Modèle personnalisé",uuid:"UUID v4"}},customTemplate:{name:"Modèle de nom de fichier personnalisé",description:"Modèle pour les noms de fichiers personnalisés. Variables disponibles : {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"Note : {{dueDate}} et {{scheduledDate}} sont au format AAAA-MM-JJ et seront vides s'ils ne sont pas définis."}},displayFormatting:{header:"Formatage d'affichage",description:"Configurez comment les dates, heures et autres données sont affichées dans le plugin.",timeFormat:{name:"Format d'heure",description:"Afficher l'heure au format 12 heures ou 24 heures dans tout le plugin",options:{twelveHour:"12 heures (AM/PM)",twentyFourHour:"24 heures"}}},calendarView:{header:"Vue calendrier",description:"Personnalisez l'apparence et le comportement de la vue calendrier.",defaultView:{name:"Vue par défaut",description:"La vue calendrier affichée à l'ouverture de l'onglet calendrier",options:{monthGrid:"Grille mensuelle",weekTimeline:"Chronologie hebdomadaire",dayTimeline:"Chronologie quotidienne",yearView:"Vue annuelle",customMultiDay:"Multi-jours personnalisé"}},customDayCount:{name:"Nombre de jours de la vue personnalisée",description:"Nombre de jours à afficher dans la vue multi-jours personnalisée",placeholder:"3"},firstDayOfWeek:{name:"Premier jour de la semaine",description:"Quel jour doit être la première colonne dans les vues hebdomadaires"},showWeekends:{name:"Afficher les week-ends",description:"Afficher les week-ends dans les vues calendrier"},showWeekNumbers:{name:"Afficher les numéros de semaine",description:"Afficher les numéros de semaine dans les vues calendrier"},showTodayHighlight:{name:"Surligner aujourd'hui",description:"Surligner le jour actuel dans les vues calendrier"},showCurrentTimeIndicator:{name:"Afficher l'indicateur de l'heure actuelle",description:"Afficher une ligne montrant l'heure actuelle dans les vues chronologiques"},selectionMirror:{name:"Miroir de sélection",description:"Afficher un aperçu visuel lors du glissement pour sélectionner des plages horaires"},calendarLocale:{name:"Locale du calendrier",description:`Locale du calendrier pour le formatage des dates et le système calendaire (ex. "en", "fa" pour le Farsi/Persan, "de" pour l'Allemand). Laisser vide pour détecter automatiquement depuis le navigateur.`,placeholder:"Détection automatique",invalidLocale:"Locale invalide. Veuillez entrer un code de langue valide (ex. 'fr', 'en', 'de-DE')."}},defaultEventVisibility:{header:"Visibilité des événements par défaut",description:"Configurez quels types d'événements sont visibles par défaut à l'ouverture du Calendrier. Les utilisateurs peuvent toujours activer/désactiver ces options dans la vue calendrier.",showScheduledTasks:{name:"Afficher les tâches planifiées",description:"Afficher les tâches avec dates planifiées par défaut"},showDueDates:{name:"Afficher les dates d'échéance",description:"Afficher les dates d'échéance des tâches par défaut"},showDueWhenScheduled:{name:"Afficher les échéances quand planifiées",description:"Afficher les dates d'échéance même pour les tâches qui ont déjà des dates planifiées"},showTimeEntries:{name:"Afficher les entrées de temps",description:"Afficher les entrées de suivi du temps terminées par défaut"},showRecurringTasks:{name:"Afficher les tâches récurrentes",description:"Afficher les instances de tâches récurrentes par défaut"},showICSEvents:{name:"Afficher les événements ICS",description:"Afficher les événements des abonnements ICS par défaut"}},timeSettings:{header:"Paramètres de temps",description:"Configurez les paramètres d'affichage liés au temps pour les vues chronologiques.",timeSlotDuration:{name:"Durée des créneaux horaires",description:"Durée de chaque créneau horaire dans les vues chronologiques",options:{fifteenMinutes:"15 minutes",thirtyMinutes:"30 minutes",sixtyMinutes:"60 minutes"}},startTime:{name:"Heure de début",description:"Heure la plus tôt affichée dans les vues chronologiques (format HH:MM)",placeholder:"06:00"},endTime:{name:"Heure de fin",description:"Heure la plus tardive affichée dans les vues chronologiques (format HH:MM). Utilisez des valeurs supérieures à 24:00 pour afficher les premières heures du jour suivant, par exemple 26:00 pour 2 h.",placeholder:"26:00"},initialScrollTime:{name:"Heure de défilement initial",description:"Heure vers laquelle défiler à l'ouverture des vues chronologiques (format HH:MM)",placeholder:"09:00"},eventMinHeight:{name:"Hauteur minimale d'événement",description:"Hauteur minimale pour les événements dans les vues chronologiques (pixels)",placeholder:"15"}},uiElements:{header:"Éléments d'interface",description:"Configurez l'affichage de divers éléments d'interface.",showTrackedTasksInStatusBar:{name:"Afficher les tâches suivies dans la barre de statut",description:"Afficher les tâches actuellement suivies dans la barre de statut d'Obsidian"},showProjectSubtasksWidget:{name:"Afficher le widget des sous-tâches de projet",description:"Afficher un widget montrant les sous-tâches pour la note de projet actuelle"},projectSubtasksPosition:{name:"Position des sous-tâches de projet",description:"Où positionner le widget des sous-tâches de projet",options:{top:"Haut de la note",bottom:"Bas de la note"}},showRelationshipsWidget:{name:"Afficher le widget de relations",description:"Afficher un widget montrant toutes les relations de la note actuelle (sous-tâches, projets, dépendances)"},relationshipsPosition:{name:"Position des relations",description:"Où positionner le widget de relations",options:{top:"Haut de la note",bottom:"Bas de la note"}},showTaskCardInNote:{name:"Afficher la carte de tâche dans la note",description:"Afficher un widget de carte de tâche en haut des notes de tâche montrant les détails et actions de la tâche"},showCompletedTaskStrikethrough:{name:"Barrer les titres des tâches terminées",description:"Trace une ligne sur les titres des cartes de tâches terminées. Désactivez cette option pour rendre les tâches terminées plus lisibles"},showExpandableSubtasks:{name:"Afficher les sous-tâches extensibles",description:"Permettre d'étendre/réduire les sections de sous-tâches dans les cartes de tâches"},expandSubtasksByDefault:{name:"Développer les sous-tâches par défaut",description:"Afficher les sous-tâches de projet développées lorsque les cartes de tâches sont rendues"},subtaskChevronPosition:{name:"Position du chevron des sous-tâches",description:"Position des chevrons d'extension/réduction dans les cartes de tâches",options:{left:"Côté gauche",right:"Côté droit"}},viewsButtonAlignment:{name:"Alignement du bouton des vues",description:"Alignement du bouton vues/filtres dans l'interface des tâches",options:{left:"Côté gauche",right:"Côté droit"}}},projectAutosuggest:{header:"Autosuggestion de projets",description:"Personnalisez l'affichage des suggestions de projets lors de la création de tâches.",requiredTags:{name:"Tags requis",description:"Afficher seulement les notes avec l'un de ces tags (séparés par des virgules). Laisser vide pour afficher toutes les notes.",placeholder:"projet, actif, important"},includeFolders:{name:"Inclure les dossiers",description:"Afficher seulement les notes dans ces dossiers (chemins séparés par des virgules). Laisser vide pour afficher tous les dossiers.",placeholder:"Projets/, Travail/Actif, Personnel"},requiredPropertyKey:{name:"Clé de propriété requise",description:"Afficher seulement les notes où cette propriété frontmatter correspond à la valeur ci-dessous. Laisser vide pour ignorer.",placeholder:"type-projet"},requiredPropertyValue:{name:"Valeur de propriété requise",description:"Seules les notes où la propriété égale cette valeur sont suggérées. Laisser vide pour exiger que la propriété existe.",placeholder:"projet"},customizeDisplay:{name:"Personnaliser l'affichage des suggestions",description:"Afficher les options avancées pour configurer comment les suggestions de projets apparaissent et quelles informations elles affichent."},enableFuzzyMatching:{name:"Activer la correspondance floue",description:"Permettre les fautes de frappe et correspondances partielles dans la recherche de projet. Peut être plus lent dans les gros coffres."},displayRowsHelp:"Configurez jusqu'à 3 lignes d'informations à afficher pour chaque suggestion de projet.",displayRows:{row1:{name:"Ligne 1",description:"Format : {propriété|drapeaux}. Propriétés : title, aliases, file.path, file.parent. Drapeaux : n(Label) affiche le label, s rend cherchable. Exemple : {title|n(Titre)|s}",placeholder:"{title|n(Titre)}"},row2:{name:"Ligne 2 (optionnel)",description:"Modèles courants : {aliases|n(Alias)}, {file.parent|n(Dossier)}, literal:Texte personnalisé",placeholder:"{aliases|n(Alias)}"},row3:{name:"Ligne 3 (optionnel)",description:"Infos supplémentaires comme {file.path|n(Chemin)} ou champs frontmatter personnalisés",placeholder:"{file.path|n(Chemin)}"}},quickReference:{header:"Référence rapide",properties:"Propriétés disponibles : title, aliases, file.path, file.parent, ou tout champ frontmatter",labels:'Ajouter des labels : {title|n(Titre)} → "Titre : Mon Projet"',searchable:"Rendre cherchable : {description|s} inclut la description dans la recherche +",staticText:"Texte statique : literal:Mon Label Personnalisé",alwaysSearchable:"Le nom de fichier, titre et alias sont toujours cherchables par défaut."}},dataStorage:{name:"Emplacement de stockage",description:"Où stocker l'historique des sessions Pomodoro",pluginData:"Données du plugin (recommandé)",dailyNotes:"Notes quotidiennes",notices:{locationChanged:"Emplacement de stockage Pomodoro changé vers {location}"}},notifications:{description:"Configurez les notifications de rappel de tâches et les alertes."},performance:{description:"Configurez les options de performance et de comportement du plugin."},timeTrackingSection:{description:"Configurez les comportements de suivi automatique du temps."},recurringSection:{description:"Configurez le comportement pour la gestion des tâches récurrentes."}},integrations:{mobileCalendar:{disable:{name:"Désactiver les intégrations de calendrier sur mobile",description:"Ne pas charger les calendriers Google, Microsoft et ICS dans Obsidian Mobile. Les intégrations de calendrier sur ordinateur restent inchangées."},status:{name:"Les intégrations de calendrier sont désactivées sur cet appareil mobile",description:"Désactivez ce réglage puis rechargez Obsidian Mobile pour reprendre le chargement des calendriers."}},basesIntegration:{header:"Intégration Bases",description:"Configurez l'intégration avec le plugin Obsidian Bases. Il s'agit d'une fonctionnalité expérimentale qui repose actuellement sur des API Obsidian non documentées. Le comportement peut changer ou se briser.",enable:{name:"Activer l'intégration Bases",description:"Permettre l'utilisation des vues TaskNotes dans le plugin Obsidian Bases. Le plugin Bases doit être activé pour que cela fonctionne."},viewCommands:{header:"Vues et fichiers base",description:"TaskNotes utilise les fichiers Obsidian Bases (.base) pour ses vues. Ces fichiers sont générés automatiquement au démarrage s'ils n'existent pas, configurés avec vos paramètres actuels (identification des tâches, correspondance des champs, statuts, etc.).",descriptionRegen:"Les fichiers Base ne sont pas mis à jour automatiquement lorsque vous modifiez les paramètres. Pour appliquer les nouveaux paramètres, utilisez « Mettre à jour les fichiers » ci-dessous, supprimez les fichiers .base existants et redémarrez Obsidian, ou modifiez-les manuellement.",docsLink:"Voir la documentation pour les formules disponibles et les options de personnalisation",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"Ouvrir la vue mini calendrier",kanban:"Ouvrir la vue kanban",tasks:"Ouvrir la vue tâches",advancedCalendar:"Ouvrir la vue calendrier avancé",agenda:"Ouvrir la vue agenda",relationships:"Widget de relations",pomodoroStats:"Base de statistiques Pomodoro"},fileLabel:"Fichier : {path}",resetButton:"Réinitialiser",resetTooltip:"Réinitialiser au chemin par défaut",pomodoroDailyNotesHint:"La Base de statistiques Pomodoro générée lit l’historique Pomodoro depuis les notes quotidiennes. Si votre historique est encore stocké dans les données du plugin, migrez-le dans les paramètres avant d’utiliser ce fichier Base."},autoCreateDefaultFiles:{name:"Créer automatiquement les fichiers par défaut",description:"Créer automatiquement les fichiers Base par défaut manquants au démarrage. Désactivez pour empêcher la recréation des fichiers d'exemple supprimés."},createDefaultFiles:{name:"Créer les fichiers par défaut",description:"Créez les fichiers .base par défaut dans le répertoire TaskNotes/Views/. Les fichiers existants ne seront pas écrasés.",buttonText:"Créer les fichiers"},exportV3Views:{name:"Exporter les vues enregistrées V3 vers Bases",description:"Convertissez toutes vos vues enregistrées de TaskNotes v3 en un seul fichier .base avec plusieurs vues. Cela aide à migrer vos configurations de filtres v3 vers le nouveau système Bases.",buttonText:"Exporter les vues V3",noViews:"Aucune vue enregistrée à exporter",fileExists:"Le fichier existe déjà",confirmOverwrite:`Un fichier nommé "{fileName}" existe déjà. L'écraser ?`,success:"{count} vues enregistrées exportées vers {filePath}",error:"Échec de l'exportation des vues : {message}"},notices:{enabled:"Intégration Bases activée. Veuillez redémarrer Obsidian pour terminer la configuration.",disabled:"Intégration Bases désactivée. Veuillez redémarrer Obsidian pour terminer la suppression."},updateDefaultFiles:{name:"Mettre à jour les fichiers par défaut",description:"Remplacer les fichiers .base par défaut configurés par des modèles générés à partir de vos paramètres TaskNotes actuels.",buttonText:"Mettre à jour les fichiers",confirmTitle:"Mettre à jour les fichiers Base par défaut",confirmMessage:"Cela remplacera les fichiers .base par défaut configurés par des modèles fraîchement générés. Toute modification manuelle de ces fichiers sera remplacée.",confirmText:"Mettre à jour les fichiers"}},calendarSubscriptions:{header:"Abonnements calendrier",description:"Abonnez-vous à des calendriers externes via des URL ICS/iCal pour voir les événements à côté de vos tâches.",defaultNoteTemplate:{name:"Modèle de note par défaut",description:"Chemin vers le fichier modèle pour les notes créées à partir d'événements ICS",placeholder:"Templates/Modèle Événement.md"},defaultNoteFolder:{name:"Dossier de note par défaut",description:"Dossier pour les notes créées à partir d'événements ICS",placeholder:"Calendrier/Événements"},filenameFormat:{name:"Format du nom de fichier des notes ICS",description:"Comment les noms de fichiers sont générés pour les notes créées à partir d'événements ICS",options:{title:"Titre de l'événement",zettel:"Format Zettelkasten",timestamp:"Horodatage",custom:"Modèle personnalisé"}},customTemplate:{name:"Modèle de nom de fichier ICS personnalisé",description:"Modèle pour les noms de fichiers d'événements ICS personnalisés",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"Utiliser l'heure de fin de l'événement ICS comme date d'échéance",description:"Lorsqu'activé, les tâches créées à partir d'événements de calendrier auront leur date d'échéance définie sur l'heure de fin de l'événement. Pour les événements sur toute la journée, la date d'échéance sera la date de l'événement. Pour les événements avec horaire, la date d'échéance inclura l'heure de fin."},recurringEventRelatedNotesMode:{name:"Notes liées aux événements récurrents",description:"Choisissez si les notes liées à une occurrence d'un événement de calendrier externe apparaissent sur toute la série chargée ou seulement sur l'instance sélectionnée.",options:{series:"Toute la série",instance:"Instance sélectionnée uniquement"}}},subscriptionsList:{header:"Liste des abonnements calendrier",addSubscription:{name:"Ajouter un abonnement calendrier",description:"Ajouter un nouvel abonnement calendrier depuis une URL ICS/iCal ou un fichier local",buttonText:"Ajouter un abonnement"},refreshAll:{name:"Actualiser tous les abonnements",description:"Actualiser manuellement tous les abonnements calendrier activés",buttonText:"Tout actualiser"},newCalendarName:"Nouveau calendrier",emptyState:"Aucun abonnement calendrier configuré. Ajoutez un abonnement pour synchroniser des calendriers externes.",notices:{addSuccess:"Nouvel abonnement calendrier ajouté - veuillez configurer les détails",addFailure:"Échec de l'ajout de l'abonnement",serviceUnavailable:"Service d'abonnement ICS non disponible",refreshSuccess:"Tous les abonnements calendrier actualisés avec succès",refreshFailure:"Échec de l'actualisation de certains abonnements calendrier",updateFailure:"Échec de la mise à jour de l'abonnement",deleteSuccess:'Abonnement "{name}" supprimé',deleteFailure:"Échec de la suppression de l'abonnement",enableFirst:"Activez d'abord l'abonnement",refreshSubscriptionSuccess:'"{name}" actualisé',refreshSubscriptionFailure:"Échec de l'actualisation de l'abonnement"},labels:{enabled:"Activé :",name:"Nom :",type:"Type :",url:"URL :",filePath:"Chemin du fichier :",color:"Couleur :",refreshMinutes:"Actualisation (min) :"},typeOptions:{remote:"URL distante",local:"Fichier local"},placeholders:{calendarName:"Nom du calendrier",url:"URL ICS/iCal",filePath:"Chemin du fichier local (ex. Calendrier.ics)",localFile:"Calendrier.ics"},statusLabels:{enabled:"Activé",disabled:"Désactivé",remote:"Distant",localFile:"Fichier local",remoteCalendar:"Calendrier distant",localFileCalendar:"Fichier local",synced:"Synchronisé {timeAgo}",error:"Erreur"},actions:{refreshNow:"Actualiser maintenant",deleteSubscription:"Supprimer l'abonnement"},refreshNow:"Actualiser maintenant",confirmDelete:{title:"Supprimer l'abonnement",message:`Voulez-vous vraiment supprimer l'abonnement "{name}" ? Cette action ne peut pas être annulée.`,confirmText:"Supprimer"}},autoExport:{header:"Export ICS automatique",description:"Exportez automatiquement toutes vos tâches vers un fichier ICS.",enable:{name:"Activer l'export automatique",description:"Maintenir automatiquement un fichier ICS à jour avec toutes vos tâches"},filePath:{name:"Chemin du fichier d'export",description:"Chemin où le fichier ICS sera sauvegardé (relatif à la racine du coffre)",placeholder:"tasknotes-calendrier.ics"},interval:{name:"Intervalle de mise à jour (entre 5 et 1440 minutes)",description:"Fréquence de mise à jour du fichier d'export",placeholder:"60"},useDuration:{name:"Utiliser la durée de la tâche pour la longueur de l'événement",description:"Lorsque activé, utilise l'estimation de temps (durée) de la tâche au lieu de la date d'échéance pour l'heure de fin de l'événement du calendrier. Ceci est utile pour les flux de travail GTD où planifié + durée représente la planification du travail, tandis que la date d'échéance représente les délais."},exportNow:{name:"Exporter maintenant",description:"Déclencher manuellement un export immédiat",buttonText:"Exporter maintenant"},status:{title:"Statut de l'export :",lastExport:"Dernier export : {time}",nextExport:"Prochain export : {time}",noExports:"Aucun export encore",notScheduled:"Non programmé",notInitialized:"Service d'export automatique non initialisé - veuillez redémarrer Obsidian",serviceNotInitialized:"Service non initialisé - veuillez redémarrer Obsidian"},notices:{reloadRequired:"Veuillez recharger Obsidian pour que les changements d'export automatique prennent effet.",exportSuccess:"Tâches exportées avec succès",exportFailure:"Échec de l'export - vérifiez la console pour les détails",serviceUnavailable:"Service d'export automatique non disponible"},excludeCompleted:{name:"Exclure les tâches terminées",description:"Lorsque cette option est activée, les tâches terminées sont omises des exports ICS. Les statuts terminés proviennent de vos paramètres de statut de tâche."},excludeArchived:{name:"Exclure les tâches archivées",description:"Lorsque cette option est activée, les tâches archivées sont omises des exports ICS."},requireDueDate:{name:"Exiger une date d’échéance",description:"Lorsque cette option est activée, seules les tâches avec une date d’échéance sont incluses dans les exports ICS."},requireScheduledDate:{name:"Exiger une date planifiée",description:"Lorsque cette option est activée, seules les tâches avec une date planifiée sont incluses dans les exports ICS."}},googleCalendarExport:{header:"Exporter les tâches vers Google Agenda",description:"Synchronisez automatiquement vos tâches vers Google Agenda en tant qu'événements. Nécessite que Google Agenda soit connecté ci-dessus.",enable:{name:"Activer l'export des tâches",description:"Lorsqu'activé, les tâches avec des dates seront automatiquement synchronisées vers Google Agenda en tant qu'événements."},targetCalendar:{name:"Calendrier cible",description:"Sélectionnez dans quel calendrier créer les événements de tâches.",placeholder:"Sélectionner un calendrier...",connectFirst:"Connectez d'abord Google Agenda",primarySuffix:" (Principal)"},syncTrigger:{name:"Déclencheur de synchronisation",description:"Quelle date de tâche doit déclencher la création d'événement.",options:{scheduled:"Date planifiée",due:"Date d'échéance",both:"Les deux (préférer planifiée)"}},allDayEvents:{name:"Créer en tant qu'événements journée entière",description:"Lorsqu'activé, les tâches sont créées en tant qu'événements journée entière. Lorsque désactivé, utilise l'estimation de temps pour la durée."},defaultDuration:{name:"Durée par défaut de l'événement",description:"Durée en minutes pour les événements horodatés (utilisée lorsque la tâche n'a pas d'estimation de temps)."},eventTitleTemplate:{name:"Modèle de titre d'événement",description:"Modèle pour les titres d'événements. Variables disponibles : {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"Inclure les détails de la tâche dans la description",description:"Ajouter les métadonnées de la tâche (priorité, statut, tags, etc.) à la description de l'événement."},includeObsidianLink:{name:"Inclure le lien Obsidian",description:"Ajouter un lien vers la tâche dans Obsidian dans la description de l'événement."},defaultReminder:{name:"Rappel par défaut",description:"Ajoutez des rappels contextuels aux événements Google Calendar minutés. Saisissez les minutes avant l’événement, séparées par des virgules. Laissez vide pour utiliser les valeurs par défaut du calendrier. Valeurs courantes : 15, 30, 60, 1440."},automaticSyncBehavior:{header:"Comportement de synchronisation automatique"},syncOnCreate:{name:"Synchroniser à la création de tâche",description:"Créer automatiquement un événement de calendrier lorsqu'une nouvelle tâche est créée."},syncOnUpdate:{name:"Synchroniser à la mise à jour de tâche",description:"Mettre à jour automatiquement l'événement de calendrier lorsqu'une tâche est modifiée."},syncOnComplete:{name:"Synchroniser à l'achèvement de tâche",description:"Mettre à jour l'événement de calendrier lorsqu'une tâche est complétée (ajoute une coche au titre)."},syncOnDelete:{name:"Supprimer l'événement à la suppression de tâche",description:"Supprimer l'événement de calendrier lorsque la tâche correspondante est supprimée."},manualSyncActions:{header:"Actions de synchronisation manuelle"},syncAllTasks:{name:"Synchroniser toutes les tâches",description:"Synchroniser toutes les tâches existantes vers Google Agenda. Cela créera des événements pour les tâches qui n'ont pas encore été synchronisées.",buttonText:"Tout synchroniser"},unlinkAllTasks:{name:"Dissocier toutes les tâches",description:"Supprimer tous les liens tâche-événement sans supprimer les événements du calendrier.",buttonText:"Tout dissocier",confirmTitle:"Dissocier toutes les tâches",confirmMessage:"Cela supprimera tous les liens entre les tâches et les événements de calendrier. Les événements du calendrier resteront mais ne seront plus mis à jour lorsque les tâches changent. Êtes-vous sûr ?",confirmButtonText:"Tout dissocier"},notices:{notEnabled:"L'export Google Agenda n'est pas activé. Configurez-le dans Paramètres > Intégrations.",notEnabledOrConfigured:"L'export Google Agenda n'est pas activé ou configuré",serviceNotAvailable:"Service de synchronisation calendrier non disponible",syncResults:"Synchronisés : {synced}, Échoués : {failed}, Ignorés : {skipped}",taskSynced:"Tâche synchronisée vers Google Agenda",noActiveFile:"Aucun fichier n'est actuellement actif",notATask:"Le fichier actuel n'est pas une tâche",noDateToSync:"La tâche n'a pas de date planifiée ou d'échéance à synchroniser",syncFailed:"Échec de la synchronisation de la tâche vers Google Agenda : {message}",connectionExpired:"La connexion à Google Agenda a expiré. Veuillez vous reconnecter dans Paramètres > Intégrations.",syncingTasks:"Synchronisation de {total} tâches vers Google Agenda...",syncComplete:"Synchronisation terminée : {synced} synchronisées, {failed} échouées, {skipped} ignorées",eventsDeletedAndUnlinked:"Tous les événements supprimés et dissociés",tasksUnlinked:"Tous les liens de tâches supprimés"},eventDescription:{untitledTask:"Tâche sans titre",priority:"Priorité : {value}",status:"Statut : {value}",due:"Échéance : {value}",scheduled:"Planifié : {value}",timeEstimate:"Estimation de temps : {value}",tags:"Tags : {value}",contexts:"Contextes : {value}",projects:"Projets : {value}",openInObsidian:"Ouvrir dans Obsidian"}},httpApi:{header:"API HTTP",description:"Activez l'API HTTP pour les intégrations externes et les automations.",enable:{name:"Activer l'API HTTP",description:"Démarrer le serveur HTTP local pour l'accès API"},port:{name:"Port API",description:"Numéro de port pour le serveur API HTTP",placeholder:"3000"},authToken:{name:"Jeton d'authentification API",description:"Jeton TaskNotes, et non la clé API de votre fournisseur d’IA. Pour en générer un, activez l’API HTTP, laissez ce champ vide et redémarrez Obsidian. Copiez ensuite le jeton généré dans les paramètres d’authentification Bearer du client. Mettez les clients à jour chaque fois que ce jeton change.",placeholder:"votre-jeton-secret"},mcp:{enable:{name:"Activer le serveur MCP",description:"Expose les outils TaskNotes via le Model Context Protocol sur le point de terminaison /mcp. Nécessite l'activation de l'API HTTP."}},endpoints:{header:"Points de terminaison API disponibles",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhooks",description:{overview:"Les webhooks envoient des notifications en temps réel aux services externes lorsque des événements TaskNotes se produisent.",usage:"Configurez des webhooks pour intégrer avec des outils d'automatisation, des services de synchronisation ou des applications personnalisées."},addWebhook:{name:"Ajouter un webhook",description:"Enregistrer un nouveau point de terminaison webhook",buttonText:"Ajouter un webhook"},emptyState:{message:"Aucun webhook configuré. Ajoutez un webhook pour recevoir des notifications en temps réel.",buttonText:"Ajouter un webhook"},labels:{active:"Actif :",url:"URL :",events:"Événements :",transform:"Transformation :"},placeholders:{url:"URL du webhook",noEventsSelected:"Aucun événement sélectionné",rawPayload:"Données brutes (aucune transformation)"},statusLabels:{active:"Actif",inactive:"Inactif",created:"Créé {timeAgo}"},actions:{editEvents:"Modifier les événements",delete:"Supprimer"},editEvents:"Modifier les événements",notices:{urlUpdated:"URL du webhook mise à jour",enabled:"Webhook activé",disabled:"Webhook désactivé",created:"Webhook créé avec succès",deleted:"Webhook supprimé",updated:"Webhook mis à jour"},confirmDelete:{title:"Supprimer le webhook",message:`Voulez-vous vraiment supprimer ce webhook ?
URL : {url}
Cette action ne peut pas être annulée.`,confirmText:"Supprimer"},cardHeader:"Webhook",cardFields:{active:"Actif :",url:"URL :",events:"Événements :",transform:"Transformation :"},eventsDisplay:{noEvents:"Aucun événement sélectionné"},transformDisplay:{noTransform:"Données brutes (aucune transformation)"},secretModal:{title:"Secret webhook généré",description:"Votre secret webhook a été généré. Sauvegardez ce secret car vous ne pourrez plus le voir :",usage:"Utilisez ce secret pour vérifier les données webhook dans votre application réceptrice.",gotIt:"Compris"},editModal:{title:"Modifier le webhook",eventsHeader:"Événements auxquels s'abonner"},events:{taskCreated:{label:"Tâche créée",description:"Quand de nouvelles tâches sont créées"},taskUpdated:{label:"Tâche modifiée",description:"Quand les tâches sont modifiées"},taskCompleted:{label:"Tâche terminée",description:"Quand les tâches sont marquées comme terminées"},taskDeleted:{label:"Tâche supprimée",description:"Quand les tâches sont supprimées"},taskArchived:{label:"Tâche archivée",description:"Quand les tâches sont archivées"},taskUnarchived:{label:"Tâche désarchivée",description:"Quand les tâches sont désarchivées"},timeStarted:{label:"Temps démarré",description:"Quand le suivi du temps démarre"},timeStopped:{label:"Temps arrêté",description:"Quand le suivi du temps s'arrête"},pomodoroStarted:{label:"Pomodoro démarré",description:"Quand les sessions pomodoro commencent"},pomodoroCompleted:{label:"Pomodoro terminé",description:"Quand les sessions pomodoro se terminent"},pomodoroInterrupted:{label:"Pomodoro interrompu",description:"Quand les sessions pomodoro sont arrêtées"},recurringCompleted:{label:"Instance récurrente terminée",description:"Quand les instances de tâches récurrentes se terminent"},reminderTriggered:{label:"Rappel déclenché",description:"Quand les rappels de tâches s'activent"}},modals:{secretGenerated:{title:"Secret du webhook généré",description:"Le secret de votre webhook a été généré. Sauvegardez ce secret car vous ne pourrez plus le voir :",usage:"Utilisez ce secret pour vérifier les données du webhook dans votre application réceptrice.",buttonText:"Compris"},edit:{title:"Modifier le webhook",eventsSection:"Événements auxquels s'abonner",transformSection:"Configuration de transformation (optionnel)",headersSection:"Configuration des en-têtes",transformFile:{name:"Fichier de transformation",description:"Chemin vers un fichier modèle .json dans votre coffre qui transforme les données du webhook",placeholder:"simple-template.json"},customHeaders:{name:"Inclure les en-têtes personnalisés",description:"Inclure les en-têtes TaskNotes (type d'événement, signature, ID de livraison). Désactivez pour Discord, Slack et autres services avec des politiques CORS strictes."},buttons:{cancel:"Annuler",save:"Sauvegarder les modifications"},notices:{selectAtLeastOneEvent:"Veuillez sélectionner au moins un événement"}},add:{title:"Ajouter un webhook",eventsSection:"Événements auxquels s'abonner",transformSection:"Configuration de transformation (optionnel)",headersSection:"Configuration des en-têtes",url:{name:"URL du webhook",description:"Le point de terminaison où les données du webhook seront envoyées",placeholder:"https://votre-service.com/webhook"},transformFile:{name:"Fichier de transformation",description:"Chemin vers un fichier modèle .json dans votre coffre qui transforme les données du webhook",placeholder:"simple-template.json"},customHeaders:{name:"Inclure les en-têtes personnalisés",description:"Inclure les en-têtes TaskNotes (type d'événement, signature, ID de livraison). Désactivez pour Discord, Slack et autres services avec des politiques CORS strictes."},transformHelp:{title:"Les modèles de transformation JSON permettent de personnaliser les données du webhook :",jsFiles:"",jsDescription:"",jsonFiles:"Fichiers .json :",jsonDescription:" Modèles avec ",jsonVariable:"${data.task.title}",leaveEmpty:"Laisser vide :",leaveEmptyDescription:" Envoyer les données brutes",example:"Exemple :",exampleFile:"simple-template.json"},buttons:{cancel:"Annuler",add:"Ajouter le webhook"},notices:{urlRequired:"L'URL du webhook est requise",selectAtLeastOneEvent:"Veuillez sélectionner au moins un événement"}}}},otherIntegrations:{header:"Autres intégrations de plugins",description:"Configurez les intégrations avec d'autres plugins Obsidian."},mdbaseSpec:{header:"Définitions de types mdbase",learnMore:"En savoir plus sur mdbase-spec",enable:{name:"Générer les définitions de types mdbase",description:"Génère et maintient les fichiers de types mdbase (mdbase.yaml et _types/task.md) à la racine du coffre lorsque vos paramètres changent."}},timeFormats:{justNow:"À l'instant",minutesAgo:"il y a {minutes} minute{plural}",hoursAgo:"il y a {hours} heure{plural}",daysAgo:"il y a {days} jour{plural}"}}},notices:{languageChanged:"Langue changée pour {language}.",releaseAvailable:{message:"TaskNotes {version} est disponible.",action:"Ouvrir dans les plugins communautaires"},exportTasksFailed:"Échec de l'export des tâches au format ICS",icsNoteCreatedSuccess:"Note créée avec succès",icsCreationModalOpenFailed:"Échec de l'ouverture de la modale de création",icsNoteLinkSuccess:`Note "{fileName}" liée à l'événement ICS`,icsTaskCreatedSuccess:"Tâche créée : {title}",icsRelatedItemsRefreshed:"Notes associées actualisées",icsFileNotFound:"Fichier introuvable ou invalide",icsFileOpenFailed:"Échec de l'ouverture du fichier",timeblockAttachmentExists:'"{fileName}" est déjà attaché',timeblockAttachmentAdded:'"{fileName}" ajouté comme pièce jointe',timeblockAttachmentRemoved:'"{fileName}" retiré des pièces jointes',timeblockFileTypeNotSupported:`Impossible d'ouvrir "{fileName}" - type de fichier non pris en charge`,timeblockTitleRequired:"Veuillez saisir un titre pour le bloc de temps",timeblockUpdatedSuccess:'Bloc de temps "{title}" mis à jour avec succès',timeblockUpdateFailed:"Échec de la mise à jour du bloc de temps. Consultez la console pour plus de détails.",timeblockDeletedSuccess:'Bloc de temps "{title}" supprimé avec succès',timeblockDeleteFailed:"Échec de la suppression du bloc de temps. Consultez la console pour plus de détails.",timeblockRequiredFieldsMissing:"Veuillez remplir tous les champs requis",agendaLoadingFailed:"Erreur lors du chargement de l'agenda. Veuillez essayer d'actualiser.",statsLoadingFailed:"Erreur lors du chargement des détails du projet."},commands:{openCalendarView:"Ouvrir la vue mini calendrier",openAdvancedCalendarView:"Ouvrir la vue calendrier",openTasksView:"Ouvrir la vue tâches",openNotesView:"Ouvrir la vue notes",openAgendaView:"Ouvrir la vue agenda",openPomodoroView:"Ouvrir le minuteur Pomodoro",openKanbanView:"Ouvrir le tableau Kanban",updateDefaultBaseFiles:"Mettre à jour les fichiers Base par défaut",openPomodoroStats:"Ouvrir les statistiques Pomodoro",openStatisticsView:"Ouvrir les statistiques tâches & projets",createNewTask:"Créer une nouvelle tâche",convertCurrentNoteToTask:{name:"Convertir la note actuelle en tâche",noActiveFile:"Aucun fichier actif à convertir",alreadyTask:"Cette note est déjà une tâche",success:"'{title}' converti en tâche"},convertToTaskNote:"Convertir la case à cocher en TaskNote",convertAllTasksInNote:"Convertir toutes les tâches de la note",insertTaskNoteLink:"Insérer un lien TaskNote",createInlineTask:"Créer une nouvelle tâche intégrée",quickActionsCurrentTask:"Actions rapides pour la tâche courante",goToTodayNote:"Aller à la note du jour",startPomodoro:"Démarrer le minuteur Pomodoro",stopPomodoro:"Arrêter le minuteur Pomodoro",pauseResumePomodoro:"Mettre en pause/reprendre le minuteur Pomodoro",refreshCache:"Actualiser le cache",exportAllTasksIcs:"Exporter toutes les tâches en fichier ICS",viewReleaseNotes:"Voir les notes de version",startTimeTrackingCurrentTask:"Démarrer le suivi du temps pour la tâche actuelle",stopTimeTrackingCurrentTask:"Arrêter le suivi du temps pour la tâche actuelle",startTimeTrackingWithSelector:"Démarrer le suivi du temps (sélectionner une tâche)",editTimeEntries:"Modifier les entrées de temps (sélectionner une tâche)",createOrOpenTask:"Créer ou ouvrir une tâche",createOrOpenTaskWithTracking:"Créer ou ouvrir une tâche et démarrer le suivi du temps",rolloverOverdueScheduledTasks:"Reporter à aujourd'hui les tâches planifiées en retard",syncAllTasksGoogleCalendar:"Synchroniser toutes les tâches vers Google Agenda",syncCurrentTaskGoogleCalendar:"Synchroniser la tâche actuelle vers Google Agenda",quickActionsTaskUnderCursor:"Actions rapides pour la tâche sous le curseur",editCurrentTask:"Modifier la tâche actuelle",cycleCurrentTaskStatus:"Faire défiler le statut de la tâche actuelle",cycleCurrentTaskPriority:"Faire défiler la priorité de la tâche actuelle",addProjectToCurrentTask:"Ajouter un projet à la tâche actuelle",addSubtaskToCurrentNote:"Ajouter une sous-tâche à la note actuelle"},modals:{deviceCode:{title:"Autorisation Google Agenda",instructions:{intro:"Pour connecter votre Google Agenda, veuillez suivre ces étapes :"},steps:{open:"Ouvrir",inBrowser:"dans votre navigateur",enterCode:"Entrez ce code lorsque demandé :",signIn:"Connectez-vous avec votre compte Google et accordez l'accès",returnToObsidian:"Retournez à Obsidian (cette fenêtre se fermera automatiquement)"},codeLabel:"Votre code :",copyCodeAriaLabel:"Copier le code",waitingForAuthorization:"En attente d'autorisation...",openBrowserButton:"Ouvrir le navigateur",cancelButton:"Annuler",expiresMinutesSeconds:"Le code expire dans {minutes}m {seconds}s",expiresSeconds:"Le code expire dans {seconds}s"},icsEventInfo:{calendarEventHeading:"Événement de calendrier",titleLabel:"Titre",calendarLabel:"Calendrier",dateTimeLabel:"Date et heure",locationLabel:"Lieu",descriptionLabel:"Description",urlLabel:"URL",relatedNotesHeading:"Notes et tâches associées",noRelatedItems:"Aucune note ou tâche associée trouvée pour cet événement.",typeTask:"Tâche",typeNote:"Note",actionsHeading:"Actions",createFromEventLabel:"Créer à partir de l'événement",createFromEventDesc:"Créer une nouvelle note ou tâche à partir de cet événement de calendrier",linkExistingLabel:"Lier existant",linkExistingDesc:"Lier une note existante à cet événement de calendrier"},timeblockInfo:{editHeading:"Modifier le bloc de temps",dateTimeLabel:"Date et heure : ",titleLabel:"Titre",titleDesc:"Titre de votre bloc de temps",titlePlaceholder:"ex., Session de travail approfondi",descriptionLabel:"Description",descriptionDesc:"Description optionnelle du bloc de temps",descriptionPlaceholder:"Concentrez-vous sur les nouvelles fonctionnalités, sans interruptions",colorLabel:"Couleur",colorDesc:"Couleur optionnelle pour le bloc de temps",colorPlaceholder:"#3b82f6",attachmentsLabel:"Pièces jointes",attachmentsDesc:"Fichiers ou notes liés à ce bloc de temps",addAttachmentButton:"Ajouter une pièce jointe",addAttachmentTooltip:"Sélectionnez un fichier ou une note en utilisant la recherche floue",deleteButton:"Supprimer le bloc de temps",saveButton:"Enregistrer les modifications",deleteConfirmationTitle:"Supprimer le bloc de temps"},timeblockCreation:{heading:"Créer un bloc de temps",dateLabel:"Date : ",titleLabel:"Titre",titleDesc:"Titre de votre bloc de temps",titlePlaceholder:"ex., Session de travail approfondi",startTimeLabel:"Heure de début",startTimeDesc:"Quand le bloc de temps commence",startTimePlaceholder:"09:00",endTimeLabel:"Heure de fin",endTimeDesc:"Quand le bloc de temps se termine",endTimePlaceholder:"11:00",descriptionLabel:"Description",descriptionDesc:"Description optionnelle du bloc de temps",descriptionPlaceholder:"Concentrez-vous sur les nouvelles fonctionnalités, sans interruptions",colorLabel:"Couleur",colorDesc:"Couleur optionnelle pour le bloc de temps",colorPlaceholder:"#3b82f6",attachmentsLabel:"Pièces jointes",attachmentsDesc:"Fichiers ou notes à lier à ce bloc de temps",addAttachmentButton:"Ajouter une pièce jointe",addAttachmentTooltip:"Sélectionnez un fichier ou une note en utilisant la recherche floue",createButton:"Créer un bloc de temps"},calendarEventCreation:{heading:"Créer un événement",dateTimeLabel:"Date et heure : ",titleLabel:"Titre",titleDesc:"Titre de l'événement",titlePlaceholder:"ex., Réunion d'équipe",calendarLabel:"Calendrier",calendarDesc:"Dans quel calendrier créer l'événement",descriptionLabel:"Description",descriptionDesc:"Description facultative de l'événement",descriptionPlaceholder:"Ajouter des détails sur cet événement...",locationLabel:"Lieu",locationDesc:"Lieu facultatif de l'événement",locationPlaceholder:"ex., Salle de réunion A",createButton:"Créer l'événement",titleRequired:"Le titre de l'événement est requis",noCalendarSelected:"Aucun calendrier sélectionné",success:'Événement "{title}" créé',error:"Impossible de créer l'événement : {message}"},icsNoteCreation:{heading:"Créer à partir d'un événement ICS",titleLabel:"Titre",titleDesc:"Titre du nouveau contenu",folderLabel:"Dossier",folderDesc:"Dossier de destination (laisser vide pour la racine du coffre)",folderPlaceholder:"dossier/sous-dossier",createButton:"Créer",startLabel:"Début : ",endLabel:"Fin : ",locationLabel:"Lieu : ",calendarLabel:"Calendrier : ",useTemplateLabel:"Utiliser un modèle",useTemplateDesc:"Appliquer un modèle lors de la création du contenu",templatePathLabel:"Chemin du modèle",templatePathDesc:"Chemin vers le fichier de modèle",templatePathPlaceholder:"modeles/modele-note-ics.md"},unscheduledTasksSelector:{title:"Tâches non planifiées",placeholder:"Tapez pour rechercher des tâches non planifiées...",instructions:{navigate:"pour naviguer",schedule:"pour planifier",dismiss:"pour ignorer"}},migration:{title:"Migrer vers le nouveau système de récurrence",description:"TaskNotes utilise maintenant les modèles RRULE standard pour la récurrence, permettant des planifications plus complexes et une meilleure compatibilité avec d'autres applications.",tasksFound:"{count} tâche(s) avec d'anciens modèles de récurrence détectée(s)",noMigrationNeeded:"Aucune tâche ne nécessite de migration",warnings:{title:"Avant de continuer :",backup:"Sauvegardez votre coffre avant la migration",conversion:"Les anciens modèles de récurrence seront convertis au nouveau format",normalUsage:"Vous pouvez continuer à utiliser TaskNotes normalement pendant la migration",permanent:"Ce changement est permanent et ne peut pas être annulé automatiquement"},benefits:{title:"Avantages du nouveau système :",powerfulPatterns:"Modèles de récurrence complexes (ex. 'tous les 2e mardi')",performance:"Meilleures performances avec les tâches récurrentes",compatibility:"Format de récurrence standard compatible avec d'autres applications",nlp:"Support amélioré du traitement du langage naturel"},progress:{title:"Progression de la migration",preparing:"Préparation de la migration...",completed:"Migration terminée avec succès",failed:"Échec de la migration"},buttons:{migrate:"Démarrer la migration",completed:"Fermer"},errors:{title:"Erreurs pendant la migration :"},notices:{completedWithErrors:"Migration terminée avec quelques erreurs. Consultez la liste des erreurs ci-dessus.",success:"Toutes les tâches ont été migrées avec succès !",failed:"Échec de la migration. Veuillez consulter la console pour plus de détails."},prompt:{message:"TaskNotes a détecté des tâches utilisant l'ancien format de récurrence. Souhaitez-vous les migrer vers le nouveau système maintenant ?",migrateNow:"Migrer maintenant",remindLater:"Me rappeler plus tard"}},task:{titlePlaceholder:"Quel est votre prochain objectif ?",titleLabel:"Titre",titleDetailedPlaceholder:"Titre de la tâche...",detailsLabel:"Détails",detailsPlaceholder:"Ajoutez davantage de détails...",projectsLabel:"Projets",projectsAdd:"Ajouter un projet",projectsTooltip:"Sélectionnez une note de projet via la recherche floue",projectsRemoveTooltip:"Retirer le projet",contextsLabel:"Contextes",contextsPlaceholder:"contexte1, contexte2",tagsLabel:"Étiquettes",tagsPlaceholder:"etiquette1, etiquette2",timeEstimateLabel:"Estimation (minutes)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"Modifications non enregistrées",message:"Vous avez des modifications non enregistrées. Voulez-vous les enregistrer ?",save:"Enregistrer les modifications",discard:"Ignorer les modifications",cancel:"Continuer l'édition"},dependencies:{blockedBy:"Bloqué par",blocking:"Bloquant",placeholder:"[[Note de tâche]]",addTaskButton:"Ajouter une tâche",selectTaskTooltip:"Sélectionnez une note de tâche via la recherche floue",removeTaskTooltip:"Retirer la tâche"},organization:{projects:"Projets",subtasks:"Sous-tâches",addToProject:"Ajouter au projet",addToProjectButton:"Ajouter au projet",addSubtasks:"Ajouter des sous-tâches",addSubtasksButton:"Ajouter une sous-tâche",addSubtasksTooltip:"Sélectionner des tâches pour en faire des sous-tâches de cette tâche",removeSubtaskTooltip:"Retirer la sous-tâche",notices:{noEligibleSubtasks:"Aucune tâche éligible disponible pour être assignée comme sous-tâche",subtaskSelectFailed:"Échec de l'ouverture du sélecteur de sous-tâches"}},customFieldsLabel:"Champs personnalisés",actions:{due:"Définir l'échéance",scheduled:"Définir la date planifiée",status:"Définir le statut",priority:"Définir la priorité",recurrence:"Définir la récurrence",reminders:"Définir les rappels"},buttons:{openNote:"Ouvrir la note",save:"Enregistrer"},tooltips:{dueValue:"Échéance : {value}",scheduledValue:"Planifiée : {value}",statusValue:"Statut : {value}",priorityValue:"Priorité : {value}",recurrenceValue:"Récurrence : {value}",remindersSingle:"1 rappel défini",remindersPlural:"{count} rappels définis"},dateMenu:{dueTitle:"Définir l'échéance",scheduledTitle:"Définir la date planifiée"},userFields:{textPlaceholder:"Saisir {field}...",numberPlaceholder:"0",datePlaceholder:"AAAA-MM-JJ",listPlaceholder:"élément1, élément2, élément3",pickDate:"Choisir la date {field}"},recurrence:{daily:"Quotidien",weekly:"Hebdomadaire",everyTwoWeeks:"Toutes les 2 semaines",weekdays:"Jours ouvrés",weeklyOn:"Chaque semaine le {days}",monthly:"Mensuel",everyThreeMonths:"Tous les 3 mois",monthlyOnOrdinal:"Chaque mois le {ordinal}",monthlyByWeekday:"Mensuel (par jour de semaine)",yearly:"Annuel",yearlyOn:"Chaque année le {month} {day}",custom:"Personnalisé",countSuffix:"{count} occurrences",untilSuffix:"jusqu'au {date}",ordinal:"{number}e"}},taskSelector:{title:"Sélectionner une tâche",placeholder:"Tapez pour rechercher des tâches...",instructions:{navigate:"pour naviguer",select:"pour sélectionner",dismiss:"pour annuler"},notices:{noteNotFound:'Impossible de trouver la note "{name}"'},dueDate:{overdue:"Échéance : {date} (en retard)",today:"Échéance : Aujourd'hui"}},taskSelectorWithCreate:{title:"Créer ou ouvrir une tâche",placeholder:"Rechercher des tâches ou taper pour créer...",instructions:{create:"pour créer une nouvelle tâche"},footer:{createLabel:" pour créer : "},notices:{emptyQuery:"Veuillez entrer une description de tâche",invalidTitle:"Impossible de reconnaître un titre de tâche valide"}},taskCreation:{title:"Créer une tâche",actions:{fillFromNaturalLanguage:"Remplir le formulaire avec le langage naturel",hideDetailedOptions:"Masquer les options détaillées",showDetailedOptions:"Afficher les options détaillées"},nlPlaceholder:"Acheter des courses demain à 15h @maison #courses",notices:{titleRequired:"Veuillez saisir un titre de tâche",success:'Tâche "{title}" créée avec succès',successShortened:'Tâche "{title}" créée avec succès (nom de fichier raccourci)',failure:"Échec de la création de la tâche : {message}",blockingUnresolved:"Impossible de résoudre : {entries}",openCreatedTaskFailure:"Tâche créée, mais la note de tâche n'a pas pu être ouverte."}},taskEdit:{title:"Modifier la tâche",sections:{completions:"Achèvements",taskInfo:"Informations sur la tâche"},metadata:{totalTrackedTime:"Temps suivi total :",due:"Échéance :",scheduled:"Planifiée :",created:"Créée :",modified:"Modifiée :",file:"Fichier :"},buttons:{archive:"Archiver",unarchive:"Désarchiver"},notices:{titleRequired:"Veuillez saisir un titre de tâche",noChanges:"Aucune modification à enregistrer",updateSuccess:'Tâche "{title}" mise à jour avec succès',updateFailure:"Échec de la mise à jour de la tâche : {message}",dependenciesUpdateSuccess:"Dépendances mises à jour",blockingUnresolved:"Impossible de résoudre : {entries}",fileMissing:"Impossible de trouver le fichier de la tâche : {path}",openNoteFailure:"Impossible d'ouvrir la note de la tâche",archiveSuccess:"Tâche {action} avec succès",archiveFailure:"Échec de l'archivage de la tâche",deleteSuccess:"Tâche « {title} » supprimée avec succès",deleteFailure:"Échec de la suppression de la tâche : {message}"},archiveAction:{archived:"archivée",unarchived:"désarchivée"},deleteConfirmation:{title:"Supprimer la tâche",message:"Voulez-vous vraiment supprimer « {title} » ? Cela déplace la note de tâche vers la corbeille d’Obsidian.",confirm:"Supprimer la tâche"}},storageLocation:{title:{migrate:"Migrer les données Pomodoro ?",switch:"Basculer vers le stockage dans les notes quotidiennes ?"},message:{migrate:"Cette action migre vos sessions Pomodoro existantes vers le frontmatter des notes quotidiennes. Les données seront regroupées par date et stockées dans chaque note.",switch:"Les sessions Pomodoro seront désormais enregistrées dans le frontmatter de vos notes quotidiennes au lieu du fichier de données du plugin."},whatThisMeans:"Ce que cela implique :",bullets:{dailyNotesRequired:"Les notes quotidiennes doivent être activées dans le plugin noyau des notes quotidiennes ou dans Periodic Notes",storedInNotes:"Les données seront stockées dans le frontmatter de vos notes quotidiennes",migrateData:"Les données du plugin seront migrées puis vidées",futureSessions:"Les futures sessions seront enregistrées dans les notes quotidiennes",dataLongevity:"Cela garantit une meilleure pérennité des données avec vos notes"},finalNote:{migrate:"⚠️ Assurez-vous d’avoir des sauvegardes si nécessaire. Ce changement ne peut pas être annulé automatiquement.",switch:"Vous pourrez revenir au stockage du plugin à tout moment par la suite."},buttons:{migrate:"Migrer les données",switch:"Changer de stockage"}},dueDate:{title:"Définir la date d'échéance",taskLabel:"Tâche : {title}",sections:{dateTime:"Date et heure d'échéance",quickOptions:"Options rapides"},descriptions:{dateTime:"Définir quand cette tâche doit être terminée"},inputs:{date:{ariaLabel:"Date d'échéance de la tâche",placeholder:"AAAA-MM-JJ"},time:{ariaLabel:"Heure d'échéance de la tâche (optionnel)",placeholder:"HH:MM"}},quickOptions:{today:"Aujourd'hui",todayAriaLabel:"Définir la date d'échéance à aujourd'hui",tomorrow:"Demain",tomorrowAriaLabel:"Définir la date d'échéance à demain",nextWeek:"La semaine prochaine",nextWeekAriaLabel:"Définir la date d'échéance à la semaine prochaine",now:"Maintenant",nowAriaLabel:"Définir la date et l'heure d'échéance à maintenant",clear:"Effacer",clearAriaLabel:"Effacer la date d'échéance"},errors:{invalidDateTime:"Veuillez saisir un format de date et d'heure valide",updateFailed:"Échec de la mise à jour de la date d'échéance. Veuillez réessayer."}},scheduledDate:{title:"Définir la date planifiée",taskLabel:"Tâche : {title}",sections:{dateTime:"Date et heure planifiées",quickOptions:"Options rapides"},descriptions:{dateTime:"Définir quand vous prévoyez de travailler sur cette tâche"},inputs:{date:{ariaLabel:"Date planifiée de la tâche",placeholder:"AAAA-MM-JJ"},time:{ariaLabel:"Heure planifiée de la tâche (optionnel)",placeholder:"HH:MM"}},quickOptions:{today:"Aujourd'hui",todayAriaLabel:"Définir la date planifiée à aujourd'hui",tomorrow:"Demain",tomorrowAriaLabel:"Définir la date planifiée à demain",nextWeek:"La semaine prochaine",nextWeekAriaLabel:"Définir la date planifiée à la semaine prochaine",now:"Maintenant",nowAriaLabel:"Définir la date et l'heure planifiées à maintenant",clear:"Effacer",clearAriaLabel:"Effacer la date planifiée"},errors:{invalidDateTime:"Veuillez saisir un format de date et d'heure valide",updateFailed:"Échec de la mise à jour de la date planifiée. Veuillez réessayer."}},timeEntryEditor:{title:"Entrées de temps - {taskTitle}",addEntry:"Ajouter une entrée de temps",noEntries:"Aucune entrée de temps pour le moment",deleteEntry:"Supprimer l'entrée",startTime:"Heure de début",endTime:"Heure de fin (laisser vide si toujours en cours)",duration:"Durée (minutes)",durationDesc:"Remplacer la durée calculée",durationPlaceholder:"Entrer la durée en minutes",description:"Description",descriptionPlaceholder:"Sur quoi avez-vous travaillé ?",calculatedDuration:"Calculé : {minutes} minutes",totalTime:"{hours}h {minutes}m au total",totalMinutes:"{minutes}m au total",saved:"Entrées de temps enregistrées",saveFailed:"Échec de l'enregistrement des entrées de temps",openFailed:"Échec de l'ouverture de l'éditeur d'entrées de temps",noTasksWithEntries:"Aucune tâche n'a d'entrées de temps à modifier",validation:{missingStartTime:"L'heure de début est requise",endBeforeStart:"L'heure de fin doit être après l'heure de début"}},timeTracking:{noTasksAvailable:"Aucune tâche disponible pour le suivi du temps",started:"Suivi du temps démarré pour : {taskTitle}",startFailed:"Échec du démarrage du suivi du temps"},timeEntry:{mustHaveSpecificTime:"Les entrées de temps doivent avoir des heures spécifiques. Veuillez sélectionner une plage horaire dans la vue semaine ou jour.",noTasksAvailable:"Aucune tâche disponible pour créer des entrées de temps",created:"Entrée de temps créée pour {taskTitle} ({duration} minutes)",createFailed:"Échec de la création de l'entrée de temps"}},contextMenus:{task:{status:"Statut",statusSelected:"Statut sélectionné : {label}",priority:"Priorité",prioritySelected:"Priorité sélectionnée : {label}",dueDate:"Échéance",scheduledDate:"Date planifiée",customDates:"Dates personnalisées",reminders:"Rappels",remindBeforeDue:"Rappeler avant l'échéance…",remindBeforeScheduled:"Rappeler avant la date planifiée…",manageReminders:"Gérer tous les rappels…",clearReminders:"Supprimer tous les rappels",startTimeTracking:"Commencer le suivi du temps",stopTimeTracking:"Arrêter le suivi du temps",editTimeEntries:"Modifier les entrées de temps",archive:"Archiver",unarchive:"Désarchiver",openNote:"Ouvrir la note",openNoteInNewTab:"Ouvrir la note dans un nouvel onglet",copyTitle:"Copier le titre de la tâche",quickActions:"Actions rapides",noteActions:"Actions sur la note",rename:"Renommer",renameTitle:"Renommer le fichier",renamePlaceholder:"Saisir un nouveau nom",delete:"Supprimer",deleteTitle:"Supprimer le fichier",deleteMessage:'Voulez-vous vraiment supprimer "{name}" ?',deleteConfirm:"Supprimer",copyPath:"Copier le chemin",copyUrl:"Copier l'URL Obsidian",showInExplorer:"Afficher dans l'explorateur de fichiers",addToCalendar:"Ajouter au calendrier",calendar:{google:"Google Agenda",outlook:"Calendrier Outlook",yahoo:"Calendrier Yahoo",downloadIcs:"Télécharger le fichier .ics",syncToGoogle:"Synchroniser avec Google Agenda",syncToGoogleNotConfigured:"Synchronisation Google Agenda non configurée",syncToGoogleSuccess:"Tâche synchronisée avec Google Agenda",syncToGoogleFailed:"Échec de la synchronisation avec Google Agenda"},recurrence:"Récurrence",clearRecurrence:"Effacer la récurrence",customRecurrence:"Récurrence personnalisée...",createSubtask:"Créer une sous-tâche",dependencies:{title:"Dépendances",addBlockedBy:"Ajouter « bloqué par »…",addBlockedByTitle:"Ajouter des tâches dont dépend celle-ci",addBlocking:"Ajouter « bloquant »…",addBlockingTitle:"Ajouter des tâches bloquées par celle-ci",removeBlockedBy:"Retirer « bloqué par »…",removeBlocking:"Retirer « bloquant »…",unknownDependency:"Inconnu",inputPlaceholder:"[[Note de tâche]]",notices:{noEntries:"Veuillez saisir au moins une tâche",blockedByAdded:"{count} dépendance ajoutée",blockedByRemoved:"Dépendance retirée",blockingAdded:"{count} tâche dépendante ajoutée",blockingRemoved:"Tâche dépendante retirée",unresolved:"Impossible de résoudre : {entries}",noEligibleTasks:"Aucune tâche correspondante disponible",updateFailed:"Impossible de mettre à jour les dépendances"}},organization:{title:"Organisation",projects:"Projets",addToProject:"Ajouter au projet…",subtasks:"Sous-tâches",addSubtasks:"Ajouter des sous-tâches…",notices:{alreadyInProject:"La tâche est déjà dans ce projet",alreadySubtask:"La tâche est déjà une sous-tâche de cette tâche",addedToProject:"Ajoutée au projet : {project}",addedAsSubtask:"{subtask} ajoutée comme sous-tâche de {parent}",addToProjectFailed:"Échec de l'ajout de la tâche au projet",addAsSubtaskFailed:"Échec de l'ajout de la tâche comme sous-tâche",projectSelectFailed:"Échec de l'ouverture du sélecteur de projet",subtaskSelectFailed:"Échec de l'ouverture du sélecteur de sous-tâches",noEligibleSubtasks:"Aucune tâche éligible disponible pour être assignée comme sous-tâche",currentTaskNotFound:"Fichier de tâche actuel introuvable",updateContextsFailed:"Échec de la mise à jour des contextes"},contexts:"Contextes",addContext:"Ajouter un contexte…",contextPlaceholder:"contexte",contextSelected:"✓ {context}",clearContexts:"Effacer les contextes"},subtasks:{loading:"Chargement des sous-tâches...",noSubtasks:"Aucune sous-tâche trouvée",loadFailed:"Échec du chargement des sous-tâches"},markComplete:"Marquer comme terminée pour cette date",markIncomplete:"Marquer comme incomplète pour cette date",skipInstance:"Ignorer l'instance",unskipInstance:"Ne plus ignorer l'instance",completion:{submenu:"Marquer comme terminée ou ignorer",submenuCompleteOnly:"Marquer comme terminée",completeToday:"Terminée aujourd'hui",completeAsScheduled:"Terminée à la date planifiée",completeOnDue:"Terminée à la date d'échéance",completeOnPicked:"Terminée le (choisir une date)",markIncomplete:"Marquer comme incomplète",noScheduledDate:"Cette tâche n'a pas de date planifiée",noDueDate:"Cette tâche n'a pas de date d'échéance",noPickedDate:"Aucune date sélectionnée",noCompletedStatus:"Aucun statut de tâche terminée n'est configuré",pickDateTitle:"Choisir la date de fin",completeFailure:"Impossible de mettre à jour la fin de la tâche : {message}",clearInstancesConfirmTitle:"Effacer les instances enregistrées ?",clearInstancesConfirmMessage:"La replanification effacera ces instances enregistrées comme terminées ou ignorées à la nouvelle date ou après celle-ci : {dates}. Elles ne seront plus marquées comme terminées ou ignorées. Continuer ?",clearInstancesConfirmButton:"Replanifier et effacer"},quickReminders:{atTime:"À l'heure de l'événement",fiveMinutes:"5 minutes avant",fifteenMinutes:"15 minutes avant",oneHour:"1 heure avant",oneDay:"1 jour avant"},notices:{toggleCompletionFailure:"Impossible de modifier l'achèvement récurrent : {message}",toggleSkipFailure:"Impossible de modifier l'omission de tâche récurrente : {message}",updateDueDateFailure:"Impossible de mettre à jour l'échéance : {message}",updateScheduledFailure:"Impossible de mettre à jour la date planifiée : {message}",updateCustomDateFailure:"Échec de la mise à jour de {field} : {message}",updateRemindersFailure:"Impossible de mettre à jour les rappels",clearRemindersFailure:"Impossible de supprimer les rappels",addReminderFailure:"Impossible d'ajouter un rappel",archiveFailure:"Impossible de modifier l'archivage de la tâche : {message}",copyTitleSuccess:"Titre de la tâche copié dans le presse-papiers",copyFailure:"Impossible de copier dans le presse-papiers",renameSuccess:'Renommé en "{name}"',renameFailure:"Impossible de renommer le fichier",copyPathSuccess:"Chemin du fichier copié dans le presse-papiers",copyUrlSuccess:"URL Obsidian copiée dans le presse-papiers",updateRecurrenceFailure:"Impossible de mettre à jour la récurrence : {message}",updateTagsFailed:"Échec de la mise à jour des étiquettes"},tags:"Étiquettes",addTag:"Ajouter une étiquette…",removeTag:"Supprimer {tag}",removeTagInput:"Supprimer une étiquette…",tagPlaceholder:"Étiquette ou #étiquette",clearTags:"Effacer les étiquettes"},priority:{clearPriority:"Supprimer la priorité"},ics:{showDetails:"Afficher les détails",createTask:"Créer une tâche depuis l'événement",createNote:"Créer une note depuis l'événement",linkNote:"Lier une note existante",copyTitle:"Copier le titre",copyLocation:"Copier le lieu",copyUrl:"Copier l'URL",copyMarkdown:"Copier en markdown",subscriptionUnknown:"Calendrier inconnu",notices:{copyTitleSuccess:"Titre de l'événement copié dans le presse-papiers",copyLocationSuccess:"Lieu copié dans le presse-papiers",copyUrlSuccess:"URL de l'événement copiée dans le presse-papiers",copyMarkdownSuccess:"Détails de l'événement copiés en markdown",copyFailure:"Impossible de copier dans le presse-papiers",taskCreated:"Tâche créée : {title}",taskCreateFailure:"Impossible de créer une tâche depuis l'événement",noteCreated:"Note créée avec succès",creationFailure:"Impossible d'ouvrir la fenêtre de création",linkSuccess:`Note "{name}" liée à l'événement`,linkFailure:"Impossible de lier la note",linkSelectionFailure:"Impossible d'ouvrir la sélection de note"},markdown:{titleFallback:"Événement sans titre",calendar:"**Calendrier :** {value}",date:"**Date et heure :** {value}",location:"**Lieu :** {value}",descriptionHeading:"### Détails",url:"**URL :** {value}",at:" à {time}"}},date:{increment:{plusOneDay:"+1 jour",minusOneDay:"-1 jour",plusOneWeek:"+1 semaine",minusOneWeek:"-1 semaine"},basic:{today:"Aujourd'hui",tomorrow:"Demain",thisWeekend:"Ce week-end",nextWeek:"La semaine prochaine",nextMonth:"Le mois prochain"},weekdaysLabel:"Jours de la semaine",selected:"Date sélectionnée : {label}",pickDateTime:"Choisir date et heure…",clearDate:"Effacer la date",modal:{title:"Définir date et heure",dateLabel:"Date (AAAA-MM-JJ)",timeLabel:"Heure (optionnel)",select:"Sélectionner"}}},services:{pomodoro:{notices:{alreadyRunning:"Un pomodoro est déjà en cours",resumeCurrentSession:"Reprendre la session actuelle au lieu d'en démarrer une nouvelle",timerAlreadyRunning:"Un minuteur est déjà en cours",resumeSessionInstead:"Reprendre la session actuelle au lieu d'en démarrer une nouvelle",shortBreakStarted:"Pause courte démarrée",longBreakStarted:"Pause longue démarrée",paused:"Pomodoro mis en pause",resumed:"Pomodoro repris",stoppedAndReset:"Pomodoro arrêté et remis à zéro",migrationSuccess:"{count} sessions pomodoro migrées avec succès vers les notes quotidiennes.",migrationFailure:"Échec de la migration des données pomodoro. Veuillez réessayer ou vérifier la console pour plus de détails."}},icsSubscription:{notices:{calendarNotFound:`Calendrier "{name}" introuvable (404). Veuillez vérifier que l'URL ICS est correcte et que le calendrier est accessible publiquement.`,calendarAccessDenied:`Accès refusé au calendrier "{name}" (500). Cela peut être dû aux restrictions du serveur Microsoft Outlook. Essayez de régénérer l'URL ICS depuis les paramètres de votre calendrier.`,fetchRemoteFailed:'Échec de la récupération du calendrier distant "{name}" : {error}',readLocalFailed:'Échec de la lecture du calendrier local "{name}" : {error}'}},calendarExport:{notices:{generateLinkFailed:"Échec de la génération du lien calendrier",noTasksToExport:"Aucune tâche trouvée à exporter",downloadSuccess:"Téléchargé {filename} avec {count} tâche{plural}",downloadFailed:"Échec du téléchargement du fichier calendrier",singleDownloadSuccess:"Téléchargé {filename}"}},filter:{groupLabels:{noProject:"Aucun projet",noTags:"Aucune étiquette",invalidDate:"Date invalide",due:{overdue:"En retard",today:"Aujourd'hui",tomorrow:"Demain",nextSevenDays:"Prochains sept jours",later:"Plus tard",none:"Aucune date d'échéance"},scheduled:{past:"Planification passée",today:"Aujourd'hui",tomorrow:"Demain",nextSevenDays:"Prochains sept jours",later:"Plus tard",none:"Aucune date planifiée"}},errors:{noDatesProvided:"Aucune date fournie"},folders:{root:"(Racine)"}},instantTaskConvert:{notices:{noCheckboxTasks:"Aucune tâche à cocher trouvée dans la note actuelle.",convertingTasks:"Conversion de {count} tâche{plural}...",conversionSuccess:"✅ {count} tâche{plural} converties avec succès en TaskNotes !",partialConversion:"{successCount} tâche{successPlural} convertie{successPlural}. {failureCount} ont échoué.",batchConversionFailed:"Échec de la conversion par lot. Veuillez réessayer.",invalidParameters:"Paramètres d'entrée invalides.",emptyLine:"La ligne actuelle est vide ou ne contient aucun contenu valide.",parseError:"Erreur d'analyse de la tâche : {error}",invalidTaskData:"Données de tâche invalides.",replaceLineFailed:"Échec du remplacement de la ligne de tâche.",conversionComplete:"Tâche convertie : {title}",conversionCompleteShortened:'Tâche convertie : "{title}" (nom de fichier raccourci en raison de la longueur)',fileExists:"Un fichier avec ce nom existe déjà. Veuillez réessayer ou renommer la tâche.",conversionFailed:"Échec de la conversion de la tâche. Veuillez réessayer."}},icsNote:{notices:{templateNotFound:"Modèle introuvable : {path}",templateProcessError:"Erreur de traitement du modèle : {template}",linkedToEvent:"Note liée à l'événement ICS : {title}"}},task:{notices:{templateNotFound:"Modèle de corps de tâche introuvable : {path}",templateReadError:"Erreur de lecture du modèle de corps de tâche : {template}",occurrenceTemplateNotFound:"Modèle de note d'occurrence introuvable : {path}",occurrenceTemplateReadError:"Erreur de lecture du modèle de note d'occurrence : {template}",moveTaskFailed:"Échec du déplacement de la tâche {operation} : {error}"}},autoExport:{notices:{exportFailed:"Échec de l'export automatique TaskNotes : {error}"}}},ui:{icsCard:{untitledEvent:"Événement sans titre",allDay:"Toute la journée",calendarEvent:"Événement de calendrier",calendarFallback:"Calendrier"},noteCard:{createdLabel:"Créée :",dailyBadge:"Quotidien",dailyTooltip:"Note quotidienne"},taskCard:{labels:{due:"Échéance",scheduled:"Planifié",recurrence:"Récurrent",completed:"Terminé",created:"Créé",modified:"Modifié",blocked:"Bloqué",blocking:"Bloquant"},blockedBadge:"Bloqué",blockedBadgeTooltip:"Cette tâche attend une autre tâche",blockingBadge:"Bloquant",blockingBadgeTooltip:"Cette tâche bloque une autre tâche",blockingToggle:"Bloque {count} tâches",priorityAriaLabel:"Priorité : {label}",taskOptions:"Options de tâche",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"1 rappel défini (cliquer pour gérer)",reminderTooltipMany:"{count} rappels définis (cliquer pour gérer)",projectTooltip:"Cette tâche est utilisée comme projet (cliquer pour afficher/masquer les sous-tâches)",projectIndicatorTooltip:"Cette tâche est utilisée comme projet",expandSubtasks:"Déplier les sous-tâches",collapseSubtasks:"Replier les sous-tâches",dueToday:"{label}: Aujourd'hui",dueTodayAt:"{label}: Aujourd'hui à {time}",dueOverdue:"{label}: {display} (en retard)",dueLabel:"{label}: {display}",scheduledToday:"{label}: Aujourd'hui",scheduledTodayAt:"{label}: Aujourd'hui à {time}",scheduledPast:"{label}: {display} (passé)",scheduledLabel:"{label}: {display}",loadingDependencies:"Chargement des dépendances…",blockingEmpty:"Aucune tâche dépendante",blockingLoadError:"Échec du chargement des dépendances",googleCalendarSyncTooltip:"Synchronisé avec Google Agenda",detailsTooltip:"La tâche a des détails"},propertyEventCard:{unknownFile:"Fichier inconnu"},filterHeading:{allViewName:"Toutes"},filterBar:{saveView:"Enregistrer la vue",saveViewNamePlaceholder:"Entrez le nom de la vue...",saveButton:"Enregistrer",views:"Vues",savedFilterViews:"Vues de filtre enregistrées",filters:"Filtres",properties:"Propriétés",sort:"Trier",newTask:"Nouveau",expandAllGroups:"Déplier tous les groupes",collapseAllGroups:"Replier tous les groupes",searchTasksPlaceholder:"Rechercher des tâches...",searchTasksTooltip:"Rechercher dans les titres de tâches",filterUnavailable:"Barre de filtrage temporairement indisponible",toggleFilter:"Activer/désactiver le filtre",activeFiltersTooltip:"Filtres actifs – Cliquez pour modifier, clic droit pour effacer",configureVisibleProperties:"Configurer les propriétés visibles",sortAndGroupOptions:"Options de tri et de regroupement",sortMenuHeader:"Trier",orderMenuHeader:"Ordre",groupMenuHeader:"Grouper",createNewTask:"Créer une nouvelle tâche",filter:"Filtrer",displayOrganization:"Affichage et organisation",viewOptions:"Options de vue",addFilter:"Ajouter un filtre",addFilterGroup:"Ajouter un groupe de filtres",addFilterTooltip:"Ajouter une nouvelle condition de filtre",addFilterGroupTooltip:"Ajouter un groupe de filtres imbriqué",clearAllFilters:"Effacer tous les filtres et groupes",saveCurrentFilter:"Enregistrer le filtre actuel comme vue",closeFilterModal:"Fermer la fenêtre de filtre",deleteFilterGroup:"Supprimer le groupe de filtres",deleteCondition:"Supprimer la condition",all:"Tous",any:"N'importe lequel",followingAreTrue:"des suivants sont vrais :",where:"où",selectProperty:"Sélectionner...",chooseProperty:"Choisissez quelle propriété de tâche filtrer",chooseOperator:"Choisissez comment comparer la valeur de propriété",enterValue:"Entrez la valeur à filtrer",selectValue:"Sélectionnez un {property} à filtrer",sortBy:"Trier par :",toggleSortDirection:"Inverser le sens de tri",chooseSortMethod:"Choisissez comment trier les tâches",groupBy:"Grouper par :",chooseGroupMethod:"Grouper les tâches par une propriété commune",toggleViewOption:"Activer/désactiver {option}",expandCollapseFilters:"Cliquez pour déplier/replier les conditions de filtre",expandCollapseSort:"Cliquez pour déplier/replier les options de tri et de regroupement",expandCollapseViewOptions:"Cliquez pour déplier/replier les options spécifiques à la vue",naturalLanguageDates:"Dates en langage naturel",naturalLanguageExamples:"Afficher des exemples de dates en langage naturel",enterNumericValue:"Entrez une valeur numérique à filtrer",enterDateValue:"Entrez une date en langage naturel ou au format ISO",pickDateTime:"Choisir date et heure",noSavedViews:"Aucune vue enregistrée",savedViews:"Vues enregistrées",yourSavedFilters:"Vos configurations de filtre enregistrées",dragToReorder:"Glissez pour réorganiser les vues",loadSavedView:"Charger la vue enregistrée : {name}",deleteView:"Supprimer la vue",deleteViewTitle:"Supprimer la vue",deleteViewMessage:'Êtes-vous sûr de vouloir supprimer la vue "{name}" ?',manageAllReminders:"Gérer tous les rappels...",clearAllReminders:"Effacer tous les rappels",customRecurrence:"Récurrence personnalisée...",clearRecurrence:"Effacer la récurrence",sortOptions:{dueDate:"Date d'échéance",scheduledDate:"Date planifiée",priority:"Priorité",status:"Statut",title:"Titre",createdDate:"Date de création",tags:"Étiquettes",ascending:"Croissant",descending:"Décroissant"},group:{none:"Aucun",status:"Statut",priority:"Priorité",context:"Contexte",project:"Projet",dueDate:"Date d'échéance",scheduledDate:"Date planifiée",tags:"Étiquettes",completedDate:"Date d'achèvement"},subgroupLabel:"SOUS-GROUPE",notices:{propertiesMenuFailed:"Échec de l'affichage du menu des propriétés"}}},components:{dateContextMenu:{weekdays:"Jours de semaine",clearDate:"Effacer la date",today:"Aujourd'hui",tomorrow:"Demain",thisWeekend:"Ce week-end",nextWeek:"La semaine prochaine",nextMonth:"Le mois prochain",setDateTime:"Définir la date et l'heure",dateLabel:"Date",timeLabel:"Heure (optionnelle)"},subgroupMenuBuilder:{none:"Aucun",status:"Statut",priority:"Priorité",context:"Contexte",project:"Projet",dueDate:"Date d'échéance",scheduledDate:"Date programmée",tags:"Étiquettes",completedDate:"Date de finalisation",subgroup:"SOUS-GROUPE"},propertyVisibilityDropdown:{coreProperties:"PROPRIÉTÉS PRINCIPALES",organization:"ORGANISATION",customProperties:"PROPRIÉTÉS PERSONNALISÉES",failed:"Impossible d'afficher le menu des propriétés",properties:{statusDot:"Point de statut",priorityDot:"Point de priorité",dueDate:"Date d'échéance",scheduledDate:"Date planifiée",timeEstimate:"Estimation de temps",totalTrackedTime:"Temps suivi total",checklistProgress:"Progression de la liste de contrôle",recurrence:"Récurrence",completedDate:"Date d'achèvement",createdDate:"Date de création",modifiedDate:"Date de modification",projects:"Projets",contexts:"Contextes",tags:"Étiquettes",blocked:"Bloqué",blocking:"Bloquant"}},reminderContextMenu:{remindBeforeDue:"Rappeler avant l'échéance...",remindBeforeScheduled:"Rappeler avant la date planifiée...",manageAllReminders:"Gérer tous les rappels...",clearAllReminders:"Effacer tous les rappels",quickReminders:{atTime:"À l'heure de l'événement",fiveMinutesBefore:"5 minutes avant",fifteenMinutesBefore:"15 minutes avant",oneHourBefore:"1 heure avant",oneDayBefore:"1 jour avant"}},recurrenceContextMenu:{daily:"Quotidien",weeklyOn:"Hebdomadaire le {day}",everyTwoWeeksOn:"Toutes les 2 semaines le {day}",monthlyOnThe:"Mensuel le {ordinal}",everyThreeMonthsOnThe:"Tous les 3 mois le {ordinal}",yearlyOn:"Annuel le {month} {ordinal}",weekdaysOnly:"Jours ouvrés seulement",dailyAfterCompletion:"Quotidien (après achèvement)",every3DaysAfterCompletion:"Tous les 3 jours (après achèvement)",weeklyAfterCompletion:"Hebdomadaire (après achèvement)",monthlyAfterCompletion:"Mensuel (après achèvement)",customRecurrence:"Récurrence personnalisée...",clearRecurrence:"Effacer la récurrence",customRecurrenceModal:{title:"Récurrence personnalisée",startDate:"Date de début",startDateDesc:"La date à laquelle le modèle de récurrence commence",startTime:"Heure de début",startTimeDesc:"L'heure à laquelle les instances récurrentes doivent apparaître (optionnel)",recurFrom:"Récurrence à partir de",recurFromDesc:"Quand la prochaine occurrence doit-elle être calculée?",scheduledDate:"Date prévue",completionDate:"Date d'achèvement",frequency:"Fréquence",interval:"Intervalle",intervalDesc:"Tous les X jours/semaines/mois/années",daysOfWeek:"Jours de la semaine",daysOfWeekDesc:"Sélectionnez des jours spécifiques (pour la récurrence hebdomadaire)",monthlyRecurrence:"Récurrence mensuelle",monthlyRecurrenceDesc:"Choisissez comment répéter mensuellement",yearlyRecurrence:"Récurrence annuelle",yearlyRecurrenceDesc:"Choisissez comment répéter annuellement",endCondition:"Condition de fin",endConditionDesc:"Choisissez quand la récurrence doit se terminer",neverEnds:"Ne se termine jamais",endAfterOccurrences:"Se termine après {count} occurrences",endOnDate:"Se termine le {date}",onDayOfMonth:"Le jour {day} de chaque mois",onTheWeekOfMonth:"Le {week} {day} de chaque mois",onDateOfYear:"Le {month} {day} de chaque année",onTheWeekOfYear:"Le {week} {day} de {month} chaque année",frequencies:{daily:"Quotidien",weekly:"Hebdomadaire",monthly:"Mensuel",yearly:"Annuel"},weekPositions:{first:"premier",second:"deuxième",third:"troisième",fourth:"quatrième",last:"dernier"},weekdays:{monday:"Lundi",tuesday:"Mardi",wednesday:"Mercredi",thursday:"Jeudi",friday:"Vendredi",saturday:"Samedi",sunday:"Dimanche"},weekdaysShort:{mon:"Lun",tue:"Mar",wed:"Mer",thu:"Jeu",fri:"Ven",sat:"Sam",sun:"Dim"},cancel:"Annuler",save:"Enregistrer"}}}};var zue={common:{appName:"TaskNotes",new:"Новый",cancel:"Отмена",confirm:"Подтвердить",close:"Закрыть",save:"Сохранить",reorder:{confirmLargeTitle:"Подтвердить большое переупорядочивание",confirmButton:"Переупорядочить заметки",confirmLargeMessage:'При переупорядочивании здесь поле "{field}" будет обновлено в {count} заметках, чтобы создать постоянный ручной порядок для {scope}. Скрытые или отфильтрованные заметки в той же области тоже могут быть обновлены. Продолжить?'},language:"Язык",systemDefault:"Системный по умолчанию",loading:"Загрузка...",languages:{en:"Английский",fr:"Французский",ru:"Русский",zh:"Китайский",de:"Немецкий",es:"Испанский",ja:"Японский",pt:"Португальский (Бразилия)",ko:"Корейский"},weekdays:{sunday:"Воскресенье",monday:"Понедельник",tuesday:"Вторник",wednesday:"Среда",thursday:"Четверг",friday:"Пятница",saturday:"Суббота"},months:{january:"Январь",february:"Февраль",march:"Март",april:"Апрель",may:"Май",june:"Июнь",july:"Июль",august:"Август",september:"Сентябрь",october:"Октябрь",november:"Ноябрь",december:"Декабрь"}},views:{agenda:{title:"Планы",today:"Сегодня",overdue:"Просрочено",refreshCalendars:"Обновить календари",actions:{previousPeriod:"Предыдущий период",nextPeriod:"Следующий период",goToToday:"Перейти к сегодня",refreshCalendars:"Обновить подписки на календари"},loading:"Загрузка планов...",dayToggle:"Переключить день",overdueToggle:"Переключить раздел просроченных",expandAllDays:"Развернуть все дни",collapseAllDays:"Свернуть все дни",notices:{calendarNotReady:"Сервис календаря еще не готов",calendarRefreshed:"Подписки на календари обновлены",refreshFailed:"Не удалось обновить"},empty:{noItemsScheduled:"Нет запланированных элементов",noItemsFound:"Элементы не найдены",helpText:"Создайте задачи с датами выполнения или запланированные задачи, или добавьте заметки, чтобы увидеть их здесь."},contextMenu:{showOverdueSection:"Показать раздел просроченных",showNotes:"Показать заметки",calendarSubscriptions:"Подписки на календари"},periods:{thisWeek:"На этой неделе"},tipPrefix:"Совет: "},taskList:{title:"Задачи",expandAllGroups:"Развернуть все группы",collapseAllGroups:"Свернуть все группы",noTasksFound:"Задачи не найдены для выбранных фильтров.",reorder:{scope:{ungrouped:"этот негруппированный список",group:'группа "{group}"'}},errors:{formulaGroupingReadOnly:"Нельзя переупорядочивать задачи в группах на основе формул. Значения формул вычисляются и не могут быть изменены напрямую."}},notes:{title:"Заметки",refreshButton:"Обновление...",refreshingButton:"Обновляется...",notices:{indexingDisabled:"Индексация заметок отключена"},empty:{noNotesFound:"Заметки не найдены",helpText:"Заметки для выбранной даты не найдены. Попробуйте выбрать другую дату в мини-календаре или создайте заметки."},loading:"Загрузка заметок...",refreshButtonAriaLabel:"Обновить список заметок"},miniCalendar:{title:"Мини-календарь",contextMenu:{openDailyNote:"Открыть ежедневную заметку",openWeeklyNote:"Открыть еженедельную заметку"}},advancedCalendar:{title:"Календарь",filters:{showFilters:"Показать фильтры",hideFilters:"Скрыть фильтры"},viewOptions:{calendarSubscriptions:"Подписки на календари",timeEntries:"Временные записи",timeblocks:"Временные блоки",scheduledDates:"Запланированные даты",dueDates:"Сроки выполнения",allDaySlot:"Слот на весь день",scheduledTasks:"Запланированные задачи",recurringTasks:"Повторяющиеся задачи"},buttons:{refresh:"Обновить",refreshHint:"Обновить подписки на календари"},notices:{icsServiceNotAvailable:"Сервис подписки ICS недоступен",calendarRefreshedAll:"Все подписки на календари успешно обновлены",refreshFailed:"Не удалось обновить некоторые подписки на календари",timeblockSpecificTime:"Временные блоки должны иметь конкретное время. Выберите временной диапазон в недельном или дневном виде.",timeblockMoved:'Временной блок "{title}" перемещен на {date}',timeblockUpdated:'Время временного блока "{title}" обновлено',timeblockMoveFailed:"Не удалось переместить временной блок: {message}",timeblockResized:'Длительность временного блока "{title}" обновлена',timeblockResizeFailed:"Не удалось изменить размер временного блока: {message}",taskScheduled:'Задача "{title}" запланирована на {date}',scheduleTaskFailed:"Не удалось запланировать задачу",endTimeAfterStart:"Время окончания должно быть после времени начала",timeEntryNotFound:"Временная запись не найдена",timeEntryDeleted:"Временная запись удалена",deleteTimeEntryFailed:"Не удалось удалить временную запись"},timeEntry:{estimatedSuffix:"оценка",trackedSuffix:"отслежено",recurringPrefix:"Повторяющаяся: ",completedPrefix:"Завершено: ",createdPrefix:"Создано: ",modifiedPrefix:"Изменено: ",duePrefix:"Срок: ",scheduledPrefix:"Запланировано: "},contextMenus:{openTask:"Открыть задачу",deleteTimeEntry:"Удалить временную запись",deleteTimeEntryTitle:"Удалить временную запись",deleteTimeEntryConfirm:"Вы уверены, что хотите удалить эту временную запись{duration}? Это действие нельзя отменить.",deleteButton:"Удалить",cancelButton:"Отмена"}},basesCalendar:{title:"Календарь Bases",today:"Сегодня",buttonText:{month:"М",week:"Н",day:"Д",year:"Г",list:"С",customDays:"{count}Д",listDays:"{count}д Список",refresh:"Обновить"},hints:{refresh:"Обновить подписки календаря",today:"Перейти к сегодня",prev:"Назад",next:"Вперёд",month:"Вид по месяцам",week:"Вид по неделям",day:"Вид по дням",year:"Вид по годам",list:"Вид списком",customDays:"Вид на {count} дней"},settings:{groups:{dateNavigation:"Навигация по датам",events:"События",layout:"Макет",view:"Вид",display:"Отображение",timeGrid:"Временная сетка",eventLayout:"Размещение событий",propertyBasedEvents:"События на основе свойств",calendarSubscriptions:"Подписки календаря",googleCalendars:"Календари Google",microsoftCalendars:"Календари Microsoft"},dateNavigation:{navigateToDate:"Перейти к дате",navigateToDatePlaceholder:"ГГГГ-ММ-ДД (например, 2025-01-15) - оставьте пустым для использования свойства",navigateToDateFromProperty:"Перейти к дате из свойства",navigateToDateFromPropertyPlaceholder:"Выберите свойство даты (необязательно)",propertyNavigationStrategy:"Стратегия навигации по свойству",createDailyNotesFromDateLinks:"Создавать ежедневные заметки из ссылок дат",strategies:{first:"Первый результат",earliest:"Самая ранняя дата",latest:"Самая поздняя дата"}},events:{showScheduledTasks:"Показать запланированные задачи",showDueTasks:"Показать задачи с крайним сроком",showOverdueOnToday:"Показывать просроченные задачи сегодня",showRecurringTasks:"Показать повторяющиеся задачи",showTimeEntries:"Показать записи времени",showTimeblocks:"Показать временные блоки",showPropertyBasedEvents:"Показать события на основе свойств",showCompletedRecurringInstances:"Показывать завершённые повторяющиеся экземпляры",showSkippedRecurringInstances:"Показывать пропущенные повторяющиеся экземпляры"},layout:{calendarView:"Вид календаря",customDayCount:"Пользовательское количество дней",listDayCount:"Количество дней списка",dayStartTime:"Время начала дня",dayStartTimePlaceholder:"ЧЧ:мм:сс (например, 08:00:00)",dayEndTime:"Время окончания дня",dayEndTimePlaceholder:"ЧЧ:мм:сс (например, 20:00:00)",timeSlotDuration:"Длительность временного слота",timeSlotDurationPlaceholder:"ЧЧ:мм:сс (например, 00:30:00)",dragDropResolution:"Шаг перетаскивания",dragDropResolutionPlaceholder:"ЧЧ:мм:сс (например, 00:05:00)",weekStartsOn:"Неделя начинается с",showWeekNumbers:"Показать номера недель",showNowIndicator:"Показать индикатор текущего времени",showWeekends:"Показать выходные",showAllDaySlot:"Показать слот на весь день",showTimeGrid:"Показать часовую сетку",showTodayHighlight:"Выделить сегодня",todayColumnWidthMultiplier:"Множитель ширины колонки сегодняшнего дня",showSelectionPreview:"Показать предпросмотр выбора",timeFormat:"Формат времени",timeFormat12:"12-часовой (AM/PM)",timeFormat24:"24-часовой",initialScrollTime:"Начальное время прокрутки",initialScrollTimePlaceholder:"ЧЧ:мм:сс (например, 08:00:00)",minimumEventHeight:"Минимальная высота события (px)",slotEventOverlap:"Разрешить наложение событий",enableSearch:"Включить поле поиска",eventMaxStack:"Макс. наложенных событий (неделя/день, 0 = без ограничений)",dayMaxEvents:"Макс. событий в день (месяц, 0 = авто)",dayMaxEventRows:"Макс. строк событий в день (месяц, 0 = без ограничений)",spanScheduledToDue:"Растягивать задачи между запланированной и срочной датами",heightMode:"Режим высоты",heightModeFill:"Заполнить контейнер",heightModeAuto:"Автоматическая высота"},propertyBasedEvents:{startDateProperty:"Свойство даты начала",startDatePropertyPlaceholder:"Выберите свойство для даты/времени начала",endDateProperty:"Свойство даты окончания (необязательно)",endDatePropertyPlaceholder:"Выберите свойство для даты/времени окончания",titleProperty:"Свойство заголовка (необязательно)",titlePropertyPlaceholder:"Выберите свойство для заголовка события"}},notices:{noDailyNoteForDate:"Для этой даты нет ежедневной заметки."},errors:{failedToInitialize:"Не удалось инициализировать календарь"}},kanban:{title:"Канбан",newTask:"Новая задача",addCard:"+ Добавить карточку",noTasks:"Нет задач",uncategorized:"Без категории",noProject:"Без проекта",reorder:{scope:{column:'колонка "{group}"',columnInSwimlane:'колонка "{group}" в swimlane "{swimlane}"'}},notices:{loadFailed:"Не удалось загрузить доску Канбан",movedTask:'Задача перемещена в "{0}"'},errors:{loadingBoard:"Ошибка загрузки доски.",noGroupBy:"Для представления Канбан требуется настроенное свойство 'Группировать по'. Нажмите кнопку 'Сортировка' и выберите свойство в разделе 'Группировать по'.",formulaGroupingReadOnly:"Нельзя перемещать задачи между колонками на основе формул. Значения формул вычисляются и не могут быть изменены напрямую.",formulaSwimlaneReadOnly:"Нельзя перемещать задачи между дорожками на основе формул. Значения формул вычисляются и не могут быть изменены напрямую."},columnTitle:"Без названия"},pomodoro:{title:"Помодоро",status:{focus:"Фокус",ready:"Готово к началу",paused:"Приостановлено",working:"Работа",shortBreak:"Короткий перерыв",longBreak:"Длинный перерыв",breakPrompt:"Отличная работа! Время для {length} перерыва",breakLength:{short:"короткого",long:"длинного"},breakComplete:"Перерыв завершен! Готовы к следующему помодоро?"},buttons:{start:"Старт",pause:"Пауза",stop:"Стоп",resume:"Продолжить",startShortBreak:"Начать короткий перерыв",startLongBreak:"Начать длинный перерыв",skipBreak:"Пропустить перерыв",chooseTask:"Выбрать задачу...",changeTask:"Изменить задачу...",clearTask:"Очистить задачу",selectDifferentTask:"Выбрать другую задачу",startFocus:"Начать фокус",addMinute:"Добавить одну минуту",subtractMinute:"Вычесть одну минуту"},notices:{noTasks:"Не найдено неархивированных задач. Сначала создайте несколько задач.",loadFailed:"Не удалось загрузить задачи",invalidDuration:"Введите длительность, например 10, 10:30 или 1:30:00."},statsLabel:"завершено сегодня",meta:{ready:"{time} запланировано · {count} завершено сегодня",running:"Осталось {time} · Завершится в {endTime}",paused:"{type} на паузе · осталось {time}",breakReady:"{type} готово · {time} запланировано"},timer:{editLabel:"Изменить длительность таймера",inputLabel:"Длительность таймера"}},pomodoroStats:{title:"Статистика помодоро",heading:"Статистика помодоро",refresh:"Обновить",sections:{overview:"Обзор",today:"Сегодня",week:"Эта неделя",allTime:"За все время",recent:"Последние сессии"},overviewCards:{todayPomos:{label:"Помодоро сегодня",change:{more:"на {count} больше чем вчера",less:"на {count} меньше чем вчера"}},totalPomos:{label:"Всего помодоро"},todayFocus:{label:"Фокус сегодня",change:{more:"на {duration} больше чем вчера",less:"на {duration} меньше чем вчера"}},totalFocus:{label:"Общее время фокуса"}},stats:{pomodoros:"Помодоро",streak:"Серия",minutes:"Минуты",average:"Средняя длина",completion:"Завершение"},recents:{empty:"Сессии еще не записаны",duration:"{minutes} мин",status:{completed:"Завершено",interrupted:"Прервано"},delete:"Удалить сессию",deleteAria:"Удалить сессию Pomodoro",deleteConfirmTitle:"Удалить сессию Pomodoro?",deleteConfirmMessage:"Это удалит сессию из истории Pomodoro. Существующие записи времени задач не изменятся.",deleteConfirmButton:"Удалить",deleteSuccess:"Сессия Pomodoro удалена",deleteNotFound:"Сессия Pomodoro не найдена"},basesMigration:{title:"Нужно представление Base?",description:"Представления Base Pomodoro используют frontmatter ежедневных заметок. Чтобы увидеть эту историю в сгенерированной Base статистики Pomodoro, перенесите данные Pomodoro в настройках, затем выберите хранение в ежедневных заметках."}},stats:{title:"Статистика",taskProjectStats:"Статистика задач и проектов",sections:{filters:"Фильтры",overview:"Обзор",today:"Сегодня",thisWeek:"Эта неделя",thisMonth:"Этот месяц",projectBreakdown:"Разбивка по проектам",dateRange:"Диапазон дат"},filters:{minTime:"Мин. время (минуты)",allTasks:"Все задачи",activeOnly:"Только активные",completedOnly:"Только завершенные"},refreshButton:"Обновить",timeRanges:{allTime:"Все время",last7Days:"Последние 7 дней",last30Days:"Последние 30 дней",last90Days:"Последние 90 дней",customRange:"Пользовательский диапазон"},resetFiltersButton:"Сбросить фильтры",dateRangeFrom:"С",dateRangeTo:"До",noProject:"Без проекта",cards:{timeTrackedEstimated:"Отслежено / Запланировано времени",totalTasks:"Доtal Tasks",completionRate:"Процент завершения",activeProjects:"Активные проекты",avgTimePerTask:"Среднее время на задачу"},labels:{tasks:"Задачи",completed:"Завершено",projects:"Проекты"},noProjectData:"Нет данных о проектах",notAvailable:"Н/Д",noTasks:"Задачи не найдены",loading:"Загрузка..."},releaseNotes:{title:"Что нового в TaskNotes {version}",header:"Что нового в TaskNotes {version}",viewAllLink:"Посмотреть все примечания к выпуску на GitHub →",starMessage:"Мы очень ценим любые отзывы. Если что-то кажется неправильным, пожалуйста, сообщите нам на GitHub. Если TaskNotes полезен для вас, пожалуйста, поставьте звезду.",baseFilesNotice:"> [!info] О файлах `.base` по умолчанию\n> Изменения в шаблонах `.base`, которые генерируются по умолчанию, не перезаписывают ваши существующие файлы `.base`, поэтому ваши настройки сохраняются.\n> Чтобы получить улучшения новых шаблонов, пересоздайте базовые файлы в **Настройки → TaskNotes → Общие → Представления и файлы base → Обновить файлы**."}},settings:{header:{documentation:"Документация",documentationUrl:"https://tasknotes.dev"},tabs:{general:"Общие",taskProperties:"Свойства задач",modalFields:"Поля модального окна",defaults:"По умолчанию и шаблоны",appearance:"Внешний вид и интерфейс",features:"Функции",integrations:"Интеграции"},features:{inlineTasks:{header:"Встроенные задачи",description:"Настройки ссылок на задачи и преобразования флажков в задачи в заметках."},taskCreation:{header:"Создание задач",description:"Настройте, что происходит после создания задач.",openAfterCreate:{name:"Открывать задачу после создания",description:"Выберите, будет ли обычное окно создания новой задачи открывать новую заметку задачи после сохранения.",options:{none:"Не открывать",sameTab:"Открывать в той же вкладке",newTab:"Открывать в новой вкладке"}}},overlays:{taskLinkToggle:{name:"Наложение ссылок задач",description:"Показывать интерактивные наложения при наведении на ссылки задач"},aliasExclusion:{name:"Отключить наложение для ссылок с псевдонимами",description:"Не показывать виджет задачи, если ссылка содержит псевдоним (например, [[Задача|Псевдоним]])."}},instantConvert:{toggle:{name:"Показывать кнопку преобразования рядом с флажками",description:"Отображать встроенную кнопку рядом с флажками Markdown, которая преобразует их в TaskNotes"},preserveCheckbox:{name:"Сохранять флажок при преобразовании",description:"Оставлять исходный маркер флажка Markdown при преобразовании флажка в ссылку TaskNote"},folder:{name:"Папка для задач, созданных inline",description:"Папка, где будут создаваться задачи из inline-команд или преобразования чекбоксов. Оставьте пустым, чтобы использовать папку задач по умолчанию. Используйте {{currentNotePath}} для папки текущей заметки или {{currentNoteTitle}} для подпапки с именем текущей заметки."}},nlp:{header:"Обработка естественного языка",description:"Анализ дат, приоритетов и других свойств из текстового ввода.",enable:{name:"Включить ввод задач на естественном языке",description:"Анализировать сроки выполнения, приоритеты и контексты из естественного языка при создании задач"},defaultToScheduled:{name:"По умолчанию запланированное",description:"Когда NLP обнаруживает дату без контекста, трактовать ее как запланированную, а не срок выполнения"},language:{name:"Язык NLP",description:"Язык для шаблонов обработки естественного языка и анализа дат"},statusTrigger:{name:"Триггер предложения статуса",description:"Текст для запуска предложений статуса (оставьте пустым для отключения)"}},pomodoro:{header:"Таймер помодоро",description:"Настройка интервалов работы/отдыха для таймера помодоро.",workDuration:{name:"Длительность работы",description:"Длительность рабочих интервалов в минутах"},shortBreak:{name:"Длительность короткого перерыва",description:"Длительность коротких перерывов в минутах"},longBreak:{name:"Длительность длинного перерыва",description:"Длительность длинных перерывов в минутах"},longBreakInterval:{name:"Интервал длинного перерыва",description:"Количество рабочих сессий перед длинным перерывом"},autoStartBreaks:{name:"Автозапуск перерывов",description:"Автоматически запускать таймеры перерывов после рабочих сессий"},autoStartWork:{name:"Автозапуск работы",description:"Автоматически запускать рабочие сессии после перерывов"},notifications:{name:"Уведомления помодоро",description:"Показывать уведомления при завершении сессий помодоро"},mobileSidebar:{name:"Мобильная боковая панель",description:"Где открывать таймер помодоро на мобильных устройствах",tab:"Панель заметок",left:"Левая боковая панель",right:"Правая боковая панель"},statusBar:{name:"Показывать Pomodoro в строке состояния",description:"Показывать активный обратный отсчёт Pomodoro в строке состояния Obsidian"}},uiLanguage:{header:"Язык интерфейса",description:"Изменить язык меню, уведомлений и представлений TaskNotes.",dropdown:{name:"Язык интерфейса",description:"Выберите язык, используемый для текста интерфейса TaskNotes"}},pomodoroSound:{enabledName:"Звук включен",enabledDesc:"Воспроизводить звук при завершении сессий помодоро",volumeName:"Громкость звука",volumeDesc:"Громкость звуков помодоро (0-100)"},dataStorage:{name:"Хранилище данных помодоро",description:"Настройка места хранения данных сеансов Pomodoro и управления ими.",dailyNotes:"Ежедневные заметки",pluginData:"Данные плагина",notices:{locationChanged:"Местоположение хранилища Pomodoro изменено на {location}"}},notifications:{header:"Уведомления",description:"Настройка уведомлений о напоминаниях задач и оповещений.",enableName:"Включить уведомления",enableDesc:"Включить уведомления о напоминаниях задач",typeName:"Тип уведомлений",typeDesc:"Тип отображаемых уведомлений",systemLabel:"Системные уведомления",inAppLabel:"Уведомления в приложении",soundEnabledName:"Звук уведомления",soundEnabledDesc:"Воспроизводить звук при срабатывании напоминаний задач",soundVolumeName:"Громкость звука",soundVolumeDesc:"Громкость звуков напоминаний задач (0-100)",soundPreviewName:"Прослушать звук уведомления",soundPreviewDesc:"Воспроизвести настроенный звук напоминания задачи",soundPreviewButton:"Прослушать",testReminderName:"Отправить тестовое напоминание",testReminderDesc:"Отправить тестовое напоминание с текущим типом уведомления и настройками звука.",testReminderButton:"Отправить тест"},overdue:{hideCompletedName:"Скрыть завершенные задачи из просроченных",hideCompletedDesc:"Исключить завершенные задачи из расчетов просроченных задач"},indexing:{disableName:"Отключить индексацию заметок",disableDesc:"Отключить автоматическую индексацию содержимого заметок для лучшей производительности"},suggestions:{debounceName:"Задержка предложений",debounceDesc:"Задержка в миллисекундах перед показом предложений"},timeTracking:{autoStopName:"Автоостановка отслеживания времени",autoStopDesc:"Автоматически останавливать отслеживание времени при отметке задачи как выполненной",stopNotificationName:"Уведомление об остановке отслеживания времени",stopNotificationDesc:"Показывать уведомление при автоматической остановке отслеживания времени"},recurring:{maintainOffsetName:"Сохранять смещение срока выполнения в повторяющихся задачах",maintainOffsetDesc:"Сохранять смещение между сроком выполнения и запланированной датой при завершении повторяющихся задач",resetCheckboxesName:"Сбрасывать флажки при повторении",resetCheckboxesDesc:"Сбрасывать все флажки markdown в теле задачи, когда повторяющаяся задача завершена и перенесена"},timeblocking:{header:"Блокировка времени",description:"Настройте функциональность временных блоков для легкого планирования в ежедневных заметках. Перетащите в представлениях календаря для создания событий - выберите 'Timeblock' из контекстного меню.",enableName:"Включить блокировку времени",enableDesc:"Включить функциональность временных блоков для легкого планирования в ежедневных заметках. Когда включено, опция 'Timeblock' появляется в контекстном меню перетаскивания календаря.",showBlocksName:"Показать временные блоки",showBlocksDesc:"Отображать временные блоки из ежедневных заметок по умолчанию",defaultColorName:"Цвет временных блоков по умолчанию",defaultColorDesc:"Цвет по умолчанию, используемый при создании новых временных блоков",usage:"Использование: Перетащите в календаре для создания событий. Выберите 'Timeblock' из контекстного меню (видно только когда блокировка времени включена). Перетащите для перемещения существующих временных блоков. Измените размер краев для настройки длительности."},performance:{header:"Производительность и поведение",description:"Настройка производительности плагина и параметров поведения."},timeTrackingSection:{header:"Отслеживание времени",description:"Настройка автоматического отслеживания времени."},recurringSection:{header:"Повторяющиеся задачи",description:"Настройка поведения для управления повторяющимися задачами."},debugLogging:{header:"Отладочное журналирование",description:"Настройте вывод отладочного лога для устранения неполадок.",enableName:"Включить отладочное ведение журнала",enableDesc:"Записывать подробную диагностику перетаскивания и представления в консоль разработчика. Полезно для устранения неполадок."}},defaults:{header:{basicDefaults:"Основные значения по умолчанию",dateDefaults:"Даты по умолчанию",defaultReminders:"Напоминания по умолчанию",bodyTemplate:"Шаблон тела",instantTaskConversion:"Мгновенное преобразование задач"},description:{basicDefaults:"Установите значения по умолчанию для новых задач, чтобы ускорить создание задач.",dateDefaults:"Установите сроки выполнения и запланированные даты по умолчанию для новых задач.",defaultReminders:"Настройте напоминания по умолчанию, которые будут добавляться к новым задачам.",bodyTemplate:"Настройте файл шаблона для использования в содержимом новых задач.",instantTaskConversion:"Настройте поведение при мгновенном преобразовании текста в задачи."},basicDefaults:{defaultStatus:{name:"Статус по умолчанию",description:"Статус по умолчанию для новых задач"},defaultPriority:{name:"Приоритет по умолчанию",description:"Приоритет по умолчанию для новых задач"},defaultContexts:{name:"Контексты по умолчанию",description:"Список контекстов по умолчанию через запятую (например, @дом, @работа)",placeholder:"@дом, @работа"},defaultTags:{name:"Теги по умолчанию",description:"Список тегов по умолчанию через запятую (без #)",placeholder:"важный, срочный"},defaultProjects:{name:"Проекты по умолчанию",description:"Ссылки на проекты по умолчанию для новых задач",selectButton:"Выбрать проекты",selectTooltip:"Выберите заметки проектов для связывания по умолчанию",removeTooltip:"Удалить {name} из проектов по умолчанию"},useParentNoteForTaskCreation:{name:"Использовать активную заметку как проект для новых задач",description:"Автоматически связывать активную заметку как проект при открытии создания задачи из палитры команд или ленты"},useParentNoteAsProject:{name:"Использовать родительскую заметку как проект для встроенного создания и мгновенного преобразования",description:"Автоматически связывать исходную заметку как проект при использовании встроенного создания задач или мгновенного преобразования"},useParentHeaderAsProject:{name:"Использовать родительский заголовок как проект при мгновенном преобразовании",description:"Автоматически связывать ближайший заголовок над преобразуемой строкой как проект при мгновенном преобразовании задачи"},defaultTimeEstimate:{name:"Оценка времени по умолчанию",description:"Оценка времени по умолчанию в минутах (0 = без умолчания)",placeholder:"60"},defaultRecurrence:{name:"Повторение по умолчанию",description:"Шаблон повторения по умолчанию для новых задач"}},dateDefaults:{defaultDueDate:{name:"Срок выполнения по умолчанию",description:"Срок выполнения по умолчанию для новых задач"},defaultScheduledDate:{name:"Запланированная дата по умолчанию",description:"Запланированная дата по умолчанию для новых задач"}},reminders:{addReminder:{name:"Добавить напоминание по умолчанию",description:"Создать новое напоминание по умолчанию, которое будет добавляться ко всем новым задачам",buttonText:"Добавить напоминание"},emptyState:"Напоминания по умолчанию не настроены. Добавьте напоминание для автоматического уведомления о новых задачах.",emptyStateButton:"Добавить напоминание",reminderDescription:"Описание напоминания",unnamedReminder:"Безымянное напоминание",deleteTooltip:"Удалить напоминание",fields:{description:"Описание:",type:"Тип:",offset:"Смещение:",unit:"Единица:",direction:"Направление:",relatedTo:"Относительно:",date:"Дата:",time:"Время:"},types:{relative:"Относительное (до/после дат задач)",absolute:"Абсолютное (конкретная дата/время)"},units:{minutes:"минуты",hours:"часы",days:"дни"},directions:{before:"до",after:"после"},relatedTo:{due:"срок выполнения",scheduled:"запланированная дата"}},bodyTemplate:{useBodyTemplate:{name:"Использовать шаблон тела",description:"Использовать файл шаблона для содержимого тела задачи"},bodyTemplateFile:{name:"Файл шаблона тела",description:"Путь к файлу шаблона для содержимого тела задачи. Поддерживает переменные шаблона, такие как {{title}}, {{date}}, {{time}}, {{priority}}, {{status}} и т.д.",placeholder:"Шаблоны/Шаблон задачи.md",ariaLabel:"Путь к файлу шаблона тела"},useOccurrenceBodyTemplate:{name:"Использовать шаблон заметки экземпляра",description:"Использовать отдельный резервный шаблон для материализованных заметок экземпляров, когда у повторяющейся задачи нет occurrence_template"},occurrenceBodyTemplateFile:{name:"Файл шаблона заметки экземпляра",description:"Путь к файлу шаблона для материализованных заметок экземпляров. Поле occurrence_template повторяющейся задачи имеет приоритет над этим резервным шаблоном.",placeholder:"Шаблоны/Шаблон экземпляра.md",ariaLabel:"Путь к файлу шаблона заметки экземпляра"},variablesHeader:"Переменные шаблона:",variables:{title:"{{title}} - Название задачи",details:"{{details}} - Детали, предоставленные пользователем из модального окна",date:"{{date}} - Текущая дата (ГГГГ-ММ-ДД)",time:"{{time}} - Текущее время (ЧЧ:ММ)",priority:"{{priority}} - Приоритет задачи",status:"{{status}} - Статус задачи",contexts:"{{contexts}} - Контексты задачи",tags:"{{tags}} - Теги задачи",projects:"{{projects}} - Проекты задачи"}},instantConversion:{useDefaultsOnInstantConvert:{name:"Использовать значения по умолчанию при мгновенном преобразовании",description:"Применять настройки задач по умолчанию при мгновенном преобразовании текста в задачи"}},options:{noDefault:"Без умолчания",none:"Нет",today:"Сегодня",tomorrow:"Завтра",nextWeek:"Следующая неделя",daily:"Ежедневно",weekly:"Еженедельно",monthly:"Ежемесячно",yearly:"Ежегодно"}},general:{taskStorage:{header:"Хранилище задач",description:"Настройте, где хранятся задачи и как они идентифицируются.",defaultFolder:{name:"Папка задач по умолчанию",description:"Расположение по умолчанию для новых задач. Поддерживает переменные шаблонов папок, такие как {{currentNotePath}}, {{currentNoteTitle}} и {{projectFilePath}}, а также токены дат в стиле Daily Notes, например YYYY/MM/DD."},moveArchived:{name:"Перемещать архивированные задачи в папку",description:"Автоматически перемещать архивированные задачи в папку архива"},archiveFolder:{name:"Папка архива",description:"Папка для перемещения задач при архивировании"}},taskIdentification:{header:"Идентификация задач",description:"Выберите, как TaskNotes идентифицирует заметки как задачи.",identifyBy:{name:"Идентифицировать задачи по",description:"Выберите, идентифицировать ли задачи по тегу или по свойству frontmatter",options:{tag:"Тег",property:"Свойство"}},taskTag:{name:"Тег задачи",description:"Тег, который идентифицирует заметки как задачи (без #). Существующие фильтры представлений .base сохраняют старый тег после изменения; обновите файлы Base по умолчанию или отредактируйте эти фильтры."},hideIdentifyingTags:{name:"Скрыть идентификационные теги в карточках задач",description:"При включении теги, соответствующие тегу идентификации задачи (включая иерархические совпадения, такие как 'task/project'), будут скрыты в карточках задач"},hideIdentifyingTagsMode:{name:"Область скрытия тегов",description:"Выберите, скрывать ли вместе с идентификационными тегами вложенные теги.",options:{all:"Тег задачи и вложенные теги",exactOnly:"Только точный тег задачи"}},taskProperty:{name:"Имя свойства задачи",description:'Имя свойства frontmatter (например, "категория")'},taskPropertyValue:{name:"Значение свойства задачи",description:'Значение, которое идентифицирует заметку как задачу (например, "задача")'}},folderManagement:{header:"Управление папками",excludedFolders:{name:"Исключенные папки",description:"Список папок через запятую для исключения из индексации задач и предложений проектов"}},frontmatter:{header:"Frontmatter",description:"Настройка форматирования ссылок в свойствах frontmatter.",useMarkdownLinks:{name:"Использовать ссылки markdown во frontmatter",description:"Генерировать ссылки markdown ([текст](путь)) вместо викиссылок ([[ссылка]]) в свойствах frontmatter.\\n\\n⚠️ Требуется плагин 'obsidian-frontmatter-markdown-links' для корректной работы."}},taskInteraction:{header:"Взаимодействие с задачами",description:"Настройте поведение при нажатии на задачи.",singleClick:{name:"Действие одиночного нажатия",description:"Действие, выполняемое при одиночном нажатии на карточку задачи"},doubleClick:{name:"Действие двойного нажатия",description:"Действие, выполняемое при двойном нажатии на карточку задачи"},actions:{edit:"Редактировать задачу",openNote:"Открыть заметку",none:"Нет действия"}},releaseNotes:{header:"Примечания к выпуску",description:"Текущая версия: {version}",showOnUpdate:{name:"Показывать примечания к выпуску после обновления",description:"Автоматически открывать примечания к выпуску при обновлении TaskNotes до новой версии"},checkForUpdates:{name:"Проверять новые выпуски при запуске",description:"Проверяет GitHub один раз при запуске TaskNotes и показывает уведомление, если доступен более новый совместимый выпуск"},viewButton:{name:"Просмотреть примечания к выпуску",description:"Узнайте, что нового в последней версии TaskNotes",buttonText:"Просмотреть примечания к выпуску"}}},taskProperties:{sections:{coreProperties:"Основные свойства",corePropertiesDesc:"Статус и приоритет — это основные свойства, определяющие состояние и важность задачи.",dateProperties:"Свойства дат",datePropertiesDesc:"Настройте сроки выполнения и запланированные даты задач.",organizationProperties:"Свойства организации",organizationPropertiesDesc:"Организуйте задачи с помощью контекстов, проектов и тегов.",taskDetails:"Детали задачи",taskDetailsDesc:"Дополнительные детали: оценка времени, повторения и напоминания.",metadataProperties:"Свойства метаданных",metadataPropertiesDesc:"Управляемые системой свойства для отслеживания истории задач.",featureProperties:"Свойства функций",featurePropertiesDesc:"Свойства, используемые специальными функциями TaskNotes, такими как таймер Помодоро и синхронизация календаря."},propertyCard:{propertyKey:"Ключ свойства:",default:"По умолчанию:",nlpTrigger:"NLP-триггер:",triggerChar:"Символ-триггер:",triggerEmpty:"Триггер не может быть пустым",triggerTooLong:"Триггер слишком длинный (макс. 10 символов)"},properties:{status:{name:"Статус",description:"Отслеживает текущее состояние задачи (например, todo, в работе, выполнено). Статус определяет, отображается ли задача как завершённая, и может запускать автоархивацию."},priority:{name:"Приоритет",description:"Указывает важность задачи. Используется для сортировки и фильтрации. Значения сортируются по алфавиту в представлениях Bases, поэтому используйте префиксы 1-, 2- для управления порядком."},due:{name:"Срок выполнения",description:"Крайний срок, к которому задача должна быть выполнена. Задачи после срока выполнения отображаются как просроченные. Хранится как дата в frontmatter."},scheduled:{name:"Запланированная дата",description:"Когда вы планируете работать над задачей. В отличие от срока выполнения, это время начала работы. Задачи отображаются в календаре в запланированную дату/время."},contexts:{name:"Контексты",description:"Места или условия, где задача может быть выполнена (например, @дом, @офис, @телефон). Полезно для фильтрации задач по текущей ситуации. Хранится как список."},projects:{name:"Проекты",description:"Ссылки на заметки проектов, к которым принадлежит задача. Хранится как викиссылки (например, [[Название проекта]]). Задачи могут принадлежать нескольким проектам."},tags:{name:"Теги",description:"Нативные теги Obsidian для категоризации задач. Хранятся в свойстве tags frontmatter и работают с функциями тегов Obsidian."},timeEstimate:{name:"Оценка времени",description:"Предполагаемое количество минут для выполнения задачи. Используется для планирования времени и нагрузки. Отображается на карточках задач и событиях календаря."},recurrence:{name:"Повторение",description:"Шаблон для повторяющихся задач (ежедневно, еженедельно, ежемесячно, ежегодно или пользовательское RRULE). При завершении повторяющейся задачи запланированная дата автоматически обновляется на следующее вхождение."},recurrenceAnchor:{name:"Якорь повторения",description:"Определяет способ вычисления следующего вхождения: 'scheduled' использует запланированную дату, 'completion' использует фактическую дату завершения."},reminders:{name:"Напоминания",description:"Уведомления, срабатывающие перед сроками выполнения или запланированными датами. Хранится как список объектов напоминаний с временем и опциональным описанием."},title:{name:"Заголовок",description:"Название задачи. Может храниться в frontmatter или в имени файла (когда включено «Хранить заголовок в имени файла»)."},dateCreated:{name:"Дата создания",description:"Метка времени создания задачи. Устанавливается автоматически и используется для сортировки по порядку создания."},dateModified:{name:"Дата изменения",description:"Метка времени последнего изменения задачи. Автоматически обновляется при изменении любого свойства задачи."},completedDate:{name:"Дата завершения",description:"Метка времени, когда задача была отмечена как выполненная. Устанавливается автоматически при изменении статуса на завершённое состояние."},archiveTag:{name:"Тег архива",description:"Тег, добавляемый к задачам при архивации. Используется для идентификации архивированных задач и может запускать перемещение файлов в папку архива."},timeEntries:{name:"Записи времени",description:"Записи сеансов учёта времени для этой задачи. Каждая запись хранит метки времени начала и окончания. Используется для расчёта общего затраченного времени."},completeInstances:{name:"Завершённые экземпляры",description:"История завершения для повторяющихся задач. Хранит даты завершения каждого экземпляра для предотвращения дублирования."},skippedInstances:{name:"Пропущенные экземпляры",description:"Пропущенные вхождения для повторяющихся задач. Хранит даты экземпляров, которые были пропущены, а не завершены."},blockedBy:{name:"Заблокирована",description:"Ссылки на задачи, которые должны быть выполнены до этой. Хранится как викиссылки. Заблокированные задачи отображают визуальный индикатор."},sortOrder:{name:"Ручной порядок",description:"Свойство frontmatter, используемое для ручной сортировки перетаскиванием. Для работы перетаскивания представление должно быть отсортировано по этому свойству."},pomodoros:{name:"Помодоро",description:"Количество завершённых сеансов Помодоро. Когда хранение данных установлено на «Ежедневные заметки», это записывается в ежедневные заметки вместо файлов задач."},icsEventId:{name:"ID события ICS",description:"Уникальный идентификатор, связывающий заметку с событием календаря ICS. Добавляется автоматически при создании заметок из событий календаря."},icsEventTag:{name:"Тег события ICS",description:"Тег, идентифицирующий заметки, созданные из событий календаря ICS. Используется для отличия заметок, сгенерированных календарём, от обычных задач."}},statusCard:{valuesHeader:"Значения статуса"},priorityCard:{valuesHeader:"Значения приоритета"},projectsCard:{defaultProjects:"Проекты по умолчанию:",useParentNoteForTaskCreation:"Использовать активную заметку для новых задач:",useParentNoteForInlineTasks:"Использовать родительскую заметку для встроенного/мгновенного преобразования:",useParentHeader:"Использовать родительский заголовок как проект:",inheritParentTaskProperties:"Наследовать свойства родительской задачи для подзадач:",noDefaultProjects:"Проекты по умолчанию не выбраны",autosuggestFilters:"Фильтры автоподсказок",customizeDisplay:"Настроить отображение",filtersOn:"Фильтры включены"},titleCard:{storeTitleInFilename:"Хранить заголовок в имени файла:",storedInFilename:"Хранится в имени файла",filenameUpdatesWithTitle:"Имя файла будет автоматически обновляться при изменении заголовка задачи.",filenameFormat:"Формат имени файла:",customTemplate:"Пользовательский шаблон:",legacySyntaxWarning:"Синтаксис с одинарными фигурными скобками, такой как {title}, устарел. Пожалуйста, используйте синтаксис с двойными фигурными скобками {{title}} для согласованности с шаблонами тела.",occurrenceFilenameTemplate:"Шаблон имени файла экземпляра",occurrenceFilenameTemplateHelp:"Шаблон имени файла для материализованных экземпляров повторяющихся задач. Оставьте поле пустым, чтобы сохранить существующее имя (заголовок родительской задачи с числовым суффиксом). Явно выберите детализацию с помощью {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}} или {{occurrenceMonthName}}. Также доступны все обычные переменные имени файла. Родительская задача может переопределить шаблон через указанное ниже свойство frontmatter.",occurrenceFilenameProperty:"Свойство переопределения шаблона экземпляра",occurrenceFilenamePropertyHelp:"Имя свойства frontmatter родительской повторяющейся задачи, которое переопределяет шаблон имени файла её экземпляров."},tagsCard:{nativeObsidianTags:"Использует нативные теги Obsidian"},remindersCard:{defaultReminders:"Напоминания по умолчанию"},taskStatuses:{header:"Статусы задач",description:"Настройте варианты статусов, доступные для ваших задач. Эти статусы контролируют жизненный цикл задач и определяют, когда задачи считаются завершенными.",howTheyWork:{title:"Как работают статусы:",value:'Значение: Внутренний идентификатор, хранящийся в файлах задач (например, "в-процессе")',label:'Метка: Отображаемое имя в интерфейсе (например, "В процессе")',color:"Цвет: Цвет визуального индикатора для точки статуса и значков",icon:'Иконка: Опциональное имя Lucide-иконки для отображения вместо цветной точки (например, "check", "circle", "clock"). Просмотрите иконки на lucide.dev',completed:"Завершено: При отметке задачи с этим статусом считаются завершенными и могут фильтроваться по-разному",autoArchive:"Автоархивирование: При включении задачи будут автоматически архивироваться после указанной задержки (1-1440 минут)",orderNote:"Порядок ниже определяет последовательность при переключении между статусами нажатием на значки статуса задач."},addNew:{name:"Добавить новый статус",description:"Создать новый вариант статуса для ваших задач",buttonText:"Добавить статус"},validationNote:'Примечание: У вас должно быть минимум 2 статуса, и минимум один статус должен быть отмечен как "Завершенный".',emptyState:"Пользовательские статусы не настроены. Добавьте статус для начала.",emptyStateButton:"Добавить статус",fields:{value:"Значение:",label:"Метка:",color:"Цвет:",icon:"Иконка:",completed:"Завершено:",excludeFromCycle:"Пропускать при цикле:",nextStatus:"Следующий статус:",autoArchive:"Автоархивирование:",delayMinutes:"Задержка (минуты):"},placeholders:{value:"в-процессе",label:"В процессе",icon:"check, circle, clock",nextStatusDefault:"Использовать порядок статусов"},badges:{completed:"Завершено"},deleteConfirm:'Вы уверены, что хотите удалить статус "{label}"?'},taskPriorities:{header:"Приоритеты задач",description:"Настройте уровни приоритета, доступные для ваших задач. В v4.0+ приоритеты сортируются в алфавитном порядке по их значению в представлениях Bases.",howTheyWork:{title:"Как работают приоритеты:",value:'Значение: Внутренний идентификатор, хранящийся в файлах задач. Используйте префиксы вроде "1-срочный", "2-высокий" для управления порядком сортировки в представлениях Bases.',label:'Отображаемая метка: Отображаемое имя в интерфейсе (например, "Высокий приоритет")',color:"Цвет: Цвет визуального индикатора для точки приоритета и значков",icon:"Иконка: Необязательная иконка Lucide для карточек задач вместо точки приоритета",weight:"Вес: Числовое значение для сортировки (более высокие веса появляются первыми в списках)",weightNote:"Задачи автоматически сортируются по весу приоритета в убывающем порядке (наивысший вес первым). Веса могут быть любыми положительными числами."},addNew:{name:"Добавить новый приоритет",description:"Создать новый уровень приоритета для ваших задач",buttonText:"Добавить приоритет"},validationNote:"Примечание: У вас должен быть минимум 1 приоритет. Приоритеты сортируются в алфавитном порядке по значению в представлениях Bases.",emptyState:"Пользовательские приоритеты не настроены. Добавьте приоритет для начала.",emptyStateButton:"Добавить приоритет",fields:{value:"Значение:",label:"Метка:",color:"Цвет:",icon:"Иконка:",weight:"Вес:"},placeholders:{value:"высокий",label:"Высокий приоритет",icon:"alert-circle"},weightLabel:"Вес: {weight}",deleteConfirm:"У вас должен быть минимум один приоритет",deleteTooltip:"Удалить приоритет"},fieldMapping:{header:"Сопоставление полей",warning:"⚠️ Предупреждение: TaskNotes будет ЧИТАТЬ И ЗАПИСЫВАТЬ, используя эти имена свойств. Изменение их после создания задач может вызвать несоответствия.",description:"Настройте, какие свойства frontmatter TaskNotes должны использовать для каждого поля.",resetButton:{name:"Сбросить сопоставления полей",description:"Сбросить все сопоставления полей к значениям по умолчанию",buttonText:"Сбросить к умолчаниям"},notices:{resetSuccess:"Сопоставления полей сброшены к умолчаниям",resetFailure:"Не удалось сбросить сопоставления полей",updateFailure:"Не удалось обновить сопоставление поля для {label}. Пожалуйста, попробуйте снова."},table:{fieldHeader:"Поле TaskNotes",propertyHeader:"Ваше имя свойства"},fields:{title:"Название",status:"Статус",priority:"Приоритет",due:"Срок выполнения",scheduled:"Запланированная дата",contexts:"Контексты",projects:"Проекты",timeEstimate:"Оценка времени",recurrence:"Повторение",dateCreated:"Дата создания",completedDate:"Дата завершения",dateModified:"Дата изменения",archiveTag:"Тег архива",timeEntries:"Записи времени",completeInstances:"Завершенные экземпляры",blockedBy:"Заблокировано",sortOrder:"Ручной порядок",pomodoros:"Помодоро",icsEventId:"ID события ICS",icsEventTag:"Тег события ICS",reminders:"Напоминания"}},customUserFields:{header:"Пользовательские поля",description:"Определите пользовательские свойства frontmatter для появления как типо-осведомленные варианты фильтра в представлениях. Каждая строка: Отображаемое имя, Имя свойства, Тип.",addNew:{name:"Добавить новое пользовательское поле",description:"Создать новое пользовательское поле, которое будет появляться в фильтрах и представлениях",buttonText:"Добавить пользовательское поле"},emptyState:"Пользовательские поля не настроены. Добавьте поле для создания пользовательских свойств для ваших задач.",emptyStateButton:"Добавить пользовательское поле",fields:{displayName:"Отображаемое имя:",propertyKey:"Ключ свойства:",type:"Тип:",defaultValue:"Значение по умолчанию:"},placeholders:{displayName:"Отображаемое имя",propertyKey:"имя-свойства",defaultValue:"Значение по умолчанию",defaultValueList:"Значения по умолчанию (через запятую)"},types:{text:"Текст",number:"Число",boolean:"Логический",date:"Дата",list:"Список"},defaultNames:{unnamedField:"Безымянное поле",noKey:"без-ключа"},deleteTooltip:"Удалить поле",autosuggestFilters:{header:"Фильтры автоподсказок (расширенные)",description:"Фильтрация файлов, отображаемых в автоподсказках для этого поля"}}},appearance:{taskCards:{header:"Карточки задач",description:"Настройте отображение карточек задач во всех представлениях.",defaultVisibleProperties:{name:"Видимые свойства по умолчанию",description:"Выберите, какие свойства появляются на карточках задач по умолчанию."},completionSubmenu:{name:"Объединять действия выполнения и пропуска в подменю",description:"Размещать действия выполнения и пропуска в подменю контекстного меню задачи. Отключите, чтобы показывать их непосредственно в меню."},propertyGroups:{coreProperties:"ОСНОВНЫЕ СВОЙСТВА",organization:"ОРГАНИЗАЦИЯ",customProperties:"ПОЛЬЗОВАТЕЛЬСКИЕ СВОЙСТВА"},properties:{status:"Точка статуса",priority:"Точка приоритета",due:"Срок выполнения",scheduled:"Запланированная дата",timeEstimate:"Оценка времени",totalTrackedTime:"Общее отслеженное время",checklistProgress:"Прогресс чек-листа",recurrence:"Повторение",completedDate:"Дата завершения",createdDate:"Дата создания",modifiedDate:"Дата изменения",projects:"Проекты",contexts:"Контексты",tags:"Теги",blocked:"Заблокирована",blocking:"Блокирует"}},taskFilenames:{header:"Имена файлов задач",description:"Настройте именование файлов задач при создании.",storeTitleInFilename:{name:"Хранить название в имени файла",description:"Использовать название задачи как имя файла. Имя файла будет обновляться при изменении названия задачи (Рекомендуется)."},filenameFormat:{name:"Формат имени файла",description:"Как должны генерироваться имена файлов задач",options:{title:"Название задачи (Не обновляемое)",zettel:"Формат Zettelkasten (ГГММДД + base36 секунды с полуночи)",timestamp:"Полная временная метка (ГГГГ-ММ-ДД-ЧЧММСС)",custom:"Пользовательский шаблон",uuid:"UUID v4"}},customTemplate:{name:"Пользовательский шаблон имени файла",description:"Шаблон для пользовательских имён файлов. Доступные переменные: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"Примечание: {{dueDate}} и {{scheduledDate}} в формате ГГГГ-ММ-ДД и будут пустыми, если не установлены."}},displayFormatting:{header:"Форматирование отображения",description:"Настройте отображение дат, времени и других данных в плагине.",timeFormat:{name:"Формат времени",description:"Отображать время в 12-часовом или 24-часовом формате в плагине",options:{twelveHour:"12-часовой (AM/PM)",twentyFourHour:"24-часовой"}}},calendarView:{header:"Представление календаря",description:"Настройте внешний вид и поведение представления календаря.",defaultView:{name:"Представление по умолчанию",description:"Представление календаря, показываемое при открытии вкладки календаря",options:{monthGrid:"Сетка месяца",weekTimeline:"Временная линия недели",dayTimeline:"Временная линия дня",yearView:"Представление года",customMultiDay:"Пользовательский многодневный"}},customDayCount:{name:"Количество дней пользовательского представления",description:"Количество дней для отображения в пользовательском многодневном представлении",placeholder:"3"},firstDayOfWeek:{name:"Первый день недели",description:"Какой день должен быть первой колонкой в недельных представлениях"},showWeekends:{name:"Показать выходные",description:"Отображать выходные в представлениях календаря"},showWeekNumbers:{name:"Показать номера недель",description:"Отображать номера недель в представлениях календаря"},showTodayHighlight:{name:"Показать выделение сегодня",description:"Выделять текущий день в представлениях календаря"},showCurrentTimeIndicator:{name:"Показать индикатор текущего времени",description:"Отображать линию, показывающую текущее время в представлениях временной линии"},selectionMirror:{name:"Зеркало выбора",description:"Показывать визуальный предварительный просмотр при перетаскивании для выбора временных диапазонов"},calendarLocale:{name:"Локаль календаря",description:'Локаль календаря для форматирования дат и календарной системы (например, "en", "fa" для фарси/персидского, "de" для немецкого). Оставьте пустым для автоопределения из браузера.',placeholder:"Автоопределение",invalidLocale:"Недопустимая локаль. Пожалуйста, введите корректный языковой тег (например, 'ru', 'en', 'fr-FR')."}},defaultEventVisibility:{header:"Видимость событий по умолчанию",description:"Настройте, какие типы событий видимы по умолчанию при открытии календаря. Пользователи все еще могут переключать их в представлении календаря.",showScheduledTasks:{name:"Показать запланированные задачи",description:"Отображать задачи с запланированными датами по умолчанию"},showDueDates:{name:"Показать сроки выполнения",description:"Отображать сроки выполнения задач по умолчанию"},showDueWhenScheduled:{name:"Показать сроки выполнения для запланированных",description:"Отображать сроки выполнения даже для задач, которые уже имеют запланированные даты"},showTimeEntries:{name:"Показать записи времени",description:"Отображать завершенные записи отслеживания времени по умолчанию"},showRecurringTasks:{name:"Показать повторяющиеся задачи",description:"Отображать экземпляры повторяющихся задач по умолчанию"},showICSEvents:{name:"Показать события ICS",description:"Отображать события из подписок ICS по умолчанию"}},timeSettings:{header:"Настройки времени",description:"Настройте связанные со временем параметры отображения для представлений временной линии.",timeSlotDuration:{name:"Длительность временного слота",description:"Длительность каждого временного слота в представлениях временной линии",options:{fifteenMinutes:"15 минут",thirtyMinutes:"30 минут",sixtyMinutes:"60 минут"}},startTime:{name:"Время начала",description:"Самое раннее время, показываемое в представлениях временной линии (формат ЧЧ:ММ)",placeholder:"06:00"},endTime:{name:"Время окончания",description:"Самое позднее время, отображаемое в представлениях временной шкалы (формат HH:MM). Используйте значения выше 24:00, чтобы показать ранние часы следующего дня, например 26:00 для 2:00.",placeholder:"26:00"},initialScrollTime:{name:"Начальное время прокрутки",description:"Время для прокрутки при открытии представлений временной линии (формат ЧЧ:ММ)",placeholder:"09:00"},eventMinHeight:{name:"Минимальная высота события",description:"Минимальная высота событий в представлениях временной шкалы (в пикселях)",placeholder:"15"}},uiElements:{header:"Элементы интерфейса",description:"Настройте отображение различных элементов интерфейса.",showTrackedTasksInStatusBar:{name:"Показать отслеживаемые задачи в строке состояния",description:"Отображать текущие отслеживаемые задачи в строке состояния Obsidian"},showProjectSubtasksWidget:{name:"Показать виджет подзадач проекта",description:"Отображать виджет, показывающий подзадачи для текущей заметки проекта"},projectSubtasksPosition:{name:"Позиция подзадач проекта",description:"Где разместить виджет подзадач проекта",options:{top:"Верх заметки",bottom:"Низ заметки"}},showRelationshipsWidget:{name:"Показать виджет связей",description:"Отображать виджет, показывающий все связи текущей заметки (подзадачи, проекты, зависимости)"},relationshipsPosition:{name:"Позиция связей",description:"Где расположить виджет связей",options:{top:"Вверху заметки",bottom:"Внизу заметки"}},showTaskCardInNote:{name:"Показывать карточку задачи в заметке",description:"Отображать виджет карточки задачи в верхней части заметок задач с деталями и действиями задачи"},showCompletedTaskStrikethrough:{name:"Зачеркивать заголовки выполненных задач",description:"Зачеркивает заголовки карточек выполненных задач. Отключите, чтобы выполненные задачи было легче читать"},showExpandableSubtasks:{name:"Показать раскрываемые подзадачи",description:"Разрешить раскрытие/свертывание разделов подзадач в карточках задач"},expandSubtasksByDefault:{name:"Раскрывать подзадачи по умолчанию",description:"Показывать подзадачи проекта раскрытыми при отображении карточек задач"},subtaskChevronPosition:{name:"Позиция шеврона подзадач",description:"Позиция шевронов раскрытия/свертывания в карточках задач",options:{left:"Левая сторона",right:"Правая сторона"}},viewsButtonAlignment:{name:"Выравнивание кнопки представлений",description:"Выравнивание кнопки представлений/фильтров в интерфейсе задач",options:{left:"Левая сторона",right:"Правая сторона"}}},projectAutosuggest:{header:"Автопредложения проектов",description:"Настройте отображение предложений проектов при создании задач.",requiredTags:{name:"Обязательные теги",description:"Показывать только заметки с любым из этих тегов (через запятую). Оставьте пустым для показа всех заметок.",placeholder:"проект, активный, важный"},includeFolders:{name:"Включить папки",description:"Показывать только заметки в этих папках (пути через запятую). Оставьте пустым для показа всех папок.",placeholder:"Проекты/, Работа/Активные, Личное"},requiredPropertyKey:{name:"Обязательный ключ свойства",description:"Показывать только заметки, где это свойство frontmatter соответствует значению ниже. Оставьте пустым для игнорирования.",placeholder:"тип"},requiredPropertyValue:{name:"Обязательное значение свойства",description:"Только заметки, где свойство равно этому значению, предлагаются. Оставьте пустым для требования существования свойства.",placeholder:"проект"},customizeDisplay:{name:"Настроить отображение предложений",description:"Показать дополнительные опции для настройки отображения предложений проектов и информации, которую они отображают."},enableFuzzyMatching:{name:"Включить нечеткое сопоставление",description:"Разрешить опечатки и частичные совпадения в поиске проектов. Может быть медленнее в больших хранилищах."},displayRowsHelp:"Настройте до 3 строк информации для отображения для каждого предложения проекта.",displayRows:{row1:{name:"Строка 1",description:"Формат: {свойство|флаги}. Свойства: title, aliases, file.path, file.parent. Флаги: n(Метка) показывает метку, s делает поисковым. Пример: {title|n(Название)|s}",placeholder:"{title|n(Название)}"},row2:{name:"Строка 2 (опционально)",description:"Общие шаблоны: {aliases|n(Псевдонимы)}, {file.parent|n(Папка)}, literal:Пользовательский текст",placeholder:"{aliases|n(Псевдонимы)}"},row3:{name:"Строка 3 (опционально)",description:"Дополнительная информация, такая как {file.path|n(Путь)} или пользовательские поля frontmatter",placeholder:"{file.path|n(Путь)}"}},quickReference:{header:"Быстрая справка",properties:"Доступные свойства: title, aliases, file.path, file.parent или любое поле frontmatter",labels:'Добавить метки: {title|n(Название)} → "Название: Мой проект"',searchable:"Сделать поисковым: {description|s} включает описание в + поиск",staticText:"Статический текст: literal:Моя пользовательская метка",alwaysSearchable:"Имя файла, название и псевдонимы всегда поисковы по умолчанию."}},dataStorage:{name:"Место хранения",description:"Где хранить историю сессий помодоро",pluginData:"Данные плагина (рекомендуется)",dailyNotes:"Ежедневные заметки",notices:{locationChanged:"Место хранения помодоро изменено на {location}"}},notifications:{description:"Настройте уведомления о напоминаниях задач и оповещения."},performance:{description:"Настройте производительность плагина и поведенческие опции."},timeTrackingSection:{description:"Настройте автоматическое поведение отслеживания времени."},recurringSection:{description:"Настройте поведение для управления повторяющимися задачами."}},integrations:{mobileCalendar:{disable:{name:"Отключить интеграции календаря на мобильных устройствах",description:"Не загружать календари Google, Microsoft и ICS в Obsidian Mobile. Интеграции календаря на компьютере не меняются."},status:{name:"Интеграции календаря отключены на этом мобильном устройстве",description:"Выключите эту настройку и перезагрузите Obsidian Mobile, чтобы снова загружать календари."}},basesIntegration:{header:"Интеграция с Bases",description:"Настройте интеграцию с плагином Obsidian Bases. Это экспериментальная функция, которая в настоящее время опирается на недокументированные API Obsidian. Поведение может измениться или сломаться.",enable:{name:"Включить интеграцию с Bases",description:"Включить использование представлений TaskNotes в плагине Obsidian Bases. Плагин Bases должен быть включен для работы."},viewCommands:{header:"Представления и файлы Base",description:"TaskNotes использует файлы Obsidian Bases (.base) для своих представлений. Эти файлы автоматически создаются при запуске, если они не существуют, и настраиваются с учётом ваших текущих параметров (идентификация задач, сопоставление полей, статусы и т.д.).",descriptionRegen:"Base-файлы не обновляются автоматически при изменении настроек. Чтобы применить новые настройки, используйте «Обновить файлы» ниже, удалите существующие .base-файлы и перезапустите Obsidian или отредактируйте их вручную.",docsLink:"Просмотреть документацию по доступным формулам и параметрам настройки",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"Открыть мини-календарь",kanban:"Открыть представление kanban",tasks:"Открыть представление задач",advancedCalendar:"Открыть расширенный календарь",agenda:"Открыть повестку дня",relationships:"Виджет связей",pomodoroStats:"Base статистики Pomodoro"},fileLabel:"Файл: {path}",resetButton:"Сбросить",resetTooltip:"Сбросить к пути по умолчанию",pomodoroDailyNotesHint:"Сгенерированная Base статистики Pomodoro читает историю Pomodoro из ежедневных заметок. Если история всё ещё хранится в данных плагина, перенесите её в настройках перед использованием этого Base-файла."},autoCreateDefaultFiles:{name:"Автоматически создавать файлы по умолчанию",description:"Автоматически создавать отсутствующие стандартные Base файлы при запуске. Отключите, чтобы предотвратить повторное создание удалённых примеров файлов."},createDefaultFiles:{name:"Создать файлы по умолчанию",description:"Создайте стандартные .base файлы в директории TaskNotes/Views/. Существующие файлы не будут перезаписаны.",buttonText:"Создать файлы"},exportV3Views:{name:"Экспортировать сохранённые представления V3 в Bases",description:"Преобразуйте все ваши сохранённые представления из TaskNotes v3 в один .base файл с несколькими представлениями. Это помогает перенести ваши настройки фильтров v3 в новую систему Bases.",buttonText:"Экспортировать представления V3",noViews:"Нет сохранённых представлений для экспорта",fileExists:"Файл уже существует",confirmOverwrite:'Файл с именем "{fileName}" уже существует. Перезаписать?',success:"Экспортировано {count} сохранённых представлений в {filePath}",error:"Не удалось экспортировать представления: {message}"},notices:{enabled:"Интеграция с Bases включена. Пожалуйста, перезапустите Obsidian для завершения настройки.",disabled:"Интеграция с Bases отключена. Пожалуйста, перезапустите Obsidian для завершения удаления."},updateDefaultFiles:{name:"Обновить файлы по умолчанию",description:"Перезаписать настроенные файлы .base по умолчанию шаблонами, созданными из текущих настроек TaskNotes.",buttonText:"Обновить файлы",confirmTitle:"Обновить Base-файлы по умолчанию",confirmMessage:"Это перезапишет настроенные файлы .base по умолчанию заново созданными шаблонами. Любые ручные изменения в этих файлах будут заменены.",confirmText:"Обновить файлы"}},calendarSubscriptions:{header:"Подписки на календари",description:"Подпишитесь на внешние календари через URL ICS/iCal для просмотра событий вместе с задачами.",defaultNoteTemplate:{name:"Шаблон заметки по умолчанию",description:"Путь к файлу шаблона для заметок, созданных из событий ICS",placeholder:"Шаблоны/Шаблон события.md"},defaultNoteFolder:{name:"Папка заметок по умолчанию",description:"Папка для заметок, созданных из событий ICS",placeholder:"Календарь/События"},filenameFormat:{name:"Формат имени файла заметки ICS",description:"Как генерируются имена файлов для заметок, созданных из событий ICS",options:{title:"Название события",zettel:"Формат Zettelkasten",timestamp:"Временная метка",custom:"Пользовательский шаблон"}},customTemplate:{name:"Пользовательский шаблон имени файла ICS",description:"Шаблон для пользовательских имен файлов событий ICS",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"Использовать время окончания события ICS как срок выполнения",description:"При включении задачи, созданные из событий календаря, будут иметь срок выполнения, установленный на время окончания события. Для событий на весь день срок выполнения будет установлен на дату события. Для событий с указанным временем срок выполнения будет включать время окончания."},recurringEventRelatedNotesMode:{name:"Связанные заметки повторяющихся событий",description:"Выберите, будут ли заметки, связанные с одним повторением события внешнего календаря, отображаться для всей загруженной серии или только для выбранного экземпляра.",options:{series:"Вся серия",instance:"Только выбранный экземпляр"}}},subscriptionsList:{header:"Список подписок на календари",addSubscription:{name:"Добавить подписку на календарь",description:"Добавить новую подписку на календарь из URL ICS/iCal или локального файла",buttonText:"Добавить подписку"},refreshAll:{name:"Обновить все подписки",description:"Вручную обновить все включенные подписки на календари",buttonText:"Обновить все"},newCalendarName:"Новый календарь",emptyState:"Подписки на календари не настроены. Добавьте подписку для синхронизации внешних календарей.",notices:{addSuccess:"Новая подписка на календарь добавлена - пожалуйста, настройте детали",addFailure:"Не удалось добавить подписку",serviceUnavailable:"Сервис подписки ICS недоступен",refreshSuccess:"Все подписки на календари успешно обновлены",refreshFailure:"Не удалось обновить некоторые подписки на календари",updateFailure:"Не удалось обновить подписку",deleteSuccess:'Удалена подписка "{name}"',deleteFailure:"Не удалось удалить подписку",enableFirst:"Сначала включите подписку",refreshSubscriptionSuccess:'Обновлено "{name}"',refreshSubscriptionFailure:"Не удалось обновить подписку"},labels:{enabled:"Включено:",name:"Имя:",type:"Тип:",url:"URL:",filePath:"Путь к файлу:",color:"Цвет:",refreshMinutes:"Обновление (мин):"},typeOptions:{remote:"Удаленный URL",local:"Локальный файл"},placeholders:{calendarName:"Имя календаря",url:"URL ICS/iCal",filePath:"Путь к локальному файлу (например, Календарь.ics)",localFile:"Календарь.ics"},statusLabels:{enabled:"Включено",disabled:"Отключено",remote:"Удаленный",localFile:"Локальный файл",remoteCalendar:"Удаленный календарь",localFileCalendar:"Локальный файл",synced:"Синхронизировано {timeAgo}",error:"Ошибка"},actions:{refreshNow:"Обновить сейчас",deleteSubscription:"Удалить подписку"},refreshNow:"Обновить Now",confirmDelete:{title:"Удалить подписку",message:'Вы уверены, что хотите удалить подписку "{name}"? Это действие нельзя отменить.',confirmText:"Удалить"}},autoExport:{header:"Автоматический экспорт ICS",description:"Автоматически экспортировать все ваши задачи в файл ICS.",enable:{name:"Включить автоматический экспорт",description:"Автоматически поддерживать файл ICS обновленным со всеми вашими задачами"},filePath:{name:"Путь к файлу экспорта",description:"Путь, где будет сохранен файл ICS (относительно корня хранилища)",placeholder:"tasknotes-kalendar.ics"},interval:{name:"Интервал обновления (между 5 и 1440 минут)",description:"Как часто обновлять файл экспорта",placeholder:"60"},useDuration:{name:"Использовать длительность задачи для продолжительности события",description:"Когда включено, использует оценку времени (длительность) задачи вместо срока выполнения для времени окончания события календаря. Это полезно для рабочих процессов GTD, где запланировано + длительность представляет планирование работы, а срок выполнения представляет дедлайны."},exportNow:{name:"Экспортировать сейчас",description:"Вручную запустить немедленный экспорт",buttonText:"Экспортировать сейчас"},status:{title:"Статус экспорта:",lastExport:"Последний экспорт: {time}",nextExport:"Следующий экспорт: {time}",noExports:"Экспортов еще нет",notScheduled:"Не запланировано",notInitialized:"Сервис автоэкспорта не инициализирован - пожалуйста, перезапустите Obsidian",serviceNotInitialized:"Служба не инициализирована - пожалуйста, перезапустите Obsidian"},notices:{reloadRequired:"Пожалуйста, перезагрузите Obsidian для применения изменений автоматического экспорта.",exportSuccess:"Задачи успешно экспортированы",exportFailure:"Экспорт не удался - проверьте консоль для деталей",serviceUnavailable:"Сервис автоэкспорта недоступен"},excludeCompleted:{name:"Исключить завершённые задачи",description:"Если включено, завершённые задачи исключаются из ICS-экспорта. Завершённые статусы берутся из настроек статусов задач."},excludeArchived:{name:"Исключить архивированные задачи",description:"Если включено, архивированные задачи исключаются из ICS-экспорта."},requireDueDate:{name:"Требовать дату срока",description:"Если включено, в ICS-экспорт включаются только задачи с датой срока."},requireScheduledDate:{name:"Требовать запланированную дату",description:"Если включено, в ICS-экспорт включаются только задачи с запланированной датой."}},googleCalendarExport:{header:"Экспорт задач в Google Календарь",description:"Автоматически синхронизируйте ваши задачи с Google Календарём как события. Требуется подключение Google Календаря выше.",enable:{name:"Включить экспорт задач",description:"При включении задачи с датами будут автоматически синхронизироваться с Google Календарём как события."},targetCalendar:{name:"Целевой календарь",description:"Выберите, в каком календаре создавать события задач.",placeholder:"Выберите календарь...",connectFirst:"Сначала подключите Google Календарь",primarySuffix:" (Основной)"},syncTrigger:{name:"Триггер синхронизации",description:"Какая дата задачи должна вызывать создание события.",options:{scheduled:"Запланированная дата",due:"Срок выполнения",both:"Оба (предпочтение запланированной)"}},allDayEvents:{name:"Создавать как события на весь день",description:"При включении задачи создаются как события на весь день. При выключении используется оценка времени для длительности."},defaultDuration:{name:"Длительность события по умолчанию",description:"Длительность в минутах для событий с указанным временем (используется, когда у задачи нет оценки времени)."},eventTitleTemplate:{name:"Шаблон заголовка события",description:"Шаблон для заголовков событий. Доступные переменные: {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"Включить детали задачи в описание",description:"Добавить метаданные задачи (приоритет, статус, теги и т.д.) в описание события."},includeObsidianLink:{name:"Включить ссылку на Obsidian",description:"Добавить ссылку на задачу в Obsidian в описание события."},defaultReminder:{name:"Напоминание по умолчанию",description:"Добавьте всплывающие напоминания к событиям Google Calendar с заданным временем. Введите минуты до события через запятую. Оставьте пустым, чтобы использовать настройки календаря по умолчанию. Частые значения: 15, 30, 60, 1440."},automaticSyncBehavior:{header:"Поведение автоматической синхронизации"},syncOnCreate:{name:"Синхронизировать при создании задачи",description:"Автоматически создавать событие календаря при создании новой задачи."},syncOnUpdate:{name:"Синхронизировать при обновлении задачи",description:"Автоматически обновлять событие календаря при изменении задачи."},syncOnComplete:{name:"Синхронизировать при завершении задачи",description:"Обновлять событие календаря при завершении задачи (добавляет галочку к заголовку)."},syncOnDelete:{name:"Удалять событие при удалении задачи",description:"Удалять событие календаря при удалении соответствующей задачи."},manualSyncActions:{header:"Действия ручной синхронизации"},syncAllTasks:{name:"Синхронизировать все задачи",description:"Синхронизировать все существующие задачи с Google Календарём. Будут созданы события для задач, которые ещё не синхронизированы.",buttonText:"Синхронизировать все"},unlinkAllTasks:{name:"Отвязать все задачи",description:"Удалить все связи задача-событие без удаления событий календаря.",buttonText:"Отвязать все",confirmTitle:"Отвязать все задачи",confirmMessage:"Это удалит все связи между задачами и событиями календаря. События календаря останутся, но больше не будут обновляться при изменении задач. Вы уверены?",confirmButtonText:"Отвязать все"},notices:{notEnabled:"Экспорт в Google Календарь не включен. Настройте его в Настройки > Интеграции.",notEnabledOrConfigured:"Экспорт в Google Календарь не включен или не настроен",serviceNotAvailable:"Сервис синхронизации с календарём недоступен",syncResults:"Синхронизировано: {synced}, Ошибок: {failed}, Пропущено: {skipped}",taskSynced:"Задача синхронизирована с Google Календарём",noActiveFile:"Нет активного файла",notATask:"Текущий файл не является задачей",noDateToSync:"У задачи нет запланированной даты или срока для синхронизации",syncFailed:"Не удалось синхронизировать задачу с Google Календарём: {message}",connectionExpired:"Срок действия подключения к Google Календарю истёк. Подключитесь заново в разделе Настройки > Интеграции.",syncingTasks:"Синхронизация {total} задач с Google Календарём...",syncComplete:"Синхронизация завершена: {synced} синхронизировано, {failed} ошибок, {skipped} пропущено",eventsDeletedAndUnlinked:"Все события удалены и отвязаны",tasksUnlinked:"Все связи задач удалены"},eventDescription:{untitledTask:"Безымянная задача",priority:"Приоритет: {value}",status:"Статус: {value}",due:"Срок: {value}",scheduled:"Запланировано: {value}",timeEstimate:"Оценка времени: {value}",tags:"Теги: {value}",contexts:"Контексты: {value}",projects:"Проекты: {value}",openInObsidian:"Открыть в Obsidian"}},httpApi:{header:"HTTP API",description:"Включить HTTP API для внешних интеграций и автоматизации.",enable:{name:"Включить HTTP API",description:"Запустить локальный HTTP сервер для доступа к API"},port:{name:"Порт API",description:"Номер порта для сервера HTTP API",placeholder:"3000"},authToken:{name:"Токен аутентификации API",description:"Токен TaskNotes, а не API-ключ вашего поставщика ИИ. Чтобы создать токен, включите HTTP API, оставьте это поле пустым и перезапустите Obsidian. Затем скопируйте созданный токен в настройки Bearer-аутентификации клиента. Обновляйте настройки клиентов при каждом изменении токена.",placeholder:"ваш-секретный-токен"},mcp:{enable:{name:"Включить сервер MCP",description:"Предоставляет инструменты TaskNotes через Model Context Protocol на конечной точке /mcp. Требуется включённый HTTP API."}},endpoints:{header:"Доступные конечные точки API",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Веб-хуки",description:{overview:"Веб-хуки отправляют уведомления в реальном времени внешним сервисам при возникновении событий TaskNotes.",usage:"Настройте веб-хуки для интеграции с инструментами автоматизации, сервисами синхронизации или пользовательскими приложениями."},addWebhook:{name:"Добавить веб-хук",description:"Зарегистрировать новую конечную точку веб-хука",buttonText:"Добавить веб-хук"},emptyState:{message:"Веб-хуки не настроены. Добавьте веб-хук для получения уведомлений в реальном времени.",buttonText:"Добавить веб-хук"},labels:{active:"Активный:",url:"URL:",events:"События:",transform:"Преобразование:"},placeholders:{url:"URL веб-хука",noEventsSelected:"События не выбраны",rawPayload:"Сырые данные (без преобразования)"},statusLabels:{active:"Активный",inactive:"Неактивный",created:"Создан {timeAgo}"},actions:{editEvents:"Редактировать события",delete:"Удалить"},editEvents:"Редактировать события",notices:{urlUpdated:"URL веб-хука обновлен",enabled:"Веб-хук включен",disabled:"Веб-хук отключен",created:"Веб-хук успешно создан",deleted:"Веб-хук удален",updated:"Веб-хук обновлен"},confirmDelete:{title:"Удалить веб-хук",message:`Вы уверены, что хотите удалить этот веб-хук?
URL: {url}
Это действие нельзя отменить.`,confirmText:"Удалить"},cardHeader:"Веб-хук",cardFields:{active:"Активный:",url:"URL:",events:"События:",transform:"Преобразование:"},eventsDisplay:{noEvents:"События не выбраны"},transformDisplay:{noTransform:"Сырые данные (без преобразования)"},secretModal:{title:"Секрет веб-хука сгенерирован",description:"Ваш секрет веб-хука был сгенерирован. Сохраните этот секрет, так как вы больше не сможете его увидеть:",usage:"Используйте этот секрет для проверки данных веб-хука в вашем принимающем приложении.",gotIt:"Понятно"},editModal:{title:"Редактировать веб-хук",eventsHeader:"События для подписки"},events:{taskCreated:{label:"Задача создана",description:"При создании новых задач"},taskUpdated:{label:"Задача обновлена",description:"При изменении задач"},taskCompleted:{label:"Задача завершена",description:"При отметке задач как завершенных"},taskDeleted:{label:"Задача удалена",description:"При удалении задач"},taskArchived:{label:"Задача архивирована",description:"При архивировании задач"},taskUnarchived:{label:"Задача разархивирована",description:"При разархивировании задач"},timeStarted:{label:"Время начато",description:"При начале отслеживания времени"},timeStopped:{label:"Время остановлено",description:"При остановке отслеживания времени"},pomodoroStarted:{label:"Помодоро начато",description:"При начале сессий помодоро"},pomodoroCompleted:{label:"Помодоро завершено",description:"При завершении сессий помодоро"},pomodoroInterrupted:{label:"Помодоро прервано",description:"При остановке сессий помодоро"},recurringCompleted:{label:"Экземпляр повторения завершен",description:"При завершении экземпляров повторяющихся задач"},reminderTriggered:{label:"Напоминание сработало",description:"При активации напоминаний задач"}},modals:{secretGenerated:{title:"Секрет веб-хука сгенерирован",description:"Ваш секрет веб-хука был сгенерирован. Сохраните этот секрет, так как вы больше не сможете его увидеть:",usage:"Используйте этот секрет для проверки данных веб-хука в вашем принимающем приложении.",buttonText:"Понятно"},edit:{title:"Редактировать веб-хук",eventsSection:"События для подписки",transformSection:"Конфигурация преобразования (опционально)",headersSection:"Конфигурация заголовков",transformFile:{name:"Файл преобразования",description:"Путь к файлу шаблона .json в вашем хранилище, который преобразует данные веб-хука",placeholder:"simple-template.json"},customHeaders:{name:"Включить пользовательские заголовки",description:"Включить заголовки TaskNotes (тип события, подпись, ID доставки). Отключите для Discord, Slack и других сервисов со строгими политиками CORS."},buttons:{cancel:"Отмена",save:"Сохранить изменения"},notices:{selectAtLeastOneEvent:"Пожалуйста, выберите хотя бы одно событие"}},add:{title:"Добавить веб-хук",eventsSection:"События для подписки",transformSection:"Конфигурация преобразования (опционально)",headersSection:"Конфигурация заголовков",url:{name:"URL веб-хука",description:"Конечная точка, куда будут отправляться данные веб-хука",placeholder:"https://your-service.com/webhook"},transformFile:{name:"Файл преобразования",description:"Путь к файлу шаблона .json в вашем хранилище, который преобразует данные веб-хука",placeholder:"simple-template.json"},customHeaders:{name:"Включить пользовательские заголовки",description:"Включить заголовки TaskNotes (тип события, подпись, ID доставки). Отключите для Discord, Slack и других сервисов со строгими политиками CORS."},transformHelp:{title:"Шаблоны преобразования JSON позволяют настроить данные веб-хука:",jsFiles:"",jsDescription:"",jsonFiles:"Файлы .json:",jsonDescription:" Шаблоны с ",jsonVariable:"${data.task.title}",leaveEmpty:"Оставьте пустым:",leaveEmptyDescription:" Отправить сырые данные",example:"Пример:",exampleFile:"simple-template.json"},buttons:{cancel:"Отмена",add:"Добавить веб-хук"},notices:{urlRequired:"URL веб-хука обязателен",selectAtLeastOneEvent:"Пожалуйста, выберите хотя бы одно событие"}}}},otherIntegrations:{header:"Интеграции с другими плагинами",description:"Настройте интеграции с другими плагинами Obsidian."},mdbaseSpec:{header:"Определения типов mdbase",learnMore:"Подробнее о mdbase-spec",enable:{name:"Создавать определения типов mdbase",description:"Создаёт и поддерживает файлы типов mdbase (mdbase.yaml и _types/task.md) в корне хранилища при изменении настроек."}},timeFormats:{justNow:"Только что",minutesAgo:"{minutes} минут{plural} назад",hoursAgo:"{hours} час{plural} назад",daysAgo:"{days} дн{plural} назад"}}},notices:{languageChanged:"Язык изменен на {language}.",releaseAvailable:{message:"Доступен TaskNotes {version}.",action:"Открыть в плагинах сообщества"},exportTasksFailed:"Не удалось экспортировать задачи как файл ICS",icsNoteCreatedSuccess:"Заметка успешно создана",icsCreationModalOpenFailed:"Не удалось открыть модальное окно создания",icsNoteLinkSuccess:'Заметка "{fileName}" связана с событием ICS',icsTaskCreatedSuccess:"Задача создана: {title}",icsRelatedItemsRefreshed:"Связанные заметки обновлены",icsFileNotFound:"Файл не найден или недействителен",icsFileOpenFailed:"Не удалось открыть файл",timeblockAttachmentExists:'"{fileName}" уже прикреплен',timeblockAttachmentAdded:'"{fileName}" добавлен как вложение',timeblockAttachmentRemoved:'Удалитьd "{fileName}" from attachments',timeblockFileTypeNotSupported:'Невозможно открыть "{fileName}" - тип файла не поддерживается',timeblockTitleRequired:"Пожалуйста, введите название для временного блока",timeblockUpdatedSuccess:'Временной блок "{title}" успешно обновлен',timeblockUpdateFailed:"Не удалось обновить временной блок. Проверьте консоль для получения подробностей.",timeblockDeletedSuccess:'Временной блок "{title}" успешно удален',timeblockDeleteFailed:"Не удалось удалить временной блок. Проверьте консоль для получения подробностей.",timeblockRequiredFieldsMissing:"Пожалуйста, заполните все обязательные поля",agendaLoadingFailed:"Ошибка загрузки повестки дня. Попробуйте обновить.",statsLoadingFailed:"Ошибка загрузки данных проекта."},commands:{openCalendarView:"Открыть представление мини-календаря",openAdvancedCalendarView:"Открыть представление календаря",openTasksView:"Открыть представление задач",openNotesView:"Открыть представление заметок",openAgendaView:"Открыть представление планов",openPomodoroView:"Открыть таймер помодоро",openKanbanView:"Открыть доску канбан",updateDefaultBaseFiles:"Обновить файлы Base по умолчанию",openPomodoroStats:"Открыть статистику помодоро",openStatisticsView:"Открыть статистику задач и проектов",createNewTask:"Создать новую задачу",convertCurrentNoteToTask:{name:"Преобразовать текущую заметку в задачу",noActiveFile:"Нет активного файла для преобразования",alreadyTask:"Эта заметка уже является задачей",success:"'{title}' преобразовано в задачу"},convertToTaskNote:"Преобразовать чекбокс-задачу в TaskNote",convertAllTasksInNote:"Преобразовать все задачи в заметке",insertTaskNoteLink:"Вставить ссылку на задачу",createInlineTask:"Создать новую встроенную задачу",quickActionsCurrentTask:"Быстрые действия для текущей задачи",goToTodayNote:"Перейти к заметке сегодня",startPomodoro:"Запустить таймер помодоро",stopPomodoro:"Остановить таймер помодоро",pauseResumePomodoro:"Приостановить/возобновить таймер помодоро",refreshCache:"Обновить кэш",exportAllTasksIcs:"Экспортировать все задачи как файл ICS",viewReleaseNotes:"Посмотреть примечания к выпуску",startTimeTrackingCurrentTask:"Начать отслеживание времени для текущей задачи",stopTimeTrackingCurrentTask:"Остановить отслеживание времени для текущей задачи",startTimeTrackingWithSelector:"Начать отслеживание времени (выбрать задачу)",editTimeEntries:"Редактировать временные записи (выбрать задачу)",createOrOpenTask:"Создать или открыть задачу",createOrOpenTaskWithTracking:"Создать или открыть задачу и начать отслеживание времени",rolloverOverdueScheduledTasks:"Перенести просроченные запланированные задачи на сегодня",syncAllTasksGoogleCalendar:"Синхронизировать все задачи с Google Календарём",syncCurrentTaskGoogleCalendar:"Синхронизировать текущую задачу с Google Календарём",quickActionsTaskUnderCursor:"Быстрые действия для задачи под курсором",editCurrentTask:"Редактировать текущую задачу",cycleCurrentTaskStatus:"Переключить статус текущей задачи",cycleCurrentTaskPriority:"Переключить приоритет текущей задачи",addProjectToCurrentTask:"Добавить проект к текущей задаче",addSubtaskToCurrentNote:"Добавить подзадачу к текущей заметке"},modals:{deviceCode:{title:"Авторизация Google Календаря",instructions:{intro:"Чтобы подключить Google Календарь, выполните следующие шаги:"},steps:{open:"Открыть",inBrowser:"в вашем браузере",enterCode:"Введите этот код при запросе:",signIn:"Войдите в свой аккаунт Google и предоставьте доступ",returnToObsidian:"Вернитесь в Obsidian (это окно закроется автоматически)"},codeLabel:"Ваш код:",copyCodeAriaLabel:"Скопировать код",waitingForAuthorization:"Ожидание авторизации...",openBrowserButton:"Открыть Browser",cancelButton:"Отмена",expiresMinutesSeconds:"Код истекает через {minutes}м {seconds}с",expiresSeconds:"Код истекает через {seconds}с"},icsEventInfo:{calendarEventHeading:"Календарь Event",titleLabel:"Название",calendarLabel:"Календарь",dateTimeLabel:"Дата & Time",locationLabel:"Местоположение",descriptionLabel:"Описание",urlLabel:"URL",relatedNotesHeading:"Связанные заметки и задачи",noRelatedItems:"Для этого события не найдено связанных заметок или задач.",typeTask:"Задача",typeNote:"Заметка",actionsHeading:"Действия",createFromEventLabel:"Создать from Event",createFromEventDesc:"Создать a new note or task from this calendar event",linkExistingLabel:"Связать существующую",linkExistingDesc:"Связать существующую заметку с этим событием календаря"},timeblockInfo:{editHeading:"Редактировать временной блок",dateTimeLabel:"Дата & Time: ",titleLabel:"Название",titleDesc:"Название for your timeblock",titlePlaceholder:"например, Сессия глубокой работы",descriptionLabel:"Описание",descriptionDesc:"Необязательное описание для временного блока",descriptionPlaceholder:"Сосредоточиться на новых функциях, без прерываний",colorLabel:"Цвет",colorDesc:"Необязательный цвет для временного блока",colorPlaceholder:"#3b82f6",attachmentsLabel:"Вложения",attachmentsDesc:"Файлы или заметки, связанные с этим временным блоком",addAttachmentButton:"Добавить вложение",addAttachmentTooltip:"Выберите файл или заметку с помощью нечеткого поиска",deleteButton:"Удалить временной блок",saveButton:"Сохранить изменения",deleteConfirmationTitle:"Удалить временной блок"},timeblockCreation:{heading:"Создать timeblock",dateLabel:"Дата: ",titleLabel:"Название",titleDesc:"Название for your timeblock",titlePlaceholder:"например, Сессия глубокой работы",startTimeLabel:"Начало time",startTimeDesc:"Когда начинается временной блок",startTimePlaceholder:"09:00",endTimeLabel:"Конец time",endTimeDesc:"Когда заканчивается временной блок",endTimePlaceholder:"11:00",descriptionLabel:"Описание",descriptionDesc:"Необязательное описание для временного блока",descriptionPlaceholder:"Сосредоточиться на новых функциях, без прерываний",colorLabel:"Цвет",colorDesc:"Необязательный цвет для временного блока",colorPlaceholder:"#3b82f6",attachmentsLabel:"Вложения",attachmentsDesc:"Файлы или заметки для связи с этим временным блоком",addAttachmentButton:"Добавить вложение",addAttachmentTooltip:"Выберите файл или заметку с помощью нечеткого поиска",createButton:"Создать timeblock"},calendarEventCreation:{heading:"Создать событие в календаре",dateTimeLabel:"Дата и время: ",titleLabel:"Название",titleDesc:"Название события в календаре",titlePlaceholder:"напр., Совещание команды",calendarLabel:"Календарь",calendarDesc:"В каком календаре создать событие",descriptionLabel:"Описание",descriptionDesc:"Необязательное описание события",descriptionPlaceholder:"Добавить подробности о событии...",locationLabel:"Место",locationDesc:"Необязательное место проведения события",locationPlaceholder:"напр., Переговорная А",createButton:"Создать событие",titleRequired:"Необходимо указать название события",noCalendarSelected:"Календарь не выбран",success:'Событие "{title}" создано в календаре',error:"Не удалось создать событие в календаре: {message}"},icsNoteCreation:{heading:"Создать from ICS Event",titleLabel:"Название",titleDesc:"Название for the new content",folderLabel:"Папка",folderDesc:"Папка назначения (оставьте пустым для корня хранилища)",folderPlaceholder:"папка/подпапка",createButton:"Создать",startLabel:"Начало: ",endLabel:"Конец: ",locationLabel:"Местоположение: ",calendarLabel:"Календарь: ",useTemplateLabel:"Использовать шаблон",useTemplateDesc:"Применить шаблон при создании содержимого",templatePathLabel:"Путь к шаблону",templatePathDesc:"Путь к файлу шаблона",templatePathPlaceholder:"шаблоны/шаблон-заметки-ics.md"},unscheduledTasksSelector:{title:"Незапланированные задачи",placeholder:"Введите для поиска незапланированных задач...",instructions:{navigate:"для навигации",schedule:"для планирования",dismiss:"для отмены"}},migration:{title:"Перейти на новую систему повторений",description:"TaskNotes теперь использует стандартные шаблоны RRULE для повторений, что позволяет создавать более сложные расписания и обеспечивает лучшую совместимость с другими приложениями.",tasksFound:"Обнаружено {count} задач(и) со старыми шаблонами повторений",noMigrationNeeded:"Задачи не требуют миграции",warnings:{title:"Перед началом:",backup:"Создайте резервную копию хранилища перед миграцией",conversion:"Старые шаблоны повторений будут преобразованы в новый формат",normalUsage:"Вы можете продолжать использовать TaskNotes обычным образом во время миграции",permanent:"Это изменение является постоянным и не может быть автоматически отменено"},benefits:{title:"Преимущества новой системы:",powerfulPatterns:"Сложные шаблоны повторений (например, 'каждый 2-й вторник')",performance:"Лучшая производительность с повторяющимися задачами",compatibility:"Стандартный формат повторений, совместимый с другими приложениями",nlp:"Расширенная поддержка обработки естественного языка"},progress:{title:"Прогресс миграции",preparing:"Подготовка миграции...",completed:"Миграция успешно завершена",failed:"Миграция не удалась"},buttons:{migrate:"Начать миграцию",completed:"Закрыть"},errors:{title:"Ошибки во время миграции:"},notices:{completedWithErrors:"Миграция завершена с некоторыми ошибками. Проверьте список ошибок выше.",success:"Все задачи успешно мигрированы!",failed:"Миграция не удалась. Please check the console for details."},prompt:{message:"ЗадачаNotes detected tasks using the old recurrence format. Would you like to migrate them to the new system now?",migrateNow:"Мигрировать сейчас",remindLater:"Напомнить позже"}},task:{titlePlaceholder:"Что нужно сделать?",titleLabel:"Название",titleDetailedPlaceholder:"Название задачи...",detailsLabel:"Детали",detailsPlaceholder:"Добавить больше деталей...",projectsLabel:"Проекты",projectsAdd:"Добавить проект",projectsTooltip:"Выберите заметку проекта, используя нечеткий поиск",projectsRemoveTooltip:"Удалить проект",contextsLabel:"Контексты",contextsPlaceholder:"контекст1, контекст2",tagsLabel:"Теги",tagsPlaceholder:"тег1, тег2",timeEstimateLabel:"Оценка времени (минуты)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"Несохранённые изменения",message:"У вас есть несохранённые изменения. Хотите сохранить их?",save:"Сохранить изменения",discard:"Отменить изменения",cancel:"Продолжить редактирование"},dependencies:{blockedBy:"Заблокирована",blocking:"Блокирует",placeholder:"[[Задача]]",addTaskButton:"Добавить задачу",selectTaskTooltip:"Выберите заметку задачи с помощью нечеткого поиска",removeTaskTooltip:"Удалить задачу"},organization:{projects:"Проекты",subtasks:"Подзадачи",addToProject:"Добавить в проект",addToProjectButton:"Добавить в проект",addSubtasks:"Добавить подзадачи",addSubtasksButton:"Добавить подзадачу",addSubtasksTooltip:"Выберите задачи, чтобы сделать их подзадачами этой задачи",removeSubtaskTooltip:"Удалить подзадачу",notices:{noEligibleSubtasks:"Нет доступных задач для назначения в качестве подзадач",subtaskSelectFailed:"Не удалось открыть селектор подзадач"}},customFieldsLabel:"Пользовательские поля",actions:{due:"Установить срок выполнения",scheduled:"Установить запланированную дату",status:"Установить статус",priority:"Установить приоритет",recurrence:"Установить повторение",reminders:"Установить напоминания"},buttons:{openNote:"Открыть заметку",save:"Сохранить"},tooltips:{dueValue:"Срок: {value}",scheduledValue:"Запланировано: {value}",statusValue:"Статус: {value}",priorityValue:"Приоритет: {value}",recurrenceValue:"Повторение: {value}",remindersSingle:"1 напоминание установлено",remindersPlural:"{count} напоминаний установлено"},dateMenu:{dueTitle:"Установить срок выполнения",scheduledTitle:"Установить запланированную дату"},userFields:{textPlaceholder:"Введите {field}...",numberPlaceholder:"0",datePlaceholder:"ГГГГ-ММ-ДД",listPlaceholder:"элемент1, элемент2, элемент3",pickDate:"Выбрать дату {field}"},recurrence:{daily:"Ежедневно",weekly:"Еженедельно",everyTwoWeeks:"Каждые 2 недели",weekdays:"Рабочие дни",weeklyOn:"Еженедельно в {days}",monthly:"Ежемесячно",everyThreeMonths:"Каждые 3 месяца",monthlyOnOrdinal:"Ежемесячно в {ordinal}",monthlyByWeekday:"Ежемесячно (по дню недели)",yearly:"Ежегодно",yearlyOn:"Ежегодно {month} {day}",custom:"Пользовательское",countSuffix:"{count} раз",untilSuffix:"до {date}",ordinal:"{number}{suffix}"}},taskSelector:{title:"Выбрать задачу",placeholder:"Начните вводить для поиска задач...",instructions:{navigate:"для навигации",select:"для выбора",dismiss:"для отмены"},notices:{noteNotFound:'Не удалось найти заметку "{name}"'},dueDate:{overdue:"Срок: {date} (просрочено)",today:"Срок: Сегодня"}},taskSelectorWithCreate:{title:"Создать или открыть задачу",placeholder:"Поиск задач или введите для создания новой...",instructions:{create:"чтобы создать новую задачу"},footer:{createLabel:" для создания: "},notices:{emptyQuery:"Пожалуйста, введите описание задачи",invalidTitle:"Не удалось распознать допустимое название задачи"}},taskCreation:{title:"Создать задачу",actions:{fillFromNaturalLanguage:"Заполнить форму из естественного языка",hideDetailedOptions:"Скрыть подробные опции",showDetailedOptions:"Показать подробные опции"},nlPlaceholder:"Купить продукты завтра в 15:00 @дом #поручения",notices:{titleRequired:"Пожалуйста, введите название задачи",success:'Задача "{title}" успешно создана',successShortened:'Задача "{title}" успешно создана (имя файла сокращено из-за длины)',failure:"Не удалось создать задачу: {message}",blockingUnresolved:"Не удалось определить: {entries}",openCreatedTaskFailure:"Задача создана, но заметку задачи не удалось открыть."}},taskEdit:{title:"Редактировать задачу",sections:{completions:"Завершения",taskInfo:"Информация о задаче"},metadata:{totalTrackedTime:"Общее отслеженное время:",due:"Срок:",scheduled:"Запланировано:",created:"Создано:",modified:"Изменено:",file:"Файл:"},buttons:{archive:"Архивировать",unarchive:"Разархивировать"},notices:{titleRequired:"Пожалуйста, введите название задачи",noChanges:"Нет изменений для сохранения",updateSuccess:'Задача "{title}" успешно обновлена',updateFailure:"Не удалось обновить задачу: {message}",dependenciesUpdateSuccess:"Зависимости обновлены",blockingUnresolved:"Не удалось определить: {entries}",fileMissing:"Не удалось найти файл задачи: {path}",openNoteFailure:"Не удалось открыть заметку задачи",archiveSuccess:"Задача {action} успешно",archiveFailure:"Не удалось архивировать задачу",deleteSuccess:'Задача "{title}" успешно удалена',deleteFailure:"Не удалось удалить задачу: {message}"},archiveAction:{archived:"архивирована",unarchived:"разархивирована"},deleteConfirmation:{title:"Удалить задачу",message:'Вы уверены, что хотите удалить "{title}"? Заметка задачи будет перемещена в корзину Obsidian.',confirm:"Удалить задачу"}},storageLocation:{title:{migrate:"Мигрировать данные помодоро?",switch:"Переключиться на хранение в ежедневных заметках?"},message:{migrate:"Это перенесет ваши существующие данные сессий помодоро в frontmatter ежедневных заметок. Данные будут сгруппированы по дате и сохранены в каждой ежедневной заметке.",switch:"Данные сессий помодоро будут храниться в frontmatter ежедневных заметок вместо файла данных плагина."},whatThisMeans:"Что это означает:",bullets:{dailyNotesRequired:"Ежедневные заметки должны быть включены в основном плагине ежедневных заметок или в Periodic Notes",storedInNotes:"Данные будут храниться в frontmatter ваших ежедневных заметок",migrateData:"Существующие данные плагина будут перенесены и затем очищены",futureSessions:"Будущие сессии будут сохраняться в ежедневные заметки",dataLongevity:"Это обеспечивает лучшую долговечность данных с вашими заметками"},finalNote:{migrate:"⚠️ Убедитесь, что у вас есть резервные копии при необходимости. Это изменение нельзя автоматически отменить.",switch:"Вы можете переключиться обратно на хранение в плагине в любое время в будущем."},buttons:{migrate:"Мигрировать данные",switch:"Переключить хранилище"}},dueDate:{title:"Установить срок выполнения",taskLabel:"Задача: {title}",sections:{dateTime:"Дата и время выполнения",quickOptions:"Быстрые опции"},descriptions:{dateTime:"Установить когда эта задача должна быть выполнена"},inputs:{date:{ariaLabel:"Дата выполнения задачи",placeholder:"ГГГГ-ММ-ДД"},time:{ariaLabel:"Время выполнения задачи (необязательно)",placeholder:"ЧЧ:ММ"}},quickOptions:{today:"Сегодня",todayAriaLabel:"Установить срок выполнения на сегодня",tomorrow:"Завтра",tomorrowAriaLabel:"Установить срок выполнения на завтра",nextWeek:"Следующая неделя",nextWeekAriaLabel:"Установить срок выполнения на следующую неделю",now:"Сейчас",nowAriaLabel:"Установить дату и время выполнения на сейчас",clear:"Очистить",clearAriaLabel:"Очистить срок выполнения"},errors:{invalidDateTime:"Пожалуйста, введите корректный формат даты и времени",updateFailed:"Не удалось обновить срок выполнения. Попробуйте снова."}},scheduledDate:{title:"Установить запланированную дату",taskLabel:"Задача: {title}",sections:{dateTime:"Запланированная дата и время",quickOptions:"Быстрые опции"},descriptions:{dateTime:"Установить когда вы планируете работать над этой задачей"},inputs:{date:{ariaLabel:"Запланированная дата задачи",placeholder:"ГГГГ-ММ-ДД"},time:{ariaLabel:"Запланированное время задачи (необязательно)",placeholder:"ЧЧ:ММ"}},quickOptions:{today:"Сегодня",todayAriaLabel:"Установить запланированную дату на сегодня",tomorrow:"Завтра",tomorrowAriaLabel:"Установить запланированную дату на завтра",nextWeek:"Следующая неделя",nextWeekAriaLabel:"Установить запланированную дату на следующую неделю",now:"Сейчас",nowAriaLabel:"Установить запланированную дату и время на сейчас",clear:"Очистить",clearAriaLabel:"Очистить запланированную дату"},errors:{invalidDateTime:"Пожалуйста, введите корректный формат даты и времени",updateFailed:"Не удалось обновить запланированную дату. Попробуйте снова."}},timeEntryEditor:{title:"Временные записи - {taskTitle}",addEntry:"Добавить временную запись",noEntries:"Пока нет временных записей",deleteEntry:"Удалить запись",startTime:"Время начала",endTime:"Время окончания (оставьте пустым, если еще выполняется)",duration:"Длительность (минуты)",durationDesc:"Переопределить рассчитанную длительность",durationPlaceholder:"Введите длительность в минутах",description:"Описание",descriptionPlaceholder:"Над чем вы работали?",calculatedDuration:"Рассчитано: {minutes} минут",totalTime:"{hours}ч {minutes}м всего",totalMinutes:"{minutes}м всего",saved:"Временные записи сохранены",saveFailed:"Не удалось сохранить временные записи",openFailed:"Не удалось открыть редактор временных записей",noTasksWithEntries:"Нет задач с временными записями для редактирования",validation:{missingStartTime:"Требуется время начала",endBeforeStart:"Время окончания должно быть после времени начала"}},timeTracking:{noTasksAvailable:"Нет доступных задач для отслеживания времени",started:"Начато отслеживание времени для: {taskTitle}",startFailed:"Не удалось начать отслеживание времени"},timeEntry:{mustHaveSpecificTime:"Временные записи должны иметь конкретное время. Пожалуйста, выберите временной диапазон в недельном или дневном представлении.",noTasksAvailable:"Нет доступных задач для создания временных записей",created:"Временная запись создана для {taskTitle} ({duration} минут)",createFailed:"Не удалось создать временную запись"}},contextMenus:{task:{status:"Статус",statusSelected:"✓ {label}",priority:"Приоритет",prioritySelected:"✓ {label}",dueDate:"Срок выполнения",scheduledDate:"Запланированная дата",customDates:"Пользовательские даты",reminders:"Напоминания",remindBeforeDue:"Напомнить до срока выполнения…",remindBeforeScheduled:"Напомнить до запланированной даты…",manageReminders:"Управлять всеми напоминаниями…",clearReminders:"Очистить все напоминания",startTimeTracking:"Начать отслеживание времени",stopTimeTracking:"Остановить отслеживание времени",editTimeEntries:"Редактировать записи времени",archive:"Архивировать",unarchive:"Разархивировать",openNote:"Открыть заметку",openNoteInNewTab:"Открыть заметку в новой вкладке",copyTitle:"Копировать название задачи",quickActions:"Быстрые действия",noteActions:"Действия с заметкой",rename:"Переименовать",renameTitle:"Переименовать файл",renamePlaceholder:"Введите новое имя",delete:"Удалить",deleteTitle:"Удалить файл",deleteMessage:'Вы уверены, что хотите удалить "{name}"?',deleteConfirm:"Удалить",copyPath:"Копировать путь",copyUrl:"Копировать URL Obsidian",showInExplorer:"Показать в проводнике файлов",addToCalendar:"Добавить в календарь",calendar:{google:"Google Календарь",outlook:"Outlook Календарь",yahoo:"Yahoo Календарь",downloadIcs:"Скачать файл .ics",syncToGoogle:"Синхронизировать с Google Календарём",syncToGoogleNotConfigured:"Синхронизация с Google Календарём не настроена",syncToGoogleSuccess:"Задача синхронизирована с Google Календарём",syncToGoogleFailed:"Не удалось синхронизировать с Google Календарём"},recurrence:"Повторение",clearRecurrence:"Очистить повторение",customRecurrence:"Пользовательское повторение...",createSubtask:"Создать подзадачу",dependencies:{title:"Зависимости",addBlockedBy:"Добавить «заблокирована»…",addBlockedByTitle:"Добавить задачи, от которых зависит текущая",addBlocking:"Добавить «блокирует»…",addBlockingTitle:"Добавить задачи, которые блокирует текущая",removeBlockedBy:"Удалить «заблокирована»…",removeBlocking:"Удалить «блокирует»…",unknownDependency:"Неизвестно",inputPlaceholder:"[[Задача]]",notices:{noEntries:"Введите хотя бы одну задачу",blockedByAdded:"Добавлена {count} зависимость",blockedByRemoved:"Зависимость удалена",blockingAdded:"Добавлено {count} зависимых задач",blockingRemoved:"Зависимая задача удалена",unresolved:"Не удалось определить: {entries}",noEligibleTasks:"Нет доступных подходящих задач",updateFailed:"Не удалось обновить зависимости"}},organization:{title:"Организация",projects:"Проекты",addToProject:"Добавить в проект…",subtasks:"Подзадачи",addSubtasks:"Добавить подзадачи…",notices:{alreadyInProject:"Задача уже в этом проекте",alreadySubtask:"Задача уже является подзадачей этой задачи",addedToProject:"Добавлено в проект: {project}",addedAsSubtask:"Добавлена {subtask} как подзадача {parent}",addToProjectFailed:"Не удалось добавить задачу в проект",addAsSubtaskFailed:"Не удалось добавить задачу как подзадачу",projectSelectFailed:"Не удалось открыть селектор проектов",subtaskSelectFailed:"Не удалось открыть селектор подзадач",noEligibleSubtasks:"Нет доступных задач для назначения в качестве подзадач",currentTaskNotFound:"Файл текущей задачи не найден",updateContextsFailed:"Не удалось обновить контексты"},contexts:"Контексты",addContext:"Добавить контекст…",contextPlaceholder:"контекст",contextSelected:"✓ {context}",clearContexts:"Очистить контексты"},subtasks:{loading:"Загрузка подзадач...",noSubtasks:"Подзадачи не найдены",loadFailed:"Не удалось загрузить подзадачи"},markComplete:"Отметить как выполненную для этой даты",markIncomplete:"Отметить как невыполненную для этой даты",skipInstance:"Пропустить экземпляр",unskipInstance:"Отменить пропуск экземпляра",completion:{submenu:"Отметить как выполненную или пропустить",submenuCompleteOnly:"Отметить как выполненную",completeToday:"Выполнена сегодня",completeAsScheduled:"Выполнена в запланированную дату",completeOnDue:"Выполнена в дату срока выполнения",completeOnPicked:"Выполнена в выбранную дату",markIncomplete:"Отметить как невыполненную",noScheduledDate:"У этой задачи нет запланированной даты",noDueDate:"У этой задачи нет срока выполнения",noPickedDate:"Дата не выбрана",noCompletedStatus:"Статус выполненной задачи не настроен",pickDateTitle:"Выберите дату выполнения",completeFailure:"Не удалось обновить выполнение задачи: {message}",clearInstancesConfirmTitle:"Удалить записи об экземплярах?",clearInstancesConfirmMessage:"Перенос удалит записи об этих выполненных или пропущенных экземплярах на новую дату или позже: {dates}. Они больше не будут отмечены как выполненные или пропущенные. Продолжить?",clearInstancesConfirmButton:"Перенести и очистить"},quickReminders:{atTime:"Во время события",fiveMinutes:"За 5 минут",fifteenMinutes:"За 15 минут",oneHour:"За 1 час",oneDay:"За 1 день"},notices:{toggleCompletionFailure:"Не удалось переключить завершение повторяющейся задачи: {message}",toggleSkipFailure:"Не удалось переключить пропуск повторяющейся задачи: {message}",updateDueDateFailure:"Не удалось обновить срок выполнения задачи: {message}",updateScheduledFailure:"Не удалось обновить запланированную дату задачи: {message}",updateCustomDateFailure:"Не удалось обновить {field}: {message}",updateRemindersFailure:"Не удалось обновить напоминания",clearRemindersFailure:"Не удалось очистить напоминания",addReminderFailure:"Не удалось добавить напоминание",archiveFailure:"Не удалось переключить архив задачи: {message}",copyTitleSuccess:"Название задачи скопировано в буфер обмена",copyFailure:"Не удалось скопировать в буфер обмена",renameSuccess:'Переименовано в "{name}"',renameFailure:"Не удалось переименовать файл",copyPathSuccess:"Путь к файлу скопирован в буфер обмена",copyUrlSuccess:"URL Obsidian скопирован в буфер обмена",updateRecurrenceFailure:"Не удалось обновить повторение задачи: {message}",updateTagsFailed:"Не удалось обновить теги"},tags:"Теги",addTag:"Добавить тег…",removeTag:"Удалить {tag}",removeTagInput:"Удалить тег…",tagPlaceholder:"Тег или #тег",clearTags:"Очистить теги"},priority:{clearPriority:"Очистить приоритет"},ics:{showDetails:"Показать детали",createTask:"Создать задачу из события",createNote:"Создать заметку из события",linkNote:"Связать существующую заметку",copyTitle:"Копировать название",copyLocation:"Копировать местоположение",copyUrl:"Копировать URL",copyMarkdown:"Копировать как markdown",subscriptionUnknown:"Неизвестный календарь",notices:{copyTitleSuccess:"Название события скопировано в буфер обмена",copyLocationSuccess:"Местоположение скопировано в буфер обмена",copyUrlSuccess:"URL события скопирован в буфер обмена",copyMarkdownSuccess:"Детали события скопированы как markdown",copyFailure:"Не удалось скопировать в буфер обмена",taskCreated:"Задача создана: {title}",taskCreateFailure:"Не удалось создать задачу из события",noteCreated:"Заметка успешно создана",creationFailure:"Не удалось открыть модальное окно создания",linkSuccess:'Связана заметка "{name}" с событием',linkFailure:"Не удалось связать заметку",linkSelectionFailure:"Не удалось открыть выбор заметки"},markdown:{titleFallback:"Событие без названия",calendar:"**Календарь:** {value}",date:"**Дата и время:** {value}",location:"**Местоположение:** {value}",descriptionHeading:"### Описание",url:"**URL:** {value}",at:" в {time}"}},date:{increment:{plusOneDay:"+1 день",minusOneDay:"-1 день",plusOneWeek:"+1 неделя",minusOneWeek:"-1 неделя"},basic:{today:"Сегодня",tomorrow:"Завтра",thisWeekend:"Эти выходные",nextWeek:"Следующая неделя",nextMonth:"Следующий месяц"},weekdaysLabel:"Рабочие дни",selected:"✓ {label}",pickDateTime:"Выбрать дату и время…",clearDate:"Очистить дату",modal:{title:"Установить дату и время",dateLabel:"Дата",timeLabel:"Время (опционально)",select:"Выбрать"}}},services:{pomodoro:{notices:{alreadyRunning:"Помодоро уже запущено",resumeCurrentSession:"Возобновите текущую сессию вместо запуска новой",timerAlreadyRunning:"Таймер уже запущен",resumeSessionInstead:"Возобновите текущую сессию вместо запуска новой",shortBreakStarted:"Короткий перерыв начат",longBreakStarted:"Длинный перерыв начат",paused:"Помодоро приостановлено",resumed:"Помодоро возобновлено",stoppedAndReset:"Помодоро остановлено и сброшено",migrationSuccess:"Успешно перенесено {count} сессий помодоро в ежедневные заметки.",migrationFailure:"Не удалось перенести данные помодоро. Пожалуйста, попробуйте снова или проверьте консоль для деталей."}},icsSubscription:{notices:{calendarNotFound:'Календарь "{name}" не найден (404). Пожалуйста, проверьте, что URL ICS правильный и календарь общедоступен.',calendarAccessDenied:'Доступ к календарю "{name}" запрещен (500). Это может быть из-за ограничений сервера Microsoft Outlook. Попробуйте перегенерировать URL ICS из настроек календаря.',fetchRemoteFailed:'Не удалось получить удаленный календарь "{name}": {error}',readLocalFailed:'Не удалось прочитать локальный календарь "{name}": {error}'}},calendarExport:{notices:{generateLinkFailed:"Не удалось сгенерировать ссылку календаря",noTasksToExport:"Не найдено задач для экспорта",downloadSuccess:"Скачан {filename} с {count} задач{plural}",downloadFailed:"Не удалось скачать файл календаря",singleDownloadSuccess:"Скачан {filename}"}},filter:{groupLabels:{noProject:"Без проекта",noTags:"Без тегов",invalidDate:"Неверная дата",due:{overdue:"Просрочено",today:"Сегодня",tomorrow:"Завтра",nextSevenDays:"Следующие семь дней",later:"Позже",none:"Без срока выполнения"},scheduled:{past:"Прошлые запланированные",today:"Сегодня",tomorrow:"Завтра",nextSevenDays:"Следующие семь дней",later:"Позже",none:"Без запланированной даты"}},errors:{noDatesProvided:"Даты не предоставлены"},folders:{root:"(Корень)"}},instantTaskConvert:{notices:{noCheckboxTasks:"В текущей заметке не найдено задач с чекбоксами.",convertingTasks:"Преобразование {count} задач{plural}...",conversionSuccess:"✅ Успешно преобразовано {count} задач{plural} в TaskNotes!",partialConversion:"Преобразовано {successCount} задач{successPlural}. {failureCount} не удалось.",batchConversionFailed:"Не удалось выполнить пакетное преобразование. Пожалуйста, попробуйте снова.",invalidParameters:"Неверные входные параметры.",emptyLine:"Текущая строка пуста или не содержит допустимого содержимого.",parseError:"Ошибка анализа задачи: {error}",invalidTaskData:"Неверные данные задачи.",replaceLineFailed:"Не удалось заменить строку задачи.",conversionComplete:"Задача преобразована: {title}",conversionCompleteShortened:'Задача преобразована: "{title}" (имя файла сокращено из-за длины)',fileExists:"Файл с таким именем уже существует. Пожалуйста, попробуйте снова или переименуйте задачу.",conversionFailed:"Не удалось преобразовать задачу. Пожалуйста, попробуйте снова."}},icsNote:{notices:{templateNotFound:"Шаблон не найден: {path}",templateProcessError:"Ошибка обработки шаблона: {template}",linkedToEvent:"Заметка связана с событием ICS: {title}"}},task:{notices:{templateNotFound:"Шаблон тела задачи не найден: {path}",templateReadError:"Ошибка чтения шаблона тела задачи: {template}",occurrenceTemplateNotFound:"Шаблон заметки экземпляра не найден: {path}",occurrenceTemplateReadError:"Ошибка чтения шаблона заметки экземпляра: {template}",moveTaskFailed:"Не удалось переместить {operation} задачу: {error}"}},autoExport:{notices:{exportFailed:"Автоэкспорт TaskNotes не удался: {error}"}}},ui:{icsCard:{untitledEvent:"Событие без названия",allDay:"Весь день",calendarEvent:"Событие календаря",calendarFallback:"Календарь"},noteCard:{createdLabel:"Создано:",dailyBadge:"Ежедневно",dailyTooltip:"Ежедневная заметка"},taskCard:{labels:{due:"Срок",scheduled:"Запланировано",recurrence:"Повторяющееся",completed:"Завершено",created:"Создано",modified:"Изменено",blocked:"Заблокировано",blocking:"Блокирует"},blockedBadge:"Заблокирована",blockedBadgeTooltip:"Эта задача ожидает другую задачу",blockingBadge:"Блокирует",blockingBadgeTooltip:"Эта задача блокирует другую задачу",blockingToggle:"Блокирует {count} задач",priorityAriaLabel:"Приоритет: {label}",taskOptions:"Параметры задачи",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"1 напоминание установлено (нажмите, чтобы управлять)",reminderTooltipMany:"{count} напоминаний установлено (нажмите, чтобы управлять)",projectTooltip:"Эта задача используется как проект (нажмите, чтобы показать/скрыть подзадачи)",projectIndicatorTooltip:"Эта задача используется как проект",expandSubtasks:"Развернуть подзадачи",collapseSubtasks:"Свернуть подзадачи",dueToday:"{label}: Сегодня",dueTodayAt:"{label}: Сегодня в {time}",dueOverdue:"{label}: {display} (просрочено)",dueLabel:"{label}: {display}",scheduledToday:"{label}: Сегодня",scheduledTodayAt:"{label}: Сегодня в {time}",scheduledPast:"{label}: {display} (в прошлом)",scheduledLabel:"{label}: {display}",loadingDependencies:"Загрузка зависимостей…",blockingEmpty:"Нет зависимых задач",blockingLoadError:"Не удалось загрузить зависимости",googleCalendarSyncTooltip:"Синхронизировано с Google Календарём",detailsTooltip:"У задачи есть подробности"},propertyEventCard:{unknownFile:"Неизвестный файл"},filterHeading:{allViewName:"Все"},filterBar:{saveView:"Сохранить представление",saveViewNamePlaceholder:"Введите имя представления...",saveButton:"Сохранить",views:"Представления",savedFilterViews:"Сохраненные представления фильтров",filters:"Фильтры",properties:"Свойства",sort:"Сортировка",newTask:"Новая",expandAllGroups:"Развернуть все группы",collapseAllGroups:"Свернуть все группы",searchTasksPlaceholder:"Поиск задач...",searchTasksTooltip:"Поиск названий задач",filterUnavailable:"Панель фильтров временно недоступна",toggleFilter:"Переключить фильтр",activeFiltersTooltip:"Активные фильтры – Нажмите для изменения, правый клик для очистки",configureVisibleProperties:"Настроить видимые свойства",sortAndGroupOptions:"Опции сортировки и группировки",sortMenuHeader:"Сортировка",orderMenuHeader:"Порядок",groupMenuHeader:"Группировка",createNewTask:"Создать новую задачу",filter:"Фильтр",displayOrganization:"Отображение и организация",viewOptions:"Опции представления",addFilter:"Добавить фильтр",addFilterGroup:"Добавить группу фильтров",addFilterTooltip:"Добавить новое условие фильтра",addFilterGroupTooltip:"Добавить вложенную группу фильтров",clearAllFilters:"Очистить все фильтры и группы",saveCurrentFilter:"Сохранить текущий фильтр как представление",closeFilterModal:"Закрыть модальное окно фильтра",deleteFilterGroup:"Удалить группу фильтров",deleteCondition:"Удалить условие",all:"Все",any:"Любое",followingAreTrue:"из следующих истинно:",where:"где",selectProperty:"Выбрать...",chooseProperty:"Выберите, какое свойство задачи фильтровать",chooseOperator:"Выберите, как сравнивать значение свойства",enterValue:"Введите значение для фильтрации",selectValue:"Выберите {property} для фильтрации",sortBy:"Сортировать по:",toggleSortDirection:"Переключить направление сортировки",chooseSortMethod:"Выберите, как сортировать задачи",groupBy:"Группировать по:",chooseGroupMethod:"Группировать задачи по общему свойству",toggleViewOption:"Переключить {option}",expandCollapseFilters:"Нажмите для развертывания/свертывания условий фильтра",expandCollapseSort:"Нажмите для развертывания/свертывания опций сортировки и группировки",expandCollapseViewOptions:"Нажмите для развертывания/свертывания опций представления",naturalLanguageDates:"Даты на естественном языке",naturalLanguageExamples:"Показать примеры дат на естественном языке",enterNumericValue:"Введите числовое значение для фильтрации",enterDateValue:"Введите дату, используя естественный язык или формат ISO",pickDateTime:"Выбрать дату и время",noSavedViews:"Нет сохраненных представлений",savedViews:"Сохраненные представления",yourSavedFilters:"Ваши сохраненные конфигурации фильтров",dragToReorder:"Перетащите для изменения порядка представлений",loadSavedView:"Загрузить сохраненное представление: {name}",deleteView:"Удалить представление",deleteViewTitle:"Удалить представление",deleteViewMessage:'Вы уверены, что хотите удалить представление "{name}"?',manageAllReminders:"Управлять всеми напоминаниями...",clearAllReminders:"Очистить все напоминания",customRecurrence:"Пользовательское повторение...",clearRecurrence:"Очистить повторение",sortOptions:{dueDate:"Срок выполнения",scheduledDate:"Запланированная дата",priority:"Приоритет",status:"Статус",title:"Название",createdDate:"Дата создания",tags:"Теги",ascending:"По возрастанию",descending:"По убыванию"},group:{none:"Нет",status:"Статус",priority:"Приоритет",context:"Контекст",project:"Проект",dueDate:"Срок выполнения",scheduledDate:"Запланированная дата",tags:"Теги",completedDate:"Дата завершения"},subgroupLabel:"ПОДГРУППА",notices:{propertiesMenuFailed:"Не удалось показать меню свойств"}}},components:{dateContextMenu:{weekdays:"Будни",clearDate:"Очистить дату",today:"Доday",tomorrow:"Доmorrow",thisWeekend:"На этой неделеend",nextWeek:"На следующей неделе",nextMonth:"В следующем месяце",setDateTime:"Установить дату и время",dateLabel:"Дата",timeLabel:"Время (необязательно)"},subgroupMenuBuilder:{none:"Нет",status:"Статус",priority:"Приоритет",context:"Контекст",project:"Проект",dueDate:"Дата выполнения",scheduledDate:"Запланированная дата",tags:"Теги",completedDate:"Завершено Date",subgroup:"ПОДГРУППА"},propertyVisibilityDropdown:{coreProperties:"ОСНОВНЫЕ СВОЙСТВА",organization:"ОРГАНИЗАЦИЯ",customProperties:"ПОЛЬЗОВАТЕЛЬСКИЕ СВОЙСТВА",failed:"Не удалось показать меню свойств",properties:{statusDot:"Точка статуса",priorityDot:"Точка приоритета",dueDate:"Срок выполнения",scheduledDate:"Запланированная дата",timeEstimate:"Оценка времени",totalTrackedTime:"Общее отслеженное время",checklistProgress:"Прогресс чек-листа",recurrence:"Повторение",completedDate:"Дата завершения",createdDate:"Дата создания",modifiedDate:"Дата изменения",projects:"Проекты",contexts:"Контексты",tags:"Теги",blocked:"Заблокирована",blocking:"Блокирует"}},reminderContextMenu:{remindBeforeDue:"Напомнить до срока выполнения...",remindBeforeScheduled:"Напомнить до запланированной даты...",manageAllReminders:"Управлять всеми напоминаниями...",clearAllReminders:"Очистить все напоминания",quickReminders:{atTime:"Во время события",fiveMinutesBefore:"За 5 минут",fifteenMinutesBefore:"За 15 минут",oneHourBefore:"За 1 час",oneDayBefore:"За 1 день"}},recurrenceContextMenu:{daily:"Ежедневно",weeklyOn:"Еженедельно в {day}",everyTwoWeeksOn:"Каждые 2 недели в {day}",monthlyOnThe:"Ежемесячно в {ordinal}",everyThreeMonthsOnThe:"Каждые 3 месяца в {ordinal}",yearlyOn:"Ежегодно {month} {ordinal}",weekdaysOnly:"Только рабочие дни",dailyAfterCompletion:"Ежедневно (после завершения)",every3DaysAfterCompletion:"Каждые 3 дня (после завершения)",weeklyAfterCompletion:"Еженедельно (после завершения)",monthlyAfterCompletion:"Ежемесячно (после завершения)",customRecurrence:"Пользовательское повторение...",clearRecurrence:"Очистить повторение",customRecurrenceModal:{title:"Пользовательское повторение",startDate:"Дата начала",startDateDesc:"Дата, когда начинается шаблон повторения",startTime:"Время начала",startTimeDesc:"Время, когда должны появляться повторяющиеся экземпляры (опционально)",recurFrom:"Повторять от",recurFromDesc:"Когда следует рассчитывать следующее повторение?",scheduledDate:"Запланированная дата",completionDate:"Дата завершения",frequency:"Частота",interval:"Интервал",intervalDesc:"Каждые X дней/недель/месяцев/лет",daysOfWeek:"Дни недели",daysOfWeekDesc:"Выберите конкретные дни (для еженедельного повторения)",monthlyRecurrence:"Ежемесячное повторение",monthlyRecurrenceDesc:"Выберите, как повторять ежемесячно",yearlyRecurrence:"Ежегодное повторение",yearlyRecurrenceDesc:"Выберите, как повторять ежегодно",endCondition:"Условие завершения",endConditionDesc:"Выберите, когда повторение должно закончиться",neverEnds:"Никогда не заканчивается",endAfterOccurrences:"Закончить после {count} повторений",endOnDate:"Закончить {date}",onDayOfMonth:"В день {day} каждого месяца",onTheWeekOfMonth:"В {week} {day} каждого месяца",onDateOfYear:"{month} {day} каждого года",onTheWeekOfYear:"В {week} {day} {month} каждого года",frequencies:{daily:"Ежедневно",weekly:"Еженедельно",monthly:"Ежемесячно",yearly:"Ежегодно"},weekPositions:{first:"первый",second:"второй",third:"третий",fourth:"четвертый",last:"последний"},weekdays:{monday:"Понедельник",tuesday:"Вторник",wednesday:"Среда",thursday:"Четверг",friday:"Пятница",saturday:"Суббота",sunday:"Воскресенье"},weekdaysShort:{mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб",sun:"Вс"},cancel:"Отмена",save:"Сохранить"}}}};var Bue={common:{appName:"TaskNotes",new:"新建",cancel:"取消",confirm:"确认",close:"关闭",save:"保存",reorder:{confirmLargeTitle:"确认大规模重排",confirmButton:"重排笔记",confirmLargeMessage:"在此处重排会更新 {count} 条笔记中的“{field}”,以便为 {scope} 建立持久的手动顺序。同一范围内被隐藏或被筛选掉的笔记也可能会一起更新。是否继续?"},language:"语言",systemDefault:"系统默认",loading:"加载中...",languages:{en:"英语",fr:"法语",ru:"俄语",zh:"中文",de:"德语",es:"西班牙语",ja:"日语",pt:"葡萄牙语(巴西)",ko:"韩语"},weekdays:{sunday:"星期日",monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六"},months:{january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"}},views:{agenda:{title:"议程",today:"今天",overdue:"逾期",refreshCalendars:"刷新日历",actions:{previousPeriod:"上一时段",nextPeriod:"下一时段",goToToday:"转到今天",refreshCalendars:"刷新日历订阅"},loading:"正在加载议程...",dayToggle:"切换日期",overdueToggle:"切换逾期部分",expandAllDays:"展开所有天",collapseAllDays:"折叠所有天",notices:{calendarNotReady:"日历服务尚未准备就绪",calendarRefreshed:"日历订阅已刷新",refreshFailed:"刷新失败"},empty:{noItemsScheduled:"没有安排的项目",noItemsFound:"未找到项目",helpText:"创建具有截止日期或计划日期的任务,或添加笔记以在此处显示它们。"},contextMenu:{showOverdueSection:"显示逾期部分",showNotes:"显示笔记",calendarSubscriptions:"日历订阅"},periods:{thisWeek:"本周"},tipPrefix:"提示:"},taskList:{title:"任务",expandAllGroups:"展开所有分组",collapseAllGroups:"折叠所有分组",noTasksFound:"未找到符合所选筛选条件的任务。",reorder:{scope:{ungrouped:"这个未分组列表",group:"分组“{group}”"}},errors:{formulaGroupingReadOnly:"无法在基于公式的分组中重排任务。公式值是计算结果,不能直接修改。"}},notes:{title:"笔记",refreshButton:"正在刷新...",refreshingButton:"刷新中...",notices:{indexingDisabled:"笔记索引已禁用"},empty:{noNotesFound:"未找到笔记",helpText:"未找到所选日期的笔记。尝试在迷你日历视图中选择不同的日期或创建一些笔记。"},loading:"加载笔记中...",refreshButtonAriaLabel:"刷新笔记列表"},miniCalendar:{title:"迷你日历",contextMenu:{openDailyNote:"打开每日笔记",openWeeklyNote:"打开每周笔记"}},advancedCalendar:{title:"日历",filters:{showFilters:"显示筛选器",hideFilters:"隐藏筛选器"},viewOptions:{calendarSubscriptions:"日历订阅",timeEntries:"时间条目",timeblocks:"时间块",scheduledDates:"计划日期",dueDates:"截止日期",allDaySlot:"全天时段",scheduledTasks:"计划任务",recurringTasks:"重复任务"},buttons:{refresh:"刷新",refreshHint:"刷新日历订阅"},notices:{icsServiceNotAvailable:"ICS订阅服务不可用",calendarRefreshedAll:"所有日历订阅已成功刷新",refreshFailed:"刷新部分日历订阅失败",timeblockSpecificTime:"时间块必须有具体时间。请在周视图或日视图中选择时间范围。",timeblockMoved:'时间块"{title}"已移动到{date}',timeblockUpdated:'时间块"{title}"的时间已更新',timeblockMoveFailed:"移动时间块失败:{message}",timeblockResized:'时间块"{title}"的持续时间已更新',timeblockResizeFailed:"调整时间块大小失败:{message}",taskScheduled:'任务"{title}"已安排到{date}',scheduleTaskFailed:"安排任务失败",endTimeAfterStart:"结束时间必须晚于开始时间",timeEntryNotFound:"未找到时间条目",timeEntryDeleted:"时间条目已删除",deleteTimeEntryFailed:"删除时间条目失败"},timeEntry:{estimatedSuffix:"预估",trackedSuffix:"已记录",recurringPrefix:"重复:",completedPrefix:"已完成:",createdPrefix:"创建:",modifiedPrefix:"修改:",duePrefix:"截止:",scheduledPrefix:"计划:"},contextMenus:{openTask:"打开任务",deleteTimeEntry:"删除时间条目",deleteTimeEntryTitle:"删除时间条目",deleteTimeEntryConfirm:"确定要删除此时间条目{duration}吗?此操作无法撤销。",deleteButton:"删除",cancelButton:"取消"}},basesCalendar:{title:"Bases日历",today:"今天",buttonText:{month:"月",week:"周",day:"日",year:"年",list:"列表",customDays:"{count}天",listDays:"{count}天 列表",refresh:"刷新"},hints:{refresh:"刷新日历订阅",today:"转到今天",prev:"上一个",next:"下一个",month:"月视图",week:"周视图",day:"日视图",year:"年视图",list:"列表视图",customDays:"{count}天视图"},settings:{groups:{dateNavigation:"日期导航",events:"事件",layout:"布局",view:"视图",display:"显示",timeGrid:"时间网格",eventLayout:"事件布局",propertyBasedEvents:"基于属性的事件",calendarSubscriptions:"日历订阅",googleCalendars:"Google 日历",microsoftCalendars:"Microsoft 日历"},dateNavigation:{navigateToDate:"导航到日期",navigateToDatePlaceholder:"YYYY-MM-DD(例如:2025-01-15)- 留空以使用属性",navigateToDateFromProperty:"从属性导航到日期",navigateToDateFromPropertyPlaceholder:"选择日期属性(可选)",propertyNavigationStrategy:"属性导航策略",createDailyNotesFromDateLinks:"通过日期链接创建每日笔记",strategies:{first:"第一个结果",earliest:"最早日期",latest:"最晚日期"}},events:{showScheduledTasks:"显示计划任务",showDueTasks:"显示到期任务",showOverdueOnToday:"在今天显示逾期任务",showRecurringTasks:"显示重复任务",showTimeEntries:"显示时间条目",showTimeblocks:"显示时间块",showPropertyBasedEvents:"显示基于属性的事件",showCompletedRecurringInstances:"显示已完成的重复实例",showSkippedRecurringInstances:"显示已跳过的重复实例"},layout:{calendarView:"日历视图",customDayCount:"自定义天数",listDayCount:"列表天数",dayStartTime:"一天开始时间",dayStartTimePlaceholder:"HH:mm:ss(例如:08:00:00)",dayEndTime:"一天结束时间",dayEndTimePlaceholder:"HH:mm:ss(例如:20:00:00)",timeSlotDuration:"时间段持续时间",timeSlotDurationPlaceholder:"HH:mm:ss(例如:00:30:00)",dragDropResolution:"拖放时间粒度",dragDropResolutionPlaceholder:"HH:mm:ss(例如:00:05:00)",weekStartsOn:"一周开始于",showWeekNumbers:"显示周数",showNowIndicator:"显示当前时间指示器",showWeekends:"显示周末",showAllDaySlot:"显示全天时段",showTimeGrid:"显示小时网格",showTodayHighlight:"突出显示今天",todayColumnWidthMultiplier:"今天列宽倍率",showSelectionPreview:"显示选择预览",slotEventOverlap:"允许事件重叠",enableSearch:"启用搜索框",eventMaxStack:"最大堆叠事件数(周/日视图,0 = 无限制)",dayMaxEvents:"每天最大事件数(月视图,0 = 自动)",dayMaxEventRows:"每天最大事件行数(月视图,0 = 无限制)",timeFormat:"时间格式",timeFormat12:"12小时制(AM/PM)",timeFormat24:"24小时制",initialScrollTime:"初始滚动时间",initialScrollTimePlaceholder:"HH:mm:ss(例如:08:00:00)",minimumEventHeight:"最小事件高度(px)",spanScheduledToDue:"在计划日期和截止日期之间扩展任务",heightMode:"高度模式",heightModeFill:"填满容器",heightModeAuto:"自动高度"},propertyBasedEvents:{startDateProperty:"开始日期属性",startDatePropertyPlaceholder:"选择开始日期/时间的属性",endDateProperty:"结束日期属性(可选)",endDatePropertyPlaceholder:"选择结束日期/时间的属性",titleProperty:"标题属性(可选)",titlePropertyPlaceholder:"选择事件标题的属性"}},notices:{noDailyNoteForDate:"此日期没有每日笔记。"},errors:{failedToInitialize:"初始化日历失败"}},kanban:{title:"看板",newTask:"新任务",addCard:"+ 添加卡片",noTasks:"没有任务",uncategorized:"未分类",noProject:"无项目",reorder:{scope:{column:'列 "{group}"',columnInSwimlane:'"{swimlane}" 泳道中的列 "{group}"'}},notices:{loadFailed:"看板加载失败",movedTask:'任务已移动到"{0}"'},errors:{loadingBoard:"加载看板时出错。",noGroupBy:"看板视图需要配置「分组依据」属性。点击「排序」按钮,然后在「分组依据」下选择一个属性。",formulaGroupingReadOnly:"无法在基于公式的列之间移动任务。公式值是计算得出的,不能直接修改。",formulaSwimlaneReadOnly:"无法在基于公式的泳道之间移动任务。公式值是计算得出的,不能直接修改。"},columnTitle:"无标题"},pomodoro:{title:"番茄钟",status:{focus:"专注",ready:"准备开始",paused:"已暂停",working:"工作中",shortBreak:"短休息",longBreak:"长休息",breakPrompt:"做得很好!是时候{length}休息了",breakLength:{short:"短",long:"长"},breakComplete:"休息完成!准备好进行下一个番茄钟了吗?"},buttons:{start:"开始",pause:"暂停",stop:"停止",resume:"继续",startShortBreak:"开始短休息",startLongBreak:"开始长休息",skipBreak:"跳过休息",chooseTask:"选择任务...",changeTask:"更换任务...",clearTask:"清除任务",selectDifferentTask:"选择其他任务",startFocus:"开始专注",addMinute:"增加一分钟",subtractMinute:"减少一分钟"},notices:{noTasks:"未找到未归档的任务。请先创建一些任务。",loadFailed:"加载任务失败",invalidDuration:"请输入类似 10、10:30 或 1:30:00 的时长。"},statsLabel:"今日完成",meta:{ready:"已计划 {time} · 今天已完成 {count} 个",running:"剩余 {time} · 结束于 {endTime}",paused:"{type} 已暂停 · 剩余 {time}",breakReady:"{type} 已就绪 · 已计划 {time}"},timer:{editLabel:"编辑计时器时长",inputLabel:"计时器时长"}},pomodoroStats:{title:"番茄钟统计",heading:"番茄钟统计数据",refresh:"刷新",sections:{overview:"概览",today:"今天",week:"本周",allTime:"全部时间",recent:"最近的会话"},overviewCards:{todayPomos:{label:"今日番茄钟",change:{more:"比昨天多{count}个",less:"比昨天少{count}个"}},totalPomos:{label:"总番茄钟数"},todayFocus:{label:"今日专注时间",change:{more:"比昨天多{duration}",less:"比昨天少{duration}"}},totalFocus:{label:"总专注时长"}},stats:{pomodoros:"番茄钟",streak:"连击",minutes:"分钟",average:"平均时长",completion:"完成率"},recents:{empty:"尚未记录会话",duration:"{minutes}分钟",status:{completed:"已完成",interrupted:"已中断"},delete:"删除会话",deleteAria:"删除 Pomodoro 会话",deleteConfirmTitle:"删除 Pomodoro 会话?",deleteConfirmMessage:"这会从 Pomodoro 历史中删除该会话。现有任务时间条目不会更改。",deleteConfirmButton:"删除",deleteSuccess:"Pomodoro 会话已删除",deleteNotFound:"未找到 Pomodoro 会话"},basesMigration:{title:"想要 Base 视图吗?",description:"Pomodoro Base 视图使用每日笔记 frontmatter。要在生成的 Pomodoro 统计 Base 中查看此历史,请先在设置中迁移 Pomodoro 数据,然后将存储位置设为每日笔记。"}},stats:{title:"统计",taskProjectStats:"任务和项目统计",sections:{filters:"筛选器",overview:"概览",today:"今天",thisWeek:"本周",thisMonth:"本月",projectBreakdown:"项目分解",dateRange:"日期范围"},filters:{minTime:"最少时间(分钟)",allTasks:"所有任务",activeOnly:"仅活跃的",completedOnly:"仅已完成的"},refreshButton:"刷新",timeRanges:{allTime:"一直",last7Days:"最近 7 天",last30Days:"最近 30 天",last90Days:"最近 90 天",customRange:"自定义范围"},resetFiltersButton:"重置筛选",dateRangeFrom:"从",dateRangeTo:"到",noProject:"无项目",cards:{timeTrackedEstimated:"跟踪时间/预估时间",totalTasks:"总任务数",completionRate:"完成率",activeProjects:"活跃项目",avgTimePerTask:"每个任务的平均时间"},labels:{tasks:"任务",completed:"已完成",projects:"项目"},noProjectData:"无可用的项目数据",notAvailable:"不适用",noTasks:"未找到任务",loading:"加载中..."},releaseNotes:{title:"TaskNotes {version} 的新功能",header:"TaskNotes {version} 的新功能",viewAllLink:"在 GitHub 上查看所有版本说明 →",starMessage:"我们非常感谢所有反馈。如果有什么感觉不对,请在 GitHub 上告诉我们。如果你觉得 TaskNotes 有用,请考虑给它加星。",baseFilesNotice:"> [!info] 关于默认 `.base` 文件\n> 默认生成的 `.base` 模板更新不会覆盖你现有的 `.base` 文件,因此你的自定义会被保留。\n> 如果你希望获得最新模板改进,请在 **设置 → TaskNotes → 常规 → 视图与 base 文件 → 更新文件** 中重新生成 base 文件。"}},settings:{header:{documentation:"文档",documentationUrl:"https://tasknotes.dev"},tabs:{general:"常规",taskProperties:"任务属性",modalFields:"模态框字段",defaults:"默认值和模板",appearance:"外观和界面",features:"功能",integrations:"集成"},features:{inlineTasks:{header:"内联任务",description:"任务链接和复选框转任务功能的设置。"},taskCreation:{header:"任务创建",description:"配置任务创建后的行为。",openAfterCreate:{name:"创建后打开任务",description:"选择常规新建任务弹窗在保存后是否打开新的任务笔记。",options:{none:"不打开",sameTab:"在当前标签页打开",newTab:"在新标签页打开"}}},overlays:{taskLinkToggle:{name:"任务链接覆盖",description:"悬停在任务链接上时显示交互式覆盖"},aliasExclusion:{name:"禁用别名链接的覆盖",description:"如果链接包含别名,则不显示任务小部件(例如 [[任务|别名]])。"}},instantConvert:{toggle:{name:"在复选框旁边显示转换按钮",description:"在Markdown复选框旁边显示内联按钮,将其转换为TaskNotes"},preserveCheckbox:{name:"转换时保留复选框",description:"将复选框转换为 TaskNote 链接时,保留原始 Markdown 复选框标记。"},folder:{name:"内联创建任务的文件夹",description:"通过内联命令或复选框转换创建的任务将存放在此文件夹。留空则使用默认任务文件夹。使用 {{currentNotePath}} 表示当前笔记的文件夹,或使用 {{currentNoteTitle}} 表示以当前笔记命名的子文件夹。"}},nlp:{header:"自然语言处理",description:"从文本输入解析日期、优先级和其他属性。",enable:{name:"启用自然语言任务输入",description:"创建任务时从自然语言解析到期日期、优先级和上下文"},defaultToScheduled:{name:"默认为已安排",description:"当NLP检测到无上下文的日期时,将其视为已安排而不是到期"},language:{name:"NLP语言",description:"自然语言处理模式和日期解析的语言"},statusTrigger:{name:"状态建议触发器",description:"触发状态建议的文本(留空以禁用)"}},pomodoro:{header:"番茄钟计时器",description:"配置番茄钟计时器的工作/休息间隔。",workDuration:{name:"工作时长",description:"工作间隔的持续时间(分钟)"},shortBreak:{name:"短休息时长",description:"短休息的持续时间(分钟)"},longBreak:{name:"长休息时长",description:"长休息的持续时间(分钟)"},longBreakInterval:{name:"长休息间隔",description:"长休息前的工作会话数"},autoStartBreaks:{name:"自动开始休息",description:"工作会话后自动开始休息计时器"},autoStartWork:{name:"自动开始工作",description:"休息后自动开始工作会话"},notifications:{name:"番茄钟通知",description:"番茄钟会话结束时显示通知"},mobileSidebar:{name:"移动端侧边栏",description:"在移动设备上打开番茄钟计时器的位置",tab:"笔记面板",left:"左侧边栏",right:"右侧边栏"},statusBar:{name:"在状态栏显示 Pomodoro",description:"在 Obsidian 状态栏显示当前 Pomodoro 倒计时"}},uiLanguage:{header:"界面语言",description:"更改TaskNotes菜单、通知和视图的语言。",dropdown:{name:"界面语言",description:"选择TaskNotes界面文本使用的语言"}},pomodoroSound:{enabledName:"启用声音",enabledDesc:"番茄钟会话结束时播放声音",volumeName:"声音音量",volumeDesc:"番茄钟声音的音量(0-100)"},dataStorage:{name:"番茄钟数据存储",description:"配置番茄钟会话数据的存储位置和管理方式。",dailyNotes:"日记",pluginData:"插件数据",notices:{locationChanged:"番茄钟存储位置已更改为 {location}"}},notifications:{header:"通知",description:"配置任务提醒通知和警报。",enableName:"启用通知",enableDesc:"启用任务提醒通知",typeName:"通知类型",typeDesc:"要显示的通知类型",systemLabel:"系统通知",inAppLabel:"应用内通知",soundEnabledName:"通知声音",soundEnabledDesc:"任务提醒触发时播放声音",soundVolumeName:"声音音量",soundVolumeDesc:"任务提醒声音音量 (0-100)",soundPreviewName:"预览通知声音",soundPreviewDesc:"播放已配置的任务提醒声音",soundPreviewButton:"预览",testReminderName:"发送测试提醒",testReminderDesc:"使用当前通知类型和声音设置发送测试提醒。",testReminderButton:"发送测试"},overdue:{hideCompletedName:"在逾期中隐藏已完成的任务",hideCompletedDesc:"从逾期任务计算中排除已完成的任务"},indexing:{disableName:"禁用笔记索引",disableDesc:"禁用笔记内容的自动索引以提高性能"},suggestions:{debounceName:"建议防抖",debounceDesc:"显示建议前的延迟毫秒数"},timeTracking:{autoStopName:"自动停止时间跟踪",autoStopDesc:"任务标记为完成时自动停止时间跟踪",stopNotificationName:"时间跟踪停止通知",stopNotificationDesc:"自动停止时间跟踪时显示通知"},recurring:{maintainOffsetName:"在重复任务中保持到期日期偏移",maintainOffsetDesc:"重复任务完成时保持到期日期和安排日期之间的偏移",resetCheckboxesName:"重复时重置复选框",resetCheckboxesDesc:"当重复任务完成并重新安排时,重置任务正文中的所有markdown复选框"},timeblocking:{header:"时间块",description:"配置时间块功能,在日记中进行轻量级调度。在日历视图上拖动以创建事件 - 从上下文菜单中选择'时间块'。",enableName:"启用时间块",enableDesc:"启用时间块功能,在日记中进行轻量级调度。启用后,'时间块'选项会出现在日历拖动上下文菜单中。",showBlocksName:"显示时间块",showBlocksDesc:"默认显示日记中的时间块",defaultColorName:"默认时间块颜色",defaultColorDesc:"创建新时间块时使用的默认颜色",usage:"用法:在日历上拖动以创建事件。从上下文菜单中选择'时间块'(仅在启用时间块时可见)。拖动以移动现有时间块。调整边缘以修改持续时间。"},performance:{header:"性能和行为",description:"配置插件性能和行为选项。"},timeTrackingSection:{header:"时间跟踪",description:"配置自动时间跟踪行为。"},recurringSection:{header:"重复任务",description:"配置重复任务管理的行为。"},debugLogging:{header:"调试日志",description:"设置用于故障排查的调试日志输出。",enableName:"启用调试日志",enableDesc:"将拖放和视图的详细诊断信息记录到开发者控制台,有助于故障排查。"}},defaults:{header:{basicDefaults:"基本默认值",dateDefaults:"日期默认值",defaultReminders:"默认提醒",bodyTemplate:"正文模板",instantTaskConversion:"即时任务转换"},description:{basicDefaults:"为新任务设置默认值以加快任务创建。",dateDefaults:"为新任务设置默认到期和安排日期。",defaultReminders:"配置将添加到新任务的默认提醒。",bodyTemplate:"配置用于新任务内容的模板文件。",instantTaskConversion:"配置即时转换文本为任务时的行为。"},basicDefaults:{defaultStatus:{name:"默认状态",description:"新任务的默认状态"},defaultPriority:{name:"默认优先级",description:"新任务的默认优先级"},defaultContexts:{name:"默认上下文",description:"默认上下文的逗号分隔列表(例如,@家,@工作)",placeholder:"@家,@工作"},defaultTags:{name:"默认标签",description:"默认标签的逗号分隔列表(不含#)",placeholder:"重要,紧急"},defaultProjects:{name:"默认项目",description:"新任务的默认项目链接",selectButton:"选择项目",selectTooltip:"选择默认链接的项目笔记",removeTooltip:"从默认项目中移除{name}"},useParentNoteForTaskCreation:{name:"新任务使用当前笔记作为项目",description:"从命令面板或功能区打开任务创建时,自动将当前笔记链接为项目"},useParentNoteAsProject:{name:"内联创建和即时转换时使用父笔记作为项目",description:"使用内联任务创建或即时任务转换时,自动将源笔记链接为项目"},useParentHeaderAsProject:{name:"即时转换时使用父级标题作为项目",description:"使用即时任务转换时自动将被转换行上方最近的标题链接为项目"},defaultTimeEstimate:{name:"默认时间估计",description:"默认时间估计(分钟)(0 = 无默认值)",placeholder:"60"},defaultRecurrence:{name:"默认重复",description:"新任务的默认重复模式"}},dateDefaults:{defaultDueDate:{name:"默认到期日期",description:"新任务的默认到期日期"},defaultScheduledDate:{name:"默认安排日期",description:"新任务的默认安排日期"}},reminders:{addReminder:{name:"添加默认提醒",description:"创建一个新的默认提醒,将添加到所有新任务",buttonText:"添加提醒"},emptyState:"未配置默认提醒。添加提醒以自动通知您有关新任务的信息。",emptyStateButton:"添加提醒",reminderDescription:"提醒描述",unnamedReminder:"未命名提醒",deleteTooltip:"删除提醒",fields:{description:"描述:",type:"类型:",offset:"偏移:",unit:"单位:",direction:"方向:",relatedTo:"相关于:",date:"日期:",time:"时间:"},types:{relative:"相对(任务日期前/后)",absolute:"绝对(特定日期/时间)"},units:{minutes:"分钟",hours:"小时",days:"天"},directions:{before:"之前",after:"之后"},relatedTo:{due:"到期日期",scheduled:"安排日期"}},bodyTemplate:{useBodyTemplate:{name:"使用正文模板",description:"为任务正文内容使用模板文件"},bodyTemplateFile:{name:"正文模板文件",description:"任务正文内容的模板文件路径。支持模板变量如{{title}}、{{date}}、{{time}}、{{priority}}、{{status}}等。",placeholder:"模板/任务模板.md",ariaLabel:"正文模板文件路径"},useOccurrenceBodyTemplate:{name:"使用实例笔记模板",description:"当重复任务未设置 occurrence_template 时,为已物化的实例笔记使用单独的备用模板"},occurrenceBodyTemplateFile:{name:"实例笔记模板文件",description:"已物化实例笔记的模板文件路径。重复任务的 occurrence_template 字段优先于此备用模板。",placeholder:"模板/实例模板.md",ariaLabel:"实例笔记模板文件路径"},variablesHeader:"模板变量:",variables:{title:"{{title}} - 任务标题",details:"{{details}} - 用户从模态框提供的详情",date:"{{date}} - 当前日期(YYYY-MM-DD)",time:"{{time}} - 当前时间(HH:MM)",priority:"{{priority}} - 任务优先级",status:"{{status}} - 任务状态",contexts:"{{contexts}} - 任务上下文",tags:"{{tags}} - 任务标签",projects:"{{projects}} - 任务项目"}},instantConversion:{useDefaultsOnInstantConvert:{name:"即时转换时使用任务默认值",description:"即时转换文本为任务时应用默认任务设置"}},options:{noDefault:"无默认值",none:"无",today:"今天",tomorrow:"明天",nextWeek:"下周",daily:"每日",weekly:"每周",monthly:"每月",yearly:"每年"}},general:{taskStorage:{header:"任务存储",description:"配置任务存储位置和识别方式。",defaultFolder:{name:"默认任务文件夹",description:"新任务的默认位置。支持 {{currentNotePath}}、{{currentNoteTitle}} 和 {{projectFilePath}} 等文件夹模板变量,也支持 YYYY/MM/DD 等 Daily Notes 风格日期标记。"},moveArchived:{name:"将归档任务移动到文件夹",description:"自动将归档任务移动到归档文件夹"},archiveFolder:{name:"归档文件夹",description:"归档时将任务移动到的文件夹。支持模板变量,如 {{year}}、{{month}}、{{priority}} 等。"}},taskIdentification:{header:"任务识别",description:"选择TaskNotes如何识别笔记为任务。",identifyBy:{name:"识别任务通过",description:"选择是通过标签还是通过前置属性识别任务",options:{tag:"标签",property:"属性"}},taskTag:{name:"任务标签",description:"识别笔记为任务的标签(不含 #)。更改此设置后,现有 .base 视图筛选器会保留旧标签;请更新默认 Base 文件或手动编辑这些筛选器。"},hideIdentifyingTags:{name:"在任务卡片中隐藏识别标签",description:"启用后,与任务识别标签匹配的标签(包括层次匹配,如 'task/project')将在任务卡片显示中隐藏"},hideIdentifyingTagsMode:{name:"隐藏标签范围",description:"选择隐藏识别标签时是否同时隐藏嵌套标签。",options:{all:"任务标签和嵌套标签",exactOnly:"仅精确任务标签"}},taskProperty:{name:"任务属性名称",description:'前置属性名称(例如,"category")'},taskPropertyValue:{name:"任务属性值",description:'识别笔记为任务的值(例如,"task")'}},folderManagement:{header:"文件夹管理",excludedFolders:{name:"排除文件夹",description:"从任务索引和项目建议中排除的文件夹的逗号分隔列表"}},frontmatter:{header:"Frontmatter",description:"配置 frontmatter 属性中链接的格式。",useMarkdownLinks:{name:"在 frontmatter 中使用 markdown 链接",description:"在 frontmatter 属性中生成 markdown 链接 ([文本](路径)) 而不是 wikilinks ([[链接]])。\\n\\n⚠️ 需要 'obsidian-frontmatter-markdown-links' 插件才能正常工作。"}},taskInteraction:{header:"任务交互",description:"配置点击任务的行为。",singleClick:{name:"单击操作",description:"单击任务卡片时执行的操作"},doubleClick:{name:"双击操作",description:"双击任务卡片时执行的操作"},actions:{edit:"编辑任务",openNote:"打开笔记",none:"无操作"}},releaseNotes:{header:"版本说明",description:"当前版本:{version}",showOnUpdate:{name:"更新后显示版本说明",description:"当TaskNotes更新到新版本时自动打开版本说明"},checkForUpdates:{name:"启动时检查新版本",description:"TaskNotes 启动时检查一次 GitHub,并在有较新的兼容版本可用时显示通知"},viewButton:{name:"查看版本说明",description:"查看TaskNotes最新版本的新功能",buttonText:"查看版本说明"}}},taskProperties:{sections:{coreProperties:"核心属性",corePropertiesDesc:"状态和优先级是定义任务状态和重要性的核心属性。",dateProperties:"日期属性",datePropertiesDesc:"配置任务的到期日期和安排日期。",organizationProperties:"组织属性",organizationPropertiesDesc:"使用上下文、项目和标签组织任务。",taskDetails:"任务详情",taskDetailsDesc:"其他详情,如时间估计、重复和提醒。",metadataProperties:"元数据属性",metadataPropertiesDesc:"用于跟踪任务历史的系统管理属性。",featureProperties:"功能属性",featurePropertiesDesc:"特定TaskNotes功能使用的属性,如番茄钟计时器和日历同步。"},propertyCard:{propertyKey:"属性键:",default:"默认值:",nlpTrigger:"NLP触发器:",triggerChar:"触发字符:",triggerEmpty:"触发器不能为空",triggerTooLong:"触发器过长(最多10个字符)"},properties:{status:{name:"状态",description:"跟踪任务的当前状态(例如,待办、进行中、完成)。状态决定任务是否显示为已完成,并可触发自动归档。"},priority:{name:"优先级",description:"表示任务的重要性。用于排序和过滤。在Bases视图中值按字母顺序排序,因此使用1-、2-等前缀来控制顺序。"},due:{name:"到期日期",description:"任务必须完成的截止日期。超过到期日期的任务显示为逾期。作为日期存储在frontmatter中。"},scheduled:{name:"安排日期",description:"您计划处理任务的时间。与到期日期不同,这表示您预定的开始时间。任务在其安排的日期/时间出现在日历上。"},contexts:{name:"上下文",description:"可以完成任务的地点或条件(例如,@家、@办公室、@电话)。用于根据当前情况过滤任务。作为列表存储。"},projects:{name:"项目",description:"此任务所属的项目笔记链接。存储为wikilinks(例如,[[项目名称]])。任务可以属于多个项目。"},tags:{name:"标签",description:"用于分类任务的原生Obsidian标签。这些存储在tags frontmatter属性中,与Obsidian的标签功能配合使用。"},timeEstimate:{name:"时间估计",description:"完成任务的预计分钟数。用于时间块和工作量规划。显示在任务卡片和日历事件上。"},recurrence:{name:"重复",description:"重复任务的模式(每日、每周、每月、每年或自定义RRULE)。当重复任务完成时,其安排日期会自动更新到下一次出现。"},recurrenceAnchor:{name:"重复锚点",description:"控制下一次出现的计算方式:'scheduled'使用安排日期,'completion'使用实际完成日期。"},reminders:{name:"提醒",description:"在到期或安排日期前触发的通知。存储为带有时间和可选描述的提醒对象列表。"},title:{name:"标题",description:"任务名称。可以存储在frontmatter中或文件名中(启用'在文件名中存储标题'时)。"},dateCreated:{name:"创建日期",description:"任务首次创建的时间戳。自动设置,用于按创建顺序排序。"},dateModified:{name:"修改日期",description:"任务最后更改的时间戳。当任何任务属性更改时自动更新。"},completedDate:{name:"完成日期",description:"任务标记为完成的时间戳。当状态更改为已完成状态时自动设置。"},archiveTag:{name:"归档标签",description:"归档时添加到任务的标签。用于识别已归档的任务,可触发文件移动到归档文件夹。"},timeEntries:{name:"时间条目",description:"此任务的时间跟踪会话记录。每个条目存储开始和结束时间戳。用于计算总花费时间。"},completeInstances:{name:"完成实例",description:"重复任务的完成历史。存储每个实例完成的日期,以防止重复完成。"},skippedInstances:{name:"跳过实例",description:"重复任务的跳过记录。存储被跳过而非完成的实例日期。"},blockedBy:{name:"被阻止",description:"必须在此任务之前完成的任务链接。存储为wikilinks。被阻止的任务显示视觉指示器。"},sortOrder:{name:"手动顺序",description:"用于拖拽重排的 frontmatter 属性。视图必须按此属性排序,拖拽重排才能生效。"},pomodoros:{name:"番茄钟",description:"已完成的番茄钟会话计数。当数据存储设置为'日记'时,这将写入日记而不是任务文件。"},icsEventId:{name:"ICS事件ID",description:"将笔记链接到ICS日历事件的唯一标识符。从日历事件创建笔记时自动添加。"},icsEventTag:{name:"ICS事件标签",description:"标识从ICS日历事件创建的笔记的标签。用于区分日历生成的笔记和常规任务。"}},statusCard:{valuesHeader:"状态值"},priorityCard:{valuesHeader:"优先级值"},projectsCard:{defaultProjects:"默认项目:",useParentNoteForTaskCreation:"新任务使用当前笔记:",useParentNoteForInlineTasks:"内联/即时转换时使用父笔记:",useParentHeader:"使用父级标题作为项目:",inheritParentTaskProperties:"子任务继承父任务属性:",noDefaultProjects:"未选择默认项目",autosuggestFilters:"自动建议过滤器",customizeDisplay:"自定义显示",filtersOn:"过滤器开启"},titleCard:{storeTitleInFilename:"在文件名中存储标题:",storedInFilename:"存储在文件名中",filenameUpdatesWithTitle:"文件名将在任务标题更改时自动更新。",filenameFormat:"文件名格式:",customTemplate:"自定义模板:",legacySyntaxWarning:"像 {title} 这样的单花括号语法已弃用。请使用双花括号语法 {{title}} 以与正文模板保持一致。",occurrenceFilenameTemplate:"实例文件名模板",occurrenceFilenameTemplateHelp:"用于周期性任务实体化实例的文件名模板。留空可保留现有命名方式(父任务标题加数字后缀)。请使用 {{occurrenceDate}}、{{occurrenceWeek}}、{{occurrenceMonth}}、{{occurrenceYear}} 或 {{occurrenceMonthName}} 明确选择文件名粒度。所有常规文件名变量也可使用。父任务可以通过下方配置的 frontmatter 属性覆盖此模板。",occurrenceFilenameProperty:"实例模板覆盖属性",occurrenceFilenamePropertyHelp:"周期性父任务中用于覆盖其实例文件名模板的 frontmatter 属性名称。"},tagsCard:{nativeObsidianTags:"使用原生Obsidian标签"},remindersCard:{defaultReminders:"默认提醒"},taskStatuses:{header:"任务状态",description:"自定义任务可用的状态选项。这些状态控制任务生命周期并确定何时任务被视为完成。",howTheyWork:{title:"状态如何工作:",value:'值:存储在任务文件中的内部标识符(例如,"进行中")',label:'标签:在界面中显示的显示名称(例如,"进行中")',color:"颜色:状态点和徽章的视觉指示器颜色",icon:'图标:可选的 Lucide 图标名称,用于替代彩色圆点显示(例如,"check"、"circle"、"clock")。在 lucide.dev 浏览图标',completed:"已完成:选中时,具有此状态的任务被视为已完成,可能以不同方式过滤",autoArchive:"自动归档:启用时,任务将在指定延迟后自动归档(1-1440分钟)",orderNote:"下面的顺序确定点击任务状态徽章时循环状态的顺序。"},addNew:{name:"添加新状态",description:"为您的任务创建新的状态选项",buttonText:"添加状态"},validationNote:'注意:您必须至少有2个状态,并且至少一个状态必须标记为"已完成"。',emptyState:"未配置自定义状态。添加状态以开始。",emptyStateButton:"添加状态",fields:{value:"值:",label:"标签:",color:"颜色:",icon:"图标:",completed:"已完成:",excludeFromCycle:"循环时跳过:",nextStatus:"下一个状态:",autoArchive:"自动归档:",delayMinutes:"延迟(分钟):"},placeholders:{value:"进行中",label:"进行中",icon:"check, circle, clock",nextStatusDefault:"使用状态顺序"},badges:{completed:"已完成"},deleteConfirm:'您确定要删除状态"{label}"吗?'},taskPriorities:{header:"任务优先级",description:"自定义任务可用的优先级级别。在 v4.0+ 中,优先级在 Bases 视图中按其值的字母顺序排序。",howTheyWork:{title:"优先级如何工作:",value:'值:存储在任务文件中的内部标识符。使用前缀如 "1-urgent"、"2-high" 来控制 Bases 视图中的排序顺序。',label:'显示标签:在界面中显示的显示名称(例如,"高优先级")',color:"颜色:优先级点和徽章的视觉指示器颜色",icon:"图标:在任务卡片上替代优先级点显示的可选 Lucide 图标",weight:"权重:用于排序的数值(权重高的优先出现在列表中)",weightNote:"任务按优先级权重降序自动排序(最高权重优先)。权重可以是任何正数。"},addNew:{name:"添加新优先级",description:"为您的任务创建新的优先级级别",buttonText:"添加优先级"},validationNote:"注意:您必须至少有1个优先级。优先级在 Bases 视图中按值的字母顺序排序。",emptyState:"未配置自定义优先级。添加优先级以开始。",emptyStateButton:"添加优先级",fields:{value:"值:",label:"标签:",color:"颜色:",icon:"图标:",weight:"权重:"},placeholders:{value:"高",label:"高优先级",icon:"alert-circle"},weightLabel:"权重:{weight}",deleteConfirm:"您必须至少有一个优先级",deleteTooltip:"删除优先级"},fieldMapping:{header:"字段映射",warning:"⚠️ 警告:TaskNotes将使用这些属性名称进行读取和写入。在创建任务后更改这些可能导致不一致。",description:"配置TaskNotes应为每个字段使用的前置属性。",resetButton:{name:"重置字段映射",description:"将所有字段映射重置为默认值",buttonText:"重置为默认值"},notices:{resetSuccess:"字段映射已重置为默认值",resetFailure:"重置字段映射失败",updateFailure:"更新{label}的字段映射失败。请重试。"},table:{fieldHeader:"TaskNotes字段",propertyHeader:"您的属性名称"},fields:{title:"标题",status:"状态",priority:"优先级",due:"到期日期",scheduled:"安排日期",contexts:"上下文",projects:"项目",timeEstimate:"时间估计",recurrence:"重复",dateCreated:"创建日期",completedDate:"完成日期",dateModified:"修改日期",archiveTag:"归档标签",timeEntries:"时间条目",completeInstances:"完成实例",blockedBy:"被阻止",sortOrder:"手动顺序",pomodoros:"番茄钟",icsEventId:"ICS事件ID",icsEventTag:"ICS事件标签",reminders:"提醒"}},customUserFields:{header:"自定义用户字段",description:"定义自定义前置属性,作为类型感知过滤选项出现在各个视图中。每行:显示名称、属性名称、类型。",addNew:{name:"添加新用户字段",description:"创建将出现在过滤器和视图中的新自定义字段",buttonText:"添加用户字段"},emptyState:"未配置自定义用户字段。添加字段为您的任务创建自定义属性。",emptyStateButton:"添加用户字段",fields:{displayName:"显示名称:",propertyKey:"属性键:",type:"类型:",defaultValue:"默认值:"},placeholders:{displayName:"显示名称",propertyKey:"属性名称",defaultValue:"默认值",defaultValueList:"默认值(逗号分隔)"},types:{text:"文本",number:"数字",boolean:"布尔值",date:"日期",list:"列表"},defaultNames:{unnamedField:"未命名字段",noKey:"无键"},deleteTooltip:"删除字段",autosuggestFilters:{header:"自动建议过滤器(高级)",description:"过滤在此字段的自动完成建议中显示的文件"}}},appearance:{taskCards:{header:"任务卡片",description:"配置任务卡片在所有视图中的显示方式。",defaultVisibleProperties:{name:"默认可见属性",description:"选择默认在任务卡片上显示的属性。"},completionSubmenu:{name:"将完成和跳过操作归入子菜单",description:"在任务右键菜单的子菜单中显示完成和跳过操作。关闭后,这些操作将直接显示在菜单中。"},propertyGroups:{coreProperties:"核心属性",organization:"组织",customProperties:"自定义属性"},properties:{status:"状态点",priority:"优先级点",due:"到期日期",scheduled:"安排日期",timeEstimate:"时间估计",totalTrackedTime:"总跟踪时间",checklistProgress:"清单进度",recurrence:"重复",completedDate:"完成日期",createdDate:"创建日期",modifiedDate:"修改日期",projects:"项目",contexts:"上下文",tags:"标签",blocked:"已阻塞",blocking:"阻塞中"}},taskFilenames:{header:"任务文件名",description:"配置创建任务文件时的命名方式。",storeTitleInFilename:{name:"在文件名中存储标题",description:"使用任务标题作为文件名。任务标题更改时文件名会更新(推荐)。"},filenameFormat:{name:"文件名格式",description:"任务文件名的生成方式",options:{title:"任务标题(不更新)",zettel:"Zettelkasten格式(YYMMDD + base36自午夜以来的秒数)",timestamp:"完整时间戳(YYYY-MM-DD-HHMMSS)",custom:"自定义模板",uuid:"UUID v4"}},customTemplate:{name:"自定义文件名模板",description:"自定义文件名模板。可用变量:{{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"注意:{{dueDate}}和{{scheduledDate}}格式为YYYY-MM-DD,如果未设置则为空。"}},displayFormatting:{header:"显示格式",description:"配置整个插件中日期、时间和其他数据的显示方式。",timeFormat:{name:"时间格式",description:"在整个插件中以12小时或24小时格式显示时间",options:{twelveHour:"12小时(AM/PM)",twentyFourHour:"24小时"}}},calendarView:{header:"日历视图",description:"自定义日历视图的外观和行为。",defaultView:{name:"默认视图",description:"打开日历选项卡时显示的日历视图",options:{monthGrid:"月网格",weekTimeline:"周时间线",dayTimeline:"日时间线",yearView:"年视图",customMultiDay:"自定义多日"}},customDayCount:{name:"自定义视图天数",description:"自定义多日视图中显示的天数",placeholder:"3"},firstDayOfWeek:{name:"一周的第一天",description:"周视图中应作为第一列的日期"},showWeekends:{name:"显示周末",description:"在日历视图中显示周末"},showWeekNumbers:{name:"显示周数",description:"在日历视图中显示周数"},showTodayHighlight:{name:"显示今日高亮",description:"在日历视图中高亮当前日期"},showCurrentTimeIndicator:{name:"显示当前时间指示器",description:"在时间线视图中显示显示当前时间的线"},selectionMirror:{name:"选择镜像",description:"拖拽选择时间范围时显示视觉预览"},calendarLocale:{name:"日历区域设置",description:'日期格式和日历系统的日历区域设置(例如,"en"、"fa"表示波斯语/波斯文、"de"表示德语)。留空以从浏览器自动检测。',placeholder:"自动检测",invalidLocale:"无效的区域设置。请输入有效的语言标签(例如:'zh'、'en'、'fr-FR')。"}},defaultEventVisibility:{header:"默认事件可见性",description:"配置打开日历时默认可见的事件类型。用户仍可在日历视图中切换这些开/关。",showScheduledTasks:{name:"显示安排的任务",description:"默认显示有安排日期的任务"},showDueDates:{name:"显示到期日期",description:"默认显示任务到期日期"},showDueWhenScheduled:{name:"安排时显示到期日期",description:"即使对于已有安排日期的任务也显示到期日期"},showTimeEntries:{name:"显示时间条目",description:"默认显示已完成的时间跟踪条目"},showRecurringTasks:{name:"显示重复任务",description:"默认显示重复任务实例"},showICSEvents:{name:"显示ICS事件",description:"默认显示来自ICS订阅的事件"}},timeSettings:{header:"时间设置",description:"配置时间线视图的时间相关显示设置。",timeSlotDuration:{name:"时间段持续时间",description:"时间线视图中每个时间段的持续时间",options:{fifteenMinutes:"15分钟",thirtyMinutes:"30分钟",sixtyMinutes:"60分钟"}},startTime:{name:"开始时间",description:"时间线视图中显示的最早时间(HH:MM格式)",placeholder:"06:00"},endTime:{name:"结束时间",description:"时间线视图中显示的最晚时间(HH:MM 格式)。使用大于 24:00 的值可显示次日凌晨时间,例如 26:00 表示凌晨 2 点。",placeholder:"26:00"},initialScrollTime:{name:"初始滚动时间",description:"打开时间线视图时滚动到的时间(HH:MM格式)",placeholder:"09:00"},eventMinHeight:{name:"事件最小高度",description:"时间轴视图中事件的最小高度(像素)",placeholder:"15"}},uiElements:{header:"界面元素",description:"配置各种界面元素的显示。",showTrackedTasksInStatusBar:{name:"在状态栏中显示跟踪的任务",description:"在Obsidian状态栏中显示当前跟踪的任务"},showProjectSubtasksWidget:{name:"显示项目子任务小部件",description:"显示显示当前项目笔记子任务的小部件"},projectSubtasksPosition:{name:"项目子任务位置",description:"项目子任务小部件的定位位置",options:{top:"笔记顶部",bottom:"笔记底部"}},showRelationshipsWidget:{name:"显示关系小部件",description:"显示一个小部件,展示当前笔记的所有关系(子任务、项目、依赖项)"},relationshipsPosition:{name:"关系位置",description:"关系小部件的位置",options:{top:"笔记顶部",bottom:"笔记底部"}},showTaskCardInNote:{name:"在笔记中显示任务卡片",description:"在任务笔记顶部显示任务卡片小部件,显示任务详情和操作"},showCompletedTaskStrikethrough:{name:"为已完成任务标题添加删除线",description:"在已完成任务卡片标题上画一条线。关闭后已完成任务会更易阅读"},showExpandableSubtasks:{name:"显示可展开子任务",description:"允许在任务卡片中展开/折叠子任务部分"},expandSubtasksByDefault:{name:"默认展开子任务",description:"渲染任务卡片时展开显示项目子任务"},subtaskChevronPosition:{name:"子任务chevron位置",description:"任务卡片中展开/折叠chevron的位置",options:{left:"左侧",right:"右侧"}},viewsButtonAlignment:{name:"视图按钮对齐",description:"任务界面中视图/过滤器按钮的对齐方式",options:{left:"左侧",right:"右侧"}}},projectAutosuggest:{header:"项目自动建议",description:"自定义任务创建期间项目建议的显示方式。",requiredTags:{name:"必需标签",description:"仅显示具有这些标签之一的笔记(逗号分隔)。留空以显示所有笔记。",placeholder:"项目,活动,重要"},includeFolders:{name:"包含文件夹",description:"仅显示这些文件夹中的笔记(逗号分隔路径)。留空以显示所有文件夹。",placeholder:"项目/,工作/活动,个人"},requiredPropertyKey:{name:"必需属性键",description:"仅显示此前置属性与下面值匹配的笔记。留空以忽略。",placeholder:"类型"},requiredPropertyValue:{name:"必需属性值",description:"仅建议属性等于此值的笔记。留空以要求属性存在。",placeholder:"项目"},customizeDisplay:{name:"自定义建议显示",description:"显示高级选项以配置项目建议的显示方式及其显示的信息。"},enableFuzzyMatching:{name:"启用模糊匹配",description:"在项目搜索中允许拼写错误和部分匹配。在大型库中可能较慢。"},displayRowsHelp:"配置为每个项目建议显示最多3行信息。",displayRows:{row1:{name:"第1行",description:"格式:{property|flags}。属性:title、aliases、file.path、file.parent。标志:n(Label)显示标签,s使其可搜索。示例:{title|n(Title)|s}",placeholder:"{title|n(标题)}"},row2:{name:"第2行(可选)",description:"常见模式:{aliases|n(Aliases)}、{file.parent|n(Folder)}、literal:自定义文本",placeholder:"{aliases|n(别名)}"},row3:{name:"第3行(可选)",description:"其他信息如{file.path|n(Path)}或自定义前置字段",placeholder:"{file.path|n(路径)}"}},quickReference:{header:"快速参考",properties:"可用属性:title、aliases、file.path、file.parent或任何前置字段",labels:'添加标签:{title|n(Title)} → "Title: My Project"',searchable:"使其可搜索:{description|s}在+搜索中包含描述",staticText:"静态文本:literal:My Custom Label",alwaysSearchable:"文件名、标题和别名默认始终可搜索。"}},dataStorage:{name:"存储位置",description:"番茄钟会话历史的存储位置",pluginData:"插件数据(推荐)",dailyNotes:"日记",notices:{locationChanged:"番茄钟存储位置已更改为{location}"}},notifications:{description:"配置任务提醒通知和警报。"},performance:{description:"配置插件性能和行为选项。"},timeTrackingSection:{description:"配置自动时间跟踪行为。"},recurringSection:{description:"配置重复任务管理的行为。"}},integrations:{mobileCalendar:{disable:{name:"在移动端禁用日历集成",description:"在 Obsidian Mobile 上跳过 Google、Microsoft 和 ICS 日历加载。桌面端日历集成不受影响。"},status:{name:"此移动设备已禁用日历集成",description:"关闭此设置并重新加载 Obsidian Mobile,以恢复日历加载。"}},basesIntegration:{header:"Bases集成",description:"配置与Obsidian Bases插件的集成。这是一个实验性功能,目前依赖于未记录的Obsidian API。行为可能会改变或中断。",enable:{name:"启用Bases集成",description:"启用TaskNotes视图在Obsidian Bases插件中使用。必须启用Bases插件才能工作。"},viewCommands:{header:"视图与 Base 文件",description:"TaskNotes 使用 Obsidian Bases 文件(.base)来呈现视图。这些文件在启动时自动生成(如果不存在),并使用您当前的设置进行配置(任务识别、字段映射、状态等)。",descriptionRegen:"更改设置时,Base 文件不会自动更新。要应用新设置,请使用下方的“更新文件”,删除现有 .base 文件并重启 Obsidian,或手动编辑它们。",docsLink:"查看可用公式和自定义选项的文档",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"打开迷你日历视图",kanban:"打开看板视图",tasks:"打开任务视图",advancedCalendar:"打开高级日历视图",agenda:"打开议程视图",relationships:"关系小部件",pomodoroStats:"Pomodoro 统计 Base"},fileLabel:"文件:{path}",resetButton:"重置",resetTooltip:"重置为默认路径",pomodoroDailyNotesHint:"生成的 Pomodoro 统计 Base 会从每日笔记读取 Pomodoro 历史。如果历史仍存储在插件数据中,请先在设置中迁移后再使用该 Base 文件。"},autoCreateDefaultFiles:{name:"自动创建默认文件",description:"启动时自动创建缺失的默认 Base 视图文件。禁用以防止已删除的示例文件被重新创建。"},createDefaultFiles:{name:"创建默认文件",description:"在 TaskNotes/Views/ 目录中创建默认的 .base 文件。现有文件不会被覆盖。",buttonText:"创建文件"},exportV3Views:{name:"将V3保存的视图导出到Bases",description:"将您所有来自 TaskNotes v3 的保存视图转换为包含多个视图的单个 .base 文件。这有助于将您的 v3 过滤器配置迁移到新的 Bases 系统。",buttonText:"导出V3视图",noViews:"没有保存的视图可导出",fileExists:"文件已存在",confirmOverwrite:'名为"{fileName}"的文件已存在。是否覆盖?',success:"已将 {count} 个保存的视图导出到 {filePath}",error:"导出视图失败:{message}"},notices:{enabled:"Bases集成已启用。请重启Obsidian以完成设置。",disabled:"Bases集成已禁用。请重启Obsidian以完成移除。"},updateDefaultFiles:{name:"更新默认文件",description:"用根据当前 TaskNotes 设置生成的模板覆盖已配置的默认 .base 文件。",buttonText:"更新文件",confirmTitle:"更新默认 Base 文件",confirmMessage:"这会用新生成的模板覆盖已配置的默认 .base 文件。这些文件中的任何手动编辑都将被替换。",confirmText:"更新文件"}},calendarSubscriptions:{header:"日历订阅",description:"通过ICS/iCal URL订阅外部日历,以查看事件和任务。",defaultNoteTemplate:{name:"默认笔记模板",description:"从ICS事件创建笔记的模板文件路径",placeholder:"模板/事件模板.md"},defaultNoteFolder:{name:"默认笔记文件夹",description:"从ICS事件创建笔记的文件夹",placeholder:"日历/事件"},filenameFormat:{name:"ICS笔记文件名格式",description:"从ICS事件创建笔记的文件名生成方式",options:{title:"事件标题",zettel:"Zettelkasten格式",timestamp:"时间戳",custom:"自定义模板"}},customTemplate:{name:"自定义ICS文件名模板",description:"自定义ICS事件文件名的模板",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"使用ICS事件结束时间作为任务截止日期",description:"启用后,从日历事件创建的任务将把截止日期设置为事件的结束时间。对于全天事件,截止日期将设置为事件日期。对于有时间的事件,截止日期将包含结束时间。"},recurringEventRelatedNotesMode:{name:"重复事件的关联笔记",description:"选择关联到外部日历事件某一次重复的笔记,是显示在已加载的整个系列中,还是仅显示在所选实例上。",options:{series:"整个系列",instance:"仅所选实例"}}},subscriptionsList:{header:"日历订阅列表",addSubscription:{name:"添加日历订阅",description:"从ICS/iCal URL或本地文件添加新的日历订阅",buttonText:"添加订阅"},refreshAll:{name:"刷新所有订阅",description:"手动刷新所有启用的日历订阅",buttonText:"刷新全部"},newCalendarName:"新日历",emptyState:"未配置日历订阅。添加订阅以同步外部日历。",notices:{addSuccess:"新日历订阅已添加 - 请配置详细信息",addFailure:"添加订阅失败",serviceUnavailable:"ICS订阅服务不可用",refreshSuccess:"所有日历订阅刷新成功",refreshFailure:"刷新某些日历订阅失败",updateFailure:"更新订阅失败",deleteSuccess:'删除订阅"{name}"',deleteFailure:"删除订阅失败",enableFirst:"请先启用订阅",refreshSubscriptionSuccess:'刷新"{name}"',refreshSubscriptionFailure:"刷新订阅失败"},labels:{enabled:"已启用:",name:"名称:",type:"类型:",url:"URL:",filePath:"文件路径:",color:"颜色:",refreshMinutes:"刷新(分钟):"},typeOptions:{remote:"远程URL",local:"本地文件"},placeholders:{calendarName:"日历名称",url:"ICS/iCal 地址",filePath:"本地文件路径(例如,Calendar.ics)",localFile:"日历.ics"},statusLabels:{enabled:"已启用",disabled:"已禁用",remote:"远程",localFile:"本地文件",remoteCalendar:"远程日历",localFileCalendar:"本地文件",synced:"{timeAgo}已同步",error:"错误"},actions:{refreshNow:"立即刷新",deleteSubscription:"删除订阅"},refreshNow:"立即刷新",confirmDelete:{title:"删除订阅",message:'您确定要删除订阅"{name}"吗?此操作无法撤销。',confirmText:"删除"}},autoExport:{header:"自动ICS导出",description:"自动将所有任务导出到ICS文件。",enable:{name:"启用自动导出",description:"自动保持ICS文件与所有任务更新"},filePath:{name:"导出文件路径",description:"ICS文件保存的路径(相对于库根目录)",placeholder:"tasknotes-日历.ics"},interval:{name:"更新间隔(5到1440分钟之间)",description:"更新导出文件的频率",placeholder:"60"},useDuration:{name:"使用任务持续时间作为事件长度",description:"启用后,使用任务的时间估计(持续时间)而不是截止日期作为日历事件的结束时间。这对于GTD工作流程很有用,其中计划 + 持续时间代表工作规划,而截止日期代表最后期限。"},exportNow:{name:"立即导出",description:"手动触发立即导出",buttonText:"立即导出"},status:{title:"导出状态:",lastExport:"上次导出:{time}",nextExport:"下次导出:{time}",noExports:"尚未导出",notScheduled:"未计划",notInitialized:"自动导出服务未初始化 - 请重启Obsidian",serviceNotInitialized:"服务未初始化 - 请重启 Obsidian"},notices:{reloadRequired:"请重新加载Obsidian以使自动导出更改生效。",exportSuccess:"任务导出成功",exportFailure:"导出失败 - 检查控制台获取详细信息",serviceUnavailable:"自动导出服务不可用"},excludeCompleted:{name:"排除已完成任务",description:"启用后,已完成任务会从 ICS 导出中省略。已完成状态来自任务状态设置。"},excludeArchived:{name:"排除已归档任务",description:"启用后,已归档任务会从 ICS 导出中省略。"},requireDueDate:{name:"要求截止日期",description:"启用后,只有带截止日期的任务会包含在 ICS 导出中。"},requireScheduledDate:{name:"要求计划日期",description:"启用后,只有带计划日期的任务会包含在 ICS 导出中。"}},googleCalendarExport:{header:"将任务导出到Google日历",description:"自动将您的任务同步到Google日历作为事件。需要在上方连接Google日历。",enable:{name:"启用任务导出",description:"启用后,带有日期的任务将自动同步到Google日历作为事件。"},targetCalendar:{name:"目标日历",description:"选择要创建任务事件的日历。",placeholder:"选择日历...",connectFirst:"请先连接Google日历",primarySuffix:"(主要)"},syncTrigger:{name:"同步触发器",description:"哪个任务日期应触发日历事件创建。",options:{scheduled:"计划日期",due:"截止日期",both:"两者(优先计划日期)"}},allDayEvents:{name:"创建为全天事件",description:"启用后,任务将创建为全天事件。禁用后,使用时间估计作为持续时间。"},defaultDuration:{name:"默认事件持续时间",description:"带时间的事件持续时间(分钟)(当任务没有时间估计时使用)。"},eventTitleTemplate:{name:"事件标题模板",description:"事件标题模板。可用变量:{{title}}、{{status}}、{{priority}}",placeholder:"{{title}}"},includeDescription:{name:"在描述中包含任务详情",description:"将任务元数据(优先级、状态、标签等)添加到事件描述中。"},includeObsidianLink:{name:"包含Obsidian链接",description:"在事件描述中添加返回Obsidian中任务的链接。"},defaultReminder:{name:"默认提醒",description:"为带时间的 Google Calendar 事件添加弹出提醒。请输入事件开始前的分钟数,用逗号分隔。留空则使用日历默认值。常用值:15、30、60、1440。"},automaticSyncBehavior:{header:"自动同步行为"},syncOnCreate:{name:"创建任务时同步",description:"创建新任务时自动创建日历事件。"},syncOnUpdate:{name:"更新任务时同步",description:"修改任务时自动更新日历事件。"},syncOnComplete:{name:"完成任务时同步",description:"任务完成时更新日历事件(在标题中添加勾选标记)。"},syncOnDelete:{name:"删除任务时删除事件",description:"删除相应任务时删除日历事件。"},manualSyncActions:{header:"手动同步操作"},syncAllTasks:{name:"同步所有任务",description:"将所有现有任务同步到Google日历。这将为尚未同步的任务创建事件。",buttonText:"全部同步"},unlinkAllTasks:{name:"取消关联所有任务",description:"删除所有任务-事件关联而不删除日历事件。",buttonText:"全部取消关联",confirmTitle:"取消关联所有任务",confirmMessage:"这将删除任务和日历事件之间的所有关联。日历事件将保留,但任务更改时不再更新。确定吗?",confirmButtonText:"全部取消关联"},notices:{notEnabled:"Google日历导出未启用。请在设置 > 集成中配置。",notEnabledOrConfigured:"Google日历导出未启用或未配置",serviceNotAvailable:"任务日历同步服务不可用",syncResults:"已同步:{synced},失败:{failed},跳过:{skipped}",taskSynced:"任务已同步到Google日历",noActiveFile:"当前没有活动文件",notATask:"当前文件不是任务",noDateToSync:"任务没有可同步的计划日期或截止日期",syncFailed:"同步任务到Google日历失败:{message}",connectionExpired:"Google 日历连接已过期。请在“设置 > 集成”中重新连接。",syncingTasks:"正在同步{total}个任务到Google日历...",syncComplete:"同步完成:{synced}个已同步,{failed}个失败,{skipped}个跳过",eventsDeletedAndUnlinked:"所有事件已删除并取消关联",tasksUnlinked:"所有任务关联已删除"},eventDescription:{untitledTask:"无标题任务",priority:"优先级:{value}",status:"状态:{value}",due:"截止:{value}",scheduled:"计划:{value}",timeEstimate:"时间估计:{value}",tags:"标签:{value}",contexts:"上下文:{value}",projects:"项目:{value}",openInObsidian:"在Obsidian中打开"}},httpApi:{header:"HTTP API",description:"启用HTTP API进行外部集成和自动化。",enable:{name:"启用HTTP API",description:"启动本地HTTP服务器进行API访问"},port:{name:"API端口",description:"HTTP API服务器的端口号",placeholder:"3000"},authToken:{name:"API认证令牌",description:"这是TaskNotes令牌,不是AI服务提供商的API密钥。要生成令牌,请启用HTTP API,将此字段留空,然后重启Obsidian。随后将生成的令牌复制到客户端的Bearer认证设置中。每次更改令牌后,都需要更新客户端设置。",placeholder:"你的秘密令牌"},mcp:{enable:{name:"启用 MCP 服务器",description:"通过 /mcp 端点使用 Model Context Protocol 暴露 TaskNotes 工具。需要启用 HTTP API。"}},endpoints:{header:"可用API端点",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhooks",description:{overview:"Webhooks在TaskNotes事件发生时向外部服务发送实时通知。",usage:"配置webhooks以与自动化工具、同步服务或自定义应用程序集成。"},addWebhook:{name:"添加Webhook",description:"注册新的webhook端点",buttonText:"添加Webhook"},emptyState:{message:"未配置webhooks。添加webhook以接收实时通知。",buttonText:"添加Webhook"},labels:{active:"活动:",url:"URL:",events:"事件:",transform:"转换:"},placeholders:{url:"Webhook 地址",noEventsSelected:"未选择事件",rawPayload:"原始载荷(无转换)"},statusLabels:{active:"活动",inactive:"非活动",created:"创建于{timeAgo}"},actions:{editEvents:"编辑事件",delete:"删除"},editEvents:"编辑事件",notices:{urlUpdated:"Webhook URL已更新",enabled:"Webhook已启用",disabled:"Webhook已禁用",created:"Webhook创建成功",deleted:"Webhook已删除",updated:"Webhook已更新"},confirmDelete:{title:"删除Webhook",message:`您确定要删除此webhook吗?
URL:{url}
此操作无法撤销。`,confirmText:"删除"},cardHeader:"Webhook",cardFields:{active:"活动:",url:"URL:",events:"事件:",transform:"转换:"},eventsDisplay:{noEvents:"未选择事件"},transformDisplay:{noTransform:"原始载荷(无转换)"},secretModal:{title:"Webhook密钥已生成",description:"您的webhook密钥已生成。保存此密钥,因为您无法再次查看它:",usage:"使用此密钥在您的接收应用程序中验证webhook载荷。",gotIt:"知道了"},editModal:{title:"编辑Webhook",eventsHeader:"要订阅的事件"},events:{taskCreated:{label:"任务已创建",description:"创建新任务时"},taskUpdated:{label:"任务已更新",description:"修改任务时"},taskCompleted:{label:"任务已完成",description:"标记任务为完成时"},taskDeleted:{label:"任务已删除",description:"删除任务时"},taskArchived:{label:"任务已归档",description:"归档任务时"},taskUnarchived:{label:"任务已取消归档",description:"取消归档任务时"},timeStarted:{label:"时间已开始",description:"开始时间跟踪时"},timeStopped:{label:"时间已停止",description:"停止时间跟踪时"},pomodoroStarted:{label:"番茄钟已开始",description:"番茄钟会话开始时"},pomodoroCompleted:{label:"番茄钟已完成",description:"番茄钟会话完成时"},pomodoroInterrupted:{label:"番茄钟已中断",description:"番茄钟会话停止时"},recurringCompleted:{label:"重复实例已完成",description:"重复任务实例完成时"},reminderTriggered:{label:"提醒已触发",description:"任务提醒激活时"}},modals:{secretGenerated:{title:"Webhook密钥已生成",description:"您的webhook密钥已生成。保存此密钥,因为您无法再次查看它:",usage:"使用此密钥在您的接收应用程序中验证webhook载荷。",buttonText:"知道了"},edit:{title:"编辑Webhook",eventsSection:"要订阅的事件",transformSection:"转换配置(可选)",headersSection:"标头配置",transformFile:{name:"转换文件",description:"库中转换webhook载荷的.json模板文件路径",placeholder:"simple-template.json"},customHeaders:{name:"包含自定义标头",description:"包含TaskNotes标头(事件类型、签名、交付ID)。对于Discord、Slack和其他具有严格CORS策略的服务,请关闭。"},buttons:{cancel:"取消",save:"保存更改"},notices:{selectAtLeastOneEvent:"请至少选择一个事件"}},add:{title:"添加Webhook",eventsSection:"要订阅的事件",transformSection:"转换配置(可选)",headersSection:"标头配置",url:{name:"Webhook 地址",description:"将发送webhook载荷的端点",placeholder:"https://your-service.com/webhook"},transformFile:{name:"转换文件",description:"库中转换webhook载荷的.json模板文件路径",placeholder:"simple-template.json"},customHeaders:{name:"包含自定义标头",description:"包含TaskNotes标头(事件类型、签名、交付ID)。对于Discord、Slack和其他具有严格CORS策略的服务,请关闭。"},transformHelp:{title:"JSON转换模板允许您自定义webhook载荷:",jsFiles:"",jsDescription:"",jsonFiles:".json文件:",jsonDescription:" 使用模板",jsonVariable:"${data.task.title}",leaveEmpty:"留空:",leaveEmptyDescription:" 发送原始数据",example:"示例:",exampleFile:"simple-template.json"},buttons:{cancel:"取消",add:"添加Webhook"},notices:{urlRequired:"需要Webhook URL",selectAtLeastOneEvent:"请至少选择一个事件"}}}},otherIntegrations:{header:"其他插件集成",description:"配置与其他Obsidian插件的集成。"},mdbaseSpec:{header:"mdbase类型定义",learnMore:"了解更多关于 mdbase-spec 的信息",enable:{name:"生成 mdbase 类型定义",description:"随着设置变化,在库根目录生成并维护 mdbase 类型文件(mdbase.yaml 和 _types/task.md)。"}},timeFormats:{justNow:"刚刚",minutesAgo:"{minutes}分钟{plural}前",hoursAgo:"{hours}小时{plural}前",daysAgo:"{days}天{plural}前"}}},notices:{languageChanged:"语言已更改为{language}。",releaseAvailable:{message:"TaskNotes {version} 可用。",action:"在社区插件中打开"},exportTasksFailed:"导出任务为ICS文件失败",icsNoteCreatedSuccess:"笔记成功创建",icsCreationModalOpenFailed:"打开创建模式失败",icsNoteLinkSuccess:'关联的笔记 "{fileName}" to ICS event',icsTaskCreatedSuccess:"任务已创建:{title}",icsRelatedItemsRefreshed:"相关笔记已刷新",icsFileNotFound:"文件未找到或无效",icsFileOpenFailed:"打开文件失败",timeblockAttachmentExists:'"{fileName}" is already attached',timeblockAttachmentAdded:'已添加 "{fileName}" as attachment',timeblockAttachmentRemoved:'已删除 "{fileName}" from attachments',timeblockFileTypeNotSupported:'无法打开 "{fileName}" - file type not supported',timeblockTitleRequired:"请为时间块输入标题",timeblockUpdatedSuccess:'时间块 "{title}" updated successfully',timeblockUpdateFailed:"更新时间块失败。检查控制台了解详情。",timeblockDeletedSuccess:'时间块 "{title}" deleted successfully',timeblockDeleteFailed:"删除时间块失败。检查控制台了解详情。",timeblockRequiredFieldsMissing:"请填写所有必填字段",agendaLoadingFailed:"加载议程时出错。请尝试刷新。",statsLoadingFailed:"加载项目详情时出错。"},commands:{openCalendarView:"打开迷你日历视图",openAdvancedCalendarView:"打开日历视图",openTasksView:"打开任务视图",openNotesView:"打开笔记视图",openAgendaView:"打开议程视图",openPomodoroView:"打开番茄钟计时器",openKanbanView:"打开看板",updateDefaultBaseFiles:"更新默认 Base 文件",openPomodoroStats:"打开番茄钟统计",openStatisticsView:"打开任务和项目统计",createNewTask:"创建新任务",convertCurrentNoteToTask:{name:"将当前笔记转换为任务",noActiveFile:"没有可转换的活动文件",alreadyTask:"此笔记已是任务",success:"已将'{title}'转换为任务"},convertToTaskNote:"将复选框任务转换为TaskNote",convertAllTasksInNote:"转换笔记中的所有任务",insertTaskNoteLink:"插入任务笔记链接",createInlineTask:"创建新内联任务",quickActionsCurrentTask:"当前任务的快速操作",goToTodayNote:"转到今日笔记",startPomodoro:"开始番茄钟计时器",stopPomodoro:"停止番茄钟计时器",pauseResumePomodoro:"暂停/恢复番茄钟计时器",refreshCache:"刷新缓存",exportAllTasksIcs:"导出所有任务为ICS文件",viewReleaseNotes:"查看版本说明",startTimeTrackingCurrentTask:"开始跟踪当前任务的时间",stopTimeTrackingCurrentTask:"停止跟踪当前任务的时间",startTimeTrackingWithSelector:"开始时间跟踪(选择任务)",editTimeEntries:"编辑时间条目(选择任务)",createOrOpenTask:"创建或打开任务",createOrOpenTaskWithTracking:"创建或打开任务并开始时间跟踪",rolloverOverdueScheduledTasks:"将逾期的计划任务推迟到今天",syncAllTasksGoogleCalendar:"同步所有任务到Google日历",syncCurrentTaskGoogleCalendar:"同步当前任务到Google日历",quickActionsTaskUnderCursor:"光标下任务的快速操作",editCurrentTask:"编辑当前任务",cycleCurrentTaskStatus:"循环当前任务状态",cycleCurrentTaskPriority:"循环当前任务优先级",addProjectToCurrentTask:"向当前任务添加项目",addSubtaskToCurrentNote:"向当前笔记添加子任务"},modals:{deviceCode:{title:"谷歌日历授权",instructions:{intro:"要连接您的 Google 日历,请按照以下步骤操作:"},steps:{open:"打开",inBrowser:"在您的浏览器中",enterCode:"在提示时输入此代码:",signIn:"使用您的 Google 帐户登录并授予访问权限",returnToObsidian:"返回 Obsidian(此窗口将自动关闭)"},codeLabel:"您的代码:",copyCodeAriaLabel:"复制代码",waitingForAuthorization:"等待授权中...",openBrowserButton:"打开浏览器",cancelButton:"取消",expiresMinutesSeconds:"代码在 {minutes}m {seconds}s 后过期",expiresSeconds:"代码在 {seconds}s 后过期"},icsEventInfo:{calendarEventHeading:"日历事件",titleLabel:"标题",calendarLabel:"日历",dateTimeLabel:"日期和时间",locationLabel:"位置",descriptionLabel:"描述",urlLabel:"网址",relatedNotesHeading:"相关笔记和任务",noRelatedItems:"未找到与此事件相关的笔记或任务。",typeTask:"任务",typeNote:"笔记",actionsHeading:"操作",createFromEventLabel:"从事件创建",createFromEventDesc:"从此日历事件创建新的笔记或任务",linkExistingLabel:"链接现有",linkExistingDesc:"将现有笔记链接到此日历事件"},timeblockInfo:{editHeading:"编辑时间块",dateTimeLabel:"日期和时间:",titleLabel:"标题",titleDesc:"时间块的标题",titlePlaceholder:"例如,深度工作会话",descriptionLabel:"描述",descriptionDesc:"时间块的可选描述",descriptionPlaceholder:"专注于新功能,无干扰",colorLabel:"颜色",colorDesc:"时间块的可选颜色",colorPlaceholder:"#3b82f6",attachmentsLabel:"附件",attachmentsDesc:"与此时间块关联的文件或笔记",addAttachmentButton:"添加附件",addAttachmentTooltip:"使用模糊搜索选择文件或笔记",deleteButton:"删除时间块",saveButton:"保存更改",deleteConfirmationTitle:"删除时间块"},timeblockCreation:{heading:"创建时间块",dateLabel:"日期:",titleLabel:"标题",titleDesc:"时间块的标题",titlePlaceholder:"例如,深度工作会话",startTimeLabel:"开始时间",startTimeDesc:"时间块何时开始",startTimePlaceholder:"09:00",endTimeLabel:"结束时间",endTimeDesc:"时间块何时结束",endTimePlaceholder:"11:00",descriptionLabel:"描述",descriptionDesc:"时间块的可选描述",descriptionPlaceholder:"专注于新功能,无干扰",colorLabel:"颜色",colorDesc:"时间块的可选颜色",colorPlaceholder:"#3b82f6",attachmentsLabel:"附件",attachmentsDesc:"要与此时间块关联的文件或笔记",addAttachmentButton:"添加附件",addAttachmentTooltip:"使用模糊搜索选择文件或笔记",createButton:"创建时间块"},calendarEventCreation:{heading:"创建日历事件",dateTimeLabel:"日期和时间:",titleLabel:"标题",titleDesc:"日历事件的标题",titlePlaceholder:"例如:团队会议",calendarLabel:"日历",calendarDesc:"在哪个日历中创建事件",descriptionLabel:"描述",descriptionDesc:"事件的可选描述",descriptionPlaceholder:"添加此事件的详细信息...",locationLabel:"地点",locationDesc:"事件的可选地点",locationPlaceholder:"例如:会议室A",createButton:"创建事件",titleRequired:"事件标题为必填项",noCalendarSelected:"未选择日历",success:'日历事件 "{title}" 已创建',error:"创建日历事件失败:{message}"},icsNoteCreation:{heading:"从 ICS 事件创建",titleLabel:"标题",titleDesc:"新内容的标题",folderLabel:"文件夹",folderDesc:"目标文件夹(留空以使用库根目录)",folderPlaceholder:"文件夹/子文件夹",createButton:"创建",startLabel:"开始:",endLabel:"结束:",locationLabel:"位置:",calendarLabel:"日历:",useTemplateLabel:"使用模板",useTemplateDesc:"创建内容时应用模板",templatePathLabel:"模板路径",templatePathDesc:"模板文件的路径",templatePathPlaceholder:"模板/ics笔记模板.md"},unscheduledTasksSelector:{title:"未计划的任务",placeholder:"输入以搜索未计划的任务...",instructions:{navigate:"导航",schedule:"安排",dismiss:"关闭"}},migration:{title:"迁移到新的循环系统",description:"TaskNotes 现在使用行业标准的 RRULE 模式进行循环,可以创建更复杂的计划并与其他应用更好地兼容。",tasksFound:"检测到 {count} 个具有旧循环模式的任务",noMigrationNeeded:"无任务需要迁移",warnings:{title:"在继续之前:",backup:"在迁移前备份您的库",conversion:"旧的循环模式将被转换为新格式",normalUsage:"您可以在迁移期间继续正常使用 TaskNotes",permanent:"此更改是永久的,无法自动撤销"},benefits:{title:"新系统的好处:",powerfulPatterns:"复杂的循环模式(例如,'每第二个星期二')",performance:"更好的循环任务性能",compatibility:"与其他应用兼容的标准循环格式",nlp:"增强的自然语言处理支持"},progress:{title:"迁移进度",preparing:"准备迁移中...",completed:"迁移成功完成",failed:"迁移失败"},buttons:{migrate:"开始迁移",completed:"关闭"},errors:{title:"迁移过程中出现错误:"},notices:{completedWithErrors:"迁移完成但有一些错误。检查上面的错误列表。",success:"所有任务已成功迁移!",failed:"迁移失败。请检查控制台了解详情。"},prompt:{message:"TaskNotes 检测到使用旧循环格式的任务。您现在想将它们迁移到新系统吗?",migrateNow:"立即迁移",remindLater:"稍后提醒我"}},task:{titlePlaceholder:"需要做什么?",titleLabel:"标题",titleDetailedPlaceholder:"任务标题...",detailsLabel:"详情",detailsPlaceholder:"添加更多详情...",projectsLabel:"项目",projectsAdd:"添加项目",projectsTooltip:"使用模糊搜索选择项目笔记",projectsRemoveTooltip:"移除项目",contextsLabel:"上下文",contextsPlaceholder:"上下文1,上下文2",tagsLabel:"标签",tagsPlaceholder:"标签1,标签2",timeEstimateLabel:"时间估计(分钟)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"未保存的更改",message:"您有未保存的更改。是否要保存?",save:"保存更改",discard:"放弃更改",cancel:"继续编辑"},dependencies:{blockedBy:"被阻塞",blocking:"阻塞中",placeholder:"[[任务笔记]]",addTaskButton:"添加任务",selectTaskTooltip:"使用模糊搜索选择任务笔记",removeTaskTooltip:"删除任务"},organization:{projects:"项目",subtasks:"子任务",addToProject:"添加到项目",addToProjectButton:"添加到项目",addSubtasks:"添加子任务",addSubtasksButton:"添加子任务",addSubtasksTooltip:"选择任务将其设为此任务的子任务",removeSubtaskTooltip:"删除子任务",notices:{noEligibleSubtasks:"没有可用的任务可指定为子任务",subtaskSelectFailed:"无法打开子任务选择器"}},customFieldsLabel:"自定义字段",actions:{due:"设置到期日期",scheduled:"设置安排日期",status:"设置状态",priority:"设置优先级",recurrence:"设置重复",reminders:"设置提醒"},buttons:{openNote:"打开笔记",save:"保存"},tooltips:{dueValue:"到期:{value}",scheduledValue:"安排:{value}",statusValue:"状态:{value}",priorityValue:"优先级:{value}",recurrenceValue:"重复:{value}",remindersSingle:"设置了1个提醒",remindersPlural:"设置了{count}个提醒"},dateMenu:{dueTitle:"设置到期日期",scheduledTitle:"设置安排日期"},userFields:{textPlaceholder:"输入{field}...",numberPlaceholder:"0",datePlaceholder:"YYYY-MM-DD",listPlaceholder:"项目1,项目2,项目3",pickDate:"选择{field}日期"},recurrence:{daily:"每日",weekly:"每周",everyTwoWeeks:"每2周",weekdays:"工作日",weeklyOn:"每周{days}",monthly:"每月",everyThreeMonths:"每3个月",monthlyOnOrdinal:"每月{ordinal}",monthlyByWeekday:"每月(按工作日)",yearly:"每年",yearlyOn:"每年{month}{day}",custom:"自定义",countSuffix:"{count}次",untilSuffix:"直到{date}",ordinal:"{number}{suffix}"}},taskSelector:{title:"选择任务",placeholder:"输入以搜索任务...",instructions:{navigate:"导航",select:"选择",dismiss:"取消"},notices:{noteNotFound:'找不到笔记 "{name}"'},dueDate:{overdue:"截止日期:{date}(逾期)",today:"截止日期:今天"}},taskSelectorWithCreate:{title:"创建或打开任务",placeholder:"搜索任务或输入以创建新任务...",instructions:{create:"创建新任务"},footer:{createLabel:" 创建:"},notices:{emptyQuery:"请输入任务描述",invalidTitle:"无法识别有效的任务标题"}},taskCreation:{title:"创建任务",actions:{fillFromNaturalLanguage:"从自然语言填写表单",hideDetailedOptions:"隐藏详细选项",showDetailedOptions:"显示详细选项"},nlPlaceholder:`明天下午3点@家买杂货 #差事
在这里添加详情...`,notices:{titleRequired:"请输入任务标题",success:'任务"{title}"创建成功',successShortened:'任务"{title}"创建成功(因长度而缩短文件名)',failure:"创建任务失败:{message}",blockingUnresolved:"无法解析:{entries}",openCreatedTaskFailure:"任务已创建,但无法打开任务笔记。"}},taskEdit:{title:"编辑任务",sections:{completions:"完成",taskInfo:"任务信息"},metadata:{totalTrackedTime:"总跟踪时间:",due:"截止:",scheduled:"计划:",created:"创建:",modified:"修改:",file:"文件:"},buttons:{archive:"归档",unarchive:"取消归档"},notices:{titleRequired:"请输入任务标题",noChanges:"没有要保存的更改",updateSuccess:'任务"{title}"更新成功',updateFailure:"更新任务失败:{message}",dependenciesUpdateSuccess:"依赖关系已更新",blockingUnresolved:"无法解析:{entries}",fileMissing:"找不到任务文件:{path}",openNoteFailure:"打开任务笔记失败",archiveSuccess:"任务{action}成功",archiveFailure:"归档任务失败",deleteSuccess:"任务“{title}”已成功删除",deleteFailure:"删除任务失败:{message}"},archiveAction:{archived:"已归档",unarchived:"已取消归档"},deleteConfirmation:{title:"删除任务",message:"确定要删除“{title}”吗?这会将任务笔记移到 Obsidian 回收站。",confirm:"删除任务"}},storageLocation:{title:{migrate:"迁移番茄钟数据?",switch:"切换到日记存储?"},message:{migrate:"这将把现有的番茄钟会话数据迁移到日记前置数据。数据将按日期分组并存储在每个日记中。",switch:"番茄钟会话数据将存储在日记前置数据中,而不是插件数据文件中。"},whatThisMeans:"这意味着:",bullets:{dailyNotesRequired:"必须在核心日记插件或 Periodic Notes 中启用日记",storedInNotes:"数据将存储在您的日记前置数据中",migrateData:"现有插件数据将迁移然后清除",futureSessions:"未来的会话将保存到日记",dataLongevity:"这提供了与您的笔记更好的数据持久性"},finalNote:{migrate:"⚠️ 如果需要,请确保您有备份。此更改无法自动撤销。",switch:"您可以随时在将来切换回插件存储。"},buttons:{migrate:"迁移数据",switch:"切换存储"}},dueDate:{title:"设置到期日期",taskLabel:"任务:{title}",sections:{dateTime:"到期日期和时间",quickOptions:"快速选项"},descriptions:{dateTime:"设置此任务应何时完成"},inputs:{date:{ariaLabel:"任务到期日期",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"任务到期时间(可选)",placeholder:"HH:MM"}},quickOptions:{today:"今天",todayAriaLabel:"将到期日期设为今天",tomorrow:"明天",tomorrowAriaLabel:"将到期日期设为明天",nextWeek:"下周",nextWeekAriaLabel:"将到期日期设为下周",now:"现在",nowAriaLabel:"将到期日期和时间设为现在",clear:"清除",clearAriaLabel:"清除到期日期"},errors:{invalidDateTime:"请输入有效的日期和时间格式",updateFailed:"更新到期日期失败。请重试。"}},scheduledDate:{title:"设置安排日期",taskLabel:"任务:{title}",sections:{dateTime:"安排日期和时间",quickOptions:"快速选项"},descriptions:{dateTime:"设置您计划何时处理此任务"},inputs:{date:{ariaLabel:"任务安排日期",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"任务安排时间(可选)",placeholder:"HH:MM"}},quickOptions:{today:"今天",todayAriaLabel:"将安排日期设为今天",tomorrow:"明天",tomorrowAriaLabel:"将安排日期设为明天",nextWeek:"下周",nextWeekAriaLabel:"将安排日期设为下周",now:"现在",nowAriaLabel:"将安排日期和时间设为现在",clear:"清除",clearAriaLabel:"清除安排日期"},errors:{invalidDateTime:"请输入有效的日期和时间格式",updateFailed:"更新安排日期失败。请重试。"}},timeEntryEditor:{title:"时间条目 - {taskTitle}",addEntry:"添加时间条目",noEntries:"暂无时间条目",deleteEntry:"删除条目",startTime:"开始时间",endTime:"结束时间(如仍在进行则留空)",duration:"持续时间(分钟)",durationDesc:"覆盖计算的持续时间",durationPlaceholder:"输入持续时间(分钟)",description:"描述",descriptionPlaceholder:"你在做什么?",calculatedDuration:"计算结果:{minutes} 分钟",totalTime:"总计 {hours}小时 {minutes}分钟",totalMinutes:"总计 {minutes}分钟",saved:"时间条目已保存",saveFailed:"无法保存时间条目",openFailed:"无法打开时间条目编辑器",noTasksWithEntries:"没有任务有时间条目可供编辑",validation:{missingStartTime:"需要开始时间",endBeforeStart:"结束时间必须在开始时间之后"}},timeTracking:{noTasksAvailable:"没有可用的任务进行时间跟踪",started:"开始跟踪时间:{taskTitle}",startFailed:"无法开始时间跟踪"},timeEntry:{mustHaveSpecificTime:"时间条目必须有具体时间。请在周视图或日视图中选择时间范围。",noTasksAvailable:"没有可用的任务创建时间条目",created:"已为 {taskTitle} 创建时间条目({duration} 分钟)",createFailed:"无法创建时间条目"}},contextMenus:{task:{status:"状态",statusSelected:"✓ {label}",priority:"优先级",prioritySelected:"✓ {label}",dueDate:"到期日期",scheduledDate:"安排日期",customDates:"自定义日期",reminders:"提醒",remindBeforeDue:"到期前提醒...",remindBeforeScheduled:"安排前提醒...",manageReminders:"管理所有提醒...",clearReminders:"清除所有提醒",startTimeTracking:"开始时间跟踪",stopTimeTracking:"停止时间跟踪",editTimeEntries:"编辑时间条目",archive:"归档",unarchive:"取消归档",openNote:"打开笔记",openNoteInNewTab:"在新标签页打开笔记",copyTitle:"复制任务标题",quickActions:"快速操作",noteActions:"笔记操作",rename:"重命名",renameTitle:"重命名文件",renamePlaceholder:"输入新名称",delete:"删除",deleteTitle:"删除文件",deleteMessage:'您确定要删除"{name}"吗?',deleteConfirm:"删除",copyPath:"复制路径",copyUrl:"复制Obsidian URL",showInExplorer:"在文件浏览器中显示",addToCalendar:"添加到日历",calendar:{google:"Google日历",outlook:"Outlook日历",yahoo:"Yahoo日历",downloadIcs:"下载.ics文件",syncToGoogle:"同步到Google日历",syncToGoogleNotConfigured:"Google日历同步未配置",syncToGoogleSuccess:"任务已同步到Google日历",syncToGoogleFailed:"同步到Google日历失败"},recurrence:"重复",clearRecurrence:"清除重复",customRecurrence:"自定义重复...",createSubtask:"创建子任务",dependencies:{title:"依赖关系",addBlockedBy:'添加"被阻塞"…',addBlockedByTitle:"添加此任务依赖的任务",addBlocking:'添加"阻塞中"…',addBlockingTitle:"添加此任务阻塞的任务",removeBlockedBy:'删除"被阻塞"…',removeBlocking:'删除"阻塞中"…',unknownDependency:"未知",inputPlaceholder:"[[任务笔记]]",notices:{noEntries:"请至少输入一个任务",blockedByAdded:"已添加 {count} 个依赖关系",blockedByRemoved:"已删除依赖关系",blockingAdded:"已添加 {count} 个被依赖的任务",blockingRemoved:"已删除被依赖的任务",unresolved:"无法解析:{entries}",noEligibleTasks:"没有匹配的可用任务",updateFailed:"无法更新依赖关系"}},organization:{title:"组织",projects:"项目",addToProject:"添加到项目…",subtasks:"子任务",addSubtasks:"添加子任务…",notices:{alreadyInProject:"任务已在此项目中",alreadySubtask:"任务已是此任务的子任务",addedToProject:"已添加到项目:{project}",addedAsSubtask:"已将 {subtask} 添加为 {parent} 的子任务",addToProjectFailed:"无法将任务添加到项目",addAsSubtaskFailed:"无法将任务添加为子任务",projectSelectFailed:"无法打开项目选择器",subtaskSelectFailed:"无法打开子任务选择器",noEligibleSubtasks:"没有可用的任务可指定为子任务",currentTaskNotFound:"找不到当前任务文件",updateContextsFailed:"更新上下文失败"},contexts:"上下文",addContext:"添加上下文…",contextPlaceholder:"上下文",contextSelected:"✓ {context}",clearContexts:"清除上下文"},subtasks:{loading:"正在加载子任务...",noSubtasks:"未找到子任务",loadFailed:"加载子任务失败"},markComplete:"标记此日期完成",markIncomplete:"标记此日期未完成",skipInstance:"跳过实例",unskipInstance:"取消跳过实例",completion:{submenu:"标记完成或跳过",submenuCompleteOnly:"标记完成",completeToday:"今天完成",completeAsScheduled:"在计划日期完成",completeOnDue:"在截止日期完成",completeOnPicked:"在指定日期完成(选择日期)",markIncomplete:"标记未完成",noScheduledDate:"此任务没有计划日期",noDueDate:"此任务没有截止日期",noPickedDate:"未选择日期",noCompletedStatus:"未配置已完成状态",pickDateTitle:"选择完成日期",completeFailure:"无法更新任务完成状态:{message}",clearInstancesConfirmTitle:"清除已记录的实例?",clearInstancesConfirmMessage:"重新安排将清除新日期当天及之后记录为已完成或已跳过的以下实例:{dates}。它们将不再标记为已完成或已跳过。是否继续?",clearInstancesConfirmButton:"重新安排并清除"},quickReminders:{atTime:"在事件时间",fiveMinutes:"提前5分钟",fifteenMinutes:"提前15分钟",oneHour:"提前1小时",oneDay:"提前1天"},notices:{toggleCompletionFailure:"切换重复任务完成失败:{message}",toggleSkipFailure:"切换重复任务跳过失败:{message}",updateDueDateFailure:"更新任务到期日期失败:{message}",updateScheduledFailure:"更新任务安排日期失败:{message}",updateCustomDateFailure:"更新 {field} 失败:{message}",updateRemindersFailure:"更新提醒失败",clearRemindersFailure:"清除提醒失败",addReminderFailure:"添加提醒失败",archiveFailure:"切换任务归档失败:{message}",copyTitleSuccess:"任务标题已复制到剪贴板",copyFailure:"复制到剪贴板失败",renameSuccess:'重命名为"{name}"',renameFailure:"重命名文件失败",copyPathSuccess:"文件路径已复制到剪贴板",copyUrlSuccess:"Obsidian URL已复制到剪贴板",updateRecurrenceFailure:"更新任务重复失败:{message}",updateTagsFailed:"更新标签失败"},tags:"标签",addTag:"添加标签…",removeTag:"移除 {tag}",removeTagInput:"移除标签…",tagPlaceholder:"标签或 #标签",clearTags:"清除标签"},priority:{clearPriority:"清除优先级"},ics:{showDetails:"显示详情",createTask:"从事件创建任务",createNote:"从事件创建笔记",linkNote:"链接现有笔记",copyTitle:"复制标题",copyLocation:"复制位置",copyUrl:"复制URL",copyMarkdown:"复制为markdown",subscriptionUnknown:"未知日历",notices:{copyTitleSuccess:"事件标题已复制到剪贴板",copyLocationSuccess:"位置已复制到剪贴板",copyUrlSuccess:"事件URL已复制到剪贴板",copyMarkdownSuccess:"事件详情已复制为markdown",copyFailure:"复制到剪贴板失败",taskCreated:"任务已创建:{title}",taskCreateFailure:"从事件创建任务失败",noteCreated:"笔记创建成功",creationFailure:"打开创建模态框失败",linkSuccess:'已将笔记"{name}"链接到事件',linkFailure:"链接笔记失败",linkSelectionFailure:"打开笔记选择失败"},markdown:{titleFallback:"无标题事件",calendar:"**日历:** {value}",date:"**日期和时间:** {value}",location:"**位置:** {value}",descriptionHeading:"### 描述",url:"**URL:** {value}",at:" 在{time}"}},date:{increment:{plusOneDay:"+1天",minusOneDay:"-1天",plusOneWeek:"+1周",minusOneWeek:"-1周"},basic:{today:"今天",tomorrow:"明天",thisWeekend:"本周末",nextWeek:"下周",nextMonth:"下个月"},weekdaysLabel:"工作日",selected:"✓ {label}",pickDateTime:"选择日期和时间...",clearDate:"清除日期",modal:{title:"设置日期和时间",dateLabel:"日期",timeLabel:"时间(可选)",select:"选择"}}},services:{pomodoro:{notices:{alreadyRunning:"番茄钟已经在运行",resumeCurrentSession:"恢复当前会话而不是开始新的",timerAlreadyRunning:"计时器已经在运行",resumeSessionInstead:"恢复当前会话而不是开始新的",shortBreakStarted:"短休息已开始",longBreakStarted:"长休息已开始",paused:"番茄钟已暂停",resumed:"番茄钟已恢复",stoppedAndReset:"番茄钟已停止并重置",migrationSuccess:"成功将{count}个番茄钟会话迁移到日记。",migrationFailure:"迁移番茄钟数据失败。请重试或检查控制台获取详细信息。"}},icsSubscription:{notices:{calendarNotFound:'找不到日历"{name}"(404)。请检查ICS URL是否正确且日历可公开访问。',calendarAccessDenied:'日历"{name}"访问被拒绝(500)。这可能是由于Microsoft Outlook服务器限制。尝试从日历设置重新生成ICS URL。',fetchRemoteFailed:'获取远程日历"{name}"失败:{error}',readLocalFailed:'读取本地日历"{name}"失败:{error}'}},calendarExport:{notices:{generateLinkFailed:"生成日历链接失败",noTasksToExport:"没有找到要导出的任务",downloadSuccess:"下载了{filename},包含{count}个任务{plural}",downloadFailed:"下载日历文件失败",singleDownloadSuccess:"下载了{filename}"}},filter:{groupLabels:{noProject:"无项目",noTags:"无标签",invalidDate:"无效日期",due:{overdue:"逾期",today:"今天",tomorrow:"明天",nextSevenDays:"接下来七天",later:"以后",none:"无到期日期"},scheduled:{past:"过去安排",today:"今天",tomorrow:"明天",nextSevenDays:"接下来七天",later:"以后",none:"无安排日期"}},errors:{noDatesProvided:"未提供日期"},folders:{root:"(根目录)"}},instantTaskConvert:{notices:{noCheckboxTasks:"在当前笔记中未找到复选框任务。",convertingTasks:"正在转换{count}个任务{plural}...",conversionSuccess:"✅ 成功将{count}个任务{plural}转换为TaskNotes!",partialConversion:"转换了{successCount}个任务{successPlural}。{failureCount}个失败。",batchConversionFailed:"批量转换失败。请重试。",invalidParameters:"无效的输入参数。",emptyLine:"当前行为空或不包含有效内容。",parseError:"解析任务错误:{error}",invalidTaskData:"无效的任务数据。",replaceLineFailed:"替换任务行失败。",conversionComplete:"任务已转换:{title}",conversionCompleteShortened:'任务已转换:"{title}"(因长度而缩短文件名)',fileExists:"此名称的文件已存在。请重试或重命名任务。",conversionFailed:"转换任务失败。请重试。"}},icsNote:{notices:{templateNotFound:"找不到模板:{path}",templateProcessError:"处理模板错误:{template}",linkedToEvent:"已将笔记链接到ICS事件:{title}"}},task:{notices:{templateNotFound:"找不到任务正文模板:{path}",templateReadError:"读取任务正文模板错误:{template}",occurrenceTemplateNotFound:"找不到实例笔记模板:{path}",occurrenceTemplateReadError:"读取实例笔记模板时出错:{template}",moveTaskFailed:"移动{operation}任务失败:{error}"}},autoExport:{notices:{exportFailed:"TaskNotes自动导出失败:{error}"}}},ui:{icsCard:{untitledEvent:"无标题事件",allDay:"全天",calendarEvent:"日历事件",calendarFallback:"日历"},noteCard:{createdLabel:"创建:",dailyBadge:"日记",dailyTooltip:"日记"},taskCard:{labels:{due:"截止日期",scheduled:"已计划",recurrence:"重复",completed:"已完成",created:"创建于",modified:"修改于",blocked:"被阻塞",blocking:"阻塞中"},blockedBadge:"已阻塞",blockedBadgeTooltip:"此任务正在等待其他任务",blockingBadge:"阻塞中",blockingBadgeTooltip:"此任务正在阻塞其他任务",blockingToggle:"阻塞 {count} 个任务",priorityAriaLabel:"优先级: {label}",taskOptions:"任务选项",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"已设置 1 个提醒(点击管理)",reminderTooltipMany:"已设置 {count} 个提醒(点击管理)",projectTooltip:"此任务用作项目(点击可显示/隐藏子任务)",projectIndicatorTooltip:"此任务用作项目",expandSubtasks:"展开子任务",collapseSubtasks:"折叠子任务",dueToday:"{label}: 今天",dueTodayAt:"{label}: 今天 {time}",dueOverdue:"{label}: {display}(逾期)",dueLabel:"{label}: {display}",scheduledToday:"{label}: 今天",scheduledTodayAt:"{label}: 今天 {time}",scheduledPast:"{label}: {display}(过期)",scheduledLabel:"{label}: {display}",loadingDependencies:"正在加载依赖…",blockingEmpty:"没有依赖的任务",blockingLoadError:"无法加载依赖",googleCalendarSyncTooltip:"已同步到Google日历",detailsTooltip:"任务有详细信息"},propertyEventCard:{unknownFile:"未知文件"},filterHeading:{allViewName:"全部"},filterBar:{saveView:"保存视图",saveViewNamePlaceholder:"输入视图名称...",saveButton:"保存",views:"视图",savedFilterViews:"已保存的过滤视图",filters:"过滤器",properties:"属性",sort:"排序",newTask:"新建",expandAllGroups:"展开所有分组",collapseAllGroups:"折叠所有分组",searchTasksPlaceholder:"搜索任务...",searchTasksTooltip:"搜索任务标题",filterUnavailable:"过滤栏暂时不可用",toggleFilter:"切换过滤器",activeFiltersTooltip:"活动过滤器 – 点击修改,右键清除",configureVisibleProperties:"配置可见属性",sortAndGroupOptions:"排序和分组选项",sortMenuHeader:"排序",orderMenuHeader:"顺序",groupMenuHeader:"分组",createNewTask:"创建新任务",filter:"过滤器",displayOrganization:"显示和组织",viewOptions:"视图选项",addFilter:"添加过滤器",addFilterGroup:"添加过滤组",addFilterTooltip:"添加新的过滤条件",addFilterGroupTooltip:"添加嵌套过滤组",clearAllFilters:"清除所有过滤器和组",saveCurrentFilter:"将当前过滤器保存为视图",closeFilterModal:"关闭过滤模态框",deleteFilterGroup:"删除过滤组",deleteCondition:"删除条件",all:"全部",any:"任何",followingAreTrue:"以下为真:",where:"其中",selectProperty:"选择...",chooseProperty:"选择要过滤的任务属性",chooseOperator:"选择如何比较属性值",enterValue:"输入要过滤的值",selectValue:"选择要过滤的{property}",sortBy:"排序依据:",toggleSortDirection:"切换排序方向",chooseSortMethod:"选择如何排序任务",groupBy:"分组依据:",chooseGroupMethod:"按共同属性分组任务",toggleViewOption:"切换{option}",expandCollapseFilters:"点击展开/折叠过滤条件",expandCollapseSort:"点击展开/折叠排序和分组选项",expandCollapseViewOptions:"点击展开/折叠视图特定选项",naturalLanguageDates:"自然语言日期",naturalLanguageExamples:"显示自然语言日期示例",enterNumericValue:"输入要过滤的数值",enterDateValue:"使用自然语言或ISO格式输入日期",pickDateTime:"选择日期和时间",noSavedViews:"没有保存的视图",savedViews:"保存的视图",yourSavedFilters:"您保存的过滤配置",dragToReorder:"拖拽重新排序视图",loadSavedView:"加载保存的视图:{name}",deleteView:"删除视图",deleteViewTitle:"删除视图",deleteViewMessage:'您确定要删除视图"{name}"吗?',manageAllReminders:"管理所有提醒...",clearAllReminders:"清除所有提醒",customRecurrence:"自定义重复...",clearRecurrence:"清除重复",sortOptions:{dueDate:"到期日期",scheduledDate:"安排日期",priority:"优先级",status:"状态",title:"标题",createdDate:"创建日期",tags:"标签",ascending:"升序",descending:"降序"},group:{none:"无",status:"状态",priority:"优先级",context:"上下文",project:"项目",dueDate:"到期日期",scheduledDate:"安排日期",tags:"标签",completedDate:"完成日期"},subgroupLabel:"子组",notices:{propertiesMenuFailed:"显示属性菜单失败"}}},components:{dateContextMenu:{weekdays:"工作日",clearDate:"清除日期",today:"今天",tomorrow:"明天",thisWeekend:"这个周末",nextWeek:"下周",nextMonth:"下个月",setDateTime:"设置日期和时间",dateLabel:"日期",timeLabel:"时间(可选)"},subgroupMenuBuilder:{none:"无",status:"状态",priority:"优先级",context:"上下文",project:"项目",dueDate:"截止日期",scheduledDate:"计划日期",tags:"标签",completedDate:"完成日期",subgroup:"子组"},propertyVisibilityDropdown:{coreProperties:"核心属性",organization:"组织",customProperties:"自定义属性",failed:"显示属性菜单失败",properties:{statusDot:"状态点",priorityDot:"优先级点",dueDate:"到期日期",scheduledDate:"安排日期",timeEstimate:"时间估计",totalTrackedTime:"总跟踪时间",checklistProgress:"清单进度",recurrence:"重复",completedDate:"完成日期",createdDate:"创建日期",modifiedDate:"修改日期",projects:"项目",contexts:"上下文",tags:"标签",blocked:"已阻塞",blocking:"阻塞中"}},reminderContextMenu:{remindBeforeDue:"到期前提醒...",remindBeforeScheduled:"安排前提醒...",manageAllReminders:"管理所有提醒...",clearAllReminders:"清除所有提醒",quickReminders:{atTime:"在事件时间",fiveMinutesBefore:"提前5分钟",fifteenMinutesBefore:"提前15分钟",oneHourBefore:"提前1小时",oneDayBefore:"提前1天"}},recurrenceContextMenu:{daily:"每日",weeklyOn:"每周{day}",everyTwoWeeksOn:"每2周{day}",monthlyOnThe:"每月{ordinal}",everyThreeMonthsOnThe:"每3个月{ordinal}",yearlyOn:"每年{month}{ordinal}",weekdaysOnly:"仅工作日",dailyAfterCompletion:"每日(完成后)",every3DaysAfterCompletion:"每3天(完成后)",weeklyAfterCompletion:"每周(完成后)",monthlyAfterCompletion:"每月(完成后)",customRecurrence:"自定义重复...",clearRecurrence:"清除重复",customRecurrenceModal:{title:"自定义重复",startDate:"开始日期",startDateDesc:"重复模式开始的日期",startTime:"开始时间",startTimeDesc:"重复实例应出现的时间(可选)",recurFrom:"重复起点",recurFromDesc:"下次重复应何时计算?",scheduledDate:"计划日期",completionDate:"完成日期",frequency:"频率",interval:"间隔",intervalDesc:"每X天/周/月/年",daysOfWeek:"一周中的天",daysOfWeekDesc:"选择特定天(用于每周重复)",monthlyRecurrence:"每月重复",monthlyRecurrenceDesc:"选择如何每月重复",yearlyRecurrence:"每年重复",yearlyRecurrenceDesc:"选择如何每年重复",endCondition:"结束条件",endConditionDesc:"选择重复何时结束",neverEnds:"永不结束",endAfterOccurrences:"{count}次后结束",endOnDate:"在{date}结束",onDayOfMonth:"每月{day}日",onTheWeekOfMonth:"每月第{week}个{day}",onDateOfYear:"每年{month}{day}",onTheWeekOfYear:"每年{month}第{week}个{day}",frequencies:{daily:"每日",weekly:"每周",monthly:"每月",yearly:"每年"},weekPositions:{first:"第一",second:"第二",third:"第三",fourth:"第四",last:"最后"},weekdays:{monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",sunday:"星期日"},weekdaysShort:{mon:"周一",tue:"周二",wed:"周三",thu:"周四",fri:"周五",sat:"周六",sun:"周日"},cancel:"取消",save:"保存"}}}};var jue={common:{appName:"TaskNotes",new:"Neu",cancel:"Abbrechen",confirm:"Bestätigen",close:"Schließen",save:"Speichern",reorder:{confirmLargeTitle:"Große Neuordnung bestätigen",confirmButton:"Notizen neu anordnen",confirmLargeMessage:'Durch das Neuordnen werden in {count} Notizen die Werte von "{field}" aktualisiert, um eine dauerhafte manuelle Reihenfolge für {scope} zu erstellen. Versteckte oder herausgefilterte Notizen im selben Bereich können ebenfalls aktualisiert werden. Fortfahren?'},language:"Sprache",systemDefault:"Systemstandard",loading:"Lädt...",languages:{en:"Englisch",fr:"Französisch",ru:"Russisch",zh:"Chinesisch",de:"Deutsch",es:"Spanisch",ja:"Japanisch",pt:"Portugiesisch (Brasilien)",ko:"Koreanisch"},weekdays:{sunday:"Sonntag",monday:"Montag",tuesday:"Dienstag",wednesday:"Mittwoch",thursday:"Donnerstag",friday:"Freitag",saturday:"Samstag"},months:{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"}},views:{agenda:{title:"Agenda",today:"Heute",overdue:"Überfällig",refreshCalendars:"Kalender aktualisieren",actions:{previousPeriod:"Vorherige Periode",nextPeriod:"Nächste Periode",goToToday:"Zu heute gehen",refreshCalendars:"Kalenderabonnements aktualisieren"},loading:"Agenda wird geladen...",dayToggle:"Tag umschalten",overdueToggle:"Überfälligkeitsbereich umschalten",expandAllDays:"Alle Tage ausklappen",collapseAllDays:"Alle Tage einklappen",notices:{calendarNotReady:"Kalenderdienst noch nicht bereit",calendarRefreshed:"Kalenderabonnements aktualisiert",refreshFailed:"Aktualisierung fehlgeschlagen"},empty:{noItemsScheduled:"Keine Elemente geplant",noItemsFound:"Keine Elemente gefunden",helpText:"Erstellen Sie Aufgaben mit Fälligkeits- oder Planungsdaten oder fügen Sie Notizen hinzu, um sie hier zu sehen."},contextMenu:{showOverdueSection:"Überfälligkeitsbereich anzeigen",showNotes:"Notizen anzeigen",calendarSubscriptions:"Kalenderabonnements"},periods:{thisWeek:"Diese Woche"},tipPrefix:"Tipp: "},taskList:{title:"Aufgaben",expandAllGroups:"Alle Gruppen ausklappen",collapseAllGroups:"Alle Gruppen einklappen",noTasksFound:"Keine Aufgaben für die gewählten Filter gefunden.",reorder:{scope:{ungrouped:"diese ungegliederte Liste",group:'Gruppe "{group}"'}},errors:{formulaGroupingReadOnly:"Aufgaben in formelbasierten Gruppen können nicht neu angeordnet werden. Formelwerte werden berechnet und können nicht direkt geändert werden."}},notes:{title:"Notizen",refreshButton:"Aktualisieren",refreshingButton:"Wird aktualisiert...",notices:{indexingDisabled:"Notizindexierung deaktiviert"},empty:{noNotesFound:"Keine Notizen gefunden",helpText:"Keine Notizen für das gewählte Datum gefunden. Versuchen Sie, ein anderes Datum in der Mini-Kalenderansicht auszuwählen oder erstellen Sie einige Notizen."},loading:"Notizen werden geladen...",refreshButtonAriaLabel:"Notizenliste aktualisieren"},miniCalendar:{title:"Mini-Kalender",contextMenu:{openDailyNote:"Tägliche Notiz öffnen",openWeeklyNote:"Wöchentliche Notiz öffnen"}},advancedCalendar:{title:"Kalender",filters:{showFilters:"Filter anzeigen",hideFilters:"Filter ausblenden"},viewOptions:{calendarSubscriptions:"Kalenderabonnements",timeEntries:"Zeiteinträge",timeblocks:"Zeitblöcke",scheduledDates:"Geplante Termine",dueDates:"Fälligkeitstermine",allDaySlot:"Ganztägiger Slot",scheduledTasks:"Geplante Aufgaben",recurringTasks:"Wiederkehrende Aufgaben"},buttons:{refresh:"Aktualisieren",refreshHint:"Kalenderabonnements aktualisieren"},notices:{icsServiceNotAvailable:"ICS-Abonnementdienst nicht verfügbar",calendarRefreshedAll:"Alle Kalenderabonnements wurden erfolgreich aktualisiert",refreshFailed:"Einige Kalenderabonnements konnten nicht aktualisiert werden",timeblockSpecificTime:"Zeitblöcke müssen spezifische Zeiten haben. Bitte wählen Sie einen Zeitbereich in der Wochen- oder Tagesansicht.",timeblockMoved:'Zeitblock "{title}" wurde nach {date} verschoben',timeblockUpdated:'Zeit des Zeitblocks "{title}" aktualisiert',timeblockMoveFailed:"Fehler beim Verschieben des Zeitblocks: {message}",timeblockResized:'Dauer des Zeitblocks "{title}" aktualisiert',timeblockResizeFailed:"Fehler beim Ändern der Zeitblockgröße: {message}",taskScheduled:'Aufgabe "{title}" für {date} geplant',scheduleTaskFailed:"Fehler beim Planen der Aufgabe",endTimeAfterStart:"Endzeit muss nach der Startzeit liegen",timeEntryNotFound:"Zeiteintrag nicht gefunden",timeEntryDeleted:"Zeiteintrag gelöscht",deleteTimeEntryFailed:"Fehler beim Löschen des Zeiteintrags"},timeEntry:{estimatedSuffix:"geschätzt",trackedSuffix:"erfasst",recurringPrefix:"Wiederkehrend: ",completedPrefix:"Abgeschlossen: ",createdPrefix:"Erstellt: ",modifiedPrefix:"Geändert: ",duePrefix:"Fällig: ",scheduledPrefix:"Geplant: "},contextMenus:{openTask:"Aufgabe öffnen",deleteTimeEntry:"Zeiteintrag löschen",deleteTimeEntryTitle:"Zeiteintrag löschen",deleteTimeEntryConfirm:"Möchten Sie diesen Zeiteintrag{duration} wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.",deleteButton:"Löschen",cancelButton:"Abbrechen"}},basesCalendar:{title:"Bases-Kalender",today:"Heute",buttonText:{month:"M",week:"W",day:"T",year:"J",list:"L",customDays:"{count}T",listDays:"{count}d Liste",refresh:"Aktualisieren"},hints:{refresh:"Kalenderabonnements aktualisieren",today:"Zu heute gehen",prev:"Zurück",next:"Weiter",month:"Monatsansicht",week:"Wochenansicht",day:"Tagesansicht",year:"Jahresansicht",list:"Listenansicht",customDays:"{count}-Tage-Ansicht"},settings:{groups:{dateNavigation:"Datumsnavigation",events:"Ereignisse",layout:"Layout",view:"Ansicht",display:"Anzeige",timeGrid:"Zeitgitter",eventLayout:"Ereignislayout",propertyBasedEvents:"Eigenschaftsbasierte Ereignisse",calendarSubscriptions:"Kalenderabonnements",googleCalendars:"Google-Kalender",microsoftCalendars:"Microsoft-Kalender"},dateNavigation:{navigateToDate:"Zum Datum navigieren",navigateToDatePlaceholder:"JJJJ-MM-TT (z.B. 2025-01-15) - leer lassen, um Eigenschaft zu verwenden",navigateToDateFromProperty:"Zum Datum aus Eigenschaft navigieren",navigateToDateFromPropertyPlaceholder:"Datumseigenschaft auswählen (optional)",propertyNavigationStrategy:"Eigenschaftsnavigationsstrategie",createDailyNotesFromDateLinks:"Tägliche Notizen über Datumslinks erstellen",strategies:{first:"Erstes Ergebnis",earliest:"Frühestes Datum",latest:"Spätestes Datum"}},events:{showScheduledTasks:"Geplante Aufgaben anzeigen",showDueTasks:"Fällige Aufgaben anzeigen",showOverdueOnToday:"Überfällige Aufgaben heute anzeigen",showRecurringTasks:"Wiederkehrende Aufgaben anzeigen",showTimeEntries:"Zeiteinträge anzeigen",showTimeblocks:"Zeitblöcke anzeigen",showPropertyBasedEvents:"Eigenschaftsbasierte Ereignisse anzeigen",showCompletedRecurringInstances:"Abgeschlossene wiederkehrende Instanzen anzeigen",showSkippedRecurringInstances:"Übersprungene wiederkehrende Instanzen anzeigen"},layout:{calendarView:"Kalenderansicht",customDayCount:"Benutzerdefinierte Tagesanzahl",listDayCount:"Anzahl der Listentage",dayStartTime:"Tagesbeginn",dayStartTimePlaceholder:"HH:mm:ss (z.B. 08:00:00)",dayEndTime:"Tagesende",dayEndTimePlaceholder:"HH:mm:ss (z.B. 20:00:00)",timeSlotDuration:"Zeitschlitzdauer",timeSlotDurationPlaceholder:"HH:mm:ss (z.B. 00:30:00)",dragDropResolution:"Auflösung für Ziehen/Ablegen",dragDropResolutionPlaceholder:"HH:mm:ss (z.B. 00:05:00)",weekStartsOn:"Woche beginnt am",showWeekNumbers:"Wochennummern anzeigen",showNowIndicator:"Jetzt-Indikator anzeigen",showWeekends:"Wochenenden anzeigen",showAllDaySlot:"Ganztägigen Slot anzeigen",showTimeGrid:"Stundenraster anzeigen",showTodayHighlight:"Heute hervorheben",todayColumnWidthMultiplier:"Multiplikator der heutigen Spaltenbreite",showSelectionPreview:"Auswahlvorschau anzeigen",timeFormat:"Zeitformat",timeFormat12:"12-Stunden (AM/PM)",timeFormat24:"24-Stunden",initialScrollTime:"Anfangsscrollzeit",initialScrollTimePlaceholder:"HH:mm:ss (z.B. 08:00:00)",minimumEventHeight:"Minimale Ereignishöhe (px)",slotEventOverlap:"Ereignisüberlappung zulassen",enableSearch:"Suchfeld aktivieren",eventMaxStack:"Max. gestapelte Ereignisse (Wochen-/Tagesansicht, 0 = unbegrenzt)",dayMaxEvents:"Max. Ereignisse pro Tag (Monatsansicht, 0 = automatisch)",dayMaxEventRows:"Max. Ereigniszeilen pro Tag (Monatsansicht, 0 = unbegrenzt)",spanScheduledToDue:"Aufgaben zwischen geplantem und Fälligkeitsdatum spannen",heightMode:"Höhenmodus",heightModeFill:"Container füllen",heightModeAuto:"Automatische Höhe"},propertyBasedEvents:{startDateProperty:"Startdatumseigenschaft",startDatePropertyPlaceholder:"Eigenschaft für Startdatum/-zeit auswählen",endDateProperty:"Enddatumseigenschaft (optional)",endDatePropertyPlaceholder:"Eigenschaft für Enddatum/-zeit auswählen",titleProperty:"Titeleigenschaft (optional)",titlePropertyPlaceholder:"Eigenschaft für Ereignistitel auswählen"}},notices:{noDailyNoteForDate:"Für dieses Datum ist keine tägliche Notiz vorhanden."},errors:{failedToInitialize:"Fehler beim Initialisieren des Kalenders"}},kanban:{title:"Kanban",newTask:"Neue Aufgabe",addCard:"+ Karte hinzufügen",noTasks:"Keine Aufgaben",uncategorized:"Nicht kategorisiert",noProject:"Kein Projekt",reorder:{scope:{column:'Spalte "{group}"',columnInSwimlane:'Spalte "{group}" in Swimlane "{swimlane}"'}},notices:{loadFailed:"Kanban-Board konnte nicht geladen werden",movedTask:'Aufgabe verschoben zu "{0}"'},errors:{loadingBoard:"Fehler beim Laden des Boards.",noGroupBy:"Die Kanban-Ansicht erfordert eine konfigurierte 'Gruppieren nach'-Eigenschaft. Klicken Sie auf die Schaltfläche 'Sortieren' und wählen Sie eine Eigenschaft unter 'Gruppieren nach' aus.",formulaGroupingReadOnly:"Aufgaben können nicht zwischen formelbasierten Spalten verschoben werden. Formelwerte werden berechnet und können nicht direkt geändert werden.",formulaSwimlaneReadOnly:"Aufgaben können nicht zwischen formelbasierten Swimlanes verschoben werden. Formelwerte werden berechnet und können nicht direkt geändert werden."},columnTitle:"Ohne Titel"},pomodoro:{title:"Pomodoro",status:{focus:"Fokus",ready:"Bereit zum Starten",paused:"Pausiert",working:"Arbeitet",shortBreak:"Kurze Pause",longBreak:"Lange Pause",breakPrompt:"Großartige Arbeit! Zeit für eine {length} Pause",breakLength:{short:"kurze",long:"lange"},breakComplete:"Pause beendet! Bereit für den nächsten Pomodoro?"},buttons:{start:"Starten",pause:"Pausieren",stop:"Stoppen",resume:"Fortsetzen",startShortBreak:"Kurze Pause starten",startLongBreak:"Lange Pause starten",skipBreak:"Pause überspringen",chooseTask:"Aufgabe wählen...",changeTask:"Aufgabe wechseln...",clearTask:"Aufgabe entfernen",selectDifferentTask:"Andere Aufgabe wählen",startFocus:"Fokus starten",addMinute:"Eine Minute hinzufügen",subtractMinute:"Eine Minute abziehen"},notices:{noTasks:"Keine unarchivierte Aufgaben gefunden. Erstelle zuerst einige Aufgaben.",loadFailed:"Aufgaben konnten nicht geladen werden",invalidDuration:"Gib eine Dauer wie 10, 10:30 oder 1:30:00 ein."},statsLabel:"heute abgeschlossen",meta:{ready:"{time} geplant · {count} heute abgeschlossen",running:"{time} verbleibend · Endet um {endTime}",paused:"{type} pausiert · {time} verbleibend",breakReady:"{type} bereit · {time} geplant"},timer:{editLabel:"Timerdauer bearbeiten",inputLabel:"Timerdauer"}},pomodoroStats:{title:"Pomodoro-Statistiken",heading:"Pomodoro-Statistiken",refresh:"Aktualisieren",sections:{overview:"Überblick",today:"Heute",week:"Diese Woche",allTime:"Gesamt",recent:"Aktuelle Sitzungen"},overviewCards:{todayPomos:{label:"Heutige Pomos",change:{more:"{count} mehr als gestern",less:"{count} weniger als gestern"}},totalPomos:{label:"Pomos insgesamt"},todayFocus:{label:"Heutiger Fokus",change:{more:"{duration} mehr als gestern",less:"{duration} weniger als gestern"}},totalFocus:{label:"Fokuszeit insgesamt"}},stats:{pomodoros:"Pomodoros",streak:"Serie",minutes:"Minuten",average:"Durchschn. Länge",completion:"Abschluss"},recents:{empty:"Noch keine Sitzungen aufgezeichnet",duration:"{minutes} Min",status:{completed:"Abgeschlossen",interrupted:"Unterbrochen"},delete:"Sitzung löschen",deleteAria:"Pomodoro-Sitzung löschen",deleteConfirmTitle:"Pomodoro-Sitzung löschen?",deleteConfirmMessage:"Dadurch wird die Sitzung aus dem Pomodoro-Verlauf entfernt. Vorhandene Zeiteinträge von Aufgaben werden nicht geändert.",deleteConfirmButton:"Löschen",deleteSuccess:"Pomodoro-Sitzung gelöscht",deleteNotFound:"Pomodoro-Sitzung wurde nicht gefunden"},basesMigration:{title:"Möchtest du eine Base-Ansicht?",description:"Pomodoro-Base-Ansichten verwenden das Frontmatter täglicher Notizen. Um diesen Verlauf in der generierten Pomodoro-Statistik-Base zu sehen, migriere die Pomodoro-Daten in den Einstellungen und setze den Speicherort anschließend auf tägliche Notizen."}},stats:{title:"Statistiken",taskProjectStats:"Aufgaben- & Projektstatistiken",sections:{filters:"Filter",overview:"Überblick",today:"Heute",thisWeek:"Diese Woche",thisMonth:"Dieser Monat",projectBreakdown:"Projektaufschlüsselung",dateRange:"Datumsbereich"},filters:{minTime:"Min. Zeit (Minuten)",allTasks:"Alle Aufgaben",activeOnly:"Nur Aktive",completedOnly:"Nur Abgeschlossene"},refreshButton:"Aktualisieren",timeRanges:{allTime:"Gesamt",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",last90Days:"Letzte 90 Tage",customRange:"Benutzerdefinierter Bereich"},resetFiltersButton:"Filter zurücksetzen",dateRangeFrom:"Von",dateRangeTo:"Bis",noProject:"Kein Projekt",cards:{timeTrackedEstimated:"Zeit erfasst / geschätzt",totalTasks:"Aufgaben gesamt",completionRate:"Abschlussrate",activeProjects:"Aktive Projekte",avgTimePerTask:"Ø Zeit pro Aufgabe"},labels:{tasks:"Aufgaben",completed:"Abgeschlossen",projects:"Projekte"},noProjectData:"Keine Projektdaten verfügbar",notAvailable:"N/V",noTasks:"Keine Aufgaben gefunden",loading:"Lädt..."},releaseNotes:{title:"Was ist neu in TaskNotes {version}",header:"Was ist neu in TaskNotes {version}",viewAllLink:"Alle Versionshinweise auf GitHub anzeigen →",starMessage:"Wir freuen uns sehr über jedes Feedback. Wenn sich etwas nicht richtig anfühlt, lassen Sie es uns bitte auf GitHub wissen. Wenn Sie TaskNotes nützlich finden, geben Sie ihm bitte einen Stern.",baseFilesNotice:"> [!info] Hinweis zu den standardmäßigen `.base`-Dateien\n> Änderungen an standardmäßig generierten `.base`-Vorlagen überschreiben Ihre vorhandenen `.base`-Dateien nicht, damit Ihre Anpassungen erhalten bleiben.\n> Wenn Sie die neuesten Vorlagenverbesserungen möchten, erstellen Sie die Base-Dateien neu unter **Einstellungen → TaskNotes → Allgemein → Ansichten & Base-Dateien → Dateien aktualisieren**."}},settings:{header:{documentation:"Dokumentation",documentationUrl:"https://tasknotes.dev"},tabs:{general:"Allgemein",taskProperties:"Aufgabeneigenschaften",modalFields:"Modalfelder",defaults:"Voreinstellungen & Vorlagen",appearance:"Erscheinungsbild & UI",features:"Funktionen",integrations:"Integrationen"},features:{inlineTasks:{header:"Inline-Aufgaben",description:"Einstellungen für Aufgabenlinks und Checkbox-zu-Aufgabe-Konvertierung in Notizen."},taskCreation:{header:"Aufgabenerstellung",description:"Konfiguriere, was nach dem Erstellen von Aufgaben passiert.",openAfterCreate:{name:"Aufgabe nach Erstellung öffnen",description:"Wähle, ob der normale Dialog 'Neue Aufgabe erstellen' die neue Aufgabennotiz nach dem Speichern öffnet.",options:{none:"Nicht öffnen",sameTab:"Im selben Tab öffnen",newTab:"In einem neuen Tab öffnen"}}},overlays:{taskLinkToggle:{name:"Aufgabenlink-Overlay",description:"Zeige interaktive Overlays beim Hovern über Aufgabenlinks"},aliasExclusion:{name:"Overlay für Alias-Links deaktivieren",description:"Das Aufgaben-Widget nicht anzeigen, wenn der Link einen Alias enthält (z.B. [[Aufgabe|Alias]])."}},instantConvert:{toggle:{name:"Konvertierungs-Button neben Checkboxen anzeigen",description:"Zeige einen Inline-Button neben Markdown-Checkboxen an, der diese in TaskNotes konvertiert"},preserveCheckbox:{name:"Checkbox beim Konvertieren beibehalten",description:"Den ursprünglichen Markdown-Checkbox-Marker beibehalten, wenn eine Checkbox in einen TaskNote-Link konvertiert wird"},folder:{name:"Ordner für inline erstellte Aufgaben",description:"Ordner, in dem Aufgaben aus Inline-Befehlen oder Checkbox-Konvertierungen erstellt werden. Leer lassen, um den Standard-Aufgabenordner zu verwenden. Verwende {{currentNotePath}} für den Ordner der aktuellen Notiz oder {{currentNoteTitle}} für einen Unterordner mit dem Namen der aktuellen Notiz."}},nlp:{header:"Natürliche Sprachverarbeitung",description:"Analysiere Daten, Prioritäten und andere Eigenschaften aus Texteingaben.",enable:{name:"Natürliche Spracheingabe für Aufgaben aktivieren",description:"Parse Fälligkeitsdaten, Prioritäten und Kontexte aus natürlicher Sprache beim Erstellen von Aufgaben"},defaultToScheduled:{name:"Standardmäßig geplant",description:"Wenn NLP ein Datum ohne Kontext erkennt, behandle es als geplant statt fällig"},language:{name:"NLP-Sprache",description:"Sprache für natürliche Sprachverarbeitungsmuster und Datumsanalyse"},statusTrigger:{name:"Status-Vorschlag Trigger",description:"Text zum Auslösen von Status-Vorschlägen (leer lassen zum Deaktivieren)"}},pomodoro:{header:"Pomodoro-Timer",description:"Konfiguriere Arbeits-/Pausenintervalle für den Pomodoro-Timer.",workDuration:{name:"Arbeitsdauer",description:"Dauer der Arbeitsintervalle in Minuten"},shortBreak:{name:"Kurze Pause",description:"Dauer der kurzen Pausen in Minuten"},longBreak:{name:"Lange Pause",description:"Dauer der langen Pausen in Minuten"},longBreakInterval:{name:"Lange Pause Intervall",description:"Anzahl der Arbeitssitzungen vor einer langen Pause"},autoStartBreaks:{name:"Pausen automatisch starten",description:"Pausentimer nach Arbeitssitzungen automatisch starten"},autoStartWork:{name:"Arbeit automatisch starten",description:"Arbeitssitzungen nach Pausen automatisch starten"},notifications:{name:"Pomodoro-Benachrichtigungen",description:"Benachrichtigungen anzeigen, wenn Pomodoro-Sitzungen enden"},mobileSidebar:{name:"Mobile Seitenleiste",description:"Wo der Pomodoro-Timer auf mobilen Geräten geöffnet werden soll",tab:"Notiz-Panel",left:"Linke Seitenleiste",right:"Rechte Seitenleiste"},statusBar:{name:"Pomodoro in der Statusleiste anzeigen",description:"Aktiven Pomodoro-Countdown in der Obsidian-Statusleiste anzeigen"}},uiLanguage:{header:"Oberflächensprache",description:"Ändere die Sprache der TaskNotes-Menüs, Hinweise und Ansichten.",dropdown:{name:"UI-Sprache",description:"Wähle die Sprache für TaskNotes-Oberflächentexte"}},pomodoroSound:{enabledName:"Ton aktiviert",enabledDesc:"Ton abspielen, wenn Pomodoro-Sitzungen enden",volumeName:"Tonlautstärke",volumeDesc:"Lautstärke für Pomodoro-Töne (0-100)"},dataStorage:{name:"Pomodoro-Datenspeicherung",description:"Konfiguriere, wo Pomodoro-Sitzungsdaten gespeichert und verwaltet werden.",dailyNotes:"Tägliche Notizen",pluginData:"Plugin-Daten",notices:{locationChanged:"Pomodoro-Speicherort geändert zu {location}"}},notifications:{header:"Benachrichtigungen",description:"Konfiguriere Aufgabenerinnerungsbenachrichtigungen und Warnungen.",enableName:"Benachrichtigungen aktivieren",enableDesc:"Aufgabenerinnerungs-Benachrichtigungen aktivieren",typeName:"Benachrichtigungstyp",typeDesc:"Art der anzuzeigenden Benachrichtigungen",systemLabel:"System-Benachrichtigungen",inAppLabel:"In-App-Benachrichtigungen",soundEnabledName:"Benachrichtigungston",soundEnabledDesc:"Ton abspielen, wenn Aufgabenerinnerungen ausgelöst werden",soundVolumeName:"Tonlautstärke",soundVolumeDesc:"Lautstärke für Aufgabenerinnerungstöne (0-100)",soundPreviewName:"Benachrichtigungston vorhören",soundPreviewDesc:"Konfigurierten Aufgabenerinnerungston abspielen",soundPreviewButton:"Vorschau",testReminderName:"Testerinnerung senden",testReminderDesc:"Eine Testerinnerung mit dem aktuellen Benachrichtigungstyp und den Toneinstellungen senden.",testReminderButton:"Test senden"},overdue:{hideCompletedName:"Abgeschlossene Aufgaben aus überfälligen ausblenden",hideCompletedDesc:"Abgeschlossene Aufgaben aus überfälligen Aufgabenberechnungen ausschließen"},indexing:{disableName:"Notizindexierung deaktivieren",disableDesc:"Automatische Indexierung von Notizinhalten für bessere Leistung deaktivieren"},suggestions:{debounceName:"Vorschlag-Verzögerung",debounceDesc:"Verzögerung in Millisekunden vor dem Anzeigen von Vorschlägen"},timeTracking:{autoStopName:"Zeiterfassung automatisch stoppen",autoStopDesc:"Zeiterfassung automatisch stoppen, wenn eine Aufgabe als abgeschlossen markiert wird",stopNotificationName:"Zeiterfassung-Stopp-Benachrichtigung",stopNotificationDesc:"Benachrichtigung anzeigen, wenn Zeiterfassung automatisch gestoppt wird"},recurring:{maintainOffsetName:"Fälligkeitsdatum-Offset in wiederkehrenden Aufgaben beibehalten",maintainOffsetDesc:"Den Offset zwischen Fälligkeitsdatum und geplantem Datum beibehalten, wenn wiederkehrende Aufgaben abgeschlossen werden",resetCheckboxesName:"Kontrollkästchen bei Wiederholung zurücksetzen",resetCheckboxesDesc:"Alle Markdown-Kontrollkästchen im Aufgabentext zurücksetzen, wenn eine wiederkehrende Aufgabe abgeschlossen und neu geplant wird"},timeblocking:{header:"Zeitblockierung",description:"Konfiguriere Zeitblockfunktionalität für leichte Planung in täglichen Notizen. Ziehe in Kalenderansichten, um Ereignisse zu erstellen - wähle 'Zeitblock' aus dem Kontextmenü.",enableName:"Zeitblockierung aktivieren",enableDesc:"Zeitblockfunktionalität für leichte Planung in täglichen Notizen aktivieren. Wenn aktiviert, erscheint die Option 'Zeitblock' im Kalender-Ziehen-Kontextmenü.",showBlocksName:"Zeitblöcke anzeigen",showBlocksDesc:"Zeitblöcke aus täglichen Notizen standardmäßig anzeigen",defaultColorName:"Standard-Zeitblockfarbe",defaultColorDesc:"Die Standardfarbe für neue Zeitblöcke",usage:"Verwendung: Ziehe im Kalender, um Ereignisse zu erstellen. Wähle 'Zeitblock' aus dem Kontextmenü (nur sichtbar, wenn Zeitblockierung aktiviert ist). Ziehe, um bestehende Zeitblöcke zu verschieben. Ränder anpassen, um Dauer zu ändern."},performance:{header:"Leistung & Verhalten",description:"Konfiguriere Plugin-Leistung und Verhaltensoptionen."},timeTrackingSection:{header:"Zeiterfassung",description:"Konfiguriere automatische Zeiterfassungsverhalten."},recurringSection:{header:"Wiederkehrende Aufgaben",description:"Konfiguriere Verhalten für wiederkehrende Aufgabenverwaltung."},debugLogging:{header:"Debug-Protokollierung",description:"Konfiguriere Debug-Protokollausgaben für die Fehlerbehebung.",enableName:"Debug-Protokollierung aktivieren",enableDesc:"Protokolliere detaillierte Drag-and-Drop- und Ansichtsdiagnosen in der Entwicklerkonsole. Nützlich zur Fehlerbehebung."}},defaults:{header:{basicDefaults:"Grundeinstellungen",dateDefaults:"Datumsvoreinstellungen",defaultReminders:"Standard-Erinnerungen",bodyTemplate:"Körpervorlage",instantTaskConversion:"Sofortige Aufgabenkonvertierung"},description:{basicDefaults:"Setze Standardwerte für neue Aufgaben, um die Aufgabenerstellung zu beschleunigen.",dateDefaults:"Setze Standard-Fälligkeits- und Planungsdaten für neue Aufgaben.",defaultReminders:"Konfiguriere Standard-Erinnerungen, die neuen Aufgaben hinzugefügt werden.",bodyTemplate:"Konfiguriere eine Vorlagendatei für neue Aufgabeninhalte.",instantTaskConversion:"Konfiguriere Verhalten bei sofortiger Textkonvertierung zu Aufgaben."},basicDefaults:{defaultStatus:{name:"Standardstatus",description:"Standardstatus für neue Aufgaben"},defaultPriority:{name:"Standardpriorität",description:"Standardpriorität für neue Aufgaben"},defaultContexts:{name:"Standardkontexte",description:"Kommagetrennte Liste von Standardkontexten (z.B. @zuhause, @arbeit)",placeholder:"@zuhause, @arbeit"},defaultTags:{name:"Standard-Tags",description:"Kommagetrennte Liste von Standard-Tags (ohne #)",placeholder:"wichtig, dringend"},defaultProjects:{name:"Standardprojekte",description:"Standard-Projektlinks für neue Aufgaben",selectButton:"Projekte auswählen",selectTooltip:"Wähle Projektnotizen zum standardmäßigen Verlinken",removeTooltip:"{name} aus Standardprojekten entfernen"},useParentNoteForTaskCreation:{name:"Aktive Notiz als Projekt für neue Aufgaben verwenden",description:"Verlinkt die aktive Notiz automatisch als Projekt, wenn die Aufgabenerstellung über Befehlspalette oder Ribbon geöffnet wird"},useParentNoteAsProject:{name:"Übergeordnete Notiz als Projekt für Inline- und Sofortkonvertierung verwenden",description:"Verlinkt die Quellnotiz automatisch als Projekt, wenn Inline-Aufgabenerstellung oder sofortige Aufgabenkonvertierung verwendet wird"},useParentHeaderAsProject:{name:"Übergeordnete Überschrift als Projekt bei sofortiger Konvertierung verwenden",description:"Die nächstgelegene Überschrift über der konvertierten Zeile bei sofortiger Aufgabenkonvertierung automatisch als Projekt verlinken"},defaultTimeEstimate:{name:"Standard-Zeitschätzung",description:"Standard-Zeitschätzung in Minuten (0 = kein Standard)",placeholder:"60"},defaultRecurrence:{name:"Standard-Wiederholung",description:"Standard-Wiederholungsmuster für neue Aufgaben"}},dateDefaults:{defaultDueDate:{name:"Standard-Fälligkeitsdatum",description:"Standard-Fälligkeitsdatum für neue Aufgaben"},defaultScheduledDate:{name:"Standard-Planungsdatum",description:"Standard-Planungsdatum für neue Aufgaben"}},reminders:{addReminder:{name:"Standard-Erinnerung hinzufügen",description:"Erstelle eine neue Standard-Erinnerung, die allen neuen Aufgaben hinzugefügt wird",buttonText:"Erinnerung hinzufügen"},emptyState:"Keine Standard-Erinnerungen konfiguriert. Füge eine Erinnerung hinzu, um automatisch über neue Aufgaben benachrichtigt zu werden.",emptyStateButton:"Erinnerung hinzufügen",reminderDescription:"Erinnerungsbeschreibung",unnamedReminder:"Unbenannte Erinnerung",deleteTooltip:"Erinnerung löschen",fields:{description:"Beschreibung:",type:"Typ:",offset:"Offset:",unit:"Einheit:",direction:"Richtung:",relatedTo:"Bezogen auf:",date:"Datum:",time:"Zeit:"},types:{relative:"Relativ (vor/nach Aufgabendaten)",absolute:"Absolut (spezifisches Datum/Zeit)"},units:{minutes:"Minuten",hours:"Stunden",days:"Tage"},directions:{before:"vor",after:"nach"},relatedTo:{due:"Fälligkeitsdatum",scheduled:"Planungsdatum"}},bodyTemplate:{useBodyTemplate:{name:"Körpervorlage verwenden",description:"Verwende eine Vorlagendatei für Aufgabenkörperinhalte"},bodyTemplateFile:{name:"Körpervorlagendatei",description:"Pfad zur Vorlagendatei für Aufgabenkörperinhalte. Unterstützt Vorlagenvariablen wie {{title}}, {{date}}, {{time}}, {{priority}}, {{status}}, etc.",placeholder:"Templates/Aufgaben Vorlage.md",ariaLabel:"Pfad zur Körpervorlagendatei"},useOccurrenceBodyTemplate:{name:"Vorlage für Vorkommnisnotizen verwenden",description:"Eine separate Fallback-Vorlage für materialisierte Vorkommnisnotizen verwenden, wenn die wiederkehrende Aufgabe kein occurrence_template festlegt"},occurrenceBodyTemplateFile:{name:"Vorlagendatei für Vorkommnisnotizen",description:"Pfad zur Vorlagendatei für materialisierte Vorkommnisnotizen. Das occurrence_template einer wiederkehrenden Aufgabe hat Vorrang vor diesem Fallback.",placeholder:"Templates/Vorkommnis Vorlage.md",ariaLabel:"Pfad zur Vorlagendatei für Vorkommnisnotizen"},variablesHeader:"Vorlagenvariablen:",variables:{title:"{{title}} - Aufgabentitel",details:"{{details}} - Benutzergegebene Details aus Modal",date:"{{date}} - Aktuelles Datum (YYYY-MM-DD)",time:"{{time}} - Aktuelle Zeit (HH:MM)",priority:"{{priority}} - Aufgabenpriorität",status:"{{status}} - Aufgabenstatus",contexts:"{{contexts}} - Aufgabenkontexte",tags:"{{tags}} - Aufgaben-Tags",projects:"{{projects}} - Aufgabenprojekte"}},instantConversion:{useDefaultsOnInstantConvert:{name:"Aufgabenstandards bei sofortiger Konvertierung verwenden",description:"Standard-Aufgabeneinstellungen anwenden bei sofortiger Textkonvertierung zu Aufgaben"}},options:{noDefault:"Kein Standard",none:"Keine",today:"Heute",tomorrow:"Morgen",nextWeek:"Nächste Woche",daily:"Täglich",weekly:"Wöchentlich",monthly:"Monatlich",yearly:"Jährlich"}},general:{taskStorage:{header:"Aufgabenspeicherung",description:"Konfiguriere, wo Aufgaben gespeichert und wie sie identifiziert werden.",defaultFolder:{name:"Standard-Aufgabenordner",description:"Standardort für neue Aufgaben. Unterstützt Ordnervorlagen-Variablen wie {{currentNotePath}}, {{currentNoteTitle}} und {{projectFilePath}} sowie Datums-Tokens im Daily-Notes-Stil wie YYYY/MM/DD."},moveArchived:{name:"Archivierte Aufgaben in Ordner verschieben",description:"Archivierte Aufgaben automatisch in einen Archivordner verschieben"},archiveFolder:{name:"Archivordner",description:"Ordner zum Verschieben von Aufgaben beim Archivieren. Unterstützt Template-Variablen wie {{year}}, {{month}}, {{priority}}, etc."}},taskIdentification:{header:"Aufgabenidentifikation",description:"Wähle, wie TaskNotes Notizen als Aufgaben identifiziert.",identifyBy:{name:"Aufgaben identifizieren durch",description:"Wähle, ob Aufgaben durch Tag oder durch eine Frontmatter-Eigenschaft identifiziert werden",options:{tag:"Tag",property:"Eigenschaft"}},taskTag:{name:"Aufgaben-Tag",description:"Tag, das Notizen als Aufgaben identifiziert (ohne #). Bestehende .base-Ansichtsfilter behalten nach dieser Änderung den alten Tag; aktualisiere die Standard-Base-Dateien oder bearbeite diese Filter."},hideIdentifyingTags:{name:"Identifikations-Tags in Aufgabenkarten ausblenden",description:"Wenn aktiviert, werden Tags, die mit dem Aufgabenidentifikations-Tag übereinstimmen (einschließlich hierarchischer Übereinstimmungen wie 'task/project'), in Aufgabenkartenanzeigen ausgeblendet"},hideIdentifyingTagsMode:{name:"Umfang der ausgeblendeten Tags",description:"Wähle, ob beim Ausblenden von Identifikations-Tags auch verschachtelte Tags ausgeblendet werden.",options:{all:"Aufgaben-Tag und verschachtelte Tags",exactOnly:"Nur exakter Aufgaben-Tag"}},taskProperty:{name:"Aufgabeneigenschaftsname",description:'Der Frontmatter-Eigenschaftsname (z.B. "category")'},taskPropertyValue:{name:"Aufgabeneigenschaftswert",description:'Der Wert, der eine Notiz als Aufgabe identifiziert (z.B. "task")'}},folderManagement:{header:"Ordnerverwaltung",excludedFolders:{name:"Ausgeschlossene Ordner",description:"Kommagetrennte Liste von Ordnern, die von der Aufgabenindizierung und Projektvorschlägen ausgeschlossen werden"}},frontmatter:{header:"Frontmatter",description:"Konfigurieren Sie, wie Links in Frontmatter-Eigenschaften formatiert werden.",useMarkdownLinks:{name:"Markdown-Links in Frontmatter verwenden",description:"Markdown-Links ([text](path)) anstelle von Wikilinks ([[link]]) in Frontmatter-Eigenschaften generieren.\\n\\n⚠️ Erfordert das Plugin 'obsidian-frontmatter-markdown-links', um korrekt zu funktionieren."}},taskInteraction:{header:"Aufgabeninteraktion",description:"Konfiguriere, wie das Klicken auf Aufgaben funktioniert.",singleClick:{name:"Einfachklick-Aktion",description:"Aktion beim Einfachklick auf eine Aufgabenkarte"},doubleClick:{name:"Doppelklick-Aktion",description:"Aktion beim Doppelklick auf eine Aufgabenkarte"},actions:{edit:"Aufgabe bearbeiten",openNote:"Notiz öffnen",none:"Keine Aktion"}},releaseNotes:{header:"Versionshinweise",description:"Aktuelle Version: {version}",showOnUpdate:{name:"Versionshinweise nach Update anzeigen",description:"Versionshinweise automatisch öffnen, wenn TaskNotes auf eine neue Version aktualisiert wird"},checkForUpdates:{name:"Beim Start nach neuen Versionen suchen",description:"Prüft GitHub einmal beim Start von TaskNotes und zeigt einen Hinweis, wenn eine neuere kompatible Version verfügbar ist"},viewButton:{name:"Versionshinweise anzeigen",description:"Sehen Sie, was in der neuesten Version von TaskNotes neu ist",buttonText:"Versionshinweise anzeigen"}}},taskProperties:{sections:{coreProperties:"Kerneigenschaften",corePropertiesDesc:"Status und Priorität sind die Kerneigenschaften, die den Zustand und die Wichtigkeit einer Aufgabe definieren.",dateProperties:"Datumseigenschaften",datePropertiesDesc:"Konfiguriere, wann Aufgaben fällig und geplant sind.",organizationProperties:"Organisationseigenschaften",organizationPropertiesDesc:"Organisiere Aufgaben mit Kontexten, Projekten und Tags.",taskDetails:"Aufgabendetails",taskDetailsDesc:"Zusätzliche Details wie Zeitschätzungen, Wiederholungen und Erinnerungen.",metadataProperties:"Metadaten-Eigenschaften",metadataPropertiesDesc:"Vom System verwaltete Eigenschaften zur Verfolgung der Aufgabenhistorie.",featureProperties:"Feature-Eigenschaften",featurePropertiesDesc:"Eigenschaften, die von bestimmten TaskNotes-Funktionen wie Pomodoro-Timer und Kalender-Synchronisation verwendet werden."},propertyCard:{propertyKey:"Eigenschaftsschlüssel:",default:"Standard:",nlpTrigger:"NLP-Auslöser:",triggerChar:"Auslöserzeichen:",triggerEmpty:"Auslöser darf nicht leer sein",triggerTooLong:"Auslöser ist zu lang (max. 10 Zeichen)"},properties:{status:{name:"Status",description:"Verfolgt den aktuellen Zustand einer Aufgabe (z.B. todo, in-bearbeitung, erledigt). Der Status bestimmt, ob eine Aufgabe als abgeschlossen erscheint und kann die automatische Archivierung auslösen."},priority:{name:"Priorität",description:"Zeigt die Wichtigkeit der Aufgabe an. Wird zum Sortieren und Filtern verwendet. Werte werden in Bases-Ansichten alphabetisch sortiert, verwende daher Präfixe wie 1-, 2- zur Steuerung der Reihenfolge."},due:{name:"Fälligkeitsdatum",description:"Der Termin, bis zu dem eine Aufgabe abgeschlossen sein muss. Aufgaben nach ihrem Fälligkeitsdatum erscheinen als überfällig. Wird als Datum im Frontmatter gespeichert."},scheduled:{name:"Geplantes Datum",description:"Wann du planst, an einer Aufgabe zu arbeiten. Im Gegensatz zum Fälligkeitsdatum repräsentiert dies deine beabsichtigte Startzeit. Aufgaben erscheinen im Kalender zu ihrem geplanten Datum/Uhrzeit."},contexts:{name:"Kontexte",description:"Orte oder Bedingungen, unter denen eine Aufgabe erledigt werden kann (z.B. @zuhause, @büro, @telefon). Nützlich zum Filtern von Aufgaben nach deiner aktuellen Situation. Wird als Liste gespeichert."},projects:{name:"Projekte",description:"Links zu Projektnotizen, zu denen diese Aufgabe gehört. Wird als Wikilinks gespeichert (z.B. [[Projektname]]). Aufgaben können zu mehreren Projekten gehören."},tags:{name:"Tags",description:"Native Obsidian-Tags zur Kategorisierung von Aufgaben. Diese werden in der Tags-Frontmatter-Eigenschaft gespeichert und funktionieren mit Obsidians Tag-Funktionen."},timeEstimate:{name:"Zeitschätzung",description:"Geschätzte Minuten zur Fertigstellung der Aufgabe. Wird für Zeitplanung und Arbeitsbelastungsplanung verwendet. Wird auf Aufgabenkarten und Kalenderereignissen angezeigt."},recurrence:{name:"Wiederholung",description:"Muster für wiederholende Aufgaben (täglich, wöchentlich, monatlich, jährlich oder benutzerdefinierte RRULE). Wenn eine wiederkehrende Aufgabe abgeschlossen wird, wird ihr geplantes Datum automatisch auf das nächste Vorkommen aktualisiert."},recurrenceAnchor:{name:"Wiederholungsanker",description:"Bestimmt, wie das nächste Vorkommen berechnet wird: 'scheduled' verwendet das geplante Datum, 'completion' verwendet das tatsächliche Abschlussdatum."},reminders:{name:"Erinnerungen",description:"Benachrichtigungen, die vor Fälligkeits- oder geplanten Terminen ausgelöst werden. Wird als Liste von Erinnerungsobjekten mit Timing und optionaler Beschreibung gespeichert."},title:{name:"Titel",description:"Der Aufgabenname. Kann im Frontmatter oder im Dateinamen gespeichert werden (wenn 'Titel im Dateinamen speichern' aktiviert ist)."},dateCreated:{name:"Erstellungsdatum",description:"Zeitstempel, wann die Aufgabe erstellt wurde. Wird automatisch gesetzt und zum Sortieren nach Erstellungsreihenfolge verwendet."},dateModified:{name:"Änderungsdatum",description:"Zeitstempel der letzten Änderung an der Aufgabe. Wird automatisch aktualisiert, wenn sich eine Aufgabeneigenschaft ändert."},completedDate:{name:"Abschlussdatum",description:"Zeitstempel, wann die Aufgabe als erledigt markiert wurde. Wird automatisch gesetzt, wenn der Status auf einen abgeschlossenen Zustand wechselt."},archiveTag:{name:"Archiv-Tag",description:"Tag, das zu Aufgaben hinzugefügt wird, wenn sie archiviert werden. Wird verwendet, um archivierte Aufgaben zu identifizieren und kann das Verschieben von Dateien in den Archivordner auslösen."},timeEntries:{name:"Zeiteinträge",description:"Aufzeichnungen von Zeiterfassungssitzungen für diese Aufgabe. Jeder Eintrag speichert Start- und Endzeitstempel. Wird zur Berechnung der Gesamtzeit verwendet."},completeInstances:{name:"Abgeschlossene Instanzen",description:"Abschlusshistorie für wiederkehrende Aufgaben. Speichert Daten, an denen jede Instanz abgeschlossen wurde, um doppelte Abschlüsse zu verhindern."},skippedInstances:{name:"Übersprungene Instanzen",description:"Übersprungene Vorkommen für wiederkehrende Aufgaben. Speichert Daten von Instanzen, die übersprungen statt abgeschlossen wurden."},blockedBy:{name:"Blockiert durch",description:"Links zu Aufgaben, die vor dieser abgeschlossen werden müssen. Wird als Wikilinks gespeichert. Blockierte Aufgaben zeigen einen visuellen Indikator an."},sortOrder:{name:"Manuelle Reihenfolge",description:"Die Frontmatter-Eigenschaft für die manuelle Sortierung per Drag-and-Drop. Die Ansicht muss nach dieser Eigenschaft sortiert sein, damit Drag-and-Drop-Reihenfolge funktioniert."},pomodoros:{name:"Pomodoros",description:"Anzahl abgeschlossener Pomodoro-Sitzungen. Wenn die Datenspeicherung auf 'Tagesnotizen' eingestellt ist, wird dies in Tagesnotizen statt in Aufgabendateien geschrieben."},icsEventId:{name:"ICS-Ereignis-ID",description:"Eindeutige Kennung, die eine Notiz mit einem ICS-Kalenderereignis verknüpft. Wird automatisch hinzugefügt, wenn Notizen aus Kalenderereignissen erstellt werden."},icsEventTag:{name:"ICS-Ereignis-Tag",description:"Tag zur Identifizierung von Notizen, die aus ICS-Kalenderereignissen erstellt wurden. Wird verwendet, um kalendergenerierte Notizen von regulären Aufgaben zu unterscheiden."}},statusCard:{valuesHeader:"Statuswerte"},priorityCard:{valuesHeader:"Prioritätswerte"},projectsCard:{defaultProjects:"Standardprojekte:",useParentNoteForTaskCreation:"Aktive Notiz für neue Aufgaben verwenden:",useParentNoteForInlineTasks:"Übergeordnete Notiz für Inline-/Sofortkonvertierung verwenden:",useParentHeader:"Übergeordnete Überschrift als Projekt verwenden:",inheritParentTaskProperties:"Eigenschaften der übergeordneten Aufgabe für Unteraufgaben übernehmen:",noDefaultProjects:"Keine Standardprojekte ausgewählt",autosuggestFilters:"Autovorschlag-Filter",customizeDisplay:"Anzeige anpassen",filtersOn:"Filter aktiv"},titleCard:{storeTitleInFilename:"Titel im Dateinamen speichern:",storedInFilename:"Im Dateinamen gespeichert",filenameUpdatesWithTitle:"Der Dateiname wird automatisch aktualisiert, wenn sich der Aufgabentitel ändert.",filenameFormat:"Dateinamenformat:",customTemplate:"Benutzerdefinierte Vorlage:",legacySyntaxWarning:"Die Syntax mit einfachen Klammern wie {title} ist veraltet. Bitte verwenden Sie stattdessen die Syntax mit doppelten Klammern {{title}} für Konsistenz mit Body-Vorlagen.",occurrenceFilenameTemplate:"Dateinamenvorlage für Vorkommen",occurrenceFilenameTemplateHelp:"Dateinamenvorlage für materialisierte Vorkommen wiederkehrender Aufgaben. Leer lassen, um den bisherigen Namen beizubehalten (Titel der übergeordneten Aufgabe plus Zahlensuffix). Wähle die Granularität ausdrücklich mit {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}} oder {{occurrenceMonthName}}. Alle regulären Dateinamensvariablen funktionieren ebenfalls. Eine übergeordnete Aufgabe kann diese Vorlage über die unten konfigurierte Frontmatter-Eigenschaft überschreiben.",occurrenceFilenameProperty:"Override-Eigenschaft für Vorkommensvorlagen",occurrenceFilenamePropertyHelp:"Name der Frontmatter-Eigenschaft einer wiederkehrenden übergeordneten Aufgabe, die die Dateinamenvorlage ihrer Vorkommen überschreibt."},tagsCard:{nativeObsidianTags:"Verwendet native Obsidian-Tags"},remindersCard:{defaultReminders:"Standarderinnerungen"},taskStatuses:{header:"Aufgabenstatus",description:"Passe die verfügbaren Statusoptionen für deine Aufgaben an. Diese Status steuern den Aufgabenlebenszyklus und bestimmen, wann Aufgaben als abgeschlossen gelten.",howTheyWork:{title:"Wie Status funktionieren:",value:'Wert: Der interne Bezeichner, der in deinen Aufgabendateien gespeichert wird (z.B. "in-progress")',label:'Label: Der Anzeigename in der Benutzeroberfläche (z.B. "In Bearbeitung")',color:"Farbe: Visuelle Indikatorfarbe für Statuspunkt und Abzeichen",icon:'Symbol: Optionaler Lucide-Symbolname zur Anzeige anstelle des farbigen Punktes (z.B. "check", "circle", "clock"). Symbole unter lucide.dev durchsuchen',completed:"Abgeschlossen: Wenn angehakt, werden Aufgaben mit diesem Status als fertig betrachtet und können anders gefiltert werden",autoArchive:"Auto-Archivierung: Wenn aktiviert, werden Aufgaben nach der angegebenen Verzögerung automatisch archiviert (1-1440 Minuten)",orderNote:"Die Reihenfolge unten bestimmt die Sequenz beim Durchschalten der Status durch Klicken auf Aufgabenstatus-Abzeichen."},addNew:{name:"Neuen Status hinzufügen",description:"Erstelle eine neue Statusoption für deine Aufgaben",buttonText:"Status hinzufügen"},validationNote:'Hinweis: Du musst mindestens 2 Status haben, und mindestens ein Status muss als "Abgeschlossen" markiert sein.',emptyState:"Keine benutzerdefinierten Status konfiguriert. Füge einen Status hinzu, um zu beginnen.",emptyStateButton:"Status hinzufügen",fields:{value:"Wert:",label:"Label:",color:"Farbe:",icon:"Symbol:",completed:"Abgeschlossen:",excludeFromCycle:"Beim Durchlaufen überspringen:",nextStatus:"Nächster Status:",autoArchive:"Auto-Archivierung:",delayMinutes:"Verzögerung (Minuten):"},placeholders:{value:"in-bearbeitung",label:"In Bearbeitung",icon:"check, circle, clock",nextStatusDefault:"Statusreihenfolge verwenden"},badges:{completed:"Abgeschlossen"},deleteConfirm:'Bist du sicher, dass du den Status "{label}" löschen möchtest?'},taskPriorities:{header:"Aufgabenprioritäten",description:"Passe die verfügbaren Prioritätsstufen für deine Aufgaben an. Ab v4.0+ werden Prioritäten in Bases-Ansichten alphabetisch nach ihrem Wert sortiert.",howTheyWork:{title:"Wie Prioritäten funktionieren:",value:'Wert: Der interne Bezeichner, der in deinen Aufgabendateien gespeichert wird. Verwende Präfixe wie "1-dringend", "2-hoch", um die Sortierreihenfolge in Bases-Ansichten zu steuern.',label:'Anzeigelabel: Der Anzeigename in der Benutzeroberfläche (z.B. "Hohe Priorität")',color:"Farbe: Visuelle Indikatorfarbe für Prioritätspunkt und Abzeichen",icon:"Symbol: Optionales Lucide-Symbol, das auf Aufgabenkarten statt des Prioritätspunkts angezeigt wird",weight:"Gewicht: Numerischer Wert für Sortierung (höhere Gewichte erscheinen zuerst in Listen)",weightNote:"Aufgaben werden automatisch nach Prioritätsgewicht in absteigender Reihenfolge sortiert (höchstes Gewicht zuerst). Gewichte können beliebige positive Zahlen sein."},addNew:{name:"Neue Priorität hinzufügen",description:"Erstelle eine neue Prioritätsstufe für deine Aufgaben",buttonText:"Priorität hinzufügen"},validationNote:"Hinweis: Du musst mindestens 1 Priorität haben. Prioritäten werden alphabetisch nach Wert in Bases-Ansichten sortiert.",emptyState:"Keine benutzerdefinierten Prioritäten konfiguriert. Füge eine Priorität hinzu, um zu beginnen.",emptyStateButton:"Priorität hinzufügen",fields:{value:"Wert:",label:"Label:",color:"Farbe:",icon:"Symbol:",weight:"Gewicht:"},placeholders:{value:"hoch",label:"Hohe Priorität",icon:"alert-circle"},weightLabel:"Gewicht: {weight}",deleteConfirm:"Du musst mindestens eine Priorität haben",deleteTooltip:"Priorität löschen"},fieldMapping:{header:"Feldzuordnung",warning:"⚠️ Warnung: TaskNotes wird diese Eigenschaftsnamen LESEN UND SCHREIBEN. Das Ändern nach dem Erstellen von Aufgaben kann Inkonsistenzen verursachen.",description:"Konfiguriere, welche Frontmatter-Eigenschaften TaskNotes für jedes Feld verwenden soll.",resetButton:{name:"Feldzuordnungen zurücksetzen",description:"Alle Feldzuordnungen auf Standardwerte zurücksetzen",buttonText:"Auf Standard zurücksetzen"},notices:{resetSuccess:"Feldzuordnungen auf Standard zurückgesetzt",resetFailure:"Feldzuordnungen konnten nicht zurückgesetzt werden",updateFailure:"Feldzuordnung für {label} konnte nicht aktualisiert werden. Bitte versuche es erneut."},table:{fieldHeader:"TaskNotes-Feld",propertyHeader:"Dein Eigenschaftsname"},fields:{title:"Titel",status:"Status",priority:"Priorität",due:"Fälligkeitsdatum",scheduled:"Planungsdatum",contexts:"Kontexte",projects:"Projekte",timeEstimate:"Zeitschätzung",recurrence:"Wiederholung",dateCreated:"Erstellungsdatum",completedDate:"Abschlussdatum",dateModified:"Änderungsdatum",archiveTag:"Archiv-Tag",timeEntries:"Zeiteinträge",completeInstances:"Abgeschlossene Instanzen",blockedBy:"Blockiert von",sortOrder:"Manuelle Reihenfolge",pomodoros:"Pomodoros",icsEventId:"ICS-Event-ID",icsEventTag:"ICS-Event-Tag",reminders:"Erinnerungen"}},customUserFields:{header:"Benutzerdefinierte Felder",description:"Definiere benutzerdefinierte Frontmatter-Eigenschaften, die als typisierte Filteroptionen in allen Ansichten erscheinen. Jede Zeile: Anzeigename, Eigenschaftsname, Typ.",addNew:{name:"Neues Benutzerfeld hinzufügen",description:"Erstelle ein neues benutzerdefiniertes Feld, das in Filtern und Ansichten erscheint",buttonText:"Benutzerfeld hinzufügen"},emptyState:"Keine benutzerdefinierten Felder konfiguriert. Füge ein Feld hinzu, um benutzerdefinierte Eigenschaften für deine Aufgaben zu erstellen.",emptyStateButton:"Benutzerfeld hinzufügen",fields:{displayName:"Anzeigename:",propertyKey:"Eigenschaftsschlüssel:",type:"Typ:",defaultValue:"Standardwert:"},placeholders:{displayName:"Anzeigename",propertyKey:"eigenschafts-name",defaultValue:"Standardwert",defaultValueList:"Standardwerte (kommagetrennt)"},types:{text:"Text",number:"Zahl",boolean:"Boolean",date:"Datum",list:"Liste"},defaultNames:{unnamedField:"Unbenanntes Feld",noKey:"kein-schlüssel"},deleteTooltip:"Feld löschen",autosuggestFilters:{header:"Autovervollständigungsfilter (Erweitert)",description:"Filtern Sie, welche Dateien in Autovervollständigungsvorschlägen für dieses Feld angezeigt werden"}}},appearance:{taskCards:{header:"Aufgabenkarten",description:"Konfiguriere, wie Aufgabenkarten in allen Ansichten angezeigt werden.",defaultVisibleProperties:{name:"Standard sichtbare Eigenschaften",description:"Wähle, welche Eigenschaften standardmäßig auf Aufgabenkarten erscheinen."},completionSubmenu:{name:"Abschluss- und Überspringen-Aktionen in einem Untermenü gruppieren",description:"Zeige die Aktionen zum Abschließen und Überspringen in einem Untermenü des Aufgaben-Kontextmenüs. Deaktiviere diese Option, um sie direkt im Menü anzuzeigen."},propertyGroups:{coreProperties:"KERNEIGENSCHAFTEN",organization:"ORGANISATION",customProperties:"BENUTZERDEFINIERTE EIGENSCHAFTEN"},properties:{status:"Statuspunkt",priority:"Prioritätspunkt",due:"Fälligkeitsdatum",scheduled:"Planungsdatum",timeEstimate:"Zeitschätzung",totalTrackedTime:"Gesamte erfasste Zeit",checklistProgress:"Checklistenfortschritt",recurrence:"Wiederholung",completedDate:"Abschlussdatum",createdDate:"Erstellungsdatum",modifiedDate:"Änderungsdatum",projects:"Projekte",contexts:"Kontexte",tags:"Tags",blocked:"Blockiert",blocking:"Blockierend"}},taskFilenames:{header:"Aufgabendateinamen",description:"Konfiguriere, wie Aufgabendateien beim Erstellen benannt werden.",storeTitleInFilename:{name:"Titel im Dateinamen speichern",description:"Verwende den Aufgabentitel als Dateinamen. Dateiname wird aktualisiert, wenn der Aufgabentitel geändert wird (Empfohlen)."},filenameFormat:{name:"Dateinamenformat",description:"Wie Aufgabendateinamen generiert werden sollen",options:{title:"Aufgabentitel (Nicht-aktualisierend)",zettel:"Zettelkasten-Format (JJMMTT + base36 Sekunden seit Mitternacht)",timestamp:"Vollständiger Zeitstempel (YYYY-MM-DD-HHMMSS)",custom:"Benutzerdefinierte Vorlage",uuid:"UUID v4"}},customTemplate:{name:"Benutzerdefinierte Dateinamenvorlage",description:"Vorlage für benutzerdefinierte Dateinamen. Verfügbare Variablen: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"Hinweis: {{dueDate}} und {{scheduledDate}} sind im Format YYYY-MM-DD und werden leer sein, wenn nicht gesetzt."}},displayFormatting:{header:"Anzeigeformatierung",description:"Konfiguriere, wie Daten, Zeiten und andere Daten im Plugin angezeigt werden.",timeFormat:{name:"Zeitformat",description:"Zeit im 12-Stunden- oder 24-Stunden-Format im gesamten Plugin anzeigen",options:{twelveHour:"12-Stunden (AM/PM)",twentyFourHour:"24-Stunden"}}},calendarView:{header:"Kalenderansicht",description:"Passe das Erscheinungsbild und Verhalten der Kalenderansicht an.",defaultView:{name:"Standardansicht",description:"Die Kalenderansicht, die beim Öffnen des Kalendertabs angezeigt wird",options:{monthGrid:"Monatsraster",weekTimeline:"Wochen-Timeline",dayTimeline:"Tages-Timeline",yearView:"Jahresansicht",customMultiDay:"Benutzerdefinierte mehrtägige"}},customDayCount:{name:"Benutzerdefinierte Ansicht Tageanzahl",description:"Anzahl der Tage in der benutzerdefinierten mehrtägigen Ansicht",placeholder:"3"},firstDayOfWeek:{name:"Erster Tag der Woche",description:"Welcher Tag soll die erste Spalte in Wochenansichten sein"},showWeekends:{name:"Wochenenden anzeigen",description:"Wochenenden in Kalenderansichten anzeigen"},showWeekNumbers:{name:"Wochennummern anzeigen",description:"Wochennummern in Kalenderansichten anzeigen"},showTodayHighlight:{name:"Heute-Hervorhebung anzeigen",description:"Den aktuellen Tag in Kalenderansichten hervorheben"},showCurrentTimeIndicator:{name:"Aktuelle Zeit-Indikator anzeigen",description:"Eine Linie anzeigen, die die aktuelle Zeit in Timeline-Ansichten zeigt"},selectionMirror:{name:"Auswahlspiegel",description:"Visuelle Vorschau beim Ziehen zur Auswahl von Zeitbereichen anzeigen"},calendarLocale:{name:"Kalendersprache",description:'Kalendersprache für Datumsformatierung und Kalendersystem (z.B. "en", "fa" für Farsi/Persisch, "de" für Deutsch). Leer lassen für automatische Erkennung vom Browser.',placeholder:"Automatische Erkennung",invalidLocale:"Ungültige Gebietsschema-Einstellung. Bitte geben Sie ein gültiges Sprachkürzel ein (z.B. 'de', 'en', 'fr-FR')."}},defaultEventVisibility:{header:"Standard-Event-Sichtbarkeit",description:"Konfiguriere, welche Event-Typen standardmäßig beim Öffnen des Kalenders sichtbar sind. Benutzer können diese trotzdem in der Kalenderansicht ein-/ausschalten.",showScheduledTasks:{name:"Geplante Aufgaben anzeigen",description:"Aufgaben mit geplanten Daten standardmäßig anzeigen"},showDueDates:{name:"Fälligkeitsdaten anzeigen",description:"Aufgaben-Fälligkeitsdaten standardmäßig anzeigen"},showDueWhenScheduled:{name:"Fälligkeitsdaten bei geplanten anzeigen",description:"Fälligkeitsdaten auch für Aufgaben anzeigen, die bereits geplante Daten haben"},showTimeEntries:{name:"Zeiteinträge anzeigen",description:"Abgeschlossene Zeiterfassungseinträge standardmäßig anzeigen"},showRecurringTasks:{name:"Wiederkehrende Aufgaben anzeigen",description:"Wiederkehrende Aufgabeninstanzen standardmäßig anzeigen"},showICSEvents:{name:"ICS-Events anzeigen",description:"Events aus ICS-Abonnements standardmäßig anzeigen"}},timeSettings:{header:"Zeiteinstellungen",description:"Konfiguriere zeitbezogene Anzeigeeinstellungen für Timeline-Ansichten.",timeSlotDuration:{name:"Zeitslot-Dauer",description:"Dauer jedes Zeitslots in Timeline-Ansichten",options:{fifteenMinutes:"15 Minuten",thirtyMinutes:"30 Minuten",sixtyMinutes:"60 Minuten"}},startTime:{name:"Startzeit",description:"Früheste Zeit in Timeline-Ansichten (HH:MM Format)",placeholder:"06:00"},endTime:{name:"Endzeit",description:"Späteste Zeit, die in Timeline-Ansichten angezeigt wird (HH:MM-Format). Verwende Werte über 24:00, um frühe Stunden des nächsten Tages anzuzeigen, z. B. 26:00 für 2 Uhr morgens.",placeholder:"26:00"},initialScrollTime:{name:"Anfangs-Scrollzeit",description:"Zeit, zu der beim Öffnen von Timeline-Ansichten gescrollt wird (HH:MM Format)",placeholder:"09:00"},eventMinHeight:{name:"Event-Mindesthöhe",description:"Mindesthöhe für Events in Timeline-Ansichten (Pixel)",placeholder:"15"}},uiElements:{header:"UI-Elemente",description:"Konfiguriere die Anzeige verschiedener UI-Elemente.",showTrackedTasksInStatusBar:{name:"Verfolgte Aufgaben in Statusleiste anzeigen",description:"Aktuell verfolgte Aufgaben in Obsidians Statusleiste anzeigen"},showProjectSubtasksWidget:{name:"Projekt-Unteraufgaben-Widget anzeigen",description:"Ein Widget anzeigen, das Unteraufgaben für die aktuelle Projektnotiz zeigt"},projectSubtasksPosition:{name:"Projekt-Unteraufgaben-Position",description:"Wo das Projekt-Unteraufgaben-Widget positioniert werden soll",options:{top:"Oben in der Notiz",bottom:"Unten in der Notiz"}},showRelationshipsWidget:{name:"Beziehungen-Widget anzeigen",description:"Ein Widget anzeigen, das alle Beziehungen für die aktuelle Notiz zeigt (Unteraufgaben, Projekte, Abhängigkeiten)"},relationshipsPosition:{name:"Beziehungen-Position",description:"Wo das Beziehungen-Widget positioniert werden soll",options:{top:"Oben in der Notiz",bottom:"Unten in der Notiz"}},showTaskCardInNote:{name:"Aufgabenkarte in Notiz anzeigen",description:"Eine Aufgabenkarten-Widget oben in Aufgabennotizen anzeigen, das die Aufgabendetails und Aktionen zeigt"},showCompletedTaskStrikethrough:{name:"Titel erledigter Aufgaben durchstreichen",description:"Zeichnet eine Linie durch Titel erledigter Aufgabenkarten. Deaktivieren, damit erledigte Aufgaben leichter lesbar bleiben"},showExpandableSubtasks:{name:"Ausklappbare Unteraufgaben anzeigen",description:"Aus-/Einklappen von Unteraufgaben-Abschnitten in Aufgabenkarten erlauben"},expandSubtasksByDefault:{name:"Unteraufgaben standardmäßig ausklappen",description:"Projekt-Unteraufgaben beim Anzeigen von Aufgabenkarten automatisch ausgeklappt anzeigen"},subtaskChevronPosition:{name:"Unteraufgaben-Chevron-Position",description:"Position der Aus-/Einklappen-Chevrons in Aufgabenkarten",options:{left:"Linke Seite",right:"Rechte Seite"}},viewsButtonAlignment:{name:"Ansichten-Button-Ausrichtung",description:"Ausrichtung des Ansichten/Filter-Buttons in der Aufgabenoberfläche",options:{left:"Linke Seite",right:"Rechte Seite"}}},projectAutosuggest:{header:"Projekt-Autovorschlag",description:"Passe an, wie Projektvorschläge während der Aufgabenerstellung angezeigt werden.",requiredTags:{name:"Erforderliche Tags",description:"Nur Notizen mit beliebigen dieser Tags anzeigen (kommagetrennt). Leer lassen für alle Notizen.",placeholder:"projekt, aktiv, wichtig"},includeFolders:{name:"Ordner einschließen",description:"Nur Notizen in diesen Ordnern anzeigen (kommagetrennte Pfade). Leer lassen für alle Ordner.",placeholder:"Projekte/, Arbeit/Aktiv, Persönlich"},requiredPropertyKey:{name:"Erforderlicher Eigenschaftsschlüssel",description:"Nur Notizen anzeigen, wo diese Frontmatter-Eigenschaft dem unten stehenden Wert entspricht. Leer lassen zum Ignorieren.",placeholder:"typ"},requiredPropertyValue:{name:"Erforderlicher Eigenschaftswert",description:"Nur Notizen, wo die Eigenschaft diesem Wert entspricht, werden vorgeschlagen. Leer lassen, um zu verlangen, dass die Eigenschaft existiert.",placeholder:"projekt"},customizeDisplay:{name:"Vorschlagsanzeige anpassen",description:"Erweiterte Optionen anzeigen, um zu konfigurieren, wie Projektvorschläge erscheinen und welche Informationen sie anzeigen."},enableFuzzyMatching:{name:"Unscharfe Suche aktivieren",description:"Tippfehler und Teilübereinstimmungen in Projektsuche erlauben. Kann in großen Vaults langsamer sein."},displayRowsHelp:"Konfiguriere bis zu 3 Informationszeilen für jeden Projektvorschlag.",displayRows:{row1:{name:"Zeile 1",description:"Format: {eigenschaft|flags}. Eigenschaften: title, aliases, file.path, file.parent. Flags: n(Label) zeigt Label, s macht suchbar. Beispiel: {title|n(Titel)|s}",placeholder:"{title|n(Titel)}"},row2:{name:"Zeile 2 (optional)",description:"Häufige Muster: {aliases|n(Aliase)}, {file.parent|n(Ordner)}, literal:Benutzerdefinierter Text",placeholder:"{aliases|n(Aliase)}"},row3:{name:"Zeile 3 (optional)",description:"Zusätzliche Infos wie {file.path|n(Pfad)} oder benutzerdefinierte Frontmatter-Felder",placeholder:"{file.path|n(Pfad)}"}},quickReference:{header:"Schnellreferenz",properties:"Verfügbare Eigenschaften: title, aliases, file.path, file.parent, oder beliebige Frontmatter-Felder",labels:'Labels hinzufügen: {title|n(Titel)} → "Titel: Mein Projekt"',searchable:"Suchbar machen: {description|s} schließt Beschreibung in + Suche ein",staticText:"Statischer Text: literal:Mein benutzerdefiniertes Label",alwaysSearchable:"Dateiname, Titel und Aliase sind standardmäßig immer suchbar."}},dataStorage:{name:"Speicherort",description:"Wo Pomodoro-Sitzungshistorie gespeichert werden soll",pluginData:"Plugin-Daten (empfohlen)",dailyNotes:"Tägliche Notizen",notices:{locationChanged:"Pomodoro-Speicherort geändert zu {location}"}},notifications:{description:"Konfiguriere Aufgabenerinnerungs-Benachrichtigungen und Alarme."},performance:{description:"Konfiguriere Plugin-Leistung und Verhaltensoptionen."},timeTrackingSection:{description:"Konfiguriere automatische Zeiterfassungsverhalten."},recurringSection:{description:"Konfiguriere Verhalten für wiederkehrende Aufgabenverwaltung."}},integrations:{mobileCalendar:{disable:{name:"Kalenderintegrationen auf Mobilgeräten deaktivieren",description:"Google-, Microsoft- und ICS-Kalender auf Obsidian Mobile nicht laden. Desktop-Kalenderintegrationen bleiben unverändert."},status:{name:"Kalenderintegrationen sind auf diesem Mobilgerät deaktiviert",description:"Deaktiviere diese Einstellung und lade Obsidian Mobile neu, um Kalender wieder zu laden."}},basesIntegration:{header:"Bases-Integration",description:"Konfiguriere Integration mit dem Obsidian Bases Plugin. Dies ist eine experimentelle Funktion und basiert derzeit auf undokumentierten Obsidian APIs. Das Verhalten kann sich ändern oder brechen.",enable:{name:"Bases-Integration aktivieren",description:"TaskNotes-Ansichten zur Verwendung im Obsidian Bases Plugin aktivieren. Bases Plugin muss aktiviert sein, damit dies funktioniert."},viewCommands:{header:"Ansichten & Base-Dateien",description:"TaskNotes verwendet Obsidian Bases-Dateien (.base) zur Darstellung seiner Ansichten. Diese Dateien werden beim Start automatisch erstellt, falls sie nicht existieren, und mit deinen aktuellen Einstellungen konfiguriert (Aufgabenidentifikation, Feldzuordnungen, Status usw.).",descriptionRegen:"Base-Dateien werden nicht automatisch aktualisiert, wenn du Einstellungen änderst. Um neue Einstellungen anzuwenden, verwende unten „Dateien aktualisieren“, lösche die vorhandenen .base-Dateien und starte Obsidian neu oder bearbeite sie manuell.",docsLink:"Dokumentation für verfügbare Formeln und Anpassungsoptionen anzeigen",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"Mini-Kalenderansicht öffnen",kanban:"Kanban-Ansicht öffnen",tasks:"Aufgabenansicht öffnen",advancedCalendar:"Erweiterte Kalenderansicht öffnen",agenda:"Agenda-Ansicht öffnen",relationships:"Beziehungs-Widget",pomodoroStats:"Pomodoro-Statistik-Base"},fileLabel:"Datei: {path}",resetButton:"Zurücksetzen",resetTooltip:"Auf Standardpfad zurücksetzen",pomodoroDailyNotesHint:"Die generierte Pomodoro-Statistik-Base liest den Pomodoro-Verlauf aus täglichen Notizen. Wenn dein Verlauf noch in Plugin-Daten gespeichert ist, migriere ihn in den Einstellungen, bevor du diese Base-Datei verwendest."},autoCreateDefaultFiles:{name:"Standarddateien automatisch erstellen",description:"Fehlende Standard-Base-Ansichtsdateien beim Start automatisch erstellen. Deaktivieren, um zu verhindern, dass gelöschte Beispieldateien neu erstellt werden."},createDefaultFiles:{name:"Standarddateien erstellen",description:"Erstelle die Standard-.base-Dateien im TaskNotes/Views/-Verzeichnis. Vorhandene Dateien werden nicht überschrieben.",buttonText:"Dateien erstellen"},exportV3Views:{name:"V3-gespeicherte Ansichten nach Bases exportieren",description:"Konvertiere alle deine gespeicherten Ansichten aus TaskNotes v3 in eine einzige .base-Datei mit mehreren Ansichten. Dies hilft bei der Migration deiner v3-Filterkonfigurationen zum neuen Bases-System.",buttonText:"V3-Ansichten exportieren",noViews:"Keine gespeicherten Ansichten zum Exportieren",fileExists:"Datei existiert bereits",confirmOverwrite:'Eine Datei namens "{fileName}" existiert bereits. Überschreiben?',success:"{count} gespeicherte Ansichten nach {filePath} exportiert",error:"Fehler beim Exportieren von Ansichten: {message}"},notices:{enabled:"Bases-Integration aktiviert. Bitte starte Obsidian neu, um die Einrichtung abzuschließen.",disabled:"Bases-Integration deaktiviert. Bitte starte Obsidian neu, um die Entfernung abzuschließen."},updateDefaultFiles:{name:"Standarddateien aktualisieren",description:"Die konfigurierten Standard-.base-Dateien mit Vorlagen überschreiben, die aus deinen aktuellen TaskNotes-Einstellungen erzeugt werden.",buttonText:"Dateien aktualisieren",confirmTitle:"Standard-Base-Dateien aktualisieren",confirmMessage:"Dadurch werden die konfigurierten Standard-.base-Dateien mit neu generierten Vorlagen überschrieben. Manuelle Änderungen in diesen Dateien werden ersetzt.",confirmText:"Dateien aktualisieren"}},calendarSubscriptions:{header:"Kalenderabonnements",description:"Abonniere externe Kalender über ICS/iCal URLs, um Events neben deinen Aufgaben anzuzeigen.",defaultNoteTemplate:{name:"Standard-Notizvorlage",description:"Pfad zur Vorlagendatei für Notizen, die aus ICS-Events erstellt werden",placeholder:"Templates/Event Vorlage.md"},defaultNoteFolder:{name:"Standard-Notizordner",description:"Ordner für Notizen, die aus ICS-Events erstellt werden",placeholder:"Kalender/Events"},filenameFormat:{name:"ICS-Notiz-Dateinamenformat",description:"Wie Dateinamen für Notizen generiert werden, die aus ICS-Events erstellt werden",options:{title:"Event-Titel",zettel:"Zettelkasten-Format",timestamp:"Zeitstempel",custom:"Benutzerdefinierte Vorlage"}},customTemplate:{name:"Benutzerdefinierte ICS-Dateinamenvorlage",description:"Vorlage für benutzerdefinierte ICS-Event-Dateinamen",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"ICS-Ereignis-Endzeit als Fälligkeitsdatum verwenden",description:"Wenn aktiviert, wird das Fälligkeitsdatum von Aufgaben aus Kalenderereignissen auf die Endzeit des Ereignisses gesetzt. Bei ganztägigen Ereignissen wird das Fälligkeitsdatum auf das Ereignisdatum gesetzt. Bei zeitgesteuerten Ereignissen enthält das Fälligkeitsdatum die Endzeit."},recurringEventRelatedNotesMode:{name:"Verknüpfte Notizen für wiederkehrende Ereignisse",description:"Wähle, ob Notizen, die mit einer Wiederholung eines externen Kalenderereignisses verknüpft sind, in der geladenen Serie oder nur in der ausgewählten Instanz erscheinen.",options:{series:"Gesamte Serie",instance:"Nur ausgewählte Instanz"}}},subscriptionsList:{header:"Kalenderabonnements-Liste",addSubscription:{name:"Kalenderabonnement hinzufügen",description:"Neues Kalenderabonnement von ICS/iCal URL oder lokaler Datei hinzufügen",buttonText:"Abonnement hinzufügen"},refreshAll:{name:"Alle Abonnements aktualisieren",description:"Alle aktivierten Kalenderabonnements manuell aktualisieren",buttonText:"Alle aktualisieren"},newCalendarName:"Neuer Kalender",emptyState:"Keine Kalenderabonnements konfiguriert. Füge ein Abonnement hinzu, um externe Kalender zu synchronisieren.",notices:{addSuccess:"Neues Kalenderabonnement hinzugefügt - bitte konfiguriere die Details",addFailure:"Abonnement konnte nicht hinzugefügt werden",serviceUnavailable:"ICS-Abonnementdienst nicht verfügbar",refreshSuccess:"Alle Kalenderabonnements erfolgreich aktualisiert",refreshFailure:"Einige Kalenderabonnements konnten nicht aktualisiert werden",updateFailure:"Abonnement konnte nicht aktualisiert werden",deleteSuccess:'Abonnement "{name}" gelöscht',deleteFailure:"Abonnement konnte nicht gelöscht werden",enableFirst:"Aktiviere zuerst das Abonnement",refreshSubscriptionSuccess:'"{name}" aktualisiert',refreshSubscriptionFailure:"Abonnement konnte nicht aktualisiert werden"},labels:{enabled:"Aktiviert:",name:"Name:",type:"Typ:",url:"URL:",filePath:"Dateipfad:",color:"Farbe:",refreshMinutes:"Aktualisierung (Min):"},typeOptions:{remote:"Remote-URL",local:"Lokale Datei"},placeholders:{calendarName:"Kalendername",url:"ICS/iCal-URL",filePath:"Lokaler Dateipfad (z.B. Kalender.ics)",localFile:"Kalender.ics"},statusLabels:{enabled:"Aktiviert",disabled:"Deaktiviert",remote:"Remote",localFile:"Lokale Datei",remoteCalendar:"Remote-Kalender",localFileCalendar:"Lokale Datei",synced:"Synchronisiert {timeAgo}",error:"Fehler"},actions:{refreshNow:"Jetzt aktualisieren",deleteSubscription:"Abonnement löschen"},refreshNow:"Jetzt aktualisieren",confirmDelete:{title:"Abonnement löschen",message:'Bist du sicher, dass du das Abonnement "{name}" löschen möchtest? Diese Aktion kann nicht rückgängig gemacht werden.',confirmText:"Löschen"}},autoExport:{header:"Automatischer ICS-Export",description:"Automatisch alle deine Aufgaben in eine ICS-Datei exportieren.",enable:{name:"Automatischen Export aktivieren",description:"Eine ICS-Datei automatisch mit allen deinen Aufgaben aktuell halten"},filePath:{name:"Export-Dateipfad",description:"Pfad, wo die ICS-Datei gespeichert wird (relativ zur Vault-Wurzel)",placeholder:"tasknotes-kalender.ics"},interval:{name:"Aktualisierungsintervall (zwischen 5 und 1440 Minuten)",description:"Wie oft die Export-Datei aktualisiert werden soll",placeholder:"60"},useDuration:{name:"Aufgabendauer für Eventlänge verwenden",description:"Wenn aktiviert, wird die geschätzte Dauer der Aufgabe anstelle des Fälligkeitsdatums für die Endzeit des Kalenderevents verwendet. Dies ist nützlich für GTD-Workflows, bei denen geplant + Dauer die Arbeitsplanung darstellt, während das Fälligkeitsdatum Fristen repräsentiert."},exportNow:{name:"Jetzt exportieren",description:"Sofortigen Export manuell auslösen",buttonText:"Jetzt exportieren"},status:{title:"Export-Status:",lastExport:"Letzter Export: {time}",nextExport:"Nächster Export: {time}",noExports:"Noch keine Exporte",notScheduled:"Nicht geplant",notInitialized:"Auto-Export-Dienst nicht initialisiert - bitte starte Obsidian neu",serviceNotInitialized:"Dienst nicht initialisiert - bitte starten Sie Obsidian neu"},notices:{reloadRequired:"Bitte lade Obsidian neu, damit die automatischen Export-Änderungen wirksam werden.",exportSuccess:"Aufgaben erfolgreich exportiert",exportFailure:"Export fehlgeschlagen - prüfe Konsole für Details",serviceUnavailable:"Auto-Export-Dienst nicht verfügbar"},excludeCompleted:{name:"Abgeschlossene Aufgaben ausschließen",description:"Wenn aktiviert, werden abgeschlossene Aufgaben aus ICS-Exporten ausgelassen. Abgeschlossene Status werden aus deinen Aufgabenstatus-Einstellungen übernommen."},excludeArchived:{name:"Archivierte Aufgaben ausschließen",description:"Wenn aktiviert, werden archivierte Aufgaben aus ICS-Exporten ausgelassen."},requireDueDate:{name:"Fälligkeitsdatum erforderlich",description:"Wenn aktiviert, werden nur Aufgaben mit Fälligkeitsdatum in ICS-Exporte aufgenommen."},requireScheduledDate:{name:"Geplantes Datum erforderlich",description:"Wenn aktiviert, werden nur Aufgaben mit geplantem Datum in ICS-Exporte aufgenommen."}},googleCalendarExport:{header:"Aufgaben zu Google Kalender exportieren",description:"Synchronisiere deine Aufgaben automatisch als Ereignisse mit Google Kalender. Erfordert eine vorherige Google Kalender-Verbindung.",enable:{name:"Aufgabenexport aktivieren",description:"Wenn aktiviert, werden Aufgaben mit Terminen automatisch als Ereignisse mit Google Kalender synchronisiert."},targetCalendar:{name:"Zielkalender",description:"Wähle den Kalender aus, in dem Aufgabenereignisse erstellt werden sollen.",placeholder:"Kalender auswählen...",connectFirst:"Verbinde zuerst Google Kalender",primarySuffix:" (Primär)"},syncTrigger:{name:"Synchronisierungsauslöser",description:"Welches Aufgabendatum soll die Kalenderereigniserstellung auslösen.",options:{scheduled:"Geplantes Datum",due:"Fälligkeitsdatum",both:"Beide (geplant bevorzugt)"}},allDayEvents:{name:"Als Ganztagesereignisse erstellen",description:"Wenn aktiviert, werden Aufgaben als Ganztagesereignisse erstellt. Wenn deaktiviert, wird die Zeitschätzung für die Dauer verwendet."},defaultDuration:{name:"Standard-Ereignisdauer",description:"Dauer in Minuten für zeitgesteuerte Ereignisse (wird verwendet, wenn die Aufgabe keine Zeitschätzung hat)."},eventTitleTemplate:{name:"Ereignistitelvorlage",description:"Vorlage für Ereignistitel. Verfügbare Variablen: {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"Aufgabendetails in Beschreibung einschließen",description:"Aufgabenmetadaten (Priorität, Status, Tags, etc.) zur Ereignisbeschreibung hinzufügen."},includeObsidianLink:{name:"Obsidian-Link einschließen",description:"Einen Link zur Aufgabe in Obsidian in der Ereignisbeschreibung hinzufügen."},defaultReminder:{name:"Standard-Erinnerung",description:"Popup-Erinnerungen zu zeitgebundenen Google-Kalender-Ereignissen hinzufügen. Gib Minuten vor dem Ereignis durch Kommas getrennt ein. Leer lassen, um Kalenderstandards zu verwenden. Übliche Werte: 15, 30, 60, 1440."},automaticSyncBehavior:{header:"Automatisches Synchronisierungsverhalten"},syncOnCreate:{name:"Bei Aufgabenerstellung synchronisieren",description:"Automatisch ein Kalenderereignis erstellen, wenn eine neue Aufgabe erstellt wird."},syncOnUpdate:{name:"Bei Aufgabenaktualisierung synchronisieren",description:"Automatisch das Kalenderereignis aktualisieren, wenn eine Aufgabe geändert wird."},syncOnComplete:{name:"Bei Aufgabenabschluss synchronisieren",description:"Kalenderereignis aktualisieren, wenn eine Aufgabe abgeschlossen wird (fügt ein Häkchen zum Titel hinzu)."},syncOnDelete:{name:"Ereignis bei Aufgabenlöschung löschen",description:"Kalenderereignis entfernen, wenn die entsprechende Aufgabe gelöscht wird."},manualSyncActions:{header:"Manuelle Synchronisierungsaktionen"},syncAllTasks:{name:"Alle Aufgaben synchronisieren",description:"Alle vorhandenen Aufgaben mit Google Kalender synchronisieren. Dies erstellt Ereignisse für Aufgaben, die noch nicht synchronisiert wurden.",buttonText:"Alle synchronisieren"},unlinkAllTasks:{name:"Alle Aufgaben trennen",description:"Alle Verknüpfungen zwischen Aufgaben und Ereignissen entfernen, ohne Kalenderereignisse zu löschen.",buttonText:"Alle trennen",confirmTitle:"Alle Aufgaben trennen",confirmMessage:"Dies entfernt alle Verknüpfungen zwischen Aufgaben und Kalenderereignissen. Die Kalenderereignisse bleiben erhalten, werden aber nicht mehr aktualisiert, wenn sich Aufgaben ändern. Bist du sicher?",confirmButtonText:"Alle trennen"},notices:{notEnabled:"Google Kalender-Export ist nicht aktiviert. Konfiguriere es unter Einstellungen > Integrationen.",notEnabledOrConfigured:"Google Kalender-Export ist nicht aktiviert oder konfiguriert",serviceNotAvailable:"Aufgaben-Kalender-Synchronisierungsdienst nicht verfügbar",syncResults:"Synchronisiert: {synced}, Fehlgeschlagen: {failed}, Übersprungen: {skipped}",taskSynced:"Aufgabe mit Google Kalender synchronisiert",noActiveFile:"Keine Datei ist derzeit aktiv",notATask:"Die aktuelle Datei ist keine Aufgabe",noDateToSync:"Aufgabe hat kein geplantes oder Fälligkeitsdatum zum Synchronisieren",syncFailed:"Synchronisierung der Aufgabe mit Google Kalender fehlgeschlagen: {message}",connectionExpired:"Die Google Kalender-Verbindung ist abgelaufen. Bitte verbinde sie unter Einstellungen > Integrationen erneut.",syncingTasks:"Synchronisiere {total} Aufgaben mit Google Kalender...",syncComplete:"Synchronisierung abgeschlossen: {synced} synchronisiert, {failed} fehlgeschlagen, {skipped} übersprungen",eventsDeletedAndUnlinked:"Alle Ereignisse gelöscht und getrennt",tasksUnlinked:"Alle Aufgabenverknüpfungen entfernt"},eventDescription:{untitledTask:"Unbenannte Aufgabe",priority:"Priorität: {value}",status:"Status: {value}",due:"Fällig: {value}",scheduled:"Geplant: {value}",timeEstimate:"Zeitschätzung: {value}",tags:"Tags: {value}",contexts:"Kontexte: {value}",projects:"Projekte: {value}",openInObsidian:"In Obsidian öffnen"}},httpApi:{header:"HTTP API",description:"HTTP API für externe Integrationen und Automatisierungen aktivieren.",enable:{name:"HTTP API aktivieren",description:"Lokalen HTTP-Server für API-Zugriff starten"},port:{name:"API-Port",description:"Port-Nummer für den HTTP API-Server",placeholder:"3000"},authToken:{name:"API-Authentifizierungstoken",description:"TaskNotes-Token, nicht der API-Schlüssel Ihres KI-Anbieters. Zum Erstellen HTTP-API aktivieren, dieses Feld leer lassen und Obsidian neu starten. Anschließend das erzeugte Token in die Bearer-Authentifizierungseinstellungen des Clients kopieren. Bei jeder Token-Änderung die Clients aktualisieren.",placeholder:"dein-geheimes-token"},mcp:{enable:{name:"MCP-Server aktivieren",description:"TaskNotes-Werkzeuge über Model Context Protocol am Endpunkt /mcp bereitstellen. Erfordert, dass die HTTP API aktiviert ist."}},endpoints:{header:"Verfügbare API-Endpunkte",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhooks",description:{overview:"Webhooks senden Echtzeit-Benachrichtigungen an externe Dienste, wenn TaskNotes-Events auftreten.",usage:"Konfiguriere Webhooks zur Integration mit Automatisierungstools, Sync-Diensten oder benutzerdefinierten Anwendungen."},addWebhook:{name:"Webhook hinzufügen",description:"Neuen Webhook-Endpunkt registrieren",buttonText:"Webhook hinzufügen"},emptyState:{message:"Keine Webhooks konfiguriert. Füge einen Webhook hinzu, um Echtzeit-Benachrichtigungen zu erhalten.",buttonText:"Webhook hinzufügen"},labels:{active:"Aktiv:",url:"URL:",events:"Events:",transform:"Transformation:"},placeholders:{url:"Webhook-URL",noEventsSelected:"Keine Events ausgewählt",rawPayload:"Raw-Payload (keine Transformation)"},statusLabels:{active:"Aktiv",inactive:"Inaktiv",created:"Erstellt {timeAgo}"},actions:{editEvents:"Events bearbeiten",delete:"Löschen"},editEvents:"Ereignisse bearbeiten",notices:{urlUpdated:"Webhook URL aktualisiert",enabled:"Webhook aktiviert",disabled:"Webhook deaktiviert",created:"Webhook erfolgreich erstellt",deleted:"Webhook gelöscht",updated:"Webhook aktualisiert"},confirmDelete:{title:"Webhook löschen",message:`Bist du sicher, dass du diesen Webhook löschen möchtest?
URL: {url}
Diese Aktion kann nicht rückgängig gemacht werden.`,confirmText:"Löschen"},cardHeader:"Webhook",cardFields:{active:"Aktiv:",url:"URL:",events:"Events:",transform:"Transformation:"},eventsDisplay:{noEvents:"Keine Events ausgewählt"},transformDisplay:{noTransform:"Raw-Payload (keine Transformation)"},secretModal:{title:"Webhook-Secret generiert",description:"Dein Webhook-Secret wurde generiert. Speichere dieses Secret, da du es nicht erneut einsehen kannst:",usage:"Verwende dieses Secret, um Webhook-Payloads in deiner empfangenden Anwendung zu verifizieren.",gotIt:"Verstanden"},editModal:{title:"Webhook bearbeiten",eventsHeader:"Events zum Abonnieren"},events:{taskCreated:{label:"Aufgabe erstellt",description:"Wenn neue Aufgaben erstellt werden"},taskUpdated:{label:"Aufgabe aktualisiert",description:"Wenn Aufgaben geändert werden"},taskCompleted:{label:"Aufgabe abgeschlossen",description:"Wenn Aufgaben als abgeschlossen markiert werden"},taskDeleted:{label:"Aufgabe gelöscht",description:"Wenn Aufgaben gelöscht werden"},taskArchived:{label:"Aufgabe archiviert",description:"Wenn Aufgaben archiviert werden"},taskUnarchived:{label:"Aufgabe entarchiviert",description:"Wenn Aufgaben entarchiviert werden"},timeStarted:{label:"Zeit gestartet",description:"Wenn Zeiterfassung beginnt"},timeStopped:{label:"Zeit gestoppt",description:"Wenn Zeiterfassung stoppt"},pomodoroStarted:{label:"Pomodoro gestartet",description:"Wenn Pomodoro-Sitzungen beginnen"},pomodoroCompleted:{label:"Pomodoro abgeschlossen",description:"Wenn Pomodoro-Sitzungen beendet werden"},pomodoroInterrupted:{label:"Pomodoro unterbrochen",description:"Wenn Pomodoro-Sitzungen gestoppt werden"},recurringCompleted:{label:"Wiederkehrende Instanz abgeschlossen",description:"Wenn wiederkehrende Aufgabeninstanzen abgeschlossen werden"},reminderTriggered:{label:"Erinnerung ausgelöst",description:"Wenn Aufgabenerinnerungen aktiviert werden"}},modals:{secretGenerated:{title:"Webhook-Secret generiert",description:"Dein Webhook-Secret wurde generiert. Speichere dieses Secret, da du es nicht erneut einsehen kannst:",usage:"Verwende dieses Secret, um Webhook-Payloads in deiner empfangenden Anwendung zu verifizieren.",buttonText:"Verstanden"},edit:{title:"Webhook bearbeiten",eventsSection:"Events zum Abonnieren",transformSection:"Transformationskonfiguration (Optional)",headersSection:"Header-Konfiguration",transformFile:{name:"Transformationsdatei",description:"Pfad zu einer .json Vorlagendatei in deinem Vault, die Webhook-Payloads transformiert",placeholder:"simple-template.json"},customHeaders:{name:"Benutzerdefinierte Header einschließen",description:"TaskNotes-Header einschließen (Event-Typ, Signatur, Lieferungs-ID). Für Discord, Slack und andere Dienste mit strengen CORS-Richtlinien ausschalten."},buttons:{cancel:"Abbrechen",save:"Änderungen speichern"},notices:{selectAtLeastOneEvent:"Bitte wähle mindestens ein Event aus"}},add:{title:"Webhook hinzufügen",eventsSection:"Events zum Abonnieren",transformSection:"Transformationskonfiguration (Optional)",headersSection:"Header-Konfiguration",url:{name:"Webhook-URL",description:"Der Endpunkt, an den Webhook-Payloads gesendet werden",placeholder:"https://dein-service.com/webhook"},transformFile:{name:"Transformationsdatei",description:"Pfad zu einer .json Vorlagendatei in deinem Vault, die Webhook-Payloads transformiert",placeholder:"simple-template.json"},customHeaders:{name:"Benutzerdefinierte Header einschließen",description:"TaskNotes-Header einschließen (Event-Typ, Signatur, Lieferungs-ID). Für Discord, Slack und andere Dienste mit strengen CORS-Richtlinien ausschalten."},transformHelp:{title:"JSON-Transformationsvorlagen ermöglichen es dir, Webhook-Payloads anzupassen:",jsFiles:"",jsDescription:"",jsonFiles:".json Dateien:",jsonDescription:" Vorlagen mit ",jsonVariable:"${data.task.title}",leaveEmpty:"Leer lassen:",leaveEmptyDescription:" Raw-Daten senden",example:"Beispiel:",exampleFile:"simple-template.json"},buttons:{cancel:"Abbrechen",add:"Webhook hinzufügen"},notices:{urlRequired:"Webhook URL ist erforderlich",selectAtLeastOneEvent:"Bitte wähle mindestens ein Event aus"}}}},otherIntegrations:{header:"Andere Plugin-Integrationen",description:"Konfiguriere Integrationen mit anderen Obsidian-Plugins."},mdbaseSpec:{header:"mdbase-Typdefinitionen",learnMore:"Mehr über mdbase-spec erfahren",enable:{name:"mdbase-Typdefinitionen generieren",description:"mdbase-Typdateien (mdbase.yaml und _types/task.md) im Stammverzeichnis des Vaults generieren und pflegen, wenn sich deine Einstellungen ändern."}},timeFormats:{justNow:"Gerade eben",minutesAgo:"vor {minutes} Minute{plural}",hoursAgo:"vor {hours} Stunde{plural}",daysAgo:"vor {days} Tag{plural}"}}},notices:{languageChanged:"Sprache geändert zu {language}.",releaseAvailable:{message:"TaskNotes {version} ist verfügbar.",action:"In Community-Plugins öffnen"},exportTasksFailed:"Export der Aufgaben als ICS-Datei fehlgeschlagen",icsNoteCreatedSuccess:"Notiz erfolgreich erstellt",icsCreationModalOpenFailed:"Erstellungsmodal konnte nicht geöffnet werden",icsNoteLinkSuccess:'Notiz "{fileName}" mit ICS Event verknüpft',icsTaskCreatedSuccess:"Aufgabe erstellt: {title}",icsRelatedItemsRefreshed:"Verknüpfte Notizen aktualisiert",icsFileNotFound:"Datei nicht gefunden oder ungültig",icsFileOpenFailed:"Datei konnte nicht geöffnet werden",timeblockAttachmentExists:'"{fileName}" ist bereits angehängt',timeblockAttachmentAdded:'"{fileName}" als Anhang hinzugefügt',timeblockAttachmentRemoved:'"{fileName}" aus Anhängen entfernt',timeblockFileTypeNotSupported:'"{fileName}" kann nicht geöffnet werden - Dateityp nicht unterstützt',timeblockTitleRequired:"Bitte geben Sie einen Titel für den Timeblock ein",timeblockUpdatedSuccess:'Timeblock "{title}" erfolgreich aktualisiert',timeblockUpdateFailed:"Timeblock konnte nicht aktualisiert werden. Prüfen Sie die Konsole für Details.",timeblockDeletedSuccess:'Timeblock "{title}" erfolgreich gelöscht',timeblockDeleteFailed:"Timeblock konnte nicht gelöscht werden. Prüfen Sie die Konsole für Details.",timeblockRequiredFieldsMissing:"Bitte füllen Sie alle erforderlichen Felder aus",agendaLoadingFailed:"Fehler beim Laden der Agenda. Bitte versuchen Sie, zu aktualisieren.",statsLoadingFailed:"Fehler beim Laden der Projektdetails."},commands:{openCalendarView:"Mini-Kalenderansicht öffnen",openAdvancedCalendarView:"Kalenderansicht öffnen",openTasksView:"Aufgabenansicht öffnen",openNotesView:"Notizenansicht öffnen",openAgendaView:"Agenda-Ansicht öffnen",openPomodoroView:"Pomodoro-Timer öffnen",openKanbanView:"Kanban-Board öffnen",updateDefaultBaseFiles:"Standard-Base-Dateien aktualisieren",openPomodoroStats:"Pomodoro-Statistiken öffnen",openStatisticsView:"Aufgaben- & Projektstatistiken öffnen",createNewTask:"Neue Aufgabe erstellen",convertCurrentNoteToTask:{name:"Aktuelle Notiz in Aufgabe umwandeln",noActiveFile:"Keine aktive Datei zum Umwandeln",alreadyTask:"Diese Notiz ist bereits eine Aufgabe",success:"'{title}' in eine Aufgabe umgewandelt"},convertToTaskNote:"Checkbox-Aufgabe zu TaskNote konvertieren",convertAllTasksInNote:"Alle Aufgaben in Notiz konvertieren",insertTaskNoteLink:"Tasknote-Link einfügen",createInlineTask:"Neue Inline-Aufgabe erstellen",quickActionsCurrentTask:"Schnellaktionen für aktuelle Aufgabe",goToTodayNote:"Zu heutiger Notiz gehen",startPomodoro:"Pomodoro-Timer starten",stopPomodoro:"Pomodoro-Timer stoppen",pauseResumePomodoro:"Pomodoro-Timer pausieren/fortsetzen",refreshCache:"Cache aktualisieren",exportAllTasksIcs:"Alle Aufgaben als ICS-Datei exportieren",viewReleaseNotes:"Versionshinweise anzeigen",startTimeTrackingCurrentTask:"Zeiterfassung für die aktuelle Aufgabe starten",stopTimeTrackingCurrentTask:"Zeiterfassung für die aktuelle Aufgabe stoppen",startTimeTrackingWithSelector:"Zeiterfassung starten (Aufgabe auswählen)",editTimeEntries:"Zeiteinträge bearbeiten (Aufgabe auswählen)",createOrOpenTask:"Aufgabe erstellen oder öffnen",createOrOpenTaskWithTracking:"Aufgabe erstellen oder öffnen und Zeiterfassung starten",rolloverOverdueScheduledTasks:"Überfällige geplante Aufgaben auf heute verschieben",syncAllTasksGoogleCalendar:"Alle Aufgaben mit Google Kalender synchronisieren",syncCurrentTaskGoogleCalendar:"Aktuelle Aufgabe mit Google Kalender synchronisieren",quickActionsTaskUnderCursor:"Schnellaktionen für Aufgabe unter dem Cursor",editCurrentTask:"Aktuelle Aufgabe bearbeiten",cycleCurrentTaskStatus:"Status der aktuellen Aufgabe wechseln",cycleCurrentTaskPriority:"Priorität der aktuellen Aufgabe wechseln",addProjectToCurrentTask:"Projekt zur aktuellen Aufgabe hinzufügen",addSubtaskToCurrentNote:"Unteraufgabe zur aktuellen Notiz hinzufügen"},modals:{deviceCode:{title:"Google Kalender-Autorisierung",instructions:{intro:"Um Ihren Google Kalender zu verbinden, folgen Sie bitte diesen Schritten:"},steps:{open:"Öffnen Sie",inBrowser:"in Ihrem Browser",enterCode:"Geben Sie diesen Code ein, wenn Sie dazu aufgefordert werden:",signIn:"Melden Sie sich mit Ihrem Google-Konto an und gewähren Sie Zugriff",returnToObsidian:"Kehren Sie zu Obsidian zurück (dieses Fenster schließt sich automatisch)"},codeLabel:"Ihr Code:",copyCodeAriaLabel:"Code kopieren",waitingForAuthorization:"Warte auf Autorisierung...",openBrowserButton:"Browser öffnen",cancelButton:"Abbrechen",expiresMinutesSeconds:"Code läuft ab in {minutes}m {seconds}s",expiresSeconds:"Code läuft ab in {seconds}s"},icsEventInfo:{calendarEventHeading:"Kalenderereignis",titleLabel:"Titel",calendarLabel:"Kalender",dateTimeLabel:"Datum & Uhrzeit",locationLabel:"Ort",descriptionLabel:"Beschreibung",urlLabel:"URL",relatedNotesHeading:"Verknüpfte Notizen & Aufgaben",noRelatedItems:"Keine verknüpften Notizen oder Aufgaben für dieses Ereignis gefunden.",typeTask:"Aufgabe",typeNote:"Notiz",actionsHeading:"Aktionen",createFromEventLabel:"Aus Ereignis erstellen",createFromEventDesc:"Eine neue Notiz oder Aufgabe aus diesem Kalenderereignis erstellen",linkExistingLabel:"Vorhandene verknüpfen",linkExistingDesc:"Eine vorhandene Notiz mit diesem Kalenderereignis verknüpfen"},timeblockInfo:{editHeading:"Timeblock bearbeiten",dateTimeLabel:"Datum & Uhrzeit: ",titleLabel:"Titel",titleDesc:"Titel für Ihren Timeblock",titlePlaceholder:"z.B. Deep Work Session",descriptionLabel:"Beschreibung",descriptionDesc:"Optionale Beschreibung für den Timeblock",descriptionPlaceholder:"Fokus auf neue Features, keine Unterbrechungen",colorLabel:"Farbe",colorDesc:"Optionale Farbe für den Timeblock",colorPlaceholder:"#3b82f6",attachmentsLabel:"Anhänge",attachmentsDesc:"Dateien oder Notizen, die mit diesem Timeblock verknüpft sind",addAttachmentButton:"Anhang hinzufügen",addAttachmentTooltip:"Datei oder Notiz mit unscharfer Suche auswählen",deleteButton:"Timeblock löschen",saveButton:"Änderungen speichern",deleteConfirmationTitle:"Timeblock löschen"},timeblockCreation:{heading:"Timeblock erstellen",dateLabel:"Datum: ",titleLabel:"Titel",titleDesc:"Titel für Ihren Timeblock",titlePlaceholder:"z.B. Deep Work Session",startTimeLabel:"Startzeit",startTimeDesc:"Wann der Timeblock beginnt",startTimePlaceholder:"09:00",endTimeLabel:"Endzeit",endTimeDesc:"Wann der Timeblock endet",endTimePlaceholder:"11:00",descriptionLabel:"Beschreibung",descriptionDesc:"Optionale Beschreibung für den Timeblock",descriptionPlaceholder:"Fokus auf neue Features, keine Unterbrechungen",colorLabel:"Farbe",colorDesc:"Optionale Farbe für den Timeblock",colorPlaceholder:"#3b82f6",attachmentsLabel:"Anhänge",attachmentsDesc:"Dateien oder Notizen, die mit diesem Timeblock verknüpft werden sollen",addAttachmentButton:"Anhang hinzufügen",addAttachmentTooltip:"Datei oder Notiz mit unscharfer Suche auswählen",createButton:"Timeblock erstellen"},calendarEventCreation:{heading:"Kalenderereignis erstellen",dateTimeLabel:"Datum & Uhrzeit: ",titleLabel:"Titel",titleDesc:"Titel für das Kalenderereignis",titlePlaceholder:"z.B. Teambesprechung",calendarLabel:"Kalender",calendarDesc:"In welchem Kalender das Ereignis erstellt werden soll",descriptionLabel:"Beschreibung",descriptionDesc:"Optionale Beschreibung für das Ereignis",descriptionPlaceholder:"Details zu diesem Ereignis hinzufügen...",locationLabel:"Ort",locationDesc:"Optionaler Ort für das Ereignis",locationPlaceholder:"z.B. Konferenzraum A",createButton:"Ereignis erstellen",titleRequired:"Ereignistitel ist erforderlich",noCalendarSelected:"Kein Kalender ausgewählt",success:'Kalenderereignis "{title}" erstellt',error:"Kalenderereignis konnte nicht erstellt werden: {message}"},icsNoteCreation:{heading:"Aus ICS Event erstellen",titleLabel:"Titel",titleDesc:"Titel für den neuen Inhalt",folderLabel:"Ordner",folderDesc:"Zielordner (leer lassen für Vault-Wurzel)",folderPlaceholder:"ordner/unterordner",createButton:"Erstellen",startLabel:"Start: ",endLabel:"Ende: ",locationLabel:"Ort: ",calendarLabel:"Kalender: ",useTemplateLabel:"Vorlage verwenden",useTemplateDesc:"Eine Vorlage beim Erstellen des Inhalts anwenden",templatePathLabel:"Vorlagenpfad",templatePathDesc:"Pfad zur Vorlagendatei",templatePathPlaceholder:"vorlagen/ics-notiz-vorlage.md"},unscheduledTasksSelector:{title:"Ungeplante Aufgaben",placeholder:"Tippen, um nach ungeplanten Aufgaben zu suchen...",instructions:{navigate:"zum Navigieren",schedule:"zum Planen",dismiss:"zum Verwerfen"}},migration:{title:"Zum neuen Wiederholungssystem migrieren",description:"TaskNotes verwendet jetzt branchenübliche RRULE-Muster für Wiederholungen, die komplexere Zeitpläne und bessere Kompatibilität mit anderen Apps ermöglichen.",tasksFound:"{count} Aufgabe(n) mit alten Wiederholungsmustern erkannt",noMigrationNeeded:"Keine Aufgaben erfordern Migration",warnings:{title:"Bevor Sie fortfahren:",backup:"Sichern Sie Ihren Vault vor der Migration",conversion:"Alte Wiederholungsmuster werden in das neue Format konvertiert",normalUsage:"Sie können TaskNotes während der Migration normal weiterverwenden",permanent:"Diese Änderung ist dauerhaft und kann nicht automatisch rückgängig gemacht werden"},benefits:{title:"Vorteile des neuen Systems:",powerfulPatterns:"Komplexe Wiederholungsmuster (z.B. 'jeden 2. Dienstag')",performance:"Bessere Leistung bei wiederkehrenden Aufgaben",compatibility:"Standard-Wiederholungsformat kompatibel mit anderen Apps",nlp:"Verbesserte Unterstützung für natürliche Sprachverarbeitung"},progress:{title:"Migrationsfortschritt",preparing:"Migration wird vorbereitet...",completed:"Migration erfolgreich abgeschlossen",failed:"Migration fehlgeschlagen"},buttons:{migrate:"Migration starten",completed:"Schließen"},errors:{title:"Fehler während der Migration:"},notices:{completedWithErrors:"Migration mit einigen Fehlern abgeschlossen. Überprüfen Sie die Fehlerliste oben.",success:"Alle Aufgaben erfolgreich migriert!",failed:"Migration fehlgeschlagen. Bitte überprüfen Sie die Konsole für Details."},prompt:{message:"TaskNotes hat Aufgaben mit dem alten Wiederholungsformat erkannt. Möchten Sie diese jetzt zum neuen System migrieren?",migrateNow:"Jetzt migrieren",remindLater:"Später erinnern"}},task:{titlePlaceholder:"Was muss getan werden?",titleLabel:"Titel",titleDetailedPlaceholder:"Aufgabentitel...",detailsLabel:"Details",detailsPlaceholder:"Weitere Details hinzufügen...",projectsLabel:"Projekte",projectsAdd:"Projekt hinzufügen",projectsTooltip:"Projektnotiz mit unscharfer Suche auswählen",projectsRemoveTooltip:"Projekt entfernen",contextsLabel:"Kontexte",contextsPlaceholder:"kontext1, kontext2",tagsLabel:"Tags",tagsPlaceholder:"schlagwort1, schlagwort2",timeEstimateLabel:"Zeitschätzung (Minuten)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"Ungespeicherte Änderungen",message:"Sie haben ungespeicherte Änderungen. Möchten Sie diese speichern?",save:"Änderungen speichern",discard:"Änderungen verwerfen",cancel:"Weiter bearbeiten"},dependencies:{blockedBy:"Blockiert von",blocking:"Blockierend",placeholder:"[[Aufgabennotiz]]",addTaskButton:"Aufgabe hinzufügen",selectTaskTooltip:"Aufgabennotiz mit unscharfer Suche auswählen",removeTaskTooltip:"Aufgabe entfernen"},organization:{projects:"Projekte",subtasks:"Unteraufgaben",addToProject:"Zu Projekt hinzufügen",addToProjectButton:"Zu Projekt hinzufügen",addSubtasks:"Unteraufgaben hinzufügen",addSubtasksButton:"Unteraufgabe hinzufügen",addSubtasksTooltip:"Aufgaben auswählen, um sie zu Unteraufgaben dieser Aufgabe zu machen",removeSubtaskTooltip:"Unteraufgabe entfernen",notices:{noEligibleSubtasks:"Keine geeigneten Aufgaben verfügbar, um als Unteraufgaben zugewiesen zu werden",subtaskSelectFailed:"Unteraufgaben-Auswahl konnte nicht geöffnet werden"}},customFieldsLabel:"Benutzerdefinierte Felder",actions:{due:"Fälligkeitsdatum setzen",scheduled:"Planungsdatum setzen",status:"Status setzen",priority:"Priorität setzen",recurrence:"Wiederholung setzen",reminders:"Erinnerungen setzen"},buttons:{openNote:"Notiz öffnen",save:"Speichern"},tooltips:{dueValue:"Fällig: {value}",scheduledValue:"Geplant: {value}",statusValue:"Status: {value}",priorityValue:"Priorität: {value}",recurrenceValue:"Wiederholung: {value}",remindersSingle:"1 Erinnerung gesetzt",remindersPlural:"{count} Erinnerungen gesetzt"},dateMenu:{dueTitle:"Fälligkeitsdatum setzen",scheduledTitle:"Planungsdatum setzen"},userFields:{textPlaceholder:"{field} eingeben...",numberPlaceholder:"0",datePlaceholder:"YYYY-MM-DD",listPlaceholder:"element1, element2, element3",pickDate:"{field}-Datum wählen"},recurrence:{daily:"Täglich",weekly:"Wöchentlich",everyTwoWeeks:"Alle 2 Wochen",weekdays:"Wochentage",weeklyOn:"Wöchentlich am {days}",monthly:"Monatlich",everyThreeMonths:"Alle 3 Monate",monthlyOnOrdinal:"Monatlich am {ordinal}",monthlyByWeekday:"Monatlich (nach Wochentag)",yearly:"Jährlich",yearlyOn:"Jährlich am {month} {day}",custom:"Benutzerdefiniert",countSuffix:"{count} mal",untilSuffix:"bis {date}",ordinal:"{number}{suffix}"}},taskSelector:{title:"Aufgabe auswählen",placeholder:"Tippen Sie, um nach Aufgaben zu suchen...",instructions:{navigate:"zum Navigieren",select:"zum Auswählen",dismiss:"zum Abbrechen"},notices:{noteNotFound:'Notiz "{name}" konnte nicht gefunden werden'},dueDate:{overdue:"Fällig: {date} (überfällig)",today:"Fällig: Heute"}},taskSelectorWithCreate:{title:"Aufgabe erstellen oder öffnen",placeholder:"Aufgaben suchen oder eingeben zum Erstellen...",instructions:{create:"um neue Aufgabe zu erstellen"},footer:{createLabel:" zum Erstellen: "},notices:{emptyQuery:"Bitte geben Sie eine Aufgabenbeschreibung ein",invalidTitle:"Kein gültiger Aufgabentitel erkannt"}},taskCreation:{title:"Aufgabe erstellen",actions:{fillFromNaturalLanguage:"Formular aus natürlicher Sprache ausfüllen",hideDetailedOptions:"Detailoptionen ausblenden",showDetailedOptions:"Detailoptionen anzeigen"},nlPlaceholder:"Lebensmittel morgen um 15 Uhr kaufen @zuhause #besorgungen",notices:{titleRequired:"Bitte gib einen Aufgabentitel ein",success:'Aufgabe "{title}" erfolgreich erstellt',successShortened:'Aufgabe "{title}" erfolgreich erstellt (Dateiname wegen Länge gekürzt)',failure:"Aufgabe konnte nicht erstellt werden: {message}",blockingUnresolved:"Konnte nicht auflösen: {entries}",openCreatedTaskFailure:"Aufgabe erstellt, aber die Aufgabennotiz konnte nicht geöffnet werden."}},taskEdit:{title:"Aufgabe bearbeiten",sections:{completions:"Abschlüsse",taskInfo:"Aufgabeninformationen"},metadata:{totalTrackedTime:"Gesamte erfasste Zeit:",due:"Fällig:",scheduled:"Geplant:",created:"Erstellt:",modified:"Geändert:",file:"Datei:"},buttons:{archive:"Archivieren",unarchive:"Entarchivieren"},notices:{titleRequired:"Bitte gib einen Aufgabentitel ein",noChanges:"Keine Änderungen zu speichern",updateSuccess:'Aufgabe "{title}" erfolgreich aktualisiert',updateFailure:"Aufgabe konnte nicht aktualisiert werden: {message}",dependenciesUpdateSuccess:"Abhängigkeiten aktualisiert",blockingUnresolved:"Konnte nicht auflösen: {entries}",fileMissing:"Aufgabendatei konnte nicht gefunden werden: {path}",openNoteFailure:"Aufgabennotiz konnte nicht geöffnet werden",archiveSuccess:"Aufgabe erfolgreich {action}",archiveFailure:"Aufgabe konnte nicht archiviert werden",deleteSuccess:"Aufgabe „{title}“ erfolgreich gelöscht",deleteFailure:"Aufgabe konnte nicht gelöscht werden: {message}"},archiveAction:{archived:"archiviert",unarchived:"entarchiviert"},deleteConfirmation:{title:"Aufgabe löschen",message:"Möchtest du „{title}“ wirklich löschen? Dadurch wird die Aufgabennotiz in den Obsidian-Papierkorb verschoben.",confirm:"Aufgabe löschen"}},storageLocation:{title:{migrate:"Pomodoro-Daten migrieren?",switch:"Zu täglichen Notizen wechseln?"},message:{migrate:"Dies wird deine bestehenden Pomodoro-Sitzungsdaten zu Frontmatter in täglichen Notizen migrieren. Die Daten werden nach Datum gruppiert und in jeder täglichen Notiz gespeichert.",switch:"Pomodoro-Sitzungsdaten werden im Frontmatter der täglichen Notizen statt in der Plugin-Datendatei gespeichert."},whatThisMeans:"Was das bedeutet:",bullets:{dailyNotesRequired:"Tägliche Notizen müssen im Core-Plugin für tägliche Notizen oder in Periodic Notes aktiviert sein",storedInNotes:"Daten werden im Frontmatter deiner täglichen Notizen gespeichert",migrateData:"Bestehende Plugin-Daten werden migriert und dann gelöscht",futureSessions:"Zukünftige Sitzungen werden in täglichen Notizen gespeichert",dataLongevity:"Dies bietet bessere Datenbeständigkeit mit deinen Notizen"},finalNote:{migrate:"⚠️ Stelle sicher, dass du Backups hast, falls nötig. Diese Änderung kann nicht automatisch rückgängig gemacht werden.",switch:"Du kannst jederzeit in Zukunft zurück zur Plugin-Speicherung wechseln."},buttons:{migrate:"Daten migrieren",switch:"Speicherung wechseln"}},dueDate:{title:"Fälligkeitsdatum setzen",taskLabel:"Aufgabe: {title}",sections:{dateTime:"Fälligkeitsdatum & Zeit",quickOptions:"Schnelloptionen"},descriptions:{dateTime:"Setze, wann diese Aufgabe abgeschlossen werden soll"},inputs:{date:{ariaLabel:"Fälligkeitsdatum für Aufgabe",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"Fälligkeitszeit für Aufgabe (optional)",placeholder:"HH:MM"}},quickOptions:{today:"Heute",todayAriaLabel:"Fälligkeitsdatum auf heute setzen",tomorrow:"Morgen",tomorrowAriaLabel:"Fälligkeitsdatum auf morgen setzen",nextWeek:"Nächste Woche",nextWeekAriaLabel:"Fälligkeitsdatum auf nächste Woche setzen",now:"Jetzt",nowAriaLabel:"Fälligkeitsdatum und -zeit auf jetzt setzen",clear:"Löschen",clearAriaLabel:"Fälligkeitsdatum löschen"},errors:{invalidDateTime:"Bitte gib ein gültiges Datums- und Zeitformat ein",updateFailed:"Fälligkeitsdatum konnte nicht aktualisiert werden. Bitte versuche es erneut."}},scheduledDate:{title:"Planungsdatum setzen",taskLabel:"Aufgabe: {title}",sections:{dateTime:"Planungsdatum & Zeit",quickOptions:"Schnelloptionen"},descriptions:{dateTime:"Setze, wann du an dieser Aufgabe arbeiten möchtest"},inputs:{date:{ariaLabel:"Planungsdatum für Aufgabe",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"Planungszeit für Aufgabe (optional)",placeholder:"HH:MM"}},quickOptions:{today:"Heute",todayAriaLabel:"Planungsdatum auf heute setzen",tomorrow:"Morgen",tomorrowAriaLabel:"Planungsdatum auf morgen setzen",nextWeek:"Nächste Woche",nextWeekAriaLabel:"Planungsdatum auf nächste Woche setzen",now:"Jetzt",nowAriaLabel:"Planungsdatum und -zeit auf jetzt setzen",clear:"Löschen",clearAriaLabel:"Planungsdatum löschen"},errors:{invalidDateTime:"Bitte gib ein gültiges Datums- und Zeitformat ein",updateFailed:"Planungsdatum konnte nicht aktualisiert werden. Bitte versuche es erneut."}},timeEntryEditor:{title:"Zeiteinträge - {taskTitle}",addEntry:"Zeiteintrag hinzufügen",noEntries:"Noch keine Zeiteinträge",deleteEntry:"Eintrag löschen",startTime:"Startzeit",endTime:"Endzeit (leer lassen, falls noch laufend)",duration:"Dauer (Minuten)",durationDesc:"Berechnete Dauer überschreiben",durationPlaceholder:"Dauer in Minuten eingeben",description:"Beschreibung",descriptionPlaceholder:"Woran haben Sie gearbeitet?",calculatedDuration:"Berechnet: {minutes} Minuten",totalTime:"{hours}h {minutes}m gesamt",totalMinutes:"{minutes}m gesamt",saved:"Zeiteinträge gespeichert",saveFailed:"Speichern der Zeiteinträge fehlgeschlagen",openFailed:"Öffnen des Zeiteintrag-Editors fehlgeschlagen",noTasksWithEntries:"Keine Aufgaben mit Zeiteinträgen zum Bearbeiten",validation:{missingStartTime:"Startzeit ist erforderlich",endBeforeStart:"Endzeit muss nach der Startzeit liegen"}},timeTracking:{noTasksAvailable:"Keine Aufgaben zur Zeiterfassung verfügbar",started:"Zeiterfassung gestartet für: {taskTitle}",startFailed:"Starten der Zeiterfassung fehlgeschlagen"},timeEntry:{mustHaveSpecificTime:"Zeiteinträge müssen spezifische Zeiten haben. Bitte wählen Sie einen Zeitbereich in der Wochen- oder Tagesansicht.",noTasksAvailable:"Keine Aufgaben zum Erstellen von Zeiteinträgen verfügbar",created:"Zeiteintrag erstellt für {taskTitle} ({duration} Minuten)",createFailed:"Erstellen des Zeiteintrags fehlgeschlagen"}},contextMenus:{task:{status:"Status",statusSelected:"✓ {label}",priority:"Priorität",prioritySelected:"✓ {label}",dueDate:"Fälligkeitsdatum",scheduledDate:"Planungsdatum",customDates:"Benutzerdefinierte Datumsfelder",reminders:"Erinnerungen",remindBeforeDue:"Vor Fälligkeit erinnern…",remindBeforeScheduled:"Vor Planung erinnern…",manageReminders:"Alle Erinnerungen verwalten…",clearReminders:"Alle Erinnerungen löschen",startTimeTracking:"Zeiterfassung starten",stopTimeTracking:"Zeiterfassung stoppen",editTimeEntries:"Zeiteinträge bearbeiten",archive:"Archivieren",unarchive:"Entarchivieren",openNote:"Notiz öffnen",openNoteInNewTab:"Notiz in neuem Tab öffnen",copyTitle:"Aufgabentitel kopieren",quickActions:"Schnellaktionen",noteActions:"Notizaktionen",rename:"Umbenennen",renameTitle:"Datei umbenennen",renamePlaceholder:"Neuen Namen eingeben",delete:"Löschen",deleteTitle:"Datei löschen",deleteMessage:'Bist du sicher, dass du "{name}" löschen möchtest?',deleteConfirm:"Löschen",copyPath:"Pfad kopieren",copyUrl:"Obsidian URL kopieren",showInExplorer:"Im Datei-Explorer anzeigen",addToCalendar:"Zum Kalender hinzufügen",calendar:{google:"Google Kalender",outlook:"Outlook Kalender",yahoo:"Yahoo Kalender",downloadIcs:".ics Datei herunterladen",syncToGoogle:"Mit Google Kalender synchronisieren",syncToGoogleNotConfigured:"Google Kalender-Synchronisierung nicht konfiguriert",syncToGoogleSuccess:"Aufgabe mit Google Kalender synchronisiert",syncToGoogleFailed:"Synchronisierung mit Google Kalender fehlgeschlagen"},recurrence:"Wiederholung",clearRecurrence:"Wiederholung löschen",customRecurrence:"Benutzerdefinierte Wiederholung...",createSubtask:"Unteraufgabe erstellen",dependencies:{title:"Abhängigkeiten",addBlockedBy:"Blockiert von hinzufügen…",addBlockedByTitle:"Aufgaben hinzufügen, von denen dies abhängt",addBlocking:"Blockierend hinzufügen…",addBlockingTitle:"Aufgaben hinzufügen, die dies blockiert",removeBlockedBy:"Blockiert-von entfernen…",removeBlocking:"Blockierend entfernen…",unknownDependency:"Unbekannt",inputPlaceholder:"[[Aufgabennotiz]]",notices:{noEntries:"Bitte geben Sie mindestens eine Aufgabe ein",blockedByAdded:"{count} Abhängigkeit hinzugefügt",blockedByRemoved:"Abhängigkeit entfernt",blockingAdded:"{count} abhängige Aufgabe hinzugefügt",blockingRemoved:"Abhängige Aufgabe entfernt",unresolved:"Konnte nicht auflösen: {entries}",noEligibleTasks:"Keine passenden Aufgaben verfügbar",updateFailed:"Abhängigkeiten konnten nicht aktualisiert werden"}},organization:{title:"Organisation",projects:"Projekte",addToProject:"Zu Projekt hinzufügen…",subtasks:"Unteraufgaben",addSubtasks:"Unteraufgaben hinzufügen…",notices:{alreadyInProject:"Aufgabe ist bereits in diesem Projekt",alreadySubtask:"Aufgabe ist bereits eine Unteraufgabe dieser Aufgabe",addedToProject:"Zu Projekt hinzugefügt: {project}",addedAsSubtask:"{subtask} als Unteraufgabe von {parent} hinzugefügt",addToProjectFailed:"Hinzufügen der Aufgabe zum Projekt fehlgeschlagen",addAsSubtaskFailed:"Hinzufügen der Aufgabe als Unteraufgabe fehlgeschlagen",projectSelectFailed:"Projektauswahl konnte nicht geöffnet werden",subtaskSelectFailed:"Unteraufgaben-Auswahl konnte nicht geöffnet werden",noEligibleSubtasks:"Keine geeigneten Aufgaben verfügbar, um als Unteraufgaben zugewiesen zu werden",currentTaskNotFound:"Aktuelle Aufgabendatei nicht gefunden",updateContextsFailed:"Kontexte konnten nicht aktualisiert werden"},contexts:"Kontexte",addContext:"Kontext hinzufügen…",contextPlaceholder:"Kontext",contextSelected:"✓ {context}",clearContexts:"Kontexte löschen"},subtasks:{loading:"Unteraufgaben werden geladen...",noSubtasks:"Keine Unteraufgaben gefunden",loadFailed:"Unteraufgaben konnten nicht geladen werden"},markComplete:"Als abgeschlossen für dieses Datum markieren",markIncomplete:"Als unvollständig für dieses Datum markieren",skipInstance:"Instanz überspringen",unskipInstance:"Instanz nicht überspringen",completion:{submenu:"Als abgeschlossen markieren oder überspringen",submenuCompleteOnly:"Als abgeschlossen markieren",completeToday:"Heute abgeschlossen",completeAsScheduled:"Am geplanten Datum abgeschlossen",completeOnDue:"Am Fälligkeitsdatum abgeschlossen",completeOnPicked:"Abgeschlossen am (Datum wählen)",markIncomplete:"Als unvollständig markieren",noScheduledDate:"Für diese Aufgabe ist kein geplantes Datum festgelegt",noDueDate:"Für diese Aufgabe ist kein Fälligkeitsdatum festgelegt",noPickedDate:"Kein Datum ausgewählt",noCompletedStatus:"Kein Status für abgeschlossene Aufgaben konfiguriert",pickDateTitle:"Abschlussdatum wählen",completeFailure:"Aufgabenabschluss konnte nicht aktualisiert werden: {message}",clearInstancesConfirmTitle:"Aufgezeichnete Instanzen löschen?",clearInstancesConfirmMessage:"Durch die Neuplanung werden diese aufgezeichneten abgeschlossenen oder übersprungenen Instanzen am oder nach dem neuen Datum gelöscht: {dates}. Sie werden nicht mehr als abgeschlossen oder übersprungen markiert sein. Fortfahren?",clearInstancesConfirmButton:"Neu planen und löschen"},quickReminders:{atTime:"Zur Zeit des Events",fiveMinutes:"5 Minuten vorher",fifteenMinutes:"15 Minuten vorher",oneHour:"1 Stunde vorher",oneDay:"1 Tag vorher"},notices:{toggleCompletionFailure:"Abschluss der wiederkehrenden Aufgabe konnte nicht umgeschaltet werden: {message}",toggleSkipFailure:"Überspringen der wiederkehrenden Aufgabe konnte nicht umgeschaltet werden: {message}",updateDueDateFailure:"Aufgaben-Fälligkeitsdatum konnte nicht aktualisiert werden: {message}",updateScheduledFailure:"Aufgaben-Planungsdatum konnte nicht aktualisiert werden: {message}",updateCustomDateFailure:"Fehler beim Aktualisieren von {field}: {message}",updateRemindersFailure:"Erinnerungen konnten nicht aktualisiert werden",clearRemindersFailure:"Erinnerungen konnten nicht gelöscht werden",addReminderFailure:"Erinnerung konnte nicht hinzugefügt werden",archiveFailure:"Aufgabenarchiv konnte nicht umgeschaltet werden: {message}",copyTitleSuccess:"Aufgabentitel in Zwischenablage kopiert",copyFailure:"Kopieren in Zwischenablage fehlgeschlagen",renameSuccess:'Umbenannt zu "{name}"',renameFailure:"Datei konnte nicht umbenannt werden",copyPathSuccess:"Dateipfad in Zwischenablage kopiert",copyUrlSuccess:"Obsidian URL in Zwischenablage kopiert",updateRecurrenceFailure:"Aufgabenwiederholung konnte nicht aktualisiert werden: {message}",updateTagsFailed:"Tags konnten nicht aktualisiert werden"},tags:"Tags",addTag:"Tag hinzufügen…",removeTag:"{tag} entfernen",removeTagInput:"Tag entfernen…",tagPlaceholder:"Tag oder #tag",clearTags:"Tags löschen"},priority:{clearPriority:"Priorität löschen"},ics:{showDetails:"Details anzeigen",createTask:"Aufgabe aus Event erstellen",createNote:"Notiz aus Event erstellen",linkNote:"Bestehende Notiz verlinken",copyTitle:"Titel kopieren",copyLocation:"Ort kopieren",copyUrl:"URL kopieren",copyMarkdown:"Als Markdown kopieren",subscriptionUnknown:"Unbekannter Kalender",notices:{copyTitleSuccess:"Event-Titel in Zwischenablage kopiert",copyLocationSuccess:"Ort in Zwischenablage kopiert",copyUrlSuccess:"Event-URL in Zwischenablage kopiert",copyMarkdownSuccess:"Event-Details als Markdown kopiert",copyFailure:"Kopieren in Zwischenablage fehlgeschlagen",taskCreated:"Aufgabe erstellt: {title}",taskCreateFailure:"Aufgabe aus Event konnte nicht erstellt werden",noteCreated:"Notiz erfolgreich erstellt",creationFailure:"Erstellungsmodal konnte nicht geöffnet werden",linkSuccess:'Notiz "{name}" mit Event verlinkt',linkFailure:"Notiz konnte nicht verlinkt werden",linkSelectionFailure:"Notizauswahl konnte nicht geöffnet werden"},markdown:{titleFallback:"Unbenanntes Event",calendar:"**Kalender:** {value}",date:"**Datum & Zeit:** {value}",location:"**Ort:** {value}",descriptionHeading:"### Beschreibung",url:"**URL:** {value}",at:" um {time}"}},date:{increment:{plusOneDay:"+1 Tag",minusOneDay:"-1 Tag",plusOneWeek:"+1 Woche",minusOneWeek:"-1 Woche"},basic:{today:"Heute",tomorrow:"Morgen",thisWeekend:"Dieses Wochenende",nextWeek:"Nächste Woche",nextMonth:"Nächster Monat"},weekdaysLabel:"Wochentage",selected:"✓ {label}",pickDateTime:"Datum & Zeit wählen…",clearDate:"Datum löschen",modal:{title:"Datum & Zeit setzen",dateLabel:"Datum",timeLabel:"Zeit (optional)",select:"Auswählen"}}},services:{pomodoro:{notices:{alreadyRunning:"Ein Pomodoro läuft bereits",resumeCurrentSession:"Setze die aktuelle Sitzung fort, anstatt eine neue zu starten",timerAlreadyRunning:"Ein Timer läuft bereits",resumeSessionInstead:"Setze die aktuelle Sitzung fort, anstatt eine neue zu starten",shortBreakStarted:"Kurze Pause gestartet",longBreakStarted:"Lange Pause gestartet",paused:"Pomodoro pausiert",resumed:"Pomodoro fortgesetzt",stoppedAndReset:"Pomodoro gestoppt und zurückgesetzt",migrationSuccess:"{count} Pomodoro-Sitzungen erfolgreich zu täglichen Notizen migriert.",migrationFailure:"Migration der Pomodoro-Daten fehlgeschlagen. Bitte versuche es erneut oder prüfe die Konsole für Details."}},icsSubscription:{notices:{calendarNotFound:'Kalender "{name}" nicht gefunden (404). Bitte prüfe, ob die ICS-URL korrekt ist und der Kalender öffentlich zugänglich ist.',calendarAccessDenied:'Kalender "{name}" Zugriff verweigert (500). Dies könnte auf Microsoft Outlook Server-Beschränkungen zurückzuführen sein. Versuche, die ICS-URL aus deinen Kalendereinstellungen neu zu generieren.',fetchRemoteFailed:'Remote-Kalender "{name}" konnte nicht abgerufen werden: {error}',readLocalFailed:'Lokaler Kalender "{name}" konnte nicht gelesen werden: {error}'}},calendarExport:{notices:{generateLinkFailed:"Kalenderlink konnte nicht generiert werden",noTasksToExport:"Keine Aufgaben zum Exportieren gefunden",downloadSuccess:"{filename} mit {count} Aufgabe{plural} heruntergeladen",downloadFailed:"Kalenderdatei konnte nicht heruntergeladen werden",singleDownloadSuccess:"{filename} heruntergeladen"}},filter:{groupLabels:{noProject:"Kein Projekt",noTags:"Keine Tags",invalidDate:"Ungültiges Datum",due:{overdue:"Überfällig",today:"Heute",tomorrow:"Morgen",nextSevenDays:"Nächste sieben Tage",later:"Später",none:"Kein Fälligkeitsdatum"},scheduled:{past:"Vergangene Planung",today:"Heute",tomorrow:"Morgen",nextSevenDays:"Nächste sieben Tage",later:"Später",none:"Kein Planungsdatum"}},errors:{noDatesProvided:"Keine Daten bereitgestellt"},folders:{root:"(Root)"}},instantTaskConvert:{notices:{noCheckboxTasks:"Keine Checkbox-Aufgaben in der aktuellen Notiz gefunden.",convertingTasks:"{count} Aufgabe{plural} wird konvertiert...",conversionSuccess:"✅ {count} Aufgabe{plural} erfolgreich zu TaskNotes konvertiert!",partialConversion:"{successCount} Aufgabe{successPlural} konvertiert. {failureCount} fehlgeschlagen.",batchConversionFailed:"Batch-Konvertierung fehlgeschlagen. Bitte versuche es erneut.",invalidParameters:"Ungültige Eingabeparameter.",emptyLine:"Aktuelle Zeile ist leer oder enthält keinen gültigen Inhalt.",parseError:"Fehler beim Parsen der Aufgabe: {error}",invalidTaskData:"Ungültige Aufgabendaten.",replaceLineFailed:"Aufgabenzeile konnte nicht ersetzt werden.",conversionComplete:"Aufgabe konvertiert: {title}",conversionCompleteShortened:'Aufgabe konvertiert: "{title}" (Dateiname wegen Länge gekürzt)',fileExists:"Eine Datei mit diesem Namen existiert bereits. Bitte versuche es erneut oder benenne die Aufgabe um.",conversionFailed:"Aufgabe konnte nicht konvertiert werden. Bitte versuche es erneut."}},icsNote:{notices:{templateNotFound:"Vorlage nicht gefunden: {path}",templateProcessError:"Fehler beim Verarbeiten der Vorlage: {template}",linkedToEvent:"Notiz mit ICS-Event verlinkt: {title}"}},task:{notices:{templateNotFound:"Aufgabenkörper-Vorlage nicht gefunden: {path}",templateReadError:"Fehler beim Lesen der Aufgabenkörper-Vorlage: {template}",occurrenceTemplateNotFound:"Vorkommnisnotiz-Vorlage nicht gefunden: {path}",occurrenceTemplateReadError:"Fehler beim Lesen der Vorkommnisnotiz-Vorlage: {template}",moveTaskFailed:"{operation} Aufgabe konnte nicht verschoben werden: {error}"}},autoExport:{notices:{exportFailed:"TaskNotes Auto-Export fehlgeschlagen: {error}"}}},ui:{icsCard:{untitledEvent:"Unbenanntes Event",allDay:"Ganztägig",calendarEvent:"Kalenderevent",calendarFallback:"Kalender"},noteCard:{createdLabel:"Erstellt:",dailyBadge:"Täglich",dailyTooltip:"Tägliche Notiz"},taskCard:{labels:{due:"Fällig",scheduled:"Geplant",recurrence:"Wiederkehrend",completed:"Abgeschlossen",created:"Erstellt",modified:"Geändert",blocked:"Blockiert",blocking:"Blockierend"},blockedBadge:"Blockiert",blockedBadgeTooltip:"Diese Aufgabe wartet auf eine andere Aufgabe",blockingBadge:"Blockierend",blockingBadgeTooltip:"Diese Aufgabe blockiert eine andere Aufgabe",blockingToggle:"Blockiert {count} Aufgaben",priorityAriaLabel:"Priorität: {label}",taskOptions:"Aufgabenoptionen",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"1 Erinnerung gesetzt (zum Verwalten klicken)",reminderTooltipMany:"{count} Erinnerungen gesetzt (zum Verwalten klicken)",projectTooltip:"Diese Aufgabe wird als Projekt verwendet (zum Ein-/Ausblenden von Unteraufgaben klicken)",projectIndicatorTooltip:"Diese Aufgabe wird als Projekt verwendet",expandSubtasks:"Unteraufgaben ausklappen",collapseSubtasks:"Unteraufgaben einklappen",dueToday:"{label}: Heute",dueTodayAt:"{label}: Heute um {time}",dueOverdue:"{label}: {display} (überfällig)",dueLabel:"{label}: {display}",scheduledToday:"{label}: Heute",scheduledTodayAt:"{label}: Heute um {time}",scheduledPast:"{label}: {display} (vergangen)",scheduledLabel:"{label}: {display}",loadingDependencies:"Abhängigkeiten werden geladen…",blockingEmpty:"Keine abhängigen Aufgaben",blockingLoadError:"Abhängigkeiten konnten nicht geladen werden",googleCalendarSyncTooltip:"Mit Google Kalender synchronisiert",detailsTooltip:"Aufgabe hat Details"},propertyEventCard:{unknownFile:"Unbekannte Datei"},filterHeading:{allViewName:"Alle"},filterBar:{saveView:"Ansicht speichern",saveViewNamePlaceholder:"Ansichtsname eingeben...",saveButton:"Speichern",views:"Ansichten",savedFilterViews:"Gespeicherte Filteransichten",filters:"Filter",properties:"Eigenschaften",sort:"Sortieren",newTask:"Neu",expandAllGroups:"Alle Gruppen ausklappen",collapseAllGroups:"Alle Gruppen einklappen",searchTasksPlaceholder:"Aufgaben suchen...",searchTasksTooltip:"Aufgabentitel suchen",filterUnavailable:"Filterleiste vorübergehend nicht verfügbar",toggleFilter:"Filter umschalten",activeFiltersTooltip:"Aktive Filter – Klicken zum Ändern, Rechtsklick zum Löschen",configureVisibleProperties:"Sichtbare Eigenschaften konfigurieren",sortAndGroupOptions:"Sortier- und Gruppenoptionen",sortMenuHeader:"Sortieren",orderMenuHeader:"Reihenfolge",groupMenuHeader:"Gruppieren",createNewTask:"Neue Aufgabe erstellen",filter:"Filter",displayOrganization:"Anzeige & Organisation",viewOptions:"Ansichtsoptionen",addFilter:"Filter hinzufügen",addFilterGroup:"Filtergruppe hinzufügen",addFilterTooltip:"Neue Filterbedingung hinzufügen",addFilterGroupTooltip:"Verschachtelte Filtergruppe hinzufügen",clearAllFilters:"Alle Filter und Gruppen löschen",saveCurrentFilter:"Aktuellen Filter als Ansicht speichern",closeFilterModal:"Filtermodal schließen",deleteFilterGroup:"Filtergruppe löschen",deleteCondition:"Bedingung löschen",all:"Alle",any:"Beliebige",followingAreTrue:"der folgenden sind wahr:",where:"wo",selectProperty:"Auswählen...",chooseProperty:"Wähle, nach welcher Aufgabeneigenschaft gefiltert werden soll",chooseOperator:"Wähle, wie der Eigenschaftswert verglichen werden soll",enterValue:"Gib den Wert zum Filtern ein",selectValue:"Wähle eine {property} zum Filtern",sortBy:"Sortieren nach:",toggleSortDirection:"Sortierrichtung umschalten",chooseSortMethod:"Wähle, wie Aufgaben sortiert werden sollen",groupBy:"Gruppieren nach:",chooseGroupMethod:"Aufgaben nach gemeinsamer Eigenschaft gruppieren",toggleViewOption:"{option} umschalten",expandCollapseFilters:"Klicken zum Aus-/Einklappen der Filterbedingungen",expandCollapseSort:"Klicken zum Aus-/Einklappen der Sortier- und Gruppenoptionen",expandCollapseViewOptions:"Klicken zum Aus-/Einklappen der ansichtsspezifischen Optionen",naturalLanguageDates:"Natürliche Sprache Daten",naturalLanguageExamples:"Beispiele für natürliche Sprache Daten anzeigen",enterNumericValue:"Gib einen numerischen Wert zum Filtern ein",enterDateValue:"Gib ein Datum in natürlicher Sprache oder ISO-Format ein",pickDateTime:"Datum & Zeit wählen",noSavedViews:"Keine gespeicherten Ansichten",savedViews:"Gespeicherte Ansichten",yourSavedFilters:"Deine gespeicherten Filterkonfigurationen",dragToReorder:"Ziehen zum Neuordnen der Ansichten",loadSavedView:"Gespeicherte Ansicht laden: {name}",deleteView:"Ansicht löschen",deleteViewTitle:"Ansicht löschen",deleteViewMessage:'Bist du sicher, dass du die Ansicht "{name}" löschen möchtest?',manageAllReminders:"Alle Erinnerungen verwalten...",clearAllReminders:"Alle Erinnerungen löschen",customRecurrence:"Benutzerdefinierte Wiederholung...",clearRecurrence:"Wiederholung löschen",sortOptions:{dueDate:"Fälligkeitsdatum",scheduledDate:"Planungsdatum",priority:"Priorität",status:"Status",title:"Titel",createdDate:"Erstellungsdatum",tags:"Tags",ascending:"Aufsteigend",descending:"Absteigend"},group:{none:"Keine",status:"Status",priority:"Priorität",context:"Kontext",project:"Projekt",dueDate:"Fälligkeitsdatum",scheduledDate:"Planungsdatum",tags:"Tags",completedDate:"Abschlussdatum"},subgroupLabel:"UNTERGRUPPE",notices:{propertiesMenuFailed:"Eigenschaftenmenü konnte nicht angezeigt werden"}}},components:{dateContextMenu:{weekdays:"Wochentage",clearDate:"Datum löschen",today:"Heute",tomorrow:"Morgen",thisWeekend:"Dieses Wochenende",nextWeek:"Nächste Woche",nextMonth:"Nächsten Monat",setDateTime:"Datum & Zeit setzen",dateLabel:"Datum",timeLabel:"Zeit (optional)"},subgroupMenuBuilder:{none:"Keine",status:"Status",priority:"Priorität",context:"Kontext",project:"Projekt",dueDate:"Fälligkeitsdatum",scheduledDate:"Planungsdatum",tags:"Tags",completedDate:"Abschlussdatum",subgroup:"UNTERGRUPPE"},propertyVisibilityDropdown:{coreProperties:"KERNEIGENSCHAFTEN",organization:"ORGANISATION",customProperties:"BENUTZERDEFINIERTE EIGENSCHAFTEN",failed:"Eigenschaftenmenü konnte nicht angezeigt werden",properties:{statusDot:"Statuspunkt",priorityDot:"Prioritätspunkt",dueDate:"Fälligkeitsdatum",scheduledDate:"Planungsdatum",timeEstimate:"Zeitschätzung",totalTrackedTime:"Gesamte erfasste Zeit",checklistProgress:"Checklistenfortschritt",recurrence:"Wiederholung",completedDate:"Abschlussdatum",createdDate:"Erstellungsdatum",modifiedDate:"Änderungsdatum",projects:"Projekte",contexts:"Kontexte",tags:"Tags",blocked:"Blockiert",blocking:"Blockierend"}},reminderContextMenu:{remindBeforeDue:"Vor Fälligkeit erinnern...",remindBeforeScheduled:"Vor Planung erinnern...",manageAllReminders:"Alle Erinnerungen verwalten...",clearAllReminders:"Alle Erinnerungen löschen",quickReminders:{atTime:"Zur Zeit des Events",fiveMinutesBefore:"5 Minuten vorher",fifteenMinutesBefore:"15 Minuten vorher",oneHourBefore:"1 Stunde vorher",oneDayBefore:"1 Tag vorher"}},recurrenceContextMenu:{daily:"Täglich",weeklyOn:"Wöchentlich am {day}",everyTwoWeeksOn:"Alle 2 Wochen am {day}",monthlyOnThe:"Monatlich am {ordinal}",everyThreeMonthsOnThe:"Alle 3 Monate am {ordinal}",yearlyOn:"Jährlich am {month} {ordinal}",weekdaysOnly:"Nur Wochentage",dailyAfterCompletion:"Täglich (nach Abschluss)",every3DaysAfterCompletion:"Alle 3 Tage (nach Abschluss)",weeklyAfterCompletion:"Wöchentlich (nach Abschluss)",monthlyAfterCompletion:"Monatlich (nach Abschluss)",customRecurrence:"Benutzerdefinierte Wiederholung...",clearRecurrence:"Wiederholung löschen",customRecurrenceModal:{title:"Benutzerdefinierte Wiederholung",startDate:"Startdatum",startDateDesc:"Das Datum, an dem das Wiederholungsmuster beginnt",startTime:"Startzeit",startTimeDesc:"Die Zeit, zu der wiederkehrende Instanzen erscheinen sollen (optional)",recurFrom:"Wiederholen ab",recurFromDesc:"Wann soll das nächste Vorkommen berechnet werden?",scheduledDate:"Geplantes Datum",completionDate:"Abschlussdatum",frequency:"Häufigkeit",interval:"Intervall",intervalDesc:"Alle X Tage/Wochen/Monate/Jahre",daysOfWeek:"Wochentage",daysOfWeekDesc:"Bestimmte Tage auswählen (für wöchentliche Wiederholung)",monthlyRecurrence:"Monatliche Wiederholung",monthlyRecurrenceDesc:"Wähle, wie monatlich wiederholt werden soll",yearlyRecurrence:"Jährliche Wiederholung",yearlyRecurrenceDesc:"Wähle, wie jährlich wiederholt werden soll",endCondition:"Endbedingung",endConditionDesc:"Wähle, wann die Wiederholung enden soll",neverEnds:"Endet nie",endAfterOccurrences:"Nach {count} Vorkommen beenden",endOnDate:"Am {date} beenden",onDayOfMonth:"Am Tag {day} jeden Monat",onTheWeekOfMonth:"Am {week} {day} jeden Monat",onDateOfYear:"Am {month} {day} jedes Jahr",onTheWeekOfYear:"Am {week} {day} von {month} jedes Jahr",frequencies:{daily:"Täglich",weekly:"Wöchentlich",monthly:"Monatlich",yearly:"Jährlich"},weekPositions:{first:"ersten",second:"zweiten",third:"dritten",fourth:"vierten",last:"letzten"},weekdays:{monday:"Montag",tuesday:"Dienstag",wednesday:"Mittwoch",thursday:"Donnerstag",friday:"Freitag",saturday:"Samstag",sunday:"Sonntag"},weekdaysShort:{mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"},cancel:"Abbrechen",save:"Speichern"}}}};var $ue={common:{appName:"TaskNotes",new:"Nuevo",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",reorder:{confirmLargeTitle:"Confirmar reordenación grande",confirmButton:"Reordenar notas",confirmLargeMessage:'Reordenar aquí actualizará "{field}" en {count} notas para crear un orden manual persistente para {scope}. Las notas ocultas o filtradas dentro del mismo alcance también pueden actualizarse. ¿Continuar?'},language:"Idioma",systemDefault:"Predeterminado del sistema",loading:"Cargando...",languages:{en:"Inglés",fr:"Francés",ru:"Ruso",zh:"Chino",de:"Alemán",es:"Español",ja:"Japonés",pt:"Portugués (Brasil)",ko:"Coreano"},weekdays:{sunday:"Domingo",monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado"},months:{january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre"}},views:{agenda:{title:"Agenda",today:"Hoy",overdue:"Vencido",refreshCalendars:"Actualizar calendarios",actions:{previousPeriod:"Período anterior",nextPeriod:"Próximo período",goToToday:"Ir a hoy",refreshCalendars:"Actualizar suscripciones de calendario"},loading:"Cargando agenda...",dayToggle:"Cambiar día",overdueToggle:"Alternar sección de vencidos",expandAllDays:"Expandir todos los días",collapseAllDays:"Contraer todos los días",notices:{calendarNotReady:"Servicio de calendario aún no listo",calendarRefreshed:"Suscripciones de calendario actualizadas",refreshFailed:"Error al actualizar"},empty:{noItemsScheduled:"No hay elementos programados",noItemsFound:"No se encontraron elementos",helpText:"Cree tareas con fechas de vencimiento o programadas, o agregue notas para verlas aquí."},contextMenu:{showOverdueSection:"Mostrar sección de vencidos",showNotes:"Mostrar notas",calendarSubscriptions:"Suscripciones de calendario"},periods:{thisWeek:"Esta semana"},tipPrefix:"Consejo: "},taskList:{title:"Tareas",expandAllGroups:"Expandir todos los grupos",collapseAllGroups:"Contraer todos los grupos",noTasksFound:"No se encontraron tareas para los filtros seleccionados.",reorder:{scope:{ungrouped:"esta lista sin agrupar",group:'grupo "{group}"'}},errors:{formulaGroupingReadOnly:"No se pueden reordenar tareas en grupos basados en fórmulas. Los valores de fórmula se calculan y no pueden modificarse directamente."}},notes:{title:"Notas",refreshButton:"Actualizar",refreshingButton:"Actualizando...",notices:{indexingDisabled:"Indexación de notas deshabilitada"},empty:{noNotesFound:"No se encontraron notas",helpText:"No se encontraron notas para la fecha seleccionada. Intente seleccionar una fecha diferente en la vista de Mini Calendario o cree algunas notas."},loading:"Cargando notas...",refreshButtonAriaLabel:"Actualizar lista de notas"},miniCalendar:{title:"Mini Calendario",contextMenu:{openDailyNote:"Abrir nota diaria",openWeeklyNote:"Abrir nota semanal"}},advancedCalendar:{title:"Calendario",filters:{showFilters:"Mostrar filtros",hideFilters:"Ocultar filtros"},viewOptions:{calendarSubscriptions:"Suscripciones de calendario",timeEntries:"Entradas de tiempo",timeblocks:"Bloques de tiempo",scheduledDates:"Fechas programadas",dueDates:"Fechas de vencimiento",allDaySlot:"Espacio de día completo",scheduledTasks:"Tareas programadas",recurringTasks:"Tareas recurrentes"},buttons:{refresh:"Actualizar",refreshHint:"Actualizar suscripciones de calendario"},notices:{icsServiceNotAvailable:"Servicio de suscripción ICS no disponible",calendarRefreshedAll:"Todas las suscripciones de calendario se actualizaron correctamente",refreshFailed:"Error al actualizar algunas suscripciones de calendario",timeblockSpecificTime:"Los bloques de tiempo deben tener horas específicas. Seleccione un rango de tiempo en la vista de semana o día.",timeblockMoved:'Bloque de tiempo "{title}" movido a {date}',timeblockUpdated:'Hora del bloque de tiempo "{title}" actualizada',timeblockMoveFailed:"Error al mover el bloque de tiempo: {message}",timeblockResized:'Duración del bloque de tiempo "{title}" actualizada',timeblockResizeFailed:"Error al redimensionar el bloque de tiempo: {message}",taskScheduled:'Tarea "{title}" programada para {date}',scheduleTaskFailed:"Error al programar la tarea",endTimeAfterStart:"La hora de fin debe ser posterior a la hora de inicio",timeEntryNotFound:"Entrada de tiempo no encontrada",timeEntryDeleted:"Entrada de tiempo eliminada",deleteTimeEntryFailed:"Error al eliminar la entrada de tiempo"},timeEntry:{estimatedSuffix:"estimado",trackedSuffix:"registrado",recurringPrefix:"Recurrente: ",completedPrefix:"Completado: ",createdPrefix:"Creado: ",modifiedPrefix:"Modificado: ",duePrefix:"Vence: ",scheduledPrefix:"Programado: "},contextMenus:{openTask:"Abrir tarea",deleteTimeEntry:"Eliminar entrada de tiempo",deleteTimeEntryTitle:"Eliminar Entrada de Tiempo",deleteTimeEntryConfirm:"¿Estás seguro de que deseas eliminar esta entrada de tiempo{duration}? Esta acción no se puede deshacer.",deleteButton:"Eliminar",cancelButton:"Cancelar"}},basesCalendar:{title:"Calendario Bases",today:"Hoy",buttonText:{month:"M",week:"S",day:"D",year:"A",list:"L",customDays:"{count}D",listDays:"{count}d Lista",refresh:"Actualizar"},hints:{refresh:"Actualizar suscripciones de calendario",today:"Ir a hoy",prev:"Anterior",next:"Siguiente",month:"Vista de mes",week:"Vista de semana",day:"Vista de día",year:"Vista de año",list:"Vista de lista",customDays:"Vista de {count} días"},settings:{groups:{dateNavigation:"Navegación por fecha",events:"Eventos",layout:"Diseño",view:"Vista",display:"Visualización",timeGrid:"Cuadrícula horaria",eventLayout:"Diseño de eventos",propertyBasedEvents:"Eventos basados en propiedades",calendarSubscriptions:"Suscripciones de calendario",googleCalendars:"Calendarios de Google",microsoftCalendars:"Calendarios de Microsoft"},dateNavigation:{navigateToDate:"Navegar a la fecha",navigateToDatePlaceholder:"AAAA-MM-DD (ej. 2025-01-15) - dejar vacío para usar la propiedad",navigateToDateFromProperty:"Navegar a la fecha desde la propiedad",navigateToDateFromPropertyPlaceholder:"Seleccionar una propiedad de fecha (opcional)",propertyNavigationStrategy:"Estrategia de navegación por propiedad",createDailyNotesFromDateLinks:"Crear notas diarias desde enlaces de fecha",strategies:{first:"Primer resultado",earliest:"Fecha más antigua",latest:"Fecha más reciente"}},events:{showScheduledTasks:"Mostrar tareas programadas",showDueTasks:"Mostrar tareas vencidas",showOverdueOnToday:"Mostrar tareas atrasadas en la fecha de hoy",showRecurringTasks:"Mostrar tareas recurrentes",showTimeEntries:"Mostrar entradas de tiempo",showTimeblocks:"Mostrar bloques de tiempo",showPropertyBasedEvents:"Mostrar eventos basados en propiedades",showCompletedRecurringInstances:"Mostrar instancias recurrentes completadas",showSkippedRecurringInstances:"Mostrar instancias recurrentes omitidas"},layout:{calendarView:"Vista del calendario",customDayCount:"Número de días personalizado",listDayCount:"Recuento de días de lista",dayStartTime:"Hora de inicio del día",dayStartTimePlaceholder:"HH:mm:ss (ej. 08:00:00)",dayEndTime:"Hora de fin del día",dayEndTimePlaceholder:"HH:mm:ss (ej. 20:00:00)",timeSlotDuration:"Duración del intervalo de tiempo",timeSlotDurationPlaceholder:"HH:mm:ss (ej. 00:30:00)",dragDropResolution:"Resolución de arrastrar y soltar",dragDropResolutionPlaceholder:"HH:mm:ss (ej. 00:05:00)",weekStartsOn:"La semana comienza el",showWeekNumbers:"Mostrar números de semana",showNowIndicator:"Mostrar indicador actual",showWeekends:"Mostrar fines de semana",showAllDaySlot:"Mostrar franja de todo el día",showTimeGrid:"Mostrar desglose por horas",showTodayHighlight:"Resaltar hoy",todayColumnWidthMultiplier:"Multiplicador de ancho de la columna de hoy",showSelectionPreview:"Mostrar vista previa de selección",timeFormat:"Formato de hora",timeFormat12:"12 horas (AM/PM)",timeFormat24:"24 horas",initialScrollTime:"Hora de desplazamiento inicial",initialScrollTimePlaceholder:"HH:mm:ss (ej. 08:00:00)",minimumEventHeight:"Altura mínima del evento (px)",slotEventOverlap:"Permitir superposición de eventos",enableSearch:"Habilitar cuadro de búsqueda",eventMaxStack:"Máx. eventos apilados (vista semana/día, 0 = ilimitado)",dayMaxEvents:"Máx. eventos por día (vista mes, 0 = automático)",dayMaxEventRows:"Máx. filas de eventos por día (vista mes, 0 = ilimitado)",spanScheduledToDue:"Expandir tareas entre fecha programada y fecha límite",heightMode:"Modo de altura",heightModeFill:"Rellenar contenedor",heightModeAuto:"Altura automática"},propertyBasedEvents:{startDateProperty:"Propiedad de fecha de inicio",startDatePropertyPlaceholder:"Seleccionar propiedad para fecha/hora de inicio",endDateProperty:"Propiedad de fecha de fin (opcional)",endDatePropertyPlaceholder:"Seleccionar propiedad para fecha/hora de fin",titleProperty:"Propiedad de título (opcional)",titlePropertyPlaceholder:"Seleccionar propiedad para título del evento"}},notices:{noDailyNoteForDate:"No existe una nota diaria para esta fecha."},errors:{failedToInitialize:"Error al inicializar el calendario"}},kanban:{title:"Kanban",newTask:"Nueva tarea",addCard:"+ Agregar tarjeta",noTasks:"Sin tareas",uncategorized:"Sin categorizar",noProject:"Sin proyecto",reorder:{scope:{column:'columna "{group}"',columnInSwimlane:'columna "{group}" en swimlane "{swimlane}"'}},notices:{loadFailed:"Error al cargar el tablero Kanban",movedTask:'Tarea movida a "{0}"'},errors:{loadingBoard:"Error al cargar el tablero.",noGroupBy:"La vista Kanban requiere que se configure una propiedad 'Agrupar por'. Haga clic en el botón 'Ordenar' y seleccione una propiedad en 'Agrupar por'.",formulaGroupingReadOnly:"No se pueden mover tareas entre columnas basadas en fórmulas. Los valores de fórmula se calculan y no se pueden modificar directamente.",formulaSwimlaneReadOnly:"No se pueden mover tareas entre carriles basados en fórmulas. Los valores de fórmula se calculan y no se pueden modificar directamente."},columnTitle:"Sin título"},pomodoro:{title:"Pomodoro",status:{focus:"Enfoque",ready:"Listo para comenzar",paused:"Pausado",working:"Trabajando",shortBreak:"Descanso corto",longBreak:"Descanso largo",breakPrompt:"¡Excelente trabajo! Tiempo para un descanso {length}",breakLength:{short:"corto",long:"largo"},breakComplete:"¡Descanso completo! ¿Listo para el próximo pomodoro?"},buttons:{start:"Iniciar",pause:"Pausar",stop:"Detener",resume:"Reanudar",startShortBreak:"Iniciar descanso corto",startLongBreak:"Iniciar descanso largo",skipBreak:"Saltar descanso",chooseTask:"Elegir tarea...",changeTask:"Cambiar tarea...",clearTask:"Quitar tarea",selectDifferentTask:"Seleccionar una tarea diferente",startFocus:"Iniciar enfoque",addMinute:"Añadir un minuto",subtractMinute:"Restar un minuto"},notices:{noTasks:"No se encontraron tareas no archivadas. Crea algunas tareas primero.",loadFailed:"Error al cargar las tareas",invalidDuration:"Introduce una duración como 10, 10:30 o 1:30:00."},statsLabel:"completadas hoy",meta:{ready:"{time} planificado · {count} completados hoy",running:"Quedan {time} · Termina a las {endTime}",paused:"{type} en pausa · quedan {time}",breakReady:"{type} listo · {time} planificado"},timer:{editLabel:"Editar duración del temporizador",inputLabel:"Duración del temporizador"}},pomodoroStats:{title:"Estadísticas de Pomodoro",heading:"Estadísticas de Pomodoro",refresh:"Actualizar",sections:{overview:"Resumen",today:"Hoy",week:"Esta semana",allTime:"Todo el tiempo",recent:"Sesiones recientes"},overviewCards:{todayPomos:{label:"Pomos de hoy",change:{more:"{count} más que ayer",less:"{count} menos que ayer"}},totalPomos:{label:"Pomos totales"},todayFocus:{label:"Enfoque de hoy",change:{more:"{duration} más que ayer",less:"{duration} menos que ayer"}},totalFocus:{label:"Duración total de enfoque"}},stats:{pomodoros:"Pomodoros",streak:"Racha",minutes:"Minutos",average:"Duración promedio",completion:"Finalización"},recents:{empty:"Aún no se han registrado sesiones",duration:"{minutes} min",status:{completed:"Completado",interrupted:"Interrumpido"},delete:"Eliminar sesión",deleteAria:"Eliminar sesión Pomodoro",deleteConfirmTitle:"¿Eliminar sesión Pomodoro?",deleteConfirmMessage:"Esto elimina la sesión del historial de Pomodoro. Las entradas de tiempo de tareas existentes no se modifican.",deleteConfirmButton:"Eliminar",deleteSuccess:"Sesión Pomodoro eliminada",deleteNotFound:"No se encontró la sesión Pomodoro"},basesMigration:{title:"¿Quieres una vista Base?",description:"Las vistas Base de Pomodoro usan el frontmatter de las notas diarias. Para ver este historial en la Base de estadísticas de Pomodoro generada, migra los datos de Pomodoro en ajustes y luego establece el almacenamiento en notas diarias."}},stats:{title:"Estadísticas",taskProjectStats:"Estadísticas de tareas y proyectos",sections:{filters:"Filtros",overview:"Resumen",today:"Hoy",thisWeek:"Esta semana",thisMonth:"Este mes",projectBreakdown:"Desglose de proyectos",dateRange:"Rango de fechas"},filters:{minTime:"Tiempo mínimo (minutos)",allTasks:"Todas las tareas",activeOnly:"Solo activas",completedOnly:"Solo completadas"},refreshButton:"Actualizar",timeRanges:{allTime:"Todo el tiempo",last7Days:"Últimos 7 días",last30Days:"Últimos 30 días",last90Days:"Últimos 90 días",customRange:"Rango personalizado"},resetFiltersButton:"Restablecer filtros",dateRangeFrom:"Desde",dateRangeTo:"Hasta",noProject:"Sin proyecto",cards:{timeTrackedEstimated:"Tiempo registrado / estimado",totalTasks:"Total de tareas",completionRate:"Tasa de completado",activeProjects:"Proyectos activos",avgTimePerTask:"Tiempo promedio por tarea"},labels:{tasks:"Tareas",completed:"Completadas",projects:"Proyectos"},noProjectData:"No hay datos de proyectos disponibles",notAvailable:"N/D",noTasks:"No se encontraron tareas",loading:"Cargando..."},releaseNotes:{title:"Novedades en TaskNotes {version}",header:"Novedades en TaskNotes {version}",viewAllLink:"Ver todas las notas de versión en GitHub →",starMessage:"Agradecemos mucho todos los comentarios. Si algo no te parece bien, cuéntanoslo en GitHub. Si TaskNotes te resulta útil, considera darle una estrella.",baseFilesNotice:"> [!info] Acerca de los archivos `.base` predeterminados\n> Los cambios en las plantillas `.base` generadas por defecto no sobrescriben tus archivos `.base` existentes, por lo que tus personalizaciones se mantienen.\n> Si quieres las mejoras más recientes de las plantillas, regenera los archivos base en **Ajustes → TaskNotes → General → Vistas y archivos base → Actualizar archivos**."}},settings:{header:{documentation:"Documentación",documentationUrl:"https://tasknotes.dev"},tabs:{general:"General",taskProperties:"Propiedades de tareas",modalFields:"Campos del modal",defaults:"Predeterminados y plantillas",appearance:"Apariencia e interfaz",features:"Características",integrations:"Integraciones"},features:{inlineTasks:{header:"Tareas en línea",description:"Configuración para enlaces de tareas y conversión de casillas a tareas en notas."},taskCreation:{header:"Creación de tareas",description:"Configura qué ocurre después de crear tareas.",openAfterCreate:{name:"Abrir tarea después de crearla",description:"Elige si el modal normal Crear nueva tarea abre la nueva nota de tarea después de guardar.",options:{none:"No abrir",sameTab:"Abrir en la misma pestaña",newTab:"Abrir en una nueva pestaña"}}},overlays:{taskLinkToggle:{name:"Superposición de enlace de tarea",description:"Mostrar superposiciones interactivas al pasar el cursor sobre enlaces de tareas"},aliasExclusion:{name:"Desactivar superposición para enlaces con alias",description:"No mostrar el widget de tarea si el enlace contiene un alias (ej. [[Tarea|Alias]])."}},instantConvert:{toggle:{name:"Mostrar botón de conversión junto a casillas de verificación",description:"Mostrar un botón en línea junto a las casillas de verificación Markdown que las convierte en TaskNotes"},preserveCheckbox:{name:"Mantener la casilla al convertir",description:"Conservar el marcador original de casilla Markdown al convertir una casilla en un enlace de TaskNote"},folder:{name:"Carpeta para tareas creadas en línea",description:"Carpeta donde se crearán las tareas desde comandos en línea o conversión de casillas. Déjala vacía para usar la carpeta de tareas predeterminada. Usa {{currentNotePath}} para la carpeta de la nota actual, o {{currentNoteTitle}} para una subcarpeta con el nombre de la nota actual."}},nlp:{header:"Procesamiento de lenguaje natural",description:"Analiza fechas, prioridades y otras propiedades desde texto de entrada.",enable:{name:"Habilitar entrada de tareas en lenguaje natural",description:"Analizar fechas de vencimiento, prioridades y contextos desde lenguaje natural al crear tareas"},defaultToScheduled:{name:"Predeterminado a programado",description:"Cuando NLP detecta una fecha sin contexto, tratarla como programada en lugar de vencimiento"},language:{name:"Idioma NLP",description:"Idioma para patrones de procesamiento de lenguaje natural y análisis de fechas"},statusTrigger:{name:"Activador de sugerencia de estado",description:"Texto para activar sugerencias de estado (dejar vacío para deshabilitar)"}},pomodoro:{header:"Temporizador Pomodoro",description:"Configura intervalos de trabajo/descanso para el temporizador Pomodoro.",workDuration:{name:"Duración del trabajo",description:"Duración de intervalos de trabajo en minutos"},shortBreak:{name:"Duración del descanso corto",description:"Duración de descansos cortos en minutos"},longBreak:{name:"Duración del descanso largo",description:"Duración de descansos largos en minutos"},longBreakInterval:{name:"Intervalo de descanso largo",description:"Número de sesiones de trabajo antes de un descanso largo"},autoStartBreaks:{name:"Auto-iniciar descansos",description:"Iniciar automáticamente temporizadores de descanso después de sesiones de trabajo"},autoStartWork:{name:"Auto-iniciar trabajo",description:"Iniciar automáticamente sesiones de trabajo después de descansos"},notifications:{name:"Notificaciones de Pomodoro",description:"Mostrar notificaciones cuando terminen las sesiones de Pomodoro"},mobileSidebar:{name:"Barra lateral móvil",description:"Dónde abrir el temporizador Pomodoro en dispositivos móviles",tab:"Panel de notas",left:"Barra lateral izquierda",right:"Barra lateral derecha"},statusBar:{name:"Mostrar Pomodoro en la barra de estado",description:"Mostrar la cuenta regresiva activa de Pomodoro en la barra de estado de Obsidian"}},uiLanguage:{header:"Idioma de la interfaz",description:"Cambiar el idioma de los menús, avisos y vistas de TaskNotes.",dropdown:{name:"Idioma de interfaz",description:"Seleccionar el idioma usado para el texto de la interfaz de TaskNotes"}},pomodoroSound:{enabledName:"Sonido habilitado",enabledDesc:"Reproducir sonido cuando terminen las sesiones de Pomodoro",volumeName:"Volumen del sonido",volumeDesc:"Volumen para sonidos de Pomodoro (0-100)"},dataStorage:{name:"Almacenamiento de datos de Pomodoro",description:"Configura dónde se almacenan y gestionan los datos de sesión de Pomodoro.",dailyNotes:"Notas diarias",pluginData:"Datos del plugin",notices:{locationChanged:"Ubicación de almacenamiento de Pomodoro cambiada a {location}"}},notifications:{header:"Notificaciones",description:"Configura notificaciones de recordatorio de tareas y alertas.",enableName:"Habilitar notificaciones",enableDesc:"Habilitar notificaciones de recordatorio de tareas",typeName:"Tipo de notificación",typeDesc:"Tipo de notificaciones a mostrar",systemLabel:"Notificaciones del sistema",inAppLabel:"Notificaciones en la aplicación",soundEnabledName:"Sonido de notificación",soundEnabledDesc:"Reproducir un sonido cuando se activen los recordatorios de tareas",soundVolumeName:"Volumen del sonido",soundVolumeDesc:"Volumen de los sonidos de recordatorio de tareas (0-100)",soundPreviewName:"Previsualizar sonido de notificación",soundPreviewDesc:"Reproducir el sonido configurado de recordatorio de tareas",soundPreviewButton:"Previsualizar",testReminderName:"Enviar recordatorio de prueba",testReminderDesc:"Enviar un recordatorio de prueba usando el tipo de notificación y los ajustes de sonido actuales.",testReminderButton:"Enviar prueba"},overdue:{hideCompletedName:"Ocultar tareas completadas de vencidas",hideCompletedDesc:"Excluir tareas completadas de cálculos de tareas vencidas"},indexing:{disableName:"Deshabilitar indexación de notas",disableDesc:"Deshabilitar indexación automática de contenido de notas para mejor rendimiento"},suggestions:{debounceName:"Rebote de sugerencias",debounceDesc:"Retraso en milisegundos antes de mostrar sugerencias"},timeTracking:{autoStopName:"Auto-detener seguimiento de tiempo",autoStopDesc:"Detener automáticamente el seguimiento de tiempo cuando una tarea se marca como completa",stopNotificationName:"Notificación de detención de seguimiento de tiempo",stopNotificationDesc:"Mostrar notificación cuando el seguimiento de tiempo se detiene automáticamente"},recurring:{maintainOffsetName:"Mantener desplazamiento de fecha de vencimiento en tareas recurrentes",maintainOffsetDesc:"Mantener el desplazamiento entre fecha de vencimiento y fecha programada cuando se completan tareas recurrentes",resetCheckboxesName:"Restablecer casillas de verificación en recurrencia",resetCheckboxesDesc:"Restablecer todas las casillas de verificación markdown en el cuerpo de la tarea cuando una tarea recurrente se completa y reprograma"},timeblocking:{header:"Bloqueo de tiempo",description:"Configura la funcionalidad de bloqueo de tiempo para programación ligera en notas diarias. Arrastra en las vistas de calendario para crear eventos - selecciona 'Timeblock' del menú contextual.",enableName:"Habilitar bloqueo de tiempo",enableDesc:"Habilitar funcionalidad de bloque de tiempo para programación ligera en notas diarias. Cuando está habilitado, la opción 'Timeblock' aparece en el menú contextual de arrastrar del calendario.",showBlocksName:"Mostrar bloques de tiempo",showBlocksDesc:"Mostrar bloques de tiempo de notas diarias por defecto",defaultColorName:"Color predeterminado de bloque de tiempo",defaultColorDesc:"El color predeterminado utilizado al crear nuevos bloques de tiempo",usage:"Uso: Arrastra en el calendario para crear eventos. Selecciona 'Timeblock' del menú contextual (solo visible cuando el bloqueo de tiempo está habilitado). Arrastra para mover bloques de tiempo existentes. Ajusta los bordes para ajustar la duración."},performance:{header:"Rendimiento y comportamiento",description:"Configura opciones de rendimiento y comportamiento del plugin."},timeTrackingSection:{header:"Seguimiento de tiempo",description:"Configura comportamientos automáticos de seguimiento de tiempo."},recurringSection:{header:"Tareas recurrentes",description:"Configura comportamiento para gestión de tareas recurrentes."},debugLogging:{header:"Registro de depuración",description:"Configura la salida de registro de depuración para solucionar problemas.",enableName:"Habilitar registro de depuración",enableDesc:"Registra diagnósticos detallados de arrastrar y soltar y de vista en la consola de desarrollador. Útil para solución de problemas."}},defaults:{header:{basicDefaults:"Predeterminados básicos",dateDefaults:"Predeterminados de fecha",defaultReminders:"Recordatorios predeterminados",bodyTemplate:"Plantilla del cuerpo",instantTaskConversion:"Conversión instantánea de tareas"},description:{basicDefaults:"Establecer valores predeterminados para nuevas tareas para acelerar la creación de tareas.",dateDefaults:"Establecer fechas de vencimiento y programación predeterminadas para nuevas tareas.",defaultReminders:"Configurar recordatorios predeterminados que se añadirán a nuevas tareas.",bodyTemplate:"Configurar un archivo de plantilla para usar en el contenido de nuevas tareas.",instantTaskConversion:"Configurar comportamiento al convertir texto a tareas instantáneamente."},basicDefaults:{defaultStatus:{name:"Estado predeterminado",description:"Estado predeterminado para nuevas tareas"},defaultPriority:{name:"Prioridad predeterminada",description:"Prioridad predeterminada para nuevas tareas"},defaultContexts:{name:"Contextos predeterminados",description:"Lista separada por comas de contextos predeterminados (ej. @casa, @trabajo)",placeholder:"@casa, @trabajo"},defaultTags:{name:"Etiquetas predeterminadas",description:"Lista separada por comas de etiquetas predeterminadas (sin #)",placeholder:"importante, urgente"},defaultProjects:{name:"Proyectos predeterminados",description:"Enlaces de proyecto predeterminados para nuevas tareas",selectButton:"Seleccionar proyectos",selectTooltip:"Elegir notas de proyecto para vincular por defecto",removeTooltip:"Eliminar {name} de proyectos predeterminados"},useParentNoteForTaskCreation:{name:"Usar nota activa como proyecto para nuevas tareas",description:"Vincula automáticamente la nota activa como proyecto al abrir la creación de tareas desde la paleta de comandos o la cinta"},useParentNoteAsProject:{name:"Usar nota padre como proyecto para tareas en línea y conversión instantánea",description:"Vincula automáticamente la nota de origen como proyecto al usar la creación de tareas en línea o la conversión instantánea de tareas"},useParentHeaderAsProject:{name:"Usar encabezado padre como proyecto durante conversión instantánea",description:"Vincular automáticamente el encabezado más cercano sobre la línea convertida como proyecto al usar conversión instantánea de tareas"},defaultTimeEstimate:{name:"Estimación de tiempo predeterminada",description:"Estimación de tiempo predeterminada en minutos (0 = sin predeterminado)",placeholder:"60"},defaultRecurrence:{name:"Recurrencia predeterminada",description:"Patrón de recurrencia predeterminado para nuevas tareas"}},dateDefaults:{defaultDueDate:{name:"Fecha de vencimiento predeterminada",description:"Fecha de vencimiento predeterminada para nuevas tareas"},defaultScheduledDate:{name:"Fecha programada predeterminada",description:"Fecha programada predeterminada para nuevas tareas"}},reminders:{addReminder:{name:"Agregar recordatorio predeterminado",description:"Crear un nuevo recordatorio predeterminado que se añadirá a todas las nuevas tareas",buttonText:"Agregar recordatorio"},emptyState:"No hay recordatorios predeterminados configurados. Agrega un recordatorio para ser notificado automáticamente sobre nuevas tareas.",emptyStateButton:"Agregar recordatorio",reminderDescription:"Descripción del recordatorio",unnamedReminder:"Recordatorio sin nombre",deleteTooltip:"Eliminar recordatorio",fields:{description:"Descripción:",type:"Tipo:",offset:"Desplazamiento:",unit:"Unidad:",direction:"Dirección:",relatedTo:"Relacionado con:",date:"Fecha:",time:"Hora:"},types:{relative:"Relativo (antes/después de fechas de tarea)",absolute:"Absoluto (fecha/hora específica)"},units:{minutes:"minutos",hours:"horas",days:"días"},directions:{before:"antes",after:"después"},relatedTo:{due:"fecha de vencimiento",scheduled:"fecha programada"}},bodyTemplate:{useBodyTemplate:{name:"Usar plantilla del cuerpo",description:"Usar un archivo de plantilla para el contenido del cuerpo de la tarea"},bodyTemplateFile:{name:"Archivo de plantilla del cuerpo",description:"Ruta al archivo de plantilla para contenido del cuerpo de la tarea. Soporta variables de plantilla como {{title}}, {{date}}, {{time}}, {{priority}}, {{status}}, etc.",placeholder:"Plantillas/Plantilla de tarea.md",ariaLabel:"Ruta al archivo de plantilla del cuerpo"},useOccurrenceBodyTemplate:{name:"Usar plantilla de nota de ocurrencia",description:"Usar una plantilla alternativa separada para notas de ocurrencia materializadas cuando la tarea recurrente no tenga occurrence_template"},occurrenceBodyTemplateFile:{name:"Archivo de plantilla de nota de ocurrencia",description:"Ruta al archivo de plantilla para notas de ocurrencia materializadas. El campo occurrence_template de una tarea recurrente tiene prioridad sobre esta alternativa.",placeholder:"Plantillas/Plantilla de ocurrencia.md",ariaLabel:"Ruta al archivo de plantilla de nota de ocurrencia"},variablesHeader:"Variables de plantilla:",variables:{title:"{{title}} - Título de la tarea",details:"{{details}} - Detalles proporcionados por el usuario desde el modal",date:"{{date}} - Fecha actual (YYYY-MM-DD)",time:"{{time}} - Hora actual (HH:MM)",priority:"{{priority}} - Prioridad de la tarea",status:"{{status}} - Estado de la tarea",contexts:"{{contexts}} - Contextos de la tarea",tags:"{{tags}} - Etiquetas de la tarea",projects:"{{projects}} - Proyectos de la tarea"}},instantConversion:{useDefaultsOnInstantConvert:{name:"Usar predeterminados de tarea en conversión instantánea",description:"Aplicar configuraciones predeterminadas de tarea al convertir texto a tareas instantáneamente"}},options:{noDefault:"Sin predeterminado",none:"Ninguno",today:"Hoy",tomorrow:"Mañana",nextWeek:"Próxima semana",daily:"Diario",weekly:"Semanal",monthly:"Mensual",yearly:"Anual"}},general:{taskStorage:{header:"Almacenamiento de tareas",description:"Configurar dónde se almacenan las tareas y cómo se identifican.",defaultFolder:{name:"Carpeta predeterminada de tareas",description:"Ubicación predeterminada para nuevas tareas. Admite variables de plantilla de carpeta como {{currentNotePath}}, {{currentNoteTitle}} y {{projectFilePath}}, además de tokens de fecha estilo Daily Notes como YYYY/MM/DD."},moveArchived:{name:"Mover tareas archivadas a carpeta",description:"Mover automáticamente tareas archivadas a una carpeta de archivo"},archiveFolder:{name:"Carpeta de archivo",description:"Carpeta para mover tareas cuando se archiven. Soporta variables de plantilla como {{year}}, {{month}}, {{priority}}, etc."}},taskIdentification:{header:"Identificación de tareas",description:"Elegir cómo TaskNotes identifica notas como tareas.",identifyBy:{name:"Identificar tareas por",description:"Elegir si identificar tareas por etiqueta o por una propiedad de frontmatter",options:{tag:"Etiqueta",property:"Propiedad"}},taskTag:{name:"Etiqueta de tarea",description:"Etiqueta que identifica notas como tareas (sin #). Los filtros de vistas .base existentes conservan la etiqueta anterior al cambiarla; actualiza los archivos Base predeterminados o edita esos filtros."},hideIdentifyingTags:{name:"Ocultar etiquetas de identificación en tarjetas de tarea",description:"Cuando está habilitado, las etiquetas que coinciden con la etiqueta de identificación de tarea (incluidas las coincidencias jerárquicas como 'task/project') se ocultarán de las pantallas de tarjetas de tarea"},hideIdentifyingTagsMode:{name:"Alcance de etiquetas ocultas",description:"Elige si ocultar etiquetas de identificación también oculta etiquetas anidadas.",options:{all:"Etiqueta de tarea y anidadas",exactOnly:"Solo etiqueta exacta"}},taskProperty:{name:"Nombre de propiedad de tarea",description:'El nombre de propiedad de frontmatter (ej. "categoría")'},taskPropertyValue:{name:"Valor de propiedad de tarea",description:'El valor que identifica una nota como tarea (ej. "tarea")'}},folderManagement:{header:"Gestión de carpetas",excludedFolders:{name:"Carpetas excluidas",description:"Lista separada por comas de carpetas a excluir de la indexación de tareas y sugerencias de proyectos"}},frontmatter:{header:"Frontmatter",description:"Configure cómo se formatean los enlaces en las propiedades frontmatter.",useMarkdownLinks:{name:"Usar enlaces markdown en frontmatter",description:`Generar enlaces markdown ([texto](ruta)) en lugar de wikilinks ([[enlace]]) en las propiedades frontmatter.
⚠️ Requiere el plugin 'obsidian-frontmatter-markdown-links' para funcionar correctamente.`}},taskInteraction:{header:"Interacción de tareas",description:"Configurar cómo se comporta hacer clic en las tareas.",singleClick:{name:"Acción de clic simple",description:"Acción realizada al hacer clic simple en una tarjeta de tarea"},doubleClick:{name:"Acción de doble clic",description:"Acción realizada al hacer doble clic en una tarjeta de tarea"},actions:{edit:"Editar tarea",openNote:"Abrir nota",none:"Sin acción"}},releaseNotes:{header:"Notas de la versión",description:"Versión actual: {version}",showOnUpdate:{name:"Mostrar notas de la versión después de actualizar",description:"Abrir automáticamente las notas de la versión cuando TaskNotes se actualiza a una nueva versión"},checkForUpdates:{name:"Buscar nuevas versiones al iniciar",description:"Consulta GitHub una vez al iniciar TaskNotes y muestra un aviso cuando hay una versión compatible más reciente disponible"},viewButton:{name:"Ver notas de la versión",description:"Vea las novedades en la última versión de TaskNotes",buttonText:"Ver notas de la versión"}}},taskProperties:{sections:{coreProperties:"Propiedades principales",corePropertiesDesc:"Estado y prioridad son las propiedades principales que definen el estado e importancia de una tarea.",dateProperties:"Propiedades de fecha",datePropertiesDesc:"Configura cuándo las tareas vencen y están programadas.",organizationProperties:"Propiedades de organización",organizationPropertiesDesc:"Organiza tareas con contextos, proyectos y etiquetas.",taskDetails:"Detalles de tarea",taskDetailsDesc:"Detalles adicionales como estimaciones de tiempo, recurrencia y recordatorios.",metadataProperties:"Propiedades de metadatos",metadataPropertiesDesc:"Propiedades gestionadas por el sistema para rastrear el historial de tareas.",featureProperties:"Propiedades de funciones",featurePropertiesDesc:"Propiedades utilizadas por funciones específicas de TaskNotes como el temporizador Pomodoro y la sincronización de calendario."},propertyCard:{propertyKey:"Clave de propiedad:",default:"Predeterminado:",nlpTrigger:"Activador NLP:",triggerChar:"Carácter activador:",triggerEmpty:"El activador no puede estar vacío",triggerTooLong:"El activador es demasiado largo (máx. 10 caracteres)"},properties:{status:{name:"Estado",description:"Rastrea el estado actual de una tarea (ej. pendiente, en-progreso, hecho). El estado determina si una tarea aparece como completada y puede activar el archivado automático."},priority:{name:"Prioridad",description:"Indica la importancia de la tarea. Se usa para ordenar y filtrar. Los valores se ordenan alfabéticamente en vistas Bases, así que usa prefijos como 1-, 2- para controlar el orden."},due:{name:"Fecha de vencimiento",description:"La fecha límite para completar una tarea. Las tareas pasadas de su fecha de vencimiento aparecen como atrasadas. Se almacena como fecha en frontmatter."},scheduled:{name:"Fecha programada",description:"Cuándo planeas trabajar en una tarea. A diferencia de la fecha de vencimiento, esto representa tu hora de inicio prevista. Las tareas aparecen en el calendario en su fecha/hora programada."},contexts:{name:"Contextos",description:"Lugares o condiciones donde se puede hacer una tarea (ej. @casa, @oficina, @teléfono). Útil para filtrar tareas según tu situación actual. Se almacena como lista."},projects:{name:"Proyectos",description:"Enlaces a notas de proyecto a las que pertenece esta tarea. Se almacena como wikilinks (ej. [[Nombre del proyecto]]). Las tareas pueden pertenecer a múltiples proyectos."},tags:{name:"Etiquetas",description:"Etiquetas nativas de Obsidian para categorizar tareas. Se almacenan en la propiedad tags del frontmatter y funcionan con las características de etiquetas de Obsidian."},timeEstimate:{name:"Estimación de tiempo",description:"Minutos estimados para completar la tarea. Se usa para planificación de tiempo y carga de trabajo. Se muestra en tarjetas de tareas y eventos de calendario."},recurrence:{name:"Recurrencia",description:"Patrón para tareas repetitivas (diario, semanal, mensual, anual o RRULE personalizada). Cuando se completa una tarea recurrente, su fecha programada se actualiza automáticamente a la siguiente ocurrencia."},recurrenceAnchor:{name:"Ancla de recurrencia",description:"Controla cómo se calcula la siguiente ocurrencia: 'scheduled' usa la fecha programada, 'completion' usa la fecha de finalización real."},reminders:{name:"Recordatorios",description:"Notificaciones activadas antes de fechas de vencimiento o programadas. Se almacena como lista de objetos de recordatorio con tiempo y descripción opcional."},title:{name:"Título",description:"El nombre de la tarea. Puede almacenarse en frontmatter o en el nombre del archivo (cuando 'Almacenar título en nombre de archivo' está habilitado)."},dateCreated:{name:"Fecha de creación",description:"Marca de tiempo de cuando se creó la tarea. Se establece automáticamente y se usa para ordenar por orden de creación."},dateModified:{name:"Fecha de modificación",description:"Marca de tiempo del último cambio en la tarea. Se actualiza automáticamente cuando cambia cualquier propiedad de la tarea."},completedDate:{name:"Fecha de completado",description:"Marca de tiempo de cuando la tarea fue marcada como completa. Se establece automáticamente cuando el estado cambia a un estado completado."},archiveTag:{name:"Etiqueta de archivo",description:"Etiqueta añadida a las tareas cuando se archivan. Se usa para identificar tareas archivadas y puede activar el movimiento de archivos a la carpeta de archivo."},timeEntries:{name:"Entradas de tiempo",description:"Registros de sesiones de seguimiento de tiempo para esta tarea. Cada entrada almacena marcas de tiempo de inicio y fin. Se usa para calcular el tiempo total invertido."},completeInstances:{name:"Instancias completadas",description:"Historial de completado para tareas recurrentes. Almacena fechas cuando cada instancia fue completada para prevenir completados duplicados."},skippedInstances:{name:"Instancias omitidas",description:"Ocurrencias omitidas para tareas recurrentes. Almacena fechas de instancias que fueron omitidas en lugar de completadas."},blockedBy:{name:"Bloqueada por",description:"Enlaces a tareas que deben completarse antes de esta. Se almacena como wikilinks. Las tareas bloqueadas muestran un indicador visual."},sortOrder:{name:"Orden manual",description:"Propiedad de frontmatter utilizada para el orden manual por arrastrar y soltar. La vista debe estar ordenada por esta propiedad para que funcione el reordenamiento de arrastrar y soltar."},pomodoros:{name:"Pomodoros",description:"Conteo de sesiones Pomodoro completadas. Cuando el almacenamiento de datos está configurado en 'Notas diarias', esto se escribe en notas diarias en lugar de archivos de tarea."},icsEventId:{name:"ID de evento ICS",description:"Identificador único que enlaza una nota con un evento de calendario ICS. Se añade automáticamente al crear notas desde eventos de calendario."},icsEventTag:{name:"Etiqueta de evento ICS",description:"Etiqueta que identifica notas creadas desde eventos de calendario ICS. Se usa para distinguir notas generadas por calendario de tareas regulares."}},statusCard:{valuesHeader:"Valores de estado"},priorityCard:{valuesHeader:"Valores de prioridad"},projectsCard:{defaultProjects:"Proyectos predeterminados:",useParentNoteForTaskCreation:"Usar nota activa para nuevas tareas:",useParentNoteForInlineTasks:"Usar nota padre para tareas en línea/conversión instantánea:",useParentHeader:"Usar encabezado padre como proyecto:",inheritParentTaskProperties:"Heredar propiedades de la tarea padre para subtareas:",noDefaultProjects:"No hay proyectos predeterminados seleccionados",autosuggestFilters:"Filtros de autosugerencia",customizeDisplay:"Personalizar visualización",filtersOn:"Filtros activos"},titleCard:{storeTitleInFilename:"Almacenar título en nombre de archivo:",storedInFilename:"Almacenado en nombre de archivo",filenameUpdatesWithTitle:"El nombre del archivo se actualizará automáticamente cuando cambie el título de la tarea.",filenameFormat:"Formato de nombre de archivo:",customTemplate:"Plantilla personalizada:",legacySyntaxWarning:"La sintaxis de llaves simples como {title} está obsoleta. Por favor, use la sintaxis de llaves dobles {{title}} para consistencia con las plantillas de cuerpo.",occurrenceFilenameTemplate:"Plantilla de nombre de archivo para ocurrencias",occurrenceFilenameTemplateHelp:"Plantilla de nombre de archivo para ocurrencias materializadas de tareas recurrentes. Déjala vacía para conservar el nombre existente (título de la tarea principal más un sufijo numérico). Elige explícitamente la granularidad con {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}} o {{occurrenceMonthName}}. También funcionan todas las variables normales de nombres de archivo. Una tarea principal puede sobrescribir esta plantilla mediante la propiedad de frontmatter configurada abajo.",occurrenceFilenameProperty:"Propiedad para sobrescribir la plantilla de ocurrencias",occurrenceFilenamePropertyHelp:"Nombre de la propiedad de frontmatter de una tarea recurrente principal que sobrescribe la plantilla de nombre de archivo de sus ocurrencias."},tagsCard:{nativeObsidianTags:"Usa etiquetas nativas de Obsidian"},remindersCard:{defaultReminders:"Recordatorios predeterminados"},taskStatuses:{header:"Estados de tareas",description:"Personalizar las opciones de estado disponibles para tus tareas. Estos estados controlan el ciclo de vida de la tarea y determinan cuándo las tareas se consideran completas.",howTheyWork:{title:"Cómo funcionan los estados:",value:'Valor: El identificador interno almacenado en tus archivos de tarea (ej. "en-progreso")',label:'Etiqueta: El nombre mostrado en la interfaz (ej. "En progreso")',color:"Color: Color indicador visual para el punto de estado y distintivos",icon:'Icono: Nombre de icono Lucide opcional para mostrar en lugar del punto de color (ej. "check", "circle", "clock"). Explora iconos en lucide.dev',completed:"Completado: Cuando se marca, las tareas con este estado se consideran terminadas y pueden filtrarse de manera diferente",autoArchive:"Auto-archivar: Cuando está habilitado, las tareas se archivarán automáticamente después del retraso especificado (1-1440 minutos)",orderNote:"El orden de abajo determina la secuencia al alternar entre estados haciendo clic en distintivos de estado de tarea."},addNew:{name:"Agregar nuevo estado",description:"Crear una nueva opción de estado para tus tareas",buttonText:"Agregar estado"},validationNote:'Nota: Debes tener al menos 2 estados, y al menos un estado debe estar marcado como "Completado".',emptyState:"No hay estados personalizados configurados. Agrega un estado para comenzar.",emptyStateButton:"Agregar estado",fields:{value:"Valor:",label:"Etiqueta:",color:"Color:",icon:"Icono:",completed:"Completado:",excludeFromCycle:"Omitir en el ciclo:",nextStatus:"Siguiente estado:",autoArchive:"Auto-archivar:",delayMinutes:"Retraso (minutos):"},placeholders:{value:"en-progreso",label:"En progreso",icon:"check, circle, clock",nextStatusDefault:"Usar orden de estados"},badges:{completed:"Completado"},deleteConfirm:'¿Estás seguro de que quieres eliminar el estado "{label}"?'},taskPriorities:{header:"Prioridades de tareas",description:"Personaliza los niveles de prioridad disponibles para tus tareas. En v4.0+, las prioridades se ordenan alfabéticamente por su valor en las vistas de Bases.",howTheyWork:{title:"Cómo funcionan las prioridades:",value:'Valor: El identificador interno almacenado en tus archivos de tarea. Usa prefijos como "1-urgente", "2-alta" para controlar el orden de clasificación en las vistas de Bases.',label:'Etiqueta de visualización: El nombre mostrado en la interfaz (ej. "Alta prioridad")',color:"Color: Color indicador visual para el punto de prioridad y distintivos",icon:"Icono: Icono Lucide opcional para mostrar en las tarjetas de tareas en lugar del punto de prioridad",weight:"Peso: Valor numérico para clasificación (pesos más altos aparecen primero en listas)",weightNote:"Las tareas se clasifican automáticamente por peso de prioridad en orden descendente (peso más alto primero). Los pesos pueden ser cualquier número positivo."},addNew:{name:"Agregar nueva prioridad",description:"Crear un nuevo nivel de prioridad para tus tareas",buttonText:"Agregar prioridad"},validationNote:"Nota: Debes tener al menos 1 prioridad. Las prioridades se ordenan alfabéticamente por valor en las vistas de Bases.",emptyState:"No hay prioridades personalizadas configuradas. Agrega una prioridad para comenzar.",emptyStateButton:"Agregar prioridad",fields:{value:"Valor:",label:"Etiqueta:",color:"Color:",icon:"Icono:",weight:"Peso:"},placeholders:{value:"alta",label:"Alta prioridad",icon:"alert-circle"},weightLabel:"Peso: {weight}",deleteConfirm:"Debes tener al menos una prioridad",deleteTooltip:"Eliminar prioridad"},fieldMapping:{header:"Mapeo de campos",warning:"⚠️ Advertencia: TaskNotes LEERÁ Y ESCRIBIRÁ usando estos nombres de propiedad. Cambiar estos después de crear tareas puede causar inconsistencias.",description:"Configurar qué propiedades de frontmatter debe usar TaskNotes para cada campo.",resetButton:{name:"Restablecer mapeos de campos",description:"Restablecer todos los mapeos de campos a valores predeterminados",buttonText:"Restablecer a predeterminados"},notices:{resetSuccess:"Mapeos de campos restablecidos a predeterminados",resetFailure:"Error al restablecer mapeos de campos",updateFailure:"Error al actualizar mapeo de campo para {label}. Por favor intenta de nuevo."},table:{fieldHeader:"Campo de TaskNotes",propertyHeader:"Tu nombre de propiedad"},fields:{title:"Título",status:"Estado",priority:"Prioridad",due:"Fecha de vencimiento",scheduled:"Fecha programada",contexts:"Contextos",projects:"Proyectos",timeEstimate:"Estimación de tiempo",recurrence:"Recurrencia",dateCreated:"Fecha de creación",completedDate:"Fecha de finalización",dateModified:"Fecha de modificación",archiveTag:"Etiqueta de archivo",timeEntries:"Entradas de tiempo",completeInstances:"Instancias completas",blockedBy:"Bloqueado por",sortOrder:"Orden manual",pomodoros:"Pomodoros",icsEventId:"ID de evento ICS",icsEventTag:"Etiqueta de evento ICS",reminders:"Recordatorios"}},customUserFields:{header:"Campos personalizados de usuario",description:"Definir propiedades de frontmatter personalizadas para aparecer como opciones de filtro con reconocimiento de tipo en todas las vistas. Cada fila: Nombre de visualización, Nombre de propiedad, Tipo.",addNew:{name:"Agregar nuevo campo de usuario",description:"Crear un nuevo campo personalizado que aparecerá en filtros y vistas",buttonText:"Agregar campo de usuario"},emptyState:"No hay campos personalizados de usuario configurados. Agrega un campo para crear propiedades personalizadas para tus tareas.",emptyStateButton:"Agregar campo de usuario",fields:{displayName:"Nombre de visualización:",propertyKey:"Clave de propiedad:",type:"Tipo:",defaultValue:"Valor predeterminado:"},placeholders:{displayName:"Nombre de visualización",propertyKey:"nombre-propiedad",defaultValue:"Valor predeterminado",defaultValueList:"Valores predeterminados (separados por coma)"},types:{text:"Texto",number:"Número",boolean:"Booleano",date:"Fecha",list:"Lista"},defaultNames:{unnamedField:"Campo sin nombre",noKey:"sin-clave"},deleteTooltip:"Eliminar campo",autosuggestFilters:{header:"Filtros de auto-sugerencia (Avanzado)",description:"Filtrar qué archivos aparecen en las sugerencias de autocompletar para este campo"}}},appearance:{taskCards:{header:"Tarjetas de tareas",description:"Configurar cómo se muestran las tarjetas de tareas en todas las vistas.",defaultVisibleProperties:{name:"Propiedades visibles predeterminadas",description:"Elegir qué propiedades aparecen en las tarjetas de tareas por defecto."},completionSubmenu:{name:"Agrupar las acciones de completar y omitir en un submenú",description:"Coloca las acciones de completar y omitir en un submenú del menú contextual de la tarea. Desactiva esta opción para mostrarlas directamente en el menú."},propertyGroups:{coreProperties:"PROPIEDADES PRINCIPALES",organization:"ORGANIZACIÓN",customProperties:"PROPIEDADES PERSONALIZADAS"},properties:{status:"Punto de estado",priority:"Punto de prioridad",due:"Fecha de vencimiento",scheduled:"Fecha programada",timeEstimate:"Estimación de tiempo",totalTrackedTime:"Tiempo total rastreado",checklistProgress:"Progreso de la lista de verificación",recurrence:"Recurrencia",completedDate:"Fecha de finalización",createdDate:"Fecha de creación",modifiedDate:"Fecha de modificación",projects:"Proyectos",contexts:"Contextos",tags:"Etiquetas",blocked:"Bloqueada",blocking:"Bloqueando"}},taskFilenames:{header:"Nombres de archivos de tareas",description:"Configurar cómo se nombran los archivos de tareas cuando se crean.",storeTitleInFilename:{name:"Almacenar título en nombre de archivo",description:"Usar el título de la tarea como nombre de archivo. El nombre de archivo se actualizará cuando se cambie el título de la tarea (Recomendado)."},filenameFormat:{name:"Formato de nombre de archivo",description:"Cómo deben generarse los nombres de archivos de tareas",options:{title:"Título de tarea (Sin actualización)",zettel:"Formato Zettelkasten (AAMMDD + segundos base36 desde medianoche)",timestamp:"Marca de tiempo completa (YYYY-MM-DD-HHMMSS)",custom:"Plantilla personalizada",uuid:"UUID v4"}},customTemplate:{name:"Plantilla de nombre de archivo personalizada",description:"Plantilla para nombres de archivo personalizados. Variables disponibles: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"Nota: {{dueDate}} y {{scheduledDate}} están en formato YYYY-MM-DD y estarán vacíos si no están configurados."}},displayFormatting:{header:"Formato de visualización",description:"Configurar cómo se muestran fechas, horas y otros datos en todo el plugin.",timeFormat:{name:"Formato de hora",description:"Mostrar hora en formato de 12 horas o 24 horas en todo el plugin",options:{twelveHour:"12 horas (AM/PM)",twentyFourHour:"24 horas"}}},calendarView:{header:"Vista de calendario",description:"Personalizar la apariencia y comportamiento de la vista de calendario.",defaultView:{name:"Vista predeterminada",description:"La vista de calendario mostrada al abrir la pestaña de calendario",options:{monthGrid:"Cuadrícula mensual",weekTimeline:"Línea de tiempo semanal",dayTimeline:"Línea de tiempo diaria",yearView:"Vista anual",customMultiDay:"Multi-día personalizado"}},customDayCount:{name:"Conteo de días de vista personalizada",description:"Número de días a mostrar en vista multi-día personalizada",placeholder:"3"},firstDayOfWeek:{name:"Primer día de la semana",description:"Qué día debe ser la primera columna en vistas semanales"},showWeekends:{name:"Mostrar fines de semana",description:"Mostrar fines de semana en vistas de calendario"},showWeekNumbers:{name:"Mostrar números de semana",description:"Mostrar números de semana en vistas de calendario"},showTodayHighlight:{name:"Mostrar resaltado de hoy",description:"Resaltar el día actual en vistas de calendario"},showCurrentTimeIndicator:{name:"Mostrar indicador de hora actual",description:"Mostrar una línea que muestra la hora actual en vistas de línea de tiempo"},selectionMirror:{name:"Espejo de selección",description:"Mostrar una vista previa visual mientras se arrastra para seleccionar rangos de tiempo"},calendarLocale:{name:"Configuración regional del calendario",description:'Configuración regional del calendario para formato de fecha y sistema de calendario (ej. "en", "fa" para Farsi/Persa, "de" para Alemán). Dejar vacío para auto-detectar desde el navegador.',placeholder:"Auto-detectar",invalidLocale:"Configuración regional inválida. Por favor, introduzca un código de idioma válido (ej. 'es', 'en', 'fr-FR')."}},defaultEventVisibility:{header:"Visibilidad predeterminada de eventos",description:"Configurar qué tipos de eventos son visibles por defecto al abrir el calendario. Los usuarios aún pueden activar/desactivar estos en la vista de calendario.",showScheduledTasks:{name:"Mostrar tareas programadas",description:"Mostrar tareas con fechas programadas por defecto"},showDueDates:{name:"Mostrar fechas de vencimiento",description:"Mostrar fechas de vencimiento de tareas por defecto"},showDueWhenScheduled:{name:"Mostrar fechas de vencimiento cuando están programadas",description:"Mostrar fechas de vencimiento incluso para tareas que ya tienen fechas programadas"},showTimeEntries:{name:"Mostrar entradas de tiempo",description:"Mostrar entradas de seguimiento de tiempo completadas por defecto"},showRecurringTasks:{name:"Mostrar tareas recurrentes",description:"Mostrar instancias de tareas recurrentes por defecto"},showICSEvents:{name:"Mostrar eventos ICS",description:"Mostrar eventos de suscripciones ICS por defecto"}},timeSettings:{header:"Configuraciones de tiempo",description:"Configurar ajustes de visualización relacionados con el tiempo para vistas de línea de tiempo.",timeSlotDuration:{name:"Duración de intervalo de tiempo",description:"Duración de cada intervalo de tiempo en vistas de línea de tiempo",options:{fifteenMinutes:"15 minutos",thirtyMinutes:"30 minutos",sixtyMinutes:"60 minutos"}},startTime:{name:"Hora de inicio",description:"Hora más temprana mostrada en vistas de línea de tiempo (formato HH:MM)",placeholder:"06:00"},endTime:{name:"Hora de fin",description:"Hora más tardía mostrada en vistas de línea de tiempo (formato HH:MM). Usa valores superiores a 24:00 para mostrar horas tempranas del día siguiente, como 26:00 para las 2 a. m.",placeholder:"26:00"},initialScrollTime:{name:"Hora de desplazamiento inicial",description:"Hora a la que desplazarse al abrir vistas de línea de tiempo (formato HH:MM)",placeholder:"09:00"},eventMinHeight:{name:"Altura mínima del evento",description:"Altura mínima para eventos en vistas de línea de tiempo (píxeles)",placeholder:"15"}},uiElements:{header:"Elementos de interfaz",description:"Configurar la visualización de varios elementos de interfaz.",showTrackedTasksInStatusBar:{name:"Mostrar tareas rastreadas en barra de estado",description:"Mostrar tareas actualmente rastreadas en la barra de estado de Obsidian"},showProjectSubtasksWidget:{name:"Mostrar widget de subtareas de proyecto",description:"Mostrar un widget que muestra subtareas para la nota de proyecto actual"},projectSubtasksPosition:{name:"Posición de subtareas de proyecto",description:"Dónde posicionar el widget de subtareas de proyecto",options:{top:"Parte superior de la nota",bottom:"Parte inferior de la nota"}},showRelationshipsWidget:{name:"Mostrar widget de relaciones",description:"Mostrar un widget que muestra todas las relaciones de la nota actual (subtareas, proyectos, dependencias)"},relationshipsPosition:{name:"Posición de relaciones",description:"Dónde posicionar el widget de relaciones",options:{top:"Arriba de la nota",bottom:"Abajo de la nota"}},showTaskCardInNote:{name:"Mostrar tarjeta de tarea en nota",description:"Mostrar un widget de tarjeta de tarea en la parte superior de las notas de tareas que muestre los detalles y acciones de la tarea"},showCompletedTaskStrikethrough:{name:"Tachar títulos de tareas completadas",description:"Dibuja una línea sobre los títulos de tarjetas de tareas completadas. Desactívalo para que las tareas completadas sean más fáciles de leer"},showExpandableSubtasks:{name:"Mostrar subtareas expandibles",description:"Permitir expandir/contraer secciones de subtareas en tarjetas de tareas"},expandSubtasksByDefault:{name:"Expandir subtareas por defecto",description:"Mostrar las subtareas de proyecto expandidas cuando se renderizan las tarjetas de tareas"},subtaskChevronPosition:{name:"Posición de chevron de subtarea",description:"Posición de chevrons de expandir/contraer en tarjetas de tareas",options:{left:"Lado izquierdo",right:"Lado derecho"}},viewsButtonAlignment:{name:"Alineación del botón de vistas",description:"Alineación del botón de vistas/filtros en la interfaz de tareas",options:{left:"Lado izquierdo",right:"Lado derecho"}}},projectAutosuggest:{header:"Autosugerencia de proyectos",description:"Personalizar cómo se muestran las sugerencias de proyectos durante la creación de tareas.",requiredTags:{name:"Etiquetas requeridas",description:"Mostrar solo notas con cualquiera de estas etiquetas (separadas por comas). Dejar vacío para mostrar todas las notas.",placeholder:"proyecto, activo, importante"},includeFolders:{name:"Incluir carpetas",description:"Mostrar solo notas en estas carpetas (rutas separadas por comas). Dejar vacío para mostrar todas las carpetas.",placeholder:"Proyectos/, Trabajo/Activo, Personal"},requiredPropertyKey:{name:"Clave de propiedad requerida",description:"Mostrar solo notas donde esta propiedad de frontmatter coincida con el valor de abajo. Dejar vacío para ignorar.",placeholder:"tipo"},requiredPropertyValue:{name:"Valor de propiedad requerido",description:"Solo las notas donde la propiedad igual a este valor son sugeridas. Dejar vacío para requerir que la propiedad exista.",placeholder:"proyecto"},customizeDisplay:{name:"Personalizar visualización de sugerencias",description:"Mostrar opciones avanzadas para configurar cómo aparecen las sugerencias de proyectos y qué información muestran."},enableFuzzyMatching:{name:"Habilitar coincidencia difusa",description:"Permitir errores tipográficos y coincidencias parciales en búsqueda de proyectos. Puede ser más lento en bóvedas grandes."},displayRowsHelp:"Configurar hasta 3 líneas de información para mostrar para cada sugerencia de proyecto.",displayRows:{row1:{name:"Fila 1",description:"Formato: {propiedad|banderas}. Propiedades: title, aliases, file.path, file.parent. Banderas: n(Etiqueta) muestra etiqueta, s hace búsqueda. Ejemplo: {title|n(Título)|s}",placeholder:"{title|n(Título)}"},row2:{name:"Fila 2 (opcional)",description:"Patrones comunes: {aliases|n(Alias)}, {file.parent|n(Carpeta)}, literal:Texto personalizado",placeholder:"{aliases|n(Alias)}"},row3:{name:"Fila 3 (opcional)",description:"Información adicional como {file.path|n(Ruta)} o campos de frontmatter personalizados",placeholder:"{file.path|n(Ruta)}"}},quickReference:{header:"Referencia rápida",properties:"Propiedades disponibles: title, aliases, file.path, file.parent, o cualquier campo de frontmatter",labels:'Agregar etiquetas: {title|n(Título)} → "Título: Mi proyecto"',searchable:"Hacer búsqueda: {description|s} incluye descripción en búsqueda +",staticText:"Texto estático: literal:Mi etiqueta personalizada",alwaysSearchable:"Nombre de archivo, título y alias siempre son búsqueda por defecto."}},dataStorage:{name:"Ubicación de almacenamiento",description:"Dónde almacenar el historial de sesiones de Pomodoro",pluginData:"Datos del plugin (recomendado)",dailyNotes:"Notas diarias",notices:{locationChanged:"Ubicación de almacenamiento de Pomodoro cambiada a {location}"}},notifications:{description:"Configurar notificaciones de recordatorio de tareas y alertas."},performance:{description:"Configurar opciones de rendimiento y comportamiento del plugin."},timeTrackingSection:{description:"Configurar comportamientos de seguimiento de tiempo automático."},recurringSection:{description:"Configurar comportamiento para gestión de tareas recurrentes."}},integrations:{mobileCalendar:{disable:{name:"Desactivar integraciones de calendario en móvil",description:"No cargar calendarios de Google, Microsoft e ICS en Obsidian Mobile. Las integraciones de calendario de escritorio no cambian."},status:{name:"Las integraciones de calendario están desactivadas en este dispositivo móvil",description:"Desactiva este ajuste y recarga Obsidian Mobile para volver a cargar calendarios."}},basesIntegration:{header:"Integración con Bases",description:"Configurar integración con el plugin Obsidian Bases. Esta es una característica experimental, y actualmente depende de APIs no documentadas de Obsidian. El comportamiento puede cambiar o fallar.",enable:{name:"Habilitar integración con Bases",description:"Habilitar vistas de TaskNotes para usar dentro del plugin Obsidian Bases. El plugin Bases debe estar habilitado para que esto funcione."},viewCommands:{header:"Vistas y archivos base",description:"TaskNotes utiliza archivos de Obsidian Bases (.base) para sus vistas. Estos archivos se generan automáticamente al inicio si no existen, configurados con tus ajustes actuales (identificación de tareas, mapeo de campos, estados, etc.).",descriptionRegen:'Los archivos Base no se actualizan automáticamente cuando cambias la configuración. Para aplicar nuevos ajustes, usa "Actualizar archivos" abajo, elimina los archivos .base existentes y reinicia Obsidian, o edítalos manualmente.',docsLink:"Ver documentación para fórmulas disponibles y opciones de personalización",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"Abrir vista de mini calendario",kanban:"Abrir vista kanban",tasks:"Abrir vista de tareas",advancedCalendar:"Abrir vista de calendario avanzado",agenda:"Abrir vista de agenda",relationships:"Widget de relaciones",pomodoroStats:"Base de estadísticas de Pomodoro"},fileLabel:"Archivo: {path}",resetButton:"Restablecer",resetTooltip:"Restablecer a ruta predeterminada",pomodoroDailyNotesHint:"La Base de estadísticas de Pomodoro generada lee el historial de Pomodoro desde notas diarias. Si tu historial aún está en los datos del plugin, mígralo en ajustes antes de usar ese archivo Base."},autoCreateDefaultFiles:{name:"Crear archivos predeterminados automáticamente",description:"Crear automáticamente los archivos Base predeterminados que falten al iniciar. Desactiva para evitar que se recreen los archivos de ejemplo eliminados."},createDefaultFiles:{name:"Crear archivos predeterminados",description:"Crea los archivos .base predeterminados en el directorio TaskNotes/Views/. Los archivos existentes no se sobrescribirán.",buttonText:"Crear archivos"},exportV3Views:{name:"Exportar vistas guardadas V3 a Bases",description:"Convierte todas tus vistas guardadas de TaskNotes v3 en un solo archivo .base con múltiples vistas. Esto ayuda a migrar tus configuraciones de filtros v3 al nuevo sistema de Bases.",buttonText:"Exportar vistas V3",noViews:"No hay vistas guardadas para exportar",fileExists:"El archivo ya existe",confirmOverwrite:'Ya existe un archivo llamado "{fileName}". ¿Sobrescribirlo?',success:"Exportadas {count} vistas guardadas a {filePath}",error:"Error al exportar vistas: {message}"},notices:{enabled:"Integración con Bases habilitada. Por favor reinicia Obsidian para completar la configuración.",disabled:"Integración con Bases deshabilitada. Por favor reinicia Obsidian para completar la eliminación."},updateDefaultFiles:{name:"Actualizar archivos predeterminados",description:"Sobrescribe los archivos .base predeterminados configurados con plantillas generadas desde tus ajustes actuales de TaskNotes.",buttonText:"Actualizar archivos",confirmTitle:"Actualizar archivos Base predeterminados",confirmMessage:"Esto sobrescribirá los archivos .base predeterminados configurados con plantillas recién generadas. Cualquier edición manual en esos archivos será reemplazada.",confirmText:"Actualizar archivos"}},calendarSubscriptions:{header:"Suscripciones de calendario",description:"Suscribirse a calendarios externos vía URLs ICS/iCal para ver eventos junto a tus tareas.",defaultNoteTemplate:{name:"Plantilla de nota predeterminada",description:"Ruta al archivo de plantilla para notas creadas desde eventos ICS",placeholder:"Plantillas/Plantilla de evento.md"},defaultNoteFolder:{name:"Carpeta de nota predeterminada",description:"Carpeta para notas creadas desde eventos ICS",placeholder:"Calendario/Eventos"},filenameFormat:{name:"Formato de nombre de archivo de nota ICS",description:"Cómo se generan los nombres de archivo para notas creadas desde eventos ICS",options:{title:"Título del evento",zettel:"Formato Zettelkasten",timestamp:"Marca de tiempo",custom:"Plantilla personalizada"}},customTemplate:{name:"Plantilla de nombre de archivo ICS personalizada",description:"Plantilla para nombres de archivo de eventos ICS personalizados",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"Usar hora de fin del evento ICS como fecha de vencimiento",description:"Cuando está habilitado, las tareas creadas a partir de eventos de calendario tendrán su fecha de vencimiento establecida en la hora de fin del evento. Para eventos de todo el día, la fecha de vencimiento será la fecha del evento. Para eventos con hora, la fecha de vencimiento incluirá la hora de fin."},recurringEventRelatedNotesMode:{name:"Notas relacionadas de eventos recurrentes",description:"Elige si las notas vinculadas a una repetición de un evento de calendario externo aparecen en toda la serie cargada o solo en la instancia seleccionada.",options:{series:"Toda la serie",instance:"Solo la instancia seleccionada"}}},subscriptionsList:{header:"Lista de suscripciones de calendario",addSubscription:{name:"Agregar suscripción de calendario",description:"Agregar una nueva suscripción de calendario desde URL ICS/iCal o archivo local",buttonText:"Agregar suscripción"},refreshAll:{name:"Actualizar todas las suscripciones",description:"Actualizar manualmente todas las suscripciones de calendario habilitadas",buttonText:"Actualizar todas"},newCalendarName:"Nuevo calendario",emptyState:"No hay suscripciones de calendario configuradas. Agrega una suscripción para sincronizar calendarios externos.",notices:{addSuccess:"Nueva suscripción de calendario agregada - por favor configura los detalles",addFailure:"Error al agregar suscripción",serviceUnavailable:"Servicio de suscripción ICS no disponible",refreshSuccess:"Todas las suscripciones de calendario actualizadas exitosamente",refreshFailure:"Error al actualizar algunas suscripciones de calendario",updateFailure:"Error al actualizar suscripción",deleteSuccess:'Suscripción "{name}" eliminada',deleteFailure:"Error al eliminar suscripción",enableFirst:"Habilita la suscripción primero",refreshSubscriptionSuccess:'"{name}" actualizado',refreshSubscriptionFailure:"Error al actualizar suscripción"},labels:{enabled:"Habilitado:",name:"Nombre:",type:"Tipo:",url:"URL:",filePath:"Ruta de archivo:",color:"Color:",refreshMinutes:"Actualizar (min):"},typeOptions:{remote:"URL remota",local:"Archivo local"},placeholders:{calendarName:"Nombre del calendario",url:"URL ICS/iCal",filePath:"Ruta de archivo local (ej. Calendario.ics)",localFile:"Calendario.ics"},statusLabels:{enabled:"Habilitado",disabled:"Deshabilitado",remote:"Remoto",localFile:"Archivo local",remoteCalendar:"Calendario remoto",localFileCalendar:"Archivo local",synced:"Sincronizado {timeAgo}",error:"Error"},actions:{refreshNow:"Actualizar ahora",deleteSubscription:"Eliminar suscripción"},refreshNow:"Actualizar ahora",confirmDelete:{title:"Eliminar suscripción",message:'¿Estás seguro de que quieres eliminar la suscripción "{name}"? Esta acción no se puede deshacer.',confirmText:"Eliminar"}},autoExport:{header:"Exportación automática ICS",description:"Exportar automáticamente todas tus tareas a un archivo ICS.",enable:{name:"Habilitar exportación automática",description:"Mantener automáticamente un archivo ICS actualizado con todas tus tareas"},filePath:{name:"Ruta del archivo de exportación",description:"Ruta donde se guardará el archivo ICS (relativo a la raíz de la bóveda)",placeholder:"tasknotes-calendario.ics"},interval:{name:"Intervalo de actualización (entre 5 y 1440 minutos)",description:"Con qué frecuencia actualizar el archivo de exportación",placeholder:"60"},useDuration:{name:"Usar duración de la tarea para la longitud del evento",description:"Cuando está habilitado, usa la estimación de tiempo (duración) de la tarea en lugar de la fecha de vencimiento para la hora de finalización del evento del calendario. Esto es útil para flujos de trabajo GTD donde programado + duración representa la planificación del trabajo, mientras que la fecha de vencimiento representa plazos."},exportNow:{name:"Exportar ahora",description:"Activar manualmente una exportación inmediata",buttonText:"Exportar ahora"},status:{title:"Estado de exportación:",lastExport:"Última exportación: {time}",nextExport:"Próxima exportación: {time}",noExports:"Aún no hay exportaciones",notScheduled:"No programado",notInitialized:"Servicio de auto exportación no inicializado - por favor reinicia Obsidian",serviceNotInitialized:"Servicio no inicializado - por favor reinicia Obsidian"},notices:{reloadRequired:"Por favor recarga Obsidian para que los cambios de exportación automática tengan efecto.",exportSuccess:"Tareas exportadas exitosamente",exportFailure:"Exportación fallida - revisa la consola para detalles",serviceUnavailable:"Servicio de auto exportación no disponible"},excludeCompleted:{name:"Excluir tareas completadas",description:"Cuando está activado, las tareas completadas se omiten de las exportaciones ICS. Los estados completados se toman de los ajustes de estados de tareas."},excludeArchived:{name:"Excluir tareas archivadas",description:"Cuando está activado, las tareas archivadas se omiten de las exportaciones ICS."},requireDueDate:{name:"Requerir fecha de vencimiento",description:"Cuando está activado, solo las tareas con fecha de vencimiento se incluyen en las exportaciones ICS."},requireScheduledDate:{name:"Requerir fecha programada",description:"Cuando está activado, solo las tareas con fecha programada se incluyen en las exportaciones ICS."}},googleCalendarExport:{header:"Exportar tareas al Calendario de Google",description:"Sincroniza automáticamente tus tareas al Calendario de Google como eventos. Requiere que el Calendario de Google esté conectado arriba.",enable:{name:"Habilitar exportación de tareas",description:"Cuando está habilitado, las tareas con fechas se sincronizarán automáticamente al Calendario de Google como eventos."},targetCalendar:{name:"Calendario destino",description:"Selecciona en qué calendario crear los eventos de tareas.",placeholder:"Seleccionar un calendario...",connectFirst:"Conecta el Calendario de Google primero",primarySuffix:" (Principal)"},syncTrigger:{name:"Disparador de sincronización",description:"Qué fecha de tarea debe disparar la creación del evento.",options:{scheduled:"Fecha programada",due:"Fecha de vencimiento",both:"Ambas (preferir programada)"}},allDayEvents:{name:"Crear como eventos de todo el día",description:"Cuando está habilitado, las tareas se crean como eventos de todo el día. Cuando está deshabilitado, usa la estimación de tiempo para la duración."},defaultDuration:{name:"Duración predeterminada del evento",description:"Duración en minutos para eventos con hora (usada cuando la tarea no tiene estimación de tiempo)."},eventTitleTemplate:{name:"Plantilla de título del evento",description:"Plantilla para títulos de eventos. Variables disponibles: {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"Incluir detalles de tarea en descripción",description:"Agregar metadatos de tarea (prioridad, estado, etiquetas, etc.) a la descripción del evento."},includeObsidianLink:{name:"Incluir enlace de Obsidian",description:"Agregar un enlace de regreso a la tarea en Obsidian en la descripción del evento."},defaultReminder:{name:"Recordatorio predeterminado",description:"Añade recordatorios emergentes a eventos temporizados de Google Calendar. Introduce los minutos antes del evento separados por comas. Déjalo vacío para usar los valores predeterminados del calendario. Valores comunes: 15, 30, 60, 1440."},automaticSyncBehavior:{header:"Comportamiento de sincronización automática"},syncOnCreate:{name:"Sincronizar al crear tarea",description:"Crear automáticamente un evento de calendario cuando se crea una nueva tarea."},syncOnUpdate:{name:"Sincronizar al actualizar tarea",description:"Actualizar automáticamente el evento de calendario cuando se modifica una tarea."},syncOnComplete:{name:"Sincronizar al completar tarea",description:"Actualizar evento de calendario cuando se completa una tarea (agrega marca de verificación al título)."},syncOnDelete:{name:"Eliminar evento al eliminar tarea",description:"Eliminar evento de calendario cuando se elimina la tarea correspondiente."},manualSyncActions:{header:"Acciones de sincronización manual"},syncAllTasks:{name:"Sincronizar todas las tareas",description:"Sincronizar todas las tareas existentes al Calendario de Google. Esto creará eventos para tareas que aún no han sido sincronizadas.",buttonText:"Sincronizar todo"},unlinkAllTasks:{name:"Desvincular todas las tareas",description:"Eliminar todos los vínculos tarea-evento sin eliminar eventos del calendario.",buttonText:"Desvincular todo",confirmTitle:"Desvincular todas las tareas",confirmMessage:"Esto eliminará todos los vínculos entre tareas y eventos de calendario. Los eventos del calendario permanecerán pero ya no se actualizarán cuando cambien las tareas. ¿Estás seguro?",confirmButtonText:"Desvincular todo"},notices:{notEnabled:"La exportación al Calendario de Google no está habilitada. Configúrala en Ajustes > Integraciones.",notEnabledOrConfigured:"La exportación al Calendario de Google no está habilitada o configurada",serviceNotAvailable:"Servicio de sincronización de calendario no disponible",syncResults:"Sincronizados: {synced}, Fallidos: {failed}, Omitidos: {skipped}",taskSynced:"Tarea sincronizada al Calendario de Google",noActiveFile:"No hay archivo actualmente activo",notATask:"El archivo actual no es una tarea",noDateToSync:"La tarea no tiene fecha programada o de vencimiento para sincronizar",syncFailed:"Error al sincronizar tarea al Calendario de Google: {message}",connectionExpired:"La conexión con el Calendario de Google ha caducado. Vuelve a conectarla en Configuración > Integraciones.",syncingTasks:"Sincronizando {total} tareas al Calendario de Google...",syncComplete:"Sincronización completa: {synced} sincronizadas, {failed} fallidas, {skipped} omitidas",eventsDeletedAndUnlinked:"Todos los eventos eliminados y desvinculados",tasksUnlinked:"Todos los vínculos de tareas eliminados"},eventDescription:{untitledTask:"Tarea sin título",priority:"Prioridad: {value}",status:"Estado: {value}",due:"Vencimiento: {value}",scheduled:"Programada: {value}",timeEstimate:"Tiempo estimado: {value}",tags:"Etiquetas: {value}",contexts:"Contextos: {value}",projects:"Proyectos: {value}",openInObsidian:"Abrir en Obsidian"}},httpApi:{header:"API HTTP",description:"Habilitar API HTTP para integraciones externas y automatizaciones.",enable:{name:"Habilitar API HTTP",description:"Iniciar servidor HTTP local para acceso API"},port:{name:"Puerto API",description:"Número de puerto para el servidor API HTTP",placeholder:"3000"},authToken:{name:"Token de autenticación API",description:"Token de TaskNotes, no la clave API de tu proveedor de IA. Para generar uno, activa la API HTTP, deja este campo vacío y reinicia Obsidian. Después copia el token generado en la configuración de autenticación Bearer del cliente. Actualiza los clientes cada vez que cambie este token.",placeholder:"tu-token-secreto"},mcp:{enable:{name:"Habilitar servidor MCP",description:"Expone las herramientas de TaskNotes mediante Model Context Protocol en el endpoint /mcp. Requiere que la API HTTP esté habilitada."}},endpoints:{header:"Endpoints API disponibles",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhooks",description:{overview:"Los webhooks envían notificaciones en tiempo real a servicios externos cuando ocurren eventos de TaskNotes.",usage:"Configurar webhooks para integrar con herramientas de automatización, servicios de sincronización o aplicaciones personalizadas."},addWebhook:{name:"Agregar webhook",description:"Registrar un nuevo endpoint de webhook",buttonText:"Agregar webhook"},emptyState:{message:"No hay webhooks configurados. Agrega un webhook para recibir notificaciones en tiempo real.",buttonText:"Agregar webhook"},labels:{active:"Activo:",url:"URL:",events:"Eventos:",transform:"Transformar:"},placeholders:{url:"URL del webhook",noEventsSelected:"No hay eventos seleccionados",rawPayload:"Carga cruda (sin transformación)"},statusLabels:{active:"Activo",inactive:"Inactivo",created:"Creado {timeAgo}"},actions:{editEvents:"Editar eventos",delete:"Eliminar"},editEvents:"Editar eventos",notices:{urlUpdated:"URL del webhook actualizada",enabled:"Webhook habilitado",disabled:"Webhook deshabilitado",created:"Webhook creado exitosamente",deleted:"Webhook eliminado",updated:"Webhook actualizado"},confirmDelete:{title:"Eliminar webhook",message:`¿Estás seguro de que quieres eliminar este webhook?
URL: {url}
Esta acción no se puede deshacer.`,confirmText:"Eliminar"},cardHeader:"Webhook",cardFields:{active:"Activo:",url:"URL:",events:"Eventos:",transform:"Transformar:"},eventsDisplay:{noEvents:"No hay eventos seleccionados"},transformDisplay:{noTransform:"Carga cruda (sin transformación)"},secretModal:{title:"Secreto de webhook generado",description:"Tu secreto de webhook ha sido generado. Guarda este secreto ya que no podrás verlo de nuevo:",usage:"Usa este secreto para verificar cargas de webhook en tu aplicación receptora.",gotIt:"Entendido"},editModal:{title:"Editar webhook",eventsHeader:"Eventos a suscribir"},events:{taskCreated:{label:"Tarea creada",description:"Cuando se crean nuevas tareas"},taskUpdated:{label:"Tarea actualizada",description:"Cuando se modifican las tareas"},taskCompleted:{label:"Tarea completada",description:"Cuando las tareas se marcan como completas"},taskDeleted:{label:"Tarea eliminada",description:"Cuando se eliminan las tareas"},taskArchived:{label:"Tarea archivada",description:"Cuando se archivan las tareas"},taskUnarchived:{label:"Tarea desarchivada",description:"Cuando se desarchivar las tareas"},timeStarted:{label:"Tiempo iniciado",description:"Cuando inicia el seguimiento de tiempo"},timeStopped:{label:"Tiempo detenido",description:"Cuando se detiene el seguimiento de tiempo"},pomodoroStarted:{label:"Pomodoro iniciado",description:"Cuando comienzan las sesiones de pomodoro"},pomodoroCompleted:{label:"Pomodoro completado",description:"Cuando terminan las sesiones de pomodoro"},pomodoroInterrupted:{label:"Pomodoro interrumpido",description:"Cuando se detienen las sesiones de pomodoro"},recurringCompleted:{label:"Instancia recurrente completada",description:"Cuando se completan instancias de tareas recurrentes"},reminderTriggered:{label:"Recordatorio activado",description:"Cuando se activan recordatorios de tareas"}},modals:{secretGenerated:{title:"Secreto de webhook generado",description:"Tu secreto de webhook ha sido generado. Guarda este secreto ya que no podrás verlo de nuevo:",usage:"Usa este secreto para verificar cargas de webhook en tu aplicación receptora.",buttonText:"Entendido"},edit:{title:"Editar webhook",eventsSection:"Eventos a suscribir",transformSection:"Configuración de transformación (Opcional)",headersSection:"Configuración de encabezados",transformFile:{name:"Archivo de transformación",description:"Ruta a un archivo de plantilla .json en tu bóveda que transforma cargas de webhook",placeholder:"simple-template.json"},customHeaders:{name:"Incluir encabezados personalizados",description:"Incluir encabezados de TaskNotes (tipo de evento, firma, ID de entrega). Desactivar para Discord, Slack y otros servicios con políticas CORS estrictas."},buttons:{cancel:"Cancelar",save:"Guardar cambios"},notices:{selectAtLeastOneEvent:"Por favor selecciona al menos un evento"}},add:{title:"Agregar webhook",eventsSection:"Eventos a suscribir",transformSection:"Configuración de transformación (Opcional)",headersSection:"Configuración de encabezados",url:{name:"URL del webhook",description:"El endpoint donde se enviarán las cargas del webhook",placeholder:"https://tu-servicio.com/webhook"},transformFile:{name:"Archivo de transformación",description:"Ruta a un archivo de plantilla .json en tu bóveda que transforma cargas de webhook",placeholder:"simple-template.json"},customHeaders:{name:"Incluir encabezados personalizados",description:"Incluir encabezados de TaskNotes (tipo de evento, firma, ID de entrega). Desactivar para Discord, Slack y otros servicios con políticas CORS estrictas."},transformHelp:{title:"Las plantillas de transformación JSON te permiten personalizar cargas de webhook:",jsFiles:"",jsDescription:"",jsonFiles:"Archivos .json:",jsonDescription:" Plantillas con ",jsonVariable:"${data.task.title}",leaveEmpty:"Dejar vacío:",leaveEmptyDescription:" Enviar datos crudos",example:"Ejemplo:",exampleFile:"simple-template.json"},buttons:{cancel:"Cancelar",add:"Agregar webhook"},notices:{urlRequired:"URL del webhook es requerida",selectAtLeastOneEvent:"Por favor selecciona al menos un evento"}}}},otherIntegrations:{header:"Otras integraciones de plugins",description:"Configurar integraciones con otros plugins de Obsidian."},mdbaseSpec:{header:"Definiciones de tipos mdbase",learnMore:"Más información sobre mdbase-spec",enable:{name:"Generar definiciones de tipos mdbase",description:"Genera y mantiene archivos de tipos mdbase (mdbase.yaml y _types/task.md) en la raíz de la bóveda cuando cambien tus ajustes."}},timeFormats:{justNow:"Justo ahora",minutesAgo:"hace {minutes} minuto{plural}",hoursAgo:"hace {hours} hora{plural}",daysAgo:"hace {days} día{plural}"}}},notices:{languageChanged:"Idioma cambiado a {language}.",releaseAvailable:{message:"TaskNotes {version} está disponible.",action:"Abrir en plugins de la comunidad"},exportTasksFailed:"Error al exportar tareas como archivo ICS",icsNoteCreatedSuccess:"Nota creada exitosamente",icsCreationModalOpenFailed:"Error al abrir modal de creación",icsNoteLinkSuccess:'Nota "{fileName}" vinculada al evento ICS',icsTaskCreatedSuccess:"Tarea creada: {title}",icsRelatedItemsRefreshed:"Elementos relacionados actualizados",icsFileNotFound:"Archivo no encontrado o inválido",icsFileOpenFailed:"Error al abrir el archivo",timeblockAttachmentExists:'"{fileName}" ya está adjunto',timeblockAttachmentAdded:'"{fileName}" agregado como adjunto',timeblockAttachmentRemoved:'"{fileName}" eliminado de los adjuntos',timeblockFileTypeNotSupported:'No se puede abrir "{fileName}" - tipo de archivo no compatible',timeblockTitleRequired:"Por favor ingrese un título para el bloque de tiempo",timeblockUpdatedSuccess:'Bloque de tiempo "{title}" actualizado exitosamente',timeblockUpdateFailed:"Error al actualizar el bloque de tiempo. Consulte la consola para más detalles.",timeblockDeletedSuccess:'Bloque de tiempo "{title}" eliminado exitosamente',timeblockDeleteFailed:"Error al eliminar el bloque de tiempo. Consulte la consola para más detalles.",timeblockRequiredFieldsMissing:"Por favor complete todos los campos obligatorios",agendaLoadingFailed:"Error al cargar la agenda. Por favor intente actualizar.",statsLoadingFailed:"Error al cargar los detalles del proyecto."},commands:{openCalendarView:"Abrir vista de mini calendario",openAdvancedCalendarView:"Abrir vista de calendario",openTasksView:"Abrir vista de tareas",openNotesView:"Abrir vista de notas",openAgendaView:"Abrir vista de agenda",openPomodoroView:"Abrir temporizador pomodoro",openKanbanView:"Abrir tablero kanban",updateDefaultBaseFiles:"Actualizar archivos Base predeterminados",openPomodoroStats:"Abrir estadísticas de pomodoro",openStatisticsView:"Abrir estadísticas de tareas y proyectos",createNewTask:"Crear nueva tarea",convertCurrentNoteToTask:{name:"Convertir nota actual en tarea",noActiveFile:"No hay archivo activo para convertir",alreadyTask:"Esta nota ya es una tarea",success:"'{title}' convertido en tarea"},convertToTaskNote:"Convertir tarea de casilla a TaskNote",convertAllTasksInNote:"Convertir todas las tareas en nota",insertTaskNoteLink:"Insertar enlace de tasknote",createInlineTask:"Crear nueva tarea en línea",quickActionsCurrentTask:"Acciones rápidas para tarea actual",goToTodayNote:"Ir a la nota de hoy",startPomodoro:"Iniciar temporizador pomodoro",stopPomodoro:"Detener temporizador pomodoro",pauseResumePomodoro:"Pausar/reanudar temporizador pomodoro",refreshCache:"Actualizar caché",exportAllTasksIcs:"Exportar todas las tareas como archivo ICS",viewReleaseNotes:"Ver notas de la versión",startTimeTrackingCurrentTask:"Iniciar seguimiento de tiempo para la tarea actual",stopTimeTrackingCurrentTask:"Detener seguimiento de tiempo para la tarea actual",startTimeTrackingWithSelector:"Iniciar seguimiento de tiempo (seleccionar tarea)",editTimeEntries:"Editar entradas de tiempo (seleccionar tarea)",createOrOpenTask:"Crear o abrir tarea",createOrOpenTaskWithTracking:"Crear o abrir tarea e iniciar seguimiento de tiempo",rolloverOverdueScheduledTasks:"Posponer tareas programadas vencidas a hoy",syncAllTasksGoogleCalendar:"Sincronizar todas las tareas al Calendario de Google",syncCurrentTaskGoogleCalendar:"Sincronizar tarea actual al Calendario de Google",quickActionsTaskUnderCursor:"Acciones rápidas para la tarea bajo el cursor",editCurrentTask:"Editar tarea actual",cycleCurrentTaskStatus:"Cambiar estado de la tarea actual",cycleCurrentTaskPriority:"Cambiar prioridad de la tarea actual",addProjectToCurrentTask:"Añadir proyecto a la tarea actual",addSubtaskToCurrentNote:"Añadir subtarea a la nota actual"},modals:{deviceCode:{title:"Autorización del Calendario de Google",instructions:{intro:"Para conectar su Calendario de Google, siga estos pasos:"},steps:{open:"Abrir",inBrowser:"en su navegador",enterCode:"Ingrese este código cuando se le solicite:",signIn:"Inicie sesión con su cuenta de Google y otorgue acceso",returnToObsidian:"Vuelva a Obsidian (esta ventana se cerrará automáticamente)"},codeLabel:"Su código:",copyCodeAriaLabel:"Copiar código",waitingForAuthorization:"Esperando autorización...",openBrowserButton:"Abrir navegador",cancelButton:"Cancelar",expiresMinutesSeconds:"El código expira en {minutes}m {seconds}s",expiresSeconds:"El código expira en {seconds}s"},icsEventInfo:{calendarEventHeading:"Evento de calendario",titleLabel:"Título",calendarLabel:"Calendario",dateTimeLabel:"Fecha y hora",locationLabel:"Ubicación",descriptionLabel:"Descripción",urlLabel:"URL",relatedNotesHeading:"Notas y tareas relacionadas",noRelatedItems:"No se encontraron notas o tareas relacionadas para este evento.",typeTask:"Tarea",typeNote:"Nota",actionsHeading:"Acciones",createFromEventLabel:"Crear desde evento",createFromEventDesc:"Crear una nueva nota o tarea desde este evento de calendario",linkExistingLabel:"Vincular existente",linkExistingDesc:"Vincular una nota existente a este evento de calendario"},timeblockInfo:{editHeading:"Editar bloque de tiempo",dateTimeLabel:"Fecha y hora: ",titleLabel:"Título",titleDesc:"Título para su bloque de tiempo",titlePlaceholder:"ej. Sesión de trabajo profundo",descriptionLabel:"Descripción",descriptionDesc:"Descripción opcional para el bloque de tiempo",descriptionPlaceholder:"Enfoque en nuevas funciones, sin interrupciones",colorLabel:"Color",colorDesc:"Color opcional para el bloque de tiempo",colorPlaceholder:"#3b82f6",attachmentsLabel:"Adjuntos",attachmentsDesc:"Archivos o notas vinculados a este bloque de tiempo",addAttachmentButton:"Agregar adjunto",addAttachmentTooltip:"Seleccionar un archivo o nota usando búsqueda difusa",deleteButton:"Eliminar bloque de tiempo",saveButton:"Guardar cambios",deleteConfirmationTitle:"Eliminar bloque de tiempo"},timeblockCreation:{heading:"Crear bloque de tiempo",dateLabel:"Fecha: ",titleLabel:"Título",titleDesc:"Título para su bloque de tiempo",titlePlaceholder:"ej. Sesión de trabajo profundo",startTimeLabel:"Hora de inicio",startTimeDesc:"Cuándo comienza el bloque de tiempo",startTimePlaceholder:"09:00",endTimeLabel:"Hora de fin",endTimeDesc:"Cuándo termina el bloque de tiempo",endTimePlaceholder:"11:00",descriptionLabel:"Descripción",descriptionDesc:"Descripción opcional para el bloque de tiempo",descriptionPlaceholder:"Enfoque en nuevas funciones, sin interrupciones",colorLabel:"Color",colorDesc:"Color opcional para el bloque de tiempo",colorPlaceholder:"#3b82f6",attachmentsLabel:"Adjuntos",attachmentsDesc:"Archivos o notas para vincular a este bloque de tiempo",addAttachmentButton:"Agregar adjunto",addAttachmentTooltip:"Seleccionar un archivo o nota usando búsqueda difusa",createButton:"Crear bloque de tiempo"},calendarEventCreation:{heading:"Crear evento de calendario",dateTimeLabel:"Fecha y hora: ",titleLabel:"Título",titleDesc:"Título para el evento de calendario",titlePlaceholder:"ej., Reunión de equipo",calendarLabel:"Calendario",calendarDesc:"En qué calendario crear el evento",descriptionLabel:"Descripción",descriptionDesc:"Descripción opcional para el evento",descriptionPlaceholder:"Agregar detalles sobre este evento...",locationLabel:"Ubicación",locationDesc:"Ubicación opcional para el evento",locationPlaceholder:"ej., Sala de conferencias A",createButton:"Crear evento",titleRequired:"El título del evento es obligatorio",noCalendarSelected:"No se seleccionó ningún calendario",success:'Evento de calendario "{title}" creado',error:"No se pudo crear el evento de calendario: {message}"},icsNoteCreation:{heading:"Crear desde evento ICS",titleLabel:"Título",titleDesc:"Título para el nuevo contenido",folderLabel:"Carpeta",folderDesc:"Carpeta de destino (dejar vacío para la raíz del vault)",folderPlaceholder:"carpeta/subcarpeta",createButton:"Crear",startLabel:"Inicio: ",endLabel:"Fin: ",locationLabel:"Ubicación: ",calendarLabel:"Calendario: ",useTemplateLabel:"Usar plantilla",useTemplateDesc:"Aplicar una plantilla al crear el contenido",templatePathLabel:"Ruta de plantilla",templatePathDesc:"Ruta al archivo de plantilla",templatePathPlaceholder:"plantillas/plantilla-nota-ics.md"},unscheduledTasksSelector:{title:"Tareas no programadas",placeholder:"Escribe para buscar tareas no programadas...",instructions:{navigate:"para navegar",schedule:"para programar",dismiss:"para descartar"}},migration:{title:"Migrar al nuevo sistema de recurrencia",description:"TaskNotes ahora usa patrones RRULE estándar de la industria para recurrencia, lo que permite horarios más complejos y mejor compatibilidad con otras aplicaciones.",tasksFound:"{count} tarea(s) con patrones de recurrencia antiguos detectados",noMigrationNeeded:"No se requiere migración de tareas",warnings:{title:"Antes de proceder:",backup:"Respalda tu bóveda antes de migrar",conversion:"Los patrones de recurrencia antiguos se convertirán al nuevo formato",normalUsage:"Puedes continuar usando TaskNotes normalmente durante la migración",permanent:"Este cambio es permanente y no se puede deshacer automáticamente"},benefits:{title:"Beneficios del nuevo sistema:",powerfulPatterns:"Patrones de recurrencia complejos (ej. 'cada segundo martes')",performance:"Mejor rendimiento con tareas recurrentes",compatibility:"Formato de recurrencia estándar compatible con otras aplicaciones",nlp:"Soporte mejorado de procesamiento de lenguaje natural"},progress:{title:"Progreso de migración",preparing:"Preparando migración...",completed:"Migración completada exitosamente",failed:"Migración fallida"},buttons:{migrate:"Iniciar migración",completed:"Cerrar"},errors:{title:"Errores durante la migración:"},notices:{completedWithErrors:"Migración completada con algunos errores. Revisa la lista de errores arriba.",success:"¡Todas las tareas migradas exitosamente!",failed:"Migración fallida. Por favor revisa la consola para más detalles."},prompt:{message:"TaskNotes detectó tareas usando el formato de recurrencia antiguo. ¿Te gustaría migrarlas al nuevo sistema ahora?",migrateNow:"Migrar ahora",remindLater:"Recordar más tarde"}},task:{titlePlaceholder:"¿Qué necesita hacerse?",titleLabel:"Título",titleDetailedPlaceholder:"Título de la tarea...",detailsLabel:"Detalles",detailsPlaceholder:"Agregar más detalles...",projectsLabel:"Proyectos",projectsAdd:"Agregar proyecto",projectsTooltip:"Seleccionar una nota de proyecto usando búsqueda difusa",projectsRemoveTooltip:"Eliminar proyecto",contextsLabel:"Contextos",contextsPlaceholder:"contexto1, contexto2",tagsLabel:"Etiquetas",tagsPlaceholder:"etiqueta1, etiqueta2",timeEstimateLabel:"Estimación de tiempo (minutos)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"Cambios sin guardar",message:"Tiene cambios sin guardar. ¿Desea guardarlos?",save:"Guardar cambios",discard:"Descartar cambios",cancel:"Seguir editando"},dependencies:{blockedBy:"Bloqueado por",blocking:"Bloqueando",placeholder:"[[Nota de tarea]]",addTaskButton:"Agregar tarea",selectTaskTooltip:"Seleccionar una nota de tarea usando búsqueda difusa",removeTaskTooltip:"Eliminar tarea"},organization:{projects:"Proyectos",subtasks:"Subtareas",addToProject:"Agregar a proyecto",addToProjectButton:"Agregar a proyecto",addSubtasks:"Agregar subtareas",addSubtasksButton:"Agregar subtarea",addSubtasksTooltip:"Seleccionar tareas para convertirlas en subtareas de esta tarea",removeSubtaskTooltip:"Eliminar subtarea",notices:{noEligibleSubtasks:"No hay tareas elegibles disponibles para asignar como subtareas",subtaskSelectFailed:"Error al abrir selector de subtareas"}},customFieldsLabel:"Campos personalizados",actions:{due:"Establecer fecha de vencimiento",scheduled:"Establecer fecha programada",status:"Establecer estado",priority:"Establecer prioridad",recurrence:"Establecer recurrencia",reminders:"Establecer recordatorios"},buttons:{openNote:"Abrir nota",save:"Guardar"},tooltips:{dueValue:"Vence: {value}",scheduledValue:"Programado: {value}",statusValue:"Estado: {value}",priorityValue:"Prioridad: {value}",recurrenceValue:"Recurrencia: {value}",remindersSingle:"1 recordatorio establecido",remindersPlural:"{count} recordatorios establecidos"},dateMenu:{dueTitle:"Establecer fecha de vencimiento",scheduledTitle:"Establecer fecha programada"},userFields:{textPlaceholder:"Ingresar {field}...",numberPlaceholder:"0",datePlaceholder:"YYYY-MM-DD",listPlaceholder:"elemento1, elemento2, elemento3",pickDate:"Elegir fecha de {field}"},recurrence:{daily:"Diario",weekly:"Semanal",everyTwoWeeks:"Cada 2 semanas",weekdays:"Días de semana",weeklyOn:"Semanal en {days}",monthly:"Mensual",everyThreeMonths:"Cada 3 meses",monthlyOnOrdinal:"Mensual en el {ordinal}",monthlyByWeekday:"Mensual (por día de semana)",yearly:"Anual",yearlyOn:"Anual en {month} {day}",custom:"Personalizado",countSuffix:"{count} veces",untilSuffix:"hasta {date}",ordinal:"{number}{suffix}"}},taskSelector:{title:"Seleccionar tarea",placeholder:"Escribe para buscar tareas...",instructions:{navigate:"para navegar",select:"para seleccionar",dismiss:"para cancelar"},notices:{noteNotFound:'No se pudo encontrar la nota "{name}"'},dueDate:{overdue:"Vencimiento: {date} (vencido)",today:"Vencimiento: Hoy"}},taskSelectorWithCreate:{title:"Crear o abrir tarea",placeholder:"Buscar tareas o escribir para crear nueva...",instructions:{create:"para crear nueva tarea"},footer:{createLabel:" para crear: "},notices:{emptyQuery:"Por favor ingrese una descripción de tarea",invalidTitle:"No se pudo reconocer un título de tarea válido"}},taskCreation:{title:"Crear tarea",actions:{fillFromNaturalLanguage:"Llenar formulario desde lenguaje natural",hideDetailedOptions:"Ocultar opciones detalladas",showDetailedOptions:"Mostrar opciones detalladas"},nlPlaceholder:"Comprar víveres mañana a las 3pm @casa #diligencias",notices:{titleRequired:"Por favor ingresa un título de tarea",success:'Tarea "{title}" creada exitosamente',successShortened:'Tarea "{title}" creada exitosamente (nombre de archivo acortado por longitud)',failure:"Error al crear tarea: {message}",blockingUnresolved:"No se pudo resolver: {entries}",openCreatedTaskFailure:"Tarea creada, pero no se pudo abrir la nota de la tarea."}},taskEdit:{title:"Editar tarea",sections:{completions:"Finalizaciones",taskInfo:"Información de la tarea"},metadata:{totalTrackedTime:"Tiempo total rastreado:",due:"Vencimiento:",scheduled:"Programada:",created:"Creado:",modified:"Modificado:",file:"Archivo:"},buttons:{archive:"Archivar",unarchive:"Desarchivar"},notices:{titleRequired:"Por favor ingresa un título de tarea",noChanges:"No hay cambios para guardar",updateSuccess:'Tarea "{title}" actualizada exitosamente',updateFailure:"Error al actualizar tarea: {message}",dependenciesUpdateSuccess:"Dependencias actualizadas",blockingUnresolved:"No se pudo resolver: {entries}",fileMissing:"No se pudo encontrar el archivo de tarea: {path}",openNoteFailure:"Error al abrir nota de tarea",archiveSuccess:"Tarea {action} exitosamente",archiveFailure:"Error al archivar tarea",deleteSuccess:'Tarea "{title}" eliminada correctamente',deleteFailure:"No se pudo eliminar la tarea: {message}"},archiveAction:{archived:"archivada",unarchived:"desarchivada"},deleteConfirmation:{title:"Eliminar tarea",message:'¿Seguro que quieres eliminar "{title}"? Esto mueve la nota de la tarea a la papelera de Obsidian.',confirm:"Eliminar tarea"}},storageLocation:{title:{migrate:"¿Migrar datos de pomodoro?",switch:"¿Cambiar a almacenamiento de notas diarias?"},message:{migrate:"Esto migrará tus datos de sesión de pomodoro existentes al frontmatter de notas diarias. Los datos se agruparán por fecha y se almacenarán en cada nota diaria.",switch:"Los datos de sesión de pomodoro se almacenarán en el frontmatter de notas diarias en lugar del archivo de datos del plugin."},whatThisMeans:"Lo que esto significa:",bullets:{dailyNotesRequired:"Las notas diarias deben estar activadas en el plugin principal de notas diarias o en Periodic Notes",storedInNotes:"Los datos se almacenarán en el frontmatter de tus notas diarias",migrateData:"Los datos del plugin existentes se migrarán y luego se borrarán",futureSessions:"Las sesiones futuras se guardarán en notas diarias",dataLongevity:"Esto proporciona mejor longevidad de datos con tus notas"},finalNote:{migrate:"⚠️ Asegúrate de tener respaldos si es necesario. Este cambio no se puede deshacer automáticamente.",switch:"Puedes cambiar de vuelta al almacenamiento del plugin en cualquier momento en el futuro."},buttons:{migrate:"Migrar datos",switch:"Cambiar almacenamiento"}},dueDate:{title:"Establecer fecha de vencimiento",taskLabel:"Tarea: {title}",sections:{dateTime:"Fecha y hora de vencimiento",quickOptions:"Opciones rápidas"},descriptions:{dateTime:"Establecer cuándo debe completarse esta tarea"},inputs:{date:{ariaLabel:"Fecha de vencimiento para la tarea",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"Hora de vencimiento para la tarea (opcional)",placeholder:"HH:MM"}},quickOptions:{today:"Hoy",todayAriaLabel:"Establecer fecha de vencimiento a hoy",tomorrow:"Mañana",tomorrowAriaLabel:"Establecer fecha de vencimiento a mañana",nextWeek:"Próxima semana",nextWeekAriaLabel:"Establecer fecha de vencimiento a la próxima semana",now:"Ahora",nowAriaLabel:"Establecer fecha y hora de vencimiento a ahora",clear:"Limpiar",clearAriaLabel:"Limpiar fecha de vencimiento"},errors:{invalidDateTime:"Por favor ingresa un formato de fecha y hora válido",updateFailed:"Error al actualizar fecha de vencimiento. Por favor intenta de nuevo."}},scheduledDate:{title:"Establecer fecha programada",taskLabel:"Tarea: {title}",sections:{dateTime:"Fecha y hora programada",quickOptions:"Opciones rápidas"},descriptions:{dateTime:"Establecer cuándo planeas trabajar en esta tarea"},inputs:{date:{ariaLabel:"Fecha programada para la tarea",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"Hora programada para la tarea (opcional)",placeholder:"HH:MM"}},quickOptions:{today:"Hoy",todayAriaLabel:"Establecer fecha programada a hoy",tomorrow:"Mañana",tomorrowAriaLabel:"Establecer fecha programada a mañana",nextWeek:"Próxima semana",nextWeekAriaLabel:"Establecer fecha programada a la próxima semana",now:"Ahora",nowAriaLabel:"Establecer fecha y hora programada a ahora",clear:"Limpiar",clearAriaLabel:"Limpiar fecha programada"},errors:{invalidDateTime:"Por favor ingresa un formato de fecha y hora válido",updateFailed:"Error al actualizar fecha programada. Por favor intenta de nuevo."}},timeEntryEditor:{title:"Entradas de tiempo - {taskTitle}",addEntry:"Agregar entrada de tiempo",noEntries:"Aún no hay entradas de tiempo",deleteEntry:"Eliminar entrada",startTime:"Hora de inicio",endTime:"Hora de finalización (dejar vacío si aún está en ejecución)",duration:"Duración (minutos)",durationDesc:"Anular duración calculada",durationPlaceholder:"Ingresar duración en minutos",description:"Descripción",descriptionPlaceholder:"¿En qué trabajaste?",calculatedDuration:"Calculado: {minutes} minutos",totalTime:"{hours}h {minutes}m total",totalMinutes:"{minutes}m total",saved:"Entradas de tiempo guardadas",saveFailed:"Error al guardar entradas de tiempo",openFailed:"Error al abrir el editor de entradas de tiempo",noTasksWithEntries:"No hay tareas con entradas de tiempo para editar",validation:{missingStartTime:"Se requiere hora de inicio",endBeforeStart:"La hora de finalización debe ser posterior a la hora de inicio"}},timeTracking:{noTasksAvailable:"No hay tareas disponibles para rastrear tiempo",started:"Seguimiento de tiempo iniciado para: {taskTitle}",startFailed:"Error al iniciar el seguimiento de tiempo"},timeEntry:{mustHaveSpecificTime:"Las entradas de tiempo deben tener horas específicas. Seleccione un rango de tiempo en la vista semanal o diaria.",noTasksAvailable:"No hay tareas disponibles para crear entradas de tiempo",created:"Entrada de tiempo creada para {taskTitle} ({duration} minutos)",createFailed:"Error al crear entrada de tiempo"}},contextMenus:{task:{status:"Estado",statusSelected:"✓ {label}",priority:"Prioridad",prioritySelected:"✓ {label}",dueDate:"Fecha de vencimiento",scheduledDate:"Fecha programada",customDates:"Fechas personalizadas",reminders:"Recordatorios",remindBeforeDue:"Recordar antes del vencimiento…",remindBeforeScheduled:"Recordar antes de programado…",manageReminders:"Gestionar todos los recordatorios…",clearReminders:"Limpiar todos los recordatorios",startTimeTracking:"Iniciar seguimiento de tiempo",stopTimeTracking:"Detener seguimiento de tiempo",editTimeEntries:"Editar entradas de tiempo",archive:"Archivar",unarchive:"Desarchivar",openNote:"Abrir nota",openNoteInNewTab:"Abrir nota en una nueva pestaña",copyTitle:"Copiar título de tarea",quickActions:"Acciones rápidas",noteActions:"Acciones de nota",rename:"Renombrar",renameTitle:"Renombrar archivo",renamePlaceholder:"Ingresar nuevo nombre",delete:"Eliminar",deleteTitle:"Eliminar archivo",deleteMessage:'¿Estás seguro de que quieres eliminar "{name}"?',deleteConfirm:"Eliminar",copyPath:"Copiar ruta",copyUrl:"Copiar URL de Obsidian",showInExplorer:"Mostrar en explorador de archivos",addToCalendar:"Agregar al calendario",calendar:{google:"Calendario de Google",outlook:"Calendario de Outlook",yahoo:"Calendario de Yahoo",downloadIcs:"Descargar archivo .ics",syncToGoogle:"Sincronizar con el Calendario de Google",syncToGoogleNotConfigured:"Sincronización con el Calendario de Google no configurada",syncToGoogleSuccess:"Tarea sincronizada con el Calendario de Google",syncToGoogleFailed:"Error al sincronizar con el Calendario de Google"},recurrence:"Recurrencia",clearRecurrence:"Limpiar recurrencia",customRecurrence:"Recurrencia personalizada...",createSubtask:"Crear subtarea",dependencies:{title:"Dependencias",addBlockedBy:"Agregar bloqueado por…",addBlockedByTitle:"Agregar tareas de las que esto depende",addBlocking:"Agregar bloqueando…",addBlockingTitle:"Agregar tareas que esto bloquea",removeBlockedBy:"Eliminar bloqueado-por…",removeBlocking:"Eliminar bloqueando…",unknownDependency:"Desconocido",inputPlaceholder:"[[Nota de tarea]]",notices:{noEntries:"Por favor ingrese al menos una tarea",blockedByAdded:"{count} dependencia agregada",blockedByRemoved:"Dependencia eliminada",blockingAdded:"{count} tarea dependiente agregada",blockingRemoved:"Tarea dependiente eliminada",unresolved:"No se pudo resolver: {entries}",noEligibleTasks:"No hay tareas coincidentes disponibles",updateFailed:"Error al actualizar dependencias"}},organization:{title:"Organización",projects:"Proyectos",addToProject:"Agregar a proyecto…",subtasks:"Subtareas",addSubtasks:"Agregar subtareas…",notices:{alreadyInProject:"La tarea ya está en este proyecto",alreadySubtask:"La tarea ya es una subtarea de esta tarea",addedToProject:"Agregado al proyecto: {project}",addedAsSubtask:"{subtask} agregado como subtarea de {parent}",addToProjectFailed:"Error al agregar tarea al proyecto",addAsSubtaskFailed:"Error al agregar tarea como subtarea",projectSelectFailed:"Error al abrir selector de proyecto",subtaskSelectFailed:"Error al abrir selector de subtareas",noEligibleSubtasks:"No hay tareas elegibles disponibles para asignar como subtareas",currentTaskNotFound:"Archivo de tarea actual no encontrado",updateContextsFailed:"No se pudieron actualizar los contextos"},contexts:"Contextos",addContext:"Añadir contexto…",contextPlaceholder:"contexto",contextSelected:"✓ {context}",clearContexts:"Borrar contextos"},subtasks:{loading:"Cargando subtareas...",noSubtasks:"No se encontraron subtareas",loadFailed:"Error al cargar subtareas"},markComplete:"Marcar como completo para esta fecha",markIncomplete:"Marcar como incompleto para esta fecha",skipInstance:"Omitir instancia",unskipInstance:"Deshacer omisión de instancia",completion:{submenu:"Marcar como completada u omitir",submenuCompleteOnly:"Marcar como completada",completeToday:"Completada hoy",completeAsScheduled:"Completada en la fecha programada",completeOnDue:"Completada en la fecha de vencimiento",completeOnPicked:"Completada el (elegir fecha)",markIncomplete:"Marcar como incompleta",noScheduledDate:"Esta tarea no tiene una fecha programada",noDueDate:"Esta tarea no tiene una fecha de vencimiento",noPickedDate:"No se ha seleccionado ninguna fecha",noCompletedStatus:"No hay ningún estado de finalización configurado",pickDateTitle:"Elegir fecha de finalización",completeFailure:"No se pudo actualizar la finalización de la tarea: {message}",clearInstancesConfirmTitle:"¿Borrar las instancias registradas?",clearInstancesConfirmMessage:"Al reprogramar se borrarán estas instancias registradas como completadas u omitidas en la nueva fecha o después de ella: {dates}. Dejarán de estar marcadas como completadas u omitidas. ¿Continuar?",clearInstancesConfirmButton:"Reprogramar y borrar"},quickReminders:{atTime:"A la hora del evento",fiveMinutes:"5 minutos antes",fifteenMinutes:"15 minutos antes",oneHour:"1 hora antes",oneDay:"1 día antes"},notices:{toggleCompletionFailure:"Error al alternar finalización de tarea recurrente: {message}",toggleSkipFailure:"Error al alternar omisión de tarea recurrente: {message}",updateDueDateFailure:"Error al actualizar fecha de vencimiento de tarea: {message}",updateScheduledFailure:"Error al actualizar fecha programada de tarea: {message}",updateCustomDateFailure:"No se pudo actualizar {field}: {message}",updateRemindersFailure:"Error al actualizar recordatorios",clearRemindersFailure:"Error al limpiar recordatorios",addReminderFailure:"Error al agregar recordatorio",archiveFailure:"Error al alternar archivo de tarea: {message}",copyTitleSuccess:"Título de tarea copiado al portapapeles",copyFailure:"Error al copiar al portapapeles",renameSuccess:'Renombrado a "{name}"',renameFailure:"Error al renombrar archivo",copyPathSuccess:"Ruta de archivo copiada al portapapeles",copyUrlSuccess:"URL de Obsidian copiada al portapapeles",updateRecurrenceFailure:"Error al actualizar recurrencia de tarea: {message}",updateTagsFailed:"No se pudieron actualizar las etiquetas"},tags:"Etiquetas",addTag:"Añadir etiqueta…",removeTag:"Eliminar {tag}",removeTagInput:"Eliminar etiqueta…",tagPlaceholder:"Etiqueta o #etiqueta",clearTags:"Borrar etiquetas"},priority:{clearPriority:"Quitar prioridad"},ics:{showDetails:"Mostrar detalles",createTask:"Crear tarea desde evento",createNote:"Crear nota desde evento",linkNote:"Vincular nota existente",copyTitle:"Copiar título",copyLocation:"Copiar ubicación",copyUrl:"Copiar URL",copyMarkdown:"Copiar como markdown",subscriptionUnknown:"Calendario desconocido",notices:{copyTitleSuccess:"Título del evento copiado al portapapeles",copyLocationSuccess:"Ubicación copiada al portapapeles",copyUrlSuccess:"URL del evento copiada al portapapeles",copyMarkdownSuccess:"Detalles del evento copiados como markdown",copyFailure:"Error al copiar al portapapeles",taskCreated:"Tarea creada: {title}",taskCreateFailure:"Error al crear tarea desde evento",noteCreated:"Nota creada exitosamente",creationFailure:"Error al abrir modal de creación",linkSuccess:'Nota "{name}" vinculada al evento',linkFailure:"Error al vincular nota",linkSelectionFailure:"Error al abrir selección de nota"},markdown:{titleFallback:"Evento sin título",calendar:"**Calendario:** {value}",date:"**Fecha y hora:** {value}",location:"**Ubicación:** {value}",descriptionHeading:"### Descripción",url:"**URL:** {value}",at:" a las {time}"}},date:{increment:{plusOneDay:"+1 día",minusOneDay:"-1 día",plusOneWeek:"+1 semana",minusOneWeek:"-1 semana"},basic:{today:"Hoy",tomorrow:"Mañana",thisWeekend:"Este fin de semana",nextWeek:"Próxima semana",nextMonth:"Próximo mes"},weekdaysLabel:"Días de semana",selected:"✓ {label}",pickDateTime:"Elegir fecha y hora…",clearDate:"Limpiar fecha",modal:{title:"Establecer fecha y hora",dateLabel:"Fecha",timeLabel:"Hora (opcional)",select:"Seleccionar"}}},services:{pomodoro:{notices:{alreadyRunning:"Un pomodoro ya está ejecutándose",resumeCurrentSession:"Reanudar la sesión actual en lugar de iniciar una nueva",timerAlreadyRunning:"Un temporizador ya está ejecutándose",resumeSessionInstead:"Reanudar la sesión actual en lugar de iniciar una nueva",shortBreakStarted:"Descanso corto iniciado",longBreakStarted:"Descanso largo iniciado",paused:"Pomodoro pausado",resumed:"Pomodoro reanudado",stoppedAndReset:"Pomodoro detenido y reiniciado",migrationSuccess:"{count} sesiones de pomodoro migradas exitosamente a notas diarias.",migrationFailure:"Error al migrar datos de pomodoro. Por favor intenta de nuevo o revisa la consola para detalles."}},icsSubscription:{notices:{calendarNotFound:'Calendario "{name}" no encontrado (404). Por favor verifica que la URL ICS sea correcta y el calendario sea públicamente accesible.',calendarAccessDenied:'Acceso al calendario "{name}" denegado (500). Esto puede deberse a restricciones del servidor de Microsoft Outlook. Intenta regenerar la URL ICS desde la configuración de tu calendario.',fetchRemoteFailed:'Error al obtener calendario remoto "{name}": {error}',readLocalFailed:'Error al leer calendario local "{name}": {error}'}},calendarExport:{notices:{generateLinkFailed:"Error al generar enlace de calendario",noTasksToExport:"No se encontraron tareas para exportar",downloadSuccess:"Descargado {filename} con {count} tarea{plural}",downloadFailed:"Error al descargar archivo de calendario",singleDownloadSuccess:"Descargado {filename}"}},filter:{groupLabels:{noProject:"Sin proyecto",noTags:"Sin etiquetas",invalidDate:"Fecha inválida",due:{overdue:"Vencido",today:"Hoy",tomorrow:"Mañana",nextSevenDays:"Próximos siete días",later:"Más tarde",none:"Sin fecha de vencimiento"},scheduled:{past:"Programación pasada",today:"Hoy",tomorrow:"Mañana",nextSevenDays:"Próximos siete días",later:"Más tarde",none:"Sin fecha programada"}},errors:{noDatesProvided:"No se proporcionaron fechas"},folders:{root:"(Raíz)"}},instantTaskConvert:{notices:{noCheckboxTasks:"No se encontraron tareas de casilla de verificación en la nota actual.",convertingTasks:"Convirtiendo {count} tarea{plural}...",conversionSuccess:"✅ ¡{count} tarea{plural} convertida exitosamente a TaskNotes!",partialConversion:"{successCount} tarea{successPlural} convertida. {failureCount} fallaron.",batchConversionFailed:"Error al realizar conversión por lotes. Por favor intenta de nuevo.",invalidParameters:"Parámetros de entrada inválidos.",emptyLine:"La línea actual está vacía o no contiene contenido válido.",parseError:"Error al analizar tarea: {error}",invalidTaskData:"Datos de tarea inválidos.",replaceLineFailed:"Error al reemplazar línea de tarea.",conversionComplete:"Tarea convertida: {title}",conversionCompleteShortened:'Tarea convertida: "{title}" (nombre de archivo acortado por longitud)',fileExists:"Ya existe un archivo con este nombre. Por favor intenta de nuevo o renombra la tarea.",conversionFailed:"Error al convertir tarea. Por favor intenta de nuevo."}},icsNote:{notices:{templateNotFound:"Plantilla no encontrada: {path}",templateProcessError:"Error al procesar plantilla: {template}",linkedToEvent:"Nota vinculada al evento ICS: {title}"}},task:{notices:{templateNotFound:"Plantilla del cuerpo de tarea no encontrada: {path}",templateReadError:"Error al leer plantilla del cuerpo de tarea: {template}",occurrenceTemplateNotFound:"Plantilla de nota de ocurrencia no encontrada: {path}",occurrenceTemplateReadError:"Error al leer plantilla de nota de ocurrencia: {template}",moveTaskFailed:"Error al mover tarea {operation}: {error}"}},autoExport:{notices:{exportFailed:"Auto exportación de TaskNotes falló: {error}"}}},ui:{icsCard:{untitledEvent:"Evento sin título",allDay:"Todo el día",calendarEvent:"Evento de calendario",calendarFallback:"Calendario"},noteCard:{createdLabel:"Creado:",dailyBadge:"Diario",dailyTooltip:"Nota diaria"},taskCard:{labels:{due:"Vencimiento",scheduled:"Programado",recurrence:"Recurrente",completed:"Completado",created:"Creado",modified:"Modificado",blocked:"Bloqueado",blocking:"Bloqueando"},blockedBadge:"Bloqueada",blockedBadgeTooltip:"Esta tarea está esperando otra tarea",blockingBadge:"Bloqueando",blockingBadgeTooltip:"Esta tarea bloquea otra tarea",blockingToggle:"Bloqueando {count} tareas",priorityAriaLabel:"Prioridad: {label}",taskOptions:"Opciones de tarea",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"1 recordatorio configurado (clic para gestionar)",reminderTooltipMany:"{count} recordatorios configurados (clic para gestionar)",projectTooltip:"Esta tarea se usa como proyecto (clic para mostrar/ocultar subtareas)",projectIndicatorTooltip:"Esta tarea se utiliza como proyecto",expandSubtasks:"Expandir subtareas",collapseSubtasks:"Contraer subtareas",dueToday:"{label}: Hoy",dueTodayAt:"{label}: Hoy a las {time}",dueOverdue:"{label}: {display} (atrasada)",dueLabel:"{label}: {display}",scheduledToday:"{label}: Hoy",scheduledTodayAt:"{label}: Hoy a las {time}",scheduledPast:"{label}: {display} (pasado)",scheduledLabel:"{label}: {display}",loadingDependencies:"Cargando dependencias...",blockingEmpty:"Sin tareas dependientes",blockingLoadError:"No se pudieron cargar las dependencias",googleCalendarSyncTooltip:"Sincronizado con el Calendario de Google",detailsTooltip:"La tarea tiene detalles"},propertyEventCard:{unknownFile:"Archivo desconocido"},filterHeading:{allViewName:"Todos"},filterBar:{saveView:"Guardar vista",saveViewNamePlaceholder:"Ingresar nombre de vista...",saveButton:"Guardar",views:"Vistas",savedFilterViews:"Vistas de filtro guardadas",filters:"Filtros",properties:"Propiedades",sort:"Ordenar",newTask:"Nuevo",expandAllGroups:"Expandir todos los grupos",collapseAllGroups:"Contraer todos los grupos",searchTasksPlaceholder:"Buscar tareas...",searchTasksTooltip:"Buscar títulos de tareas",filterUnavailable:"Barra de filtros temporalmente no disponible",toggleFilter:"Alternar filtro",activeFiltersTooltip:"Filtros activos – Clic para modificar, clic derecho para limpiar",configureVisibleProperties:"Configurar propiedades visibles",sortAndGroupOptions:"Opciones de ordenamiento y agrupación",sortMenuHeader:"Ordenar",orderMenuHeader:"Orden",groupMenuHeader:"Agrupar",createNewTask:"Crear nueva tarea",filter:"Filtro",displayOrganization:"Visualización y organización",viewOptions:"Opciones de vista",addFilter:"Agregar filtro",addFilterGroup:"Agregar grupo de filtros",addFilterTooltip:"Agregar una nueva condición de filtro",addFilterGroupTooltip:"Agregar un grupo de filtros anidado",clearAllFilters:"Limpiar todos los filtros y grupos",saveCurrentFilter:"Guardar filtro actual como vista",closeFilterModal:"Cerrar modal de filtro",deleteFilterGroup:"Eliminar grupo de filtros",deleteCondition:"Eliminar condición",all:"Todos",any:"Cualquiera",followingAreTrue:"de los siguientes son verdaderos:",where:"donde",selectProperty:"Seleccionar...",chooseProperty:"Elegir por qué propiedad de tarea filtrar",chooseOperator:"Elegir cómo comparar el valor de la propiedad",enterValue:"Ingresar el valor por el cual filtrar",selectValue:"Seleccionar un {property} por el cual filtrar",sortBy:"Ordenar por:",toggleSortDirection:"Alternar dirección de ordenamiento",chooseSortMethod:"Elegir cómo ordenar tareas",groupBy:"Agrupar por:",chooseGroupMethod:"Agrupar tareas por una propiedad común",toggleViewOption:"Alternar {option}",expandCollapseFilters:"Clic para expandir/contraer condiciones de filtro",expandCollapseSort:"Clic para expandir/contraer opciones de ordenamiento y agrupación",expandCollapseViewOptions:"Clic para expandir/contraer opciones específicas de vista",naturalLanguageDates:"Fechas en lenguaje natural",naturalLanguageExamples:"Mostrar ejemplos de fechas en lenguaje natural",enterNumericValue:"Ingresar un valor numérico por el cual filtrar",enterDateValue:"Ingresar una fecha usando lenguaje natural o formato ISO",pickDateTime:"Elegir fecha y hora",noSavedViews:"No hay vistas guardadas",savedViews:"Vistas guardadas",yourSavedFilters:"Tus configuraciones de filtro guardadas",dragToReorder:"Arrastrar para reordenar vistas",loadSavedView:"Cargar vista guardada: {name}",deleteView:"Eliminar vista",deleteViewTitle:"Eliminar vista",deleteViewMessage:'¿Estás seguro de que quieres eliminar la vista "{name}"?',manageAllReminders:"Gestionar todos los recordatorios...",clearAllReminders:"Limpiar todos los recordatorios",customRecurrence:"Recurrencia personalizada...",clearRecurrence:"Limpiar recurrencia",sortOptions:{dueDate:"Fecha de vencimiento",scheduledDate:"Fecha programada",priority:"Prioridad",status:"Estado",title:"Título",createdDate:"Fecha de creación",tags:"Etiquetas",ascending:"Ascendente",descending:"Descendente"},group:{none:"Ninguno",status:"Estado",priority:"Prioridad",context:"Contexto",project:"Proyecto",dueDate:"Fecha de vencimiento",scheduledDate:"Fecha programada",tags:"Etiquetas",completedDate:"Fecha de finalización"},subgroupLabel:"SUBGRUPO",notices:{propertiesMenuFailed:"Error al mostrar menú de propiedades"}}},components:{dateContextMenu:{weekdays:"Días laborables",clearDate:"Borrar fecha",today:"Hoy",tomorrow:"Mañana",thisWeekend:"Este fin de semana",nextWeek:"Próxima semana",nextMonth:"Próximo mes",setDateTime:"Establecer fecha y hora",dateLabel:"Fecha",timeLabel:"Hora (opcional)"},subgroupMenuBuilder:{none:"Ninguno",status:"Estado",priority:"Prioridad",context:"Contexto",project:"Proyecto",dueDate:"Fecha de vencimiento",scheduledDate:"Fecha programada",tags:"Etiquetas",completedDate:"Fecha de finalización",subgroup:"SUBGRUPO"},propertyVisibilityDropdown:{coreProperties:"PROPIEDADES PRINCIPALES",organization:"ORGANIZACIÓN",customProperties:"PROPIEDADES PERSONALIZADAS",failed:"Error al mostrar menú de propiedades",properties:{statusDot:"Punto de estado",priorityDot:"Punto de prioridad",dueDate:"Fecha de vencimiento",scheduledDate:"Fecha programada",timeEstimate:"Estimación de tiempo",totalTrackedTime:"Tiempo total rastreado",checklistProgress:"Progreso de la lista de verificación",recurrence:"Recurrencia",completedDate:"Fecha de finalización",createdDate:"Fecha de creación",modifiedDate:"Fecha de modificación",projects:"Proyectos",contexts:"Contextos",tags:"Etiquetas",blocked:"Bloqueada",blocking:"Bloqueando"}},reminderContextMenu:{remindBeforeDue:"Recordar antes del vencimiento...",remindBeforeScheduled:"Recordar antes de programado...",manageAllReminders:"Gestionar todos los recordatorios...",clearAllReminders:"Limpiar todos los recordatorios",quickReminders:{atTime:"A la hora del evento",fiveMinutesBefore:"5 minutos antes",fifteenMinutesBefore:"15 minutos antes",oneHourBefore:"1 hora antes",oneDayBefore:"1 día antes"}},recurrenceContextMenu:{daily:"Diario",weeklyOn:"Semanal en {day}",everyTwoWeeksOn:"Cada 2 semanas en {day}",monthlyOnThe:"Mensual en el {ordinal}",everyThreeMonthsOnThe:"Cada 3 meses en el {ordinal}",yearlyOn:"Anual en {month} {ordinal}",weekdaysOnly:"Solo días de semana",dailyAfterCompletion:"Diario (después de completar)",every3DaysAfterCompletion:"Cada 3 días (después de completar)",weeklyAfterCompletion:"Semanal (después de completar)",monthlyAfterCompletion:"Mensual (después de completar)",customRecurrence:"Recurrencia personalizada...",clearRecurrence:"Limpiar recurrencia",customRecurrenceModal:{title:"Recurrencia personalizada",startDate:"Fecha de inicio",startDateDesc:"La fecha cuando comienza el patrón de recurrencia",startTime:"Hora de inicio",startTimeDesc:"La hora cuando deben aparecer las instancias recurrentes (opcional)",recurFrom:"Recurrir desde",recurFromDesc:"¿Cuándo debe calcularse la siguiente ocurrencia?",scheduledDate:"Fecha programada",completionDate:"Fecha de finalización",frequency:"Frecuencia",interval:"Intervalo",intervalDesc:"Cada X días/semanas/meses/años",daysOfWeek:"Días de la semana",daysOfWeekDesc:"Seleccionar días específicos (para recurrencia semanal)",monthlyRecurrence:"Recurrencia mensual",monthlyRecurrenceDesc:"Elegir cómo repetir mensualmente",yearlyRecurrence:"Recurrencia anual",yearlyRecurrenceDesc:"Elegir cómo repetir anualmente",endCondition:"Condición de fin",endConditionDesc:"Elegir cuándo debe terminar la recurrencia",neverEnds:"Nunca termina",endAfterOccurrences:"Terminar después de {count} ocurrencias",endOnDate:"Terminar en {date}",onDayOfMonth:"En el día {day} de cada mes",onTheWeekOfMonth:"En el {week} {day} de cada mes",onDateOfYear:"En {month} {day} cada año",onTheWeekOfYear:"En el {week} {day} de {month} cada año",frequencies:{daily:"Diario",weekly:"Semanal",monthly:"Mensual",yearly:"Anual"},weekPositions:{first:"primer",second:"segundo",third:"tercer",fourth:"cuarto",last:"último"},weekdays:{monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado",sunday:"Domingo"},weekdaysShort:{mon:"Lun",tue:"Mar",wed:"Mié",thu:"Jue",fri:"Vie",sat:"Sáb",sun:"Dom"},cancel:"Cancelar",save:"Guardar"}}}};var Uue={common:{appName:"TaskNotes",new:"新規",cancel:"キャンセル",confirm:"確認",close:"閉じる",save:"保存",reorder:{confirmLargeTitle:"大規模な並べ替えを確認",confirmButton:"ノートを並べ替える",confirmLargeMessage:'ここで並べ替えると、{scope} の永続的な手動順序を作るために {count} 件のノートの "{field}" が更新されます。同じ範囲内の非表示または絞り込み済みのノートも更新される場合があります。続行しますか?'},language:"言語",systemDefault:"システムの既定",loading:"読み込み中...",languages:{en:"英語",fr:"フランス語",ru:"ロシア語",zh:"中国語",de:"ドイツ語",es:"スペイン語",ja:"日本語",pt:"ポルトガル語(ブラジル)",ko:"韓国語"},weekdays:{sunday:"日曜日",monday:"月曜日",tuesday:"火曜日",wednesday:"水曜日",thursday:"木曜日",friday:"金曜日",saturday:"土曜日"},months:{january:"1月",february:"2月",march:"3月",april:"4月",may:"5月",june:"6月",july:"7月",august:"8月",september:"9月",october:"10月",november:"11月",december:"12月"}},views:{agenda:{title:"アジェンダ",today:"今日",overdue:"期限切れ",refreshCalendars:"カレンダーを更新",actions:{previousPeriod:"前の期間",nextPeriod:"次の期間",goToToday:"今日に移動",refreshCalendars:"カレンダー購読を更新"},loading:"アジェンダを読み込み中...",dayToggle:"日の切り替え",overdueToggle:"期限切れセクションの切り替え",expandAllDays:"すべての日を展開",collapseAllDays:"すべての日を折りたたみ",notices:{calendarNotReady:"カレンダーサービスはまだ準備できていません",calendarRefreshed:"カレンダー購読が更新されました",refreshFailed:"更新に失敗しました"},empty:{noItemsScheduled:"予定されたアイテムがありません",noItemsFound:"アイテムが見つかりませんでした",helpText:"期限日または予定日のあるタスクを作成するか、ノートを追加してここに表示してください。"},contextMenu:{showOverdueSection:"期限切れセクションを表示",showNotes:"ノートを表示",calendarSubscriptions:"カレンダー購読"},periods:{thisWeek:"今週"},tipPrefix:"ヒント:"},taskList:{title:"タスク",expandAllGroups:"すべてのグループを展開",collapseAllGroups:"すべてのグループを折りたたみ",noTasksFound:"選択されたフィルターにタスクが見つかりませんでした。",reorder:{scope:{ungrouped:"この未グループ化リスト",group:'グループ "{group}"'}},errors:{formulaGroupingReadOnly:"数式ベースのグループではタスクを並べ替えできません。数式の値は計算結果のため、直接変更できません。"}},notes:{title:"ノート",refreshButton:"更新",refreshingButton:"更新中...",notices:{indexingDisabled:"ノートのインデックス作成が無効になっています"},empty:{noNotesFound:"ノートが見つかりませんでした",helpText:"選択された日付のノートが見つかりません。ミニカレンダービューで別の日付を選択するか、ノートを作成してください。"},loading:"ノートを読み込み中...",refreshButtonAriaLabel:"ノートリストを更新"},miniCalendar:{title:"ミニカレンダー",contextMenu:{openDailyNote:"デイリーノートを開く",openWeeklyNote:"ウィークリーノートを開く"}},advancedCalendar:{title:"カレンダー",filters:{showFilters:"フィルターを表示",hideFilters:"フィルターを非表示"},viewOptions:{calendarSubscriptions:"カレンダー購読",timeEntries:"時間エントリ",timeblocks:"タイムブロック",scheduledDates:"予定日",dueDates:"期限日",allDaySlot:"終日スロット",scheduledTasks:"予定タスク",recurringTasks:"繰り返しタスク"},buttons:{refresh:"更新",refreshHint:"カレンダー購読を更新"},notices:{icsServiceNotAvailable:"ICS購読サービスが利用できません",calendarRefreshedAll:"すべてのカレンダー購読が正常に更新されました",refreshFailed:"一部のカレンダー購読の更新に失敗しました",timeblockSpecificTime:"タイムブロックには具体的な時間が必要です。週表示または日表示で時間範囲を選択してください。",timeblockMoved:"タイムブロック「{title}」を{date}に移動しました",timeblockUpdated:"タイムブロック「{title}」の時間を更新しました",timeblockMoveFailed:"タイムブロックの移動に失敗しました:{message}",timeblockResized:"タイムブロック「{title}」の期間を更新しました",timeblockResizeFailed:"タイムブロックのサイズ変更に失敗しました:{message}",taskScheduled:"タスク「{title}」を{date}に予定しました",scheduleTaskFailed:"タスクの予定に失敗しました",endTimeAfterStart:"終了時刻は開始時刻より後である必要があります",timeEntryNotFound:"時間エントリが見つかりません",timeEntryDeleted:"時間エントリを削除しました",deleteTimeEntryFailed:"時間エントリの削除に失敗しました"},timeEntry:{estimatedSuffix:"見積",trackedSuffix:"記録",recurringPrefix:"繰り返し:",completedPrefix:"完了:",createdPrefix:"作成:",modifiedPrefix:"変更:",duePrefix:"期限:",scheduledPrefix:"予定:"},contextMenus:{openTask:"タスクを開く",deleteTimeEntry:"時間エントリを削除",deleteTimeEntryTitle:"時間エントリを削除",deleteTimeEntryConfirm:"この時間エントリ{duration}を削除してもよろしいですか?この操作は元に戻せません。",deleteButton:"削除",cancelButton:"キャンセル"}},basesCalendar:{title:"ベースカレンダー",today:"今日",buttonText:{month:"月",week:"週",day:"日",year:"年",list:"一覧",customDays:"{count}日",listDays:"{count}日一覧",refresh:"更新"},hints:{refresh:"カレンダー購読を更新",today:"今日に移動",prev:"前へ",next:"次へ",month:"月表示",week:"週表示",day:"日表示",year:"年表示",list:"一覧表示",customDays:"{count}日表示"},settings:{groups:{dateNavigation:"日付ナビゲーション",events:"イベント",layout:"レイアウト",view:"ビュー",display:"表示",timeGrid:"時間グリッド",eventLayout:"イベント配置",propertyBasedEvents:"プロパティベースのイベント",calendarSubscriptions:"カレンダー購読",googleCalendars:"Google カレンダー",microsoftCalendars:"Microsoft カレンダー"},dateNavigation:{navigateToDate:"日付に移動",navigateToDatePlaceholder:"YYYY-MM-DD(例:2025-01-15)- プロパティを使用する場合は空のままにする",navigateToDateFromProperty:"プロパティから日付に移動",navigateToDateFromPropertyPlaceholder:"日付プロパティを選択(オプション)",propertyNavigationStrategy:"プロパティナビゲーション戦略",createDailyNotesFromDateLinks:"日付リンクからデイリーノートを作成",strategies:{first:"最初の結果",earliest:"最も古い日付",latest:"最新の日付"}},events:{showScheduledTasks:"予定されたタスクを表示",showDueTasks:"期限のあるタスクを表示",showOverdueOnToday:"期限切れタスクを今日に表示",showRecurringTasks:"繰り返しタスクを表示",showTimeEntries:"時間エントリを表示",showTimeblocks:"タイムブロックを表示",showPropertyBasedEvents:"プロパティベースのイベントを表示",showCompletedRecurringInstances:"完了した繰り返しインスタンスを表示",showSkippedRecurringInstances:"スキップした繰り返しインスタンスを表示"},layout:{calendarView:"カレンダービュー",customDayCount:"カスタム日数",listDayCount:"一覧表示日数",dayStartTime:"1日の開始時刻",dayStartTimePlaceholder:"HH:mm:ss(例:08:00:00)",dayEndTime:"1日の終了時刻",dayEndTimePlaceholder:"HH:mm:ss(例:20:00:00)",timeSlotDuration:"タイムスロット期間",timeSlotDurationPlaceholder:"HH:mm:ss(例:00:30:00)",dragDropResolution:"ドラッグ/ドロップ間隔",dragDropResolutionPlaceholder:"HH:mm:ss(例:00:05:00)",weekStartsOn:"週の開始曜日",showWeekNumbers:"週番号を表示",showNowIndicator:"現在の時刻インジケータを表示",showWeekends:"週末を表示",showAllDaySlot:"終日スロットを表示",showTimeGrid:"時間グリッドを表示",showTodayHighlight:"今日をハイライト",todayColumnWidthMultiplier:"今日列の幅倍率",showSelectionPreview:"選択プレビューを表示",timeFormat:"時刻形式",timeFormat12:"12時間制(AM/PM)",timeFormat24:"24時間制",initialScrollTime:"初期スクロール時刻",initialScrollTimePlaceholder:"HH:mm:ss(例:08:00:00)",minimumEventHeight:"最小イベント高さ(px)",slotEventOverlap:"イベントの重なりを許可",enableSearch:"検索ボックスを有効化",eventMaxStack:"最大スタックイベント数(週/日表示、0 = 無制限)",dayMaxEvents:"1日あたりの最大イベント数(月表示、0 = 自動)",dayMaxEventRows:"1日あたりの最大イベント行数(月表示、0 = 無制限)",spanScheduledToDue:"予定日から期日までタスクを延長表示",heightMode:"高さモード",heightModeFill:"コンテナを埋める",heightModeAuto:"自動高さ"},propertyBasedEvents:{startDateProperty:"開始日プロパティ",startDatePropertyPlaceholder:"開始日時のプロパティを選択",endDateProperty:"終了日プロパティ(オプション)",endDatePropertyPlaceholder:"終了日時のプロパティを選択",titleProperty:"タイトルプロパティ(オプション)",titlePropertyPlaceholder:"イベントタイトルのプロパティを選択"}},notices:{noDailyNoteForDate:"この日付のデイリーノートはありません。"},errors:{failedToInitialize:"カレンダーの初期化に失敗しました"}},kanban:{title:"カンバン",newTask:"新しいタスク",addCard:"+ カードを追加",noTasks:"タスクなし",uncategorized:"未分類",noProject:"プロジェクトなし",reorder:{scope:{column:'列 "{group}"',columnInSwimlane:'スイムレーン "{swimlane}" の列 "{group}"'}},notices:{loadFailed:"カンバンボードの読み込みに失敗しました",movedTask:'タスクを"{0}"に移動しました'},errors:{loadingBoard:"ボードの読み込みエラー。",noGroupBy:"カンバンビューには「グループ化」プロパティの設定が必要です。「並び替え」ボタンをクリックし、「グループ化」でプロパティを選択してください。",formulaGroupingReadOnly:"数式ベースの列間でタスクを移動することはできません。数式の値は計算されるため、直接変更することはできません。",formulaSwimlaneReadOnly:"数式ベースのスイムレーン間でタスクを移動することはできません。数式の値は計算されるため、直接変更することはできません。"},columnTitle:"無題"},pomodoro:{title:"ポモドーロ",status:{focus:"フォーカス",ready:"開始準備完了",paused:"一時停止",working:"作業中",shortBreak:"短い休憩",longBreak:"長い休憩",breakPrompt:"素晴らしい仕事です!{length}休憩の時間です",breakLength:{short:"短い",long:"長い"},breakComplete:"休憩完了!次のポモドーロの準備はできましたか?"},buttons:{start:"開始",pause:"一時停止",stop:"停止",resume:"再開",startShortBreak:"短い休憩を開始",startLongBreak:"長い休憩を開始",skipBreak:"休憩をスキップ",chooseTask:"タスクを選択...",changeTask:"タスクを変更...",clearTask:"タスクをクリア",selectDifferentTask:"別のタスクを選択",startFocus:"フォーカスを開始",addMinute:"1分追加",subtractMinute:"1分減らす"},notices:{noTasks:"アーカイブされていないタスクが見つかりません。最初にタスクを作成してください。",loadFailed:"タスクの読み込みに失敗しました",invalidDuration:"10、10:30、1:30:00 のような時間を入力してください。"},statsLabel:"今日完了",meta:{ready:"{time} 予定 · 今日 {count} 完了",running:"残り {time} · {endTime} に終了",paused:"{type} 一時停止中 · 残り {time}",breakReady:"{type} 準備完了 · {time} 予定"},timer:{editLabel:"タイマー時間を編集",inputLabel:"タイマー時間"}},pomodoroStats:{title:"ポモドーロ統計",heading:"ポモドーロ統計",refresh:"更新",sections:{overview:"概要",today:"今日",week:"今週",allTime:"全期間",recent:"最近のセッション"},overviewCards:{todayPomos:{label:"今日のポモ",change:{more:"昨日より{count}多い",less:"昨日より{count}少ない"}},totalPomos:{label:"総ポモ数"},todayFocus:{label:"今日のフォーカス",change:{more:"昨日より{duration}多い",less:"昨日より{duration}少ない"}},totalFocus:{label:"総フォーカス時間"}},stats:{pomodoros:"ポモドーロ",streak:"連続記録",minutes:"分",average:"平均長さ",completion:"完了"},recents:{empty:"まだセッションが記録されていません",duration:"{minutes}分",status:{completed:"完了",interrupted:"中断"},delete:"セッションを削除",deleteAria:"Pomodoroセッションを削除",deleteConfirmTitle:"Pomodoroセッションを削除しますか?",deleteConfirmMessage:"これによりPomodoro履歴からセッションが削除されます。既存のタスク時間エントリは変更されません。",deleteConfirmButton:"削除",deleteSuccess:"Pomodoroセッションを削除しました",deleteNotFound:"Pomodoroセッションが見つかりませんでした"},basesMigration:{title:"Baseビューが必要ですか?",description:"Pomodoro Baseビューはデイリーノートのfrontmatterを使用します。生成されたPomodoro統計Baseでこの履歴を見るには、設定でPomodoroデータを移行し、保存先をデイリーノートに設定してください。"}},stats:{title:"統計",taskProjectStats:"タスクとプロジェクトの統計",sections:{filters:"フィルター",overview:"概要",today:"今日",thisWeek:"今週",thisMonth:"今月",projectBreakdown:"プロジェクト内訳",dateRange:"日付範囲"},filters:{minTime:"最小時間(分)",allTasks:"すべてのタスク",activeOnly:"アクティブのみ",completedOnly:"完了のみ"},refreshButton:"更新",timeRanges:{allTime:"全期間",last7Days:"過去7日間",last30Days:"過去30日間",last90Days:"過去90日間",customRange:"カスタム範囲"},resetFiltersButton:"フィルターをリセット",dateRangeFrom:"開始",dateRangeTo:"終了",noProject:"プロジェクトなし",cards:{timeTrackedEstimated:"追跡時間 / 見積時間",totalTasks:"総タスク数",completionRate:"完了率",activeProjects:"アクティブプロジェクト",avgTimePerTask:"タスクあたりの平均時間"},labels:{tasks:"タスク",completed:"完了",projects:"プロジェクト"},noProjectData:"プロジェクトデータがありません",notAvailable:"N/A",noTasks:"タスクが見つかりません",loading:"読み込み中..."},releaseNotes:{title:"TaskNotes {version} の新機能",header:"TaskNotes {version} の新機能",viewAllLink:"GitHubですべてのリリースノートを表示 →",starMessage:"どんなフィードバックも本当にありがたいです。何か違和感があれば、GitHubでお知らせください。TaskNotesが役に立ったら、スターもご検討ください。",baseFilesNotice:"> [!info] デフォルトの `.base` ファイルについて\n> デフォルトで生成される `.base` テンプレートの変更で、既存の `.base` ファイルが上書きされることはありません。カスタマイズはそのまま保持されます。\n> 最新のテンプレート改善を反映したい場合は、**設定 → TaskNotes → 一般 → ビューとbaseファイル → ファイルを更新** からベースファイルを再生成してください。"}},settings:{header:{documentation:"ドキュメント",documentationUrl:"https://tasknotes.dev"},tabs:{general:"一般",taskProperties:"タスクプロパティ",modalFields:"モーダルフィールド",defaults:"デフォルトとテンプレート",appearance:"外観とUI",features:"機能",integrations:"統合"},features:{inlineTasks:{header:"インラインタスク",description:"ノート内のタスクリンクとチェックボックスからタスクへの変換の設定。"},taskCreation:{header:"タスク作成",description:"タスク作成後の動作を設定します。",openAfterCreate:{name:"作成後にタスクを開く",description:"通常の新規タスク作成モーダルで保存後に新しいタスクノートを開くかどうかを選択します。",options:{none:"開かない",sameTab:"同じタブで開く",newTab:"新しいタブで開く"}}},overlays:{taskLinkToggle:{name:"タスクリンクオーバーレイ",description:"タスクリンクにホバーした際のインタラクティブオーバーレイを表示"},aliasExclusion:{name:"エイリアス付きリンクでオーバーレイを無効化",description:"リンクにエイリアスが含まれている場合、タスクウィジェットを表示しない(例: [[タスク|エイリアス]])。"}},instantConvert:{toggle:{name:"チェックボックスの横に変換ボタンを表示",description:"MarkdownチェックボックスをTaskNotesに変換するインラインボタンを表示する"},preserveCheckbox:{name:"変換時にチェックボックスを残す",description:"チェックボックスをTaskNoteリンクに変換するとき、元のMarkdownチェックボックス記号を残します"},folder:{name:"インライン作成タスクのフォルダ",description:"インラインコマンドまたはチェックボックス変換から作成されるタスクの作成先フォルダです。空のままにするとデフォルトのタスクフォルダを使用します。現在のノートのフォルダには {{currentNotePath}}、現在のノート名のサブフォルダには {{currentNoteTitle}} を使用します。"}},nlp:{header:"自然言語処理",description:"テキスト入力から日付、優先度、その他のプロパティを解析します。",enable:{name:"自然言語タスク入力を有効にする",description:"タスク作成時に自然言語から期限日、優先度、コンテキストを解析"},defaultToScheduled:{name:"デフォルトで予定に設定",description:"NLPがコンテキストなしで日付を検出した場合、期限ではなく予定として扱う"},language:{name:"NLP言語",description:"自然言語処理パターンと日付解析の言語"},statusTrigger:{name:"ステータス提案トリガー",description:"ステータス提案をトリガーするテキスト(無効にするには空白のままにする)"}},pomodoro:{header:"ポモドーロタイマー",description:"ポモドーロタイマーの作業/休憩間隔を設定します。",workDuration:{name:"作業時間",description:"作業間隔の時間(分)"},shortBreak:{name:"短い休憩時間",description:"短い休憩の時間(分)"},longBreak:{name:"長い休憩時間",description:"長い休憩の時間(分)"},longBreakInterval:{name:"長い休憩間隔",description:"長い休憩前の作業セッション数"},autoStartBreaks:{name:"自動休憩開始",description:"作業セッション後に休憩タイマーを自動開始"},autoStartWork:{name:"自動作業開始",description:"休憩後に作業セッションを自動開始"},notifications:{name:"ポモドーロ通知",description:"ポモドーロセッション終了時に通知を表示"},mobileSidebar:{name:"モバイルサイドバー",description:"モバイルデバイスでポモドーロタイマーを開く場所",tab:"ノートパネル",left:"左サイドバー",right:"右サイドバー"},statusBar:{name:"ステータスバーにPomodoroを表示",description:"ObsidianのステータスバーにアクティブなPomodoroカウントダウンを表示"}},uiLanguage:{header:"インターフェース言語",description:"TaskNotesのメニュー、通知、ビューの言語を変更します。",dropdown:{name:"UI言語",description:"TaskNotesインターフェーステキストに使用する言語を選択"}},pomodoroSound:{enabledName:"サウンド有効",enabledDesc:"ポモドーロセッション終了時にサウンドを再生",volumeName:"サウンド音量",volumeDesc:"ポモドーロサウンドの音量(0-100)"},dataStorage:{name:"ポモドーロデータストレージ",description:"ポモドーロセッションデータの保存場所と管理方法を設定します。",dailyNotes:"デイリーノート",pluginData:"プラグインデータ",notices:{locationChanged:"ポモドーロストレージ場所を{location}に変更しました"}},notifications:{header:"通知",description:"タスクリマインダー通知とアラートを設定します。",enableName:"通知を有効にする",enableDesc:"タスクリマインダー通知を有効にする",typeName:"通知タイプ",typeDesc:"表示する通知のタイプ",systemLabel:"システム通知",inAppLabel:"アプリ内通知",soundEnabledName:"通知音",soundEnabledDesc:"タスクリマインダー発火時に音を再生",soundVolumeName:"音量",soundVolumeDesc:"タスクリマインダー音の音量 (0-100)",soundPreviewName:"通知音をプレビュー",soundPreviewDesc:"設定されたタスクリマインダー音を再生",soundPreviewButton:"プレビュー",testReminderName:"テストリマインダーを送信",testReminderDesc:"現在の通知タイプとサウンド設定でテストリマインダーを送信します。",testReminderButton:"テストを送信"},overdue:{hideCompletedName:"期限切れから完了タスクを非表示",hideCompletedDesc:"期限切れタスク計算から完了タスクを除外"},indexing:{disableName:"ノートインデックス作成を無効にする",disableDesc:"パフォーマンス向上のためノートコンテンツの自動インデックス作成を無効にする"},suggestions:{debounceName:"提案デバウンス",debounceDesc:"提案を表示する前の遅延(ミリ秒)"},timeTracking:{autoStopName:"時間追跡の自動停止",autoStopDesc:"タスクが完了とマークされたときに時間追跡を自動停止",stopNotificationName:"時間追跡停止通知",stopNotificationDesc:"時間追跡が自動停止されたときに通知を表示"},recurring:{maintainOffsetName:"繰り返しタスクで期限日オフセットを維持",maintainOffsetDesc:"繰り返しタスクが完了したときに期限日と予定日の間のオフセットを保持",resetCheckboxesName:"繰り返し時にチェックボックスをリセット",resetCheckboxesDesc:"繰り返しタスクが完了して再スケジュールされたときに、タスク本文のすべてのmarkdownチェックボックスをリセット"},timeblocking:{header:"タイムブロッキング",description:"デイリーノートでの軽量スケジューリングのためのタイムブロック機能を設定します。カレンダービューでドラッグしてイベントを作成 - コンテキストメニューから'タイムブロック'を選択します。",enableName:"タイムブロッキングを有効にする",enableDesc:"デイリーノートでの軽量スケジューリングのためのタイムブロック機能を有効にする。有効にすると、カレンダーのドラッグコンテキストメニューに'タイムブロック'オプションが表示されます。",showBlocksName:"タイムブロックを表示",showBlocksDesc:"デイリーノートからのタイムブロックをデフォルトで表示",defaultColorName:"デフォルトのタイムブロック色",defaultColorDesc:"新しいタイムブロック作成時に使用されるデフォルトの色",usage:"使用方法:カレンダーでドラッグしてイベントを作成します。コンテキストメニューから'タイムブロック'を選択します(タイムブロッキングが有効な場合のみ表示されます)。ドラッグして既存のタイムブロックを移動します。端を調整して時間を変更します。"},performance:{header:"パフォーマンスと動作",description:"プラグインのパフォーマンスと動作オプションを設定します。"},timeTrackingSection:{header:"時間追跡",description:"自動時間追跡の動作を設定します。"},recurringSection:{header:"繰り返しタスク",description:"繰り返しタスク管理の動作を設定します。"},debugLogging:{header:"デバッグログ",description:"トラブルシューティングのためにデバッグログ出力を設定します。",enableName:"デバッグログを有効化",enableDesc:"ドラッグ・アンド・ドロップや表示の詳細な診断情報を開発者コンソールに記録します。トラブルシューティングに役立ちます。"}},defaults:{header:{basicDefaults:"基本デフォルト",dateDefaults:"日付デフォルト",defaultReminders:"デフォルトリマインダー",bodyTemplate:"ボディテンプレート",instantTaskConversion:"インスタントタスク変換"},description:{basicDefaults:"タスク作成を高速化するために新しいタスクのデフォルト値を設定します。",dateDefaults:"新しいタスクのデフォルト期限日と予定日を設定します。",defaultReminders:"新しいタスクに追加されるデフォルトリマインダーを設定します。",bodyTemplate:"新しいタスクコンテンツに使用するテンプレートファイルを設定します。",instantTaskConversion:"テキストをタスクにインスタント変換する際の動作を設定します。"},basicDefaults:{defaultStatus:{name:"デフォルトステータス",description:"新しいタスクのデフォルトステータス"},defaultPriority:{name:"デフォルト優先度",description:"新しいタスクのデフォルト優先度"},defaultContexts:{name:"デフォルトコンテキスト",description:"デフォルトコンテキストのカンマ区切りリスト(例:@home、@work)",placeholder:"@自宅, @仕事"},defaultTags:{name:"デフォルトタグ",description:"デフォルトタグのカンマ区切りリスト(#なし)",placeholder:"重要, 緊急"},defaultProjects:{name:"デフォルトプロジェクト",description:"新しいタスクのデフォルトプロジェクトリンク",selectButton:"プロジェクトを選択",selectTooltip:"デフォルトでリンクするプロジェクトノートを選択",removeTooltip:"デフォルトプロジェクトから{name}を削除"},useParentNoteForTaskCreation:{name:"新しいタスクでアクティブノートをプロジェクトとして使用",description:"コマンドパレットまたはリボンからタスク作成を開くとき、アクティブノートをプロジェクトとして自動的にリンクします"},useParentNoteAsProject:{name:"インライン作成とインスタント変換で親ノートをプロジェクトとして使用",description:"インラインタスク作成またはインスタントタスク変換を使うとき、元のノートをプロジェクトとして自動的にリンクします"},useParentHeaderAsProject:{name:"インスタント変換時に親見出しをプロジェクトとして使用",description:"インスタントタスク変換時に変換行の上にある最も近い見出しをプロジェクトとして自動的にリンク"},defaultTimeEstimate:{name:"デフォルト時間見積もり",description:"デフォルト時間見積もり(分)(0 = デフォルトなし)",placeholder:"60"},defaultRecurrence:{name:"デフォルト繰り返し",description:"新しいタスクのデフォルト繰り返しパターン"}},dateDefaults:{defaultDueDate:{name:"デフォルト期限日",description:"新しいタスクのデフォルト期限日"},defaultScheduledDate:{name:"デフォルト予定日",description:"新しいタスクのデフォルト予定日"}},reminders:{addReminder:{name:"デフォルトリマインダーを追加",description:"すべての新しいタスクに追加される新しいデフォルトリマインダーを作成",buttonText:"リマインダーを追加"},emptyState:"デフォルトリマインダーが設定されていません。リマインダーを追加して新しいタスクについて自動的に通知を受け取ります。",emptyStateButton:"リマインダーを追加",reminderDescription:"リマインダーの説明",unnamedReminder:"名前なしリマインダー",deleteTooltip:"リマインダーを削除",fields:{description:"説明:",type:"タイプ:",offset:"オフセット:",unit:"単位:",direction:"方向:",relatedTo:"関連先:",date:"日付:",time:"時間:"},types:{relative:"相対(タスク日付の前/後)",absolute:"絶対(特定の日付/時間)"},units:{minutes:"分",hours:"時間",days:"日"},directions:{before:"前",after:"後"},relatedTo:{due:"期限日",scheduled:"予定日"}},bodyTemplate:{useBodyTemplate:{name:"ボディテンプレートを使用",description:"タスクボディコンテンツにテンプレートファイルを使用"},bodyTemplateFile:{name:"ボディテンプレートファイル",description:"タスクボディコンテンツのテンプレートファイルへのパス。{{title}}、{{date}}、{{time}}、{{priority}}、{{status}}などのテンプレート変数をサポート。",placeholder:"テンプレート/タスクテンプレート.md",ariaLabel:"ボディテンプレートファイルへのパス"},useOccurrenceBodyTemplate:{name:"発生ノートテンプレートを使用",description:"繰り返しタスクに occurrence_template がない場合、マテリアライズされた発生ノート用の別のフォールバックテンプレートを使用します"},occurrenceBodyTemplateFile:{name:"発生ノートテンプレートファイル",description:"マテリアライズされた発生ノート用テンプレートファイルへのパス。繰り返しタスクの occurrence_template フィールドがこのフォールバックより優先されます。",placeholder:"テンプレート/発生テンプレート.md",ariaLabel:"発生ノートテンプレートファイルへのパス"},variablesHeader:"テンプレート変数:",variables:{title:"{{title}} - タスクタイトル",details:"{{details}} - モーダルからユーザー提供の詳細",date:"{{date}} - 現在の日付(YYYY-MM-DD)",time:"{{time}} - 現在の時間(HH:MM)",priority:"{{priority}} - タスク優先度",status:"{{status}} - タスクステータス",contexts:"{{contexts}} - タスクコンテキスト",tags:"{{tags}} - タスクタグ",projects:"{{projects}} - タスクプロジェクト"}},instantConversion:{useDefaultsOnInstantConvert:{name:"インスタント変換でタスクデフォルトを使用",description:"テキストをタスクにインスタント変換する際にデフォルトタスク設定を適用"}},options:{noDefault:"デフォルトなし",none:"なし",today:"今日",tomorrow:"明日",nextWeek:"来週",daily:"毎日",weekly:"毎週",monthly:"毎月",yearly:"毎年"}},general:{taskStorage:{header:"タスクストレージ",description:"タスクの保存場所と識別方法を設定します。",defaultFolder:{name:"デフォルトタスクフォルダー",description:"新しいタスクのデフォルト保存場所です。{{currentNotePath}}、{{currentNoteTitle}}、{{projectFilePath}} などのフォルダテンプレート変数と、YYYY/MM/DD などのDaily Notes形式の日付トークンをサポートします。"},moveArchived:{name:"アーカイブしたタスクをフォルダーに移動",description:"アーカイブしたタスクを自動的にアーカイブフォルダーに移動"},archiveFolder:{name:"アーカイブフォルダー",description:"アーカイブ時にタスクを移動するフォルダー。{{year}}、{{month}}、{{priority}}などのテンプレート変数をサポートします。"}},taskIdentification:{header:"タスク識別",description:"TaskNotesがノートをタスクとして識別する方法を選択します。",identifyBy:{name:"タスクの識別方法",description:"タグまたはフロントマタープロパティでタスクを識別するかを選択",options:{tag:"タグ",property:"プロパティ"}},taskTag:{name:"タスクタグ",description:"ノートをタスクとして識別するタグ(#なし)。これを変更しても既存の .base ビューのフィルターは古いタグのままです。デフォルトの Base ファイルを更新するか、それらのフィルターを編集してください。"},hideIdentifyingTags:{name:"タスクカードで識別タグを非表示",description:"有効にすると、タスク識別タグに一致するタグ('task/project'のような階層的一致を含む)がタスクカード表示から非表示になります"},hideIdentifyingTagsMode:{name:"非表示にするタグの範囲",description:"識別タグを非表示にするとき、ネストしたタグも非表示にするかを選択します。",options:{all:"タスクタグとネストしたタグ",exactOnly:"完全一致のタスクタグのみ"}},taskProperty:{name:"タスクプロパティ名",description:'フロントマタープロパティ名(例:"category")'},taskPropertyValue:{name:"タスクプロパティ値",description:'ノートをタスクとして識別する値(例:"task")'}},folderManagement:{header:"フォルダー管理",excludedFolders:{name:"除外フォルダー",description:"タスクのインデックス作成とプロジェクト候補から除外するフォルダーのカンマ区切りリスト"}},frontmatter:{header:"Frontmatter",description:"frontmatterプロパティでのリンクのフォーマット方法を設定します。",useMarkdownLinks:{name:"frontmatterでmarkdownリンクを使用",description:`frontmatterプロパティでwikilink([[link]])の代わりにmarkdownリンク([text](path))を生成します。
⚠️ 正しく機能するには'obsidian-frontmatter-markdown-links'プラグインが必要です。`}},taskInteraction:{header:"タスクインタラクション",description:"タスクをクリックする際の動作を設定します。",singleClick:{name:"シングルクリックアクション",description:"タスクカードをシングルクリックした際に実行するアクション"},doubleClick:{name:"ダブルクリックアクション",description:"タスクカードをダブルクリックした際に実行するアクション"},actions:{edit:"タスクを編集",openNote:"ノートを開く",none:"アクションなし"}},releaseNotes:{header:"リリースノート",description:"現在のバージョン:{version}",showOnUpdate:{name:"更新後にリリースノートを表示",description:"TaskNotesが新しいバージョンに更新されたときに自動的にリリースノートを開く"},checkForUpdates:{name:"起動時に新しいリリースを確認",description:"TaskNotes の起動時に GitHub を一度だけ確認し、互換性のある新しいリリースが利用可能な場合に通知を表示します"},viewButton:{name:"リリースノートを表示",description:"TaskNotesの最新バージョンの新機能を確認する",buttonText:"リリースノートを表示"}}},taskProperties:{sections:{coreProperties:"コアプロパティ",corePropertiesDesc:"ステータスと優先度は、タスクの状態と重要度を定義するコアプロパティです。",dateProperties:"日付プロパティ",datePropertiesDesc:"タスクの期限と予定日を設定します。",organizationProperties:"整理プロパティ",organizationPropertiesDesc:"コンテキスト、プロジェクト、タグでタスクを整理します。",taskDetails:"タスク詳細",taskDetailsDesc:"時間見積もり、繰り返し、リマインダーなどの追加詳細。",metadataProperties:"メタデータプロパティ",metadataPropertiesDesc:"タスク履歴を追跡するためのシステム管理プロパティ。",featureProperties:"機能プロパティ",featurePropertiesDesc:"ポモドーロタイマーやカレンダー同期など、特定のTaskNotes機能で使用されるプロパティ。"},propertyCard:{propertyKey:"プロパティキー:",default:"デフォルト:",nlpTrigger:"NLPトリガー:",triggerChar:"トリガー文字:",triggerEmpty:"トリガーは空にできません",triggerTooLong:"トリガーが長すぎます(最大10文字)"},properties:{status:{name:"ステータス",description:"タスクの現在の状態を追跡します(例:todo、進行中、完了)。ステータスはタスクが完了として表示されるかどうかを決定し、自動アーカイブをトリガーできます。"},priority:{name:"優先度",description:"タスクの重要度を示します。ソートとフィルタリングに使用されます。Basesビューでは値がアルファベット順にソートされるため、1-、2-のようなプレフィックスを使用して順序を制御してください。"},due:{name:"期限日",description:"タスクを完了しなければならない締め切り。期限を過ぎたタスクは期限切れとして表示されます。フロントマターに日付として保存されます。"},scheduled:{name:"予定日",description:"タスクに取り組む予定の日時。期限日とは異なり、これは開始予定時刻を表します。タスクは予定日時にカレンダーに表示されます。"},contexts:{name:"コンテキスト",description:"タスクを実行できる場所や条件(例:@自宅、@オフィス、@電話)。現在の状況に応じてタスクをフィルタリングするのに便利です。リストとして保存されます。"},projects:{name:"プロジェクト",description:"このタスクが属するプロジェクトノートへのリンク。ウィキリンクとして保存されます(例:[[プロジェクト名]])。タスクは複数のプロジェクトに所属できます。"},tags:{name:"タグ",description:"タスクを分類するためのネイティブObsidianタグ。フロントマターのtagsプロパティに保存され、Obsidianのタグ機能と連携します。"},timeEstimate:{name:"時間見積もり",description:"タスク完了までの推定分数。タイムブロッキングとワークロード計画に使用されます。タスクカードとカレンダーイベントに表示されます。"},recurrence:{name:"繰り返し",description:"繰り返しタスクのパターン(毎日、毎週、毎月、毎年、またはカスタムRRULE)。繰り返しタスクが完了すると、予定日は自動的に次の発生日に更新されます。"},recurrenceAnchor:{name:"繰り返しアンカー",description:"次の発生日の計算方法を制御します:'scheduled'は予定日を使用、'completion'は実際の完了日を使用します。"},reminders:{name:"リマインダー",description:"期限日または予定日の前にトリガーされる通知。タイミングとオプションの説明を含むリマインダーオブジェクトのリストとして保存されます。"},title:{name:"タイトル",description:"タスク名。フロントマターまたはファイル名に保存できます(「タイトルをファイル名に保存」が有効な場合)。"},dateCreated:{name:"作成日",description:"タスクが最初に作成されたタイムスタンプ。自動的に設定され、作成順でのソートに使用されます。"},dateModified:{name:"更新日",description:"タスクへの最後の変更のタイムスタンプ。タスクプロパティが変更されると自動的に更新されます。"},completedDate:{name:"完了日",description:"タスクが完了としてマークされたタイムスタンプ。ステータスが完了状態に変わると自動的に設定されます。"},archiveTag:{name:"アーカイブタグ",description:"アーカイブ時にタスクに追加されるタグ。アーカイブされたタスクを識別するために使用され、アーカイブフォルダへのファイル移動をトリガーできます。"},timeEntries:{name:"時間エントリー",description:"このタスクの時間追跡セッションの記録。各エントリには開始と終了のタイムスタンプが保存されます。合計時間の計算に使用されます。"},completeInstances:{name:"完了インスタンス",description:"繰り返しタスクの完了履歴。各インスタンスが完了した日付を保存して、重複完了を防ぎます。"},skippedInstances:{name:"スキップインスタンス",description:"繰り返しタスクのスキップされた発生。完了ではなくスキップされたインスタンスの日付を保存します。"},blockedBy:{name:"ブロック元",description:"このタスクの前に完了する必要があるタスクへのリンク。ウィキリンクとして保存されます。ブロックされたタスクは視覚的なインジケーターを表示します。"},sortOrder:{name:"手動順序",description:"ドラッグ&ドロップで手動並べ替えを行うために使用するフロントマターのプロパティ。ビューはこのプロパティでソートされている必要があります。"},pomodoros:{name:"ポモドーロ",description:"完了したポモドーロセッションのカウント。データ保存が「デイリーノート」に設定されている場合、これはタスクファイルではなくデイリーノートに書き込まれます。"},icsEventId:{name:"ICSイベントID",description:"ノートをICSカレンダーイベントにリンクする一意の識別子。カレンダーイベントからノートを作成する際に自動的に追加されます。"},icsEventTag:{name:"ICSイベントタグ",description:"ICSカレンダーイベントから作成されたノートを識別するタグ。カレンダー生成ノートを通常のタスクと区別するために使用されます。"}},statusCard:{valuesHeader:"ステータス値"},priorityCard:{valuesHeader:"優先度値"},projectsCard:{defaultProjects:"デフォルトプロジェクト:",useParentNoteForTaskCreation:"新しいタスクでアクティブノートを使用:",useParentNoteForInlineTasks:"インライン/インスタント変換で親ノートを使用:",useParentHeader:"親見出しをプロジェクトとして使用:",inheritParentTaskProperties:"サブタスクに親タスクのプロパティを継承:",noDefaultProjects:"デフォルトプロジェクトが選択されていません",autosuggestFilters:"オートサジェストフィルター",customizeDisplay:"表示をカスタマイズ",filtersOn:"フィルター有効"},titleCard:{storeTitleInFilename:"タイトルをファイル名に保存:",storedInFilename:"ファイル名に保存",filenameUpdatesWithTitle:"タスクタイトルが変更されると、ファイル名は自動的に更新されます。",filenameFormat:"ファイル名形式:",customTemplate:"カスタムテンプレート:",legacySyntaxWarning:"{title}のような単一波括弧構文は非推奨です。本文テンプレートとの一貫性のために、{{title}}のような二重波括弧構文を使用してください。",occurrenceFilenameTemplate:"オカレンスのファイル名テンプレート",occurrenceFilenameTemplateHelp:"繰り返しタスクから実体化されたオカレンス用のファイル名テンプレートです。空欄にすると、既存の名前(親タスクのタイトルと連番のサフィックス)が維持されます。{{occurrenceDate}}、{{occurrenceWeek}}、{{occurrenceMonth}}、{{occurrenceYear}}、{{occurrenceMonthName}}のいずれかを使って粒度を明示的に選択してください。通常のファイル名変数もすべて使用できます。親タスクは、下で設定するフロントマターのプロパティを使ってこのテンプレートを上書きできます。",occurrenceFilenameProperty:"オカレンステンプレートの上書きプロパティ",occurrenceFilenamePropertyHelp:"繰り返し親タスクで、そのオカレンスのファイル名テンプレートを上書きするフロントマタープロパティの名前です。"},tagsCard:{nativeObsidianTags:"ネイティブObsidianタグを使用"},remindersCard:{defaultReminders:"デフォルトリマインダー"},taskStatuses:{header:"タスクステータス",description:"タスクで利用可能なステータスオプションをカスタマイズします。これらのステータスはタスクライフサイクルを制御し、タスクがいつ完了と見なされるかを決定します。",howTheyWork:{title:"ステータスの動作:",value:'値:タスクファイルに保存される内部識別子(例:"in-progress")',label:'ラベル:インターフェースに表示される表示名(例:"進行中")',color:"色:ステータスドットとバッジの視覚的インジケーター色",icon:'アイコン:カラードットの代わりに表示するオプションのLucideアイコン名(例:"check"、"circle"、"clock")。lucide.devでアイコンを閲覧',completed:"完了:チェックすると、このステータスのタスクは完了と見なされ、異なってフィルタリングされる場合があります",autoArchive:"自動アーカイブ:有効にすると、指定された遅延後にタスクが自動的にアーカイブされます(1-1440分)",orderNote:"以下の順序は、タスクステータスバッジをクリックしてステータスを切り替える際のシーケンスを決定します。"},addNew:{name:"新しいステータスを追加",description:"タスクの新しいステータスオプションを作成",buttonText:"ステータスを追加"},validationNote:'注意:少なくとも2つのステータスが必要で、少なくとも1つのステータスが"完了"としてマークされている必要があります。',emptyState:"カスタムステータスが設定されていません。ステータスを追加して開始してください。",emptyStateButton:"ステータスを追加",fields:{value:"値:",label:"ラベル:",color:"色:",icon:"アイコン:",completed:"完了:",excludeFromCycle:"循環時にスキップ:",nextStatus:"次のステータス:",autoArchive:"自動アーカイブ:",delayMinutes:"遅延(分):"},placeholders:{value:"進行中",label:"進行中",icon:"check, circle, clock",nextStatusDefault:"ステータス順を使用"},badges:{completed:"完了"},deleteConfirm:'ステータス"{label}"を削除してもよろしいですか?'},taskPriorities:{header:"タスク優先度",description:"タスクで利用可能な優先度レベルをカスタマイズします。v4.0+では、優先度はBasesビューで値のアルファベット順にソートされます。",howTheyWork:{title:"優先度の動作:",value:'値:タスクファイルに保存される内部識別子。Basesビューでのソート順を制御するには、"1-urgent"、"2-high"のようなプレフィックスを使用します。',label:'表示ラベル:インターフェースに表示される表示名(例:"高優先度")',color:"色:優先度ドットとバッジの視覚的インジケーター色",icon:"アイコン:タスクカードで優先度ドットの代わりに表示する任意の Lucide アイコン",weight:"重み:並び替え用の数値(重みが高いほどリストで先に表示)",weightNote:"タスクは優先度の重みで自動的に降順で並び替えられます(最高重みが最初)。重みは任意の正の数値です。"},addNew:{name:"新しい優先度を追加",description:"タスクの新しい優先度レベルを作成",buttonText:"優先度を追加"},validationNote:"注意:少なくとも1つの優先度が必要です。優先度はBasesビューで値のアルファベット順にソートされます。",emptyState:"カスタム優先度が設定されていません。優先度を追加して開始してください。",emptyStateButton:"優先度を追加",fields:{value:"値:",label:"ラベル:",color:"色:",icon:"アイコン:",weight:"重み:"},placeholders:{value:"高",label:"高優先度",icon:"alert-circle"},weightLabel:"重み:{weight}",deleteConfirm:"少なくとも1つの優先度が必要です",deleteTooltip:"優先度を削除"},fieldMapping:{header:"フィールドマッピング",warning:"⚠️ 警告:TaskNotesはこれらのプロパティ名を読み書きします。タスク作成後にこれらを変更すると不整合が生じる可能性があります。",description:"TaskNotesが各フィールドに使用するフロントマタープロパティを設定します。",resetButton:{name:"フィールドマッピングをリセット",description:"すべてのフィールドマッピングをデフォルト値にリセット",buttonText:"デフォルトにリセット"},notices:{resetSuccess:"フィールドマッピングをデフォルトにリセットしました",resetFailure:"フィールドマッピングのリセットに失敗しました",updateFailure:"{label}のフィールドマッピング更新に失敗しました。再試行してください。"},table:{fieldHeader:"TaskNotesフィールド",propertyHeader:"あなたのプロパティ名"},fields:{title:"タイトル",status:"ステータス",priority:"優先度",due:"期限日",scheduled:"予定日",contexts:"コンテキスト",projects:"プロジェクト",timeEstimate:"時間見積もり",recurrence:"繰り返し",dateCreated:"作成日",completedDate:"完了日",dateModified:"変更日",archiveTag:"アーカイブタグ",timeEntries:"時間エントリ",completeInstances:"完了インスタンス",blockedBy:"ブロック元",sortOrder:"手動順序",pomodoros:"ポモドーロ",icsEventId:"ICSイベントID",icsEventTag:"ICSイベントタグ",reminders:"リマインダー"}},customUserFields:{header:"カスタムユーザーフィールド",description:"すべてのビューで型認識フィルターオプションとして表示されるカスタムフロントマタープロパティを定義します。各行:表示名、プロパティ名、タイプ。",addNew:{name:"新しいユーザーフィールドを追加",description:"フィルターとビューに表示される新しいカスタムフィールドを作成",buttonText:"ユーザーフィールドを追加"},emptyState:"カスタムユーザーフィールドが設定されていません。フィールドを追加してタスクのカスタムプロパティを作成してください。",emptyStateButton:"ユーザーフィールドを追加",fields:{displayName:"表示名:",propertyKey:"プロパティキー:",type:"タイプ:",defaultValue:"デフォルト値:"},placeholders:{displayName:"表示名",propertyKey:"プロパティ名",defaultValue:"デフォルト値",defaultValueList:"デフォルト値(カンマ区切り)"},types:{text:"テキスト",number:"数値",boolean:"ブール",date:"日付",list:"リスト"},defaultNames:{unnamedField:"名前なしフィールド",noKey:"キーなし"},deleteTooltip:"フィールドを削除",autosuggestFilters:{header:"自動提案フィルター",description:"タスク作成時にカスタムユーザーフィールドの自動提案をフィルターします。各フィールドに対して、提案される値を特定のタグ、フォルダー、またはプロパティ値を持つノートに制限できます。"}}},appearance:{taskCards:{header:"タスクカード",description:"すべてのビューでタスクカードの表示方法を設定します。",defaultVisibleProperties:{name:"デフォルト表示プロパティ",description:"タスクカードにデフォルトで表示するプロパティを選択します。"},completionSubmenu:{name:"完了とスキップの操作をサブメニューにまとめる",description:"完了とスキップの操作をタスクのコンテキストメニュー内のサブメニューに表示します。無効にすると、メニューに直接表示されます。"},propertyGroups:{coreProperties:"コアプロパティ",organization:"組織",customProperties:"カスタムプロパティ"},properties:{status:"ステータスドット",priority:"優先度ドット",due:"期限日",scheduled:"予定日",timeEstimate:"時間見積もり",totalTrackedTime:"総追跡時間",checklistProgress:"チェックリストの進捗",recurrence:"繰り返し",completedDate:"完了日",createdDate:"作成日",modifiedDate:"変更日",projects:"プロジェクト",contexts:"コンテキスト",tags:"タグ",blocked:"ブロック中",blocking:"ブロックしている"}},taskFilenames:{header:"タスクファイル名",description:"タスクファイル作成時の命名方法を設定します。",storeTitleInFilename:{name:"ファイル名にタイトルを保存",description:"タスクタイトルをファイル名として使用。タスクタイトルが変更されるとファイル名も更新されます(推奨)。"},filenameFormat:{name:"ファイル名形式",description:"タスクファイル名の生成方法",options:{title:"タスクタイトル(非更新)",zettel:"Zettelkasten形式(YYMMDD + 午前0時からのbase36秒)",timestamp:"完全タイムスタンプ(YYYY-MM-DD-HHMMSS)",custom:"カスタムテンプレート",uuid:"UUID v4"}},customTemplate:{name:"カスタムファイル名テンプレート",description:"カスタムファイル名のテンプレートです。利用可能な変数: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"注意:{{dueDate}}と{{scheduledDate}}はYYYY-MM-DD形式で、設定されていない場合は空になります。"}},displayFormatting:{header:"表示形式",description:"プラグイン全体での日付、時間、その他のデータの表示方法を設定します。",timeFormat:{name:"時間形式",description:"プラグイン全体で12時間または24時間形式で時間を表示",options:{twelveHour:"12時間(AM/PM)",twentyFourHour:"24時間"}}},calendarView:{header:"カレンダービュー",description:"カレンダービューの外観と動作をカスタマイズします。",defaultView:{name:"デフォルトビュー",description:"カレンダータブを開く際に表示されるカレンダービュー",options:{monthGrid:"月グリッド",weekTimeline:"週タイムライン",dayTimeline:"日タイムライン",yearView:"年ビュー",customMultiDay:"カスタム複数日"}},customDayCount:{name:"カスタムビュー日数",description:"カスタム複数日ビューで表示する日数",placeholder:"3"},firstDayOfWeek:{name:"週の最初の日",description:"週ビューで最初の列にする曜日"},showWeekends:{name:"週末を表示",description:"カレンダービューで週末を表示"},showWeekNumbers:{name:"週番号を表示",description:"カレンダービューで週番号を表示"},showTodayHighlight:{name:"今日のハイライトを表示",description:"カレンダービューで現在の日をハイライト"},showCurrentTimeIndicator:{name:"現在時刻インジケーターを表示",description:"タイムラインビューで現在時刻を示すラインを表示"},selectionMirror:{name:"選択ミラー",description:"ドラッグして時間範囲を選択する際に視覚的プレビューを表示"},calendarLocale:{name:"カレンダーロケール",description:'日付形式とカレンダーシステムのカレンダーロケール(例:"en"、"fa"はFarsi/Persian、"de"はGerman)。ブラウザーから自動検出するには空白のままにします。',placeholder:"自動検出",invalidLocale:"無効なロケールです。有効な言語タグを入力してください(例:'ja'、'en'、'fr-FR')。"}},defaultEventVisibility:{header:"デフォルトイベント表示",description:"カレンダーを開く際にデフォルトで表示されるイベントタイプを設定します。ユーザーはカレンダービューでこれらをオン/オフできます。",showScheduledTasks:{name:"予定タスクを表示",description:"予定日のあるタスクをデフォルトで表示"},showDueDates:{name:"期限日を表示",description:"タスクの期限日をデフォルトで表示"},showDueWhenScheduled:{name:"予定がある場合も期限日を表示",description:"既に予定日があるタスクでも期限日を表示"},showTimeEntries:{name:"時間エントリを表示",description:"完了した時間追跡エントリをデフォルトで表示"},showRecurringTasks:{name:"繰り返しタスクを表示",description:"繰り返しタスクインスタンスをデフォルトで表示"},showICSEvents:{name:"ICSイベントを表示",description:"ICS購読からのイベントをデフォルトで表示"}},timeSettings:{header:"時間設定",description:"タイムラインビューの時間関連表示設定を構成します。",timeSlotDuration:{name:"タイムスロット間隔",description:"タイムラインビューでの各タイムスロットの間隔",options:{fifteenMinutes:"15分",thirtyMinutes:"30分",sixtyMinutes:"60分"}},startTime:{name:"開始時刻",description:"タイムラインビューで表示される最早時刻(HH:MM形式)",placeholder:"06:00"},endTime:{name:"終了時刻",description:"タイムラインビューに表示する最も遅い時刻 (HH:MM形式)。26:00 を午前2時として表示するなど、24:00を超える値で翌日早朝の時間を表示できます。",placeholder:"26:00"},initialScrollTime:{name:"初期スクロール時刻",description:"タイムラインビューを開く際にスクロールする時刻(HH:MM形式)",placeholder:"09:00"},eventMinHeight:{name:"イベント最小高さ",description:"タイムラインビューでのイベントの最小高さ(ピクセル)",placeholder:"15"}},uiElements:{header:"UI要素",description:"様々なUI要素の表示を設定します。",showTrackedTasksInStatusBar:{name:"ステータスバーに追跡タスクを表示",description:"Obsidianのステータスバーに現在追跡中のタスクを表示"},showProjectSubtasksWidget:{name:"プロジェクトサブタスクウィジェットを表示",description:"現在のプロジェクトノートのサブタスクを表示するウィジェットを表示"},projectSubtasksPosition:{name:"プロジェクトサブタスク位置",description:"プロジェクトサブタスクウィジェットの位置",options:{top:"ノートの上部",bottom:"ノートの下部"}},showRelationshipsWidget:{name:"関係ウィジェットを表示",description:"現在のノートのすべての関係(サブタスク、プロジェクト、依存関係)を表示するウィジェットを表示"},relationshipsPosition:{name:"関係の位置",description:"関係ウィジェットを配置する場所",options:{top:"ノートの上部",bottom:"ノートの下部"}},showTaskCardInNote:{name:"ノート内にタスクカードを表示",description:"タスクノートを開いたときにタスクプロパティを表示するインタラクティブカードを表示"},showCompletedTaskStrikethrough:{name:"完了したタスクのタイトルに取り消し線を表示",description:"完了したタスクカードのタイトルに線を引きます。完了タスクを読みやすくするにはオフにします"},showExpandableSubtasks:{name:"展開可能サブタスクを表示",description:"タスクカードでサブタスクセクションの展開/折りたたみを許可"},expandSubtasksByDefault:{name:"サブタスクを既定で展開",description:"タスクカードを表示するときにプロジェクトのサブタスクを展開して表示します"},subtaskChevronPosition:{name:"サブタスクシェブロン位置",description:"タスクカードの展開/折りたたみシェブロンの位置",options:{left:"左側",right:"右側"}},viewsButtonAlignment:{name:"ビューボタン配置",description:"タスクインターフェースのビュー/フィルターボタンの配置",options:{left:"左側",right:"右側"}}},projectAutosuggest:{header:"プロジェクト自動提案",description:"タスク作成時のプロジェクト提案の表示方法をカスタマイズします。",requiredTags:{name:"必須タグ",description:"これらのタグのいずれかを持つノートのみを表示(カンマ区切り)。すべてのノートを表示するには空白のままにします。",placeholder:"プロジェクト, アクティブ, 重要"},includeFolders:{name:"含めるフォルダー",description:"これらのフォルダー内のノートのみを表示(カンマ区切りパス)。すべてのフォルダーを表示するには空白のままにします。",placeholder:"プロジェクト/, 仕事/アクティブ, 個人"},requiredPropertyKey:{name:"必須プロパティキー",description:"このフロントマタープロパティが下記の値と一致するノートのみを表示。無視するには空白のままにします。",placeholder:"タイプ"},requiredPropertyValue:{name:"必須プロパティ値",description:"プロパティがこの値と等しいノートのみが提案されます。プロパティの存在を要求するには空白のままにします。",placeholder:"プロジェクト"},customizeDisplay:{name:"提案表示をカスタマイズ",description:"プロジェクト提案の表示方法と表示情報を設定する高度なオプションを表示。"},enableFuzzyMatching:{name:"ファジーマッチングを有効にする",description:"プロジェクト検索でタイプミスと部分一致を許可。大きなボルトでは遅くなる可能性があります。"},displayRowsHelp:"各プロジェクト提案に表示する最大3行の情報を設定します。",displayRows:{row1:{name:"行1",description:"形式:{property|flags}。プロパティ:title、aliases、file.path、file.parent。フラグ:n(Label)はラベルを表示、sは検索可能にします。例:{title|n(Title)|s}",placeholder:"{title|n(タイトル)}"},row2:{name:"行2(オプション)",description:"一般的なパターン:{aliases|n(Aliases)}、{file.parent|n(Folder)}、literal:カスタムテキスト",placeholder:"{aliases|n(エイリアス)}"},row3:{name:"行3(オプション)",description:"{file.path|n(Path)}やカスタムフロントマターフィールドなどの追加情報",placeholder:"{file.path|n(パス)}"}},quickReference:{header:"クイックリファレンス",properties:"利用可能プロパティ:title、aliases、file.path、file.parent、または任意のフロントマターフィールド",labels:'ラベル追加:{title|n(Title)} → "Title: My Project"',searchable:"検索可能にする:{description|s}は+検索に説明を含めます",staticText:"静的テキスト:literal:My Custom Label",alwaysSearchable:"ファイル名、タイトル、エイリアスはデフォルトで常に検索可能です。"}},dataStorage:{name:"ストレージ場所",description:"ポモドーロセッション履歴を保存する場所",pluginData:"プラグインデータ(推奨)",dailyNotes:"デイリーノート",notices:{locationChanged:"ポモドーロストレージ場所を{location}に変更しました"}},notifications:{description:"タスクリマインダー通知とアラートを設定します。"},performance:{description:"プラグインのパフォーマンスと動作オプションを設定します。"},timeTrackingSection:{description:"自動時間追跡動作を設定します。"},recurringSection:{description:"繰り返しタスク管理の動作を設定します。"}},integrations:{mobileCalendar:{disable:{name:"モバイルでカレンダー連携を無効化",description:"Obsidian Mobile で Google、Microsoft、ICS カレンダーの読み込みをスキップします。デスクトップのカレンダー連携は変更されません。"},status:{name:"このモバイル端末ではカレンダー連携が無効です",description:"カレンダーの読み込みを再開するには、この設定をオフにして Obsidian Mobile を再読み込みしてください。"}},basesIntegration:{header:"Bases統合",description:"Obsidian Basesプラグインとの統合を設定します。これは実験的機能で、現在非公開のObsidian APIに依存しています。動作が変更または破損する可能性があります。",enable:{name:"Bases統合を有効にする",description:"TaskNotesビューをObsidian Basesプラグイン内で使用できるようにします。これが機能するにはBasesプラグインが有効である必要があります。"},viewCommands:{header:"ビューとBaseファイル",description:"TaskNotesはObsidian Basesファイル(.base)を使用してビューを表示します。これらのファイルは起動時に存在しない場合に自動的に生成され、現在の設定(タスク識別、フィールドマッピング、ステータスなど)で構成されます。",descriptionRegen:"設定を変更してもBaseファイルは自動更新されません。新しい設定を適用するには、下の「ファイルを更新」を使用するか、既存の.baseファイルを削除してObsidianを再起動するか、手動で編集してください。",docsLink:"利用可能な数式とカスタマイズオプションのドキュメントを表示",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"ミニカレンダービューを開く",kanban:"カンバンビューを開く",tasks:"タスクビューを開く",advancedCalendar:"高度なカレンダービューを開く",agenda:"アジェンダビューを開く",relationships:"関係ウィジェット",pomodoroStats:"Pomodoro統計Base"},fileLabel:"ファイル:{path}",resetButton:"リセット",resetTooltip:"デフォルトパスにリセット",pomodoroDailyNotesHint:"生成されたPomodoro統計BaseはデイリーノートからPomodoro履歴を読み取ります。履歴がまだプラグインデータに保存されている場合は、このBaseファイルを使う前に設定で移行してください。"},autoCreateDefaultFiles:{name:"デフォルトファイルを自動作成",description:"起動時に不足しているデフォルトのBaseビューファイルを自動的に作成します。削除したサンプルファイルが再作成されないようにするには無効にしてください。"},createDefaultFiles:{name:"デフォルトファイルを作成",description:"TaskNotes/Views/ディレクトリにデフォルトの.baseファイルを作成します。既存のファイルは上書きされません。",buttonText:"ファイルを作成"},exportV3Views:{name:"V3保存ビューをBasesにエクスポート",description:"TaskNotes v3のすべての保存ビューを、複数のビューを持つ単一の.baseファイルに変換します。これは、v3フィルター設定を新しいBasesシステムに移行するのに役立ちます。",buttonText:"V3ビューをエクスポート",noViews:"エクスポートする保存ビューがありません",fileExists:"ファイルが既に存在します",confirmOverwrite:'"{fileName}"という名前のファイルが既に存在します。上書きしますか?',success:"{count}個の保存ビューを{filePath}にエクスポートしました",error:"ビューのエクスポートに失敗しました:{message}"},notices:{enabled:"Bases統合が有効になりました。設定を完了するためにObsidianを再起動してください。",disabled:"Bases統合が無効になりました。削除を完了するためにObsidianを再起動してください。"},updateDefaultFiles:{name:"デフォルトファイルを更新",description:"現在のTaskNotes設定から生成されたテンプレートで、設定済みのデフォルト.baseファイルを上書きします。",buttonText:"ファイルを更新",confirmTitle:"デフォルトBaseファイルを更新",confirmMessage:"設定済みのデフォルト.baseファイルを新しく生成したテンプレートで上書きします。これらのファイルの手動編集は置き換えられます。",confirmText:"ファイルを更新"}},calendarSubscriptions:{header:"カレンダー購読",description:"ICS/iCal URLを介して外部カレンダーを購読し、タスクと一緒にイベントを表示します。",defaultNoteTemplate:{name:"デフォルトノートテンプレート",description:"ICSイベントから作成されるノートのテンプレートファイルへのパス",placeholder:"テンプレート/イベントテンプレート.md"},defaultNoteFolder:{name:"デフォルトノートフォルダー",description:"ICSイベントから作成されるノートのフォルダー",placeholder:"カレンダー/イベント"},filenameFormat:{name:"ICSノートファイル名形式",description:"ICSイベントから作成されるノートのファイル名生成方法",options:{title:"イベントタイトル",zettel:"Zettelkasten形式",timestamp:"タイムスタンプ",custom:"カスタムテンプレート"}},customTemplate:{name:"カスタムICSファイル名テンプレート",description:"カスタムICSイベントファイル名のテンプレート",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"ICSイベント終了時刻をタスク期日として使用",description:"有効にすると、カレンダーイベントから作成されたタスクの期日がイベントの終了時刻に設定されます。終日イベントの場合、期日はイベントの日付に設定されます。時間指定イベントの場合、期日に終了時刻が含まれます。"},recurringEventRelatedNotesMode:{name:"繰り返しイベントの関連ノート",description:"外部カレンダーイベントの1回の繰り返しにリンクしたノートを、読み込まれたシリーズ全体に表示するか、選択したインスタンスのみに表示するかを選択します。",options:{series:"シリーズ全体",instance:"選択したインスタンスのみ"}}},subscriptionsList:{header:"カレンダー購読リスト",addSubscription:{name:"カレンダー購読を追加",description:"ICS/iCal URLまたはローカルファイルから新しいカレンダー購読を追加",buttonText:"購読を追加"},refreshAll:{name:"すべての購読を更新",description:"有効なすべてのカレンダー購読を手動で更新",buttonText:"すべて更新"},newCalendarName:"新しいカレンダー",emptyState:"カレンダー購読が設定されていません。購読を追加して外部カレンダーを同期してください。",notices:{addSuccess:"新しいカレンダー購読が追加されました - 詳細を設定してください",addFailure:"購読の追加に失敗しました",serviceUnavailable:"ICS購読サービスが利用できません",refreshSuccess:"すべてのカレンダー購読が正常に更新されました",refreshFailure:"一部のカレンダー購読の更新に失敗しました",updateFailure:"購読の更新に失敗しました",deleteSuccess:'購読"{name}"を削除しました',deleteFailure:"購読の削除に失敗しました",enableFirst:"最初に購読を有効にしてください",refreshSubscriptionSuccess:'"{name}"を更新しました',refreshSubscriptionFailure:"購読の更新に失敗しました"},labels:{enabled:"有効:",name:"名前:",type:"タイプ:",url:"URL:",filePath:"ファイルパス:",color:"色:",refreshMinutes:"更新(分):"},typeOptions:{remote:"リモートURL",local:"ローカルファイル"},placeholders:{calendarName:"カレンダー名",url:"ICS/iCal のURL",filePath:"ローカルファイルパス(例:Calendar.ics)",localFile:"カレンダー.ics"},statusLabels:{enabled:"有効",disabled:"無効",remote:"リモート",localFile:"ローカルファイル",remoteCalendar:"リモートカレンダー",localFileCalendar:"ローカルファイル",synced:"{timeAgo}に同期",error:"エラー"},actions:{refreshNow:"今すぐ更新",deleteSubscription:"購読を削除"},refreshNow:"今すぐ更新",confirmDelete:{title:"購読を削除",message:'購読"{name}"を削除してもよろしいですか?この操作は元に戻せません。',confirmText:"削除"}},autoExport:{header:"自動ICSエクスポート",description:"すべてのタスクを自動的にICSファイルにエクスポートします。",enable:{name:"自動エクスポートを有効にする",description:"すべてのタスクでICSファイルを自動的に更新し続ける"},filePath:{name:"エクスポートファイルパス",description:"ICSファイルを保存するパス(ボルトルートからの相対パス)",placeholder:"tasknotes-カレンダー.ics"},interval:{name:"更新間隔(5から1440分の間)",description:"エクスポートファイルを更新する頻度",placeholder:"60"},useDuration:{name:"タスクの所要時間をイベントの長さに使用",description:"有効にすると、カレンダーイベントの終了時刻に期日ではなくタスクの見積時間(所要時間)を使用します。これは、予定 + 所要時間が作業計画を表し、期日が締め切りを表すGTDワークフローに便利です。"},exportNow:{name:"今すぐエクスポート",description:"即座にエクスポートを手動でトリガー",buttonText:"今すぐエクスポート"},status:{title:"エクスポートステータス:",lastExport:"最後のエクスポート:{time}",nextExport:"次のエクスポート:{time}",noExports:"まだエクスポートされていません",notScheduled:"スケジュールされていません",notInitialized:"自動エクスポートサービスが初期化されていません - Obsidianを再起動してください",serviceNotInitialized:"サービスが初期化されていません - Obsidianを再起動してください"},notices:{reloadRequired:"自動エクスポートの変更を有効にするためにObsidianを再読み込みしてください。",exportSuccess:"タスクが正常にエクスポートされました",exportFailure:"エクスポートに失敗しました - 詳細はコンソールを確認してください",serviceUnavailable:"自動エクスポートサービスが利用できません"},excludeCompleted:{name:"完了したタスクを除外",description:"有効にすると、完了したタスクはICSエクスポートから除外されます。完了ステータスはタスクステータス設定から取得されます。"},excludeArchived:{name:"アーカイブ済みタスクを除外",description:"有効にすると、アーカイブ済みタスクはICSエクスポートから除外されます。"},requireDueDate:{name:"期限日を必須にする",description:"有効にすると、期限日のあるタスクだけがICSエクスポートに含まれます。"},requireScheduledDate:{name:"予定日を必須にする",description:"有効にすると、予定日のあるタスクだけがICSエクスポートに含まれます。"}},googleCalendarExport:{header:"タスクをGoogleカレンダーにエクスポート",description:"タスクを自動的にGoogleカレンダーのイベントとして同期します。上記でGoogleカレンダーが接続されている必要があります。",enable:{name:"タスクエクスポートを有効にする",description:"有効にすると、日付のあるタスクが自動的にGoogleカレンダーにイベントとして同期されます。"},targetCalendar:{name:"ターゲットカレンダー",description:"タスクイベントを作成するカレンダーを選択します。",placeholder:"カレンダーを選択...",connectFirst:"先にGoogleカレンダーを接続してください",primarySuffix:"(メイン)"},syncTrigger:{name:"同期トリガー",description:"どのタスク日付でカレンダーイベントを作成するか。",options:{scheduled:"予定日",due:"期限",both:"両方(予定日優先)"}},allDayEvents:{name:"終日イベントとして作成",description:"有効にすると、タスクは終日イベントとして作成されます。無効にすると、時間見積もりを期間として使用します。"},defaultDuration:{name:"デフォルトのイベント期間",description:"時間指定イベントの期間(分)(タスクに時間見積もりがない場合に使用)。"},eventTitleTemplate:{name:"イベントタイトルテンプレート",description:"イベントタイトルのテンプレート。使用可能な変数:{{title}}、{{status}}、{{priority}}",placeholder:"{{title}}"},includeDescription:{name:"説明にタスク詳細を含める",description:"イベントの説明にタスクのメタデータ(優先度、ステータス、タグなど)を追加します。"},includeObsidianLink:{name:"Obsidianリンクを含める",description:"イベントの説明にObsidianのタスクへのリンクを追加します。"},defaultReminder:{name:"デフォルトリマインダー",description:"時刻付きGoogle Calendarイベントにポップアップリマインダーを追加します。イベント前の分数をカンマ区切りで入力します。空欄にするとカレンダーのデフォルトを使用します。一般的な値: 15, 30, 60, 1440。"},automaticSyncBehavior:{header:"自動同期動作"},syncOnCreate:{name:"タスク作成時に同期",description:"新しいタスクが作成されたときに自動的にカレンダーイベントを作成します。"},syncOnUpdate:{name:"タスク更新時に同期",description:"タスクが変更されたときに自動的にカレンダーイベントを更新します。"},syncOnComplete:{name:"タスク完了時に同期",description:"タスクが完了したときにカレンダーイベントを更新します(タイトルにチェックマークを追加)。"},syncOnDelete:{name:"タスク削除時にイベントを削除",description:"対応するタスクが削除されたときにカレンダーイベントを削除します。"},manualSyncActions:{header:"手動同期アクション"},syncAllTasks:{name:"すべてのタスクを同期",description:"すべての既存タスクをGoogleカレンダーに同期します。まだ同期されていないタスクのイベントが作成されます。",buttonText:"すべて同期"},unlinkAllTasks:{name:"すべてのタスクのリンクを解除",description:"カレンダーイベントを削除せずに、すべてのタスクとイベントのリンクを解除します。",buttonText:"すべてリンク解除",confirmTitle:"すべてのタスクのリンクを解除",confirmMessage:"これにより、タスクとカレンダーイベント間のすべてのリンクが削除されます。カレンダーイベントは残りますが、タスクが変更されても更新されなくなります。よろしいですか?",confirmButtonText:"すべてリンク解除"},notices:{notEnabled:"Googleカレンダーエクスポートが有効になっていません。設定 > 統合で設定してください。",notEnabledOrConfigured:"Googleカレンダーエクスポートが有効または設定されていません",serviceNotAvailable:"タスクカレンダー同期サービスが利用できません",syncResults:"同期済み:{synced}、失敗:{failed}、スキップ:{skipped}",taskSynced:"タスクをGoogleカレンダーに同期しました",noActiveFile:"現在アクティブなファイルがありません",notATask:"現在のファイルはタスクではありません",noDateToSync:"タスクに同期する予定日または期限がありません",syncFailed:"タスクのGoogleカレンダーへの同期に失敗しました:{message}",connectionExpired:"Google カレンダーの接続が期限切れです。設定 > 統合で再接続してください。",syncingTasks:"{total}件のタスクをGoogleカレンダーに同期中...",syncComplete:"同期完了:{synced}件同期、{failed}件失敗、{skipped}件スキップ",eventsDeletedAndUnlinked:"すべてのイベントが削除され、リンク解除されました",tasksUnlinked:"すべてのタスクリンクが削除されました"},eventDescription:{untitledTask:"無題のタスク",priority:"優先度:{value}",status:"ステータス:{value}",due:"期限:{value}",scheduled:"予定:{value}",timeEstimate:"時間見積もり:{value}",tags:"タグ:{value}",contexts:"コンテキスト:{value}",projects:"プロジェクト:{value}",openInObsidian:"Obsidianで開く"}},httpApi:{header:"HTTP API",description:"外部統合と自動化のためのHTTP APIを有効にします。",enable:{name:"HTTP APIを有効にする",description:"APIアクセス用のローカルHTTPサーバーを開始"},port:{name:"APIポート",description:"HTTP APIサーバーのポート番号",placeholder:"3000"},authToken:{name:"API認証トークン",description:"TaskNotesのトークンです。AIプロバイダーのAPIキーではありません。生成するにはHTTP APIを有効にし、この欄を空にしてObsidianを再起動してください。生成されたトークンをクライアントのBearer認証設定にコピーします。トークンを変更したら、各クライアントの設定も更新してください。",placeholder:"あなたのシークレットトークン"},mcp:{enable:{name:"MCP サーバーを有効にする",description:"Model Context Protocol を介して /mcp エンドポイントで TaskNotes ツールを公開します。HTTP API を有効にする必要があります。"}},endpoints:{header:"利用可能なAPIエンドポイント",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhook",description:{overview:"WebhookはTaskNotesイベントが発生したときに外部サービスにリアルタイム通知を送信します。",usage:"自動化ツール、同期サービス、またはカスタムアプリケーションと統合するためにWebhookを設定します。"},addWebhook:{name:"Webhookを追加",description:"新しいWebhookエンドポイントを登録",buttonText:"Webhookを追加"},emptyState:{message:"Webhookが設定されていません。Webhookを追加してリアルタイム通知を受信してください。",buttonText:"Webhookを追加"},labels:{active:"アクティブ:",url:"URL:",events:"イベント:",transform:"変換:"},placeholders:{url:"Webhook のURL",noEventsSelected:"イベントが選択されていません",rawPayload:"Rawペイロード(変換なし)"},statusLabels:{active:"アクティブ",inactive:"非アクティブ",created:"{timeAgo}に作成"},actions:{editEvents:"イベントを編集",delete:"削除"},editEvents:"イベントを編集",notices:{urlUpdated:"Webhook URLが更新されました",enabled:"Webhookが有効になりました",disabled:"Webhookが無効になりました",created:"Webhookが正常に作成されました",deleted:"Webhookが削除されました",updated:"Webhookが更新されました"},confirmDelete:{title:"Webhookを削除",message:`このWebhookを削除してもよろしいですか?
URL:{url}
この操作は元に戻せません。`,confirmText:"削除"},cardHeader:"Webhook",cardFields:{active:"アクティブ:",url:"URL:",events:"イベント:",transform:"変換:"},eventsDisplay:{noEvents:"イベントが選択されていません"},transformDisplay:{noTransform:"Rawペイロード(変換なし)"},secretModal:{title:"Webhookシークレットが生成されました",description:"Webhookシークレットが生成されました。再度表示することはできないため、このシークレットを保存してください:",usage:"受信アプリケーションでWebhookペイロードを検証するためにこのシークレットを使用してください。",gotIt:"了解"},editModal:{title:"Webhookを編集",eventsHeader:"購読するイベント"},events:{taskCreated:{label:"タスク作成",description:"新しいタスクが作成されたとき"},taskUpdated:{label:"タスク更新",description:"タスクが変更されたとき"},taskCompleted:{label:"タスク完了",description:"タスクが完了とマークされたとき"},taskDeleted:{label:"タスク削除",description:"タスクが削除されたとき"},taskArchived:{label:"タスクアーカイブ",description:"タスクがアーカイブされたとき"},taskUnarchived:{label:"タスクアーカイブ解除",description:"タスクのアーカイブが解除されたとき"},timeStarted:{label:"時間開始",description:"時間追跡が開始されたとき"},timeStopped:{label:"時間停止",description:"時間追跡が停止されたとき"},pomodoroStarted:{label:"ポモドーロ開始",description:"ポモドーロセッションが開始されたとき"},pomodoroCompleted:{label:"ポモドーロ完了",description:"ポモドーロセッションが終了したとき"},pomodoroInterrupted:{label:"ポモドーロ中断",description:"ポモドーロセッションが停止されたとき"},recurringCompleted:{label:"繰り返しインスタンス完了",description:"繰り返しタスクインスタンスが完了したとき"},reminderTriggered:{label:"リマインダー起動",description:"タスクリマインダーがアクティブになったとき"}},modals:{secretGenerated:{title:"Webhookシークレットが生成されました",description:"Webhookシークレットが生成されました。再度表示することはできないため、このシークレットを保存してください:",usage:"受信アプリケーションでWebhookペイロードを検証するためにこのシークレットを使用してください。",buttonText:"了解"},edit:{title:"Webhookを編集",eventsSection:"購読するイベント",transformSection:"変換設定(オプション)",headersSection:"ヘッダー設定",transformFile:{name:"変換ファイル",description:"Webhookペイロードを変換するボルト内の.jsonテンプレートファイルへのパス",placeholder:"simple-template.json"},customHeaders:{name:"カスタムヘッダーを含める",description:"TaskNotesヘッダー(イベントタイプ、署名、配信ID)を含める。Discord、Slack、および厳格なCORSポリシーを持つその他のサービスではオフにしてください。"},buttons:{cancel:"キャンセル",save:"変更を保存"},notices:{selectAtLeastOneEvent:"少なくとも1つのイベントを選択してください"}},add:{title:"Webhookを追加",eventsSection:"購読するイベント",transformSection:"変換設定(オプション)",headersSection:"ヘッダー設定",url:{name:"Webhook のURL",description:"Webhookペイロードが送信されるエンドポイント",placeholder:"https://your-service.com/webhook"},transformFile:{name:"変換ファイル",description:"Webhookペイロードを変換するボルト内の.jsonテンプレートファイルへのパス",placeholder:"simple-template.json"},customHeaders:{name:"カスタムヘッダーを含める",description:"TaskNotesヘッダー(イベントタイプ、署名、配信ID)を含める。Discord、Slack、および厳格なCORSポリシーを持つその他のサービスではオフにしてください。"},transformHelp:{title:"JSON変換テンプレートを使用してWebhookペイロードをカスタマイズできます:",jsFiles:"",jsDescription:"",jsonFiles:".jsonファイル:",jsonDescription:" テンプレートと ",jsonVariable:"${data.task.title}",leaveEmpty:"空白のまま:",leaveEmptyDescription:" Rawデータを送信",example:"例:",exampleFile:"simple-template.json"},buttons:{cancel:"キャンセル",add:"Webhookを追加"},notices:{urlRequired:"Webhook URLが必要です",selectAtLeastOneEvent:"少なくとも1つのイベントを選択してください"}}}},otherIntegrations:{header:"その他のプラグイン統合",description:"他のObsidianプラグインとの統合を設定します。"},mdbaseSpec:{header:"mdbase型定義",learnMore:"mdbase-spec について詳しく見る",enable:{name:"mdbase 型定義を生成",description:"設定の変更に合わせて、ボルトルートに mdbase 型ファイル(mdbase.yaml と _types/task.md)を生成して維持します。"}},timeFormats:{justNow:"たった今",minutesAgo:"{minutes}分前",hoursAgo:"{hours}時間前",daysAgo:"{days}日前"}}},notices:{languageChanged:"言語を{language}に変更しました。",releaseAvailable:{message:"TaskNotes {version} が利用可能です。",action:"コミュニティプラグインで開く"},exportTasksFailed:"タスクのICSファイルエクスポートに失敗しました",icsNoteCreatedSuccess:"ノートが正常に作成されました",icsCreationModalOpenFailed:"作成モーダルを開けませんでした",icsNoteLinkSuccess:'ノート"{fileName}"をICSイベントにリンクしました',icsTaskCreatedSuccess:"タスクが作成されました:{title}",icsRelatedItemsRefreshed:"関連ノートが更新されました",icsFileNotFound:"ファイルが見つからないか無効です",icsFileOpenFailed:"ファイルを開けませんでした",timeblockAttachmentExists:'"{fileName}"は既に添付されています',timeblockAttachmentAdded:'"{fileName}"を添付ファイルとして追加しました',timeblockAttachmentRemoved:'"{fileName}"を添付ファイルから削除しました',timeblockFileTypeNotSupported:'"{fileName}"を開けません - ファイルタイプがサポートされていません',timeblockTitleRequired:"タイムブロックのタイトルを入力してください",timeblockUpdatedSuccess:'タイムブロック"{title}"が正常に更新されました',timeblockUpdateFailed:"タイムブロックの更新に失敗しました。詳細はコンソールを確認してください。",timeblockDeletedSuccess:'タイムブロック"{title}"が正常に削除されました',timeblockDeleteFailed:"タイムブロックの削除に失敗しました。詳細はコンソールを確認してください。",timeblockRequiredFieldsMissing:"すべての必須フィールドを入力してください",agendaLoadingFailed:"アジェンダの読み込みエラー。更新してみてください。",statsLoadingFailed:"プロジェクト詳細の読み込みエラー。"},commands:{openCalendarView:"ミニカレンダービューを開く",openAdvancedCalendarView:"カレンダービューを開く",openTasksView:"タスクビューを開く",openNotesView:"ノートビューを開く",openAgendaView:"アジェンダビューを開く",openPomodoroView:"ポモドーロタイマーを開く",openKanbanView:"カンバンボードを開く",updateDefaultBaseFiles:"既定の Base ファイルを更新",openPomodoroStats:"ポモドーロ統計を開く",openStatisticsView:"タスクとプロジェクト統計を開く",createNewTask:"新しいタスクを作成",convertCurrentNoteToTask:{name:"現在のノートをタスクに変換",noActiveFile:"変換するアクティブなファイルがありません",alreadyTask:"このノートはすでにタスクです",success:"'{title}'をタスクに変換しました"},convertToTaskNote:"チェックボックスタスクをTaskNoteに変換",convertAllTasksInNote:"ノート内のすべてのタスクを変換",insertTaskNoteLink:"taskNoteリンクを挿入",createInlineTask:"新しいインラインタスクを作成",quickActionsCurrentTask:"現在のタスクのクイックアクション",goToTodayNote:"今日のノートに移動",startPomodoro:"ポモドーロタイマーを開始",stopPomodoro:"ポモドーロタイマーを停止",pauseResumePomodoro:"ポモドーロタイマーを一時停止/再開",refreshCache:"キャッシュを更新",exportAllTasksIcs:"すべてのタスクをICSファイルとしてエクスポート",viewReleaseNotes:"リリースノートを表示",startTimeTrackingCurrentTask:"現在のタスクの時間追跡を開始",stopTimeTrackingCurrentTask:"現在のタスクの時間追跡を停止",startTimeTrackingWithSelector:"時間追跡を開始(タスクを選択)",editTimeEntries:"時間エントリを編集(タスクを選択)",createOrOpenTask:"タスクを作成または開く",createOrOpenTaskWithTracking:"タスクを作成または開いて時間追跡を開始",rolloverOverdueScheduledTasks:"期限超過の予定タスクを今日に延期",syncAllTasksGoogleCalendar:"すべてのタスクをGoogleカレンダーに同期",syncCurrentTaskGoogleCalendar:"現在のタスクをGoogleカレンダーに同期",quickActionsTaskUnderCursor:"カーソル下のタスクのクイックアクション",editCurrentTask:"現在のタスクを編集",cycleCurrentTaskStatus:"現在のタスクのステータスを切り替え",cycleCurrentTaskPriority:"現在のタスクの優先度を切り替え",addProjectToCurrentTask:"現在のタスクにプロジェクトを追加",addSubtaskToCurrentNote:"現在のノートにサブタスクを追加"},modals:{deviceCode:{title:"Googleカレンダー認証",instructions:{intro:"Googleカレンダーに接続するには、以下の手順に従ってください:"},steps:{open:"開く",inBrowser:"ブラウザで",enterCode:"プロンプトが表示されたら、このコードを入力してください:",signIn:"Googleアカウントでサインインしてアクセスを許可",returnToObsidian:"Obsidianに戻る(このウィンドウは自動的に閉じます)"},codeLabel:"あなたのコード:",copyCodeAriaLabel:"コードをコピー",waitingForAuthorization:"認証を待機中...",openBrowserButton:"ブラウザを開く",cancelButton:"キャンセル",expiresMinutesSeconds:"コードは{minutes}分{seconds}秒で期限切れ",expiresSeconds:"コードは{seconds}秒で期限切れ"},icsEventInfo:{calendarEventHeading:"カレンダーイベント",titleLabel:"タイトル",calendarLabel:"カレンダー",dateTimeLabel:"日時",locationLabel:"場所",descriptionLabel:"説明",urlLabel:"URL",relatedNotesHeading:"関連ノートとタスク",noRelatedItems:"このイベントに関連するノートまたはタスクが見つかりません。",typeTask:"タスク",typeNote:"ノート",actionsHeading:"アクション",createFromEventLabel:"イベントから作成",createFromEventDesc:"このカレンダーイベントから新しいノートまたはタスクを作成",linkExistingLabel:"既存をリンク",linkExistingDesc:"既存のノートをこのカレンダーイベントにリンク"},timeblockInfo:{editHeading:"タイムブロックを編集",dateTimeLabel:"日時:",titleLabel:"タイトル",titleDesc:"タイムブロックのタイトル",titlePlaceholder:"例:集中作業セッション",descriptionLabel:"説明",descriptionDesc:"タイムブロックのオプション説明",descriptionPlaceholder:"新機能に集中、中断なし",colorLabel:"色",colorDesc:"タイムブロックのオプション色",colorPlaceholder:"#3b82f6",attachmentsLabel:"添付ファイル",attachmentsDesc:"このタイムブロックにリンクされたファイルまたはノート",addAttachmentButton:"添付ファイルを追加",addAttachmentTooltip:"ファジー検索を使用してファイルまたはノートを選択",deleteButton:"タイムブロックを削除",saveButton:"変更を保存",deleteConfirmationTitle:"タイムブロックを削除"},timeblockCreation:{heading:"タイムブロックを作成",dateLabel:"日付:",titleLabel:"タイトル",titleDesc:"タイムブロックのタイトル",titlePlaceholder:"例:集中作業セッション",startTimeLabel:"開始時刻",startTimeDesc:"タイムブロックが開始される時刻",startTimePlaceholder:"09:00",endTimeLabel:"終了時刻",endTimeDesc:"タイムブロックが終了する時刻",endTimePlaceholder:"11:00",descriptionLabel:"説明",descriptionDesc:"タイムブロックのオプション説明",descriptionPlaceholder:"新機能に集中、中断なし",colorLabel:"色",colorDesc:"タイムブロックのオプション色",colorPlaceholder:"#3b82f6",attachmentsLabel:"添付ファイル",attachmentsDesc:"このタイムブロックにリンクするファイルまたはノート",addAttachmentButton:"添付ファイルを追加",addAttachmentTooltip:"ファジー検索を使用してファイルまたはノートを選択",createButton:"タイムブロックを作成"},calendarEventCreation:{heading:"カレンダーイベントを作成",dateTimeLabel:"日時:",titleLabel:"タイトル",titleDesc:"カレンダーイベントのタイトル",titlePlaceholder:"例:チームミーティング",calendarLabel:"カレンダー",calendarDesc:"イベントを作成するカレンダー",descriptionLabel:"説明",descriptionDesc:"イベントの説明(任意)",descriptionPlaceholder:"イベントの詳細を追加...",locationLabel:"場所",locationDesc:"イベントの場所(任意)",locationPlaceholder:"例:会議室A",createButton:"イベントを作成",titleRequired:"イベントのタイトルは必須です",noCalendarSelected:"カレンダーが選択されていません",success:"カレンダーイベント「{title}」を作成しました",error:"カレンダーイベントの作成に失敗しました:{message}"},icsNoteCreation:{heading:"ICSイベントから作成",titleLabel:"タイトル",titleDesc:"新しいコンテンツのタイトル",folderLabel:"フォルダー",folderDesc:"保存先フォルダー(ボルトルートの場合は空のままにする)",folderPlaceholder:"フォルダー/サブフォルダー",createButton:"作成",startLabel:"開始:",endLabel:"終了:",locationLabel:"場所:",calendarLabel:"カレンダー:",useTemplateLabel:"テンプレートを使用",useTemplateDesc:"コンテンツ作成時にテンプレートを適用",templatePathLabel:"テンプレートパス",templatePathDesc:"テンプレートファイルへのパス",templatePathPlaceholder:"テンプレート/ICSノートテンプレート.md"},unscheduledTasksSelector:{title:"予定されていないタスク",placeholder:"予定されていないタスクを検索...",instructions:{navigate:"移動",schedule:"予定を設定",dismiss:"閉じる"}},migration:{title:"新しい繰り返しシステムに移行",description:"TaskNotesは繰り返しに業界標準のRRULEパターンを使用するようになり、より複雑なスケジュールと他のアプリとの互換性が向上しました。",tasksFound:"{count}件の古い繰り返しパターンを持つタスクが検出されました",noMigrationNeeded:"移行が必要なタスクはありません",warnings:{title:"続行する前に:",backup:"移行前にボルトをバックアップしてください",conversion:"古い繰り返しパターンは新しい形式に変換されます",normalUsage:"移行中も通常通りTaskNotesを使用できます",permanent:"この変更は永続的で、自動的に元に戻すことはできません"},benefits:{title:"新システムの利点:",powerfulPatterns:"複雑な繰り返しパターン(例:「毎月第2火曜日」)",performance:"繰り返しタスクのパフォーマンスが向上",compatibility:"他のアプリと互換性のある標準繰り返し形式",nlp:"自然言語処理のサポート強化"},progress:{title:"移行進捗",preparing:"移行を準備中...",completed:"移行が正常に完了しました",failed:"移行に失敗しました"},buttons:{migrate:"移行を開始",completed:"閉じる"},errors:{title:"移行中のエラー:"},notices:{completedWithErrors:"移行は一部エラーで完了しました。上記のエラーリストを確認してください。",success:"すべてのタスクが正常に移行されました!",failed:"移行に失敗しました。詳細はコンソールを確認してください。"},prompt:{message:"TaskNotesは古い繰り返し形式を使用しているタスクを検出しました。今すぐ新しいシステムに移行しますか?",migrateNow:"今すぐ移行",remindLater:"後で通知"}},task:{titlePlaceholder:"何をする必要がありますか?",titleLabel:"タイトル",titleDetailedPlaceholder:"タスクタイトル...",detailsLabel:"詳細",detailsPlaceholder:"詳細を追加...",projectsLabel:"プロジェクト",projectsAdd:"プロジェクトを追加",projectsTooltip:"ファジー検索を使用してプロジェクトノートを選択",projectsRemoveTooltip:"プロジェクトを削除",contextsLabel:"コンテキスト",contextsPlaceholder:"コンテキスト1, コンテキスト2",tagsLabel:"タグ",tagsPlaceholder:"タグ1, タグ2",timeEstimateLabel:"時間見積もり(分)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"未保存の変更",message:"未保存の変更があります。保存しますか?",save:"変更を保存",discard:"変更を破棄",cancel:"編集を続ける"},dependencies:{blockedBy:"ブロック元",blocking:"ブロックしている",placeholder:"[[タスクノート]]",addTaskButton:"タスクを追加",selectTaskTooltip:"ファジー検索を使用してタスクノートを選択",removeTaskTooltip:"タスクを削除"},organization:{projects:"プロジェクト",subtasks:"サブタスク",addToProject:"プロジェクトに追加",addToProjectButton:"プロジェクトに追加",addSubtasks:"サブタスクを追加",addSubtasksButton:"サブタスクを追加",addSubtasksTooltip:"このタスクのサブタスクにするタスクを選択",removeSubtaskTooltip:"サブタスクを削除",notices:{noEligibleSubtasks:"サブタスクとして割り当て可能なタスクがありません",subtaskSelectFailed:"サブタスクセレクターを開けませんでした"}},customFieldsLabel:"カスタムフィールド",actions:{due:"期限日を設定",scheduled:"予定日を設定",status:"ステータスを設定",priority:"優先度を設定",recurrence:"繰り返しを設定",reminders:"リマインダーを設定"},buttons:{openNote:"ノートを開く",save:"保存"},tooltips:{dueValue:"期限:{value}",scheduledValue:"予定:{value}",statusValue:"ステータス:{value}",priorityValue:"優先度:{value}",recurrenceValue:"繰り返し:{value}",remindersSingle:"1件のリマインダーが設定されました",remindersPlural:"{count}件のリマインダーが設定されました"},dateMenu:{dueTitle:"期限日を設定",scheduledTitle:"予定日を設定"},userFields:{textPlaceholder:"{field}を入力...",numberPlaceholder:"0",datePlaceholder:"YYYY-MM-DD",listPlaceholder:"項目1, 項目2, 項目3",pickDate:"{field}日付を選択"},recurrence:{daily:"毎日",weekly:"毎週",everyTwoWeeks:"2週間ごと",weekdays:"平日",weeklyOn:"毎週{days}曜日",monthly:"毎月",everyThreeMonths:"3か月ごと",monthlyOnOrdinal:"毎月{ordinal}",monthlyByWeekday:"毎月(曜日による)",yearly:"毎年",yearlyOn:"毎年{month}{day}",custom:"カスタム",countSuffix:"{count}回",untilSuffix:"{date}まで",ordinal:"{number}{suffix}"}},taskSelector:{title:"タスクを選択",placeholder:"タスクを検索...",instructions:{navigate:"移動",select:"選択",dismiss:"キャンセル"},notices:{noteNotFound:'ノート"{name}"が見つかりませんでした'},dueDate:{overdue:"期限:{date}(期限切れ)",today:"期限:今日"}},taskSelectorWithCreate:{title:"タスクを作成または開く",placeholder:"タスクを検索または入力して新規作成...",instructions:{create:"で新しいタスクを作成"},footer:{createLabel:" で作成: "},notices:{emptyQuery:"タスクの説明を入力してください",invalidTitle:"有効なタスクタイトルを認識できませんでした"}},taskCreation:{title:"タスクを作成",actions:{fillFromNaturalLanguage:"自然言語からフォームを埋める",hideDetailedOptions:"詳細オプションを非表示",showDetailedOptions:"詳細オプションを表示"},nlPlaceholder:"明日午後3時に食料品を買う @家 #用事",notices:{titleRequired:"タスクタイトルを入力してください",success:'タスク"{title}"が正常に作成されました',successShortened:'タスク"{title}"が正常に作成されました(長さのためファイル名が短縮されました)',failure:"タスクの作成に失敗しました:{message}",blockingUnresolved:"解決できませんでした:{entries}",openCreatedTaskFailure:"タスクは作成されましたが、タスクノートを開けませんでした。"}},taskEdit:{title:"タスクを編集",sections:{completions:"完了",taskInfo:"タスク情報"},metadata:{totalTrackedTime:"総追跡時間:",due:"期限:",scheduled:"予定:",created:"作成:",modified:"変更:",file:"ファイル:"},buttons:{archive:"アーカイブ",unarchive:"アーカイブ解除"},notices:{titleRequired:"タスクタイトルを入力してください",noChanges:"保存する変更がありません",updateSuccess:'タスク"{title}"が正常に更新されました',updateFailure:"タスクの更新に失敗しました:{message}",dependenciesUpdateSuccess:"依存関係が更新されました",blockingUnresolved:"解決できませんでした:{entries}",fileMissing:"タスクファイルが見つかりませんでした:{path}",openNoteFailure:"タスクノートを開けませんでした",archiveSuccess:"タスクが正常に{action}されました",archiveFailure:"タスクのアーカイブに失敗しました",deleteSuccess:"タスク「{title}」を削除しました",deleteFailure:"タスクの削除に失敗しました: {message}"},archiveAction:{archived:"アーカイブ",unarchived:"アーカイブ解除"},deleteConfirmation:{title:"タスクを削除",message:"「{title}」を削除してもよろしいですか?タスクノートはObsidianのゴミ箱に移動されます。",confirm:"タスクを削除"}},storageLocation:{title:{migrate:"ポモドーロデータを移行しますか?",switch:"デイリーノートストレージに切り替えますか?"},message:{migrate:"これにより、既存のポモドーロセッションデータがデイリーノートのフロントマターに移行されます。データは日付でグループ化され、各デイリーノートに保存されます。",switch:"ポモドーロセッションデータは、プラグインデータファイルではなくデイリーノートのフロントマターに保存されます。"},whatThisMeans:"これが意味すること:",bullets:{dailyNotesRequired:"Daily NotesのコアプラグインまたはPeriodic Notesでデイリーノートを有効にしておく必要があります",storedInNotes:"データはデイリーノートのフロントマターに保存されます",migrateData:"既存のプラグインデータは移行され、その後クリアされます",futureSessions:"今後のセッションはデイリーノートに保存されます",dataLongevity:"これによりノートとのデータの永続性が向上します"},finalNote:{migrate:"⚠️ 必要に応じてバックアップを取ってください。この変更は自動的に元に戻すことはできません。",switch:"将来いつでもプラグインストレージに戻すことができます。"},buttons:{migrate:"データを移行",switch:"ストレージを切り替え"}},dueDate:{title:"期限日を設定",taskLabel:"タスク:{title}",sections:{dateTime:"期限日と時間",quickOptions:"クイックオプション"},descriptions:{dateTime:"このタスクをいつ完了すべきかを設定"},inputs:{date:{ariaLabel:"タスクの期限日",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"タスクの期限時間(オプション)",placeholder:"HH:MM"}},quickOptions:{today:"今日",todayAriaLabel:"期限日を今日に設定",tomorrow:"明日",tomorrowAriaLabel:"期限日を明日に設定",nextWeek:"来週",nextWeekAriaLabel:"期限日を来週に設定",now:"今",nowAriaLabel:"期限日と時間を今に設定",clear:"クリア",clearAriaLabel:"期限日をクリア"},errors:{invalidDateTime:"有効な日付と時間の形式を入力してください",updateFailed:"期限日の更新に失敗しました。再試行してください。"}},scheduledDate:{title:"予定日を設定",taskLabel:"タスク:{title}",sections:{dateTime:"予定日と時間",quickOptions:"クイックオプション"},descriptions:{dateTime:"このタスクに取り組む予定を設定"},inputs:{date:{ariaLabel:"タスクの予定日",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"タスクの予定時間(オプション)",placeholder:"HH:MM"}},quickOptions:{today:"今日",todayAriaLabel:"予定日を今日に設定",tomorrow:"明日",tomorrowAriaLabel:"予定日を明日に設定",nextWeek:"来週",nextWeekAriaLabel:"予定日を来週に設定",now:"今",nowAriaLabel:"予定日と時間を今に設定",clear:"クリア",clearAriaLabel:"予定日をクリア"},errors:{invalidDateTime:"有効な日付と時間の形式を入力してください",updateFailed:"予定日の更新に失敗しました。再試行してください。"}},timeEntryEditor:{title:"時間エントリ - {taskTitle}",addEntry:"時間エントリを追加",noEntries:"まだ時間エントリがありません",deleteEntry:"エントリを削除",startTime:"開始時刻",endTime:"終了時刻(実行中の場合は空白のまま)",duration:"時間(分)",durationDesc:"計算された時間を上書き",durationPlaceholder:"時間を分単位で入力",description:"説明",descriptionPlaceholder:"何に取り組みましたか?",calculatedDuration:"計算:{minutes}分",totalTime:"合計{hours}時間{minutes}分",totalMinutes:"合計{minutes}分",saved:"時間エントリが保存されました",saveFailed:"時間エントリの保存に失敗しました",openFailed:"時間エントリエディターを開けませんでした",noTasksWithEntries:"編集する時間エントリを持つタスクがありません",validation:{missingStartTime:"開始時刻は必須です",endBeforeStart:"終了時刻は開始時刻より後である必要があります"}},timeTracking:{noTasksAvailable:"時間を追跡できるタスクがありません",started:"時間追跡を開始しました:{taskTitle}",startFailed:"時間追跡の開始に失敗しました"},timeEntry:{mustHaveSpecificTime:"時間エントリには具体的な時間が必要です。週表示または日表示で時間範囲を選択してください。",noTasksAvailable:"時間エントリを作成できるタスクがありません",created:"{taskTitle}の時間エントリを作成しました({duration}分)",createFailed:"時間エントリの作成に失敗しました"}},contextMenus:{task:{status:"ステータス",statusSelected:"✓ {label}",priority:"優先度",prioritySelected:"✓ {label}",dueDate:"期限日",scheduledDate:"予定日",customDates:"カスタム日付",reminders:"リマインダー",remindBeforeDue:"期限前にリマインド…",remindBeforeScheduled:"予定前にリマインド…",manageReminders:"すべてのリマインダーを管理…",clearReminders:"すべてのリマインダーをクリア",startTimeTracking:"時間追跡を開始",stopTimeTracking:"時間追跡を停止",editTimeEntries:"時間エントリを編集",archive:"アーカイブ",unarchive:"アーカイブ解除",openNote:"ノートを開く",openNoteInNewTab:"ノートを新しいタブで開く",copyTitle:"タスクタイトルをコピー",quickActions:"クイックアクション",noteActions:"ノートアクション",rename:"名前変更",renameTitle:"ファイル名変更",renamePlaceholder:"新しい名前を入力",delete:"削除",deleteTitle:"ファイル削除",deleteMessage:'"{name}"を削除してもよろしいですか?',deleteConfirm:"削除",copyPath:"パスをコピー",copyUrl:"Obsidian URLをコピー",showInExplorer:"ファイルエクスプローラーで表示",addToCalendar:"カレンダーに追加",calendar:{google:"Googleカレンダー",outlook:"Outlookカレンダー",yahoo:"Yahooカレンダー",downloadIcs:".icsファイルをダウンロード",syncToGoogle:"Googleカレンダーに同期",syncToGoogleNotConfigured:"Googleカレンダー同期が設定されていません",syncToGoogleSuccess:"タスクをGoogleカレンダーに同期しました",syncToGoogleFailed:"Googleカレンダーへの同期に失敗しました"},recurrence:"繰り返し",clearRecurrence:"繰り返しをクリア",customRecurrence:"カスタム繰り返し...",createSubtask:"サブタスクを作成",dependencies:{title:"依存関係",addBlockedBy:"「ブロック元」を追加…",addBlockedByTitle:"このタスクが依存するタスクを追加",addBlocking:"「ブロックしている」を追加…",addBlockingTitle:"このタスクがブロックするタスクを追加",removeBlockedBy:"ブロック元を削除…",removeBlocking:"ブロックしているを削除…",unknownDependency:"不明",inputPlaceholder:"[[タスクノート]]",notices:{noEntries:"少なくとも1つのタスクを入力してください",blockedByAdded:"{count}件の依存関係が追加されました",blockedByRemoved:"依存関係が削除されました",blockingAdded:"{count}件の依存タスクが追加されました",blockingRemoved:"依存タスクが削除されました",unresolved:"解決できませんでした:{entries}",noEligibleTasks:"一致するタスクが利用できません",updateFailed:"依存関係の更新に失敗しました"}},organization:{title:"組織",projects:"プロジェクト",addToProject:"プロジェクトに追加…",subtasks:"サブタスク",addSubtasks:"サブタスクを追加…",notices:{alreadyInProject:"タスクは既にこのプロジェクトに含まれています",alreadySubtask:"タスクは既にこのタスクのサブタスクです",addedToProject:"プロジェクトに追加されました:{project}",addedAsSubtask:"{subtask}を{parent}のサブタスクとして追加しました",addToProjectFailed:"タスクをプロジェクトに追加できませんでした",addAsSubtaskFailed:"タスクをサブタスクとして追加できませんでした",projectSelectFailed:"プロジェクトセレクターを開けませんでした",subtaskSelectFailed:"サブタスクセレクターを開けませんでした",noEligibleSubtasks:"サブタスクとして割り当て可能なタスクがありません",currentTaskNotFound:"現在のタスクファイルが見つかりませんでした",updateContextsFailed:"コンテキストの更新に失敗しました"},contexts:"コンテキスト",addContext:"コンテキストを追加…",contextPlaceholder:"コンテキスト",contextSelected:"✓ {context}",clearContexts:"コンテキストをクリア"},subtasks:{loading:"サブタスクを読み込み中...",noSubtasks:"サブタスクが見つかりません",loadFailed:"サブタスクの読み込みに失敗しました"},markComplete:"この日付で完了としてマーク",markIncomplete:"この日付で未完了としてマーク",skipInstance:"インスタンスをスキップ",unskipInstance:"インスタンスのスキップを解除",completion:{submenu:"完了としてマークまたはスキップ",submenuCompleteOnly:"完了としてマーク",completeToday:"今日完了",completeAsScheduled:"予定日に完了",completeOnDue:"期限日に完了",completeOnPicked:"指定日に完了(日付を選択)",markIncomplete:"未完了としてマーク",noScheduledDate:"このタスクには予定日が設定されていません",noDueDate:"このタスクには期限日が設定されていません",noPickedDate:"日付が選択されていません",noCompletedStatus:"完了ステータスが設定されていません",pickDateTitle:"完了日を選択",completeFailure:"タスクの完了状態を更新できませんでした: {message}",clearInstancesConfirmTitle:"記録されたインスタンスを消去しますか?",clearInstancesConfirmMessage:"予定を変更すると、新しい日付以降に完了またはスキップとして記録された次のインスタンスが消去されます: {dates}。これらは完了またはスキップとしてマークされなくなります。続行しますか?",clearInstancesConfirmButton:"予定を変更して消去"},quickReminders:{atTime:"イベント時刻に",fiveMinutes:"5分前",fifteenMinutes:"15分前",oneHour:"1時間前",oneDay:"1日前"},notices:{toggleCompletionFailure:"繰り返しタスクの完了切り替えに失敗しました:{message}",toggleSkipFailure:"繰り返しタスクのスキップ切り替えに失敗しました:{message}",updateDueDateFailure:"タスク期限日の更新に失敗しました:{message}",updateScheduledFailure:"タスク予定日の更新に失敗しました:{message}",updateCustomDateFailure:"{field}の更新に失敗しました:{message}",updateRemindersFailure:"リマインダーの更新に失敗しました",clearRemindersFailure:"リマインダーのクリアに失敗しました",addReminderFailure:"リマインダーの追加に失敗しました",archiveFailure:"タスクアーカイブの切り替えに失敗しました:{message}",copyTitleSuccess:"タスクタイトルをクリップボードにコピーしました",copyFailure:"クリップボードへのコピーに失敗しました",renameSuccess:'"{name}"に名前変更しました',renameFailure:"ファイルの名前変更に失敗しました",copyPathSuccess:"ファイルパスをクリップボードにコピーしました",copyUrlSuccess:"Obsidian URLをクリップボードにコピーしました",updateRecurrenceFailure:"タスク繰り返しの更新に失敗しました:{message}",updateTagsFailed:"タグの更新に失敗しました"},tags:"タグ",addTag:"タグを追加…",removeTag:"{tag} を削除",removeTagInput:"タグを削除…",tagPlaceholder:"タグまたは #tag",clearTags:"タグをクリア"},priority:{clearPriority:"優先度をクリア"},ics:{showDetails:"詳細を表示",createTask:"イベントからタスクを作成",createNote:"イベントからノートを作成",linkNote:"既存のノートをリンク",copyTitle:"タイトルをコピー",copyLocation:"場所をコピー",copyUrl:"URLをコピー",copyMarkdown:"Markdownとしてコピー",subscriptionUnknown:"不明なカレンダー",notices:{copyTitleSuccess:"イベントタイトルをクリップボードにコピーしました",copyLocationSuccess:"場所をクリップボードにコピーしました",copyUrlSuccess:"イベントURLをクリップボードにコピーしました",copyMarkdownSuccess:"イベント詳細をMarkdownとしてコピーしました",copyFailure:"クリップボードへのコピーに失敗しました",taskCreated:"タスクを作成しました:{title}",taskCreateFailure:"イベントからのタスク作成に失敗しました",noteCreated:"ノートが正常に作成されました",creationFailure:"作成モーダルを開けませんでした",linkSuccess:'ノート"{name}"をイベントにリンクしました',linkFailure:"ノートのリンクに失敗しました",linkSelectionFailure:"ノート選択を開けませんでした"},markdown:{titleFallback:"無題のイベント",calendar:"**カレンダー:** {value}",date:"**日時:** {value}",location:"**場所:** {value}",descriptionHeading:"### 説明",url:"**URL:** {value}",at:" {time}に"}},date:{increment:{plusOneDay:"+1日",minusOneDay:"-1日",plusOneWeek:"+1週",minusOneWeek:"-1週"},basic:{today:"今日",tomorrow:"明日",thisWeekend:"今週末",nextWeek:"来週",nextMonth:"来月"},weekdaysLabel:"平日",selected:"✓ {label}",pickDateTime:"日時を選択…",clearDate:"日付をクリア",modal:{title:"日時を設定",dateLabel:"日付",timeLabel:"時間(オプション)",select:"選択"}}},services:{pomodoro:{notices:{alreadyRunning:"ポモドーロが既に実行中です",resumeCurrentSession:"新しいセッションを開始する代わりに現在のセッションを再開してください",timerAlreadyRunning:"タイマーが既に実行中です",resumeSessionInstead:"新しいセッションを開始する代わりに現在のセッションを再開してください",shortBreakStarted:"短い休憩を開始しました",longBreakStarted:"長い休憩を開始しました",paused:"ポモドーロが一時停止されました",resumed:"ポモドーロが再開されました",stoppedAndReset:"ポモドーロが停止およびリセットされました",migrationSuccess:"{count}件のポモドーロセッションがデイリーノートに正常に移行されました。",migrationFailure:"ポモドーロデータの移行に失敗しました。再試行するか、詳細についてはコンソールを確認してください。"}},icsSubscription:{notices:{calendarNotFound:'カレンダー"{name}"が見つかりません(404)。ICS URLが正しく、カレンダーが公開アクセス可能であることを確認してください。',calendarAccessDenied:'カレンダー"{name}"のアクセスが拒否されました(500)。これはMicrosoft Outlookサーバーの制限によるものかもしれません。カレンダー設定からICS URLを再生成してみてください。',fetchRemoteFailed:'リモートカレンダー"{name}"の取得に失敗しました:{error}',readLocalFailed:'ローカルカレンダー"{name}"の読み込みに失敗しました:{error}'}},calendarExport:{notices:{generateLinkFailed:"カレンダーリンクの生成に失敗しました",noTasksToExport:"エクスポートするタスクが見つかりません",downloadSuccess:"{count}件のタスクを含む{filename}をダウンロードしました",downloadFailed:"カレンダーファイルのダウンロードに失敗しました",singleDownloadSuccess:"{filename}をダウンロードしました"}},filter:{groupLabels:{noProject:"プロジェクトなし",noTags:"タグなし",invalidDate:"無効な日付",due:{overdue:"期限切れ",today:"今日",tomorrow:"明日",nextSevenDays:"次の7日間",later:"後で",none:"期限日なし"},scheduled:{past:"過去の予定",today:"今日",tomorrow:"明日",nextSevenDays:"次の7日間",later:"後で",none:"予定日なし"}},errors:{noDatesProvided:"日付が提供されていません"},folders:{root:"(ルート)"}},instantTaskConvert:{notices:{noCheckboxTasks:"現在のノートにチェックボックスタスクが見つかりません。",convertingTasks:"{count}件のタスクを変換中...",conversionSuccess:"✅ {count}件のタスクをTaskNotesに正常に変換しました!",partialConversion:"{successCount}件のタスクが変換されました。{failureCount}件が失敗しました。",batchConversionFailed:"バッチ変換の実行に失敗しました。再試行してください。",invalidParameters:"無効な入力パラメーター。",emptyLine:"現在の行が空であるか、有効なコンテンツが含まれていません。",parseError:"タスクの解析エラー:{error}",invalidTaskData:"無効なタスクデータ。",replaceLineFailed:"タスク行の置換に失敗しました。",conversionComplete:"タスクが変換されました:{title}",conversionCompleteShortened:'タスクが変換されました:"{title}"(長さのためファイル名が短縮されました)',fileExists:"この名前のファイルが既に存在します。再試行するかタスクの名前を変更してください。",conversionFailed:"タスクの変換に失敗しました。再試行してください。"}},icsNote:{notices:{templateNotFound:"テンプレートが見つかりません:{path}",templateProcessError:"テンプレートの処理エラー:{template}",linkedToEvent:"ノートをICSイベントにリンクしました:{title}"}},task:{notices:{templateNotFound:"タスクボディテンプレートが見つかりません:{path}",templateReadError:"タスクボディテンプレートの読み込みエラー:{template}",occurrenceTemplateNotFound:"発生ノートテンプレートが見つかりません:{path}",occurrenceTemplateReadError:"発生ノートテンプレートの読み込みエラー:{template}",moveTaskFailed:"{operation}タスクの移動に失敗しました:{error}"}},autoExport:{notices:{exportFailed:"TaskNotes自動エクスポートに失敗しました:{error}"}}},ui:{icsCard:{untitledEvent:"無題のイベント",allDay:"終日",calendarEvent:"カレンダーイベント",calendarFallback:"カレンダー"},noteCard:{createdLabel:"作成:",dailyBadge:"デイリー",dailyTooltip:"デイリーノート"},taskCard:{labels:{due:"期限",scheduled:"予定",recurrence:"繰り返し",completed:"完了",created:"作成",modified:"更新",blocked:"ブロック",blocking:"ブロック中"},blockedBadge:"ブロック中",blockedBadgeTooltip:"このタスクは他のタスクを待っています",blockingBadge:"ブロックしている",blockingBadgeTooltip:"このタスクは他のタスクをブロックしています",blockingToggle:"{count} 件のタスクをブロック",priorityAriaLabel:"優先度: {label}",taskOptions:"タスクオプション",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"リマインダーが1件設定されています (クリックして管理)",reminderTooltipMany:"{count}件のリマインダーが設定されています (クリックして管理)",projectTooltip:"このタスクはプロジェクトとして使用されています(クリックでサブタスクを表示/非表示)",projectIndicatorTooltip:"このタスクはプロジェクトとして使用されています",expandSubtasks:"サブタスクを展開",collapseSubtasks:"サブタスクを折りたたむ",dueToday:"{label}: 今日",dueTodayAt:"{label}: 今日 {time}",dueOverdue:"{label}: {display} (期限超過)",dueLabel:"{label}: {display}",scheduledToday:"{label}: 今日",scheduledTodayAt:"{label}: 今日 {time}",scheduledPast:"{label}: {display} (過去)",scheduledLabel:"{label}: {display}",loadingDependencies:"依存関係を読み込み中…",blockingEmpty:"依存タスクはありません",blockingLoadError:"依存関係の読み込みに失敗しました",googleCalendarSyncTooltip:"Googleカレンダーに同期済み",detailsTooltip:"タスクに詳細があります"},propertyEventCard:{unknownFile:"不明なファイル"},filterHeading:{allViewName:"すべて"},filterBar:{saveView:"ビューを保存",saveViewNamePlaceholder:"ビュー名を入力...",saveButton:"保存",views:"ビュー",savedFilterViews:"保存されたフィルタービュー",filters:"フィルター",properties:"プロパティ",sort:"ソート",newTask:"新規",expandAllGroups:"すべてのグループを展開",collapseAllGroups:"すべてのグループを折りたたみ",searchTasksPlaceholder:"タスクを検索...",searchTasksTooltip:"タスクタイトルを検索",filterUnavailable:"フィルターバーが一時的に利用できません",toggleFilter:"フィルターを切り替え",activeFiltersTooltip:"アクティブフィルター – クリックで変更、右クリックでクリア",configureVisibleProperties:"表示プロパティを設定",sortAndGroupOptions:"ソートとグループオプション",sortMenuHeader:"ソート",orderMenuHeader:"順序",groupMenuHeader:"グループ",createNewTask:"新しいタスクを作成",filter:"フィルター",displayOrganization:"表示と整理",viewOptions:"ビューオプション",addFilter:"フィルターを追加",addFilterGroup:"フィルターグループを追加",addFilterTooltip:"新しいフィルター条件を追加",addFilterGroupTooltip:"ネストしたフィルターグループを追加",clearAllFilters:"すべてのフィルターとグループをクリア",saveCurrentFilter:"現在のフィルターをビューとして保存",closeFilterModal:"フィルターモーダルを閉じる",deleteFilterGroup:"フィルターグループを削除",deleteCondition:"条件を削除",all:"すべて",any:"いずれか",followingAreTrue:"以下が真:",where:"ここで",selectProperty:"選択...",chooseProperty:"フィルターするタスクプロパティを選択",chooseOperator:"プロパティ値の比較方法を選択",enterValue:"フィルターする値を入力",selectValue:"フィルターする{property}を選択",sortBy:"ソート順:",toggleSortDirection:"ソート方向を切り替え",chooseSortMethod:"タスクのソート方法を選択",groupBy:"グループ化:",chooseGroupMethod:"共通プロパティでタスクをグループ化",toggleViewOption:"{option}を切り替え",expandCollapseFilters:"クリックでフィルター条件を展開/折りたたみ",expandCollapseSort:"クリックでソートとグループオプションを展開/折りたたみ",expandCollapseViewOptions:"クリックでビュー固有オプションを展開/折りたたみ",naturalLanguageDates:"自然言語日付",naturalLanguageExamples:"自然言語日付の例を表示",enterNumericValue:"フィルターする数値を入力",enterDateValue:"自然言語またはISO形式で日付を入力",pickDateTime:"日時を選択",noSavedViews:"保存されたビューがありません",savedViews:"保存されたビュー",yourSavedFilters:"保存されたフィルター設定",dragToReorder:"ドラッグしてビューを並び替え",loadSavedView:"保存されたビューを読み込み:{name}",deleteView:"ビューを削除",deleteViewTitle:"ビューを削除",deleteViewMessage:'ビュー"{name}"を削除してもよろしいですか?',manageAllReminders:"すべてのリマインダーを管理...",clearAllReminders:"すべてのリマインダーをクリア",customRecurrence:"カスタム繰り返し...",clearRecurrence:"繰り返しをクリア",sortOptions:{dueDate:"期限日",scheduledDate:"予定日",priority:"優先度",status:"ステータス",title:"タイトル",createdDate:"作成日",tags:"タグ",ascending:"昇順",descending:"降順"},group:{none:"なし",status:"ステータス",priority:"優先度",context:"コンテキスト",project:"プロジェクト",dueDate:"期限日",scheduledDate:"予定日",tags:"タグ",completedDate:"完了日"},subgroupLabel:"サブグループ",notices:{propertiesMenuFailed:"プロパティメニューの表示に失敗しました"}}},components:{dateContextMenu:{weekdays:"平日",clearDate:"日付をクリア",today:"今日",tomorrow:"明日",thisWeekend:"今週末",nextWeek:"来週",nextMonth:"来月",setDateTime:"日時を設定",dateLabel:"日付",timeLabel:"時間(オプション)"},subgroupMenuBuilder:{none:"なし",status:"ステータス",priority:"優先度",context:"コンテキスト",project:"プロジェクト",dueDate:"期限日",scheduledDate:"予定日",tags:"タグ",completedDate:"完了日",subgroup:"サブグループ"},propertyVisibilityDropdown:{coreProperties:"コアプロパティ",organization:"組織",customProperties:"カスタムプロパティ",failed:"プロパティメニューの表示に失敗しました",properties:{statusDot:"ステータスドット",priorityDot:"優先度ドット",dueDate:"期限日",scheduledDate:"予定日",timeEstimate:"時間見積もり",totalTrackedTime:"総追跡時間",checklistProgress:"チェックリストの進捗",recurrence:"繰り返し",completedDate:"完了日",createdDate:"作成日",modifiedDate:"変更日",projects:"プロジェクト",contexts:"コンテキスト",tags:"タグ",blocked:"ブロック中",blocking:"ブロックしている"}},reminderContextMenu:{remindBeforeDue:"期限前にリマインド...",remindBeforeScheduled:"予定前にリマインド...",manageAllReminders:"すべてのリマインダーを管理...",clearAllReminders:"すべてのリマインダーをクリア",quickReminders:{atTime:"イベント時刻に",fiveMinutesBefore:"5分前",fifteenMinutesBefore:"15分前",oneHourBefore:"1時間前",oneDayBefore:"1日前"}},recurrenceContextMenu:{daily:"毎日",weeklyOn:"毎週{day}曜日",everyTwoWeeksOn:"2週間ごとの{day}曜日",monthlyOnThe:"毎月{ordinal}",everyThreeMonthsOnThe:"3か月ごとの{ordinal}",yearlyOn:"毎年{month}{ordinal}",weekdaysOnly:"平日のみ",dailyAfterCompletion:"毎日(完了後)",every3DaysAfterCompletion:"3日ごと(完了後)",weeklyAfterCompletion:"毎週(完了後)",monthlyAfterCompletion:"毎月(完了後)",customRecurrence:"カスタム繰り返し...",clearRecurrence:"繰り返しをクリア",customRecurrenceModal:{title:"カスタム繰り返し",startDate:"開始日",startDateDesc:"繰り返しパターンが始まる日付",startTime:"開始時刻",startTimeDesc:"繰り返しインスタンスが表示される時刻(オプション)",recurFrom:"繰り返しの基準",recurFromDesc:"次の発生をいつから計算しますか?",scheduledDate:"予定日",completionDate:"完了日",frequency:"頻度",interval:"間隔",intervalDesc:"X日/週/月/年ごと",daysOfWeek:"曜日",daysOfWeekDesc:"特定の曜日を選択(週次繰り返し用)",monthlyRecurrence:"月次繰り返し",monthlyRecurrenceDesc:"月次繰り返し方法を選択",yearlyRecurrence:"年次繰り返し",yearlyRecurrenceDesc:"年次繰り返し方法を選択",endCondition:"終了条件",endConditionDesc:"繰り返しの終了時期を選択",neverEnds:"終了しない",endAfterOccurrences:"{count}回後に終了",endOnDate:"{date}に終了",onDayOfMonth:"毎月{day}日",onTheWeekOfMonth:"毎月{week}{day}曜日",onDateOfYear:"毎年{month}{day}",onTheWeekOfYear:"毎年{month}の{week}{day}曜日",frequencies:{daily:"毎日",weekly:"毎週",monthly:"毎月",yearly:"毎年"},weekPositions:{first:"第1",second:"第2",third:"第3",fourth:"第4",last:"最終"},weekdays:{monday:"月曜日",tuesday:"火曜日",wednesday:"水曜日",thursday:"木曜日",friday:"金曜日",saturday:"土曜日",sunday:"日曜日"},weekdaysShort:{mon:"月",tue:"火",wed:"水",thu:"木",fri:"金",sat:"土",sun:"日"},cancel:"キャンセル",save:"保存"}}}};var Hue={common:{appName:"TaskNotes",new:"Novo",cancel:"Cancelar",confirm:"Confirmar",close:"Fechar",save:"Salvar",reorder:{confirmLargeTitle:"Confirmar grande reordenação",confirmButton:"Reordenar notas",confirmLargeMessage:'Reordenar aqui atualizará "{field}" em {count} notas para criar uma ordem manual persistente para {scope}. Notas ocultas ou filtradas no mesmo escopo também podem ser atualizadas. Continuar?'},language:"Idioma",systemDefault:"Padrão do sistema",loading:"Carregando...",languages:{en:"Inglês",fr:"Francês",ru:"Russo",zh:"Chinês",de:"Alemão",es:"Espanhol",ja:"Japonês",pt:"Português (Brasil)",ko:"Coreano"},weekdays:{sunday:"Domingo",monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado"},months:{january:"Janeiro",february:"Fevereiro",march:"Março",april:"Abril",may:"Maio",june:"Junho",july:"Julho",august:"Agosto",september:"Setembro",october:"Outubro",november:"Novembro",december:"Dezembro"}},views:{agenda:{title:"Agenda",today:"Hoje",overdue:"Atrasadas",refreshCalendars:"Atualizar calendários",actions:{previousPeriod:"Período anterior",nextPeriod:"Próximo período",goToToday:"Ir para hoje",refreshCalendars:"Atualizar inscrições de calendário"},loading:"Carregando agenda...",dayToggle:"Alternar dia",overdueToggle:"Alternar seção de atrasadas",expandAllDays:"Expandir Todos os Dias",collapseAllDays:"Recolher Todos os Dias",notices:{calendarNotReady:"Serviço de calendário ainda não está pronto",calendarRefreshed:"Inscrições de calendário atualizadas",refreshFailed:"Falha ao atualizar"},empty:{noItemsScheduled:"Nenhum item agendado",noItemsFound:"Nenhum item encontrado",helpText:"Crie tarefas com datas de vencimento ou agendadas, ou adicione notas para vê-las aqui."},contextMenu:{showOverdueSection:"Mostrar seção de atrasadas",showNotes:"Mostrar notas",calendarSubscriptions:"Inscrições de calendário"},periods:{thisWeek:"Esta semana"},tipPrefix:"Dica: "},taskList:{title:"Tarefas",expandAllGroups:"Expandir Todos os Grupos",collapseAllGroups:"Recolher Todos os Grupos",noTasksFound:"Nenhuma tarefa encontrada para os filtros selecionados.",reorder:{scope:{ungrouped:"esta lista sem grupos",group:'grupo "{group}"'}},errors:{formulaGroupingReadOnly:"Não é possível reordenar tarefas em grupos baseados em fórmulas. Valores de fórmula são calculados e não podem ser alterados diretamente."}},notes:{title:"Notas",refreshButton:"Atualizar",refreshingButton:"Atualizando...",notices:{indexingDisabled:"Indexação de notas desativada"},empty:{noNotesFound:"Nenhuma nota encontrada",helpText:"Nenhuma nota encontrada para a data selecionada. Tente selecionar uma data diferente no Mini Calendário ou crie algumas notas."},loading:"Carregando notas...",refreshButtonAriaLabel:"Atualizar lista de notas"},miniCalendar:{title:"Mini Calendário",contextMenu:{openDailyNote:"Abrir nota diária",openWeeklyNote:"Abrir nota semanal"}},advancedCalendar:{title:"Calendário",filters:{showFilters:"Mostrar filtros",hideFilters:"Ocultar filtros"},viewOptions:{calendarSubscriptions:"Inscrições de calendário",timeEntries:"Registros de tempo",timeblocks:"Blocos de tempo",scheduledDates:"Datas agendadas",dueDates:"Datas de vencimento",allDaySlot:"Slot de dia inteiro",scheduledTasks:"Tarefas agendadas",recurringTasks:"Tarefas recorrentes"},buttons:{refresh:"Atualizar",refreshHint:"Atualizar Inscrições de Calendário"},notices:{icsServiceNotAvailable:"Serviço de inscrição ICS não disponível",calendarRefreshedAll:"Todas as inscrições de calendário atualizadas com sucesso",refreshFailed:"Falha ao atualizar algumas inscrições de calendário",timeblockSpecificTime:"Blocos de tempo devem ter horários específicos. Por favor, selecione um intervalo de tempo na visualização de semana ou dia.",timeblockMoved:'Bloco de tempo "{title}" movido para {date}',timeblockUpdated:'Tempo do bloco de tempo "{title}" atualizado',timeblockMoveFailed:"Falha ao mover bloco de tempo: {message}",timeblockResized:'Duração do bloco de tempo "{title}" atualizada',timeblockResizeFailed:"Falha ao redimensionar bloco de tempo: {message}",taskScheduled:'Tarefa "{title}" agendada para {date}',scheduleTaskFailed:"Falha ao agendar tarefa",endTimeAfterStart:"A hora de término deve ser posterior à hora de início",timeEntryNotFound:"Registro de tempo não encontrado",timeEntryDeleted:"Registro de tempo excluído",deleteTimeEntryFailed:"Falha ao excluir registro de tempo"},timeEntry:{estimatedSuffix:"estimado",trackedSuffix:"rastreado",recurringPrefix:"Recorrente: ",completedPrefix:"Concluído: ",createdPrefix:"Criado: ",modifiedPrefix:"Modificado: ",duePrefix:"Vencimento: ",scheduledPrefix:"Agendado: "},contextMenus:{openTask:"Abrir tarefa",deleteTimeEntry:"Excluir registro de tempo",deleteTimeEntryTitle:"Excluir Registro de Tempo",deleteTimeEntryConfirm:"Tem certeza de que deseja excluir este registro de tempo{duration}? Esta ação não pode ser desfeita.",deleteButton:"Excluir",cancelButton:"Cancelar"}},basesCalendar:{title:"Calendário de Bases",today:"Hoje",buttonText:{month:"M",week:"S",day:"D",year:"A",list:"L",customDays:"{count}D",listDays:"Lista {count}d",refresh:"Atualizar"},hints:{refresh:"Atualizar inscrições de calendário",today:"Ir para hoje",prev:"Anterior",next:"Próximo",month:"Visualização mensal",week:"Visualização semanal",day:"Visualização diária",year:"Visualização anual",list:"Visualização em lista",customDays:"Visualização de {count} dias"},settings:{groups:{dateNavigation:"Navegação de Data",events:"Eventos",layout:"Layout",view:"Visualização",display:"Exibição",timeGrid:"Grade de horário",eventLayout:"Layout de eventos",propertyBasedEvents:"Eventos baseados em propriedade",calendarSubscriptions:"Inscrições de calendário",googleCalendars:"Calendários do Google",microsoftCalendars:"Calendários da Microsoft"},dateNavigation:{navigateToDate:"Navegar para data",navigateToDatePlaceholder:"AAAA-MM-DD (ex: 2025-01-15) - deixe em branco para usar propriedade",navigateToDateFromProperty:"Navegar para data da propriedade",navigateToDateFromPropertyPlaceholder:"Selecione uma propriedade de data (opcional)",propertyNavigationStrategy:"Estratégia de navegação da propriedade",createDailyNotesFromDateLinks:"Criar notas diárias a partir de links de data",strategies:{first:"Primeiro resultado",earliest:"Data mais antiga",latest:"Data mais recente"}},events:{showScheduledTasks:"Mostrar tarefas agendadas",showDueTasks:"Mostrar tarefas com vencimento",showOverdueOnToday:"Mostrar tarefas atrasadas na data de hoje",showRecurringTasks:"Mostrar tarefas recorrentes",showTimeEntries:"Mostrar registros de tempo",showTimeblocks:"Mostrar blocos de tempo",showPropertyBasedEvents:"Mostrar eventos baseados em propriedade",showCompletedRecurringInstances:"Mostrar instâncias recorrentes concluídas",showSkippedRecurringInstances:"Mostrar instâncias recorrentes ignoradas"},layout:{calendarView:"Visualização do calendário",customDayCount:"Contagem de dias personalizados",listDayCount:"Contagem de dias da lista",dayStartTime:"Hora de início do dia",dayStartTimePlaceholder:"HH:mm:ss (ex: 08:00:00)",dayEndTime:"Hora de término do dia",dayEndTimePlaceholder:"HH:mm:ss (ex: 20:00:00)",timeSlotDuration:"Duração do slot de tempo",timeSlotDurationPlaceholder:"HH:mm:ss (ex: 00:30:00)",dragDropResolution:"Resolução de arrastar/soltar",dragDropResolutionPlaceholder:"HH:mm:ss (ex: 00:05:00)",weekStartsOn:"A semana começa em",showWeekNumbers:"Mostrar números da semana",showNowIndicator:"Mostrar indicador 'agora'",showWeekends:"Mostrar fins de semana",showAllDaySlot:"Mostrar slot de dia inteiro",showTimeGrid:"Mostrar grade horária",showTodayHighlight:"Mostrar destaque de hoje",todayColumnWidthMultiplier:"Multiplicador de largura da coluna de hoje",showSelectionPreview:"Mostrar pré-visualização da seleção",timeFormat:"Formato da hora",timeFormat12:"12 horas (AM/PM)",timeFormat24:"24 horas",initialScrollTime:"Hora inicial de rolagem",initialScrollTimePlaceholder:"HH:mm:ss (ex: 08:00:00)",minimumEventHeight:"Altura mínima do evento (px)",slotEventOverlap:"Permitir sobreposição de eventos",enableSearch:"Habilitar caixa de pesquisa",eventMaxStack:"Máx. eventos empilhados (vista semana/dia, 0 = ilimitado)",dayMaxEvents:"Máx. eventos por dia (vista mês, 0 = automático)",dayMaxEventRows:"Máx. linhas de eventos por dia (vista mês, 0 = ilimitado)",spanScheduledToDue:"Estender tarefas entre data agendada e data de vencimento",heightMode:"Modo de altura",heightModeFill:"Preencher contêiner",heightModeAuto:"Altura automática"},propertyBasedEvents:{startDateProperty:"Propriedade da data de início",startDatePropertyPlaceholder:"Selecione a propriedade para data/hora de início",endDateProperty:"Propriedade da data de término (opcional)",endDatePropertyPlaceholder:"Selecione a propriedade para data/hora de término",titleProperty:"Propriedade do título (opcional)",titlePropertyPlaceholder:"Selecione a propriedade para o título do evento"}},notices:{noDailyNoteForDate:"Não existe nota diária para esta data."},errors:{failedToInitialize:"Falha ao inicializar o calendário"}},kanban:{title:"Kanban",newTask:"Nova tarefa",addCard:"+ Adicionar um cartão",noTasks:"Sem tarefas",uncategorized:"Sem categoria",noProject:"Sem Projeto",reorder:{scope:{column:'coluna "{group}"',columnInSwimlane:'coluna "{group}" na swimlane "{swimlane}"'}},notices:{loadFailed:"Falha ao carregar o quadro Kanban",movedTask:'Tarefa movida para "{0}"'},errors:{loadingBoard:"Erro ao carregar o quadro.",noGroupBy:"A vista Kanban requer que uma propriedade 'Agrupar por' seja configurada. Clique no botão 'Ordenar' e selecione uma propriedade em 'Agrupar por'.",formulaGroupingReadOnly:"Não é possível mover tarefas entre colunas baseadas em fórmulas. Os valores de fórmula são calculados e não podem ser modificados diretamente.",formulaSwimlaneReadOnly:"Não é possível mover tarefas entre raias baseadas em fórmulas. Os valores de fórmula são calculados e não podem ser modificados diretamente."},columnTitle:"Sem título"},pomodoro:{title:"Pomodoro",status:{focus:"Foco",ready:"Pronto para começar",paused:"Pausado",working:"Trabalhando",shortBreak:"Pausa curta",longBreak:"Pausa longa",breakPrompt:"Ótimo trabalho! Hora de uma pausa {length}",breakLength:{short:"curta",long:"longa"},breakComplete:"Pausa concluída! Pronto para o próximo pomodoro?"},buttons:{start:"Iniciar",pause:"Pausar",stop:"Parar",resume:"Retomar",startShortBreak:"Iniciar Pausa Curta",startLongBreak:"Iniciar Pausa Longa",skipBreak:"Pular pausa",chooseTask:"Escolher tarefa...",changeTask:"Alterar tarefa...",clearTask:"Limpar tarefa",selectDifferentTask:"Selecionar uma tarefa diferente",startFocus:"Iniciar foco",addMinute:"Adicionar um minuto",subtractMinute:"Subtrair um minuto"},notices:{noTasks:"Nenhuma tarefa não arquivada encontrada. Crie algumas tarefas primeiro.",loadFailed:"Falha ao carregar tarefas",invalidDuration:"Digite uma duração como 10, 10:30 ou 1:30:00."},statsLabel:"concluídos hoje",meta:{ready:"{time} planejado · {count} concluídos hoje",running:"{time} restante · Termina às {endTime}",paused:"{type} pausado · {time} restante",breakReady:"{type} pronto · {time} planejado"},timer:{editLabel:"Editar duração do timer",inputLabel:"Duração do timer"}},pomodoroStats:{title:"Estatísticas Pomodoro",heading:"Estatísticas Pomodoro",refresh:"Atualizar",sections:{overview:"Visão Geral",today:"Hoje",week:"Esta semana",allTime:"Todo o período",recent:"Sessões recentes"},overviewCards:{todayPomos:{label:"Pomos de Hoje",change:{more:"{count} a mais que ontem",less:"{count} a menos que ontem"}},totalPomos:{label:"Total de Pomos"},todayFocus:{label:"Foco de Hoje",change:{more:"{duration} a mais que ontem",less:"{duration} a menos que ontem"}},totalFocus:{label:"Duração Total de Foco"}},stats:{pomodoros:"Pomodoros",streak:"Sequência",minutes:"Minutos",average:"Duração média",completion:"Conclusão"},recents:{empty:"Nenhuma sessão registrada ainda",duration:"{minutes} min",status:{completed:"Concluído",interrupted:"Interrompido"},delete:"Excluir sessão",deleteAria:"Excluir sessão Pomodoro",deleteConfirmTitle:"Excluir sessão Pomodoro?",deleteConfirmMessage:"Isso remove a sessão do histórico Pomodoro. Entradas de tempo de tarefas existentes não são alteradas.",deleteConfirmButton:"Excluir",deleteSuccess:"Sessão Pomodoro excluída",deleteNotFound:"Sessão Pomodoro não encontrada"},basesMigration:{title:"Quer uma visualização Base?",description:"As visualizações Base de Pomodoro usam o frontmatter das notas diárias. Para ver esse histórico na Base de estatísticas Pomodoro gerada, migre os dados do Pomodoro nas configurações e defina o armazenamento como notas diárias."}},stats:{title:"Estatísticas",taskProjectStats:"Estatísticas de Tarefas e Projetos",sections:{filters:"Filtros",overview:"Visão Geral",today:"Hoje",thisWeek:"Esta Semana",thisMonth:"Este Mês",projectBreakdown:"Detalhamento por Projeto",dateRange:"Intervalo de Datas"},filters:{minTime:"Tempo mín. (minutos)",allTasks:"Todas as Tarefas",activeOnly:"Somente Ativas",completedOnly:"Somente Concluídas"},refreshButton:"Atualizar",timeRanges:{allTime:"Todo o período",last7Days:"Últimos 7 dias",last30Days:"Últimos 30 dias",last90Days:"Últimos 90 dias",customRange:"Intervalo Personalizado"},resetFiltersButton:"Redefinir Filtros",dateRangeFrom:"De",dateRangeTo:"Até",noProject:"Sem Projeto",cards:{timeTrackedEstimated:"Tempo Rastreado / Estimado",totalTasks:"Total de Tarefas",completionRate:"Taxa de Conclusão",activeProjects:"Projetos Ativos",avgTimePerTask:"Tempo Médio por Tarefa"},labels:{tasks:"Tarefas",completed:"Concluídas",projects:"Projetos"},noProjectData:"Nenhum dado de projeto disponível",notAvailable:"N/D",noTasks:"Nenhuma tarefa encontrada",loading:"Carregando..."},releaseNotes:{title:"O que há de novo no TaskNotes {version}",header:"O que há de novo no TaskNotes {version}",viewAllLink:"Ver todas as notas de lançamento no GitHub →",starMessage:"Agradecemos muito todo feedback. Se algo não parecer certo, conte para nós no GitHub. Se você acha o TaskNotes útil, considere dar uma estrela.",baseFilesNotice:"> [!info] Sobre os arquivos `.base` padrão\n> Alterações nos modelos `.base` gerados por padrão não substituem seus arquivos `.base` existentes, para manter suas personalizações.\n> Se quiser as melhorias mais recentes dos modelos, regenere os arquivos base em **Configurações → TaskNotes → Geral → Visualizações e arquivos base → Atualizar arquivos**."}},settings:{header:{documentation:"Documentação",documentationUrl:"https://tasknotes.dev"},tabs:{general:"Geral",taskProperties:"Propriedades da Tarefa",modalFields:"Campos do Modal",defaults:"Padrões e Modelos",appearance:"Aparência e UI",features:"Recursos",integrations:"Integrações"},features:{inlineTasks:{header:"Tarefas Embutidas",description:"Configurações para links de tarefas e conversão de caixas de seleção em tarefas nas notas."},taskCreation:{header:"Criação de tarefas",description:"Configure o que acontece depois que tarefas são criadas.",openAfterCreate:{name:"Abrir tarefa após criação",description:"Escolha se o modal normal Criar nova tarefa abre a nova nota de tarefa após salvar.",options:{none:"Não abrir",sameTab:"Abrir na mesma aba",newTab:"Abrir em uma nova aba"}}},overlays:{taskLinkToggle:{name:"Sobreposição de link de tarefa",description:"Mostrar sobreposições interativas ao passar o mouse sobre links de tarefas"},aliasExclusion:{name:"Desativar sobreposição para links com alias",description:"Não mostrar o widget de tarefa se o link contiver um alias (ex. [[Tarefa|Alias]])."}},instantConvert:{toggle:{name:"Mostrar botão de conversão ao lado de caixas de seleção",description:"Exibir um botão embutido ao lado de caixas de seleção Markdown que as converte para TaskNotes"},preserveCheckbox:{name:"Manter a caixa de seleção ao converter",description:"Manter o marcador original da caixa de seleção Markdown ao converter uma caixa em link TaskNote"},folder:{name:"Pasta para tarefas criadas inline",description:"Pasta onde tarefas criadas por comandos inline ou conversão de caixas de seleção serão criadas. Deixe em branco para usar a pasta padrão de tarefas. Use {{currentNotePath}} para a pasta da nota atual, ou {{currentNoteTitle}} para uma subpasta com o nome da nota atual."}},nlp:{header:"Processamento de Linguagem Natural",description:"Analisa datas, prioridades e outras propriedades do texto inserido.",enable:{name:"Habilitar entrada de tarefa em linguagem natural",description:"Analisar datas de vencimento, prioridades e contextos da linguagem natural ao criar tarefas"},defaultToScheduled:{name:"Padrão para agendado",description:"Quando a NLP detectar uma data sem contexto, tratá-la como agendada em vez de vencimento"},language:{name:"Idioma da NLP",description:"Idioma para padrões de processamento de linguagem natural e análise de datas"},statusTrigger:{name:"Gatilho de sugestão de status",description:"Texto para acionar sugestões de status (deixe em branco para desativar)"}},pomodoro:{header:"Temporizador Pomodoro",description:"Configure intervalos de trabalho/pausa para o temporizador Pomodoro.",workDuration:{name:"Duração do trabalho",description:"Duração dos intervalos de trabalho em minutos"},shortBreak:{name:"Duração da pausa curta",description:"Duração das pausas curtas em minutos"},longBreak:{name:"Duração da pausa longa",description:"Duração das pausas longas em minutos"},longBreakInterval:{name:"Intervalo da pausa longa",description:"Número de sessões de trabalho antes de uma pausa longa"},autoStartBreaks:{name:"Iniciar pausas automaticamente",description:"Iniciar automaticamente os temporizadores de pausa após as sessões de trabalho"},autoStartWork:{name:"Iniciar trabalho automaticamente",description:"Iniciar automaticamente as sessões de trabalho após as pausas"},notifications:{name:"Notificações Pomodoro",description:"Mostrar notificações quando as sessões Pomodoro terminarem"},mobileSidebar:{name:"Barra lateral móvel",description:"Onde abrir o temporizador Pomodoro em dispositivos móveis",tab:"Painel de notas",left:"Barra lateral esquerda",right:"Barra lateral direita"},statusBar:{name:"Mostrar Pomodoro na barra de status",description:"Mostrar a contagem regressiva ativa do Pomodoro na barra de status do Obsidian"}},uiLanguage:{header:"Idioma da Interface",description:"Altere o idioma dos menus, avisos e visualizações do TaskNotes.",dropdown:{name:"Idioma da UI",description:"Selecione o idioma usado para o texto da interface do TaskNotes"}},pomodoroSound:{enabledName:"Som ativado",enabledDesc:"Tocar som quando as sessões Pomodoro terminarem",volumeName:"Volume do som",volumeDesc:"Volume para sons Pomodoro (0-100)"},dataStorage:{name:"Armazenamento de dados Pomodoro",description:"Configure onde os dados da sessão pomodoro são armazenados e como são gerenciados.",dailyNotes:"Notas diárias",pluginData:"Dados do plugin",notices:{locationChanged:"Local de armazenamento Pomodoro alterado para {location}"}},notifications:{header:"Notificações",description:"Configure notificações de lembrete de tarefas e alertas.",enableName:"Ativar notificações",enableDesc:"Ativar notificações de lembrete de tarefas",typeName:"Tipo de notificação",typeDesc:"Tipo de notificações a serem mostradas",systemLabel:"Notificações do sistema",inAppLabel:"Notificações no aplicativo",soundEnabledName:"Som de notificação",soundEnabledDesc:"Tocar um som quando lembretes de tarefa forem acionados",soundVolumeName:"Volume do som",soundVolumeDesc:"Volume dos sons de lembrete de tarefa (0-100)",soundPreviewName:"Pré-visualizar som de notificação",soundPreviewDesc:"Tocar o som configurado de lembrete de tarefa",soundPreviewButton:"Pré-visualizar",testReminderName:"Enviar lembrete de teste",testReminderDesc:"Enviar um lembrete de teste usando o tipo de notificação e as configurações de som atuais.",testReminderButton:"Enviar teste"},overdue:{hideCompletedName:"Ocultar tarefas concluídas das atrasadas",hideCompletedDesc:"Excluir tarefas concluídas dos cálculos de tarefas atrasadas"},indexing:{disableName:"Desativar indexação de notas",disableDesc:"Desativar indexação automática do conteúdo das notas para melhor desempenho"},suggestions:{debounceName:"Debounce de sugestão",debounceDesc:"Atraso em milissegundos antes de mostrar sugestões"},timeTracking:{autoStopName:"Parar registro de tempo automaticamente",autoStopDesc:"Parar automaticamente o registro de tempo quando uma tarefa é marcada como concluída",stopNotificationName:"Notificação de parada de registro de tempo",stopNotificationDesc:"Mostrar notificação quando o registro de tempo é parado automaticamente"},stopNotificationName:"Notificação de parada de registro de tempo",stopNotificationDesc:"Mostrar notificação quando o registro de tempo é parado automaticamente",recurring:{maintainOffsetName:"Manter deslocamento da data de vencimento em tarefas recorrentes",maintainOffsetDesc:"Manter o deslocamento entre a data de vencimento e a data agendada quando tarefas recorrentes são concluídas",resetCheckboxesName:"Redefinir caixas de seleção na recorrência",resetCheckboxesDesc:"Redefinir todas as caixas de seleção markdown no corpo da tarefa quando uma tarefa recorrente é concluída e reagendada"},timeblocking:{header:"Bloco de Tempo",description:"Configure a funcionalidade de bloco de tempo para agendamento leve em notas diárias. Arraste nas visualizações de calendário para criar eventos - selecione 'Bloco de Tempo' no menu de contexto.",enableName:"Ativar bloco de tempo",enableDesc:"Ativar recurso de bloco de tempo para agendamento leve em notas diárias. Quando ativado, a opção 'Bloco de Tempo' aparece no menu de contexto de arrastar do calendário.",showBlocksName:"Mostrar blocos de tempo",showBlocksDesc:"Exibir blocos de tempo de notas diárias por padrão",defaultColorName:"Cor padrão do bloco de tempo",defaultColorDesc:"A cor padrão usada ao criar novos blocos de tempo",usage:"Uso: Arraste no calendário para criar eventos. Selecione 'Bloco de Tempo' no menu de contexto (visível apenas quando o bloco de tempo está ativado). Arraste para mover blocos de tempo existentes. Redimensione as bordas para ajustar a duração."},performance:{header:"Desempenho e Comportamento",description:"Configure opções de desempenho e comportamento do plugin."},timeTrackingSection:{header:"Registro de Tempo",description:"Configure comportamentos automáticos de registro de tempo."},recurringSection:{header:"Tarefas Recorrentes",description:"Configure o comportamento para gerenciamento de tarefas recorrentes."},debugLogging:{header:"Registro de depuração",description:"Configurar a saída do log de depuração para solução de problemas.",enableName:"Habilitar log de depuração",enableDesc:"Registrar diagnósticos detalhados de arrastar e soltar e de visualização no console do desenvolvedor. Útil para solução de problemas."}},defaults:{header:{basicDefaults:"Padrões Básicos",dateDefaults:"Padrões de Data",defaultReminders:"Lembretes padrão",bodyTemplate:"Modelo de Corpo",instantTaskConversion:"Conversão Instantânea de Tarefa"},description:{basicDefaults:"Defina valores padrão para novas tarefas para acelerar a criação de tarefas.",dateDefaults:"Defina datas de vencimento e agendadas padrão para novas tarefas.",defaultReminders:"Configure lembretes padrão que serão adicionados a novas tarefas.",bodyTemplate:"Configure um arquivo de modelo para usar no conteúdo de novas tarefas.",instantTaskConversion:"Configure o comportamento ao converter texto para tarefas instantaneamente."},basicDefaults:{defaultStatus:{name:"Status padrão",description:"Status padrão para novas tarefas"},defaultPriority:{name:"Prioridade padrão",description:"Prioridade padrão para novas tarefas"},defaultContexts:{name:"Contextos padrão",description:"Lista de contextos padrão separados por vírgula (ex: @casa, @trabalho)",placeholder:"@casa, @trabalho"},defaultTags:{name:"Tags padrão",description:"Lista de tags padrão separadas por vírgula (sem #)",placeholder:"importante, urgente"},defaultProjects:{name:"Projetos padrão",description:"Links de projetos padrão para novas tarefas",selectButton:"Selecionar Projetos",selectTooltip:"Escolher notas de projeto para vincular por padrão",removeTooltip:"Remover {name} dos projetos padrão"},useParentNoteForTaskCreation:{name:"Usar nota ativa como projeto para novas tarefas",description:"Vincula automaticamente a nota ativa como projeto ao abrir a criação de tarefas pela paleta de comandos ou pela faixa"},useParentNoteAsProject:{name:"Usar nota pai como projeto para criação em linha e conversão instantânea",description:"Vincula automaticamente a nota de origem como projeto ao usar criação de tarefas em linha ou conversão instantânea de tarefa"},useParentHeaderAsProject:{name:"Usar cabeçalho pai como projeto durante a conversão instantânea",description:"Vincular automaticamente o cabeçalho mais próximo acima da linha convertida como projeto ao usar a conversão instantânea de tarefa"},defaultTimeEstimate:{name:"Estimativa de tempo padrão",description:"Estimativa de tempo padrão em minutos (0 = sem padrão)",placeholder:"60"},defaultRecurrence:{name:"Recorrência padrão",description:"Padrão de recorrência padrão para novas tarefas"}},dateDefaults:{defaultDueDate:{name:"Data de vencimento padrão",description:"Data de vencimento padrão para novas tarefas"},defaultScheduledDate:{name:"Data agendada padrão",description:"Data agendada padrão para novas tarefas"}},reminders:{addReminder:{name:"Adicionar lembrete padrão",description:"Criar um novo lembrete padrão que será adicionado a todas as novas tarefas",buttonText:"Adicionar lembrete"},emptyState:"Nenhum lembrete padrão configurado. Adicione um lembrete para notificá-lo automaticamente sobre novas tarefas.",emptyStateButton:"Adicionar Lembrete",reminderDescription:"Descrição do lembrete",unnamedReminder:"Lembrete Sem Nome",deleteTooltip:"Excluir lembrete",fields:{description:"Descrição:",type:"Tipo:",offset:"Deslocamento:",unit:"Unidade:",direction:"Direção:",relatedTo:"Relacionado a:",date:"Data:",time:"Hora:"},types:{relative:"Relativo (antes/depois das datas da tarefa)",absolute:"Absoluto (data/hora específica)"},units:{minutes:"minutos",hours:"horas",days:"dias"},directions:{before:"antes",after:"depois"},relatedTo:{due:"data de vencimento",scheduled:"data agendada"}},bodyTemplate:{useBodyTemplate:{name:"Usar modelo de corpo",description:"Usar um arquivo de modelo para o conteúdo do corpo da tarefa"},bodyTemplateFile:{name:"Arquivo de modelo de corpo",description:"Caminho para o arquivo de modelo para o conteúdo do corpo da tarefa. Suporta variáveis de modelo como {{title}}, {{date}}, {{time}}, {{priority}}, {{status}}, etc.",placeholder:"Modelos/Modelo de Tarefa.md",ariaLabel:"Caminho para o arquivo de modelo de corpo"},useOccurrenceBodyTemplate:{name:"Usar modelo de nota de ocorrência",description:"Usar um modelo alternativo separado para notas de ocorrência materializadas quando a tarefa recorrente não tiver occurrence_template"},occurrenceBodyTemplateFile:{name:"Arquivo de modelo de nota de ocorrência",description:"Caminho para o arquivo de modelo para notas de ocorrência materializadas. O campo occurrence_template de uma tarefa recorrente tem prioridade sobre este fallback.",placeholder:"Modelos/Modelo de Ocorrência.md",ariaLabel:"Caminho para o arquivo de modelo de nota de ocorrência"},variablesHeader:"Variáveis de modelo:",variables:{title:"{{title}} - Título da tarefa",details:"{{details}} - Detalhes fornecidos pelo usuário no modal",date:"{{date}} - Data atual (AAAA-MM-DD)",time:"{{time}} - Hora atual (HH:MM)",priority:"{{priority}} - Prioridade da tarefa",status:"{{status}} - Status da tarefa",contexts:"{{contexts}} - Contextos da tarefa",tags:"{{tags}} - Tags da tarefa",projects:"{{projects}} - Projetos da tarefa"}},instantConversion:{useDefaultsOnInstantConvert:{name:"Usar padrões de tarefa na conversão instantânea",description:"Aplicar configurações padrão de tarefa ao converter texto para tarefas instantaneamente"}},options:{noDefault:"Sem padrão",none:"Nenhum",today:"Hoje",tomorrow:"Amanhã",nextWeek:"Próxima semana",daily:"Diariamente",weekly:"Semanalmente",monthly:"Mensalmente",yearly:"Anualmente"}},general:{taskStorage:{header:"Armazenamento de Tarefas",description:"Configure onde as tarefas são armazenadas e como são identificadas.",defaultFolder:{name:"Pasta padrão de tarefas",description:"Local padrão para novas tarefas. Suporta variáveis de modelo de pasta como {{currentNotePath}}, {{currentNoteTitle}} e {{projectFilePath}}, além de tokens de data no estilo Daily Notes como YYYY/MM/DD."},moveArchived:{name:"Mover tarefas arquivadas para pasta",description:"Mover automaticamente tarefas arquivadas para uma pasta de arquivo"},archiveFolder:{name:"Pasta de arquivo",description:"Pasta para onde mover tarefas quando arquivadas. Suporta variáveis de modelo como {{year}}, {{month}}, {{priority}}, etc."}},taskIdentification:{header:"Identificação de Tarefa",description:"Escolha como o TaskNotes identifica notas como tarefas.",identifyBy:{name:"Identificar tarefas por",description:"Escolha se deseja identificar tarefas por tag ou por uma propriedade do frontmatter",options:{tag:"Tag",property:"Propriedade"}},taskTag:{name:"Tag da tarefa",description:"Tag que identifica notas como tarefas (sem #). Os filtros de visualização .base existentes mantêm a tag antiga quando isso muda; atualize os arquivos Base padrão ou edite esses filtros."},hideIdentifyingTags:{name:"Ocultar tags de identificação nos cartões de tarefa",description:"Quando ativado, tags correspondentes à tag de identificação da tarefa (incluindo correspondências hierárquicas como 'tarefa/projeto') serão ocultadas das exibições do cartão de tarefa"},hideIdentifyingTagsMode:{name:"Escopo das tags ocultas",description:"Escolha se ocultar tags de identificação também oculta tags aninhadas.",options:{all:"Tag da tarefa e tags aninhadas",exactOnly:"Somente tag exata"}},taskProperty:{name:"Nome da propriedade da tarefa",description:'O nome da propriedade do frontmatter (ex: "categoria")'},taskPropertyValue:{name:"Valor da propriedade da tarefa",description:'O valor que identifica uma nota como uma tarefa (ex: "tarefa")'}},folderManagement:{header:"Gerenciamento de Pastas",excludedFolders:{name:"Pastas excluídas",description:"Lista de pastas separadas por vírgula para excluir da indexação de tarefas e sugestões de projetos"}},frontmatter:{header:"Frontmatter",description:"Configure como os links são formatados nas propriedades do frontmatter.",useMarkdownLinks:{name:"Usar links markdown no frontmatter",description:`Gerar links markdown ([texto](caminho)) em vez de wikilinks ([[link]]) nas propriedades do frontmatter.
⚠️ Requer o plugin 'obsidian-frontmatter-markdown-links' para funcionar corretamente.`}},taskInteraction:{header:"Interação com Tarefas",description:"Configure o comportamento ao clicar em tarefas.",singleClick:{name:"Ação de clique único",description:"Ação realizada ao clicar uma vez em um cartão de tarefa"},doubleClick:{name:"Ação de clique duplo",description:"Ação realizada ao clicar duas vezes em um cartão de tarefa"},actions:{edit:"Editar tarefa",openNote:"Abrir nota",none:"Nenhuma ação"}},releaseNotes:{header:"Notas de Lançamento",description:"Versão atual: {version}",showOnUpdate:{name:"Mostrar notas de lançamento após atualização",description:"Abrir automaticamente as notas de lançamento quando o TaskNotes for atualizado para uma nova versão"},checkForUpdates:{name:"Verificar novas versões na inicialização",description:"Verifica o GitHub uma vez quando o TaskNotes inicia e mostra um aviso quando uma versão compatível mais recente está disponível"},viewButton:{name:"Ver notas de lançamento",description:"Veja o que há de novo na versão mais recente do TaskNotes",buttonText:"Ver notas de lançamento"}}},taskProperties:{sections:{coreProperties:"Propriedades Principais",corePropertiesDesc:"Status e prioridade são as propriedades principais que definem o estado e importância de uma tarefa.",dateProperties:"Propriedades de Data",datePropertiesDesc:"Configure quando as tarefas vencem e estão agendadas.",organizationProperties:"Propriedades de Organização",organizationPropertiesDesc:"Organize tarefas com contextos, projetos e tags.",taskDetails:"Detalhes da Tarefa",taskDetailsDesc:"Detalhes adicionais como estimativas de tempo, recorrência e lembretes.",metadataProperties:"Propriedades de Metadados",metadataPropertiesDesc:"Propriedades gerenciadas pelo sistema para rastrear o histórico de tarefas.",featureProperties:"Propriedades de Recursos",featurePropertiesDesc:"Propriedades usadas por recursos específicos do TaskNotes como temporizador Pomodoro e sincronização de calendário."},propertyCard:{propertyKey:"Chave da propriedade:",default:"Padrão:",nlpTrigger:"Gatilho NLP:",triggerChar:"Caractere gatilho:",triggerEmpty:"O gatilho não pode estar vazio",triggerTooLong:"O gatilho é muito longo (máx. 10 caracteres)"},properties:{status:{name:"Status",description:"Rastreia o estado atual de uma tarefa (ex.: a fazer, em progresso, concluído). O status determina se uma tarefa aparece como concluída e pode acionar o arquivamento automático."},priority:{name:"Prioridade",description:"Indica a importância da tarefa. Usado para ordenação e filtragem. Os valores são ordenados alfabeticamente nas visualizações Bases, então use prefixos como 1-, 2- para controlar a ordem."},due:{name:"Data de Vencimento",description:"O prazo até o qual uma tarefa deve ser concluída. Tarefas após a data de vencimento aparecem como atrasadas. Armazenado como data no frontmatter."},scheduled:{name:"Data Agendada",description:"Quando você planeja trabalhar em uma tarefa. Diferente da data de vencimento, isso representa seu horário de início pretendido. As tarefas aparecem no calendário na data/hora agendada."},contexts:{name:"Contextos",description:"Locais ou condições onde uma tarefa pode ser feita (ex.: @casa, @escritório, @telefone). Útil para filtrar tarefas pela sua situação atual. Armazenado como lista."},projects:{name:"Projetos",description:"Links para notas de projeto às quais esta tarefa pertence. Armazenado como wikilinks (ex.: [[Nome do Projeto]]). As tarefas podem pertencer a múltiplos projetos."},tags:{name:"Tags",description:"Tags nativas do Obsidian para categorizar tarefas. São armazenadas na propriedade tags do frontmatter e funcionam com os recursos de tags do Obsidian."},timeEstimate:{name:"Estimativa de Tempo",description:"Minutos estimados para concluir a tarefa. Usado para planejamento de tempo e carga de trabalho. Exibido em cartões de tarefas e eventos do calendário."},recurrence:{name:"Recorrência",description:"Padrão para tarefas repetitivas (diário, semanal, mensal, anual ou RRULE personalizado). Quando uma tarefa recorrente é concluída, sua data agendada é automaticamente atualizada para a próxima ocorrência."},recurrenceAnchor:{name:"Âncora de recorrência",description:"Controla como a próxima ocorrência é calculada: 'scheduled' usa a data agendada, 'completion' usa a data de conclusão real."},reminders:{name:"Lembretes",description:"Notificações acionadas antes das datas de vencimento ou agendadas. Armazenado como lista de objetos de lembrete com horário e descrição opcional."},title:{name:"Título",description:"O nome da tarefa. Pode ser armazenado no frontmatter ou no nome do arquivo (quando 'Armazenar título no nome do arquivo' está habilitado)."},dateCreated:{name:"Data de Criação",description:"Carimbo de data/hora de quando a tarefa foi criada. Definido automaticamente e usado para ordenação por ordem de criação."},dateModified:{name:"Data de Modificação",description:"Carimbo de data/hora da última alteração na tarefa. Atualizado automaticamente quando qualquer propriedade da tarefa muda."},completedDate:{name:"Data de Conclusão",description:"Carimbo de data/hora de quando a tarefa foi marcada como concluída. Definido automaticamente quando o status muda para um estado concluído."},archiveTag:{name:"Tag de Arquivo",description:"Tag adicionada às tarefas quando arquivadas. Usada para identificar tarefas arquivadas e pode acionar a movimentação de arquivos para a pasta de arquivo."},timeEntries:{name:"Entradas de Tempo",description:"Registros de sessões de rastreamento de tempo para esta tarefa. Cada entrada armazena carimbos de data/hora de início e fim. Usado para calcular o tempo total gasto."},completeInstances:{name:"Instâncias Concluídas",description:"Histórico de conclusão para tarefas recorrentes. Armazena as datas em que cada instância foi concluída para evitar conclusões duplicadas."},skippedInstances:{name:"Instâncias Puladas",description:"Ocorrências puladas para tarefas recorrentes. Armazena as datas de instâncias que foram puladas em vez de concluídas."},blockedBy:{name:"Bloqueada Por",description:"Links para tarefas que devem ser concluídas antes desta. Armazenado como wikilinks. Tarefas bloqueadas exibem um indicador visual."},sortOrder:{name:"Ordem manual",description:"Propriedade de frontmatter usada para a ordem manual com arrastar e soltar. A visualização deve estar ordenada por esta propriedade para que a reordenação por arrastar e soltar funcione."},pomodoros:{name:"Pomodoros",description:"Contagem de sessões Pomodoro concluídas. Quando o armazenamento de dados está configurado para 'Notas diárias', isso é escrito nas notas diárias em vez dos arquivos de tarefa."},icsEventId:{name:"ID do Evento ICS",description:"Identificador único vinculando uma nota a um evento de calendário ICS. Adicionado automaticamente ao criar notas a partir de eventos de calendário."},icsEventTag:{name:"Tag de Evento ICS",description:"Tag identificando notas criadas a partir de eventos de calendário ICS. Usada para distinguir notas geradas pelo calendário de tarefas regulares."}},statusCard:{valuesHeader:"Valores de Status"},priorityCard:{valuesHeader:"Valores de Prioridade"},projectsCard:{defaultProjects:"Projetos padrão:",useParentNoteForTaskCreation:"Usar nota ativa em novas tarefas:",useParentNoteForInlineTasks:"Usar nota pai em linha/conversão instantânea:",useParentHeader:"Usar cabeçalho pai como projeto:",inheritParentTaskProperties:"Herdar propriedades da tarefa pai para subtarefas:",noDefaultProjects:"Nenhum projeto padrão selecionado",autosuggestFilters:"Filtros de Autosugestão",customizeDisplay:"Personalizar Exibição",filtersOn:"Filtros Ativos"},titleCard:{storeTitleInFilename:"Armazenar título no nome do arquivo:",storedInFilename:"Armazenado no nome do arquivo",filenameUpdatesWithTitle:"O nome do arquivo será atualizado automaticamente quando o título da tarefa mudar.",filenameFormat:"Formato do nome do arquivo:",customTemplate:"Modelo personalizado:",legacySyntaxWarning:"A sintaxe de chaves simples como {title} está obsoleta. Por favor, use a sintaxe de chaves duplas {{title}} para consistência com os modelos de corpo.",occurrenceFilenameTemplate:"Modelo de nome de arquivo das ocorrências",occurrenceFilenameTemplateHelp:"Modelo do nome de arquivo das ocorrências materializadas de tarefas recorrentes. Deixe vazio para manter o nome existente (título da tarefa-mãe com sufixo numérico). Escolha explicitamente a granularidade com {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}} ou {{occurrenceMonthName}}. Todas as variáveis normais de nome de arquivo também funcionam. Uma tarefa-mãe pode sobrescrever este modelo pela propriedade de frontmatter configurada abaixo.",occurrenceFilenameProperty:"Propriedade de sobrescrita do modelo",occurrenceFilenamePropertyHelp:"Nome da propriedade de frontmatter na tarefa recorrente (mãe) que sobrescreve o modelo de nome de arquivo para as ocorrências daquela tarefa."},tagsCard:{nativeObsidianTags:"Usa tags nativas do Obsidian"},remindersCard:{defaultReminders:"Lembretes Padrão"},taskStatuses:{header:"Status da Tarefa",description:"Personalize as opções de status disponíveis para suas tarefas. Esses status controlam o ciclo de vida da tarefa e determinam quando as tarefas são consideradas concluídas.",howTheyWork:{title:"Como os status funcionam:",value:'Valor: O identificador interno armazenado em seus arquivos de tarefa (ex: "em-progresso")',label:'Rótulo: O nome de exibição mostrado na interface (ex: "Em Progresso")',color:"Cor: Cor do indicador visual para o ponto de status e emblemas",icon:'Ícone: Nome de ícone Lucide opcional para exibir em vez do ponto colorido (ex: "check", "circle", "clock"). Navegue pelos ícones em lucide.dev',completed:"Concluído: Quando marcado, tarefas com este status são consideradas finalizadas e podem ser filtradas de forma diferente",autoArchive:"Arquivar automaticamente: Quando ativado, as tarefas serão automaticamente arquivadas após o atraso especificado (1-1440 minutos)",orderNote:"A ordem abaixo determina a sequência ao alternar entre os status clicando nos emblemas de status da tarefa."},addNew:{name:"Adicionar novo status",description:"Criar uma nova opção de status para suas tarefas",buttonText:"Adicionar status"},validationNote:'Nota: Você deve ter pelo menos 2 status, e pelo menos um status deve ser marcado como "Concluído".',emptyState:"Nenhum status personalizado configurado. Adicione um status para começar.",emptyStateButton:"Adicionar Status",fields:{value:"Valor:",label:"Rótulo:",color:"Cor:",icon:"Ícone:",completed:"Concluído:",excludeFromCycle:"Ignorar no ciclo:",nextStatus:"Próximo status:",autoArchive:"Arquivar auto.:",delayMinutes:"Atraso (minutos):"},placeholders:{value:"em-progresso",label:"Em Progresso",icon:"check, circle, clock",nextStatusDefault:"Usar ordem dos status"},badges:{completed:"Concluído"},deleteConfirm:'Tem certeza de que deseja excluir o status "{label}"?'},taskPriorities:{header:"Prioridades da Tarefa",description:"Personalize os níveis de prioridade disponíveis para suas tarefas. Na v4.0+, as prioridades são ordenadas alfabeticamente pelo seu valor nas visualizações de Bases.",howTheyWork:{title:"Como as prioridades funcionam:",value:'Valor: O identificador interno armazenado em seus arquivos de tarefa. Use prefixos como "1-urgente", "2-alta" para controlar a ordem de classificação nas visualizações de Bases.',label:'Rótulo de Exibição: O nome de exibição mostrado na interface (ex: "Prioridade Alta")',color:"Cor: Cor do indicador visual para o ponto de prioridade e emblemas",icon:"Ícone: Ícone Lucide opcional para mostrar nos cartões de tarefa no lugar do ponto de prioridade",weight:"Peso: Valor numérico para classificação (pesos maiores aparecem primeiro nas listas)",weightNote:"As tarefas são automaticamente classificadas pelo peso da prioridade em ordem decrescente (maior peso primeiro). Os pesos podem ser qualquer número positivo."},addNew:{name:"Adicionar nova prioridade",description:"Criar um novo nível de prioridade para suas tarefas",buttonText:"Adicionar prioridade"},validationNote:"Nota: Você deve ter pelo menos 1 prioridade. As prioridades são ordenadas alfabeticamente por valor nas visualizações de Bases.",emptyState:"Nenhuma prioridade personalizada configurada. Adicione uma prioridade para começar.",emptyStateButton:"Adicionar Prioridade",fields:{value:"Valor:",label:"Rótulo:",color:"Cor:",icon:"Ícone:",weight:"Peso:"},placeholders:{value:"alta",label:"Prioridade Alta",icon:"alert-circle"},weightLabel:"Peso: {weight}",deleteConfirm:"Você deve ter pelo menos uma prioridade",deleteTooltip:"Excluir prioridade"},fieldMapping:{header:"Mapeamento de Campos",warning:"⚠️ Aviso: O TaskNotes lerá E escreverá usando esses nomes de propriedade. Alterá-los após criar tarefas pode causar inconsistências.",description:"Configure quais propriedades do frontmatter o TaskNotes deve usar para cada campo.",resetButton:{name:"Redefinir mapeamentos de campos",description:"Redefinir todos os mapeamentos de campos para os valores padrão",buttonText:"Redefinir para Padrões"},notices:{resetSuccess:"Mapeamentos de campos redefinidos para os padrões",resetFailure:"Falha ao redefinir mapeamentos de campos",updateFailure:"Falha ao atualizar o mapeamento de campo para {label}. Por favor, tente novamente."},table:{fieldHeader:"Campo do TaskNotes",propertyHeader:"Seu nome de propriedade"},fields:{title:"Título",status:"Status",priority:"Prioridade",due:"Data de vencimento",scheduled:"Data agendada",contexts:"Contextos",projects:"Projetos",timeEstimate:"Estimativa de tempo",recurrence:"Recorrência",dateCreated:"Data de criação",completedDate:"Data de conclusão",dateModified:"Data de modificação",archiveTag:"Tag de arquivamento",timeEntries:"Registros de tempo",completeInstances:"Instâncias concluídas",blockedBy:"Bloqueada por",sortOrder:"Ordem manual",pomodoros:"Pomodoros",icsEventId:"ID do Evento ICS",icsEventTag:"Tag do Evento ICS",reminders:"Lembretes"}},customUserFields:{header:"Campos de Usuário Personalizados",description:"Defina propriedades de frontmatter personalizadas para aparecerem como opções de filtro com reconhecimento de tipo nas visualizações. Cada linha: Nome de Exibição, Nome da Propriedade, Tipo.",addNew:{name:"Adicionar novo campo de usuário",description:"Criar um novo campo personalizado que aparecerá em filtros e visualizações",buttonText:"Adicionar campo de usuário"},emptyState:"Nenhum campo de usuário personalizado configurado. Adicione um campo para criar propriedades personalizadas para suas tarefas.",emptyStateButton:"Adicionar Campo de Usuário",fields:{displayName:"Nome de Exibição:",propertyKey:"Chave da Propriedade:",type:"Tipo:",defaultValue:"Valor Padrão:"},placeholders:{displayName:"Nome de Exibição",propertyKey:"nome-da-propriedade",defaultValue:"Valor padrão",defaultValueList:"Valores padrão (separados por vírgula)"},types:{text:"Texto",number:"Número",boolean:"Booleano",date:"Data",list:"Lista"},defaultNames:{unnamedField:"Campo Sem Nome",noKey:"sem-chave"},deleteTooltip:"Excluir campo",autosuggestFilters:{header:"Filtros de autossugestão (Avançado)",description:"Filtre quais arquivos aparecem nas sugestões de preenchimento automático para este campo"}}},appearance:{taskCards:{header:"Cartões de Tarefa",description:"Configure como os cartões de tarefa são exibidos em todas as visualizações.",defaultVisibleProperties:{name:"Propriedades visíveis padrão",description:"Escolha quais propriedades aparecem nos cartões de tarefa por padrão."},completionSubmenu:{name:"Agrupar as ações de concluir e pular em um submenu",description:"Coloque as ações de concluir e pular em um submenu do menu de contexto da tarefa. Desative esta opção para exibi-las diretamente no menu."},propertyGroups:{coreProperties:"PROPRIEDADES PRINCIPAIS",organization:"ORGANIZAÇÃO",customProperties:"PROPRIEDADES PERSONALIZADAS"},properties:{status:"Ponto de Status",priority:"Ponto de Prioridade",due:"Data de Vencimento",scheduled:"Data Agendada",timeEstimate:"Estimativa de Tempo",totalTrackedTime:"Tempo Total Registrado",checklistProgress:"Progresso da lista de verificação",recurrence:"Recorrência",completedDate:"Data de Conclusão",createdDate:"Data de Criação",modifiedDate:"Data de Modificação",projects:"Projetos",contexts:"Contextos",tags:"Tags",blocked:"Bloqueada",blocking:"Bloqueando"}},taskFilenames:{header:"Nomes de Arquivo de Tarefa",description:"Configure como os arquivos de tarefa são nomeados quando criados.",storeTitleInFilename:{name:"Armazenar título no nome do arquivo",description:"Usar o título da tarefa como nome do arquivo. O nome do arquivo será atualizado quando o título da tarefa for alterado (Recomendado)."},filenameFormat:{name:"Formato do nome do arquivo",description:"Como os nomes dos arquivos de tarefa devem ser gerados",options:{title:"Título da tarefa (Não atualiza)",zettel:"Formato Zettelkasten (AAMMDD + segundos base36 desde a meia-noite)",timestamp:"Carimbo de data/hora completo (AAAA-MM-DD-HHMMSS)",custom:"Modelo personalizado",uuid:"UUID v4"}},customTemplate:{name:"Modelo de nome de arquivo personalizado",description:"Modelo para nomes de arquivo personalizados. Variáveis disponíveis: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"Nota: {{dueDate}} e {{scheduledDate}} estão no formato AAAA-MM-DD e estarão vazios se não forem definidos."}},displayFormatting:{header:"Formatação de Exibição",description:"Configure como datas, horas e outros dados são exibidos em todo o plugin.",timeFormat:{name:"Formato da hora",description:"Exibir hora no formato de 12 horas ou 24 horas em todo o plugin",options:{twelveHour:"12 horas (AM/PM)",twentyFourHour:"24 horas"}}},calendarView:{header:"Visualização de Calendário",description:"Personalize a aparência e o comportamento da visualização de calendário.",defaultView:{name:"Visualização padrão",description:"A visualização de calendário mostrada ao abrir a aba de calendário",options:{monthGrid:"Grade Mensal",weekTimeline:"Linha do Tempo Semanal",dayTimeline:"Linha do Tempo Diária",yearView:"Visualização Anual",customMultiDay:"Vários Dias Personalizado"}},customDayCount:{name:"Contagem de dias da visualização personalizada",description:"Número de dias para mostrar na visualização personalizada de vários dias",placeholder:"3"},firstDayOfWeek:{name:"Primeiro dia da semana",description:"Qual dia deve ser a primeira coluna nas visualizações de semana"},showWeekends:{name:"Mostrar fins de semana",description:"Exibir fins de semana nas visualizações de calendário"},showWeekNumbers:{name:"Mostrar números da semana",description:"Exibir números da semana nas visualizações de calendário"},showTodayHighlight:{name:"Mostrar destaque de hoje",description:"Destacar o dia atual nas visualizações de calendário"},showCurrentTimeIndicator:{name:"Mostrar indicador de hora atual",description:"Exibir uma linha mostrando a hora atual nas visualizações de linha do tempo"},selectionMirror:{name:"Espelho de seleção",description:"Mostrar uma pré-visualização visual ao arrastar para selecionar intervalos de tempo"},calendarLocale:{name:"Localidade do calendário",description:'Localidade do calendário para formatação de data e sistema de calendário (ex: "pt-br", "en", "fa" para Farsi/Persa, "de" para Alemão). Deixe em branco para detectar automaticamente do navegador.',placeholder:"Autodetectar",invalidLocale:"Localidade inválida. Por favor, insira um código de idioma válido (ex: 'pt-BR', 'en', 'fr-FR')."}},defaultEventVisibility:{header:"Visibilidade Padrão de Eventos",description:"Configure quais tipos de eventos são visíveis por padrão ao abrir o Calendário. Os usuários ainda podem ativá-los/desativá-los na visualização de calendário.",showScheduledTasks:{name:"Mostrar tarefas agendadas",description:"Exibir tarefas com datas agendadas por padrão"},showDueDates:{name:"Mostrar datas de vencimento",description:"Exibir datas de vencimento de tarefas por padrão"},showDueWhenScheduled:{name:"Mostrar datas de vencimento quando agendadas",description:"Exibir datas de vencimento mesmo para tarefas que já têm datas agendadas"},showTimeEntries:{name:"Mostrar registros de tempo",description:"Exibir entradas de registro de tempo concluídas por padrão"},showRecurringTasks:{name:"Mostrar tarefas recorrentes",description:"Exibir instâncias de tarefas recorrentes por padrão"},showICSEvents:{name:"Mostrar eventos ICS",description:"Exibir eventos de inscrições ICS por padrão"}},timeSettings:{header:"Configurações de Hora",description:"Configure as configurações de exibição relacionadas ao tempo para visualizações de linha do tempo.",timeSlotDuration:{name:"Duração do slot de tempo",description:"Duração de cada slot de tempo nas visualizações de linha do tempo",options:{fifteenMinutes:"15 minutos",thirtyMinutes:"30 minutos",sixtyMinutes:"60 minutos"}},startTime:{name:"Hora de início",description:"Hora mais cedo mostrada nas visualizações de linha do tempo (formato HH:MM)",placeholder:"06:00"},endTime:{name:"Hora de término",description:"Hora mais tarde exibida em visualizações de linha do tempo (formato HH:MM). Use valores acima de 24:00 para mostrar horas iniciais do dia seguinte, como 26:00 para 2h.",placeholder:"26:00"},initialScrollTime:{name:"Hora inicial de rolagem",description:"Hora para rolar ao abrir visualizações de linha do tempo (formato HH:MM)",placeholder:"09:00"},eventMinHeight:{name:"Altura mínima do evento",description:"Altura mínima para eventos em visualizações de linha do tempo (pixels)",placeholder:"15"}},uiElements:{header:"Elementos da UI",description:"Configure a exibição de vários elementos da UI.",showTrackedTasksInStatusBar:{name:"Mostrar tarefas rastreadas na barra de status",description:"Exibir tarefas atualmente rastreadas na barra de status do Obsidian"},showProjectSubtasksWidget:{name:"Mostrar widget de subtarefas do projeto",description:"Exibir um widget mostrando subtarefas para a nota do projeto atual"},projectSubtasksPosition:{name:"Posição das subtarefas do projeto",description:"Onde posicionar o widget de subtarefas do projeto",options:{top:"Topo da nota",bottom:"Fundo da nota"}},showRelationshipsWidget:{name:"Mostrar widget de relacionamentos",description:"Exibir um widget mostrando todos os relacionamentos da nota atual (subtarefas, projetos, dependências)"},relationshipsPosition:{name:"Posição dos relacionamentos",description:"Onde posicionar o widget de relacionamentos",options:{top:"Topo da nota",bottom:"Final da nota"}},showTaskCardInNote:{name:"Mostrar cartão de tarefa na nota",description:"Exibir um widget de cartão de tarefa no topo das notas de tarefa mostrando os detalhes da tarefa e ações"},showCompletedTaskStrikethrough:{name:"Riscar títulos de tarefas concluídas",description:"Desenha uma linha sobre os títulos de cartões de tarefas concluídas. Desative para manter tarefas concluídas mais fáceis de ler"},showExpandableSubtasks:{name:"Mostrar subtarefas expansíveis",description:"Permitir expandir/recolher seções de subtarefas nos cartões de tarefa"},expandSubtasksByDefault:{name:"Expandir subtarefas por padrão",description:"Mostrar subtarefas de projeto expandidas quando os cartões de tarefa forem renderizados"},subtaskChevronPosition:{name:"Posição do chevron de subtarefa",description:"Posição dos chevrons de expandir/recolher nos cartões de tarefa",options:{left:"Lado esquerdo",right:"Lado direito"}},viewsButtonAlignment:{name:"Alinhamento do botão de visualizações",description:"Alinhamento do botão de visualizações/filtros na interface de tarefas",options:{left:"Lado esquerdo",right:"Lado direito"}}},projectAutosuggest:{header:"Autossugestão de Projeto",description:"Personalize como as sugestões de projeto são exibidas durante a criação da tarefa.",requiredTags:{name:"Tags obrigatórias",description:"Mostrar apenas notas com qualquer uma destas tags (separadas por vírgula). Deixe em branco para mostrar todas as notas.",placeholder:"projeto, ativo, importante"},includeFolders:{name:"Incluir pastas",description:"Mostrar apenas notas nestas pastas (caminhos separados por vírgula). Deixe em branco para mostrar todas as pastas.",placeholder:"Projetos/, Trabalho/Ativo, Pessoal"},requiredPropertyKey:{name:"Chave de propriedade obrigatória",description:"Mostrar apenas notas onde esta propriedade do frontmatter corresponde ao valor abaixo. Deixe em branco para ignorar.",placeholder:"tipo"},requiredPropertyValue:{name:"Valor da propriedade obrigatória",description:"Apenas notas onde a propriedade é igual a este valor são sugeridas. Deixe em branco para exigir que a propriedade exista.",placeholder:"projeto"},customizeDisplay:{name:"Personalizar exibição de sugestão",description:"Mostrar opções avançadas para configurar como as sugestões de projeto aparecem e quais informações elas exibem."},enableFuzzyMatching:{name:"Ativar correspondência difusa (fuzzy matching)",description:"Permitir erros de digitação e correspondências parciais na busca de projetos. Pode ser mais lento em cofres grandes."},displayRowsHelp:"Configure até 3 linhas de informação para mostrar para cada sugestão de projeto.",displayRows:{row1:{name:"Linha 1",description:"Formato: {propriedade|flags}. Propriedades: title, aliases, file.path, file.parent. Flags: n(Rótulo) mostra rótulo, s torna pesquisável. Exemplo: {title|n(Título)|s}",placeholder:"{title|n(Título)}"},row2:{name:"Linha 2 (opcional)",description:"Padrões comuns: {aliases|n(Apelidos)}, {file.parent|n(Pasta)}, literal:Texto Personalizado",placeholder:"{aliases|n(Apelidos)}"},row3:{name:"Linha 3 (opcional)",description:"Informações adicionais como {file.path|n(Caminho)} ou campos de frontmatter personalizados",placeholder:"{file.path|n(Caminho)}"}},quickReference:{header:"Referência Rápida",properties:"Propriedades disponíveis: title, aliases, file.path, file.parent, ou qualquer campo do frontmatter",labels:'Adicionar rótulos: {title|n(Título)} → "Título: Meu Projeto"',searchable:"Tornar pesquisável: {description|s} inclui descrição na busca +",staticText:"Texto estático: literal:Meu Rótulo Personalizado",alwaysSearchable:"Nome do arquivo, título e apelidos são sempre pesquisáveis por padrão."}},dataStorage:{name:"Local de Armazenamento",description:"Onde armazenar o histórico de sessões Pomodoro",pluginData:"Dados do plugin (recomendado)",dailyNotes:"Notas Diárias",notices:{locationChanged:"Local de armazenamento Pomodoro alterado para {location}"}},notifications:{description:"Configure notificações de lembrete de tarefas e alertas."},performance:{description:"Configure opções de desempenho e comportamento do plugin."},timeTrackingSection:{description:"Configure comportamentos automáticos de registro de tempo."},recurringSection:{description:"Configure o comportamento para gerenciamento de tarefas recorrentes."}},integrations:{mobileCalendar:{disable:{name:"Desativar integrações de calendário no mobile",description:"Ignora o carregamento de calendários Google, Microsoft e ICS no Obsidian Mobile. As integrações de calendário no desktop não mudam."},status:{name:"As integrações de calendário estão desativadas neste dispositivo móvel",description:"Desative esta configuração e recarregue o Obsidian Mobile para voltar a carregar calendários."}},basesIntegration:{header:"Integração com Bases",description:"Configure a integração com o plugin Obsidian Bases. Este é um recurso experimental e atualmente depende de APIs não documentadas do Obsidian. O comportamento pode mudar ou quebrar.",enable:{name:"Ativar integração com Bases",description:"Permitir que as visualizações do TaskNotes sejam usadas dentro do plugin Obsidian Bases. O plugin Bases deve estar ativado para que isso funcione."},viewCommands:{header:"Visualizações e arquivos base",description:"O TaskNotes usa arquivos do Obsidian Bases (.base) para suas visualizações. Esses arquivos são gerados automaticamente na inicialização se não existirem, configurados com suas definições atuais (identificação de tarefas, mapeamento de campos, status, etc.).",descriptionRegen:'Os arquivos Base não são atualizados automaticamente quando você altera as configurações. Para aplicar novas configurações, use "Atualizar arquivos" abaixo, exclua os arquivos .base existentes e reinicie o Obsidian, ou edite-os manualmente.',docsLink:"Ver documentação para fórmulas disponíveis e opções de personalização",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"Abrir visualização de mini calendário",kanban:"Abrir visualização kanban",tasks:"Abrir visualização de tarefas",advancedCalendar:"Abrir visualização de calendário avançado",agenda:"Abrir visualização de agenda",relationships:"Widget de relacionamentos",pomodoroStats:"Base de estatísticas Pomodoro"},fileLabel:"Arquivo: {path}",resetButton:"Redefinir",resetTooltip:"Redefinir para caminho padrão",pomodoroDailyNotesHint:"A Base de estatísticas Pomodoro gerada lê o histórico do Pomodoro nas notas diárias. Se o histórico ainda estiver nos dados do plugin, migre-o nas configurações antes de usar esse arquivo Base."},autoCreateDefaultFiles:{name:"Criar arquivos padrão automaticamente",description:"Criar automaticamente arquivos Base padrão ausentes na inicialização. Desative para evitar que arquivos de exemplo excluídos sejam recriados."},createDefaultFiles:{name:"Criar arquivos padrão",description:"Crie os arquivos .base padrão no diretório TaskNotes/Views/. Os arquivos existentes não serão sobrescritos.",buttonText:"Criar arquivos"},exportV3Views:{name:"Exportar visualizações salvas V3 para Bases",description:"Converta todas as suas visualizações salvas do TaskNotes v3 em um único arquivo .base com múltiplas visualizações. Isso ajuda a migrar suas configurações de filtro v3 para o novo sistema de Bases.",buttonText:"Exportar visualizações V3",noViews:"Nenhuma visualização salva para exportar",fileExists:"O arquivo já existe",confirmOverwrite:'Um arquivo chamado "{fileName}" já existe. Sobrescrever?',success:"Exportadas {count} visualizações salvas para {filePath}",error:"Falha ao exportar visualizações: {message}"},notices:{enabled:"Integração com Bases ativada. Por favor, reinicie o Obsidian para completar a configuração.",disabled:"Integração com Bases desativada. Por favor, reinicie o Obsidian para completar a remoção."},updateDefaultFiles:{name:"Atualizar arquivos padrão",description:"Sobrescreve os arquivos .base padrão configurados com modelos gerados a partir das configurações atuais do TaskNotes.",buttonText:"Atualizar arquivos",confirmTitle:"Atualizar arquivos Base padrão",confirmMessage:"Isso sobrescreverá os arquivos .base padrão configurados com modelos recém-gerados. Qualquer edição manual nesses arquivos será substituída.",confirmText:"Atualizar arquivos"}},calendarSubscriptions:{header:"Inscrições de calendário",description:"Inscreva-se em calendários externos via URLs ICS/iCal para ver eventos ao lado de suas tarefas.",defaultNoteTemplate:{name:"Modelo de nota padrão",description:"Caminho para o arquivo de modelo para notas criadas a partir de eventos ICS",placeholder:"Modelos/Modelo de Evento.md"},defaultNoteFolder:{name:"Pasta de notas padrão",description:"Pasta para notas criadas a partir de eventos ICS",placeholder:"Calendário/Eventos"},filenameFormat:{name:"Formato de nome de arquivo da nota ICS",description:"Como os nomes dos arquivos são gerados para notas criadas a partir de eventos ICS",options:{title:"Título do evento",zettel:"Formato Zettelkasten",timestamp:"Carimbo de data/hora",custom:"Modelo personalizado"}},customTemplate:{name:"Modelo de nome de arquivo ICS personalizado",description:"Modelo para nomes de arquivo de eventos ICS personalizados",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"Usar hora de término do evento ICS como data de vencimento",description:"Quando ativado, as tarefas criadas a partir de eventos de calendário terão sua data de vencimento definida para a hora de término do evento. Para eventos de dia inteiro, a data de vencimento será a data do evento. Para eventos com horário, a data de vencimento incluirá a hora de término."},recurringEventRelatedNotesMode:{name:"Notas relacionadas de eventos recorrentes",description:"Escolha se notas vinculadas a uma ocorrência de um evento de calendário externo aparecem em toda a série carregada ou apenas na instância selecionada.",options:{series:"Série inteira",instance:"Somente instância selecionada"}}},subscriptionsList:{header:"Lista de inscrições de calendário",addSubscription:{name:"Adicionar Inscrição de Calendário",description:"Adicionar uma nova inscrição de calendário de URL ICS/iCal ou arquivo local",buttonText:"Adicionar Inscrição"},refreshAll:{name:"Atualizar todas as inscrições",description:"Atualizar manualmente todas as inscrições de calendário ativadas",buttonText:"Atualizar Todas"},newCalendarName:"Novo Calendário",emptyState:"Nenhuma inscrição de calendário configurada. Adicione uma inscrição para sincronizar calendários externos.",notices:{addSuccess:"Nova inscrição de calendário adicionada - por favor, configure os detalhes",addFailure:"Falha ao adicionar inscrição",serviceUnavailable:"Serviço de inscrição ICS não disponível",refreshSuccess:"Todas as inscrições de calendário atualizadas com sucesso",refreshFailure:"Falha ao atualizar algumas inscrições de calendário",updateFailure:"Falha ao atualizar inscrição",deleteSuccess:'Inscrição "{name}" excluída',deleteFailure:"Falha ao excluir inscrição",enableFirst:"Ative a inscrição primeiro",refreshSubscriptionSuccess:'"{name}" atualizado',refreshSubscriptionFailure:"Falha ao atualizar inscrição"},labels:{enabled:"Ativado:",name:"Nome:",type:"Tipo:",url:"URL:",filePath:"Caminho do Arquivo:",color:"Cor:",refreshMinutes:"Atualizar (min):"},typeOptions:{remote:"URL Remota",local:"Arquivo Local"},placeholders:{calendarName:"Nome do calendário",url:"URL ICS/iCal",filePath:"Caminho do arquivo local (ex: Calendario.ics)",localFile:"Calendario.ics"},statusLabels:{enabled:"Ativado",disabled:"Desativado",remote:"Remoto",localFile:"Arquivo Local",remoteCalendar:"Calendário Remoto",localFileCalendar:"Arquivo Local",synced:"Sincronizado {timeAgo}",error:"Erro"},actions:{refreshNow:"Atualizar Agora",deleteSubscription:"Excluir inscrição"},refreshNow:"Atualizar Agora",confirmDelete:{title:"Excluir Inscrição",message:'Tem certeza de que deseja excluir a inscrição "{name}"? Esta ação não pode ser desfeita.',confirmText:"Excluir"}},autoExport:{header:"Exportação automática de ICS",description:"Exportar automaticamente todas as suas tarefas para um arquivo ICS.",enable:{name:"Ativar exportação automática",description:"Manter automaticamente um arquivo ICS atualizado com todas as suas tarefas"},filePath:{name:"Caminho do arquivo de exportação",description:"Caminho onde o arquivo ICS será salvo (relativo à raiz do cofre)",placeholder:"tasknotes-calendario.ics"},interval:{name:"Intervalo de atualização (entre 5 e 1440 minutos)",description:"Com que frequência atualizar o arquivo de exportação",placeholder:"60"},useDuration:{name:"Usar duração da tarefa para o comprimento do evento",description:"Quando ativado, usa a estimativa de tempo (duração) da tarefa em vez da data de vencimento para o horário de término do evento do calendário. Isso é útil para fluxos de trabalho GTD onde agendado + duração representa o planejamento do trabalho, enquanto a data de vencimento representa prazos."},exportNow:{name:"Exportar agora",description:"Acionar manualmente uma exportação imediata",buttonText:"Exportar Agora"},status:{title:"Status da Exportação:",lastExport:"Última exportação: {time}",nextExport:"Próxima exportação: {time}",noExports:"Nenhuma exportação ainda",notScheduled:"Não agendado",notInitialized:"Serviço de exportação automática não inicializado - por favor, reinicie o Obsidian",serviceNotInitialized:"Serviço não inicializado - por favor, reinicie o Obsidian"},notices:{reloadRequired:"Por favor, recarregue o Obsidian para que as alterações da exportação automática tenham efeito.",exportSuccess:"Tarefas exportadas com sucesso",exportFailure:"Exportação falhou - verifique o console para detalhes",serviceUnavailable:"Serviço de exportação automática não disponível"},excludeCompleted:{name:"Excluir tarefas concluídas",description:"Quando ativado, tarefas concluídas são omitidas das exportações ICS. Os status concluídos vêm das configurações de status de tarefas."},excludeArchived:{name:"Excluir tarefas arquivadas",description:"Quando ativado, tarefas arquivadas são omitidas das exportações ICS."},requireDueDate:{name:"Exigir data de vencimento",description:"Quando ativado, apenas tarefas com data de vencimento são incluídas nas exportações ICS."},requireScheduledDate:{name:"Exigir data agendada",description:"Quando ativado, apenas tarefas com data agendada são incluídas nas exportações ICS."}},googleCalendarExport:{header:"Exportar tarefas para o Google Agenda",description:"Sincronize automaticamente suas tarefas para o Google Agenda como eventos. Requer que o Google Agenda esteja conectado acima.",enable:{name:"Ativar exportação de tarefas",description:"Quando ativado, tarefas com datas serão automaticamente sincronizadas para o Google Agenda como eventos."},targetCalendar:{name:"Calendário de destino",description:"Selecione em qual calendário criar eventos de tarefas.",placeholder:"Selecionar um calendário...",connectFirst:"Conecte o Google Agenda primeiro",primarySuffix:" (Principal)"},syncTrigger:{name:"Gatilho de sincronização",description:"Qual data da tarefa deve acionar a criação do evento no calendário.",options:{scheduled:"Data agendada",due:"Data de vencimento",both:"Ambas (preferir agendada)"}},allDayEvents:{name:"Criar como eventos de dia inteiro",description:"Quando ativado, tarefas são criadas como eventos de dia inteiro. Quando desativado, usa a estimativa de tempo para a duração."},defaultDuration:{name:"Duração padrão do evento",description:"Duração em minutos para eventos com horário (usada quando a tarefa não tem estimativa de tempo)."},eventTitleTemplate:{name:"Modelo de título do evento",description:"Modelo para títulos de eventos. Variáveis disponíveis: {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"Incluir detalhes da tarefa na descrição",description:"Adicionar metadados da tarefa (prioridade, status, tags, etc.) à descrição do evento."},includeObsidianLink:{name:"Incluir link do Obsidian",description:"Adicionar um link de volta para a tarefa no Obsidian na descrição do evento."},defaultReminder:{name:"Lembrete padrão",description:"Adicione lembretes pop-up a eventos com horário do Google Calendar. Digite os minutos antes do evento, separados por vírgulas. Deixe em branco para usar os padrões do calendário. Valores comuns: 15, 30, 60, 1440."},automaticSyncBehavior:{header:"Comportamento de sincronização automática"},syncOnCreate:{name:"Sincronizar ao criar tarefa",description:"Criar automaticamente um evento no calendário quando uma nova tarefa é criada."},syncOnUpdate:{name:"Sincronizar ao atualizar tarefa",description:"Atualizar automaticamente o evento no calendário quando uma tarefa é modificada."},syncOnComplete:{name:"Sincronizar ao completar tarefa",description:"Atualizar evento no calendário quando uma tarefa é completada (adiciona marca de verificação ao título)."},syncOnDelete:{name:"Excluir evento ao excluir tarefa",description:"Remover evento do calendário quando a tarefa correspondente é excluída."},manualSyncActions:{header:"Ações de sincronização manual"},syncAllTasks:{name:"Sincronizar todas as tarefas",description:"Sincronizar todas as tarefas existentes para o Google Agenda. Isso criará eventos para tarefas que ainda não foram sincronizadas.",buttonText:"Sincronizar tudo"},unlinkAllTasks:{name:"Desvincular todas as tarefas",description:"Remover todos os vínculos tarefa-evento sem excluir eventos do calendário.",buttonText:"Desvincular tudo",confirmTitle:"Desvincular todas as tarefas",confirmMessage:"Isso removerá todos os vínculos entre tarefas e eventos do calendário. Os eventos do calendário permanecerão mas não serão mais atualizados quando as tarefas mudarem. Tem certeza?",confirmButtonText:"Desvincular tudo"},notices:{notEnabled:"Exportação para o Google Agenda não está ativada. Configure em Configurações > Integrações.",notEnabledOrConfigured:"Exportação para o Google Agenda não está ativada ou configurada",serviceNotAvailable:"Serviço de sincronização de calendário não disponível",syncResults:"Sincronizados: {synced}, Falharam: {failed}, Ignorados: {skipped}",taskSynced:"Tarefa sincronizada para o Google Agenda",noActiveFile:"Nenhum arquivo está atualmente ativo",notATask:"O arquivo atual não é uma tarefa",noDateToSync:"Tarefa não tem data agendada ou de vencimento para sincronizar",syncFailed:"Falha ao sincronizar tarefa para o Google Agenda: {message}",connectionExpired:"A conexão com o Google Agenda expirou. Reconecte em Configurações > Integrações.",syncingTasks:"Sincronizando {total} tarefas para o Google Agenda...",syncComplete:"Sincronização completa: {synced} sincronizadas, {failed} falharam, {skipped} ignoradas",eventsDeletedAndUnlinked:"Todos os eventos excluídos e desvinculados",tasksUnlinked:"Todos os vínculos de tarefas removidos"},eventDescription:{untitledTask:"Tarefa sem título",priority:"Prioridade: {value}",status:"Status: {value}",due:"Vencimento: {value}",scheduled:"Agendado: {value}",timeEstimate:"Estimativa de tempo: {value}",tags:"Tags: {value}",contexts:"Contextos: {value}",projects:"Projetos: {value}",openInObsidian:"Abrir no Obsidian"}},httpApi:{header:"API HTTP",description:"Ative a API HTTP para integrações externas e automações.",enable:{name:"Ativar API HTTP",description:"Iniciar servidor HTTP local para acesso à API"},port:{name:"Porta da API",description:"Número da porta para o servidor da API HTTP",placeholder:"3000"},authToken:{name:"Token de autenticação da API",description:"Token do TaskNotes, não a chave de API do seu provedor de IA. Para gerar um, ative a API HTTP, deixe este campo vazio e reinicie o Obsidian. Depois copie o token gerado para as configurações de autenticação Bearer do cliente. Atualize os clientes sempre que este token mudar.",placeholder:"seu-token-secreto"},mcp:{enable:{name:"Ativar servidor MCP",description:"Exponha as ferramentas do TaskNotes via Model Context Protocol no endpoint /mcp. Requer que a API HTTP esteja ativada."}},endpoints:{header:"Endpoints da API Disponíveis",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"Webhooks",description:{overview:"Webhooks enviam notificações em tempo real para serviços externos quando eventos do TaskNotes ocorrem.",usage:"Configure webhooks para integrar com ferramentas de automação, serviços de sincronização ou aplicativos personalizados."},addWebhook:{name:"Adicionar Webhook",description:"Registrar um novo endpoint de webhook",buttonText:"Adicionar Webhook"},emptyState:{message:"Nenhum webhook configurado. Adicione um webhook para receber notificações em tempo real.",buttonText:"Adicionar Webhook"},labels:{active:"Ativo:",url:"URL:",events:"Eventos:",transform:"Transformar:"},placeholders:{url:"URL do Webhook",noEventsSelected:"Nenhum evento selecionado",rawPayload:"Payload sem transformação"},statusLabels:{active:"Ativo",inactive:"Inativo",created:"Criado {timeAgo}"},actions:{editEvents:"Editar Eventos",delete:"Excluir"},editEvents:"Editar Eventos",notices:{urlUpdated:"URL do Webhook atualizada",enabled:"Webhook ativado",disabled:"Webhook desativado",created:"Webhook criado com sucesso",deleted:"Webhook excluído",updated:"Webhook atualizado"},confirmDelete:{title:"Excluir Webhook",message:`Tem certeza de que deseja excluir este webhook?
URL: {url}
Esta ação não pode ser desfeita.`,confirmText:"Excluir"},cardHeader:"Webhook",cardFields:{active:"Ativo:",url:"URL:",events:"Eventos:",transform:"Transformar:"},eventsDisplay:{noEvents:"Nenhum evento selecionado"},transformDisplay:{noTransform:"Payload sem transformação"},secretModal:{title:"Segredo do Webhook Gerado",description:"Seu segredo do webhook foi gerado. Salve este segredo, pois você não poderá visualizá-lo novamente:",usage:"Use este segredo para verificar os payloads do webhook em seu aplicativo receptor.",gotIt:"Entendi"},editModal:{title:"Editar Webhook",eventsHeader:"Eventos para se inscrever"},events:{taskCreated:{label:"Tarefa Criada",description:"Quando novas tarefas são criadas"},taskUpdated:{label:"Tarefa Atualizada",description:"Quando tarefas são modificadas"},taskCompleted:{label:"Tarefa Concluída",description:"Quando tarefas são marcadas como concluídas"},taskDeleted:{label:"Tarefa Excluída",description:"Quando tarefas são excluídas"},taskArchived:{label:"Tarefa Arquivada",description:"Quando tarefas são arquivadas"},taskUnarchived:{label:"Tarefa Desarquivada",description:"Quando tarefas são desarquivadas"},timeStarted:{label:"Tempo Iniciado",description:"Quando o registro de tempo inicia"},timeStopped:{label:"Tempo Parado",description:"Quando o registro de tempo para"},pomodoroStarted:{label:"Pomodoro Iniciado",description:"Quando sessões pomodoro começam"},pomodoroCompleted:{label:"Pomodoro Concluído",description:"Quando sessões pomodoro terminam"},pomodoroInterrupted:{label:"Pomodoro Interrompido",description:"Quando sessões pomodoro são paradas"},recurringCompleted:{label:"Instância Recorrente Concluída",description:"Quando instâncias de tarefas recorrentes são concluídas"},reminderTriggered:{label:"Lembrete Acionado",description:"Quando lembretes de tarefa são ativados"}},modals:{secretGenerated:{title:"Segredo do Webhook Gerado",description:"Seu segredo do webhook foi gerado. Salve este segredo, pois você não poderá visualizá-lo novamente:",usage:"Use este segredo para verificar os payloads do webhook em seu aplicativo receptor.",buttonText:"Entendi"},edit:{title:"Editar Webhook",eventsSection:"Eventos para se inscrever",transformSection:"Configuração de Transformação (Opcional)",headersSection:"Configuração de Cabeçalhos",transformFile:{name:"Arquivo de Transformação",description:"Caminho para um arquivo de modelo .json em seu cofre que transforma payloads de webhook",placeholder:"simple-template.json"},customHeaders:{name:"Incluir cabeçalhos personalizados",description:"Incluir cabeçalhos do TaskNotes (tipo de evento, assinatura, ID de entrega). Desative para Discord, Slack e outros serviços com políticas CORS rígidas."},buttons:{cancel:"Cancelar",save:"Salvar Alterações"},notices:{selectAtLeastOneEvent:"Por favor, selecione pelo menos um evento"}},add:{title:"Adicionar Webhook",eventsSection:"Eventos para se inscrever",transformSection:"Configuração de Transformação (Opcional)",headersSection:"Configuração de Cabeçalhos",url:{name:"URL do Webhook",description:"O endpoint para onde o payload do webhook será enviado",placeholder:"https://seu-servico.com/webhook"},transformFile:{name:"Arquivo de Transformação",description:"Caminho para um arquivo de modelo .json em seu cofre que transforma payloads de webhook",placeholder:"simple-template.json"},customHeaders:{name:"Incluir cabeçalhos personalizados",description:"Incluir cabeçalhos do TaskNotes (tipo de evento, assinatura, ID de entrega). Desative para Discord, Slack e outros serviços com políticas CORS rígidas."},transformHelp:{title:"Modelos de transformação JSON permitem personalizar payloads de webhook:",jsFiles:"",jsDescription:"",jsonFiles:"Arquivos .json:",jsonDescription:" Modelos com ",jsonVariable:"${data.task.title}",leaveEmpty:"Deixe em branco:",leaveEmptyDescription:" Enviar dados brutos",example:"Exemplo:",exampleFile:"simple-template.json"},buttons:{cancel:"Cancelar",add:"Adicionar Webhook"},notices:{urlRequired:"A URL do Webhook é obrigatória",selectAtLeastOneEvent:"Por favor, selecione pelo menos um evento"}}}},otherIntegrations:{header:"Outras integrações de plugins",description:"Configure integrações com outros plugins do Obsidian."},mdbaseSpec:{header:"Definições de tipos mdbase",learnMore:"Saiba mais sobre mdbase-spec",enable:{name:"Gerar definições de tipos mdbase",description:"Gere e mantenha arquivos de tipos mdbase (mdbase.yaml e _types/task.md) na raiz do cofre conforme suas configurações mudam."}},timeFormats:{justNow:"Agora mesmo",minutesAgo:"{minutes} minuto{plural} atrás",hoursAgo:"{hours} hora{plural} atrás",daysAgo:"{days} dia{plural} atrás"}}},notices:{languageChanged:"Idioma alterado para {language}.",releaseAvailable:{message:"TaskNotes {version} está disponível.",action:"Abrir nos plugins da comunidade"},exportTasksFailed:"Falha ao exportar tarefas como arquivo ICS",icsNoteCreatedSuccess:"Nota criada com sucesso",icsCreationModalOpenFailed:"Falha ao abrir modal de criação",icsNoteLinkSuccess:'Nota "{fileName}" vinculada ao evento ICS',icsTaskCreatedSuccess:"Tarefa criada: {title}",icsRelatedItemsRefreshed:"Notas relacionadas atualizadas",icsFileNotFound:"Arquivo não encontrado ou inválido",icsFileOpenFailed:"Falha ao abrir arquivo",timeblockAttachmentExists:'"{fileName}" já está anexado',timeblockAttachmentAdded:'"{fileName}" adicionado como anexo',timeblockAttachmentRemoved:'"{fileName}" removido dos anexos',timeblockFileTypeNotSupported:'Não é possível abrir "{fileName}" - tipo de arquivo não suportado',timeblockTitleRequired:"Por favor, insira um título para o bloco de tempo",timeblockUpdatedSuccess:'Bloco de tempo "{title}" atualizado com sucesso',timeblockUpdateFailed:"Falha ao atualizar bloco de tempo. Verifique o console para detalhes.",timeblockDeletedSuccess:'Bloco de tempo "{title}" excluído com sucesso',timeblockDeleteFailed:"Falha ao excluir bloco de tempo. Verifique o console para detalhes.",timeblockRequiredFieldsMissing:"Por favor, preencha todos os campos obrigatórios",agendaLoadingFailed:"Erro ao carregar agenda. Por favor, tente atualizar.",statsLoadingFailed:"Erro ao carregar detalhes do projeto."},commands:{openCalendarView:"Abrir visualização de mini calendário",openAdvancedCalendarView:"Abrir visualização de calendário",openTasksView:"Abrir visualização de tarefas",openNotesView:"Abrir visualização de notas",openAgendaView:"Abrir visualização de agenda",openPomodoroView:"Abrir temporizador pomodoro",openKanbanView:"Abrir quadro kanban",updateDefaultBaseFiles:"Atualizar arquivos Base padrão",openPomodoroStats:"Abrir estatísticas pomodoro",openStatisticsView:"Abrir estatísticas de tarefas e projetos",createNewTask:"Criar nova tarefa",convertCurrentNoteToTask:{name:"Converter nota atual em tarefa",noActiveFile:"Nenhum arquivo ativo para converter",alreadyTask:"Esta nota já é uma tarefa",success:"'{title}' convertido em tarefa"},convertToTaskNote:"Converter tarefa de caixa de seleção para TaskNote",convertAllTasksInNote:"Converter todas as tarefas na nota",insertTaskNoteLink:"Inserir link de tasknote",createInlineTask:"Criar nova tarefa embutida",quickActionsCurrentTask:"Ações rápidas para a tarefa atual",goToTodayNote:"Ir para a nota de hoje",startPomodoro:"Iniciar temporizador pomodoro",stopPomodoro:"Parar temporizador pomodoro",pauseResumePomodoro:"Pausar/retomar temporizador pomodoro",refreshCache:"Atualizar cache",exportAllTasksIcs:"Exportar todas as tarefas como arquivo ICS",viewReleaseNotes:"Ver notas de lançamento",startTimeTrackingCurrentTask:"Iniciar registro de tempo da tarefa atual",stopTimeTrackingCurrentTask:"Parar registro de tempo da tarefa atual",startTimeTrackingWithSelector:"Iniciar registro de tempo (selecionar tarefa)",editTimeEntries:"Editar registros de tempo (selecionar tarefa)",createOrOpenTask:"Criar ou abrir tarefa",createOrOpenTaskWithTracking:"Criar ou abrir tarefa e iniciar registro de tempo",rolloverOverdueScheduledTasks:"Adiar tarefas agendadas vencidas para hoje",syncAllTasksGoogleCalendar:"Sincronizar todas as tarefas para o Google Agenda",syncCurrentTaskGoogleCalendar:"Sincronizar tarefa atual para o Google Agenda",quickActionsTaskUnderCursor:"Ações rápidas para a tarefa sob o cursor",editCurrentTask:"Editar tarefa atual",cycleCurrentTaskStatus:"Alternar status da tarefa atual",cycleCurrentTaskPriority:"Alternar prioridade da tarefa atual",addProjectToCurrentTask:"Adicionar projeto à tarefa atual",addSubtaskToCurrentNote:"Adicionar subtarefa à nota atual"},modals:{deviceCode:{title:"Autorização do Google Agenda",instructions:{intro:"Para conectar seu Google Agenda, por favor, siga estes passos:"},steps:{open:"Abra",inBrowser:"no seu navegador",enterCode:"Insira este código quando solicitado:",signIn:"Faça login com sua conta Google e conceda acesso",returnToObsidian:"Retorne ao Obsidian (esta janela fechará automaticamente)"},codeLabel:"Seu Código:",copyCodeAriaLabel:"Copiar código",waitingForAuthorization:"Aguardando autorização...",openBrowserButton:"Abrir Navegador",cancelButton:"Cancelar",expiresMinutesSeconds:"Código expira em {minutes}m {seconds}s",expiresSeconds:"Código expira em {seconds}s"},icsEventInfo:{calendarEventHeading:"Evento de Calendário",titleLabel:"Título",calendarLabel:"Calendário",dateTimeLabel:"Data e Hora",locationLabel:"Localização",descriptionLabel:"Descrição",urlLabel:"URL",relatedNotesHeading:"Notas e Tarefas Relacionadas",noRelatedItems:"Nenhuma nota ou tarefa relacionada encontrada para este evento.",typeTask:"Tarefa",typeNote:"Nota",actionsHeading:"Ações",createFromEventLabel:"Criar a partir do Evento",createFromEventDesc:"Criar uma nova nota ou tarefa a partir deste evento de calendário",linkExistingLabel:"Vincular Existente",linkExistingDesc:"Vincular uma nota existente a este evento de calendário"},timeblockInfo:{editHeading:"Editar Bloco de Tempo",dateTimeLabel:"Data e Hora: ",titleLabel:"Título",titleDesc:"Título para seu bloco de tempo",titlePlaceholder:"ex: Sessão de foco profundo",descriptionLabel:"Descrição",descriptionDesc:"Descrição opcional para o bloco de tempo",descriptionPlaceholder:"Focar em novos recursos, sem interrupções",colorLabel:"Cor",colorDesc:"Cor opcional para o bloco de tempo",colorPlaceholder:"#3b82f6",attachmentsLabel:"Anexos",attachmentsDesc:"Arquivos ou notas vinculados a este bloco de tempo",addAttachmentButton:"Adicionar Anexo",addAttachmentTooltip:"Selecionar um arquivo ou nota usando busca difusa",deleteButton:"Excluir Bloco de Tempo",saveButton:"Salvar Alterações",deleteConfirmationTitle:"Excluir Bloco de Tempo"},timeblockCreation:{heading:"Criar bloco de tempo",dateLabel:"Data: ",titleLabel:"Título",titleDesc:"Título para seu bloco de tempo",titlePlaceholder:"ex: Sessão de foco profundo",startTimeLabel:"Hora de início",startTimeDesc:"Quando o bloco de tempo começa",startTimePlaceholder:"09:00",endTimeLabel:"Hora de término",endTimeDesc:"Quando o bloco de tempo termina",endTimePlaceholder:"11:00",descriptionLabel:"Descrição",descriptionDesc:"Descrição opcional para o bloco de tempo",descriptionPlaceholder:"Focar em novos recursos, sem interrupções",colorLabel:"Cor",colorDesc:"Cor opcional para o bloco de tempo",colorPlaceholder:"#3b82f6",attachmentsLabel:"Anexos",attachmentsDesc:"Arquivos ou notas para vincular a este bloco de tempo",addAttachmentButton:"Adicionar Anexo",addAttachmentTooltip:"Selecionar um arquivo ou nota usando busca difusa",createButton:"Criar bloco de tempo"},calendarEventCreation:{heading:"Criar evento no calendário",dateTimeLabel:"Data e hora: ",titleLabel:"Título",titleDesc:"Título do evento no calendário",titlePlaceholder:"ex., Reunião de equipe",calendarLabel:"Calendário",calendarDesc:"Em qual calendário criar o evento",descriptionLabel:"Descrição",descriptionDesc:"Descrição opcional do evento",descriptionPlaceholder:"Adicionar detalhes sobre este evento...",locationLabel:"Local",locationDesc:"Local opcional do evento",locationPlaceholder:"ex., Sala de conferência A",createButton:"Criar evento",titleRequired:"O título do evento é obrigatório",noCalendarSelected:"Nenhum calendário selecionado",success:'Evento "{title}" criado no calendário',error:"Falha ao criar evento no calendário: {message}"},icsNoteCreation:{heading:"Criar a partir de Evento ICS",titleLabel:"Título",titleDesc:"Título para o novo conteúdo",folderLabel:"Pasta",folderDesc:"Pasta de destino (deixe em branco para a raiz do cofre)",folderPlaceholder:"pasta/subpasta",createButton:"Criar",startLabel:"Início: ",endLabel:"Término: ",locationLabel:"Localização: ",calendarLabel:"Calendário: ",useTemplateLabel:"Usar Modelo",useTemplateDesc:"Aplicar um modelo ao criar o conteúdo",templatePathLabel:"Caminho do Modelo",templatePathDesc:"Caminho para o arquivo de modelo",templatePathPlaceholder:"modelos/modelo-nota-ics.md"},unscheduledTasksSelector:{title:"Tarefas Não Agendadas",placeholder:"Digite para buscar tarefas não agendadas...",instructions:{navigate:"para navegar",schedule:"para agendar",dismiss:"para dispensar"}},migration:{title:"Migrar para Novo Sistema de Recorrência",description:"O TaskNotes agora usa padrões RRULE padrão da indústria para recorrência, permitindo agendamentos mais complexos e melhor compatibilidade com outros aplicativos.",tasksFound:"{count} tarefa(s) com padrões de recorrência antigos detectada(s)",noMigrationNeeded:"Nenhuma tarefa requer migração",warnings:{title:"Antes de prosseguir:",backup:"Faça backup do seu cofre antes de migrar",conversion:"Padrões de recorrência antigos serão convertidos para o novo formato",normalUsage:"Você pode continuar usando o TaskNotes normalmente durante a migração",permanent:"Esta alteração é permanente e não pode ser desfeita automaticamente"},benefits:{title:"Benefícios do novo sistema:",powerfulPatterns:"Padrões de recorrência complexos (ex: 'toda 2ª terça-feira')",performance:"Melhor desempenho com tarefas recorrentes",compatibility:"Formato de recorrência padrão compatível com outros aplicativos",nlp:"Suporte aprimorado ao processamento de linguagem natural"},progress:{title:"Progresso da Migração",preparing:"Preparando migração...",completed:"Migração concluída com sucesso",failed:"Migração falhou"},buttons:{migrate:"Iniciar Migração",completed:"Fechar"},errors:{title:"Erros durante a migração:"},notices:{completedWithErrors:"Migração concluída com alguns erros. Verifique a lista de erros acima.",success:"Todas as tarefas migradas com sucesso!",failed:"Migração falhou. Por favor, verifique o console para detalhes."},prompt:{message:"O TaskNotes detectou tarefas usando o formato de recorrência antigo. Você gostaria de migrá-las para o novo sistema agora?",migrateNow:"Migrar Agora",remindLater:"Lembrar Mais Tarde"}},task:{titlePlaceholder:"O que precisa ser feito?",titleLabel:"Título",titleDetailedPlaceholder:"Título da tarefa...",detailsLabel:"Detalhes",detailsPlaceholder:"Adicionar mais detalhes...",projectsLabel:"Projetos",projectsAdd:"Adicionar Projeto",projectsTooltip:"Selecionar uma nota de projeto usando busca difusa",projectsRemoveTooltip:"Remover projeto",contextsLabel:"Contextos",contextsPlaceholder:"contexto1, contexto2",tagsLabel:"Tags",tagsPlaceholder:"etiqueta1, etiqueta2",timeEstimateLabel:"Estimativa de tempo (minutos)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"Alterações não salvas",message:"Você tem alterações não salvas. Deseja salvá-las?",save:"Salvar alterações",discard:"Descartar alterações",cancel:"Continuar editando"},dependencies:{blockedBy:"Bloqueada por",blocking:"Bloqueando",placeholder:"[[Nota da Tarefa]]",addTaskButton:"Adicionar tarefa",selectTaskTooltip:"Selecionar uma nota de tarefa usando busca difusa",removeTaskTooltip:"Remover tarefa"},organization:{projects:"Projetos",subtasks:"Subtarefas",addToProject:"Adicionar ao projeto",addToProjectButton:"Adicionar ao projeto",addSubtasks:"Adicionar subtarefas",addSubtasksButton:"Adicionar subtarefa",addSubtasksTooltip:"Selecionar tarefas para torná-las subtarefas desta tarefa",removeSubtaskTooltip:"Remover subtarefa",notices:{noEligibleSubtasks:"Nenhuma tarefa elegível disponível para atribuir como subtarefa",subtaskSelectFailed:"Falha ao abrir seletor de subtarefas"}},customFieldsLabel:"Campos Personalizados",actions:{due:"Definir data de vencimento",scheduled:"Definir data agendada",status:"Definir status",priority:"Definir prioridade",recurrence:"Definir recorrência",reminders:"Definir lembretes"},buttons:{openNote:"Abrir nota",save:"Salvar"},tooltips:{dueValue:"Vencimento: {value}",scheduledValue:"Agendada: {value}",statusValue:"Status: {value}",priorityValue:"Prioridade: {value}",recurrenceValue:"Recorrência: {value}",remindersSingle:"1 lembrete definido",remindersPlural:"{count} lembretes definidos"},dateMenu:{dueTitle:"Definir Data de Vencimento",scheduledTitle:"Definir Data Agendada"},userFields:{textPlaceholder:"Digite {field}...",numberPlaceholder:"0",datePlaceholder:"AAAA-MM-DD",listPlaceholder:"item 1, item 2, item 3",pickDate:"Escolher data {field}"},recurrence:{daily:"Diariamente",weekly:"Semanalmente",everyTwoWeeks:"A cada 2 semanas",weekdays:"Dias de semana",weeklyOn:"Semanalmente às {days}",monthly:"Mensalmente",everyThreeMonths:"A cada 3 meses",monthlyOnOrdinal:"Mensalmente no {ordinal}",monthlyByWeekday:"Mensalmente (por dia da semana)",yearly:"Anualmente",yearlyOn:"Anualmente em {day} de {month}",custom:"Personalizado",countSuffix:"{count} vezes",untilSuffix:"até {date}",ordinal:"{number}{suffix}"}},taskSelector:{title:"Selecionar tarefa",placeholder:"Digite para buscar tarefas...",instructions:{navigate:"para navegar",select:"para selecionar",dismiss:"para cancelar"},notices:{noteNotFound:'Não foi possível encontrar a nota "{name}"'},dueDate:{overdue:"Vencimento: {date} (atrasada)",today:"Vencimento: Hoje"}},taskSelectorWithCreate:{title:"Criar ou abrir tarefa",placeholder:"Pesquisar tarefas ou digitar para criar nova...",instructions:{create:"para criar nova tarefa"},footer:{createLabel:" para criar: "},notices:{emptyQuery:"Por favor, insira uma descrição da tarefa",invalidTitle:"Não foi possível reconhecer um título de tarefa válido"}},taskCreation:{title:"Criar tarefa",actions:{fillFromNaturalLanguage:"Preencher formulário a partir de linguagem natural",hideDetailedOptions:"Ocultar opções detalhadas",showDetailedOptions:"Mostrar opções detalhadas"},nlPlaceholder:"Comprar mantimentos amanhã às 15h @casa #tarefas",notices:{titleRequired:"Por favor, insira um título para a tarefa",success:'Tarefa "{title}" criada com sucesso',successShortened:'Tarefa "{title}" criada com sucesso (nome do arquivo encurtado devido ao comprimento)',failure:"Falha ao criar tarefa: {message}",blockingUnresolved:"Não foi possível resolver: {entries}",openCreatedTaskFailure:"Tarefa criada, mas não foi possível abrir a nota da tarefa."}},taskEdit:{title:"Editar tarefa",sections:{completions:"Conclusões",taskInfo:"Informações da Tarefa"},metadata:{totalTrackedTime:"Tempo total registrado:",due:"Vencimento:",scheduled:"Agendada:",created:"Criada:",modified:"Modificada:",file:"Arquivo:"},buttons:{archive:"Arquivar",unarchive:"Desarquivar"},notices:{titleRequired:"Por favor, insira um título para a tarefa",noChanges:"Nenhuma alteração para salvar",updateSuccess:'Tarefa "{title}" atualizada com sucesso',updateFailure:"Falha ao atualizar tarefa: {message}",dependenciesUpdateSuccess:"Dependências atualizadas",blockingUnresolved:"Não foi possível resolver: {entries}",fileMissing:"Não foi possível encontrar o arquivo da tarefa: {path}",openNoteFailure:"Falha ao abrir nota da tarefa",archiveSuccess:"Tarefa {action} com sucesso",archiveFailure:"Falha ao arquivar tarefa",deleteSuccess:'Tarefa "{title}" excluída com sucesso',deleteFailure:"Falha ao excluir tarefa: {message}"},archiveAction:{archived:"arquivada",unarchived:"desarquivada"},deleteConfirmation:{title:"Excluir tarefa",message:'Tem certeza de que deseja excluir "{title}"? Isso move a nota da tarefa para a lixeira do Obsidian.',confirm:"Excluir tarefa"}},storageLocation:{title:{migrate:"Migrar dados pomodoro?",switch:"Mudar para armazenamento em notas diárias?"},message:{migrate:"Isso migrará seus dados de sessão pomodoro existentes para o frontmatter das notas diárias. Os dados serão agrupados por data e armazenados em cada nota diária.",switch:"Os dados da sessão pomodoro serão armazenados no frontmatter das notas diárias em vez do arquivo de dados do plugin."},whatThisMeans:"O que isso significa:",bullets:{dailyNotesRequired:"As notas diárias devem estar ativadas no plugin principal de notas diárias ou no Periodic Notes",storedInNotes:"Os dados serão armazenados no frontmatter das suas notas diárias",migrateData:"Os dados existentes do plugin serão migrados e depois limpos",futureSessions:"Sessões futuras serão salvas nas notas diárias",dataLongevity:"Isso proporciona melhor longevidade dos dados com suas notas"},finalNote:{migrate:"⚠️ Certifique-se de ter backups, se necessário. Esta alteração não pode ser desfeita automaticamente.",switch:"Você pode voltar para o armazenamento do plugin a qualquer momento no futuro."},buttons:{migrate:"Migrar dados",switch:"Mudar armazenamento"}},dueDate:{title:"Definir Data de Vencimento",taskLabel:"Tarefa: {title}",sections:{dateTime:"Data e Hora de Vencimento",quickOptions:"Opções Rápidas"},descriptions:{dateTime:"Defina quando esta tarefa deve ser concluída"},inputs:{date:{ariaLabel:"Data de vencimento da tarefa",placeholder:"AAAA-MM-DD"},time:{ariaLabel:"Hora de vencimento da tarefa (opcional)",placeholder:"HH:MM"}},quickOptions:{today:"Hoje",todayAriaLabel:"Definir data de vencimento para hoje",tomorrow:"Amanhã",tomorrowAriaLabel:"Definir data de vencimento para amanhã",nextWeek:"Próxima semana",nextWeekAriaLabel:"Definir data de vencimento para próxima semana",now:"Agora",nowAriaLabel:"Definir data e hora de vencimento para agora",clear:"Limpar",clearAriaLabel:"Limpar data de vencimento"},errors:{invalidDateTime:"Por favor, insira um formato de data e hora válido",updateFailed:"Falha ao atualizar data de vencimento. Por favor, tente novamente."}},scheduledDate:{title:"Definir Data Agendada",taskLabel:"Tarefa: {title}",sections:{dateTime:"Data e Hora Agendada",quickOptions:"Opções Rápidas"},descriptions:{dateTime:"Defina quando você planeja trabalhar nesta tarefa"},inputs:{date:{ariaLabel:"Data agendada da tarefa",placeholder:"AAAA-MM-DD"},time:{ariaLabel:"Hora agendada da tarefa (opcional)",placeholder:"HH:MM"}},quickOptions:{today:"Hoje",todayAriaLabel:"Definir data agendada para hoje",tomorrow:"Amanhã",tomorrowAriaLabel:"Definir data agendada para amanhã",nextWeek:"Próxima semana",nextWeekAriaLabel:"Definir data agendada para próxima semana",now:"Agora",nowAriaLabel:"Definir data e hora agendada para agora",clear:"Limpar",clearAriaLabel:"Limpar data agendada"},errors:{invalidDateTime:"Por favor, insira um formato de data e hora válido",updateFailed:"Falha ao atualizar data agendada. Por favor, tente novamente."}},timeEntryEditor:{title:"Registros de Tempo - {taskTitle}",addEntry:"Adicionar registro de tempo",noEntries:"Nenhum registro de tempo ainda",deleteEntry:"Excluir registro",startTime:"Hora de início",endTime:"Hora de término (deixe em branco se ainda estiver em execução)",duration:"Duração (minutos)",durationDesc:"Substituir duração calculada",durationPlaceholder:"Digite a duração em minutos",description:"Descrição",descriptionPlaceholder:"No que você trabalhou?",calculatedDuration:"Calculado: {minutes} minutos",totalTime:"{hours}h {minutes}m total",totalMinutes:"{minutes}m total",saved:"Registros de tempo salvos",saveFailed:"Falha ao salvar registros de tempo",openFailed:"Falha ao abrir editor de registro de tempo",noTasksWithEntries:"Nenhuma tarefa possui registros de tempo para editar",validation:{missingStartTime:"Hora de início é obrigatória",endBeforeStart:"Hora de término deve ser após a hora de início"}},timeTracking:{noTasksAvailable:"Nenhuma tarefa disponível para registrar o tempo",started:"Iniciado registro de tempo para: {taskTitle}",startFailed:"Falha ao iniciar registro de tempo"},timeEntry:{mustHaveSpecificTime:"Registros de tempo devem ter horários específicos. Por favor, selecione um intervalo de tempo na visualização de semana ou dia.",noTasksAvailable:"Nenhuma tarefa disponível para criar registros de tempo",created:"Registro de tempo criado para {taskTitle} ({duration} minutos)",createFailed:"Falha ao criar registro de tempo"}},contextMenus:{task:{status:"Status",statusSelected:"✓ {label}",priority:"Prioridade",prioritySelected:"✓ {label}",dueDate:"Data de vencimento",scheduledDate:"Data agendada",customDates:"Datas personalizadas",reminders:"Lembretes",remindBeforeDue:"Lembrar antes do vencimento…",remindBeforeScheduled:"Lembrar antes da data agendada…",manageReminders:"Gerenciar todos os lembretes…",clearReminders:"Limpar todos os lembretes",startTimeTracking:"Iniciar registro de tempo",stopTimeTracking:"Parar registro de tempo",editTimeEntries:"Editar registros de tempo",archive:"Arquivar",unarchive:"Desarquivar",openNote:"Abrir nota",openNoteInNewTab:"Abrir nota em uma nova aba",copyTitle:"Copiar título da tarefa",quickActions:"Ações rápidas",noteActions:"Ações da nota",rename:"Renomear",renameTitle:"Renomear Arquivo",renamePlaceholder:"Digite o novo nome",delete:"Excluir",deleteTitle:"Excluir Arquivo",deleteMessage:'Tem certeza de que deseja excluir "{name}"?',deleteConfirm:"Excluir",copyPath:"Copiar caminho",copyUrl:"Copiar URL do Obsidian",showInExplorer:"Mostrar no explorador de arquivos",addToCalendar:"Adicionar ao calendário",calendar:{google:"Google Agenda",outlook:"Calendário do Outlook",yahoo:"Calendário do Yahoo",downloadIcs:"Baixar arquivo .ics",syncToGoogle:"Sincronizar com o Google Agenda",syncToGoogleNotConfigured:"Sincronização com Google Agenda não configurada",syncToGoogleSuccess:"Tarefa sincronizada com o Google Agenda",syncToGoogleFailed:"Falha ao sincronizar com o Google Agenda"},recurrence:"Recorrência",clearRecurrence:"Limpar recorrência",customRecurrence:"Recorrência personalizada...",createSubtask:"Criar subtarefa",dependencies:{title:"Dependências",addBlockedBy:'Adicionar "bloqueada por"...',addBlockedByTitle:"Adicionar tarefas das quais esta depende",addBlocking:'Adicionar "bloqueando"...',addBlockingTitle:"Adicionar tarefas que esta bloqueia",removeBlockedBy:'Remover "bloqueada por"...',removeBlocking:'Remover "bloqueando"...',unknownDependency:"Desconhecido",inputPlaceholder:"[[Nota da Tarefa]]",notices:{noEntries:"Por favor, insira pelo menos uma tarefa",blockedByAdded:"{count} dependência adicionada",blockedByRemoved:"Dependência removida",blockingAdded:"{count} tarefa dependente adicionada",blockingRemoved:"Tarefa dependente removida",unresolved:"Não foi possível resolver: {entries}",noEligibleTasks:"Nenhuma tarefa correspondente disponível",updateFailed:"Falha ao atualizar dependências"}},organization:{title:"Organização",projects:"Projetos",addToProject:"Adicionar ao projeto…",subtasks:"Subtarefas",addSubtasks:"Adicionar subtarefas…",notices:{alreadyInProject:"Tarefa já está neste projeto",alreadySubtask:"Tarefa já é uma subtarefa desta tarefa",addedToProject:"Adicionada ao projeto: {project}",addedAsSubtask:"{subtask} adicionada como subtarefa de {parent}",addToProjectFailed:"Falha ao adicionar tarefa ao projeto",addAsSubtaskFailed:"Falha ao adicionar tarefa como subtarefa",projectSelectFailed:"Falha ao abrir seletor de projeto",subtaskSelectFailed:"Falha ao abrir seletor de subtarefa",noEligibleSubtasks:"Nenhuma tarefa elegível disponível para atribuir como subtarefa",currentTaskNotFound:"Arquivo da tarefa atual não encontrado",updateContextsFailed:"Falha ao atualizar contextos"},contexts:"Contextos",addContext:"Adicionar contexto…",contextPlaceholder:"contexto",contextSelected:"✓ {context}",clearContexts:"Limpar contextos"},subtasks:{loading:"Carregando subtarefas...",noSubtasks:"Nenhuma subtarefa encontrada",loadFailed:"Falha ao carregar subtarefas"},markComplete:"Marcar como concluída para esta data",markIncomplete:"Marcar como incompleta para esta data",skipInstance:"Pular instância",unskipInstance:"Desfazer pulo de instância",completion:{submenu:"Marcar como concluída ou pular",submenuCompleteOnly:"Marcar como concluída",completeToday:"Concluída hoje",completeAsScheduled:"Concluída na data agendada",completeOnDue:"Concluída na data de vencimento",completeOnPicked:"Concluída em (escolher data)",markIncomplete:"Marcar como incompleta",noScheduledDate:"Esta tarefa não tem uma data agendada",noDueDate:"Esta tarefa não tem uma data de vencimento",noPickedDate:"Nenhuma data selecionada",noCompletedStatus:"Nenhum status de conclusão configurado",pickDateTitle:"Escolher data de conclusão",completeFailure:"Falha ao atualizar a conclusão da tarefa: {message}",clearInstancesConfirmTitle:"Limpar as instâncias registradas?",clearInstancesConfirmMessage:"O reagendamento limpará estas instâncias registradas como concluídas ou puladas na nova data ou após ela: {dates}. Elas não estarão mais marcadas como concluídas ou puladas. Continuar?",clearInstancesConfirmButton:"Reagendar e limpar"},quickReminders:{atTime:"Na hora do evento",fiveMinutes:"5 minutos antes",fifteenMinutes:"15 minutos antes",oneHour:"1 hora antes",oneDay:"1 dia antes"},notices:{toggleCompletionFailure:"Falha ao alternar conclusão de tarefa recorrente: {message}",toggleSkipFailure:"Falha ao alternar pulo de tarefa recorrente: {message}",updateDueDateFailure:"Falha ao atualizar data de vencimento da tarefa: {message}",updateScheduledFailure:"Falha ao atualizar data agendada da tarefa: {message}",updateCustomDateFailure:"Falha ao atualizar {field}: {message}",updateRemindersFailure:"Falha ao atualizar lembretes",clearRemindersFailure:"Falha ao limpar lembretes",addReminderFailure:"Falha ao adicionar lembrete",archiveFailure:"Falha ao alternar arquivamento da tarefa: {message}",copyTitleSuccess:"Título da tarefa copiado para a área de transferência",copyFailure:"Falha ao copiar para a área de transferência",renameSuccess:'Renomeado para "{name}"',renameFailure:"Falha ao renomear arquivo",copyPathSuccess:"Caminho do arquivo copiado para a área de transferência",copyUrlSuccess:"URL do Obsidian copiado para a área de transferência",updateRecurrenceFailure:"Falha ao atualizar recorrência da tarefa: {message}",updateTagsFailed:"Falha ao atualizar tags"},tags:"Tags",addTag:"Adicionar tag…",removeTag:"Remover {tag}",removeTagInput:"Remover tag…",tagPlaceholder:"Tag ou #tag",clearTags:"Limpar tags"},priority:{clearPriority:"Limpar prioridade"},ics:{showDetails:"Mostrar detalhes",createTask:"Criar tarefa a partir do evento",createNote:"Criar nota a partir do evento",linkNote:"Vincular nota existente",copyTitle:"Copiar título",copyLocation:"Copiar localização",copyUrl:"Copiar URL",copyMarkdown:"Copiar como markdown",subscriptionUnknown:"Calendário desconhecido",notices:{copyTitleSuccess:"Título do evento copiado para a área de transferência",copyLocationSuccess:"Localização copiada para a área de transferência",copyUrlSuccess:"URL do evento copiada para a área de transferência",copyMarkdownSuccess:"Detalhes do evento copiados como markdown",copyFailure:"Falha ao copiar para a área de transferência",taskCreated:"Tarefa criada: {title}",taskCreateFailure:"Falha ao criar tarefa a partir do evento",noteCreated:"Nota criada com sucesso",creationFailure:"Falha ao abrir modal de criação",linkSuccess:'Nota "{name}" vinculada ao evento',linkFailure:"Falha ao vincular nota",linkSelectionFailure:"Falha ao abrir seleção de nota"},markdown:{titleFallback:"Evento Sem Título",calendar:"**Calendário:** {value}",date:"**Data e Hora:** {value}",location:"**Localização:** {value}",descriptionHeading:"### Descrição",url:"**URL:** {value}",at:" às {time}"}},date:{increment:{plusOneDay:"+1 dia",minusOneDay:"-1 dia",plusOneWeek:"+1 semana",minusOneWeek:"-1 semana"},basic:{today:"Hoje",tomorrow:"Amanhã",thisWeekend:"Este fim de semana",nextWeek:"Próxima semana",nextMonth:"Próximo mês"},weekdaysLabel:"Dias de semana",selected:"✓ {label}",pickDateTime:"Escolher data e hora…",clearDate:"Limpar data",modal:{title:"Definir data e hora",dateLabel:"Data",timeLabel:"Hora (opcional)",select:"Selecionar"}}},services:{pomodoro:{notices:{alreadyRunning:"Um pomodoro já está em execução",resumeCurrentSession:"Retome a sessão atual em vez de iniciar uma nova",timerAlreadyRunning:"Um temporizador já está em execução",resumeSessionInstead:"Retome a sessão atual em vez de iniciar uma nova",shortBreakStarted:"Pausa curta iniciada",longBreakStarted:"Pausa longa iniciada",paused:"Pomodoro pausado",resumed:"Pomodoro retomado",stoppedAndReset:"Pomodoro parado e redefinido",migrationSuccess:"Migradas com sucesso {count} sessões pomodoro para notas diárias.",migrationFailure:"Falha ao migrar dados pomodoro. Por favor, tente novamente ou verifique o console para detalhes."}},icsSubscription:{notices:{calendarNotFound:'Calendário "{name}" não encontrado (404). Por favor, verifique se a URL ICS está correta e se o calendário é acessível publicamente.',calendarAccessDenied:'Acesso ao calendário "{name}" negado (500). Isso pode ser devido a restrições do servidor Microsoft Outlook. Tente regenerar a URL ICS das configurações do seu calendário.',fetchRemoteFailed:'Falha ao buscar calendário remoto "{name}": {error}',readLocalFailed:'Falha ao ler calendário local "{name}": {error}'}},calendarExport:{notices:{generateLinkFailed:"Falha ao gerar link do calendário",noTasksToExport:"Nenhuma tarefa encontrada para exportar",downloadSuccess:"Baixado {filename} com {count} tarefa{plural}",downloadFailed:"Falha ao baixar arquivo de calendário",singleDownloadSuccess:"Baixado {filename}"}},filter:{groupLabels:{noProject:"Sem projeto",noTags:"Sem tags",invalidDate:"Data inválida",due:{overdue:"Atrasadas",today:"Hoje",tomorrow:"Amanhã",nextSevenDays:"Próximos sete dias",later:"Mais tarde",none:"Sem data de vencimento"},scheduled:{past:"Agendadas passadas",today:"Hoje",tomorrow:"Amanhã",nextSevenDays:"Próximos sete dias",later:"Mais tarde",none:"Sem data agendada"}},errors:{noDatesProvided:"Nenhuma data fornecida"},folders:{root:"(Raiz)"}},instantTaskConvert:{notices:{noCheckboxTasks:"Nenhuma tarefa de caixa de seleção encontrada na nota atual.",convertingTasks:"Convertendo {count} tarefa{plural}...",conversionSuccess:"✅ Convertidas com sucesso {count} tarefa{plural} para TaskNotes!",partialConversion:"Convertidas {successCount} tarefa{successPlural}. {failureCount} falharam.",batchConversionFailed:"Falha ao realizar conversão em lote. Por favor, tente novamente.",invalidParameters:"Parâmetros de entrada inválidos.",emptyLine:"Linha atual está vazia ou não contém conteúdo válido.",parseError:"Erro ao analisar tarefa: {error}",invalidTaskData:"Dados da tarefa inválidos.",replaceLineFailed:"Falha ao substituir linha da tarefa.",conversionComplete:"Tarefa convertida: {title}",conversionCompleteShortened:'Tarefa convertida: "{title}" (nome do arquivo encurtado devido ao comprimento)',fileExists:"Um arquivo com este nome já existe. Por favor, tente novamente ou renomeie a tarefa.",conversionFailed:"Falha ao converter tarefa. Por favor, tente novamente."}},icsNote:{notices:{templateNotFound:"Modelo não encontrado: {path}",templateProcessError:"Erro ao processar modelo: {template}",linkedToEvent:"Nota vinculada ao evento ICS: {title}"}},task:{notices:{templateNotFound:"Modelo de corpo da tarefa não encontrado: {path}",templateReadError:"Erro ao ler modelo de corpo da tarefa: {template}",occurrenceTemplateNotFound:"Modelo de nota de ocorrência não encontrado: {path}",occurrenceTemplateReadError:"Erro ao ler modelo de nota de ocorrência: {template}",moveTaskFailed:"Falha ao mover tarefa {operation}: {error}"}},autoExport:{notices:{exportFailed:"Exportação automática do TaskNotes falhou: {error}"}},notification:{notices:{}}},ui:{icsCard:{untitledEvent:"Evento sem título",allDay:"Dia inteiro",calendarEvent:"Evento de calendário",calendarFallback:"Calendário"},noteCard:{createdLabel:"Criada:",dailyBadge:"Diária",dailyTooltip:"Nota diária"},taskCard:{labels:{due:"Vencimento",scheduled:"Programado",recurrence:"Recorrente",completed:"Concluído",created:"Criado",modified:"Modificado",blocked:"Bloqueado",blocking:"Bloqueando"},blockedBadge:"Bloqueada",blockedBadgeTooltip:"Esta tarefa está aguardando outra tarefa",blockingBadge:"Bloqueando",blockingBadgeTooltip:"Esta tarefa está bloqueando outra tarefa",blockingToggle:"Bloqueando {count} tarefas",priorityAriaLabel:"Prioridade: {label}",taskOptions:"Opções da tarefa",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"1 lembrete definido (clique para gerenciar)",reminderTooltipMany:"{count} lembretes definidos (clique para gerenciar)",projectTooltip:"Esta tarefa é usada como projeto (clique para mostrar/ocultar subtarefas)",projectIndicatorTooltip:"Esta tarefa é usada como projeto",expandSubtasks:"Expandir subtarefas",collapseSubtasks:"Recolher subtarefas",dueToday:"{label}: Hoje",dueTodayAt:"{label}: Hoje às {time}",dueOverdue:"{label}: {display} (atrasada)",dueLabel:"{label}: {display}",scheduledToday:"{label}: Hoje",scheduledTodayAt:"{label}: Hoje às {time}",scheduledPast:"{label}: {display} (passado)",scheduledLabel:"{label}: {display}",loadingDependencies:"Carregando dependências...",blockingEmpty:"Nenhuma tarefa dependente",blockingLoadError:"Falha ao carregar dependências",googleCalendarSyncTooltip:"Sincronizado com o Google Agenda",detailsTooltip:"A tarefa tem detalhes"},propertyEventCard:{unknownFile:"Arquivo desconhecido"},filterHeading:{allViewName:"Todos"},filterBar:{saveView:"Salvar visualização",saveViewNamePlaceholder:"Digite o nome da visualização...",saveButton:"Salvar",views:"Visualizações",savedFilterViews:"Visualizações de filtro salvas",filters:"Filtros",properties:"Propriedades",sort:"Ordenar",newTask:"Nova",expandAllGroups:"Expandir Todos os Grupos",collapseAllGroups:"Recolher Todos os Grupos",searchTasksPlaceholder:"Buscar tarefas...",searchTasksTooltip:"Buscar títulos de tarefas",filterUnavailable:"Barra de filtro temporariamente indisponível",toggleFilter:"Alternar filtro",activeFiltersTooltip:"Filtros ativos – Clique para modificar, clique com o botão direito para limpar",configureVisibleProperties:"Configurar propriedades visíveis",sortAndGroupOptions:"Opções de ordenação e agrupamento",sortMenuHeader:"Ordenar",orderMenuHeader:"Ordem",groupMenuHeader:"Agrupar",createNewTask:"Criar nova tarefa",filter:"Filtrar",displayOrganization:"Exibição e Organização",viewOptions:"Opções de Visualização",addFilter:"Adicionar filtro",addFilterGroup:"Adicionar grupo de filtros",addFilterTooltip:"Adicionar uma nova condição de filtro",addFilterGroupTooltip:"Adicionar um grupo de filtros aninhado",clearAllFilters:"Limpar todos os filtros e grupos",saveCurrentFilter:"Salvar filtro atual como visualização",closeFilterModal:"Fechar modal de filtro",deleteFilterGroup:"Excluir grupo de filtros",deleteCondition:"Excluir condição",all:"Todos",any:"Qualquer um",followingAreTrue:"dos seguintes são verdadeiros:",where:"onde",selectProperty:"Selecione...",chooseProperty:"Escolha qual propriedade da tarefa filtrar",chooseOperator:"Escolha como comparar o valor da propriedade",enterValue:"Digite o valor para filtrar",selectValue:"Selecione um(a) {property} para filtrar",sortBy:"Ordenar por:",toggleSortDirection:"Alternar direção da ordenação",chooseSortMethod:"Escolha como ordenar tarefas",groupBy:"Agrupar por:",chooseGroupMethod:"Agrupar tarefas por uma propriedade comum",toggleViewOption:"Alternar {option}",expandCollapseFilters:"Clique para expandir/recolher condições de filtro",expandCollapseSort:"Clique para expandir/recolher opções de ordenação e agrupamento",expandCollapseViewOptions:"Clique para expandir/recolher opções específicas da visualização",naturalLanguageDates:"Datas em Linguagem Natural",naturalLanguageExamples:"Mostrar exemplos de datas em linguagem natural",enterNumericValue:"Digite um valor numérico para filtrar",enterDateValue:"Digite uma data usando linguagem natural ou formato ISO",pickDateTime:"Escolher data e hora",noSavedViews:"Nenhuma visualização salva",savedViews:"Visualizações salvas",yourSavedFilters:"Suas configurações de filtro salvas",dragToReorder:"Arraste para reordenar visualizações",loadSavedView:"Carregar visualização salva: {name}",deleteView:"Excluir visualização",deleteViewTitle:"Excluir Visualização",deleteViewMessage:'Tem certeza de que deseja excluir a visualização "{name}"?',manageAllReminders:"Gerenciar Todos os Lembretes...",clearAllReminders:"Limpar Todos os Lembretes",customRecurrence:"Recorrência personalizada...",clearRecurrence:"Limpar recorrência",sortOptions:{dueDate:"Data de Vencimento",scheduledDate:"Data Agendada",priority:"Prioridade",status:"Status",title:"Título",createdDate:"Data de Criação",tags:"Tags",ascending:"Ascendente",descending:"Descendente"},group:{none:"Nenhum",status:"Status",priority:"Prioridade",context:"Contexto",project:"Projeto",dueDate:"Data de Vencimento",scheduledDate:"Data Agendada",tags:"Tags",completedDate:"Data de Conclusão"},subgroupLabel:"SUBGRUPO",notices:{propertiesMenuFailed:"Falha ao mostrar menu de propriedades"}}},components:{dateContextMenu:{weekdays:"Dias de semana",clearDate:"Limpar data",today:"Hoje",tomorrow:"Amanhã",thisWeekend:"Este fim de semana",nextWeek:"Próxima semana",nextMonth:"Próximo mês",setDateTime:"Definir data e hora",dateLabel:"Data",timeLabel:"Hora (opcional)"},subgroupMenuBuilder:{none:"Nenhum",status:"Status",priority:"Prioridade",context:"Contexto",project:"Projeto",dueDate:"Data de Vencimento",scheduledDate:"Data Agendada",tags:"Tags",completedDate:"Data de Conclusão",subgroup:"SUBGRUPO"},propertyVisibilityDropdown:{coreProperties:"PROPRIEDADES PRINCIPAIS",organization:"ORGANIZAÇÃO",customProperties:"PROPRIEDADES PERSONALIZADAS",failed:"Falha ao mostrar menu de propriedades",properties:{statusDot:"Ponto de Status",priorityDot:"Ponto de Prioridade",dueDate:"Data de Vencimento",scheduledDate:"Data Agendada",timeEstimate:"Estimativa de Tempo",totalTrackedTime:"Tempo Total Registrado",checklistProgress:"Progresso da lista de verificação",recurrence:"Recorrência",completedDate:"Data de Conclusão",createdDate:"Data de Criação",modifiedDate:"Data de Modificação",projects:"Projetos",contexts:"Contextos",tags:"Tags",blocked:"Bloqueada",blocking:"Bloqueando"}},reminderContextMenu:{remindBeforeDue:"Lembrar antes do vencimento...",remindBeforeScheduled:"Lembrar antes da data agendada...",manageAllReminders:"Gerenciar Todos os Lembretes...",clearAllReminders:"Limpar Todos os Lembretes",quickReminders:{atTime:"Na hora do evento",fiveMinutesBefore:"5 minutos antes",fifteenMinutesBefore:"15 minutos antes",oneHourBefore:"1 hora antes",oneDayBefore:"1 dia antes"}},recurrenceContextMenu:{daily:"Diariamente",weeklyOn:"Semanalmente na(o) {day}",everyTwoWeeksOn:"A cada 2 semanas na(o) {day}",monthlyOnThe:"Mensalmente no {ordinal}",everyThreeMonthsOnThe:"A cada 3 meses no {ordinal}",yearlyOn:"Anualmente em {ordinal} de {month}",weekdaysOnly:"Apenas dias de semana",dailyAfterCompletion:"Diariamente (após conclusão)",every3DaysAfterCompletion:"A cada 3 dias (após conclusão)",weeklyAfterCompletion:"Semanalmente (após conclusão)",monthlyAfterCompletion:"Mensalmente (após conclusão)",customRecurrence:"Recorrência personalizada...",clearRecurrence:"Limpar recorrência",customRecurrenceModal:{title:"Recorrência Personalizada",startDate:"Data de início",startDateDesc:"A data em que o padrão de recorrência começa",startTime:"Hora de início",startTimeDesc:"A hora em que as instâncias recorrentes devem aparecer (opcional)",recurFrom:"Recorrer a partir de",recurFromDesc:"Quando a próxima ocorrência deve ser calculada?",scheduledDate:"Data agendada",completionDate:"Data de conclusão",frequency:"Frequência",interval:"Intervalo",intervalDesc:"A cada X dias/semanas/meses/anos",daysOfWeek:"Dias da semana",daysOfWeekDesc:"Selecione dias específicos (para recorrência semanal)",monthlyRecurrence:"Recorrência mensal",monthlyRecurrenceDesc:"Escolha como repetir mensalmente",yearlyRecurrence:"Recorrência anual",yearlyRecurrenceDesc:"Escolha como repetir anualmente",endCondition:"Condição de término",endConditionDesc:"Escolha quando a recorrência deve terminar",neverEnds:"Nunca termina",endAfterOccurrences:"Terminar após {count} ocorrências",endOnDate:"Terminar em {date}",onDayOfMonth:"No dia {day} de cada mês",onTheWeekOfMonth:"Na {week} {day} de cada mês",onDateOfYear:"Em {day} de {month} de cada ano",onTheWeekOfYear:"Na {week} {day} de {month} de cada ano",frequencies:{daily:"Diariamente",weekly:"Semanalmente",monthly:"Mensalmente",yearly:"Anualmente"},weekPositions:{first:"primeira",second:"segunda",third:"terceira",fourth:"quarta",last:"última"},weekdays:{monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado",sunday:"Domingo"},weekdaysShort:{mon:"Seg",tue:"Ter",wed:"Qua",thu:"Qui",fri:"Sex",sat:"Sáb",sun:"Dom"},cancel:"Cancelar",save:"Salvar"}}}};var Vue={common:{appName:"TaskNotes",new:"새로 만들기",cancel:"취소",confirm:"확인",close:"닫기",save:"저장",reorder:{confirmLargeTitle:"대규모 재정렬 확인",confirmButton:"노트 재정렬",confirmLargeMessage:'여기서 재정렬하면 {scope}에 대한 지속적인 수동 순서를 만들기 위해 {count}개 노트의 "{field}" 값이 업데이트됩니다. 같은 범위의 숨겨진 노트나 필터링된 노트도 함께 업데이트될 수 있습니다. 계속하시겠습니까?'},language:"언어",systemDefault:"시스템 기본값",loading:"로딩 중...",languages:{en:"영어",fr:"프랑스어",ru:"러시아어",zh:"중국어",de:"독일어",es:"스페인어",ja:"일본어",pt:"포르투갈어 (브라질)",ko:"한국어"},weekdays:{sunday:"일요일",monday:"월요일",tuesday:"화요일",wednesday:"수요일",thursday:"목요일",friday:"금요일",saturday:"토요일"},months:{january:"1월",february:"2월",march:"3월",april:"4월",may:"5월",june:"6월",july:"7월",august:"8월",september:"9월",october:"10월",november:"11월",december:"12월"}},views:{agenda:{title:"일정",today:"오늘",overdue:"지연됨",refreshCalendars:"캘린더 새로고침",actions:{previousPeriod:"이전 기간",nextPeriod:"다음 기간",goToToday:"오늘로 이동",refreshCalendars:"캘린더 구독 새로고침"},loading:"일정 로딩 중...",dayToggle:"날짜 토글",overdueToggle:"지연 항목 토글",expandAllDays:"모든 날짜 펼치기",collapseAllDays:"모든 날짜 접기",notices:{calendarNotReady:"캘린더 서비스가 아직 준비되지 않았습니다",calendarRefreshed:"캘린더 구독이 새로고침되었습니다",refreshFailed:"새로고침 실패"},empty:{noItemsScheduled:"예정된 항목이 없습니다",noItemsFound:"항목을 찾을 수 없습니다",helpText:"마감일이나 예정일이 있는 작업을 만들거나, 노트를 추가하여 여기에 표시하세요."},contextMenu:{showOverdueSection:"지연 항목 표시",showNotes:"노트 표시",calendarSubscriptions:"캘린더 구독"},periods:{thisWeek:"이번 주"},tipPrefix:"팁: "},taskList:{title:"작업",expandAllGroups:"모든 그룹 펼치기",collapseAllGroups:"모든 그룹 접기",noTasksFound:"선택한 필터에 해당하는 작업이 없습니다.",reorder:{scope:{ungrouped:"이 그룹 없는 목록",group:'"{group}" 그룹'}},errors:{formulaGroupingReadOnly:"수식 기반 그룹에서는 작업을 재정렬할 수 없습니다. 수식 값은 계산된 값이므로 직접 수정할 수 없습니다."}},notes:{title:"노트",refreshButton:"새로고침",refreshingButton:"새로고침 중...",notices:{indexingDisabled:"노트 인덱싱이 비활성화됨"},empty:{noNotesFound:"노트를 찾을 수 없습니다",helpText:"선택한 날짜에 해당하는 노트가 없습니다. 미니 캘린더 뷰에서 다른 날짜를 선택하거나 노트를 만들어 보세요."},loading:"노트 로딩 중...",refreshButtonAriaLabel:"노트 목록 새로고침"},miniCalendar:{title:"미니 캘린더",contextMenu:{openDailyNote:"데일리 노트 열기",openWeeklyNote:"주간 노트 열기"}},advancedCalendar:{title:"캘린더",filters:{showFilters:"필터 표시",hideFilters:"필터 숨기기"},viewOptions:{calendarSubscriptions:"캘린더 구독",timeEntries:"시간 기록",timeblocks:"타임블록",scheduledDates:"예정일",dueDates:"마감일",allDaySlot:"종일 슬롯",scheduledTasks:"예정된 작업",recurringTasks:"반복 작업"},buttons:{refresh:"새로고침",refreshHint:"캘린더 구독 새로고침"},notices:{icsServiceNotAvailable:"ICS 구독 서비스를 사용할 수 없습니다",calendarRefreshedAll:"모든 캘린더 구독이 새로고침되었습니다",refreshFailed:"일부 캘린더 구독 새로고침에 실패했습니다",timeblockSpecificTime:"타임블록에는 특정 시간이 필요합니다. 주간 또는 일간 뷰에서 시간 범위를 선택하세요.",timeblockMoved:'타임블록 "{title}"을(를) {date}(으)로 이동했습니다',timeblockUpdated:'타임블록 "{title}" 시간이 업데이트되었습니다',timeblockMoveFailed:"타임블록 이동 실패: {message}",timeblockResized:'타임블록 "{title}" 기간이 업데이트되었습니다',timeblockResizeFailed:"타임블록 크기 조정 실패: {message}",taskScheduled:'작업 "{title}"이(가) {date}에 예정되었습니다',scheduleTaskFailed:"작업 예정 실패",endTimeAfterStart:"종료 시간은 시작 시간 이후여야 합니다",timeEntryNotFound:"시간 기록을 찾을 수 없습니다",timeEntryDeleted:"시간 기록이 삭제되었습니다",deleteTimeEntryFailed:"시간 기록 삭제 실패"},timeEntry:{estimatedSuffix:"예상",trackedSuffix:"기록됨",recurringPrefix:"반복: ",completedPrefix:"완료: ",createdPrefix:"생성: ",modifiedPrefix:"수정: ",duePrefix:"마감: ",scheduledPrefix:"예정: "},contextMenus:{openTask:"작업 열기",deleteTimeEntry:"시간 기록 삭제",deleteTimeEntryTitle:"시간 기록 삭제",deleteTimeEntryConfirm:"이 시간 기록{duration}을(를) 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",deleteButton:"삭제",cancelButton:"취소"}},basesCalendar:{title:"베이스 캘린더",today:"오늘",buttonText:{month:"월",week:"주",day:"일",year:"년",list:"목록",customDays:"{count}일",listDays:"{count}일 목록",refresh:"새로고침"},hints:{refresh:"캘린더 구독 새로고침",today:"오늘로 이동",prev:"이전",next:"다음",month:"월간 보기",week:"주간 보기",day:"일간 보기",year:"연간 보기",list:"목록 보기",customDays:"{count}일 보기"},settings:{groups:{dateNavigation:"날짜 탐색",events:"이벤트",layout:"레이아웃",view:"보기",display:"표시",timeGrid:"시간 그리드",eventLayout:"이벤트 레이아웃",propertyBasedEvents:"속성 기반 이벤트",calendarSubscriptions:"캘린더 구독",googleCalendars:"Google 캘린더",microsoftCalendars:"Microsoft 캘린더"},dateNavigation:{navigateToDate:"날짜로 이동",navigateToDatePlaceholder:"YYYY-MM-DD (예: 2025-01-15) - 속성을 사용하려면 비워두세요",navigateToDateFromProperty:"속성에서 날짜로 이동",navigateToDateFromPropertyPlaceholder:"날짜 속성 선택 (선택사항)",propertyNavigationStrategy:"속성 탐색 전략",createDailyNotesFromDateLinks:"날짜 링크에서 데일리 노트 만들기",strategies:{first:"첫 번째 결과",earliest:"가장 이른 날짜",latest:"가장 늦은 날짜"}},events:{showScheduledTasks:"예정된 작업 표시",showDueTasks:"마감 작업 표시",showOverdueOnToday:"기한이 지난 작업을 오늘에 표시",showRecurringTasks:"반복 작업 표시",showTimeEntries:"시간 기록 표시",showTimeblocks:"타임블록 표시",showPropertyBasedEvents:"속성 기반 이벤트 표시",showCompletedRecurringInstances:"완료된 반복 인스턴스 표시",showSkippedRecurringInstances:"건너뛴 반복 인스턴스 표시"},layout:{calendarView:"캘린더 뷰",customDayCount:"사용자 지정 일수",listDayCount:"목록 일수",dayStartTime:"하루 시작 시간",dayStartTimePlaceholder:"HH:mm:ss (예: 08:00:00)",dayEndTime:"하루 종료 시간",dayEndTimePlaceholder:"HH:mm:ss (예: 20:00:00)",timeSlotDuration:"시간 슬롯 간격",timeSlotDurationPlaceholder:"HH:mm:ss (예: 00:30:00)",dragDropResolution:"드래그/드롭 간격",dragDropResolutionPlaceholder:"HH:mm:ss (예: 00:05:00)",weekStartsOn:"주 시작 요일",showWeekNumbers:"주 번호 표시",showNowIndicator:"현재 시간 표시",showWeekends:"주말 표시",showAllDaySlot:"종일 슬롯 표시",showTimeGrid:"시간대 그리드 표시",showTodayHighlight:"오늘 강조 표시",todayColumnWidthMultiplier:"오늘 열 너비 배수",showSelectionPreview:"선택 미리보기 표시",timeFormat:"시간 형식",timeFormat12:"12시간 (오전/오후)",timeFormat24:"24시간",initialScrollTime:"초기 스크롤 시간",initialScrollTimePlaceholder:"HH:mm:ss (예: 08:00:00)",minimumEventHeight:"최소 이벤트 높이 (px)",slotEventOverlap:"이벤트 겹침 허용",enableSearch:"검색 상자 활성화",eventMaxStack:"최대 이벤트 스택 (주/일 보기, 0 = 무제한)",dayMaxEvents:"일당 최대 이벤트 (월간 보기, 0 = 자동)",dayMaxEventRows:"일당 최대 이벤트 행 (월간 보기, 0 = 무제한)",spanScheduledToDue:"예정일과 마감일 사이 작업 표시",heightMode:"높이 모드",heightModeFill:"컨테이너 채우기",heightModeAuto:"자동 높이"},propertyBasedEvents:{startDateProperty:"시작일 속성",startDatePropertyPlaceholder:"시작 날짜/시간 속성 선택",endDateProperty:"종료일 속성 (선택사항)",endDatePropertyPlaceholder:"종료 날짜/시간 속성 선택",titleProperty:"제목 속성 (선택사항)",titlePropertyPlaceholder:"이벤트 제목 속성 선택"}},notices:{noDailyNoteForDate:"이 날짜의 데일리 노트가 없습니다."},errors:{failedToInitialize:"캘린더 초기화 실패"}},kanban:{title:"칸반",newTask:"새 작업",addCard:"+ 카드 추가",noTasks:"작업 없음",uncategorized:"미분류",noProject:"프로젝트 없음",reorder:{scope:{column:'"{group}" 열',columnInSwimlane:'"{swimlane}" 스윔레인의 "{group}" 열'}},notices:{loadFailed:"칸반 보드 로드 실패",movedTask:'작업이 "{0}"(으)로 이동되었습니다'},errors:{loadingBoard:"보드 로딩 중 오류가 발생했습니다.",noGroupBy:"칸반 뷰는 '그룹화 기준' 속성을 설정해야 합니다. '정렬' 버튼을 클릭하고 '그룹화 기준'에서 속성을 선택하세요.",formulaGroupingReadOnly:"수식 기반 열 간에는 작업을 이동할 수 없습니다. 수식 값은 계산되며 직접 수정할 수 없습니다.",formulaSwimlaneReadOnly:"수식 기반 스윔레인 간에는 작업을 이동할 수 없습니다. 수식 값은 계산되며 직접 수정할 수 없습니다."},columnTitle:"제목 없음"},pomodoro:{title:"뽀모도로",status:{focus:"집중",ready:"시작 준비 완료",paused:"일시 정지됨",working:"작업 중",shortBreak:"짧은 휴식",longBreak:"긴 휴식",breakPrompt:"잘하셨습니다! {length} 휴식 시간입니다",breakLength:{short:"짧은",long:"긴"},breakComplete:"휴식 완료! 다음 뽀모도로를 시작할 준비가 되셨나요?"},buttons:{start:"시작",pause:"일시 정지",stop:"중지",resume:"재개",startShortBreak:"짧은 휴식 시작",startLongBreak:"긴 휴식 시작",skipBreak:"휴식 건너뛰기",chooseTask:"작업 선택...",changeTask:"작업 변경...",clearTask:"작업 지우기",selectDifferentTask:"다른 작업 선택",startFocus:"집중 시작",addMinute:"1분 추가",subtractMinute:"1분 빼기"},notices:{noTasks:"보관되지 않은 작업을 찾을 수 없습니다. 먼저 작업을 만드세요.",loadFailed:"작업 로드 실패",invalidDuration:"10, 10:30 또는 1:30:00 같은 시간을 입력하세요."},statsLabel:"오늘 완료",meta:{ready:"{time} 예정 · 오늘 {count}개 완료",running:"{time} 남음 · {endTime}에 종료",paused:"{type} 일시 중지 · {time} 남음",breakReady:"{type} 준비됨 · {time} 예정"},timer:{editLabel:"타이머 시간 편집",inputLabel:"타이머 시간"}},pomodoroStats:{title:"뽀모도로 통계",heading:"뽀모도로 통계",refresh:"새로고침",sections:{overview:"개요",today:"오늘",week:"이번 주",allTime:"전체 기간",recent:"최근 세션"},overviewCards:{todayPomos:{label:"오늘의 뽀모도로",change:{more:"어제보다 {count}개 더 많음",less:"어제보다 {count}개 더 적음"}},totalPomos:{label:"총 뽀모도로"},todayFocus:{label:"오늘의 집중 시간",change:{more:"어제보다 {duration} 더 많음",less:"어제보다 {duration} 더 적음"}},totalFocus:{label:"총 집중 시간"}},stats:{pomodoros:"뽀모도로",streak:"연속",minutes:"분",average:"평균 길이",completion:"완료율"},recents:{empty:"아직 기록된 세션이 없습니다",duration:"{minutes}분",status:{completed:"완료됨",interrupted:"중단됨"},delete:"세션 삭제",deleteAria:"Pomodoro 세션 삭제",deleteConfirmTitle:"Pomodoro 세션을 삭제할까요?",deleteConfirmMessage:"Pomodoro 기록에서 이 세션을 제거합니다. 기존 작업 시간 항목은 변경되지 않습니다.",deleteConfirmButton:"삭제",deleteSuccess:"Pomodoro 세션이 삭제되었습니다",deleteNotFound:"Pomodoro 세션을 찾을 수 없습니다"},basesMigration:{title:"Base 보기 원하시나요?",description:"Pomodoro Base 보기는 데일리 노트 frontmatter를 사용합니다. 생성된 Pomodoro 통계 Base에서 이 기록을 보려면 설정에서 Pomodoro 데이터를 마이그레이션한 다음 저장 위치를 데일리 노트로 설정하세요."}},stats:{title:"통계",taskProjectStats:"작업 및 프로젝트 통계",sections:{filters:"필터",overview:"개요",today:"오늘",thisWeek:"이번 주",thisMonth:"이번 달",projectBreakdown:"프로젝트별 분석",dateRange:"날짜 범위"},filters:{minTime:"최소 시간 (분)",allTasks:"모든 작업",activeOnly:"활성 작업만",completedOnly:"완료된 작업만"},refreshButton:"새로고침",timeRanges:{allTime:"전체 기간",last7Days:"최근 7일",last30Days:"최근 30일",last90Days:"최근 90일",customRange:"사용자 지정 범위"},resetFiltersButton:"필터 초기화",dateRangeFrom:"시작",dateRangeTo:"종료",noProject:"프로젝트 없음",cards:{timeTrackedEstimated:"기록 시간 / 예상 시간",totalTasks:"총 작업",completionRate:"완료율",activeProjects:"활성 프로젝트",avgTimePerTask:"작업당 평균 시간"},labels:{tasks:"작업",completed:"완료됨",projects:"프로젝트"},noProjectData:"프로젝트 데이터가 없습니다",notAvailable:"N/A",noTasks:"작업을 찾을 수 없습니다",loading:"로딩 중..."},releaseNotes:{title:"TaskNotes {version}의 새로운 기능",header:"TaskNotes {version}의 새로운 기능",viewAllLink:"GitHub에서 모든 릴리스 노트 보기 →",starMessage:"모든 피드백을 정말 감사하게 생각합니다. 뭔가 맞지 않는 느낌이 들면 GitHub에서 알려 주세요. TaskNotes가 유용하다면 별표도 고려해 주세요.",baseFilesNotice:"> [!info] 기본 `.base` 파일 안내\n> 기본으로 생성되는 `.base` 템플릿이 변경되어도 기존 `.base` 파일은 덮어쓰지 않으므로 사용자 설정이 유지됩니다.\n> 최신 템플릿 개선 사항을 적용하려면 **설정 → TaskNotes → 일반 → 보기 및 base 파일 → 파일 업데이트**에서 베이스 파일을 다시 생성하세요."}},settings:{header:{documentation:"문서",documentationUrl:"https://tasknotes.dev"},tabs:{general:"일반",taskProperties:"작업 속성",modalFields:"모달 필드",defaults:"기본값 및 템플릿",appearance:"외관 및 UI",features:"기능",integrations:"통합"},features:{inlineTasks:{header:"인라인 작업",description:"노트 내 작업 링크 및 체크박스-작업 변환 설정."},taskCreation:{header:"작업 생성",description:"작업 생성 후 수행할 동작을 설정합니다.",openAfterCreate:{name:"생성 후 작업 열기",description:"일반 새 작업 만들기 모달에서 저장 후 새 작업 노트를 열지 선택합니다.",options:{none:"열지 않음",sameTab:"같은 탭에서 열기",newTab:"새 탭에서 열기"}}},overlays:{taskLinkToggle:{name:"작업 링크 오버레이",description:"작업 링크에 마우스를 올리면 인터랙티브 오버레이 표시"},aliasExclusion:{name:"별칭 링크에서 오버레이 비활성화",description:"링크에 별칭이 포함된 경우 작업 위젯을 표시하지 않음 (예: [[작업|별칭]])."}},instantConvert:{toggle:{name:"체크박스 옆에 변환 버튼 표시",description:"마크다운 체크박스 옆에 TaskNotes로 변환하는 인라인 버튼 표시"},preserveCheckbox:{name:"변환 시 체크박스 유지",description:"체크박스를 TaskNote 링크로 변환할 때 원래 마크다운 체크박스 표시를 남깁니다"},folder:{name:"인라인 생성 작업 폴더",description:"인라인 명령 또는 체크박스 변환으로 생성된 작업이 만들어질 폴더입니다. 비워 두면 기본 작업 폴더를 사용합니다. 현재 노트의 폴더에는 {{currentNotePath}}를, 현재 노트 이름의 하위 폴더에는 {{currentNoteTitle}}을 사용하세요."}},nlp:{header:"자연어 처리",description:"텍스트 입력에서 날짜, 우선순위 및 기타 속성을 파싱합니다.",enable:{name:"자연어 작업 입력 활성화",description:"작업 생성 시 자연어에서 마감일, 우선순위, 컨텍스트 파싱"},defaultToScheduled:{name:"예정일로 기본 설정",description:"NLP가 컨텍스트 없이 날짜를 감지하면 마감일 대신 예정일로 처리"},language:{name:"NLP 언어",description:"자연어 처리 패턴 및 날짜 파싱을 위한 언어"},statusTrigger:{name:"상태 제안 트리거",description:"상태 제안을 트리거하는 텍스트 (비활성화하려면 비워두세요)"}},pomodoro:{header:"뽀모도로 타이머",description:"뽀모도로 타이머의 작업/휴식 간격을 설정합니다.",workDuration:{name:"작업 시간",description:"작업 간격 시간 (분)"},shortBreak:{name:"짧은 휴식 시간",description:"짧은 휴식 시간 (분)"},longBreak:{name:"긴 휴식 시간",description:"긴 휴식 시간 (분)"},longBreakInterval:{name:"긴 휴식 간격",description:"긴 휴식 전 작업 세션 수"},autoStartBreaks:{name:"자동 휴식 시작",description:"작업 세션 후 자동으로 휴식 타이머 시작"},autoStartWork:{name:"자동 작업 시작",description:"휴식 후 자동으로 작업 세션 시작"},notifications:{name:"뽀모도로 알림",description:"뽀모도로 세션 종료 시 알림 표시"},mobileSidebar:{name:"모바일 사이드바",description:"모바일 기기에서 뽀모도로 타이머를 열 위치",tab:"노트 패널",left:"왼쪽 사이드바",right:"오른쪽 사이드바"},statusBar:{name:"상태 표시줄에 Pomodoro 표시",description:"Obsidian 상태 표시줄에 활성 Pomodoro 카운트다운 표시"}},uiLanguage:{header:"인터페이스 언어",description:"TaskNotes 메뉴, 알림 및 뷰의 언어를 변경합니다.",dropdown:{name:"UI 언어",description:"TaskNotes 인터페이스 텍스트에 사용할 언어 선택"}},pomodoroSound:{enabledName:"사운드 활성화",enabledDesc:"뽀모도로 세션 종료 시 소리 재생",volumeName:"사운드 볼륨",volumeDesc:"뽀모도로 사운드 볼륨 (0-100)"},dataStorage:{name:"뽀모도로 데이터 저장",description:"뽀모도로 세션 데이터가 저장되고 관리되는 방법을 설정합니다.",dailyNotes:"데일리 노트",pluginData:"플러그인 데이터",notices:{locationChanged:"뽀모도로 저장 위치가 {location}(으)로 변경되었습니다"}},notifications:{header:"알림",description:"작업 리마인더 알림 및 경고를 설정합니다.",enableName:"알림 활성화",enableDesc:"작업 리마인더 알림 활성화",typeName:"알림 유형",typeDesc:"표시할 알림 유형",systemLabel:"시스템 알림",inAppLabel:"앱 내 알림",soundEnabledName:"알림 소리",soundEnabledDesc:"작업 리마인더가 실행될 때 소리 재생",soundVolumeName:"소리 볼륨",soundVolumeDesc:"작업 리마인더 소리 볼륨 (0-100)",soundPreviewName:"알림 소리 미리 듣기",soundPreviewDesc:"설정된 작업 리마인더 소리 재생",soundPreviewButton:"미리 듣기",testReminderName:"테스트 리마인더 보내기",testReminderDesc:"현재 알림 유형과 소리 설정으로 테스트 리마인더를 보냅니다.",testReminderButton:"테스트 보내기"},overdue:{hideCompletedName:"완료된 작업을 지연 목록에서 숨기기",hideCompletedDesc:"완료된 작업을 지연 작업 계산에서 제외"},indexing:{disableName:"노트 인덱싱 비활성화",disableDesc:"더 나은 성능을 위해 노트 콘텐츠 자동 인덱싱 비활성화"},suggestions:{debounceName:"제안 디바운스",debounceDesc:"제안 표시 전 지연 시간 (밀리초)"},timeTracking:{autoStopName:"시간 추적 자동 중지",autoStopDesc:"작업 완료 시 시간 추적 자동 중지",stopNotificationName:"시간 추적 중지 알림",stopNotificationDesc:"시간 추적이 자동 중지되면 알림 표시"},recurring:{maintainOffsetName:"반복 작업에서 마감일 오프셋 유지",maintainOffsetDesc:"반복 작업 완료 시 마감일과 예정일 간의 오프셋 유지",resetCheckboxesName:"반복 시 체크박스 초기화",resetCheckboxesDesc:"반복 작업이 완료되고 다시 예약될 때 작업 본문의 모든 마크다운 체크박스를 초기화"},timeblocking:{header:"타임블로킹",description:"데일리 노트에서 가벼운 일정 관리를 위한 타임블록 기능을 설정합니다. 캘린더 뷰에서 드래그하여 이벤트를 만들고 컨텍스트 메뉴에서 '타임블록'을 선택하세요.",enableName:"타임블로킹 활성화",enableDesc:"데일리 노트에서 가벼운 일정 관리를 위한 타임블로킹 기능 활성화. 활성화하면 캘린더 드래그 컨텍스트 메뉴에 '타임블록' 옵션이 나타납니다.",showBlocksName:"타임블록 표시",showBlocksDesc:"기본적으로 데일리 노트의 타임블록 표시",defaultColorName:"기본 타임블록 색상",defaultColorDesc:"새 타임블록 생성 시 사용되는 기본 색상",usage:"사용법: 캘린더에서 드래그하여 이벤트를 만듭니다. 컨텍스트 메뉴에서 '타임블록'을 선택하세요 (타임블로킹이 활성화된 경우에만 표시됨). 드래그하여 기존 타임블록을 이동합니다. 가장자리를 드래그하여 기간을 조정합니다."},performance:{header:"성능 및 동작",description:"플러그인 성능 및 동작 옵션을 설정합니다."},timeTrackingSection:{header:"시간 추적",description:"자동 시간 추적 동작을 설정합니다."},recurringSection:{header:"반복 작업",description:"반복 작업 관리 동작을 설정합니다."},debugLogging:{header:"디버그 로깅",description:"문제 해결을 위해 디버그 로그 출력을 구성합니다.",enableName:"디버그 로그 사용",enableDesc:"드래그 앤 드롭 및 보기 진단의 자세한 내용을 개발자 콘솔에 기록합니다. 문제 해결에 유용합니다."}},defaults:{header:{basicDefaults:"기본 기본값",dateDefaults:"날짜 기본값",defaultReminders:"기본 리마인더",bodyTemplate:"본문 템플릿",instantTaskConversion:"즉시 작업 변환"},description:{basicDefaults:"새 작업의 기본값을 설정하여 작업 생성 속도를 높입니다.",dateDefaults:"새 작업의 기본 마감일 및 예정일을 설정합니다.",defaultReminders:"새 작업에 추가될 기본 리마인더를 설정합니다.",bodyTemplate:"새 작업 콘텐츠에 사용할 템플릿 파일을 설정합니다.",instantTaskConversion:"텍스트를 작업으로 즉시 변환할 때의 동작을 설정합니다."},basicDefaults:{defaultStatus:{name:"기본 상태",description:"새 작업의 기본 상태"},defaultPriority:{name:"기본 우선순위",description:"새 작업의 기본 우선순위"},defaultContexts:{name:"기본 컨텍스트",description:"쉼표로 구분된 기본 컨텍스트 목록 (예: @home, @work)",placeholder:"@집, @직장"},defaultTags:{name:"기본 태그",description:"# 없이 쉼표로 구분된 기본 태그 목록",placeholder:"중요, 긴급"},defaultProjects:{name:"기본 프로젝트",description:"새 작업의 기본 프로젝트 링크",selectButton:"프로젝트 선택",selectTooltip:"기본으로 연결할 프로젝트 노트 선택",removeTooltip:"기본 프로젝트에서 {name} 제거"},useParentNoteForTaskCreation:{name:"새 작업에서 활성 노트를 프로젝트로 사용",description:"명령 팔레트 또는 리본에서 작업 생성을 열 때 활성 노트를 프로젝트로 자동 연결합니다"},useParentNoteAsProject:{name:"인라인 생성 및 즉시 변환에서 상위 노트를 프로젝트로 사용",description:"인라인 작업 생성 또는 즉시 작업 변환을 사용할 때 원본 노트를 프로젝트로 자동 연결합니다"},useParentHeaderAsProject:{name:"즉시 변환 시 상위 제목을 프로젝트로 사용",description:"즉시 작업 변환 사용 시 변환된 줄 위의 가장 가까운 제목을 프로젝트로 자동 연결"},defaultTimeEstimate:{name:"기본 시간 예상",description:"기본 시간 예상 (분 단위, 0 = 기본값 없음)",placeholder:"60"},defaultRecurrence:{name:"기본 반복",description:"새 작업의 기본 반복 패턴"}},dateDefaults:{defaultDueDate:{name:"기본 마감일",description:"새 작업의 기본 마감일"},defaultScheduledDate:{name:"기본 예정일",description:"새 작업의 기본 예정일"}},reminders:{addReminder:{name:"기본 리마인더 추가",description:"모든 새 작업에 추가될 새 기본 리마인더 만들기",buttonText:"리마인더 추가"},emptyState:"기본 리마인더가 설정되지 않았습니다. 리마인더를 추가하여 새 작업에 대해 자동으로 알림을 받으세요.",emptyStateButton:"리마인더 추가",reminderDescription:"리마인더 설명",unnamedReminder:"이름 없는 리마인더",deleteTooltip:"리마인더 삭제",fields:{description:"설명:",type:"유형:",offset:"오프셋:",unit:"단위:",direction:"방향:",relatedTo:"기준:",date:"날짜:",time:"시간:"},types:{relative:"상대적 (작업 날짜 기준 전/후)",absolute:"절대적 (특정 날짜/시간)"},units:{minutes:"분",hours:"시간",days:"일"},directions:{before:"전",after:"후"},relatedTo:{due:"마감일",scheduled:"예정일"}},bodyTemplate:{useBodyTemplate:{name:"본문 템플릿 사용",description:"작업 본문 콘텐츠에 템플릿 파일 사용"},bodyTemplateFile:{name:"본문 템플릿 파일",description:"작업 본문 콘텐츠용 템플릿 파일 경로. {{title}}, {{date}}, {{time}}, {{priority}}, {{status}} 등의 템플릿 변수를 지원합니다.",placeholder:"템플릿/작업 템플릿.md",ariaLabel:"본문 템플릿 파일 경로"},useOccurrenceBodyTemplate:{name:"발생 노트 템플릿 사용",description:"반복 작업에 occurrence_template이 없을 때 구체화된 발생 노트용 별도 대체 템플릿을 사용합니다"},occurrenceBodyTemplateFile:{name:"발생 노트 템플릿 파일",description:"구체화된 발생 노트용 템플릿 파일 경로. 반복 작업의 occurrence_template 필드가 이 대체 템플릿보다 우선합니다.",placeholder:"템플릿/발생 템플릿.md",ariaLabel:"발생 노트 템플릿 파일 경로"},variablesHeader:"템플릿 변수:",variables:{title:"{{title}} - 작업 제목",details:"{{details}} - 모달에서 사용자가 제공한 세부정보",date:"{{date}} - 현재 날짜 (YYYY-MM-DD)",time:"{{time}} - 현재 시간 (HH:MM)",priority:"{{priority}} - 작업 우선순위",status:"{{status}} - 작업 상태",contexts:"{{contexts}} - 작업 컨텍스트",tags:"{{tags}} - 작업 태그",projects:"{{projects}} - 작업 프로젝트"}},instantConversion:{useDefaultsOnInstantConvert:{name:"즉시 변환 시 작업 기본값 사용",description:"텍스트를 작업으로 즉시 변환할 때 기본 작업 설정 적용"}},options:{noDefault:"기본값 없음",none:"없음",today:"오늘",tomorrow:"내일",nextWeek:"다음 주",daily:"매일",weekly:"매주",monthly:"매월",yearly:"매년"}},general:{taskStorage:{header:"작업 저장소",description:"작업이 저장되는 위치와 식별 방법을 설정합니다.",defaultFolder:{name:"기본 작업 폴더",description:"새 작업의 기본 위치입니다. {{currentNotePath}}, {{currentNoteTitle}}, {{projectFilePath}} 같은 폴더 템플릿 변수와 YYYY/MM/DD 같은 Daily Notes 스타일 날짜 토큰을 지원합니다."},moveArchived:{name:"보관된 작업을 폴더로 이동",description:"보관된 작업을 보관 폴더로 자동 이동"},archiveFolder:{name:"보관 폴더",description:"보관 시 작업을 이동할 폴더. {{year}}, {{month}}, {{priority}} 등의 템플릿 변수를 지원합니다."}},taskIdentification:{header:"작업 식별",description:"TaskNotes가 노트를 작업으로 식별하는 방법을 선택합니다.",identifyBy:{name:"작업 식별 기준",description:"태그 또는 프론트매터 속성으로 작업을 식별할지 선택",options:{tag:"태그",property:"속성"}},taskTag:{name:"작업 태그",description:"노트를 작업으로 식별하는 태그 (# 제외). 이 값을 변경해도 기존 .base 보기 필터는 이전 태그를 유지합니다. 기본 Base 파일을 업데이트하거나 해당 필터를 직접 편집하세요."},hideIdentifyingTags:{name:"작업 카드에서 식별 태그 숨기기",description:"활성화하면 작업 식별 태그와 일치하는 태그 (예: 'task/project' 같은 계층적 태그 포함)가 작업 카드에서 숨겨집니다"},hideIdentifyingTagsMode:{name:"숨길 태그 범위",description:"식별 태그를 숨길 때 중첩 태그도 숨길지 선택합니다.",options:{all:"작업 태그와 중첩 태그",exactOnly:"정확한 작업 태그만"}},taskProperty:{name:"작업 속성 이름",description:'프론트매터 속성 이름 (예: "category")'},taskPropertyValue:{name:"작업 속성 값",description:'노트를 작업으로 식별하는 값 (예: "task")'}},folderManagement:{header:"폴더 관리",excludedFolders:{name:"제외 폴더",description:"작업 인덱싱 및 프로젝트 제안에서 제외할 폴더 (쉼표로 구분)"}},frontmatter:{header:"프론트매터",description:"프론트매터 속성에서 링크 형식을 설정합니다.",useMarkdownLinks:{name:"프론트매터에서 마크다운 링크 사용",description:`프론트매터 속성에서 위키링크 ([[link]]) 대신 마크다운 링크 ([text](path)) 생성.
⚠️ 올바르게 작동하려면 'obsidian-frontmatter-markdown-links' 플러그인이 필요합니다.`}},taskInteraction:{header:"작업 상호작용",description:"작업 클릭 동작을 설정합니다.",singleClick:{name:"단일 클릭 동작",description:"작업 카드를 한 번 클릭했을 때 수행할 동작"},doubleClick:{name:"더블 클릭 동작",description:"작업 카드를 두 번 클릭했을 때 수행할 동작"},actions:{edit:"작업 편집",openNote:"노트 열기",none:"동작 없음"}},releaseNotes:{header:"릴리스 노트",description:"현재 버전: {version}",showOnUpdate:{name:"업데이트 후 릴리스 노트 표시",description:"TaskNotes가 새 버전으로 업데이트되면 자동으로 릴리스 노트 열기"},checkForUpdates:{name:"시작 시 새 릴리스 확인",description:"TaskNotes가 시작될 때 GitHub를 한 번 확인하고 더 최신 호환 릴리스가 있으면 알림을 표시합니다"},viewButton:{name:"릴리스 노트 보기",description:"최신 버전의 TaskNotes에서 새로운 기능 확인",buttonText:"릴리스 노트 보기"}}},taskProperties:{sections:{coreProperties:"핵심 속성",corePropertiesDesc:"상태와 우선순위는 작업의 상태와 중요도를 정의하는 핵심 속성입니다.",dateProperties:"날짜 속성",datePropertiesDesc:"작업의 마감일과 예정일을 설정합니다.",organizationProperties:"조직 속성",organizationPropertiesDesc:"컨텍스트, 프로젝트, 태그로 작업을 정리합니다.",taskDetails:"작업 세부정보",taskDetailsDesc:"시간 예상, 반복, 리마인더 등 추가 세부정보.",metadataProperties:"메타데이터 속성",metadataPropertiesDesc:"작업 기록을 추적하기 위한 시스템 관리 속성.",featureProperties:"기능 속성",featurePropertiesDesc:"뽀모도로 타이머 및 캘린더 동기화 같은 특정 TaskNotes 기능에서 사용하는 속성."},propertyCard:{propertyKey:"속성 키:",default:"기본값:",nlpTrigger:"NLP 트리거:",triggerChar:"트리거 문자:",triggerEmpty:"트리거는 비어 있을 수 없습니다",triggerTooLong:"트리거가 너무 깁니다 (최대 10자)"},properties:{status:{name:"상태",description:"작업의 현재 상태를 추적합니다 (예: 할 일, 진행 중, 완료). 상태는 작업이 완료로 표시되는지 여부를 결정하고 자동 보관을 트리거할 수 있습니다."},priority:{name:"우선순위",description:"작업 중요도를 나타냅니다. 정렬 및 필터링에 사용됩니다. 베이스 뷰에서 알파벳순으로 정렬되므로 순서를 제어하려면 1-, 2- 같은 접두사를 사용하세요."},due:{name:"마감일",description:"작업을 완료해야 하는 기한. 마감일이 지난 작업은 지연으로 표시됩니다. 프론트매터에 날짜로 저장됩니다."},scheduled:{name:"예정일",description:"작업을 수행할 계획일. 마감일과 달리 예정 시작 시간을 나타냅니다. 작업은 예정 날짜/시간에 캘린더에 표시됩니다."},contexts:{name:"컨텍스트",description:"작업을 수행할 수 있는 위치나 조건 (예: @home, @office, @phone). 현재 상황에 따라 작업을 필터링하는 데 유용합니다. 목록으로 저장됩니다."},projects:{name:"프로젝트",description:"이 작업이 속한 프로젝트 노트 링크. 위키링크로 저장됩니다 (예: [[프로젝트 이름]]). 작업은 여러 프로젝트에 속할 수 있습니다."},tags:{name:"태그",description:"작업 분류를 위한 기본 Obsidian 태그. tags 프론트매터 속성에 저장되며 Obsidian의 태그 기능과 함께 작동합니다."},timeEstimate:{name:"시간 예상",description:"작업을 완료하는 데 예상되는 시간 (분). 타임블로킹 및 작업량 계획에 사용됩니다. 작업 카드와 캘린더 이벤트에 표시됩니다."},recurrence:{name:"반복",description:"반복 작업 패턴 (매일, 매주, 매월, 매년 또는 사용자 지정 RRULE). 반복 작업이 완료되면 예정일이 자동으로 다음 발생으로 업데이트됩니다."},recurrenceAnchor:{name:"반복 기준",description:"다음 발생 계산 방법을 제어합니다: 'scheduled'는 예정일을, 'completion'은 실제 완료일을 사용합니다."},reminders:{name:"리마인더",description:"마감일 또는 예정일 전에 트리거되는 알림. 타이밍과 선택적 설명이 포함된 리마인더 객체 목록으로 저장됩니다."},title:{name:"제목",description:"작업 이름. 프론트매터 또는 파일명에 저장될 수 있습니다 ('파일명에 제목 저장'이 활성화된 경우)."},dateCreated:{name:"생성일",description:"작업이 처음 생성된 타임스탬프. 자동으로 설정되며 생성 순서로 정렬하는 데 사용됩니다."},dateModified:{name:"수정일",description:"작업의 마지막 변경 타임스탬프. 작업 속성이 변경되면 자동으로 업데이트됩니다."},completedDate:{name:"완료일",description:"작업이 완료로 표시된 타임스탬프. 상태가 완료 상태로 변경되면 자동으로 설정됩니다."},archiveTag:{name:"보관 태그",description:"작업이 보관될 때 추가되는 태그. 보관된 작업을 식별하는 데 사용되며 파일을 보관 폴더로 이동하도록 트리거할 수 있습니다."},timeEntries:{name:"시간 기록",description:"이 작업에 대한 시간 추적 세션 기록. 각 기록은 시작 및 종료 타임스탬프를 저장합니다. 총 소요 시간을 계산하는 데 사용됩니다."},completeInstances:{name:"완료 인스턴스",description:"반복 작업의 완료 기록. 각 인스턴스가 완료된 날짜를 저장하여 중복 완료를 방지합니다."},skippedInstances:{name:"건너뛴 인스턴스",description:"반복 작업의 건너뛴 발생. 완료 대신 건너뛴 인스턴스의 날짜를 저장합니다."},blockedBy:{name:"차단 원인",description:"이 작업 전에 완료해야 하는 작업 링크. 위키링크로 저장됩니다. 차단된 작업은 시각적 표시기를 표시합니다."},sortOrder:{name:"수동 순서",description:"드래그 앤 드롭으로 재정렬할 때 사용되는 frontmatter 속성입니다. 뷰는 이 속성으로 정렬되어 있어야 재정렬이 작동합니다."},pomodoros:{name:"뽀모도로",description:"완료된 뽀모도로 세션 수. 데이터 저장이 '데일리 노트'로 설정되면 작업 파일 대신 데일리 노트에 기록됩니다."},icsEventId:{name:"ICS 이벤트 ID",description:"노트를 ICS 캘린더 이벤트에 연결하는 고유 식별자. 캘린더 이벤트에서 노트를 만들 때 자동으로 추가됩니다."},icsEventTag:{name:"ICS 이벤트 태그",description:"ICS 캘린더 이벤트에서 생성된 노트를 식별하는 태그. 캘린더에서 생성된 노트를 일반 작업과 구분하는 데 사용됩니다."}},statusCard:{valuesHeader:"상태 값"},priorityCard:{valuesHeader:"우선순위 값"},projectsCard:{defaultProjects:"기본 프로젝트:",useParentNoteForTaskCreation:"새 작업에서 활성 노트 사용:",useParentNoteForInlineTasks:"인라인/즉시 변환에서 상위 노트 사용:",useParentHeader:"상위 제목을 프로젝트로 사용:",inheritParentTaskProperties:"하위 작업에 상위 작업 속성 상속:",noDefaultProjects:"선택된 기본 프로젝트 없음",autosuggestFilters:"자동 제안 필터",customizeDisplay:"표시 사용자 지정",filtersOn:"필터 켜짐"},titleCard:{storeTitleInFilename:"파일명에 제목 저장:",storedInFilename:"파일명에 저장됨",filenameUpdatesWithTitle:"작업 제목이 변경되면 파일명이 자동으로 업데이트됩니다.",filenameFormat:"파일명 형식:",customTemplate:"사용자 지정 템플릿:",legacySyntaxWarning:"{title}과 같은 단일 중괄호 구문은 더 이상 사용되지 않습니다. 본문 템플릿과의 일관성을 위해 {{title}}과 같은 이중 중괄호 구문을 사용하세요.",occurrenceFilenameTemplate:"발생 항목 파일명 템플릿",occurrenceFilenameTemplateHelp:"반복 작업에서 구체화된 발생 항목의 파일명 템플릿입니다. 비워 두면 기존 이름(상위 작업 제목과 숫자 접미사)을 유지합니다. {{occurrenceDate}}, {{occurrenceWeek}}, {{occurrenceMonth}}, {{occurrenceYear}}, {{occurrenceMonthName}} 중 하나로 파일명 단위를 명시적으로 선택하세요. 일반 파일명 변수도 모두 사용할 수 있습니다. 상위 작업은 아래에서 설정한 프론트매터 속성으로 이 템플릿을 재정의할 수 있습니다.",occurrenceFilenameProperty:"발생 항목 템플릿 재정의 속성",occurrenceFilenamePropertyHelp:"반복 상위 작업에서 발생 항목 파일명 템플릿을 재정의하는 프론트매터 속성의 이름입니다."},tagsCard:{nativeObsidianTags:"기본 Obsidian 태그 사용"},remindersCard:{defaultReminders:"기본 리마인더"},taskStatuses:{header:"작업 상태",description:"작업에 사용할 수 있는 상태 옵션을 사용자 지정합니다. 이러한 상태는 작업 수명 주기를 제어하고 작업이 완료로 간주되는 시점을 결정합니다.",howTheyWork:{title:"상태 작동 방식:",value:'값: 작업 파일에 저장되는 내부 식별자 (예: "in-progress")',label:'레이블: 인터페이스에 표시되는 표시 이름 (예: "진행 중")',color:"색상: 상태 점과 배지의 시각적 표시기 색상",icon:'아이콘: 색상 점 대신 표시할 선택적 Lucide 아이콘 이름 (예: "check", "circle", "clock"). lucide.dev에서 아이콘을 찾아보세요',completed:"완료됨: 선택하면 이 상태의 작업이 완료된 것으로 간주되며 다르게 필터링될 수 있습니다",autoArchive:"자동 보관: 활성화하면 지정된 지연 시간 후 작업이 자동으로 보관됩니다 (1-1440분)",orderNote:"아래 순서는 작업 상태 배지를 클릭하여 상태를 순환할 때의 순서를 결정합니다."},addNew:{name:"새 상태 추가",description:"작업에 새 상태 옵션 만들기",buttonText:"상태 추가"},validationNote:'참고: 최소 2개의 상태가 있어야 하며, 최소 하나의 상태가 "완료됨"으로 표시되어야 합니다.',emptyState:"사용자 지정 상태가 설정되지 않았습니다. 상태를 추가하여 시작하세요.",emptyStateButton:"상태 추가",fields:{value:"값:",label:"레이블:",color:"색상:",icon:"아이콘:",completed:"완료됨:",excludeFromCycle:"순환 시 건너뛰기:",nextStatus:"다음 상태:",autoArchive:"자동 보관:",delayMinutes:"지연 (분):"},placeholders:{value:"진행중",label:"진행 중",icon:"check, circle, clock",nextStatusDefault:"상태 순서 사용"},badges:{completed:"완료됨"},deleteConfirm:'"{label}" 상태를 삭제하시겠습니까?'},taskPriorities:{header:"작업 우선순위",description:"작업에 사용할 수 있는 우선순위 수준을 사용자 지정합니다. v4.0+에서는 베이스 뷰에서 값에 따라 알파벳순으로 정렬됩니다.",howTheyWork:{title:"우선순위 작동 방식:",value:'값: 작업 파일에 저장되는 내부 식별자. 베이스 뷰에서 정렬 순서를 제어하려면 "1-urgent", "2-high" 같은 접두사를 사용하세요.',label:'표시 레이블: 인터페이스에 표시되는 표시 이름 (예: "높은 우선순위")',color:"색상: 우선순위 점과 배지의 시각적 표시기 색상",icon:"아이콘: 작업 카드에서 우선순위 점 대신 표시할 선택적 Lucide 아이콘"},addNew:{name:"새 우선순위 추가",description:"작업에 새 우선순위 수준 만들기",buttonText:"우선순위 추가"},validationNote:"참고: 최소 1개의 우선순위가 있어야 합니다. 우선순위는 베이스 뷰에서 값에 따라 알파벳순으로 정렬됩니다.",emptyState:"사용자 지정 우선순위가 설정되지 않았습니다. 우선순위를 추가하여 시작하세요.",emptyStateButton:"우선순위 추가",fields:{value:"값:",label:"레이블:",color:"색상:",icon:"아이콘:"},placeholders:{value:"높음",label:"높은 우선순위",icon:"alert-circle"},deleteConfirm:"최소 하나의 우선순위가 있어야 합니다",deleteTooltip:"우선순위 삭제"},fieldMapping:{header:"필드 매핑",warning:"⚠️ 경고: TaskNotes는 이러한 속성 이름을 사용하여 읽고 씁니다. 작업을 만든 후 이를 변경하면 불일치가 발생할 수 있습니다.",description:"TaskNotes가 각 필드에 사용해야 하는 프론트매터 속성을 설정합니다.",resetButton:{name:"필드 매핑 초기화",description:"모든 필드 매핑을 기본값으로 초기화",buttonText:"기본값으로 초기화"},notices:{resetSuccess:"필드 매핑이 기본값으로 초기화되었습니다",resetFailure:"필드 매핑 초기화 실패",updateFailure:"{label}의 필드 매핑 업데이트 실패. 다시 시도하세요."},table:{fieldHeader:"TaskNotes 필드",propertyHeader:"사용자 속성 이름"},fields:{title:"제목",status:"상태",priority:"우선순위",due:"마감일",scheduled:"예정일",contexts:"컨텍스트",projects:"프로젝트",timeEstimate:"시간 예상",recurrence:"반복",dateCreated:"생성일",completedDate:"완료일",dateModified:"수정일",archiveTag:"보관 태그",timeEntries:"시간 기록",completeInstances:"완료 인스턴스",blockedBy:"차단 원인",sortOrder:"수동 순서",pomodoros:"뽀모도로",icsEventId:"ICS 이벤트 ID",icsEventTag:"ICS 이벤트 태그",reminders:"리마인더"}},customUserFields:{header:"사용자 지정 필드",description:"뷰 전체에서 유형 인식 필터 옵션으로 나타나는 사용자 지정 프론트매터 속성을 정의합니다. 각 행: 표시 이름, 속성 이름, 유형.",addNew:{name:"새 사용자 필드 추가",description:"필터와 뷰에 나타날 새 사용자 지정 필드 만들기",buttonText:"사용자 필드 추가"},emptyState:"사용자 지정 필드가 설정되지 않았습니다. 작업에 사용자 지정 속성을 만들려면 필드를 추가하세요.",emptyStateButton:"사용자 필드 추가",fields:{displayName:"표시 이름:",propertyKey:"속성 키:",type:"유형:",defaultValue:"기본값:"},placeholders:{displayName:"표시 이름",propertyKey:"속성-이름",defaultValue:"기본값",defaultValueList:"기본값 (쉼표로 구분)"},types:{text:"텍스트",number:"숫자",boolean:"불리언",date:"날짜",list:"목록"},defaultNames:{unnamedField:"이름 없는 필드",noKey:"키-없음"},deleteTooltip:"필드 삭제",autosuggestFilters:{header:"자동 제안 필터 (고급)",description:"이 필드의 자동 완성 제안에 표시되는 파일을 필터링"}}},appearance:{taskCards:{header:"작업 카드",description:"모든 뷰에서 작업 카드가 표시되는 방식을 설정합니다.",defaultVisibleProperties:{name:"기본 표시 속성",description:"작업 카드에 기본으로 표시할 속성을 선택합니다."},completionSubmenu:{name:"완료 및 건너뛰기 동작을 하위 메뉴로 묶기",description:"작업의 컨텍스트 메뉴에서 완료 및 건너뛰기 동작을 하위 메뉴에 표시합니다. 끄면 메뉴에 바로 표시됩니다."},propertyGroups:{coreProperties:"핵심 속성",organization:"조직",customProperties:"사용자 지정 속성"},properties:{status:"상태 점",priority:"우선순위 점",due:"마감일",scheduled:"예정일",timeEstimate:"시간 예상",totalTrackedTime:"총 기록 시간",checklistProgress:"체크리스트 진행률",recurrence:"반복",completedDate:"완료일",createdDate:"생성일",modifiedDate:"수정일",projects:"프로젝트",contexts:"컨텍스트",tags:"태그",blocked:"차단됨",blocking:"차단 중"}},taskFilenames:{header:"작업 파일명",description:"생성 시 작업 파일 이름 지정 방법을 설정합니다.",storeTitleInFilename:{name:"파일명에 제목 저장",description:"작업 제목을 파일명으로 사용. 작업 제목이 변경되면 파일명이 업데이트됩니다 (권장)."},filenameFormat:{name:"파일명 형식",description:"작업 파일명 생성 방법",options:{title:"작업 제목 (업데이트 안 됨)",zettel:"Zettelkasten 형식 (YYMMDD + base36 자정 이후 초)",timestamp:"전체 타임스탬프 (YYYY-MM-DD-HHMMSS)",custom:"사용자 지정 템플릿",uuid:"UUID v4"}},customTemplate:{name:"사용자 지정 파일명 템플릿",description:"사용자 지정 파일 이름 템플릿입니다. 사용 가능한 변수: {{title}}, {{titleLower}}, {{titleUpper}}, {{titleSnake}}, {{titleKebab}}, {{titleCamel}}, {{titlePascal}}, {{date}}, {{shortDate}}, {{time}}, {{time12}}, {{time24}}, {{timestamp}}, {{dateTime}}, {{year}}, {{month}}, {{monthName}}, {{monthNameShort}}, {{day}}, {{dayName}}, {{dayNameShort}}, {{hour}}, {{hour12}}, {{minute}}, {{second}}, {{milliseconds}}, {{ms}}, {{ampm}}, {{week}}, {{quarter}}, {{unix}}, {{unixMs}}, {{timezone}}, {{timezoneShort}}, {{utcOffset}}, {{utcOffsetShort}}, {{utcZ}}, {{zettel}}, {{uuid}}, {{nano}}, {{priority}}, {{priorityShort}}, {{status}}, {{statusShort}}, {{dueDate}}, {{scheduledDate}}",placeholder:"{{date}}-{{title}}-{{dueDate}}",helpText:"참고: {{dueDate}}와 {{scheduledDate}}는 YYYY-MM-DD 형식이며 설정되지 않은 경우 비어 있습니다."}},displayFormatting:{header:"표시 형식",description:"플러그인 전체에서 날짜, 시간 및 기타 데이터가 표시되는 방식을 설정합니다.",timeFormat:{name:"시간 형식",description:"플러그인 전체에서 12시간 또는 24시간 형식으로 시간 표시",options:{twelveHour:"12시간 (오전/오후)",twentyFourHour:"24시간"}}},calendarView:{header:"캘린더 뷰",description:"캘린더 뷰의 외관과 동작을 사용자 지정합니다.",defaultView:{name:"기본 뷰",description:"캘린더 탭을 열 때 표시되는 캘린더 뷰",options:{monthGrid:"월간 그리드",weekTimeline:"주간 타임라인",dayTimeline:"일간 타임라인",yearView:"연간 뷰",customMultiDay:"사용자 지정 다일"}},customDayCount:{name:"사용자 지정 뷰 일수",description:"사용자 지정 다일 뷰에 표시할 일수",placeholder:"3"},firstDayOfWeek:{name:"주의 첫째 요일",description:"주간 뷰에서 첫 번째 열이 될 요일"},showWeekends:{name:"주말 표시",description:"캘린더 뷰에 주말 표시"},showWeekNumbers:{name:"주 번호 표시",description:"캘린더 뷰에 주 번호 표시"},showTodayHighlight:{name:"오늘 강조 표시",description:"캘린더 뷰에서 현재 날짜 강조"},showCurrentTimeIndicator:{name:"현재 시간 표시기 표시",description:"타임라인 뷰에 현재 시간을 나타내는 선 표시"},selectionMirror:{name:"선택 미러",description:"시간 범위를 드래그하여 선택할 때 시각적 미리보기 표시"},calendarLocale:{name:"캘린더 로케일",description:'날짜 형식 및 캘린더 시스템을 위한 캘린더 로케일 (예: "en", "fa" 페르시아어, "de" 독일어). 브라우저에서 자동 감지하려면 비워두세요.',placeholder:"자동 감지",invalidLocale:"잘못된 로케일입니다. 유효한 언어 태그를 입력하세요 (예: 'en', 'de', 'fr-FR')."}},defaultEventVisibility:{header:"기본 이벤트 표시",description:"캘린더를 열 때 기본으로 표시되는 이벤트 유형을 설정합니다. 사용자는 캘린더 뷰에서 이를 켜고 끌 수 있습니다.",showScheduledTasks:{name:"예정된 작업 표시",description:"기본으로 예정일이 있는 작업 표시"},showDueDates:{name:"마감일 표시",description:"기본으로 작업 마감일 표시"},showDueWhenScheduled:{name:"예정일이 있을 때 마감일 표시",description:"이미 예정일이 있는 작업의 마감일도 표시"},showTimeEntries:{name:"시간 기록 표시",description:"기본으로 완료된 시간 추적 기록 표시"},showRecurringTasks:{name:"반복 작업 표시",description:"기본으로 반복 작업 인스턴스 표시"},showICSEvents:{name:"ICS 이벤트 표시",description:"기본으로 ICS 구독의 이벤트 표시"}},timeSettings:{header:"시간 설정",description:"타임라인 뷰의 시간 관련 표시 설정을 구성합니다.",timeSlotDuration:{name:"시간 슬롯 간격",description:"타임라인 뷰에서 각 시간 슬롯의 길이",options:{fifteenMinutes:"15분",thirtyMinutes:"30분",sixtyMinutes:"60분"}},startTime:{name:"시작 시간",description:"타임라인 뷰에 표시되는 가장 이른 시간 (HH:MM 형식)",placeholder:"06:00"},endTime:{name:"종료 시간",description:"타임라인 보기에서 표시할 가장 늦은 시간(HH:MM 형식). 26:00을 오전 2시로 표시하는 것처럼 24:00보다 큰 값을 사용해 다음 날 이른 시간을 표시할 수 있습니다.",placeholder:"26:00"},initialScrollTime:{name:"초기 스크롤 시간",description:"타임라인 뷰를 열 때 스크롤할 시간 (HH:MM 형식)",placeholder:"09:00"},eventMinHeight:{name:"이벤트 최소 높이",description:"타임라인 뷰에서 이벤트의 최소 높이 (픽셀)",placeholder:"15"}},uiElements:{header:"UI 요소",description:"다양한 UI 요소의 표시를 설정합니다.",showTrackedTasksInStatusBar:{name:"상태 표시줄에 추적 중인 작업 표시",description:"Obsidian 상태 표시줄에 현재 추적 중인 작업 표시"},showRelationshipsWidget:{name:"관계 위젯 표시",description:"현재 노트의 모든 관계 (하위 작업, 프로젝트, 종속성)를 보여주는 위젯 표시"},relationshipsPosition:{name:"관계 위치",description:"관계 위젯의 위치",options:{top:"노트 상단",bottom:"노트 하단"}},showTaskCardInNote:{name:"노트에 작업 카드 표시",description:"작업 노트 상단에 작업 세부정보와 동작을 보여주는 작업 카드 위젯 표시"},showCompletedTaskStrikethrough:{name:"완료된 작업 제목에 취소선 표시",description:"완료된 작업 카드 제목에 선을 그립니다. 완료된 작업을 더 읽기 쉽게 보려면 끄세요"},showExpandableSubtasks:{name:"확장 가능한 하위 작업 표시",description:"작업 카드에서 하위 작업 섹션을 펼치고 접을 수 있도록 허용"},expandSubtasksByDefault:{name:"하위 작업 기본 펼치기",description:"작업 카드가 렌더링될 때 프로젝트 하위 작업을 펼쳐서 표시"},subtaskChevronPosition:{name:"하위 작업 화살표 위치",description:"작업 카드에서 펼치기/접기 화살표의 위치",options:{left:"왼쪽",right:"오른쪽"}},viewsButtonAlignment:{name:"뷰 버튼 정렬",description:"작업 인터페이스에서 뷰/필터 버튼의 정렬",options:{left:"왼쪽",right:"오른쪽"}}},projectAutosuggest:{header:"프로젝트 자동 제안",description:"작업 생성 시 프로젝트 제안이 표시되는 방식을 사용자 지정합니다.",requiredTags:{name:"필수 태그",description:"이러한 태그 중 하나가 있는 노트만 표시 (쉼표로 구분). 모든 노트를 표시하려면 비워두세요.",placeholder:"프로젝트, 활성, 중요"},includeFolders:{name:"포함 폴더",description:"이러한 폴더의 노트만 표시 (쉼표로 구분된 경로). 모든 폴더를 표시하려면 비워두세요.",placeholder:"프로젝트/, 업무/활성, 개인"},requiredPropertyKey:{name:"필수 속성 키",description:"이 프론트매터 속성이 아래 값과 일치하는 노트만 표시. 무시하려면 비워두세요.",placeholder:"유형"},requiredPropertyValue:{name:"필수 속성 값",description:"속성이 이 값과 같은 노트만 제안됩니다. 속성 존재만 요구하려면 비워두세요.",placeholder:"프로젝트"},customizeDisplay:{name:"제안 표시 사용자 지정",description:"프로젝트 제안이 표시되는 방식과 표시되는 정보를 설정하는 고급 옵션 표시."},enableFuzzyMatching:{name:"퍼지 매칭 활성화",description:"프로젝트 검색에서 오타와 부분 일치 허용. 큰 보관소에서는 느려질 수 있습니다."},displayRowsHelp:"각 프로젝트 제안에 표시할 최대 3줄의 정보를 구성합니다.",displayRows:{row1:{name:"행 1",description:"형식: {property|flags}. 속성: title, aliases, file.path, file.parent. 플래그: n(Label)은 레이블 표시, s는 검색 가능. 예: {title|n(Title)|s}",placeholder:"{title|n(제목)}"},row2:{name:"행 2 (선택사항)",description:"일반적인 패턴: {aliases|n(Aliases)}, {file.parent|n(Folder)}, literal:Custom Text",placeholder:"{aliases|n(별칭)}"},row3:{name:"행 3 (선택사항)",description:"{file.path|n(Path)} 또는 사용자 지정 프론트매터 필드 같은 추가 정보",placeholder:"{file.path|n(경로)}"}},quickReference:{header:"빠른 참조",properties:"사용 가능한 속성: title, aliases, file.path, file.parent 또는 모든 프론트매터 필드",labels:'레이블 추가: {title|n(Title)} → "Title: My Project"',searchable:"검색 가능하게 만들기: {description|s}는 + 검색에 설명 포함",staticText:"정적 텍스트: literal:My Custom Label",alwaysSearchable:"파일명, 제목, 별칭은 기본적으로 항상 검색 가능합니다."}},dataStorage:{name:"저장 위치",description:"뽀모도로 세션 기록을 저장할 위치",pluginData:"플러그인 데이터 (권장)",dailyNotes:"데일리 노트",notices:{locationChanged:"뽀모도로 저장 위치가 {location}(으)로 변경되었습니다"}},notifications:{description:"작업 리마인더 알림 및 경고를 설정합니다."},performance:{description:"플러그인 성능 및 동작 옵션을 설정합니다."},timeTrackingSection:{description:"자동 시간 추적 동작을 설정합니다."},recurringSection:{description:"반복 작업 관리 동작을 설정합니다."}},integrations:{mobileCalendar:{disable:{name:"모바일에서 캘린더 연동 비활성화",description:"Obsidian Mobile에서 Google, Microsoft 및 ICS 캘린더 로드를 건너뜁니다. 데스크톱 캘린더 연동은 변경되지 않습니다."},status:{name:"이 모바일 기기에서 캘린더 연동이 비활성화되었습니다",description:"캘린더 로드를 다시 시작하려면 이 설정을 끄고 Obsidian Mobile을 다시 로드하세요."}},basesIntegration:{header:"베이스 통합",description:"Obsidian 베이스 플러그인과의 통합을 설정합니다. 이것은 실험적 기능이며 현재 문서화되지 않은 Obsidian API에 의존합니다. 동작이 변경되거나 중단될 수 있습니다.",enable:{name:"베이스 통합 활성화",description:"TaskNotes 뷰를 Obsidian 베이스 플러그인 내에서 사용할 수 있도록 활성화. 이 기능이 작동하려면 베이스 플러그인이 활성화되어 있어야 합니다."},viewCommands:{header:"뷰 및 베이스 파일",description:"TaskNotes는 Obsidian 베이스 파일 (.base)을 사용하여 뷰를 구동합니다. 이 파일들은 시작 시 존재하지 않으면 현재 설정 (작업 식별, 필드 매핑, 상태 등)으로 자동 생성됩니다.",descriptionRegen:'설정을 변경해도 Base 파일은 자동으로 업데이트되지 않습니다. 새 설정을 적용하려면 아래의 "파일 업데이트"를 사용하거나, 기존 .base 파일을 삭제하고 Obsidian을 다시 시작하거나, 수동으로 편집하세요.',docsLink:"사용 가능한 수식 및 사용자 지정 옵션에 대한 문서 보기",docsLinkUrl:"https://tasknotes.dev/views/default-base-templates",commands:{miniCalendar:"미니 캘린더 뷰 열기",kanban:"칸반 뷰 열기",tasks:"작업 뷰 열기",advancedCalendar:"고급 캘린더 뷰 열기",agenda:"일정 뷰 열기",relationships:"관계 위젯",pomodoroStats:"Pomodoro 통계 Base"},fileLabel:"파일: {path}",resetButton:"초기화",resetTooltip:"기본 경로로 초기화",pomodoroDailyNotesHint:"생성된 Pomodoro 통계 Base는 데일리 노트에서 Pomodoro 기록을 읽습니다. 기록이 아직 플러그인 데이터에 저장되어 있다면 이 Base 파일을 사용하기 전에 설정에서 마이그레이션하세요."},autoCreateDefaultFiles:{name:"기본 파일 자동 생성",description:"시작 시 누락된 기본 베이스 뷰 파일을 자동으로 생성. 삭제된 샘플 파일이 다시 생성되지 않도록 비활성화하세요."},createDefaultFiles:{name:"기본 파일 생성",description:"TaskNotes/Views/ 디렉토리에 기본 .base 파일을 생성합니다. 기존 파일은 덮어쓰지 않습니다.",buttonText:"파일 생성"},exportV3Views:{name:"V3 저장된 뷰를 베이스로 내보내기",description:"TaskNotes v3의 모든 저장된 뷰를 여러 뷰가 포함된 단일 .base 파일로 변환합니다. v3 필터 구성을 새 베이스 시스템으로 마이그레이션하는 데 도움이 됩니다.",buttonText:"V3 뷰 내보내기",noViews:"내보낼 저장된 뷰가 없습니다",fileExists:"파일이 이미 존재합니다",confirmOverwrite:'"{fileName}"이라는 파일이 이미 존재합니다. 덮어쓰시겠습니까?',success:"{count}개의 저장된 뷰를 {filePath}(으)로 내보냈습니다",error:"뷰 내보내기 실패: {message}"},notices:{enabled:"베이스 통합이 활성화되었습니다. 설정을 완료하려면 Obsidian을 다시 시작하세요.",disabled:"베이스 통합이 비활성화되었습니다. 제거를 완료하려면 Obsidian을 다시 시작하세요."},updateDefaultFiles:{name:"기본 파일 업데이트",description:"현재 TaskNotes 설정에서 생성된 템플릿으로 구성된 기본 .base 파일을 덮어씁니다.",buttonText:"파일 업데이트",confirmTitle:"기본 Base 파일 업데이트",confirmMessage:"구성된 기본 .base 파일을 새로 생성된 템플릿으로 덮어씁니다. 해당 파일의 수동 편집 내용은 대체됩니다.",confirmText:"파일 업데이트"}},calendarSubscriptions:{header:"캘린더 구독",description:"ICS/iCal URL을 통해 외부 캘린더를 구독하여 작업과 함께 이벤트를 봅니다.",defaultNoteTemplate:{name:"기본 노트 템플릿",description:"ICS 이벤트에서 생성된 노트용 템플릿 파일 경로",placeholder:"템플릿/이벤트 템플릿.md"},defaultNoteFolder:{name:"기본 노트 폴더",description:"ICS 이벤트에서 생성된 노트용 폴더",placeholder:"캘린더/이벤트"},filenameFormat:{name:"ICS 노트 파일명 형식",description:"ICS 이벤트에서 생성된 노트의 파일명 생성 방법",options:{title:"이벤트 제목",zettel:"Zettelkasten 형식",timestamp:"타임스탬프",custom:"사용자 지정 템플릿"}},customTemplate:{name:"사용자 지정 ICS 파일명 템플릿",description:"사용자 지정 ICS 이벤트 파일명 템플릿",placeholder:"{date}-{title}"},useICSEndAsDue:{name:"ICS 이벤트 종료 시간을 작업 마감일로 사용",description:"활성화하면 캘린더 이벤트에서 생성된 작업의 마감일이 이벤트 종료 시간으로 설정됩니다. 종일 이벤트의 경우 마감일이 이벤트 날짜로 설정됩니다. 시간이 지정된 이벤트의 경우 마감일에 종료 시간이 포함됩니다."},recurringEventRelatedNotesMode:{name:"반복 이벤트 관련 노트",description:"외부 캘린더 이벤트의 한 반복 항목에 연결된 노트를 불러온 전체 시리즈에 표시할지, 선택한 인스턴스에만 표시할지 선택합니다.",options:{series:"전체 시리즈",instance:"선택한 인스턴스만"}}},subscriptionsList:{header:"캘린더 구독 목록",addSubscription:{name:"캘린더 구독 추가",description:"ICS/iCal URL 또는 로컬 파일에서 새 캘린더 구독 추가",buttonText:"구독 추가"},refreshAll:{name:"모든 구독 새로고침",description:"활성화된 모든 캘린더 구독을 수동으로 새로고침",buttonText:"모두 새로고침"},newCalendarName:"새 캘린더",emptyState:"캘린더 구독이 설정되지 않았습니다. 외부 캘린더를 동기화하려면 구독을 추가하세요.",notices:{addSuccess:"새 캘린더 구독이 추가되었습니다 - 세부 정보를 설정하세요",addFailure:"구독 추가 실패",serviceUnavailable:"ICS 구독 서비스를 사용할 수 없습니다",refreshSuccess:"모든 캘린더 구독이 새로고침되었습니다",refreshFailure:"일부 캘린더 구독 새로고침 실패",updateFailure:"구독 업데이트 실패",deleteSuccess:'"{name}" 구독이 삭제되었습니다',deleteFailure:"구독 삭제 실패",enableFirst:"먼저 구독을 활성화하세요",refreshSubscriptionSuccess:'"{name}" 새로고침됨',refreshSubscriptionFailure:"구독 새로고침 실패"},labels:{enabled:"활성화:",name:"이름:",type:"유형:",url:"URL:",filePath:"파일 경로:",color:"색상:",refreshMinutes:"새로고침 (분):"},typeOptions:{remote:"원격 URL",local:"로컬 파일"},placeholders:{calendarName:"캘린더 이름",url:"ICS/iCal 주소",filePath:"로컬 파일 경로 (예: Calendar.ics)",localFile:"캘린더.ics"},statusLabels:{enabled:"활성화됨",disabled:"비활성화됨",remote:"원격",localFile:"로컬 파일",remoteCalendar:"원격 캘린더",localFileCalendar:"로컬 파일",synced:"{timeAgo} 전 동기화됨",error:"오류"},actions:{refreshNow:"지금 새로고침",deleteSubscription:"구독 삭제"},refreshNow:"지금 새로고침",confirmDelete:{title:"구독 삭제",message:'"{name}" 구독을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.',confirmText:"삭제"}},autoExport:{header:"자동 ICS 내보내기",description:"모든 작업을 ICS 파일로 자동 내보내기.",enable:{name:"자동 내보내기 활성화",description:"모든 작업으로 ICS 파일을 자동으로 업데이트"},filePath:{name:"내보내기 파일 경로",description:"ICS 파일이 저장될 경로 (보관소 루트 기준)",placeholder:"tasknotes-캘린더.ics"},interval:{name:"업데이트 간격 (5~1440분)",description:"내보내기 파일 업데이트 주기",placeholder:"60"},useDuration:{name:"작업 소요 시간을 이벤트 길이로 사용",description:"활성화하면 캘린더 이벤트 종료 시간에 마감일 대신 작업의 예상 시간(소요 시간)을 사용합니다. 이는 예정 + 소요 시간이 작업 계획을 나타내고 마감일이 기한을 나타내는 GTD 워크플로우에 유용합니다."},exportNow:{name:"지금 내보내기",description:"즉시 내보내기를 수동으로 트리거",buttonText:"지금 내보내기"},status:{title:"내보내기 상태:",lastExport:"마지막 내보내기: {time}",nextExport:"다음 내보내기: {time}",noExports:"아직 내보내기 없음",notScheduled:"예정되지 않음",notInitialized:"자동 내보내기 서비스가 초기화되지 않았습니다 - Obsidian을 다시 시작하세요",serviceNotInitialized:"서비스가 초기화되지 않았습니다 - Obsidian을 다시 시작하세요"},notices:{reloadRequired:"자동 내보내기 변경 사항을 적용하려면 Obsidian을 다시 로드하세요.",exportSuccess:"작업이 성공적으로 내보내졌습니다",exportFailure:"내보내기 실패 - 콘솔에서 자세한 내용을 확인하세요",serviceUnavailable:"자동 내보내기 서비스를 사용할 수 없습니다"},excludeCompleted:{name:"완료된 작업 제외",description:"활성화하면 완료된 작업은 ICS 내보내기에서 제외됩니다. 완료 상태는 작업 상태 설정에서 가져옵니다."},excludeArchived:{name:"보관된 작업 제외",description:"활성화하면 보관된 작업은 ICS 내보내기에서 제외됩니다."},requireDueDate:{name:"마감일 필요",description:"활성화하면 마감일이 있는 작업만 ICS 내보내기에 포함됩니다."},requireScheduledDate:{name:"예약일 필요",description:"활성화하면 예약일이 있는 작업만 ICS 내보내기에 포함됩니다."}},googleCalendarExport:{header:"Google 캘린더로 작업 내보내기",description:"작업을 Google 캘린더 이벤트로 자동 동기화합니다. 위에서 Google 캘린더가 연결되어 있어야 합니다.",enable:{name:"작업 내보내기 활성화",description:"활성화하면 날짜가 있는 작업이 Google 캘린더에 이벤트로 자동 동기화됩니다."},targetCalendar:{name:"대상 캘린더",description:"작업 이벤트를 생성할 캘린더를 선택하세요.",placeholder:"캘린더 선택...",connectFirst:"먼저 Google 캘린더를 연결하세요",primarySuffix:" (기본)"},syncTrigger:{name:"동기화 트리거",description:"어떤 작업 날짜가 캘린더 이벤트 생성을 트리거할지 설정합니다.",options:{scheduled:"예정 날짜",due:"마감 날짜",both:"둘 다 (예정 날짜 우선)"}},allDayEvents:{name:"종일 이벤트로 생성",description:"활성화하면 작업이 종일 이벤트로 생성됩니다. 비활성화하면 시간 추정을 기간으로 사용합니다."},defaultDuration:{name:"기본 이벤트 기간",description:"시간이 지정된 이벤트의 기간(분) (작업에 시간 추정이 없을 때 사용)."},eventTitleTemplate:{name:"이벤트 제목 템플릿",description:"이벤트 제목 템플릿. 사용 가능한 변수: {{title}}, {{status}}, {{priority}}",placeholder:"{{title}}"},includeDescription:{name:"설명에 작업 세부 정보 포함",description:"이벤트 설명에 작업 메타데이터(우선순위, 상태, 태그 등)를 추가합니다."},includeObsidianLink:{name:"Obsidian 링크 포함",description:"이벤트 설명에 Obsidian의 작업으로 돌아가는 링크를 추가합니다."},defaultReminder:{name:"기본 알림",description:"시간이 지정된 Google Calendar 이벤트에 팝업 리마인더를 추가합니다. 이벤트 전 분 수를 쉼표로 구분해 입력하세요. 비워 두면 캘린더 기본값을 사용합니다. 일반적인 값: 15, 30, 60, 1440."},automaticSyncBehavior:{header:"자동 동기화 동작"},syncOnCreate:{name:"작업 생성 시 동기화",description:"새 작업이 생성될 때 자동으로 캘린더 이벤트를 생성합니다."},syncOnUpdate:{name:"작업 업데이트 시 동기화",description:"작업이 수정될 때 자동으로 캘린더 이벤트를 업데이트합니다."},syncOnComplete:{name:"작업 완료 시 동기화",description:"작업이 완료되면 캘린더 이벤트를 업데이트합니다 (제목에 체크 표시 추가)."},syncOnDelete:{name:"작업 삭제 시 이벤트 삭제",description:"해당 작업이 삭제되면 캘린더 이벤트를 삭제합니다."},manualSyncActions:{header:"수동 동기화 작업"},syncAllTasks:{name:"모든 작업 동기화",description:"모든 기존 작업을 Google 캘린더에 동기화합니다. 아직 동기화되지 않은 작업에 대해 이벤트가 생성됩니다.",buttonText:"모두 동기화"},unlinkAllTasks:{name:"모든 작업 연결 해제",description:"캘린더 이벤트를 삭제하지 않고 모든 작업-이벤트 링크를 제거합니다.",buttonText:"모두 연결 해제",confirmTitle:"모든 작업 연결 해제",confirmMessage:"작업과 캘린더 이벤트 간의 모든 링크가 제거됩니다. 캘린더 이벤트는 유지되지만 작업 변경 시 더 이상 업데이트되지 않습니다. 확실합니까?",confirmButtonText:"모두 연결 해제"},notices:{notEnabled:"Google 캘린더 내보내기가 활성화되지 않았습니다. 설정 > 통합에서 구성하세요.",notEnabledOrConfigured:"Google 캘린더 내보내기가 활성화되거나 구성되지 않았습니다",serviceNotAvailable:"작업 캘린더 동기화 서비스를 사용할 수 없습니다",syncResults:"동기화됨: {synced}, 실패: {failed}, 건너뜀: {skipped}",taskSynced:"작업이 Google 캘린더에 동기화되었습니다",noActiveFile:"현재 활성 파일이 없습니다",notATask:"현재 파일은 작업이 아닙니다",noDateToSync:"동기화할 예정 날짜 또는 마감 날짜가 없습니다",syncFailed:"Google 캘린더에 작업 동기화 실패: {message}",connectionExpired:"Google 캘린더 연결이 만료되었습니다. 설정 > 통합에서 다시 연결하세요.",syncingTasks:"{total}개의 작업을 Google 캘린더에 동기화 중...",syncComplete:"동기화 완료: {synced}개 동기화됨, {failed}개 실패, {skipped}개 건너뜀",eventsDeletedAndUnlinked:"모든 이벤트가 삭제되고 연결 해제되었습니다",tasksUnlinked:"모든 작업 링크가 제거되었습니다"},eventDescription:{untitledTask:"제목 없는 작업",priority:"우선순위: {value}",status:"상태: {value}",due:"마감: {value}",scheduled:"예정: {value}",timeEstimate:"시간 추정: {value}",tags:"태그: {value}",contexts:"컨텍스트: {value}",projects:"프로젝트: {value}",openInObsidian:"Obsidian에서 열기"}},httpApi:{header:"HTTP API",description:"외부 통합 및 자동화를 위한 HTTP API 활성화.",enable:{name:"HTTP API 활성화",description:"API 액세스를 위한 로컬 HTTP 서버 시작"},port:{name:"API 포트",description:"HTTP API 서버의 포트 번호",placeholder:"3000"},authToken:{name:"API 인증 토큰",description:"TaskNotes 토큰이며 AI 서비스 제공업체의 API 키가 아닙니다. 생성하려면 HTTP API를 활성화하고 이 필드를 비운 뒤 Obsidian을 다시 시작하세요. 생성된 토큰을 클라이언트의 Bearer 인증 설정에 복사하세요. 토큰이 변경될 때마다 클라이언트 설정도 업데이트하세요.",placeholder:"비밀-토큰"},mcp:{enable:{name:"MCP 서버 활성화",description:"Model Context Protocol을 통해 /mcp 엔드포인트에서 TaskNotes 도구를 노출합니다. HTTP API가 활성화되어 있어야 합니다."}},endpoints:{header:"사용 가능한 API 엔드포인트",expandIcon:"▶",collapseIcon:"▼"}},webhooks:{header:"웹훅",description:{overview:"웹훅은 TaskNotes 이벤트가 발생할 때 외부 서비스에 실시간 알림을 보냅니다.",usage:"자동화 도구, 동기화 서비스 또는 사용자 지정 애플리케이션과 통합하려면 웹훅을 구성하세요."},addWebhook:{name:"웹훅 추가",description:"새 웹훅 엔드포인트 등록",buttonText:"웹훅 추가"},emptyState:{message:"웹훅이 설정되지 않았습니다. 실시간 알림을 받으려면 웹훅을 추가하세요.",buttonText:"웹훅 추가"},labels:{active:"활성:",url:"URL:",events:"이벤트:",transform:"변환:"},placeholders:{url:"웹훅 URL",noEventsSelected:"선택된 이벤트 없음",rawPayload:"원본 페이로드 (변환 없음)"},statusLabels:{active:"활성",inactive:"비활성",created:"{timeAgo} 전 생성됨"},actions:{editEvents:"이벤트 편집",delete:"삭제"},editEvents:"이벤트 편집",notices:{urlUpdated:"웹훅 URL이 업데이트되었습니다",enabled:"웹훅이 활성화되었습니다",disabled:"웹훅이 비활성화되었습니다",created:"웹훅이 생성되었습니다",deleted:"웹훅이 삭제되었습니다",updated:"웹훅이 업데이트되었습니다"},confirmDelete:{title:"웹훅 삭제",message:`이 웹훅을 삭제하시겠습니까?
URL: {url}
이 작업은 취소할 수 없습니다.`,confirmText:"삭제"},cardHeader:"웹훅",cardFields:{active:"활성:",url:"URL:",events:"이벤트:",transform:"변환:"},eventsDisplay:{noEvents:"선택된 이벤트 없음"},transformDisplay:{noTransform:"원본 페이로드 (변환 없음)"},secretModal:{title:"웹훅 시크릿 생성됨",description:"웹훅 시크릿이 생성되었습니다. 다시 볼 수 없으므로 이 시크릿을 저장하세요:",usage:"수신 애플리케이션에서 웹훅 페이로드를 확인하는 데 이 시크릿을 사용하세요.",gotIt:"확인"},editModal:{title:"웹훅 편집",eventsHeader:"구독할 이벤트"},events:{taskCreated:{label:"작업 생성됨",description:"새 작업이 생성될 때"},taskUpdated:{label:"작업 업데이트됨",description:"작업이 수정될 때"},taskCompleted:{label:"작업 완료됨",description:"작업이 완료로 표시될 때"},taskDeleted:{label:"작업 삭제됨",description:"작업이 삭제될 때"},taskArchived:{label:"작업 보관됨",description:"작업이 보관될 때"},taskUnarchived:{label:"작업 보관 해제됨",description:"작업이 보관 해제될 때"},timeStarted:{label:"시간 추적 시작됨",description:"시간 추적이 시작될 때"},timeStopped:{label:"시간 추적 중지됨",description:"시간 추적이 중지될 때"},pomodoroStarted:{label:"뽀모도로 시작됨",description:"뽀모도로 세션이 시작될 때"},pomodoroCompleted:{label:"뽀모도로 완료됨",description:"뽀모도로 세션이 완료될 때"},pomodoroInterrupted:{label:"뽀모도로 중단됨",description:"뽀모도로 세션이 중지될 때"},recurringCompleted:{label:"반복 인스턴스 완료됨",description:"반복 작업 인스턴스가 완료될 때"},reminderTriggered:{label:"리마인더 트리거됨",description:"작업 리마인더가 활성화될 때"}},modals:{secretGenerated:{title:"웹훅 시크릿 생성됨",description:"웹훅 시크릿이 생성되었습니다. 다시 볼 수 없으므로 이 시크릿을 저장하세요:",usage:"수신 애플리케이션에서 웹훅 페이로드를 확인하는 데 이 시크릿을 사용하세요.",buttonText:"확인"},edit:{title:"웹훅 편집",eventsSection:"구독할 이벤트",transformSection:"변환 구성 (선택사항)",headersSection:"헤더 구성",transformFile:{name:"변환 파일",description:"웹훅 페이로드를 변환하는 보관소의 .json 템플릿 파일 경로",placeholder:"simple-template.json"},customHeaders:{name:"사용자 지정 헤더 포함",description:"TaskNotes 헤더 (이벤트 유형, 서명, 전달 ID) 포함. Discord, Slack 및 엄격한 CORS 정책을 가진 다른 서비스에서는 비활성화하세요."},buttons:{cancel:"취소",save:"변경 사항 저장"},notices:{selectAtLeastOneEvent:"최소 하나의 이벤트를 선택하세요"}},add:{title:"웹훅 추가",eventsSection:"구독할 이벤트",transformSection:"변환 구성 (선택사항)",headersSection:"헤더 구성",url:{name:"웹훅 URL",description:"웹훅 페이로드가 전송될 엔드포인트",placeholder:"https://your-service.com/webhook"},transformFile:{name:"변환 파일",description:"웹훅 페이로드를 변환하는 보관소의 .json 템플릿 파일 경로",placeholder:"simple-template.json"},customHeaders:{name:"사용자 지정 헤더 포함",description:"TaskNotes 헤더 (이벤트 유형, 서명, 전달 ID) 포함. Discord, Slack 및 엄격한 CORS 정책을 가진 다른 서비스에서는 비활성화하세요."},transformHelp:{title:"JSON 변환 템플릿을 사용하여 웹훅 페이로드를 사용자 지정할 수 있습니다:",jsFiles:"",jsDescription:"",jsonFiles:".json 파일:",jsonDescription:" ",jsonVariable:"${data.task.title}",leaveEmpty:"비워두기:",leaveEmptyDescription:" 원본 데이터 전송",example:"예:",exampleFile:"simple-template.json"},buttons:{cancel:"취소",add:"웹훅 추가"},notices:{urlRequired:"웹훅 URL이 필요합니다",selectAtLeastOneEvent:"최소 하나의 이벤트를 선택하세요"}}}},otherIntegrations:{header:"기타 플러그인 통합",description:"다른 Obsidian 플러그인과의 통합을 설정합니다."},mdbaseSpec:{header:"mdbase 타입 정의",learnMore:"mdbase-spec에 대해 자세히 알아보기",enable:{name:"mdbase 타입 정의 생성",description:"설정이 변경될 때 보관소 루트에 mdbase 타입 파일(mdbase.yaml 및 _types/task.md)을 생성하고 유지합니다."}},timeFormats:{justNow:"방금",minutesAgo:"{minutes}분 전",hoursAgo:"{hours}시간 전",daysAgo:"{days}일 전"}}},notices:{languageChanged:"언어가 {language}(으)로 변경되었습니다.",releaseAvailable:{message:"TaskNotes {version} 릴리스를 사용할 수 있습니다.",action:"커뮤니티 플러그인에서 열기"},exportTasksFailed:"ICS 파일로 작업 내보내기 실패",icsNoteCreatedSuccess:"노트가 성공적으로 생성되었습니다",icsCreationModalOpenFailed:"생성 모달 열기 실패",icsNoteLinkSuccess:'노트 "{fileName}"이(가) ICS 이벤트에 연결되었습니다',icsTaskCreatedSuccess:"작업 생성됨: {title}",icsRelatedItemsRefreshed:"관련 노트가 새로고침되었습니다",icsFileNotFound:"파일을 찾을 수 없거나 잘못되었습니다",icsFileOpenFailed:"파일 열기 실패",timeblockAttachmentExists:'"{fileName}"이(가) 이미 첨부되어 있습니다',timeblockAttachmentAdded:'"{fileName}"이(가) 첨부 파일로 추가되었습니다',timeblockAttachmentRemoved:'"{fileName}"이(가) 첨부 파일에서 제거되었습니다',timeblockFileTypeNotSupported:'"{fileName}"을(를) 열 수 없습니다 - 지원되지 않는 파일 형식',timeblockTitleRequired:"타임블록 제목을 입력하세요",timeblockUpdatedSuccess:'타임블록 "{title}"이(가) 성공적으로 업데이트되었습니다',timeblockUpdateFailed:"타임블록 업데이트 실패. 자세한 내용은 콘솔을 확인하세요.",timeblockDeletedSuccess:'타임블록 "{title}"이(가) 성공적으로 삭제되었습니다',timeblockDeleteFailed:"타임블록 삭제 실패. 자세한 내용은 콘솔을 확인하세요.",timeblockRequiredFieldsMissing:"모든 필수 필드를 입력하세요",agendaLoadingFailed:"일정 로딩 중 오류. 새로고침을 시도하세요.",statsLoadingFailed:"프로젝트 세부정보 로딩 중 오류."},commands:{openCalendarView:"미니 캘린더 뷰 열기",openAdvancedCalendarView:"캘린더 뷰 열기",openTasksView:"작업 뷰 열기",openNotesView:"노트 뷰 열기",openAgendaView:"일정 뷰 열기",openPomodoroView:"뽀모도로 타이머 열기",openKanbanView:"칸반 보드 열기",updateDefaultBaseFiles:"기본 Base 파일 업데이트",openPomodoroStats:"뽀모도로 통계 열기",openStatisticsView:"작업 및 프로젝트 통계 열기",createNewTask:"새 작업 만들기",convertCurrentNoteToTask:{name:"현재 노트를 작업으로 변환",noActiveFile:"변환할 활성 파일이 없습니다",alreadyTask:"이 노트는 이미 작업입니다",success:"'{title}'을(를) 작업으로 변환했습니다"},convertToTaskNote:"체크박스 작업을 TaskNote로 변환",convertAllTasksInNote:"노트의 모든 작업 변환",insertTaskNoteLink:"TaskNote 링크 삽입",createInlineTask:"새 인라인 작업 만들기",quickActionsCurrentTask:"현재 작업의 빠른 작업",goToTodayNote:"오늘의 노트로 이동",startPomodoro:"뽀모도로 타이머 시작",stopPomodoro:"뽀모도로 타이머 중지",pauseResumePomodoro:"뽀모도로 타이머 일시 정지/재개",refreshCache:"캐시 새로고침",exportAllTasksIcs:"모든 작업을 ICS 파일로 내보내기",viewReleaseNotes:"릴리스 노트 보기",startTimeTrackingCurrentTask:"현재 작업의 시간 추적 시작",stopTimeTrackingCurrentTask:"현재 작업의 시간 추적 중지",startTimeTrackingWithSelector:"시간 추적 시작 (작업 선택)",editTimeEntries:"시간 기록 편집 (작업 선택)",createOrOpenTask:"작업 만들기 또는 열기",createOrOpenTaskWithTracking:"작업을 만들거나 열고 시간 추적 시작",rolloverOverdueScheduledTasks:"기한이 지난 예약 작업을 오늘로 연기",syncAllTasksGoogleCalendar:"모든 작업을 Google 캘린더에 동기화",syncCurrentTaskGoogleCalendar:"현재 작업을 Google 캘린더에 동기화",quickActionsTaskUnderCursor:"커서 아래 작업의 빠른 작업",editCurrentTask:"현재 작업 편집",cycleCurrentTaskStatus:"현재 작업 상태 순환",cycleCurrentTaskPriority:"현재 작업 우선순위 순환",addProjectToCurrentTask:"현재 작업에 프로젝트 추가",addSubtaskToCurrentNote:"현재 노트에 하위 작업 추가"},modals:{deviceCode:{title:"Google 캘린더 인증",instructions:{intro:"Google 캘린더에 연결하려면 다음 단계를 따르세요:"},steps:{open:"열기",inBrowser:"(브라우저에서)",enterCode:"메시지가 표시되면 이 코드를 입력하세요:",signIn:"Google 계정으로 로그인하고 액세스 권한을 부여하세요",returnToObsidian:"Obsidian으로 돌아가세요 (이 창은 자동으로 닫힙니다)"},codeLabel:"코드:",copyCodeAriaLabel:"코드 복사",waitingForAuthorization:"인증 대기 중...",openBrowserButton:"브라우저 열기",cancelButton:"취소",expiresMinutesSeconds:"코드 만료: {minutes}분 {seconds}초",expiresSeconds:"코드 만료: {seconds}초"},icsEventInfo:{calendarEventHeading:"캘린더 이벤트",titleLabel:"제목",calendarLabel:"캘린더",dateTimeLabel:"날짜 및 시간",locationLabel:"위치",descriptionLabel:"설명",urlLabel:"URL",relatedNotesHeading:"관련 노트 및 작업",noRelatedItems:"이 이벤트에 대한 관련 노트나 작업이 없습니다.",typeTask:"작업",typeNote:"노트",actionsHeading:"작업",createFromEventLabel:"이벤트에서 생성",createFromEventDesc:"이 캘린더 이벤트에서 새 노트나 작업 생성",linkExistingLabel:"기존 항목 연결",linkExistingDesc:"이 캘린더 이벤트에 기존 노트 연결"},timeblockInfo:{editHeading:"타임블록 편집",dateTimeLabel:"날짜 및 시간: ",titleLabel:"제목",titleDesc:"타임블록 제목",titlePlaceholder:"예: 집중 작업 시간",descriptionLabel:"설명",descriptionDesc:"타임블록에 대한 선택적 설명",descriptionPlaceholder:"새 기능에 집중, 방해 금지",colorLabel:"색상",colorDesc:"타임블록의 선택적 색상",colorPlaceholder:"#3b82f6",attachmentsLabel:"첨부 파일",attachmentsDesc:"이 타임블록에 연결된 파일 또는 노트",addAttachmentButton:"첨부 파일 추가",addAttachmentTooltip:"퍼지 검색을 사용하여 파일 또는 노트 선택",deleteButton:"타임블록 삭제",saveButton:"변경 사항 저장",deleteConfirmationTitle:"타임블록 삭제"},timeblockCreation:{heading:"타임블록 만들기",dateLabel:"날짜: ",titleLabel:"제목",titleDesc:"타임블록 제목",titlePlaceholder:"예: 집중 작업 시간",startTimeLabel:"시작 시간",startTimeDesc:"타임블록 시작 시간",startTimePlaceholder:"09:00",endTimeLabel:"종료 시간",endTimeDesc:"타임블록 종료 시간",endTimePlaceholder:"11:00",descriptionLabel:"설명",descriptionDesc:"타임블록에 대한 선택적 설명",descriptionPlaceholder:"새 기능에 집중, 방해 금지",colorLabel:"색상",colorDesc:"타임블록의 선택적 색상",colorPlaceholder:"#3b82f6",attachmentsLabel:"첨부 파일",attachmentsDesc:"이 타임블록에 연결할 파일 또는 노트",addAttachmentButton:"첨부 파일 추가",addAttachmentTooltip:"퍼지 검색을 사용하여 파일 또는 노트 선택",createButton:"타임블록 만들기"},calendarEventCreation:{heading:"캘린더 이벤트 만들기",dateTimeLabel:"날짜 및 시간: ",titleLabel:"제목",titleDesc:"캘린더 이벤트 제목",titlePlaceholder:"예: 팀 회의",calendarLabel:"캘린더",calendarDesc:"이벤트를 만들 캘린더",descriptionLabel:"설명",descriptionDesc:"이벤트에 대한 선택적 설명",descriptionPlaceholder:"이벤트에 대한 세부정보 추가...",locationLabel:"위치",locationDesc:"이벤트의 선택적 위치",locationPlaceholder:"예: 회의실 A",createButton:"이벤트 만들기",titleRequired:"이벤트 제목은 필수입니다",noCalendarSelected:"캘린더가 선택되지 않았습니다",success:'캘린더 이벤트 "{title}" 생성됨',error:"캘린더 이벤트 생성 실패: {message}"},icsNoteCreation:{heading:"ICS 이벤트에서 생성",titleLabel:"제목",titleDesc:"새 콘텐츠의 제목",folderLabel:"폴더",folderDesc:"대상 폴더 (보관소 루트를 사용하려면 비워두세요)",folderPlaceholder:"폴더/하위폴더",createButton:"생성",startLabel:"시작: ",endLabel:"종료: ",locationLabel:"위치: ",calendarLabel:"캘린더: ",useTemplateLabel:"템플릿 사용",useTemplateDesc:"콘텐츠 생성 시 템플릿 적용",templatePathLabel:"템플릿 경로",templatePathDesc:"템플릿 파일 경로",templatePathPlaceholder:"템플릿/ICS 노트 템플릿.md"},unscheduledTasksSelector:{title:"예정되지 않은 작업",placeholder:"예정되지 않은 작업을 검색하세요...",instructions:{navigate:"탐색",schedule:"예정",dismiss:"닫기"}},migration:{title:"새 반복 시스템으로 마이그레이션",description:"TaskNotes는 이제 반복에 대해 업계 표준 RRULE 패턴을 사용합니다. 이를 통해 더 복잡한 일정과 다른 앱과의 호환성이 향상됩니다.",tasksFound:"이전 반복 패턴을 가진 {count}개의 작업이 감지되었습니다",noMigrationNeeded:"마이그레이션이 필요한 작업이 없습니다",warnings:{title:"진행하기 전에:",backup:"마이그레이션 전에 보관소를 백업하세요",conversion:"이전 반복 패턴이 새 형식으로 변환됩니다",normalUsage:"마이그레이션 중에도 TaskNotes를 정상적으로 사용할 수 있습니다",permanent:"이 변경은 영구적이며 자동으로 실행 취소할 수 없습니다"},benefits:{title:"새 시스템의 이점:",powerfulPatterns:"복잡한 반복 패턴 (예: '매월 두 번째 화요일')",performance:"반복 작업에 대한 더 나은 성능",compatibility:"다른 앱과 호환되는 표준 반복 형식",nlp:"향상된 자연어 처리 지원"},progress:{title:"마이그레이션 진행 상황",preparing:"마이그레이션 준비 중...",completed:"마이그레이션이 성공적으로 완료되었습니다",failed:"마이그레이션 실패"},buttons:{migrate:"마이그레이션 시작",completed:"닫기"},errors:{title:"마이그레이션 중 오류:"},notices:{completedWithErrors:"일부 오류와 함께 마이그레이션이 완료되었습니다. 위의 오류 목록을 확인하세요.",success:"모든 작업이 성공적으로 마이그레이션되었습니다!",failed:"마이그레이션 실패. 자세한 내용은 콘솔을 확인하세요."},prompt:{message:"TaskNotes에서 이전 반복 형식을 사용하는 작업을 감지했습니다. 지금 새 시스템으로 마이그레이션하시겠습니까?",migrateNow:"지금 마이그레이션",remindLater:"나중에 알림"}},task:{titlePlaceholder:"무엇을 해야 하나요?",titleLabel:"제목",titleDetailedPlaceholder:"작업 제목...",detailsLabel:"세부정보",detailsPlaceholder:"세부정보 추가...",projectsLabel:"프로젝트",projectsAdd:"프로젝트 추가",projectsTooltip:"퍼지 검색을 사용하여 프로젝트 노트 선택",projectsRemoveTooltip:"프로젝트 제거",contextsLabel:"컨텍스트",contextsPlaceholder:"컨텍스트1, 컨텍스트2",tagsLabel:"태그",tagsPlaceholder:"태그1, 태그2",timeEstimateLabel:"시간 예상 (분)",timeEstimatePlaceholder:"30",unsavedChanges:{title:"저장되지 않은 변경 사항",message:"저장되지 않은 변경 사항이 있습니다. 저장하시겠습니까?",save:"변경 사항 저장",discard:"변경 사항 버리기",cancel:"계속 편집"},dependencies:{blockedBy:"차단 원인",blocking:"차단 중",placeholder:"[[작업 노트]]",addTaskButton:"작업 추가",selectTaskTooltip:"퍼지 검색을 사용하여 작업 노트 선택",removeTaskTooltip:"작업 제거"},organization:{projects:"프로젝트",subtasks:"하위 작업",addToProject:"프로젝트에 추가",addToProjectButton:"프로젝트에 추가",addSubtasks:"하위 작업 추가",addSubtasksButton:"하위 작업 추가",addSubtasksTooltip:"이 작업의 하위 작업으로 만들 작업 선택",removeSubtaskTooltip:"하위 작업 제거",notices:{noEligibleSubtasks:"하위 작업으로 지정할 수 있는 작업이 없습니다",subtaskSelectFailed:"하위 작업 선택기 열기 실패"}},customFieldsLabel:"사용자 지정 필드",actions:{due:"마감일 설정",scheduled:"예정일 설정",status:"상태 설정",priority:"우선순위 설정",recurrence:"반복 설정",reminders:"리마인더 설정"},buttons:{openNote:"노트 열기",save:"저장"},tooltips:{dueValue:"마감: {value}",scheduledValue:"예정: {value}",statusValue:"상태: {value}",priorityValue:"우선순위: {value}",recurrenceValue:"반복: {value}",remindersSingle:"1개의 리마인더 설정됨",remindersPlural:"{count}개의 리마인더 설정됨"},dateMenu:{dueTitle:"마감일 설정",scheduledTitle:"예정일 설정"},userFields:{textPlaceholder:"{field} 입력...",numberPlaceholder:"0",datePlaceholder:"YYYY-MM-DD",listPlaceholder:"항목1, 항목2, 항목3",pickDate:"{field} 날짜 선택"},recurrence:{daily:"매일",weekly:"매주",everyTwoWeeks:"2주마다",weekdays:"평일",weeklyOn:"{days}마다",monthly:"매월",everyThreeMonths:"3개월마다",monthlyOnOrdinal:"매월 {ordinal}",monthlyByWeekday:"매월 (요일 기준)",yearly:"매년",yearlyOn:"매년 {month} {day}",custom:"사용자 지정",countSuffix:"{count}회",untilSuffix:"{date}까지",ordinal:"{number}{suffix}"}},taskSelector:{title:"작업 선택",placeholder:"작업을 검색하세요...",instructions:{navigate:"탐색",select:"선택",dismiss:"취소"},notices:{noteNotFound:'"{name}" 노트를 찾을 수 없습니다'},dueDate:{overdue:"마감: {date} (지연됨)",today:"마감: 오늘"}},taskSelectorWithCreate:{title:"작업 만들기 또는 열기",placeholder:"작업을 검색하거나 새로 만들려면 입력하세요...",instructions:{create:"새 작업 만들기"},footer:{createLabel:" 만들기: "},notices:{emptyQuery:"작업 설명을 입력하세요",invalidTitle:"유효한 작업 제목을 파싱할 수 없습니다"}},taskCreation:{title:"작업 만들기",actions:{fillFromNaturalLanguage:"자연어에서 양식 채우기",hideDetailedOptions:"상세 옵션 숨기기",showDetailedOptions:"상세 옵션 보기"},nlPlaceholder:"내일 오후 3시에 장보기 @home #심부름",notices:{titleRequired:"작업 제목을 입력하세요",success:'작업 "{title}"이(가) 성공적으로 생성되었습니다',successShortened:'작업 "{title}"이(가) 성공적으로 생성되었습니다 (길이로 인해 파일명이 단축됨)',failure:"작업 생성 실패: {message}",blockingUnresolved:"해결할 수 없음: {entries}",openCreatedTaskFailure:"작업은 생성되었지만 작업 노트를 열 수 없습니다."}},taskEdit:{title:"작업 편집",sections:{completions:"완료",taskInfo:"작업 정보"},metadata:{totalTrackedTime:"총 기록 시간:",due:"마감:",scheduled:"예정:",created:"생성:",modified:"수정:",file:"파일:"},buttons:{archive:"보관",unarchive:"보관 해제"},notices:{titleRequired:"작업 제목을 입력하세요",noChanges:"저장할 변경 사항이 없습니다",updateSuccess:'작업 "{title}"이(가) 성공적으로 업데이트되었습니다',updateFailure:"작업 업데이트 실패: {message}",dependenciesUpdateSuccess:"종속성이 업데이트되었습니다",blockingUnresolved:"해결할 수 없음: {entries}",fileMissing:"작업 파일을 찾을 수 없습니다: {path}",openNoteFailure:"작업 노트 열기 실패",archiveSuccess:"작업이 성공적으로 {action}되었습니다",archiveFailure:"작업 보관 실패",deleteSuccess:'작업 "{title}"이 삭제되었습니다',deleteFailure:"작업 삭제 실패: {message}"},archiveAction:{archived:"보관됨",unarchived:"보관 해제됨"},deleteConfirmation:{title:"작업 삭제",message:'"{title}"을 삭제하시겠습니까? 작업 노트가 Obsidian 휴지통으로 이동됩니다.',confirm:"작업 삭제"}},storageLocation:{title:{migrate:"뽀모도로 데이터를 마이그레이션하시겠습니까?",switch:"데일리 노트 저장소로 전환하시겠습니까?"},message:{migrate:"이 작업은 기존 뽀모도로 세션 데이터를 데일리 노트 프론트매터로 마이그레이션합니다. 데이터는 날짜별로 그룹화되어 각 데일리 노트에 저장됩니다.",switch:"뽀모도로 세션 데이터가 플러그인 데이터 파일 대신 데일리 노트 프론트매터에 저장됩니다."},whatThisMeans:"이것이 의미하는 것:",bullets:{dailyNotesRequired:"데일리 노트는 코어 데일리 노트 플러그인이나 Periodic Notes에서 활성화되어 있어야 합니다",storedInNotes:"데이터가 데일리 노트 프론트매터에 저장됩니다",migrateData:"기존 플러그인 데이터가 마이그레이션된 후 지워집니다",futureSessions:"향후 세션은 데일리 노트에 저장됩니다",dataLongevity:"노트와 함께 더 나은 데이터 수명을 제공합니다"},finalNote:{migrate:"⚠️ 필요한 경우 백업이 있는지 확인하세요. 이 변경은 자동으로 실행 취소할 수 없습니다.",switch:"향후 언제든지 플러그인 저장소로 다시 전환할 수 있습니다."},buttons:{migrate:"데이터 마이그레이션",switch:"저장소 전환"}},dueDate:{title:"마감일 설정",taskLabel:"작업: {title}",sections:{dateTime:"마감일 및 시간",quickOptions:"빠른 옵션"},descriptions:{dateTime:"이 작업을 완료해야 하는 시간 설정"},inputs:{date:{ariaLabel:"작업 마감일",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"작업 마감 시간 (선택사항)",placeholder:"HH:MM"}},quickOptions:{today:"오늘",todayAriaLabel:"마감일을 오늘로 설정",tomorrow:"내일",tomorrowAriaLabel:"마감일을 내일로 설정",nextWeek:"다음 주",nextWeekAriaLabel:"마감일을 다음 주로 설정",now:"지금",nowAriaLabel:"마감일과 시간을 지금으로 설정",clear:"지우기",clearAriaLabel:"마감일 지우기"},errors:{invalidDateTime:"유효한 날짜 및 시간 형식을 입력하세요",updateFailed:"마감일 업데이트 실패. 다시 시도하세요."}},scheduledDate:{title:"예정일 설정",taskLabel:"작업: {title}",sections:{dateTime:"예정일 및 시간",quickOptions:"빠른 옵션"},descriptions:{dateTime:"이 작업을 수행할 시간 설정"},inputs:{date:{ariaLabel:"작업 예정일",placeholder:"YYYY-MM-DD"},time:{ariaLabel:"작업 예정 시간 (선택사항)",placeholder:"HH:MM"}},quickOptions:{today:"오늘",todayAriaLabel:"예정일을 오늘로 설정",tomorrow:"내일",tomorrowAriaLabel:"예정일을 내일로 설정",nextWeek:"다음 주",nextWeekAriaLabel:"예정일을 다음 주로 설정",now:"지금",nowAriaLabel:"예정일과 시간을 지금으로 설정",clear:"지우기",clearAriaLabel:"예정일 지우기"},errors:{invalidDateTime:"유효한 날짜 및 시간 형식을 입력하세요",updateFailed:"예정일 업데이트 실패. 다시 시도하세요."}},timeEntryEditor:{title:"시간 기록 - {taskTitle}",addEntry:"시간 기록 추가",noEntries:"아직 시간 기록이 없습니다",deleteEntry:"기록 삭제",startTime:"시작 시간",endTime:"종료 시간 (진행 중이면 비워두세요)",duration:"기간 (분)",durationDesc:"계산된 기간 재정의",durationPlaceholder:"기간을 분 단위로 입력",description:"설명",descriptionPlaceholder:"무엇을 작업했나요?",calculatedDuration:"계산됨: {minutes}분",totalTime:"총 {hours}시간 {minutes}분",totalMinutes:"총 {minutes}분",saved:"시간 기록이 저장되었습니다",saveFailed:"시간 기록 저장 실패",openFailed:"시간 기록 편집기 열기 실패",noTasksWithEntries:"편집할 시간 기록이 있는 작업이 없습니다",validation:{missingStartTime:"시작 시간이 필요합니다",endBeforeStart:"종료 시간은 시작 시간 이후여야 합니다"}},timeTracking:{noTasksAvailable:"시간을 추적할 수 있는 작업이 없습니다",started:"{taskTitle}에 대한 시간 추적이 시작되었습니다",startFailed:"시간 추적 시작 실패"},timeEntry:{mustHaveSpecificTime:"시간 기록에는 특정 시간이 필요합니다. 주간 또는 일간 뷰에서 시간 범위를 선택하세요.",noTasksAvailable:"시간 기록을 생성할 수 있는 작업이 없습니다",created:"{taskTitle}에 대한 시간 기록이 생성되었습니다 ({duration}분)",createFailed:"시간 기록 생성 실패"}},contextMenus:{task:{status:"상태",statusSelected:"✓ {label}",priority:"우선순위",prioritySelected:"✓ {label}",dueDate:"마감일",scheduledDate:"예정일",customDates:"사용자 지정 날짜",reminders:"리마인더",remindBeforeDue:"마감 전 알림...",remindBeforeScheduled:"예정 전 알림...",manageReminders:"모든 리마인더 관리...",clearReminders:"모든 리마인더 지우기",startTimeTracking:"시간 추적 시작",stopTimeTracking:"시간 추적 중지",editTimeEntries:"시간 기록 편집",archive:"보관",unarchive:"보관 해제",openNote:"노트 열기",openNoteInNewTab:"새 탭에서 노트 열기",copyTitle:"작업 제목 복사",quickActions:"빠른 작업",noteActions:"노트 작업",rename:"이름 변경",renameTitle:"파일 이름 변경",renamePlaceholder:"새 이름 입력",delete:"삭제",deleteTitle:"파일 삭제",deleteMessage:'"{name}"을(를) 삭제하시겠습니까?',deleteConfirm:"삭제",copyPath:"경로 복사",copyUrl:"Obsidian URL 복사",showInExplorer:"파일 탐색기에서 보기",addToCalendar:"캘린더에 추가",calendar:{google:"Google 캘린더",outlook:"Outlook 캘린더",yahoo:"Yahoo 캘린더",downloadIcs:".ics 파일 다운로드",syncToGoogle:"Google 캘린더에 동기화",syncToGoogleNotConfigured:"Google 캘린더 동기화가 구성되지 않았습니다",syncToGoogleSuccess:"작업이 Google 캘린더에 동기화되었습니다",syncToGoogleFailed:"Google 캘린더 동기화 실패"},recurrence:"반복",clearRecurrence:"반복 지우기",customRecurrence:"사용자 지정 반복...",createSubtask:"하위 작업 만들기",dependencies:{title:"종속성",addBlockedBy:'"차단 원인" 추가...',addBlockedByTitle:"이 작업이 종속하는 작업 추가",addBlocking:'"차단 중" 추가...',addBlockingTitle:"이 작업이 차단하는 작업 추가",removeBlockedBy:"차단 원인 제거...",removeBlocking:"차단 중 제거...",unknownDependency:"알 수 없음",inputPlaceholder:"[[작업 노트]]",notices:{noEntries:"최소 하나의 작업을 입력하세요",blockedByAdded:"{count}개의 종속성이 추가되었습니다",blockedByRemoved:"종속성이 제거되었습니다",blockingAdded:"{count}개의 종속 작업이 추가되었습니다",blockingRemoved:"종속 작업이 제거되었습니다",unresolved:"해결할 수 없음: {entries}",noEligibleTasks:"일치하는 작업이 없습니다",updateFailed:"종속성 업데이트 실패"}},organization:{title:"조직",projects:"프로젝트",addToProject:"프로젝트에 추가...",subtasks:"하위 작업",addSubtasks:"하위 작업 추가...",notices:{alreadyInProject:"작업이 이미 이 프로젝트에 있습니다",alreadySubtask:"작업이 이미 이 작업의 하위 작업입니다",addedToProject:"프로젝트에 추가됨: {project}",addedAsSubtask:"{subtask}이(가) {parent}의 하위 작업으로 추가되었습니다",addToProjectFailed:"프로젝트에 작업 추가 실패",addAsSubtaskFailed:"하위 작업으로 작업 추가 실패",projectSelectFailed:"프로젝트 선택기 열기 실패",subtaskSelectFailed:"하위 작업 선택기 열기 실패",noEligibleSubtasks:"하위 작업으로 지정할 수 있는 작업이 없습니다",currentTaskNotFound:"현재 작업 파일을 찾을 수 없습니다",updateContextsFailed:"컨텍스트 업데이트 실패"},contexts:"컨텍스트",addContext:"컨텍스트 추가…",contextPlaceholder:"컨텍스트",contextSelected:"✓ {context}",clearContexts:"컨텍스트 지우기"},subtasks:{loading:"하위 작업 로딩 중...",noSubtasks:"하위 작업을 찾을 수 없습니다",loadFailed:"하위 작업 로드 실패"},markComplete:"이 날짜에 완료로 표시",markIncomplete:"이 날짜에 미완료로 표시",skipInstance:"인스턴스 건너뛰기",unskipInstance:"인스턴스 건너뛰기 취소",completion:{submenu:"완료로 표시 또는 건너뛰기",submenuCompleteOnly:"완료로 표시",completeToday:"오늘 완료",completeAsScheduled:"예정일에 완료",completeOnDue:"마감일에 완료",completeOnPicked:"선택한 날짜에 완료 (날짜 선택)",markIncomplete:"미완료로 표시",noScheduledDate:"이 작업에 예정일이 없습니다",noDueDate:"이 작업에 마감일이 없습니다",noPickedDate:"선택한 날짜가 없습니다",noCompletedStatus:"완료 상태가 설정되어 있지 않습니다",pickDateTitle:"완료 날짜 선택",completeFailure:"작업 완료 상태를 업데이트하지 못했습니다: {message}",clearInstancesConfirmTitle:"기록된 인스턴스를 지울까요?",clearInstancesConfirmMessage:"일정을 변경하면 새 날짜 당일 또는 이후에 완료되거나 건너뛴 것으로 기록된 다음 인스턴스가 지워집니다: {dates}. 더 이상 완료 또는 건너뛰기로 표시되지 않습니다. 계속할까요?",clearInstancesConfirmButton:"일정 변경 및 지우기"},quickReminders:{atTime:"이벤트 시간에",fiveMinutes:"5분 전",fifteenMinutes:"15분 전",oneHour:"1시간 전",oneDay:"1일 전"},notices:{toggleCompletionFailure:"반복 작업 완료 토글 실패: {message}",toggleSkipFailure:"반복 작업 건너뛰기 토글 실패: {message}",updateDueDateFailure:"작업 마감일 업데이트 실패: {message}",updateScheduledFailure:"작업 예정일 업데이트 실패: {message}",updateCustomDateFailure:"{field} 업데이트 실패: {message}",updateRemindersFailure:"리마인더 업데이트 실패",clearRemindersFailure:"리마인더 지우기 실패",addReminderFailure:"리마인더 추가 실패",archiveFailure:"작업 보관 토글 실패: {message}",copyTitleSuccess:"작업 제목이 클립보드에 복사되었습니다",copyFailure:"클립보드에 복사 실패",renameSuccess:'"{name}"(으)로 이름이 변경되었습니다',renameFailure:"파일 이름 변경 실패",copyPathSuccess:"파일 경로가 클립보드에 복사되었습니다",copyUrlSuccess:"Obsidian URL이 클립보드에 복사되었습니다",updateRecurrenceFailure:"작업 반복 업데이트 실패: {message}",updateTagsFailed:"태그 업데이트 실패"},tags:"태그",addTag:"태그 추가…",removeTag:"{tag} 제거",removeTagInput:"태그 제거…",tagPlaceholder:"태그 또는 #태그",clearTags:"태그 지우기"},priority:{clearPriority:"우선순위 지우기"},ics:{showDetails:"세부정보 보기",createTask:"이벤트에서 작업 만들기",createNote:"이벤트에서 노트 만들기",linkNote:"기존 노트 연결",copyTitle:"제목 복사",copyLocation:"위치 복사",copyUrl:"URL 복사",copyMarkdown:"마크다운으로 복사",subscriptionUnknown:"알 수 없는 캘린더",notices:{copyTitleSuccess:"이벤트 제목이 클립보드에 복사되었습니다",copyLocationSuccess:"위치가 클립보드에 복사되었습니다",copyUrlSuccess:"이벤트 URL이 클립보드에 복사되었습니다",copyMarkdownSuccess:"이벤트 세부정보가 마크다운으로 복사되었습니다",copyFailure:"클립보드에 복사 실패",taskCreated:"작업 생성됨: {title}",taskCreateFailure:"이벤트에서 작업 생성 실패",noteCreated:"노트가 성공적으로 생성되었습니다",creationFailure:"생성 모달 열기 실패",linkSuccess:'노트 "{name}"이(가) 이벤트에 연결되었습니다',linkFailure:"노트 연결 실패",linkSelectionFailure:"노트 선택 열기 실패"},markdown:{titleFallback:"제목 없는 이벤트",calendar:"**캘린더:** {value}",date:"**날짜 및 시간:** {value}",location:"**위치:** {value}",descriptionHeading:"### 설명",url:"**URL:** {value}",at:" {time}"}},date:{increment:{plusOneDay:"+1일",minusOneDay:"-1일",plusOneWeek:"+1주",minusOneWeek:"-1주"},basic:{today:"오늘",tomorrow:"내일",thisWeekend:"이번 주말",nextWeek:"다음 주",nextMonth:"다음 달"},weekdaysLabel:"평일",selected:"✓ {label}",pickDateTime:"날짜 및 시간 선택...",clearDate:"날짜 지우기",modal:{title:"날짜 및 시간 설정",dateLabel:"날짜",timeLabel:"시간 (선택사항)",select:"선택"}}},services:{pomodoro:{notices:{alreadyRunning:"뽀모도로가 이미 실행 중입니다",resumeCurrentSession:"새 세션을 시작하는 대신 현재 세션을 재개하세요",timerAlreadyRunning:"타이머가 이미 실행 중입니다",resumeSessionInstead:"새 세션을 시작하는 대신 현재 세션을 재개하세요",shortBreakStarted:"짧은 휴식이 시작되었습니다",longBreakStarted:"긴 휴식이 시작되었습니다",paused:"뽀모도로 일시 정지됨",resumed:"뽀모도로 재개됨",stoppedAndReset:"뽀모도로가 중지되고 초기화되었습니다",migrationSuccess:"{count}개의 뽀모도로 세션이 데일리 노트로 마이그레이션되었습니다.",migrationFailure:"뽀모도로 데이터 마이그레이션 실패. 다시 시도하거나 콘솔에서 자세한 내용을 확인하세요."}},icsSubscription:{notices:{calendarNotFound:'캘린더 "{name}"을(를) 찾을 수 없습니다 (404). ICS URL이 올바르고 캘린더가 공개적으로 접근 가능한지 확인하세요.',calendarAccessDenied:'캘린더 "{name}" 액세스가 거부되었습니다 (500). Microsoft Outlook 서버 제한 때문일 수 있습니다. 캘린더 설정에서 ICS URL을 다시 생성해 보세요.',fetchRemoteFailed:'원격 캘린더 "{name}" 가져오기 실패: {error}',readLocalFailed:'로컬 캘린더 "{name}" 읽기 실패: {error}'}},calendarExport:{notices:{generateLinkFailed:"캘린더 링크 생성 실패",noTasksToExport:"내보낼 작업을 찾을 수 없습니다",downloadSuccess:"{count}개의 작업이 포함된 {filename}이(가) 다운로드되었습니다",downloadFailed:"캘린더 파일 다운로드 실패",singleDownloadSuccess:"{filename}이(가) 다운로드되었습니다"}},filter:{groupLabels:{noProject:"프로젝트 없음",noTags:"태그 없음",invalidDate:"잘못된 날짜",due:{overdue:"지연됨",today:"오늘",tomorrow:"내일",nextSevenDays:"다음 7일",later:"나중에",none:"마감일 없음"},scheduled:{past:"과거 예정",today:"오늘",tomorrow:"내일",nextSevenDays:"다음 7일",later:"나중에",none:"예정일 없음"}},errors:{noDatesProvided:"날짜가 제공되지 않았습니다"},folders:{root:"(루트)"}},instantTaskConvert:{notices:{noCheckboxTasks:"현재 노트에서 체크박스 작업을 찾을 수 없습니다.",convertingTasks:"{count}개의 작업을 변환 중...",conversionSuccess:"✅ {count}개의 작업이 TaskNotes로 성공적으로 변환되었습니다!",partialConversion:"{successCount}개의 작업이 변환되었습니다. {failureCount}개 실패.",batchConversionFailed:"일괄 변환 수행 실패. 다시 시도하세요.",invalidParameters:"잘못된 입력 매개변수.",emptyLine:"현재 줄이 비어 있거나 유효한 콘텐츠가 없습니다.",parseError:"작업 파싱 오류: {error}",invalidTaskData:"잘못된 작업 데이터.",replaceLineFailed:"작업 줄 교체 실패.",conversionComplete:"작업 변환됨: {title}",conversionCompleteShortened:'작업 변환됨: "{title}" (길이로 인해 파일명이 단축됨)',fileExists:"이 이름의 파일이 이미 존재합니다. 다시 시도하거나 작업 이름을 변경하세요.",conversionFailed:"작업 변환 실패. 다시 시도하세요."}},icsNote:{notices:{templateNotFound:"템플릿을 찾을 수 없습니다: {path}",templateProcessError:"템플릿 처리 중 오류: {template}",linkedToEvent:"노트가 ICS 이벤트에 연결되었습니다: {title}"}},task:{notices:{templateNotFound:"작업 본문 템플릿을 찾을 수 없습니다: {path}",templateReadError:"작업 본문 템플릿 읽기 오류: {template}",occurrenceTemplateNotFound:"발생 노트 템플릿을 찾을 수 없습니다: {path}",occurrenceTemplateReadError:"발생 노트 템플릿 읽기 오류: {template}",moveTaskFailed:"{operation} 작업 이동 실패: {error}"}},autoExport:{notices:{exportFailed:"TaskNotes 자동 내보내기 실패: {error}"}}},ui:{icsCard:{untitledEvent:"제목 없는 이벤트",allDay:"종일",calendarEvent:"캘린더 이벤트",calendarFallback:"캘린더"},noteCard:{createdLabel:"생성:",dailyBadge:"데일리",dailyTooltip:"데일리 노트"},taskCard:{labels:{due:"마감일",scheduled:"예정일",recurrence:"반복",completed:"완료",created:"생성일",modified:"수정일",blocked:"차단됨",blocking:"차단 중"},blockedBadge:"차단됨",blockedBadgeTooltip:"이 작업은 다른 작업을 기다리고 있습니다",blockingBadge:"차단 중",blockingBadgeTooltip:"이 작업이 다른 작업을 차단하고 있습니다",blockingToggle:"{count}개의 작업을 차단 중",priorityAriaLabel:"우선순위: {label}",taskOptions:"작업 옵션",recurrenceTooltip:"{label}: {value}",reminderTooltipOne:"알림 1개 설정됨 (관리하려면 클릭)",reminderTooltipMany:"{count}개 알림 설정됨 (관리하려면 클릭)",projectTooltip:"이 작업은 프로젝트로 사용됩니다 (클릭하여 하위 작업 표시/숨기기)",projectIndicatorTooltip:"이 작업은 프로젝트로 사용됩니다",expandSubtasks:"하위 작업 펼치기",collapseSubtasks:"하위 작업 접기",dueToday:"{label}: 오늘",dueTodayAt:"{label}: 오늘 {time}",dueOverdue:"{label}: {display} (기한 지남)",dueLabel:"{label}: {display}",scheduledToday:"{label}: 오늘",scheduledTodayAt:"{label}: 오늘 {time}",scheduledPast:"{label}: {display} (지난)",scheduledLabel:"{label}: {display}",loadingDependencies:"종속성 로딩 중...",blockingEmpty:"종속 작업 없음",blockingLoadError:"종속성 로드 실패",googleCalendarSyncTooltip:"Google 캘린더에 동기화됨",detailsTooltip:"작업에 세부 정보가 있습니다"},propertyEventCard:{unknownFile:"알 수 없는 파일"},filterHeading:{allViewName:"모두"},filterBar:{saveView:"뷰 저장",saveViewNamePlaceholder:"뷰 이름 입력...",saveButton:"저장",views:"뷰",savedFilterViews:"저장된 필터 뷰",filters:"필터",properties:"속성",sort:"정렬",newTask:"새로 만들기",expandAllGroups:"모든 그룹 펼치기",collapseAllGroups:"모든 그룹 접기",searchTasksPlaceholder:"작업 검색...",searchTasksTooltip:"작업 제목 검색",filterUnavailable:"필터 바를 일시적으로 사용할 수 없습니다",toggleFilter:"필터 토글",activeFiltersTooltip:"활성 필터 – 수정하려면 클릭, 지우려면 우클릭",configureVisibleProperties:"표시 속성 설정",sortAndGroupOptions:"정렬 및 그룹 옵션",sortMenuHeader:"정렬",orderMenuHeader:"순서",groupMenuHeader:"그룹",createNewTask:"새 작업 만들기",filter:"필터",displayOrganization:"표시 및 조직",viewOptions:"뷰 옵션",addFilter:"필터 추가",addFilterGroup:"필터 그룹 추가",addFilterTooltip:"새 필터 조건 추가",addFilterGroupTooltip:"중첩된 필터 그룹 추가",clearAllFilters:"모든 필터 및 그룹 지우기",saveCurrentFilter:"현재 필터를 뷰로 저장",closeFilterModal:"필터 모달 닫기",deleteFilterGroup:"필터 그룹 삭제",deleteCondition:"조건 삭제",all:"모두",any:"일부",followingAreTrue:"다음 조건이 참:",where:"조건",selectProperty:"선택...",chooseProperty:"필터링할 작업 속성 선택",chooseOperator:"속성 값 비교 방법 선택",enterValue:"필터링할 값 입력",selectValue:"필터링할 {property} 선택",sortBy:"정렬 기준:",toggleSortDirection:"정렬 방향 토글",chooseSortMethod:"작업 정렬 방법 선택",groupBy:"그룹 기준:",chooseGroupMethod:"공통 속성으로 작업 그룹화",toggleViewOption:"{option} 토글",expandCollapseFilters:"필터 조건 펼치기/접기",expandCollapseSort:"정렬 및 그룹 옵션 펼치기/접기",expandCollapseViewOptions:"뷰별 옵션 펼치기/접기",naturalLanguageDates:"자연어 날짜",naturalLanguageExamples:"자연어 날짜 예시 보기",enterNumericValue:"필터링할 숫자 값 입력",enterDateValue:"자연어 또는 ISO 형식으로 날짜 입력",pickDateTime:"날짜 및 시간 선택",noSavedViews:"저장된 뷰 없음",savedViews:"저장된 뷰",yourSavedFilters:"저장된 필터 구성",dragToReorder:"드래그하여 뷰 순서 변경",loadSavedView:"저장된 뷰 로드: {name}",deleteView:"뷰 삭제",deleteViewTitle:"뷰 삭제",deleteViewMessage:'"{name}" 뷰를 삭제하시겠습니까?',manageAllReminders:"모든 리마인더 관리...",clearAllReminders:"모든 리마인더 지우기",customRecurrence:"사용자 지정 반복...",clearRecurrence:"반복 지우기",sortOptions:{dueDate:"마감일",scheduledDate:"예정일",priority:"우선순위",status:"상태",title:"제목",createdDate:"생성일",tags:"태그",ascending:"오름차순",descending:"내림차순"},group:{none:"없음",status:"상태",priority:"우선순위",context:"컨텍스트",project:"프로젝트",dueDate:"마감일",scheduledDate:"예정일",tags:"태그",completedDate:"완료일"},subgroupLabel:"하위 그룹",notices:{propertiesMenuFailed:"속성 메뉴 표시 실패"}}},components:{dateContextMenu:{weekdays:"평일",clearDate:"날짜 지우기",today:"오늘",tomorrow:"내일",thisWeekend:"이번 주말",nextWeek:"다음 주",nextMonth:"다음 달",setDateTime:"날짜 및 시간 설정",dateLabel:"날짜",timeLabel:"시간 (선택사항)"},subgroupMenuBuilder:{none:"없음",status:"상태",priority:"우선순위",context:"컨텍스트",project:"프로젝트",dueDate:"마감일",scheduledDate:"예정일",tags:"태그",completedDate:"완료일",subgroup:"하위 그룹"},propertyVisibilityDropdown:{coreProperties:"핵심 속성",organization:"조직",customProperties:"사용자 지정 속성",failed:"속성 메뉴 표시 실패",properties:{statusDot:"상태 점",priorityDot:"우선순위 점",dueDate:"마감일",scheduledDate:"예정일",timeEstimate:"시간 예상",totalTrackedTime:"총 기록 시간",checklistProgress:"체크리스트 진행률",recurrence:"반복",completedDate:"완료일",createdDate:"생성일",modifiedDate:"수정일",projects:"프로젝트",contexts:"컨텍스트",tags:"태그",blocked:"차단됨",blocking:"차단 중"}},reminderContextMenu:{remindBeforeDue:"마감 전 알림...",remindBeforeScheduled:"예정 전 알림...",manageAllReminders:"모든 리마인더 관리...",clearAllReminders:"모든 리마인더 지우기",quickReminders:{atTime:"이벤트 시간에",fiveMinutesBefore:"5분 전",fifteenMinutesBefore:"15분 전",oneHourBefore:"1시간 전",oneDayBefore:"1일 전"}},recurrenceContextMenu:{daily:"매일",weeklyOn:"{day}마다",everyTwoWeeksOn:"2주마다 {day}",monthlyOnThe:"매월 {ordinal}",everyThreeMonthsOnThe:"3개월마다 {ordinal}",yearlyOn:"매년 {month} {ordinal}",weekdaysOnly:"평일만",dailyAfterCompletion:"매일 (완료 후)",every3DaysAfterCompletion:"3일마다 (완료 후)",weeklyAfterCompletion:"매주 (완료 후)",monthlyAfterCompletion:"매월 (완료 후)",customRecurrence:"사용자 지정 반복...",clearRecurrence:"반복 지우기",customRecurrenceModal:{title:"사용자 지정 반복",startDate:"시작 날짜",startDateDesc:"반복 패턴이 시작되는 날짜",startTime:"시작 시간",startTimeDesc:"반복 인스턴스가 나타나야 하는 시간 (선택사항)",recurFrom:"반복 기준",recurFromDesc:"다음 발생을 언제 계산해야 하나요?",scheduledDate:"예정일",completionDate:"완료일",frequency:"빈도",interval:"간격",intervalDesc:"X일/주/월/년마다",daysOfWeek:"요일",daysOfWeekDesc:"특정 요일 선택 (주간 반복용)",monthlyRecurrence:"월간 반복",monthlyRecurrenceDesc:"매월 반복 방법 선택",yearlyRecurrence:"연간 반복",yearlyRecurrenceDesc:"매년 반복 방법 선택",endCondition:"종료 조건",endConditionDesc:"반복이 끝나야 하는 시점 선택",neverEnds:"끝나지 않음",endAfterOccurrences:"{count}회 후 종료",endOnDate:"{date}에 종료",onDayOfMonth:"매월 {day}일에",onTheWeekOfMonth:"매월 {week} {day}에",onDateOfYear:"매년 {month} {day}에",onTheWeekOfYear:"매년 {month} {week} {day}에",frequencies:{daily:"매일",weekly:"매주",monthly:"매월",yearly:"매년"},weekPositions:{first:"첫째",second:"둘째",third:"셋째",fourth:"넷째",last:"마지막"},weekdays:{monday:"월요일",tuesday:"화요일",wednesday:"수요일",thursday:"목요일",friday:"금요일",saturday:"토요일",sunday:"일요일"},weekdaysShort:{mon:"월",tue:"화",wed:"수",thu:"목",fri:"금",sat:"토",sun:"일"},cancel:"취소",save:"저장"}}}};var _Ve={en:Lue,fr:Oue,ru:zue,zh:Bue,de:jue,es:$ue,ja:Uue,pt:Hue,ko:Vue};function Wue(n){return new VM({resources:_Ve,defaultLocale:"en",fallbackLocale:"en",...n})}q();var que=M({tag:"Services/OAuthSecretStore"}),bv={google:{credentials:"tasknotes-oauth-google-credentials",connection:"tasknotes-oauth-google-connection"},microsoft:{credentials:"tasknotes-oauth-microsoft-credentials",connection:"tasknotes-oauth-microsoft-connection"}};function _C(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Tp(n){return typeof n=="string"?n:void 0}function qM(n,e){var i,s,o,l;if(!_C(n)||n.provider!==e||!_C(n.tokens))return null;let t=n.tokens.accessToken,r=n.tokens.expiresAt;if(typeof t!="string"||t.length===0||typeof r!="number"||!Number.isFinite(r))return null;let a=(i=Tp(n.connectedAt))!=null?i:"";return{provider:e,tokens:{accessToken:t,refreshToken:(s=Tp(n.tokens.refreshToken))!=null?s:"",expiresAt:r,scope:(o=Tp(n.tokens.scope))!=null?o:"",tokenType:(l=Tp(n.tokens.tokenType))!=null?l:"Bearer"},...Tp(n.userEmail)!==void 0&&{userEmail:Tp(n.userEmail)},connectedAt:a,...Tp(n.lastRefreshed)!==void 0&&{lastRefreshed:Tp(n.lastRefreshed)}}}function FVe(n){try{let e=JSON.parse(n);if(!_C(e)||e.version!==1)return{status:"invalid"};if(e.state==="cleared")return{status:"cleared"};if(e.state!=="configured"||!_C(e.credentials))return{status:"invalid"};let t=e.credentials.clientId,r=e.credentials.clientSecret;return typeof t!="string"||r!==void 0&&typeof r!="string"?{status:"invalid"}:{status:"configured",credentials:{clientId:t,...typeof r=="string"&&r.length>0?{clientSecret:r}:{}}}}catch(e){return{status:"invalid"}}}function LVe(n,e){try{let t=JSON.parse(n);if(!_C(t)||t.version!==1)return{status:"invalid"};if(t.state==="cleared")return{status:"cleared"};if(t.state!=="connected")return{status:"invalid"};let r=qM(t.connection,e);return r?{status:"connected",connection:r}:{status:"invalid"}}catch(t){return{status:"invalid"}}}var WM=class{constructor(e){this.secretStorage=e}getCredentialsState(e){let t=bv[e].credentials,r=this.secretStorage.getSecret(t);if(r===null)return{status:"missing"};let a=FVe(r);return a.status==="invalid"&&que.warn("Stored OAuth credentials could not be read",{category:"configuration",operation:"read-oauth-credentials",details:{provider:e}}),a}getCredentials(e){let t=this.getCredentialsState(e);return t.status==="configured"?t.credentials:null}setCredentials(e,t){var a;let r={version:1,state:"configured",credentials:{clientId:t.clientId.trim(),...(a=t.clientSecret)!=null&&a.trim()?{clientSecret:t.clientSecret.trim()}:{}}};this.writeVerified(bv[e].credentials,r)}clearCredentials(e){let t={version:1,state:"cleared"};this.writeVerified(bv[e].credentials,t)}getConnectionState(e){let t=bv[e].connection,r=this.secretStorage.getSecret(t);if(r===null)return{status:"missing"};let a=LVe(r,e);return a.status==="invalid"&&que.warn("Stored OAuth connection could not be read",{category:"configuration",operation:"read-oauth-connection",details:{provider:e}}),a}getConnection(e){let t=this.getConnectionState(e);return t.status==="connected"?t.connection:null}setConnection(e,t){let r=qM(t,e);if(!r)throw new Error(`Cannot store an invalid ${e} OAuth connection`);let a={version:1,state:"connected",connection:r};this.writeVerified(bv[e].connection,a)}clearConnection(e){let t={version:1,state:"cleared"};this.writeVerified(bv[e].connection,t)}writeVerified(e,t){let r=JSON.stringify(t);if(this.secretStorage.setSecret(e,r),this.secretStorage.getSecret(e)!==r)throw new Error(`Obsidian SecretStorage did not persist ${e}`)}};var GM=["google","microsoft"],cU={google:{clientId:"googleOAuthClientId",clientSecret:"googleOAuthClientSecret"},microsoft:{clientId:"microsoftOAuthClientId",clientSecret:"microsoftOAuthClientSecret"}};function lU(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Qf(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function OVe(n,e){let t=cU[e],r=n[t.clientId],a=n[t.clientSecret];if(typeof r!="string"&&typeof a!="string")return null;let i={clientId:typeof r=="string"?r:""};return typeof a=="string"&&a.length>0&&(i.clientSecret=a),i}function dU(n){let e=!1,t={...n};for(let r of GM){let a=cU[r];for(let i of[a.clientId,a.clientSecret])Qf(t,i)&&(delete t[i],e=!0)}if(Qf(t,"oauthConnections")){let r=t.oauthConnections;if(lU(r)){let a={...r};for(let i of GM)Qf(a,i)&&(delete a[i],e=!0);Object.keys(a).length===0?(delete t.oauthConnections,e=!0):e&&(t.oauthConnections=a)}else delete t.oauthConnections,e=!0}return e?t:n}function Gue(n,e){if(n==null)return{data:null,changed:!1};for(let r of GM){let a=cU[r];if(Qf(n,a.clientId)||Qf(n,a.clientSecret)){let s=OVe(n,r),o=e.getCredentialsState(r);s&&(o.status==="missing"||o.status==="invalid")&&e.setCredentials(r,s)}}if(Qf(n,"oauthConnections")){let r=n.oauthConnections;if(r!==null&&!lU(r))throw new Error("Cannot migrate malformed OAuth connection storage");if(lU(r))for(let a of GM){if(!Qf(r,a)||r[a]===null)continue;let i=e.getConnectionState(a);if(i.status==="connected"||i.status==="cleared")continue;let s=qM(r[a],a);if(!s)throw new Error(`Cannot migrate malformed ${a} OAuth connection`);e.setConnection(a,s)}}let t=dU(n);return{data:t,changed:t!==n}}vC();qO();var Vm=require("obsidian");tc();var QT=require("obsidian");tc();Fi();q();ya();var adt=M({tag:"Settings/Tabs/GeneralTab"});function ZT(n,e,t){n.empty();let r=(o,l)=>e.i18n.translate(o,l);kt(n,{heading:r("settings.general.taskStorage.header"),description:r("settings.general.taskStorage.description")},o=>{o.addSetting(l=>void rn(l,{name:r("settings.general.taskStorage.defaultFolder.name"),desc:r("settings.general.taskStorage.defaultFolder.description"),placeholder:"TaskNotes",getValue:()=>e.settings.tasksFolder,setValue:async c=>{e.settings.tasksFolder=c,t()},ariaLabel:"Default folder path for new tasks"})),o.addSetting(l=>void rn(l,{name:r("settings.features.instantConvert.folder.name"),desc:r("settings.features.instantConvert.folder.description"),placeholder:"{{currentNotePath}}",getValue:()=>e.settings.inlineTaskConvertFolder,setValue:async c=>{e.settings.inlineTaskConvertFolder=c,t()},ariaLabel:"Folder for inline-created tasks"})),o.addSetting(l=>void me(l,{name:r("settings.general.taskStorage.moveArchived.name"),desc:r("settings.general.taskStorage.moveArchived.description"),getValue:()=>e.settings.moveArchivedTasks,setValue:async c=>{e.settings.moveArchivedTasks=c,t(),ZT(n,e,t)}})),e.settings.moveArchivedTasks&&o.addSetting(l=>void rn(l,{name:r("settings.general.taskStorage.archiveFolder.name"),desc:r("settings.general.taskStorage.archiveFolder.description"),placeholder:"TaskNotes/Archive",getValue:()=>e.settings.archiveFolder,setValue:async c=>{e.settings.archiveFolder=c,t()},ariaLabel:"Archive folder path"}))}),kt(n,{heading:r("settings.general.taskIdentification.header"),description:r("settings.general.taskIdentification.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.general.taskIdentification.identifyBy.name"),desc:r("settings.general.taskIdentification.identifyBy.description"),options:[{value:"tag",label:r("settings.general.taskIdentification.identifyBy.options.tag")},{value:"property",label:r("settings.general.taskIdentification.identifyBy.options.property")}],getValue:()=>e.settings.taskIdentificationMethod,setValue:async c=>{e.settings.taskIdentificationMethod=c,t(),ZT(n,e,t)},ariaLabel:"Task identification method"})),e.settings.taskIdentificationMethod==="tag"?(o.addSetting(l=>void rn(l,{name:r("settings.general.taskIdentification.taskTag.name"),desc:r("settings.general.taskIdentification.taskTag.description"),placeholder:"task",getValue:()=>e.settings.taskTag,setValue:async c=>{e.settings.taskTag=c,t()},ariaLabel:"Task identification tag"})),o.addSetting(l=>void me(l,{name:r("settings.general.taskIdentification.hideIdentifyingTags.name"),desc:r("settings.general.taskIdentification.hideIdentifyingTags.description"),getValue:()=>e.settings.hideIdentifyingTagsInCards,setValue:async c=>{e.settings.hideIdentifyingTagsInCards=c,t(),ZT(n,e,t)}})),e.settings.hideIdentifyingTagsInCards&&o.addSetting(l=>void Ur(l,{name:r("settings.general.taskIdentification.hideIdentifyingTagsMode.name"),desc:r("settings.general.taskIdentification.hideIdentifyingTagsMode.description"),options:[{value:"all",label:r("settings.general.taskIdentification.hideIdentifyingTagsMode.options.all")},{value:"exact-only",label:r("settings.general.taskIdentification.hideIdentifyingTagsMode.options.exactOnly")}],getValue:()=>e.settings.hideIdentifyingTagsMode,setValue:async c=>{e.settings.hideIdentifyingTagsMode=c,t()},ariaLabel:"Hidden identification tag scope"}))):(o.addSetting(l=>void rn(l,{name:r("settings.general.taskIdentification.taskProperty.name"),desc:r("settings.general.taskIdentification.taskProperty.description"),placeholder:"category",getValue:()=>e.settings.taskPropertyName,setValue:async c=>{e.settings.taskPropertyName=c,t()}})),o.addSetting(l=>void rn(l,{name:r("settings.general.taskIdentification.taskPropertyValue.name"),desc:r("settings.general.taskIdentification.taskPropertyValue.description"),placeholder:"task",getValue:()=>e.settings.taskPropertyValue,setValue:async c=>{e.settings.taskPropertyValue=c,t()}})))});let a=[{id:"open-calendar-view",nameKey:"miniCalendar",defaultPath:"TaskNotes/Views/mini-calendar-default.base"},{id:"open-kanban-view",nameKey:"kanban",defaultPath:"TaskNotes/Views/kanban-default.base"},{id:"open-tasks-view",nameKey:"tasks",defaultPath:"TaskNotes/Views/tasks-default.base"},{id:"open-advanced-calendar-view",nameKey:"advancedCalendar",defaultPath:"TaskNotes/Views/calendar-default.base"},{id:"open-agenda-view",nameKey:"agenda",defaultPath:"TaskNotes/Views/agenda-default.base"},{id:"pomodoro-stats-base",nameKey:"pomodoroStats",defaultPath:"TaskNotes/Views/pomodoro-stats.base"},{id:"relationships",nameKey:"relationships",defaultPath:"TaskNotes/Views/relationships.base"}];kt(n,{heading:r("settings.integrations.basesIntegration.viewCommands.header"),description:r("settings.integrations.basesIntegration.viewCommands.description")},o=>{o.addSetting(l=>{l.setDesc(r("settings.integrations.basesIntegration.viewCommands.descriptionRegen")),l.settingEl.addClass("settings-view__group-description")}),o.addSetting(l=>{l.setDesc(r("settings.integrations.basesIntegration.viewCommands.pomodoroDailyNotesHint")),l.settingEl.addClass("settings-view__group-description")}),o.addSetting(l=>{l.descEl.createEl("a",{text:r("settings.integrations.basesIntegration.viewCommands.docsLink"),href:r("settings.integrations.basesIntegration.viewCommands.docsLinkUrl")}).setAttr("target","_blank"),l.settingEl.addClass("settings-view__group-description")}),a.forEach(({id:l,nameKey:c,defaultPath:d})=>{o.addSetting(u=>{let p=r(`settings.integrations.basesIntegration.viewCommands.commands.${c}`);u.setName(p),u.setDesc(r("settings.integrations.basesIntegration.viewCommands.fileLabel",{path:e.settings.commandFileMapping[l]})),u.addText(m=>(m.setPlaceholder(d).setValue(e.settings.commandFileMapping[l]).onChange(f=>{e.settings.commandFileMapping[l]=f,t(),u.setDesc(r("settings.integrations.basesIntegration.viewCommands.fileLabel",{path:f}))}),m.inputEl.classList.remove("tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),m.inputEl.classList.add("tn-static-width-100-0466783d"),m)),u.addButton(m=>(m.setButtonText(r("settings.integrations.basesIntegration.viewCommands.resetButton")).setTooltip(r("settings.integrations.basesIntegration.viewCommands.resetTooltip")).onClick(()=>{e.settings.commandFileMapping[l]=d,t(),e.app.setting.activeTab&&e.app.setting.openTabById(e.app.setting.activeTab.id)}),m))})}),o.addSetting(l=>{l.setName(r("settings.integrations.basesIntegration.autoCreateDefaultFiles.name")).setDesc(r("settings.integrations.basesIntegration.autoCreateDefaultFiles.description")).addToggle(c=>(c.setValue(e.settings.autoCreateDefaultBasesFiles).onChange(d=>{e.settings.autoCreateDefaultBasesFiles=d,t()}),c))}),o.addSetting(l=>{l.setName(r("settings.integrations.basesIntegration.createDefaultFiles.name")).setDesc(r("settings.integrations.basesIntegration.createDefaultFiles.description")).addButton(c=>(c.setButtonText(r("settings.integrations.basesIntegration.createDefaultFiles.buttonText")).setCta().onClick(async()=>{await e.createDefaultBasesFiles()}),c))}),o.addSetting(l=>{l.setName(r("settings.integrations.basesIntegration.updateDefaultFiles.name")).setDesc(r("settings.integrations.basesIntegration.updateDefaultFiles.description")).addButton(c=>(c.setButtonText(r("settings.integrations.basesIntegration.updateDefaultFiles.buttonText")).onClick(async()=>{await ur(e.app,{title:r("settings.integrations.basesIntegration.updateDefaultFiles.confirmTitle"),message:r("settings.integrations.basesIntegration.updateDefaultFiles.confirmMessage"),confirmText:r("settings.integrations.basesIntegration.updateDefaultFiles.confirmText"),isDestructive:!1})&&await e.createDefaultBasesFiles({overwriteExisting:!0})}),c))}),o.addSetting(l=>{l.setName(r("settings.integrations.basesIntegration.exportV3Views.name")).setDesc(r("settings.integrations.basesIntegration.exportV3Views.description")).addButton(c=>(c.setButtonText(r("settings.integrations.basesIntegration.exportV3Views.buttonText")).onClick(async()=>{try{let d=e.viewStateManager.getSavedViews();if(d.length===0){new QT.Notice(r("settings.integrations.basesIntegration.exportV3Views.noViews"));return}let u=e.basesFilterConverter.convertAllSavedViewsToBasesFile(d),p="all-saved-views.base",m=`TaskNotes/Views/${p}`;await e.app.vault.adapter.exists("TaskNotes/Views")||await Bb(e.app,"TaskNotes/Views");let f=e.app.vault.getAbstractFileByPath(m);if(f){if(!(f instanceof QT.TFile))throw new Error(`${m} exists but is not a file`);if(!await ur(e.app,{title:r("settings.integrations.basesIntegration.exportV3Views.fileExists"),message:r("settings.integrations.basesIntegration.exportV3Views.confirmOverwrite",{fileName:p}),isDestructive:!1}))return;await Gs(e.app,f,u)}else await mf(e.app,m,u);new QT.Notice(r("settings.integrations.basesIntegration.exportV3Views.success",{count:d.length.toString(),filePath:m})),await e.app.workspace.openLinkText(m,"",!0)}catch(d){adt.error("Error exporting all views to Bases:",{category:"provider",operation:"exporting-all-views-bases",error:d}),new QT.Notice(r("settings.integrations.basesIntegration.exportV3Views.error",{message:d.message}))}}),c))})}),kt(n,{heading:r("settings.general.folderManagement.header")},o=>{o.addSetting(l=>void rn(l,{name:r("settings.general.folderManagement.excludedFolders.name"),desc:r("settings.general.folderManagement.excludedFolders.description"),placeholder:"Templates, Archive",getValue:()=>e.settings.excludedFolders,setValue:async c=>{e.settings.excludedFolders=c,t()},ariaLabel:"Excluded folder paths"}))});let i=(()=>{let o=[{value:"system",label:r("common.systemDefault")}];for(let l of e.i18n.getAvailableLocales()){let c=e.i18n.getNativeLanguageName(l);o.push({value:l,label:c})}return o})();kt(n,{heading:r("settings.features.uiLanguage.header"),description:r("settings.features.uiLanguage.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.features.uiLanguage.dropdown.name"),desc:r("settings.features.uiLanguage.dropdown.description"),options:i,getValue:()=>{var c;return(c=e.settings.uiLanguage)!=null?c:"system"},setValue:async c=>{e.settings.uiLanguage=c,e.i18n.setLocale(c),t(),ZT(n,e,t)}}))}),e.app.vault.getConfig("useMarkdownLinks")&&kt(n,{heading:r("settings.general.frontmatter.header"),description:r("settings.general.frontmatter.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.general.frontmatter.useMarkdownLinks.name"),desc:r("settings.general.frontmatter.useMarkdownLinks.description"),getValue:()=>e.settings.useFrontmatterMarkdownLinks,setValue:async c=>{e.settings.useFrontmatterMarkdownLinks=c,t()}}))}),kt(n,{heading:r("settings.general.releaseNotes.header"),description:r("settings.general.releaseNotes.description",{version:e.manifest.version})},o=>{o.addSetting(l=>void me(l,{name:r("settings.general.releaseNotes.showOnUpdate.name"),desc:r("settings.general.releaseNotes.showOnUpdate.description"),getValue:()=>{var c;return(c=e.settings.showReleaseNotesOnUpdate)!=null?c:!0},setValue:async c=>{e.settings.showReleaseNotesOnUpdate=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.general.releaseNotes.checkForUpdates.name"),desc:r("settings.general.releaseNotes.checkForUpdates.description"),getValue:()=>{var c;return(c=e.settings.checkForUpdatesOnStartup)!=null?c:!0},setValue:async c=>{e.settings.checkForUpdatesOnStartup=c,t()}})),o.addSetting(l=>{l.setName(r("settings.general.releaseNotes.viewButton.name")).setDesc(r("settings.general.releaseNotes.viewButton.description")).addButton(c=>c.setButtonText(r("settings.general.releaseNotes.viewButton.buttonText")).setCta().onClick(async()=>{await e.activateReleaseNotesView()}))})})}tc();va();var VRe=require("obsidian");va();var E8=require("obsidian");va();function idt(n,e,t){var a;let r=n.settings.nlpTriggers.triggers.find(i=>i.propertyId===e);return{propertyId:e,enabled:(a=r==null?void 0:r.enabled)!=null?a:e!=="priority",trigger:(r==null?void 0:r.trigger)||t}}function HRe(n,e,t,r,a){var s,o;let i=n.settings.nlpTriggers.triggers.findIndex(l=>l.propertyId===e);i!==-1?(t.enabled!==void 0&&(n.settings.nlpTriggers.triggers[i].enabled=t.enabled),t.trigger!==void 0&&(n.settings.nlpTriggers.triggers[i].trigger=t.trigger)):n.settings.nlpTriggers.triggers.push({propertyId:e,trigger:(s=t.trigger)!=null?s:r,enabled:(o=t.enabled)!=null?o:!0}),a()}function jo(n,e,t,r,a,i){let s=idt(n,e,t),o=nn(s.enabled,d=>{HRe(n,e,{enabled:d},t,r),i&&i()}),l=[{label:a("settings.taskProperties.propertyCard.nlpTrigger"),input:o}],c=Ge("text",t,s.trigger);return c.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419"),c.classList.add("tn-static-width-80px-8573bae3"),c.addEventListener("change",()=>{let d=c.value;if(d.trim().length===0){new E8.Notice(a("settings.taskProperties.propertyCard.triggerEmpty"));return}if(d.length>10){new E8.Notice(a("settings.taskProperties.propertyCard.triggerTooLong"));return}HRe(n,e,{trigger:d},t,r)}),l.push({label:a("settings.taskProperties.propertyCard.triggerChar"),input:c}),l}function Ci(n){let e=activeWindow.createEl("p");return e.className="setting-item-description",e.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),e.classList.add("tn-static-margin-top-0-d462248a"),e.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-20px-49f14f8f","tn-static-margin-bottom-8px-fdf33f23"),e.classList.add("tn-static-margin-bottom-0-75rem-c05a3c6e"),e.textContent=n,e}function Ig(n,e,t,r,a){let i=Ge("text",a.propertyId,e.settings.fieldMapping[a.propertyId]);i.addEventListener("change",()=>{e.settings.fieldMapping[a.propertyId]=i.value,t()});let o=[{label:"",input:Ci(a.description||""),fullWidth:!0},{label:r("settings.taskProperties.propertyCard.propertyKey"),input:i}];if(a.hasDefault&&a.getDefaultValue&&a.setDefaultValue){let l=a.setDefaultValue,c;a.defaultType==="dropdown"||a.defaultType==="date-preset"?(c=Wn(a.defaultOptions||[],a.getDefaultValue()),c.addEventListener("change",()=>{l(c.value)})):a.defaultType==="number"?(c=hp(0,void 0,1,parseInt(a.getDefaultValue())||0),c.addEventListener("change",()=>{l(c.value)})):(c=Ge("text",a.defaultPlaceholder||"",a.getDefaultValue()),c.addEventListener("change",()=>{l(c.value)})),o.push({label:r("settings.taskProperties.propertyCard.default"),input:c})}if(a.extraRows&&o.push(...a.extraRows),a.hasNLPTrigger&&a.nlpDefaultTrigger){let l=jo(e,a.propertyId,a.nlpDefaultTrigger,t,r);o.push(...l)}sr(n,{id:`property-${a.propertyId}`,collapsible:!0,defaultCollapsed:!0,header:{primaryText:a.displayName,secondaryText:e.settings.fieldMapping[a.propertyId]},content:{sections:[{rows:o}]}})}function xi(n,e,t,r,a,i,s){let o=Ge("text",a,e.settings.fieldMapping[a]);o.addEventListener("change",()=>{e.settings.fieldMapping[a]=o.value,t()});let l=Ci(s||"");sr(n,{id:`property-${a}`,collapsible:!0,defaultCollapsed:!0,header:{primaryText:i,secondaryText:e.settings.fieldMapping[a]},content:{sections:[{rows:[{label:"",input:l,fullWidth:!0},{label:r("settings.taskProperties.propertyCard.propertyKey"),input:o}]}]}})}function D8(n,e,t,r){let a=n.createDiv(),i=!0;function s(){a.empty();let o=Ge("text","title",e.settings.fieldMapping.title);o.addEventListener("change",()=>{e.settings.fieldMapping.title=o.value,t()});let l=nn(e.settings.storeTitleInFilename,p=>{e.settings.storeTitleInFilename=p,t(),s()}),c=activeWindow.createDiv();c.addClass("tasknotes-settings__nested-content"),WRe(c,e,t,r);let u=[{label:"",input:Ci(r("settings.taskProperties.properties.title.description")),fullWidth:!0}];e.settings.storeTitleInFilename||u.push({label:r("settings.taskProperties.propertyCard.propertyKey"),input:o}),u.push({label:r("settings.taskProperties.titleCard.storeTitleInFilename"),input:l},{label:"",input:c,fullWidth:!0}),sr(a,{id:"property-title",collapsible:!0,defaultCollapsed:i,onCollapseChange:p=>{i=p},header:{primaryText:r("settings.taskProperties.properties.title.name"),secondaryText:e.settings.storeTitleInFilename?r("settings.taskProperties.titleCard.storedInFilename"):e.settings.fieldMapping.title},content:{sections:[{rows:u}]}})}s()}function WRe(n,e,t,r){n.empty();let a=n.createDiv("tasknotes-settings__card-config-row");a.createSpan({text:r("settings.taskProperties.titleCard.occurrenceFilenameTemplate"),cls:"tasknotes-settings__card-config-label"});let i=Ge("text","{{title}} — {{occurrenceDate}}",e.settings.occurrenceFilenameTemplate);i.addEventListener("change",()=>{e.settings.occurrenceFilenameTemplate=i.value,t()}),a.appendChild(i),n.createDiv({text:r("settings.taskProperties.titleCard.occurrenceFilenameTemplateHelp"),cls:"setting-item-description"});let s=n.createDiv("tasknotes-settings__card-config-row");s.createSpan({text:r("settings.taskProperties.titleCard.occurrenceFilenameProperty"),cls:"tasknotes-settings__card-config-label"});let o=Ge("text","occurrenceFilenameTemplate",e.settings.occurrenceFilenameTemplateProperty);if(o.addEventListener("change",()=>{e.settings.occurrenceFilenameTemplateProperty=o.value.trim()||"occurrenceFilenameTemplate",t()}),s.appendChild(o),n.createDiv({text:r("settings.taskProperties.titleCard.occurrenceFilenamePropertyHelp"),cls:"setting-item-description"}),e.settings.storeTitleInFilename){n.createDiv({text:r("settings.taskProperties.titleCard.filenameUpdatesWithTitle"),cls:"setting-item-description"});return}let l=n.createDiv("tasknotes-settings__card-config-row");l.createSpan({text:r("settings.taskProperties.titleCard.filenameFormat"),cls:"tasknotes-settings__card-config-label"});let c=Wn([{value:"title",label:r("settings.appearance.taskFilenames.filenameFormat.options.title")},{value:"zettel",label:r("settings.appearance.taskFilenames.filenameFormat.options.zettel")},{value:"timestamp",label:r("settings.appearance.taskFilenames.filenameFormat.options.timestamp")},{value:"uuid",label:r("settings.appearance.taskFilenames.filenameFormat.options.uuid")},{value:"custom",label:r("settings.appearance.taskFilenames.filenameFormat.options.custom")}],e.settings.taskFilenameFormat);if(c.addEventListener("change",()=>{e.settings.taskFilenameFormat=c.value,t(),WRe(n,e,t,r)}),l.appendChild(c),e.settings.taskFilenameFormat==="custom"){let d=n.createDiv("tasknotes-settings__card-config-row");d.createSpan({text:r("settings.taskProperties.titleCard.customTemplate"),cls:"tasknotes-settings__card-config-label"});let u=Ge("text",r("settings.appearance.taskFilenames.customTemplate.placeholder"),e.settings.customFilenameTemplate);u.classList.remove("tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-200px-2acaf3b5","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),u.classList.add("tn-static-width-100-0466783d");let p=n.createDiv(),m=()=>{p.empty();let f=u.value,h=/\{[a-zA-Z]+\}/g,g=/\{\{[a-zA-Z]+\}\}/g,v=f.replace(g,"");if(h.test(v)){let T=p.createDiv({cls:"setting-item-description mod-warning"});T.classList.remove("tn-static-color-var-color-accent-d2cad743","tn-static-color-var-text-accent-65b47ee3","tn-static-color-var-text-muted-5872de20","tn-static-color-var-text-on-accent-f3e1679d","tn-static-color-var-tn-text-muted-a90fb6f3","tn-static-color-white-0a43e56a","tn-static-cursor-pointer-2723efcc","tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-2px-0-edce9b14","tn-static-padding-20px-7a035d95","tn-static-padding-20px-ebe8e48c"),T.classList.add("tn-static-color-var-text-warning-783d5f03"),T.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-f4f01e68"),T.classList.add("tn-static-margin-top-8px-8a77e5a3"),T.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),T.classList.add("tn-static-display-flex-75816cae"),T.classList.remove("tn-static-align-items-baseline-4b95b5c7","tn-static-align-items-center-7c619740"),T.classList.add("tn-static-align-items-flex-start-0486f781"),T.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-10px-f3d7ce77","tn-static-gap-12px-ed7b3d87","tn-static-gap-8px-33fcd4c3"),T.classList.add("tn-static-gap-6px-f0abc1db");let b=T.createSpan();(0,VRe.setIcon)(b,"alert-triangle"),b.classList.add("tn-static-flex-shrink-0-6ee0661e");let w=T.createSpan();w.textContent=r("settings.taskProperties.titleCard.legacySyntaxWarning")}};u.addEventListener("change",()=>{e.settings.customFilenameTemplate=u.value,t(),m()}),u.addEventListener("input",m),d.appendChild(u),n.createDiv({text:r("settings.appearance.taskFilenames.customTemplate.helpText"),cls:"setting-item-description"}),m()}}var qRe=require("obsidian");Fi();va();var _u=require("obsidian"),P8=class extends _u.AbstractInputSuggest{constructor(e,t){super(e,t),this.input=t}getSuggestions(e){let t=(0,_u.getIconIds)(),r=e.toLowerCase().trim();return r?t.filter(a=>a.toLowerCase().includes(r)).map(a=>({id:a,display:a})):["check","circle","clock","star","flag","alert-circle","calendar","bookmark","play","pause","square","x","check-circle","minus-circle","plus-circle","loader"].filter(i=>t.includes(i)).map(i=>({id:i,display:i}))}renderSuggestion(e,t){t.addClass("icon-suggestion-item");let r=t.createSpan("icon-suggestion-preview");(0,_u.setIcon)(r,e.id),t.createSpan({text:e.display,cls:"icon-suggestion-text"})}selectSuggestion(e){this.input.value=e.id,this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.close()}};function GO(n,e,t,r){let a=activeWindow.createDiv();a.addClass("icon-input-container");let i=activeWindow.createSpan();i.addClass("icon-input-preview"),a.appendChild(i);let s=activeWindow.createEl("input");s.type="text",s.addClass("tasknotes-settings__card-input"),s.addClass("icon-input"),s.placeholder=e,t&&(s.value=t,(0,_u.setIcon)(i,t),i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-flex-75816cae")),a.appendChild(s);let o=()=>{let l=s.value.trim();l&&(0,_u.getIconIds)().includes(l)?(i.empty(),(0,_u.setIcon)(i,l),i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-flex-75816cae")):(i.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),i.classList.add("tn-static-display-none-6b99de8b"))};return s.addEventListener("input",()=>{o(),r&&r(s.value)}),new P8(n,s),{container:a,input:s}}function A8(n,e,t,r){let a=Ge("text","status",e.settings.fieldMapping.status),i=e.settings.customStatuses.map(T=>T.value);!i.includes(e.settings.defaultTaskStatus)&&i.length>0&&(e.settings.defaultTaskStatus=i[0],t());let s=Wn(e.settings.customStatuses.map(T=>({value:T.value,label:T.label||T.value})),e.settings.defaultTaskStatus);a.addEventListener("change",()=>{e.settings.fieldMapping.status=a.value,t()}),s.addEventListener("change",()=>{e.settings.defaultTaskStatus=s.value,t()});let o=activeWindow.createDiv();o.addClass("tasknotes-settings__nested-cards");let l=o.createDiv("tasknotes-settings__collapsible-section"),c=l.createDiv("tasknotes-settings__collapsible-section-header");c.createSpan({text:r("settings.taskProperties.statusCard.valuesHeader"),cls:"tasknotes-settings__collapsible-section-title"});let d=c.createSpan("tasknotes-settings__collapsible-section-chevron");(0,qRe.setIcon)(d,"chevron-down");let u=l.createDiv("tasknotes-settings__collapsible-section-content"),p=u.createDiv("tasknotes-settings__help-section");p.createEl("h4",{text:r("settings.taskProperties.taskStatuses.howTheyWork.title")});let m=p.createEl("ul");m.createEl("li",{text:r("settings.taskProperties.taskStatuses.howTheyWork.value")}),m.createEl("li",{text:r("settings.taskProperties.taskStatuses.howTheyWork.label")}),m.createEl("li",{text:r("settings.taskProperties.taskStatuses.howTheyWork.color")}),m.createEl("li",{text:r("settings.taskProperties.taskStatuses.howTheyWork.icon")}),m.createEl("li",{text:r("settings.taskProperties.taskStatuses.howTheyWork.completed")}),m.createEl("li",{text:r("settings.taskProperties.taskStatuses.howTheyWork.autoArchive")}),p.createEl("p",{text:r("settings.taskProperties.taskStatuses.howTheyWork.orderNote"),cls:"setting-item-description"});let f=u.createDiv("tasknotes-statuses-container");PP(f,e,t,r,()=>{s.empty(),e.settings.customStatuses.forEach(T=>{let b=s.createEl("option",{value:T.value,text:T.label||T.value});T.value===e.settings.defaultTaskStatus&&(b.selected=!0)})});let h=u.createEl("button",{text:r("settings.taskProperties.taskStatuses.addNew.buttonText"),cls:"tn-btn tn-btn--ghost"});h.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),h.classList.add("tn-static-margin-top-0-5rem-3dc98b5e"),h.onclick=()=>{let b={id:`status_${Date.now()}`,value:"",label:"",color:"#6366f1",completed:!1,isCompleted:!1,excludeFromCycle:!1,order:e.settings.customStatuses.length,autoArchive:!1,autoArchiveDelay:5};e.settings.customStatuses.push(b),t(),PP(f,e,t,r,()=>{s.empty(),e.settings.customStatuses.forEach(w=>{let S=s.createEl("option",{value:w.value,text:w.label||w.value});w.value===e.settings.defaultTaskStatus&&(S.selected=!0)})})},c.addEventListener("click",()=>{l.toggleClass("tasknotes-settings__collapsible-section--collapsed",!l.hasClass("tasknotes-settings__collapsible-section--collapsed"))});let g=jo(e,"status","*",t,r),k=[{label:"",input:Ci(r("settings.taskProperties.properties.status.description")),fullWidth:!0},{label:r("settings.taskProperties.propertyCard.propertyKey"),input:a},{label:r("settings.taskProperties.propertyCard.default"),input:s},...g,{label:"",input:o,fullWidth:!0}];sr(n,{id:"property-status",collapsible:!0,defaultCollapsed:!0,header:{primaryText:r("settings.taskProperties.properties.status.name"),secondaryText:e.settings.fieldMapping.status},content:{sections:[{rows:k}]}})}function PP(n,e,t,r,a){if(n.empty(),!e.settings.customStatuses||e.settings.customStatuses.length===0){rc(n,r("settings.taskProperties.taskStatuses.emptyState"));return}let i=[...e.settings.customStatuses].sort((s,o)=>s.order-o.order);i.forEach(s=>{let o=s.value,l=Ge("text",r("settings.taskProperties.taskStatuses.placeholders.value"),s.value),c=Ge("text",r("settings.taskProperties.taskStatuses.placeholders.label"),s.label),d=sv(s.color),{container:u,input:p}=GO(e.app,r("settings.taskProperties.taskStatuses.placeholders.icon"),s.icon||""),m=nn(s.isCompleted||!1,C=>{s.isCompleted=C;let x=T==null?void 0:T.querySelector(".tasknotes-settings__card-meta");x&&(x.empty(),s.isCompleted&&x.appendChild(pi(r("settings.taskProperties.taskStatuses.badges.completed"),"completed"))),t()}),f=nn(s.excludeFromCycle||!1,C=>{s.excludeFromCycle=C,t()}),h=Wn([{value:"",label:r("settings.taskProperties.taskStatuses.placeholders.nextStatusDefault")},...i.filter(C=>C.id!==s.id).map(C=>({value:C.value,label:C.label||C.value}))],s.nextStatus===s.value?"":s.nextStatus||""),g=nn(s.autoArchive||!1,C=>{s.autoArchive=C,t(),b()}),v=hp(1,1440,1,s.autoArchiveDelay||5),k=s.isCompleted?[pi(r("settings.taskProperties.taskStatuses.badges.completed"),"completed")]:[],T,b=()=>{let C=v.closest(".tasknotes-settings__card-config-row");C&&(C.style.display=s.autoArchive?"flex":"none")},w=()=>{(async()=>{let C=r("settings.taskProperties.taskStatuses.deleteConfirm",{label:s.label||s.value});if(!await ur(e.app,{title:r("common.confirm"),message:C,confirmText:r("common.confirm"),cancelText:r("common.cancel"),isDestructive:!0}))return;let E=e.settings.customStatuses.findIndex(_=>_.id===s.id);if(E!==-1){let _=e.settings.defaultTaskStatus===s.value,F=e.settings.customStatuses[E].value;e.settings.customStatuses.splice(E,1),e.settings.customStatuses.forEach((I,A)=>{I.order=A,I.nextStatus===F&&delete I.nextStatus}),_&&e.settings.customStatuses.length>0&&(e.settings.defaultTaskStatus=e.settings.customStatuses[0].value),t(),PP(n,e,t,r,a),a&&a()}})()},S={id:s.id,draggable:!0,collapsible:!0,defaultCollapsed:!0,colorIndicator:{color:s.color,cssVar:"--status-color"},header:{primaryText:s.value||"untitled",secondaryText:s.label||"No label",meta:k,actions:[ol(w)]},content:{sections:[{rows:[{label:r("settings.taskProperties.taskStatuses.fields.value"),input:l},{label:r("settings.taskProperties.taskStatuses.fields.label"),input:c},{label:r("settings.taskProperties.taskStatuses.fields.color"),input:d},{label:r("settings.taskProperties.taskStatuses.fields.icon"),input:u},{label:r("settings.taskProperties.taskStatuses.fields.completed"),input:m},{label:r("settings.taskProperties.taskStatuses.fields.excludeFromCycle"),input:f},{label:r("settings.taskProperties.taskStatuses.fields.nextStatus"),input:h},{label:r("settings.taskProperties.taskStatuses.fields.autoArchive"),input:g},{label:r("settings.taskProperties.taskStatuses.fields.delayMinutes"),input:v}]}]}};T=sr(n,S),b(),l.addEventListener("input",()=>{s.value=l.value,T.querySelector(".tasknotes-settings__card-primary-text").textContent=s.value||"untitled",t(),a&&a()}),l.addEventListener("change",()=>{o!==s.value&&(e.settings.customStatuses.forEach(C=>{C.nextStatus===o&&(C.nextStatus=C.id===s.id||!s.value?void 0:s.value)}),o=s.value,t(),PP(n,e,t,r,a))}),c.addEventListener("input",()=>{s.label=c.value,T.querySelector(".tasknotes-settings__card-secondary-text").textContent=s.label||"No label",t(),a&&a()}),d.addEventListener("change",()=>{s.color=ov(d,s.color||"#6366f1");let C=T.querySelector(".tasknotes-settings__card-color-indicator");C&&(C.style.backgroundColor=s.color),t()}),p.addEventListener("change",()=>{s.icon=p.value.trim()||void 0,t()}),h.addEventListener("change",()=>{s.nextStatus=h.value&&h.value!==s.value?h.value:void 0,t()}),v.addEventListener("change",()=>{let C=parseInt(v.value);!isNaN(C)&&C>=1&&C<=1440&&(s.autoArchiveDelay=C,t())}),lv(T,n,(C,x,E)=>{let _=e.settings.customStatuses.findIndex(O=>O.id===C),F=e.settings.customStatuses.findIndex(O=>O.id===x);if(_===-1||F===-1)return;let I=[...e.settings.customStatuses],[A]=I.splice(_,1),R=F;_<F&&(R=F-1),E||R++,I.splice(R,0,A),I.forEach((O,U)=>{O.order=U}),e.settings.customStatuses=I,t(),PP(n,e,t,r,a)})})}var KO=require("obsidian");va();function M8(n,e,t,r){let a=Ge("text","priority",e.settings.fieldMapping.priority),i=e.settings.customPriorities.map(T=>T.value);e.settings.defaultTaskPriority!==""&&!i.includes(e.settings.defaultTaskPriority)&&(e.settings.defaultTaskPriority=i.length>0?i[0]:"",t());let s=Wn([{value:"",label:r("settings.defaults.options.noDefault")},...e.settings.customPriorities.map(T=>({value:T.value,label:T.label||T.value}))],e.settings.defaultTaskPriority);a.addEventListener("change",()=>{e.settings.fieldMapping.priority=a.value,t()}),s.addEventListener("change",()=>{e.settings.defaultTaskPriority=s.value,t()});let o=activeWindow.createDiv();o.addClass("tasknotes-settings__nested-cards");let l=o.createDiv("tasknotes-settings__collapsible-section"),c=l.createDiv("tasknotes-settings__collapsible-section-header");c.createSpan({text:r("settings.taskProperties.priorityCard.valuesHeader"),cls:"tasknotes-settings__collapsible-section-title"});let d=c.createSpan("tasknotes-settings__collapsible-section-chevron");(0,KO.setIcon)(d,"chevron-down");let u=l.createDiv("tasknotes-settings__collapsible-section-content"),p=u.createDiv("tasknotes-settings__help-section");p.createEl("h4",{text:r("settings.taskProperties.taskPriorities.howTheyWork.title")});let m=p.createEl("ul");m.createEl("li",{text:r("settings.taskProperties.taskPriorities.howTheyWork.value")}),m.createEl("li",{text:r("settings.taskProperties.taskPriorities.howTheyWork.label")}),m.createEl("li",{text:r("settings.taskProperties.taskPriorities.howTheyWork.color")}),m.createEl("li",{text:r("settings.taskProperties.taskPriorities.howTheyWork.icon")});let f=u.createDiv("tasknotes-priorities-container");YO(f,e,t,r,()=>{s.empty();let T=s.createEl("option",{value:"",text:r("settings.defaults.options.noDefault")});e.settings.defaultTaskPriority===""&&(T.selected=!0),e.settings.customPriorities.forEach(b=>{let w=s.createEl("option",{value:b.value,text:b.label||b.value});b.value===e.settings.defaultTaskPriority&&(w.selected=!0)})});let h=u.createEl("button",{text:r("settings.taskProperties.taskPriorities.addNew.buttonText"),cls:"tn-btn tn-btn--ghost"});h.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),h.classList.add("tn-static-margin-top-0-5rem-3dc98b5e"),h.onclick=()=>{let T=`priority_${Date.now()}`,b=e.settings.customPriorities.reduce((S,C)=>Math.max(S,C.weight),-1),w={id:T,value:"",label:"",color:"#6366f1",weight:b+1};e.settings.customPriorities.push(w),t(),YO(f,e,t,r,()=>{s.empty();let S=s.createEl("option",{value:"",text:r("settings.defaults.options.noDefault")});e.settings.defaultTaskPriority===""&&(S.selected=!0),e.settings.customPriorities.forEach(C=>{let x=s.createEl("option",{value:C.value,text:C.label||C.value});C.value===e.settings.defaultTaskPriority&&(x.selected=!0)})})},c.addEventListener("click",()=>{l.toggleClass("tasknotes-settings__collapsible-section--collapsed",!l.hasClass("tasknotes-settings__collapsible-section--collapsed"))});let g=jo(e,"priority","!",t,r),k=[{label:"",input:Ci(r("settings.taskProperties.properties.priority.description")),fullWidth:!0},{label:r("settings.taskProperties.propertyCard.propertyKey"),input:a},{label:r("settings.taskProperties.propertyCard.default"),input:s},...g,{label:"",input:o,fullWidth:!0}];sr(n,{id:"property-priority",collapsible:!0,defaultCollapsed:!0,header:{primaryText:r("settings.taskProperties.properties.priority.name"),secondaryText:e.settings.fieldMapping.priority},content:{sections:[{rows:k}]}})}function YO(n,e,t,r,a){if(n.empty(),!e.settings.customPriorities||e.settings.customPriorities.length===0){rc(n,r("settings.taskProperties.taskPriorities.emptyState"));return}[...e.settings.customPriorities].sort((s,o)=>s.weight-o.weight).forEach(s=>{let o=Ge("text",r("settings.taskProperties.taskPriorities.placeholders.value"),s.value),l=Ge("text",r("settings.taskProperties.taskPriorities.placeholders.label"),s.label),c=sv(s.color),{container:d,input:u}=GO(e.app,r("settings.taskProperties.taskPriorities.placeholders.icon"),s.icon||""),p=sr(n,{id:s.id,draggable:!0,collapsible:!0,defaultCollapsed:!0,colorIndicator:{color:s.color},header:{primaryText:s.label||s.value||"untitled",actions:[ol(()=>{if(e.settings.customPriorities.length<=1){new KO.Notice(r("settings.taskProperties.taskPriorities.deleteConfirm"));return}let m=e.settings.customPriorities.findIndex(f=>f.id===s.id);if(m!==-1){let f=e.settings.defaultTaskPriority===s.value;e.settings.customPriorities.splice(m,1),e.settings.customPriorities.sort((h,g)=>h.weight-g.weight).forEach((h,g)=>{h.weight=g}),f&&(e.settings.defaultTaskPriority=e.settings.customPriorities.length>0?e.settings.customPriorities[0].value:""),t(),YO(n,e,t,r,a),a&&a()}},r("settings.taskProperties.taskPriorities.deleteTooltip"))]},content:{sections:[{rows:[{label:r("settings.taskProperties.taskPriorities.fields.value"),input:o},{label:r("settings.taskProperties.taskPriorities.fields.label"),input:l},{label:r("settings.taskProperties.taskPriorities.fields.color"),input:c},{label:r("settings.taskProperties.taskPriorities.fields.icon"),input:d}]}]}});o.addEventListener("input",()=>{s.value=o.value,t(),a&&a()}),l.addEventListener("input",()=>{s.label=l.value,p.querySelector(".tasknotes-settings__card-primary-text").textContent=s.label||s.value||"untitled",t(),a&&a()}),c.addEventListener("change",()=>{s.color=ov(c,s.color||"#6366f1");let m=p.querySelector(".tasknotes-settings__card-color-indicator");m&&(m.style.backgroundColor=s.color),t()}),u.addEventListener("change",()=>{s.icon=u.value.trim()||void 0,t()}),lv(p,n,(m,f,h)=>{let g=e.settings.customPriorities.findIndex(C=>C.id===m),v=e.settings.customPriorities.findIndex(C=>C.id===f);if(g===-1||v===-1)return;let k=[...e.settings.customPriorities].sort((C,x)=>C.weight-x.weight),T=k.findIndex(C=>C.id===m),b=k.findIndex(C=>C.id===f),[w]=k.splice(T,1),S=b;T<b&&(S=b-1),h||S++,k.splice(S,0,w),k.forEach((C,x)=>{C.weight=x}),e.settings.customPriorities=k,t(),YO(n,e,t,r,a)})})}var AP=require("obsidian");va();va();function ZO(n,e,t,r){var u,p;let a=e||{requiredTags:[],includeFolders:[],propertyKey:"",propertyValue:""},i=m=>{a={...a,...m},t(a)},s=Ge("text",r("settings.appearance.projectAutosuggest.requiredTags.placeholder"),((u=a.requiredTags)==null?void 0:u.join(", "))||"");s.addEventListener("change",()=>{let m=s.value.split(",").map(f=>f.trim()).filter(Boolean);i({requiredTags:m})});let o=Ge("text",r("settings.appearance.projectAutosuggest.includeFolders.placeholder"),((p=a.includeFolders)==null?void 0:p.join(", "))||"");o.addEventListener("change",()=>{let m=o.value.split(",").map(f=>f.trim()).filter(Boolean);i({includeFolders:m})});let l=Ge("text",r("settings.appearance.projectAutosuggest.requiredPropertyKey.placeholder"),a.propertyKey||"");l.addEventListener("change",()=>{i({propertyKey:l.value.trim()})});let c=Ge("text",r("settings.appearance.projectAutosuggest.requiredPropertyValue.placeholder"),a.propertyValue||"");c.addEventListener("change",()=>{i({propertyValue:c.value.trim()})});let d=(m,f)=>{let h=n.createDiv("tasknotes-settings__card-config-row"),g=h.createSpan("tasknotes-settings__card-config-label");g.textContent=m,h.appendChild(f)};d(r("settings.appearance.projectAutosuggest.requiredTags.name"),s),d(r("settings.appearance.projectAutosuggest.includeFolders.name"),o),d(r("settings.appearance.projectAutosuggest.requiredPropertyKey.name"),l),d(r("settings.appearance.projectAutosuggest.requiredPropertyValue.name"),c)}py();Ku();function N8(n,e,t,r){let a=n.createDiv(),i=!0;function s(){a.empty();let o=Ge("text","projects",e.settings.fieldMapping.projects);o.addEventListener("change",()=>{e.settings.fieldMapping.projects=o.value,t()});let l=activeWindow.createDiv();l.addClass("tasknotes-settings__nested-content");let c=[],d=l.createDiv("default-projects-container");e.settings.taskCreationDefaults.defaultProjects&&ms(e.settings.taskCreationDefaults.defaultProjects).map(C=>C.replace(/\[\[|\]\]/g,"").trim()).filter(C=>C).forEach(C=>{let x=e.app.vault.getAbstractFileByPath(C+".md")||e.app.vault.getAbstractFileByPath(C);x&&c.push(x)});let p=d.createDiv().createEl("button",{text:r("settings.defaults.basicDefaults.defaultProjects.selectButton"),cls:"tn-btn tn-btn--ghost"});p.onclick=()=>{new Ys(e.app,e,C=>{if(!c.includes(C)){c.push(C);let x=c.map(E=>`[[${E.path.replace(/\.md$/,"")}]]`).join(", ");e.settings.taskCreationDefaults.defaultProjects=x,t(),I8(m,e,t,c,r)}}).open()};let m=d.createDiv("default-projects-list-container");I8(m,e,t,c,r);let f=nn(e.settings.taskCreationDefaults.useParentNoteForTaskCreation,S=>{e.settings.taskCreationDefaults.useParentNoteForTaskCreation=S,t()}),h=nn(e.settings.taskCreationDefaults.useParentNoteAsProject,S=>{e.settings.taskCreationDefaults.useParentNoteAsProject=S,t()}),g=nn(e.settings.taskCreationDefaults.useParentHeaderAsProject,S=>{e.settings.taskCreationDefaults.useParentHeaderAsProject=S,t()}),v=nn(e.settings.taskCreationDefaults.inheritParentTaskProperties,S=>{e.settings.taskCreationDefaults.inheritParentTaskProperties=S,t()}),k=jo(e,"projects","+",t,r),T=Ci(r("settings.taskProperties.properties.projects.description")),b=activeWindow.createDiv();b.addClass("tasknotes-settings__nested-content"),sdt(b,e,t,r,s);let w=[{label:"",input:T,fullWidth:!0},{label:r("settings.taskProperties.propertyCard.propertyKey"),input:o},{label:r("settings.taskProperties.projectsCard.defaultProjects"),input:l,fullWidth:!0},{label:r("settings.taskProperties.projectsCard.useParentNoteForTaskCreation"),input:f},{label:r("settings.taskProperties.projectsCard.useParentNoteForInlineTasks"),input:h},{label:r("settings.taskProperties.projectsCard.useParentHeader"),input:g},{label:r("settings.taskProperties.projectsCard.inheritParentTaskProperties"),input:v},...k,{label:"",input:b,fullWidth:!0}];sr(a,{id:"property-projects",collapsible:!0,defaultCollapsed:i,onCollapseChange:S=>{i=S},header:{primaryText:r("settings.taskProperties.properties.projects.name"),secondaryText:e.settings.fieldMapping.projects},content:{sections:[{rows:w}]}})}s()}function sdt(n,e,t,r,a){n.empty(),e.settings.projectAutosuggest||(e.settings.projectAutosuggest={enableFuzzy:!1,rows:[],showAdvanced:!1,requiredTags:[],includeFolders:[],propertyKey:"",propertyValue:""});let i=()=>{let O=e.settings.projectAutosuggest;return O?O.requiredTags&&O.requiredTags.length>0||O.includeFolders&&O.includeFolders.length>0||O.propertyKey&&O.propertyKey.trim()!=="":!1},s=e.settings.projectAutosuggest;if(!s)return;let o=n.createDiv("tasknotes-settings__collapsible-section");o.addClass("tasknotes-settings__collapsible-section--collapsed");let l=o.createDiv("tasknotes-settings__collapsible-section-header"),c=l.createDiv("tasknotes-settings__collapsible-section-header-left");c.createSpan({text:r("settings.taskProperties.projectsCard.autosuggestFilters"),cls:"tasknotes-settings__collapsible-section-title"});let d=c.createSpan("tasknotes-settings__filter-badge"),u=()=>{if(i()){d.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),d.classList.add("tn-static-display-inline-flex-f984c520"),d.empty();let O=d.createSpan();(0,AP.setIcon)(O,"filter"),d.createSpan({text:r("settings.taskProperties.projectsCard.filtersOn")})}else d.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),d.classList.add("tn-static-display-none-6b99de8b"),d.empty()};u();let p=l.createSpan("tasknotes-settings__collapsible-section-chevron");(0,AP.setIcon)(p,"chevron-down");let m=o.createDiv("tasknotes-settings__collapsible-section-content");ZO(m,{requiredTags:s.requiredTags,includeFolders:s.includeFolders,propertyKey:s.propertyKey,propertyValue:s.propertyValue},O=>{s.requiredTags=O.requiredTags,s.includeFolders=O.includeFolders,s.propertyKey=O.propertyKey,s.propertyValue=O.propertyValue,u(),t()},r),l.addEventListener("click",()=>{o.toggleClass("tasknotes-settings__collapsible-section--collapsed",!o.hasClass("tasknotes-settings__collapsible-section--collapsed"))});let f=n.createDiv("tasknotes-settings__collapsible-section");f.addClass("tasknotes-settings__collapsible-section--collapsed");let h=f.createDiv("tasknotes-settings__collapsible-section-header");h.createDiv("tasknotes-settings__collapsible-section-header-left").createSpan({text:r("settings.taskProperties.projectsCard.customizeDisplay"),cls:"tasknotes-settings__collapsible-section-title"});let v=h.createSpan("tasknotes-settings__collapsible-section-chevron");(0,AP.setIcon)(v,"chevron-down");let k=f.createDiv("tasknotes-settings__collapsible-section-content"),T=k.createDiv("tasknotes-settings__card-config-row");T.createSpan({text:r("settings.appearance.projectAutosuggest.enableFuzzyMatching.name"),cls:"tasknotes-settings__card-config-label"});let b=nn(s.enableFuzzy,O=>{s.enableFuzzy=O,t()});T.appendChild(b),k.createDiv({text:r("settings.appearance.projectAutosuggest.displayRowsHelp"),cls:"setting-item-description"});let w=()=>{var O,U;return((U=(O=e.settings.projectAutosuggest)==null?void 0:O.rows)!=null?U:[]).slice(0,3)},S=(O,U)=>{var X;if(!e.settings.projectAutosuggest)return;let oe=[...(X=e.settings.projectAutosuggest.rows)!=null?X:[]];oe[O]=U,e.settings.projectAutosuggest.rows=oe.slice(0,3),t()},C=k.createDiv("tasknotes-settings__card-config-row");C.createSpan({text:r("settings.appearance.projectAutosuggest.displayRows.row1.name"),cls:"tasknotes-settings__card-config-label"});let x=Ge("text",r("settings.appearance.projectAutosuggest.displayRows.row1.placeholder"),w()[0]||"");x.addEventListener("change",()=>S(0,x.value)),C.appendChild(x);let E=k.createDiv("tasknotes-settings__card-config-row");E.createSpan({text:r("settings.appearance.projectAutosuggest.displayRows.row2.name"),cls:"tasknotes-settings__card-config-label"});let _=Ge("text",r("settings.appearance.projectAutosuggest.displayRows.row2.placeholder"),w()[1]||"");_.addEventListener("change",()=>S(1,_.value)),E.appendChild(_);let F=k.createDiv("tasknotes-settings__card-config-row");F.createSpan({text:r("settings.appearance.projectAutosuggest.displayRows.row3.name"),cls:"tasknotes-settings__card-config-label"});let I=Ge("text",r("settings.appearance.projectAutosuggest.displayRows.row3.placeholder"),w()[2]||"");I.addEventListener("change",()=>S(2,I.value)),F.appendChild(I);let A=k.createDiv("tasknotes-settings__help-section");A.createEl("h4",{text:r("settings.appearance.projectAutosuggest.quickReference.header")});let R=A.createEl("ul");R.createEl("li",{text:r("settings.appearance.projectAutosuggest.quickReference.properties")}),R.createEl("li",{text:r("settings.appearance.projectAutosuggest.quickReference.labels")}),R.createEl("li",{text:r("settings.appearance.projectAutosuggest.quickReference.searchable")}),R.createEl("li",{text:r("settings.appearance.projectAutosuggest.quickReference.staticText")}),A.createEl("p",{text:r("settings.appearance.projectAutosuggest.quickReference.alwaysSearchable"),cls:"settings-help-note"}),h.addEventListener("click",()=>{f.toggleClass("tasknotes-settings__collapsible-section--collapsed",!f.hasClass("tasknotes-settings__collapsible-section--collapsed"))})}function I8(n,e,t,r,a){if(n.empty(),r.length===0){n.createDiv({text:a("settings.taskProperties.projectsCard.noDefaultProjects"),cls:"setting-item-description"});return}r.forEach(i=>{let s=n.createDiv("tasknotes-settings__project-item");s.createSpan({text:i.name.replace(/\.md$/,"")});let o=s.createEl("button",{cls:"tasknotes-settings__card-header-btn tasknotes-settings__card-header-btn--delete"});(0,AP.setIcon)(o,"x"),o.title=a("settings.defaults.basicDefaults.defaultProjects.removeTooltip",{name:i.name}),o.onclick=()=>{let l=r.indexOf(i);if(l>-1){r.splice(l,1);let c=r.map(d=>`[[${d.path.replace(/\.md$/,"")}]]`).join(", ");e.settings.taskCreationDefaults.defaultProjects=c,t(),I8(n,e,t,r,a)}}})}va();function R8(n,e,t,r){let a=Ge("text",r("settings.defaults.basicDefaults.defaultTags.placeholder"),e.settings.taskCreationDefaults.defaultTags);a.addEventListener("change",()=>{e.settings.taskCreationDefaults.defaultTags=a.value,t()});let i=jo(e,"tags","#",t,r),o=[{label:"",input:Ci(r("settings.taskProperties.properties.tags.description")),fullWidth:!0},{label:r("settings.taskProperties.propertyCard.default"),input:a},...i];sr(n,{id:"property-tags",collapsible:!0,defaultCollapsed:!0,header:{primaryText:r("settings.taskProperties.properties.tags.name"),secondaryText:r("settings.taskProperties.tagsCard.nativeObsidianTags")},content:{sections:[{rows:o}]}})}var YRe=require("obsidian");va();function _8(n,e,t,r){let a=Ge("text","reminders",e.settings.fieldMapping.reminders);a.addEventListener("change",()=>{e.settings.fieldMapping.reminders=a.value,t()});let i=activeWindow.createDiv();i.addClass("tasknotes-settings__nested-cards");let s=i.createDiv("tasknotes-settings__collapsible-section"),o=s.createDiv("tasknotes-settings__collapsible-section-header");o.createSpan({text:r("settings.taskProperties.remindersCard.defaultReminders"),cls:"tasknotes-settings__collapsible-section-title"});let l=o.createSpan("tasknotes-settings__collapsible-section-chevron");(0,YRe.setIcon)(l,"chevron-down");let c=s.createDiv("tasknotes-settings__collapsible-section-content"),d=c.createDiv("tasknotes-reminders-container");QO(d,e,t,r);let u=c.createEl("button",{text:r("settings.defaults.reminders.addReminder.buttonText"),cls:"tn-btn tn-btn--ghost"});u.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-20px-a26bda7d","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),u.classList.add("tn-static-margin-top-0-5rem-3dc98b5e"),u.onclick=()=>{let h={id:`reminder_${Date.now()}`,type:"relative",relatedTo:"due",offset:1,unit:"hours",direction:"before",description:"Reminder"};e.settings.taskCreationDefaults.defaultReminders=e.settings.taskCreationDefaults.defaultReminders||[],e.settings.taskCreationDefaults.defaultReminders.push(h),t(),QO(d,e,t,r)},o.addEventListener("click",()=>{s.toggleClass("tasknotes-settings__collapsible-section--collapsed",!s.hasClass("tasknotes-settings__collapsible-section--collapsed"))});let m=[{label:"",input:Ci(r("settings.taskProperties.properties.reminders.description")),fullWidth:!0},{label:r("settings.taskProperties.propertyCard.propertyKey"),input:a},{label:"",input:i,fullWidth:!0}];sr(n,{id:"property-reminders",collapsible:!0,defaultCollapsed:!0,header:{primaryText:r("settings.taskProperties.properties.reminders.name"),secondaryText:e.settings.fieldMapping.reminders},content:{sections:[{rows:m}]}})}function QO(n,e,t,r){if(n.empty(),!e.settings.taskCreationDefaults.defaultReminders||e.settings.taskCreationDefaults.defaultReminders.length===0){rc(n,r("settings.defaults.reminders.emptyState"));return}e.settings.taskCreationDefaults.defaultReminders.forEach((a,i)=>{let s=GRe(a,r),o=Ge("text",r("settings.defaults.reminders.reminderDescription"),a.description),l=Wn([{value:"relative",label:r("settings.defaults.reminders.types.relative")},{value:"absolute",label:r("settings.defaults.reminders.types.absolute")}],a.type),c=p=>{Object.assign(a,p),t();let m=n.querySelector(`[data-card-id="${a.id}"]`);if(m){let f=m.querySelector(".tasknotes-settings__card-secondary-text");f&&(f.textContent=GRe(a,r))}},d=a.type==="relative"?odt(a,c,r):ldt(a,c,r),u=sr(n,{id:a.id,collapsible:!0,defaultCollapsed:!0,header:{primaryText:a.description||r("settings.defaults.reminders.unnamedReminder"),secondaryText:s,actions:[ol(()=>{e.settings.taskCreationDefaults.defaultReminders.splice(i,1),t(),QO(n,e,t,r)},r("settings.defaults.reminders.deleteTooltip"))]},content:{sections:[{rows:[{label:r("settings.defaults.reminders.fields.description"),input:o},{label:r("settings.defaults.reminders.fields.type"),input:l}]},{rows:d}]}});o.addEventListener("input",()=>{a.description=o.value,t();let p=u.querySelector(".tasknotes-settings__card-primary-text");p&&(p.textContent=a.description||r("settings.defaults.reminders.unnamedReminder"))}),l.addEventListener("change",()=>{a.type=l.value,t(),QO(n,e,t,r)})})}function odt(n,e,t){let r=hp(0,void 0,1,n.offset);r.addEventListener("input",()=>{let o=parseInt(r.value);!isNaN(o)&&o>=0&&e({offset:o})});let a=Wn([{value:"minutes",label:t("settings.defaults.reminders.units.minutes")},{value:"hours",label:t("settings.defaults.reminders.units.hours")},{value:"days",label:t("settings.defaults.reminders.units.days")}],n.unit);a.addEventListener("change",()=>{e({unit:a.value})});let i=Wn([{value:"before",label:t("settings.defaults.reminders.directions.before")},{value:"after",label:t("settings.defaults.reminders.directions.after")}],n.direction);i.addEventListener("change",()=>{e({direction:i.value})});let s=Wn([{value:"due",label:t("settings.defaults.reminders.relatedTo.due")},{value:"scheduled",label:t("settings.defaults.reminders.relatedTo.scheduled")}],n.relatedTo);return s.addEventListener("change",()=>{e({relatedTo:s.value})}),[{label:t("settings.defaults.reminders.fields.offset"),input:r},{label:t("settings.defaults.reminders.fields.unit"),input:a},{label:t("settings.defaults.reminders.fields.direction"),input:i},{label:t("settings.defaults.reminders.fields.relatedTo"),input:s}]}function ldt(n,e,t){let r=Ge("date",n.absoluteDate||new Date().toISOString().split("T")[0]);r.addEventListener("input",()=>{e({absoluteDate:r.value})});let a=Ge("time",n.absoluteTime||"09:00");return a.addEventListener("input",()=>{e({absoluteTime:a.value})}),[{label:t("settings.defaults.reminders.fields.date"),input:r},{label:t("settings.defaults.reminders.fields.time"),input:a}]}function GRe(n,e){var t;if(n.type==="relative"){let r=n.direction==="before"?e("settings.defaults.reminders.directions.before"):e("settings.defaults.reminders.directions.after"),a=e(`settings.defaults.reminders.units.${n.unit||"hours"}`),i=(t=n.offset)!=null?t:1,s=n.relatedTo==="due"?e("settings.defaults.reminders.relatedTo.due"):e("settings.defaults.reminders.relatedTo.scheduled");return`${i} ${a} ${r} ${s}`}else{let r=n.absoluteDate||e("settings.defaults.reminders.fields.date"),a=n.absoluteTime||e("settings.defaults.reminders.fields.time");return`${r} at ${a}`}}var IP=require("obsidian");va();bb();function cdt(n,e,t){let r,a;if(n.type==="boolean"){let i=typeof n.defaultValue=="boolean"?n.defaultValue:!1;r=nn(i,s=>{t(s)}),a={label:e("settings.taskProperties.customUserFields.fields.defaultValue"),input:r}}else if(n.type==="number"){let i=Ge("number",e("settings.taskProperties.customUserFields.placeholders.defaultValue"),n.defaultValue!==void 0?String(n.defaultValue):"");i.addEventListener("input",()=>{let s=i.value.trim();if(s==="")t(void 0);else{let o=parseFloat(s);Number.isNaN(o)||t(o)}}),r=i,a={label:e("settings.taskProperties.customUserFields.fields.defaultValue"),input:r}}else if(n.type==="date"){let i=typeof n.defaultValue=="string"?n.defaultValue:"none",s=Wn([{value:"none",label:e("settings.defaults.options.none")},{value:"today",label:e("settings.defaults.options.today")},{value:"tomorrow",label:e("settings.defaults.options.tomorrow")},{value:"next-week",label:e("settings.defaults.options.nextWeek")}],i);s.addEventListener("change",()=>{let o=s.value;t(o==="none"?void 0:o)}),r=s,a={label:e("settings.taskProperties.customUserFields.fields.defaultValue"),input:r}}else if(n.type==="list"){let i=Array.isArray(n.defaultValue)?n.defaultValue.join(", "):"",s=Ge("text",e("settings.taskProperties.customUserFields.placeholders.defaultValueList"),i);s.addEventListener("input",()=>{let o=s.value.trim();t(o===""?void 0:o.split(",").map(l=>l.trim()).filter(l=>l))}),r=s,a={label:e("settings.taskProperties.customUserFields.fields.defaultValue"),input:r}}else{let i=Ge("text",e("settings.taskProperties.customUserFields.placeholders.defaultValue"),typeof n.defaultValue=="string"?n.defaultValue:"");i.addEventListener("input",()=>{let s=i.value.trim();t(s===""?void 0:s)}),r=i,a={label:e("settings.taskProperties.customUserFields.fields.defaultValue"),input:r}}return{element:r,row:a}}function F8(n,e,t,r){if(Array.isArray(e.settings.userFields)||(e.settings.userFields=[]),e.settings.userField&&e.settings.userField.enabled){let i=e.settings.userField,s=(i.displayName||i.key||"field").toLowerCase().replace(/[^a-z0-9_-]/g,"-");e.settings.userFields.find(o=>o.id===s||o.key===i.key)||(e.settings.userFields.push({id:s,displayName:i.displayName||"",key:i.key||"",type:i.type||"text"}),t())}let a=n.createDiv("tasknotes-user-fields-container");MP(a,e,t,r),new IP.Setting(n).setName(r("settings.taskProperties.customUserFields.addNew.name")).setDesc(r("settings.taskProperties.customUserFields.addNew.description")).addButton(i=>i.setButtonText(r("settings.taskProperties.customUserFields.addNew.buttonText")).onClick(async()=>{e.settings.userFields||(e.settings.userFields=[]);let s=`field_${Date.now()}`,o={id:s,displayName:"",key:"",type:"text"};if(e.settings.userFields.push(o),!e.settings.modalFieldsConfig)e.settings.modalFieldsConfig=Nl(void 0,e.settings.userFields);else{let l=e.settings.modalFieldsConfig.fields.filter(d=>d.group==="custom"),c=l.length>0?Math.max(...l.map(d=>d.order)):-1;e.settings.modalFieldsConfig.fields.push({id:s,fieldType:"user",group:"custom",displayName:o.displayName||"",visibleInCreation:!0,visibleInEdit:!0,order:c+1,enabled:!0})}t(),MP(a,e,t,r)}))}function MP(n,e,t,r,a){if(n.empty(),e.settings.userFields||(e.settings.userFields=[]),e.settings.userFields.length===0){rc(n,r("settings.taskProperties.customUserFields.emptyState"),r("settings.taskProperties.customUserFields.emptyStateButton"),()=>{let i=activeDocument.querySelector('[data-setting-name="Add new user field"] button');i&&i.click()});return}e.settings.userFields.forEach((i,s)=>{let o=Ge("text",r("settings.taskProperties.customUserFields.placeholders.displayName"),i.displayName),l=Ge("text",r("settings.taskProperties.customUserFields.placeholders.propertyKey"),i.key),c=Wn([{value:"text",label:r("settings.taskProperties.customUserFields.types.text")},{value:"number",label:r("settings.taskProperties.customUserFields.types.number")},{value:"boolean",label:r("settings.taskProperties.customUserFields.types.boolean")},{value:"date",label:r("settings.taskProperties.customUserFields.types.date")},{value:"list",label:r("settings.taskProperties.customUserFields.types.list")}],i.type);o.addEventListener("input",()=>{if(i.displayName=o.value,e.settings.modalFieldsConfig){let S=e.settings.modalFieldsConfig.fields.find(C=>C.id===i.id);S&&(S.displayName=i.displayName)}let w=n.querySelector(`[data-card-id="${i.id}"]`);if(w){let S=w.querySelector(".tasknotes-settings__card-header-primary");S&&(S.textContent=i.displayName||r("settings.taskProperties.customUserFields.defaultNames.unnamedField"))}t()}),l.addEventListener("input",()=>{i.key=l.value;let w=n.querySelector(`[data-card-id="${i.id}"]`);if(w){let S=w.querySelector(".tasknotes-settings__card-header-secondary");S&&(S.textContent=i.key||r("settings.taskProperties.customUserFields.defaultNames.noKey"))}t()}),c.addEventListener("change",()=>{i.type=c.value,i.defaultValue=i.type==="boolean"?!1:void 0,t(),MP(n,e,t,r,i.id)});let{row:d}=cdt(i,r,w=>{i.defaultValue=w,t()}),u=jo(e,i.id,`${i.id}:`,t,r,()=>MP(n,e,t,r)),p=activeWindow.createDiv();p.addClass("tasknotes-settings__collapsible-section"),p.addClass("tasknotes-settings__collapsible-section--collapsed");let m=w=>w?w.requiredTags&&w.requiredTags.length>0||w.includeFolders&&w.includeFolders.length>0||w.propertyKey&&w.propertyKey.trim()!=="":!1,f=p.createDiv("tasknotes-settings__collapsible-section-header"),h=f.createDiv("tasknotes-settings__collapsible-section-header-left"),g=h.createSpan("tasknotes-settings__collapsible-section-title");g.textContent=r("settings.taskProperties.customUserFields.autosuggestFilters.header");let v=h.createSpan("tasknotes-settings__filter-badge"),k=()=>{if(m(i.autosuggestFilter)){v.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),v.classList.add("tn-static-display-inline-flex-f984c520"),v.empty();let w=v.createSpan();(0,IP.setIcon)(w,"filter"),v.createSpan({text:"Filters On"})}else v.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),v.classList.add("tn-static-display-none-6b99de8b")};k();let T=f.createSpan("tasknotes-settings__collapsible-section-chevron");(0,IP.setIcon)(T,"chevron-down");let b=p.createDiv("tasknotes-settings__collapsible-section-content");ZO(b,i.autosuggestFilter,w=>{i.autosuggestFilter=w,k(),t()},r),f.addEventListener("click",()=>{p.hasClass("tasknotes-settings__collapsible-section--collapsed")?p.removeClass("tasknotes-settings__collapsible-section--collapsed"):p.addClass("tasknotes-settings__collapsible-section--collapsed")}),sr(n,{id:i.id,collapsible:!0,defaultCollapsed:i.id!==a,header:{primaryText:i.displayName||r("settings.taskProperties.customUserFields.defaultNames.unnamedField"),secondaryText:i.key||r("settings.taskProperties.customUserFields.defaultNames.noKey"),meta:[pi(i.type.charAt(0).toUpperCase()+i.type.slice(1),"default")],actions:[ol(()=>{var w;if(e.settings.userFields){let S=(w=e.settings.userFields[s])==null?void 0:w.id;e.settings.userFields.splice(s,1),e.settings.modalFieldsConfig&&S&&(e.settings.modalFieldsConfig.fields=e.settings.modalFieldsConfig.fields.filter(C=>C.id!==S)),t(),MP(n,e,t,r)}},r("settings.taskProperties.customUserFields.deleteTooltip"))]},content:{sections:[{rows:[{label:r("settings.taskProperties.customUserFields.fields.displayName"),input:o},{label:r("settings.taskProperties.customUserFields.fields.propertyKey"),input:l},{label:r("settings.taskProperties.customUserFields.fields.type"),input:c},d,...u]},{rows:[{label:"",input:p,fullWidth:!0}]}]}})})}function KRe(n,e,t){n.empty();let r=(i,s)=>e.i18n.translate(i,s),a=(i,s)=>{let o=Ge("time","",i&&i!=="none"?i:"");return o.addEventListener("change",()=>{s(o.value||"none"),t()}),o};fp(n,r("settings.taskProperties.sections.coreProperties")),ec(n,r("settings.taskProperties.sections.corePropertiesDesc")),D8(n,e,t,r),A8(n,e,t,r),M8(n,e,t,r),fp(n,r("settings.taskProperties.sections.dateProperties")),ec(n,r("settings.taskProperties.sections.datePropertiesDesc")),Ig(n,e,t,r,{propertyId:"due",displayName:r("settings.taskProperties.properties.due.name"),description:r("settings.taskProperties.properties.due.description"),hasDefault:!0,defaultType:"date-preset",defaultOptions:[{value:"none",label:r("settings.defaults.options.none")},{value:"today",label:r("settings.defaults.options.today")},{value:"tomorrow",label:r("settings.defaults.options.tomorrow")},{value:"next-week",label:r("settings.defaults.options.nextWeek")}],getDefaultValue:()=>e.settings.taskCreationDefaults.defaultDueDate,setDefaultValue:i=>{e.settings.taskCreationDefaults.defaultDueDate=i,t()},extraRows:[{label:r("settings.defaults.reminders.fields.time"),input:a(e.settings.taskCreationDefaults.defaultDueTime,i=>{e.settings.taskCreationDefaults.defaultDueTime=i})}]}),Ig(n,e,t,r,{propertyId:"scheduled",displayName:r("settings.taskProperties.properties.scheduled.name"),description:r("settings.taskProperties.properties.scheduled.description"),hasDefault:!0,defaultType:"date-preset",defaultOptions:[{value:"none",label:r("settings.defaults.options.none")},{value:"today",label:r("settings.defaults.options.today")},{value:"tomorrow",label:r("settings.defaults.options.tomorrow")},{value:"next-week",label:r("settings.defaults.options.nextWeek")}],getDefaultValue:()=>e.settings.taskCreationDefaults.defaultScheduledDate,setDefaultValue:i=>{e.settings.taskCreationDefaults.defaultScheduledDate=i,t()},extraRows:[{label:r("settings.defaults.reminders.fields.time"),input:a(e.settings.taskCreationDefaults.defaultScheduledTime,i=>{e.settings.taskCreationDefaults.defaultScheduledTime=i})}]}),fp(n,r("settings.taskProperties.sections.organizationProperties")),ec(n,r("settings.taskProperties.sections.organizationPropertiesDesc")),Ig(n,e,t,r,{propertyId:"contexts",displayName:r("settings.taskProperties.properties.contexts.name"),description:r("settings.taskProperties.properties.contexts.description"),hasDefault:!0,defaultType:"text",defaultPlaceholder:r("settings.defaults.basicDefaults.defaultContexts.placeholder"),getDefaultValue:()=>e.settings.taskCreationDefaults.defaultContexts,setDefaultValue:i=>{e.settings.taskCreationDefaults.defaultContexts=i,t()},hasNLPTrigger:!0,nlpDefaultTrigger:"@"}),N8(n,e,t,r),R8(n,e,t,r),fp(n,r("settings.taskProperties.sections.taskDetails")),ec(n,r("settings.taskProperties.sections.taskDetailsDesc")),Ig(n,e,t,r,{propertyId:"timeEstimate",displayName:r("settings.taskProperties.properties.timeEstimate.name"),description:r("settings.taskProperties.properties.timeEstimate.description"),hasDefault:!0,defaultType:"number",defaultPlaceholder:r("settings.defaults.basicDefaults.defaultTimeEstimate.placeholder"),getDefaultValue:()=>{var i;return((i=e.settings.taskCreationDefaults.defaultTimeEstimate)==null?void 0:i.toString())||""},setDefaultValue:i=>{e.settings.taskCreationDefaults.defaultTimeEstimate=parseInt(i)||0,t()}}),Ig(n,e,t,r,{propertyId:"recurrence",displayName:r("settings.taskProperties.properties.recurrence.name"),description:r("settings.taskProperties.properties.recurrence.description"),hasDefault:!0,defaultType:"dropdown",defaultOptions:[{value:"none",label:r("settings.defaults.options.none")},{value:"daily",label:r("settings.defaults.options.daily")},{value:"weekly",label:r("settings.defaults.options.weekly")},{value:"monthly",label:r("settings.defaults.options.monthly")},{value:"yearly",label:r("settings.defaults.options.yearly")}],getDefaultValue:()=>e.settings.taskCreationDefaults.defaultRecurrence,setDefaultValue:i=>{e.settings.taskCreationDefaults.defaultRecurrence=i,t()}}),xi(n,e,t,r,"recurrenceAnchor",r("settings.taskProperties.properties.recurrenceAnchor.name"),r("settings.taskProperties.properties.recurrenceAnchor.description")),_8(n,e,t,r),fp(n,r("settings.taskProperties.sections.metadataProperties")),ec(n,r("settings.taskProperties.sections.metadataPropertiesDesc")),xi(n,e,t,r,"dateCreated",r("settings.taskProperties.properties.dateCreated.name"),r("settings.taskProperties.properties.dateCreated.description")),xi(n,e,t,r,"dateModified",r("settings.taskProperties.properties.dateModified.name"),r("settings.taskProperties.properties.dateModified.description")),xi(n,e,t,r,"completedDate",r("settings.taskProperties.properties.completedDate.name"),r("settings.taskProperties.properties.completedDate.description")),xi(n,e,t,r,"archiveTag",r("settings.taskProperties.properties.archiveTag.name"),r("settings.taskProperties.properties.archiveTag.description")),xi(n,e,t,r,"timeEntries",r("settings.taskProperties.properties.timeEntries.name"),r("settings.taskProperties.properties.timeEntries.description")),xi(n,e,t,r,"completeInstances",r("settings.taskProperties.properties.completeInstances.name"),r("settings.taskProperties.properties.completeInstances.description")),xi(n,e,t,r,"skippedInstances",r("settings.taskProperties.properties.skippedInstances.name"),r("settings.taskProperties.properties.skippedInstances.description")),xi(n,e,t,r,"blockedBy",r("settings.taskProperties.properties.blockedBy.name"),r("settings.taskProperties.properties.blockedBy.description")),xi(n,e,t,r,"sortOrder",r("settings.taskProperties.properties.sortOrder.name"),r("settings.taskProperties.properties.sortOrder.description")),fp(n,r("settings.taskProperties.sections.featureProperties")),ec(n,r("settings.taskProperties.sections.featurePropertiesDesc")),xi(n,e,t,r,"pomodoros",r("settings.taskProperties.properties.pomodoros.name"),r("settings.taskProperties.properties.pomodoros.description")),xi(n,e,t,r,"icsEventId",r("settings.taskProperties.properties.icsEventId.name"),r("settings.taskProperties.properties.icsEventId.description")),xi(n,e,t,r,"icsEventTag",r("settings.taskProperties.properties.icsEventTag.name"),r("settings.taskProperties.properties.icsEventTag.description")),fp(n,r("settings.taskProperties.customUserFields.header")),ec(n,r("settings.taskProperties.customUserFields.description")),F8(n,e,t,r)}var L8=require("obsidian");tc();va();function ZRe(n,e,t,r,a){if(n.empty(),n.addClass("field-manager"),!t||!t.groups||!t.fields){n.createDiv({text:"Error: Invalid field configuration. Please reset to defaults."});return}let i=n.createDiv({cls:"field-manager__tabs"}),s=n.createDiv({cls:"field-manager__content"}),o=[...t.groups].sort((l,c)=>l.order-c.order);o.forEach((l,c)=>{let d=i.createDiv({cls:"field-manager__tab"});c===0&&d.addClass("field-manager__tab--active"),d.setText(l.displayName),d.onclick=()=>{i.querySelectorAll(".field-manager__tab").forEach(u=>{u.removeClass("field-manager__tab--active")}),d.addClass("field-manager__tab--active"),JO(s,l.id,t,e,r,a)}}),o.length>0&&JO(s,o[0].id,t,e,r,a)}function JO(n,e,t,r,a,i){n.empty();let s=t.fields.filter(l=>l.group===e).sort((l,c)=>l.order-c.order);if(s.length===0){n.createDiv({cls:"field-manager__empty"}).setText("No fields in this group");return}let o=n.createDiv({cls:"field-manager__cards"});s.forEach((l,c)=>{ddt(o,l,c,t,r,a,i,e)})}function ddt(n,e,t,r,a,i,s,o){let l=activeWindow.createSpan();l.classList.add("field-card__type"),l.classList.add(`field-card__type--${e.fieldType}`),l.textContent=e.fieldType;let c=nn(e.enabled,h=>{let g=r.fields.findIndex(v=>v.id===e.id);if(g!==-1){r.fields[g].enabled=h,i(r);let v=activeDocument.querySelector(".field-manager__tab--active");if(v){let k=v.parentElement,T=n.parentElement;if(!k||!T)return;let b=Array.from(k.children).indexOf(v),S=[...r.groups].sort((C,x)=>C.order-x.order)[b];S&&JO(T,S.id,r,a,i,s)}}}),d=nn(e.visibleInCreation,h=>{let g=r.fields.findIndex(v=>v.id===e.id);g!==-1&&(r.fields[g].visibleInCreation=h,i(r))}),u=nn(e.visibleInEdit,h=>{let g=r.fields.findIndex(v=>v.id===e.id);g!==-1&&(r.fields[g].visibleInEdit=h,i(r))}),p=Wn(r.groups.map(h=>({value:h.id,label:h.displayName})),e.group);p.onchange=()=>{let h=r.fields.findIndex(g=>g.id===e.id);if(h!==-1){r.fields[h].group=p.value,i(r);let g=activeDocument.querySelector(".field-manager__tab--active");g&&g.click()}};let m=e.group!=="basic",f=sr(n,{id:e.id,draggable:m,header:{primaryText:e.displayName,secondaryText:udt(e,a.settings.userFields),meta:[l]},content:{sections:[{rows:[{label:"Enabled:",input:c}]},...e.enabled?[{rows:[{label:"Show in Creation:",input:d},{label:"Show in Edit:",input:u},{label:"Group:",input:p,fullWidth:!0}]}]:[]]}});m&&lv(f,n,(h,g,v)=>{let k=r.fields.findIndex(E=>E.id===h&&E.group===o),T=r.fields.findIndex(E=>E.id===g&&E.group===o);if(k===-1||T===-1)return;let b=r.fields.filter(E=>E.group===o),w=b.findIndex(E=>E.id===h),S=b.findIndex(E=>E.id===g),[C]=b.splice(w,1),x=S+(v?0:1);b.splice(x,0,C),b.forEach((E,_)=>{let F=r.fields.findIndex(I=>I.id===E.id);F!==-1&&(r.fields[F].order=_)}),i(r),JO(n,o,r,a,i,s)})}function udt(n,e){if(n.fieldType!=="user")return`ID: ${n.id}`;let t=e==null?void 0:e.find(r=>r.id===n.id);return t!=null&&t.key?`Key: ${t.key}`:"No key set"}bb();Fi();function XO(n,e,t){n.empty(),e.settings.modalFieldsConfig||(e.settings.modalFieldsConfig=Nl(void 0,e.settings.userFields),t()),kt(n,{heading:"Task Modal Fields Configuration",description:"Configure which fields appear in task creation and edit modals. Drag fields to reorder them within each group."},a=>{a.addSetting(i=>{me(i,{name:"Split layout on wide screens",desc:"When enabled, the details editor appears in a right column on screens 900px or wider. When disabled, the modal uses a stacked layout.",getValue:()=>e.settings.enableModalSplitLayout,setValue:s=>{e.settings.enableModalSplitLayout=s,t()}})}),a.addSetting(i=>{me(i,{name:"Tab moves focus in details editor",desc:"When enabled, Tab moves from the details editor to the next modal field and Shift+Tab moves to the previous field. When disabled, Tab and Shift+Tab use the markdown editor's indentation behavior.",getValue:()=>e.settings.taskModalTabMovesFocus,setValue:s=>{e.settings.taskModalTabMovesFocus=s,t()}})}),a.addSetting(i=>{i.setName("Sync user fields").setDesc("Click to sync custom user fields from task properties settings into this configuration.").addButton(s=>{s.setButtonText("Sync user fields").setCta().onClick(()=>{pdt(e),t(),new L8.Notice("User fields synced to modal configuration"),XO(n,e,t)})})}),a.addSetting(i=>{i.setName("Reset to defaults").setDesc("Reset all field configurations to their default values. This will remove any custom configurations.").addButton(s=>{s.setButtonText("Reset to defaults").setClass("mod-warning").onClick(async()=>{await ur(e.app,{title:"Reset Field Configuration",message:"Are you sure you want to reset field configuration to defaults? This will remove any custom field configurations.",confirmText:"Reset",cancelText:"Cancel",isDestructive:!0})&&(e.settings.modalFieldsConfig=Nl(void 0,e.settings.userFields),t(),new L8.Notice("Field configuration reset to defaults"),XO(n,e,t))})})})});let r=n.createDiv({cls:"modal-fields-manager-container"});if(!e.settings.modalFieldsConfig){r.createDiv({text:"Error: Could not initialize field configuration"});return}ZRe(r,e,e.settings.modalFieldsConfig,a=>{e.settings.modalFieldsConfig=a,t()},e.app)}function pdt(n){if(!n.settings.modalFieldsConfig){n.settings.modalFieldsConfig=Nl(void 0,n.settings.userFields);return}if(!n.settings.userFields||n.settings.userFields.length===0)return;let e=n.settings.modalFieldsConfig,t=new Set(e.fields.filter(a=>a.fieldType==="user").map(a=>a.id));n.settings.userFields.forEach(a=>{if(t.has(a.id)){let i=e.fields.findIndex(s=>s.id===a.id);i!==-1&&(e.fields[i].displayName=a.displayName)}else{let i=e.fields.filter(o=>o.group==="custom"),s=i.length>0?Math.max(...i.map(o=>o.order)):-1;e.fields.push({id:a.id,fieldType:"user",group:"custom",displayName:a.displayName,visibleInCreation:!0,visibleInEdit:!0,order:s+1,enabled:!0})}});let r=new Set(n.settings.userFields.map(a=>a.id));e.fields=e.fields.filter(a=>a.fieldType!=="user"||r.has(a.id))}var Fu=require("obsidian");tc();var e1=require("obsidian");q();var mdt=M({tag:"Modals/PropertySelectorModal"}),JT=class extends e1.Modal{constructor(t,r,a,i,s="Select Task Card Properties",o="Choose which properties to display in task cards. Selected properties will appear in the order shown below."){super(t);this.keyboardHandler=null;this.availableProperties=r,this.currentSelection=a,this.tempSelection=[...a],this.onSubmit=i,this.modalTitle=s,this.modalDescription=o}onOpen(){let{contentEl:t}=this;t.empty(),this.keyboardHandler=o=>{o.key==="Enter"&&(o.ctrlKey||o.metaKey)&&(o.preventDefault(),this.submitSelection(),this.close())},this.containerEl.addEventListener("keydown",this.keyboardHandler),t.createEl("h2",{text:this.modalTitle}),t.createEl("p",{text:this.modalDescription,cls:"setting-item-description"});let r=t.createDiv({cls:"property-selector-checkboxes"});r.classList.remove("tn-static-margin-top-12px-91e0f558"),r.classList.add("tn-static-max-height-400px-f0787633"),r.classList.remove("tn-static-margin-top-12px-91e0f558","tn-static-overflow-y-clip-c5043043"),r.classList.add("tn-static-overflow-y-auto-03df744e"),r.classList.remove("tn-static-font-size-12px-65574819","tn-static-font-weight-bold-0fe8c30d","tn-static-font-weight-bold-e0b452bd","tn-static-margin-bottom-0-75rem-c05a3c6e","tn-static-margin-bottom-8px-fdf33f23"),r.classList.add("tn-static-margin-bottom-20px-49f14f8f");for(let o of this.availableProperties)new e1.Setting(r).setName(o.label).addToggle(l=>{l.setValue(this.tempSelection.includes(o.id)).onChange(c=>{if(c)this.tempSelection.includes(o.id)||this.tempSelection.push(o.id);else{let d=this.tempSelection.indexOf(o.id);d>-1&&this.tempSelection.splice(d,1)}})});let a=t.createDiv({cls:"modal-button-container"});a.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),a.classList.add("tn-static-display-flex-75816cae"),a.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),a.classList.add("tn-static-gap-10px-f3d7ce77"),a.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),a.classList.add("tn-static-justify-content-flex-end-455f8cca"),a.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),a.createEl("button",{text:"Save",cls:"mod-cta"}).addEventListener("click",()=>{this.submitSelection(),this.close()})}submitSelection(){Promise.resolve().then(()=>this.onSubmit(this.tempSelection)).catch(t=>{mdt.error("TaskNotes property selection callback failed:",{category:"persistence",operation:"property-selection-callback",error:t})})}onClose(){this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}};function NP(n){var a;let e=(i,s)=>{let o=n.fieldMapper.toUserField(s);return o!==i.toLowerCase().replace(/\s+/g,"")?`${i} (${o})`:i},t=[{id:"status",label:e("Status","status")},{id:"priority",label:e("Priority","priority")},{id:"blocked",label:"Blocked Status"},{id:"blocking",label:"Blocking Status"},{id:"due",label:e("Due Date","due")},{id:"scheduled",label:e("Scheduled Date","scheduled")},{id:"timeEstimate",label:e("Time Estimate","timeEstimate")},{id:"totalTrackedTime",label:"Total Tracked Time"},{id:"checklistProgress",label:"Checklist Progress"},{id:"recurrence",label:e("Recurrence","recurrence")},{id:"completeInstances",label:e("Completed Instances","completeInstances")},{id:"skippedInstances",label:e("Skipped Instances","skippedInstances")},{id:"completedDate",label:e("Completed Date","completedDate")},{id:"dateCreated",label:e("Created Date","dateCreated")},{id:"dateModified",label:e("Modified Date","dateModified")},{id:"projects",label:e("Projects","projects")},{id:"contexts",label:e("Contexts","contexts")},{id:"tags",label:"Tags"}],r=((a=n.settings.userFields)==null?void 0:a.map(i=>({id:`user:${i.id}`,label:i.displayName})))||[];return[...t,...r]}function t1(n,e){let t=NP(n);return e.map(r=>{var a;return((a=t.find(i=>i.id===r))==null?void 0:a.label)||r}).filter(Boolean)}g3();var fdt=["dayGridMonth","timeGridWeek","timeGridDay","multiMonthYear","timeGridCustom"],hdt=[0,1,2,3,4,5,6],gdt=["00:15:00","00:30:00","01:00:00"];function ydt(n){return fdt.some(e=>e===n)}function vdt(n,e){var r;let t=Number.parseInt(n,10);return(r=hdt.find(a=>a===t))!=null?r:e}function kdt(n){return gdt.some(e=>e===n)}function XT(n,e,t){n.empty();let r=(o,l)=>e.i18n.translate(o,l),a=NP(e),i=e.settings.defaultVisibleProperties||[],s=t1(e,i);kt(n,{heading:r("settings.appearance.taskCards.header"),description:r("settings.appearance.taskCards.description")},o=>{o.addSetting(l=>{l.setName(r("settings.appearance.taskCards.defaultVisibleProperties.name")).setDesc(r("settings.appearance.taskCards.defaultVisibleProperties.description")).addButton(c=>{c.setButtonText("Configure").onClick(()=>{new JT(e.app,a,i,async u=>{e.settings.defaultVisibleProperties=u,t(),new Fu.Notice("Default task card properties updated"),XT(n,e,t)},"Select Default Task Card Properties","Choose which properties to display in task cards (views, kanban, etc.). Selected properties will appear in the order shown below.").open()})})}),o.addSetting(l=>{l.setDesc(`Currently showing: ${s.join(", ")}`),l.settingEl.addClass("settings-view__group-description")}),o.addSetting(l=>void me(l,{name:r("settings.appearance.taskCards.completionSubmenu.name"),desc:r("settings.appearance.taskCards.completionSubmenu.description"),getValue:()=>e.settings.completionMenuAsSubmenu,setValue:async c=>{e.settings.completionMenuAsSubmenu=c,t()}}))}),kt(n,{heading:r("settings.appearance.displayFormatting.header"),description:r("settings.appearance.displayFormatting.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.appearance.displayFormatting.timeFormat.name"),desc:r("settings.appearance.displayFormatting.timeFormat.description"),options:[{value:"12",label:r("settings.appearance.displayFormatting.timeFormat.options.twelveHour")},{value:"24",label:r("settings.appearance.displayFormatting.timeFormat.options.twentyFourHour")}],getValue:()=>e.settings.calendarViewSettings.timeFormat,setValue:async c=>{e.settings.calendarViewSettings.timeFormat=c,t()}}))}),kt(n,{heading:r("settings.appearance.calendarView.header"),description:r("settings.appearance.calendarView.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.appearance.calendarView.defaultView.name"),desc:r("settings.appearance.calendarView.defaultView.description"),options:[{value:"dayGridMonth",label:r("settings.appearance.calendarView.defaultView.options.monthGrid")},{value:"timeGridWeek",label:r("settings.appearance.calendarView.defaultView.options.weekTimeline")},{value:"timeGridDay",label:r("settings.appearance.calendarView.defaultView.options.dayTimeline")},{value:"multiMonthYear",label:r("settings.appearance.calendarView.defaultView.options.yearView")},{value:"timeGridCustom",label:r("settings.appearance.calendarView.defaultView.options.customMultiDay")}],getValue:()=>e.settings.calendarViewSettings.defaultView,setValue:async c=>{ydt(c)&&(e.settings.calendarViewSettings.defaultView=c,t(),XT(n,e,t))}})),e.settings.calendarViewSettings.defaultView==="timeGridCustom"&&o.addSetting(l=>void ui(l,{name:r("settings.appearance.calendarView.customDayCount.name"),desc:r("settings.appearance.calendarView.customDayCount.description"),placeholder:r("settings.appearance.calendarView.customDayCount.placeholder"),min:2,max:10,getValue:()=>e.settings.calendarViewSettings.customDayCount,setValue:async c=>{e.settings.calendarViewSettings.customDayCount=c,t()}})),o.addSetting(l=>void Ur(l,{name:r("settings.appearance.calendarView.firstDayOfWeek.name"),desc:r("settings.appearance.calendarView.firstDayOfWeek.description"),options:[{value:"0",label:r("common.weekdays.sunday")},{value:"1",label:r("common.weekdays.monday")},{value:"2",label:r("common.weekdays.tuesday")},{value:"3",label:r("common.weekdays.wednesday")},{value:"4",label:r("common.weekdays.thursday")},{value:"5",label:r("common.weekdays.friday")},{value:"6",label:r("common.weekdays.saturday")}],getValue:()=>e.settings.calendarViewSettings.firstDay.toString(),setValue:async c=>{e.settings.calendarViewSettings.firstDay=vdt(c,e.settings.calendarViewSettings.firstDay),t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.calendarView.showWeekends.name"),desc:r("settings.appearance.calendarView.showWeekends.description"),getValue:()=>e.settings.calendarViewSettings.showWeekends,setValue:async c=>{e.settings.calendarViewSettings.showWeekends=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.calendarView.showWeekNumbers.name"),desc:r("settings.appearance.calendarView.showWeekNumbers.description"),getValue:()=>e.settings.calendarViewSettings.weekNumbers,setValue:async c=>{e.settings.calendarViewSettings.weekNumbers=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.calendarView.showTodayHighlight.name"),desc:r("settings.appearance.calendarView.showTodayHighlight.description"),getValue:()=>e.settings.calendarViewSettings.showTodayHighlight,setValue:async c=>{e.settings.calendarViewSettings.showTodayHighlight=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.calendarView.showCurrentTimeIndicator.name"),desc:r("settings.appearance.calendarView.showCurrentTimeIndicator.description"),getValue:()=>e.settings.calendarViewSettings.nowIndicator,setValue:async c=>{e.settings.calendarViewSettings.nowIndicator=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.calendarView.selectionMirror.name"),desc:r("settings.appearance.calendarView.selectionMirror.description"),getValue:()=>e.settings.calendarViewSettings.selectMirror,setValue:async c=>{e.settings.calendarViewSettings.selectMirror=c,t()}})),o.addSetting(l=>{l.setName(r("settings.appearance.calendarView.calendarLocale.name")).setDesc(r("settings.appearance.calendarView.calendarLocale.description")).addText(c=>{c.setPlaceholder(r("settings.appearance.calendarView.calendarLocale.placeholder")),c.setValue(e.settings.calendarViewSettings.locale||""),c.inputEl.addClass("settings-view__input"),c.inputEl.addEventListener("blur",()=>{let d=c.getValue().trim();if(d)try{Intl.getCanonicalLocales(d),e.settings.calendarViewSettings.locale=d,t()}catch(u){new Fu.Notice(r("settings.appearance.calendarView.calendarLocale.invalidLocale")),e.settings.calendarViewSettings.locale="",c.setValue(""),t()}else e.settings.calendarViewSettings.locale="",t()})})})}),kt(n,{heading:r("settings.appearance.defaultEventVisibility.header"),description:r("settings.appearance.defaultEventVisibility.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.appearance.defaultEventVisibility.showScheduledTasks.name"),desc:r("settings.appearance.defaultEventVisibility.showScheduledTasks.description"),getValue:()=>e.settings.calendarViewSettings.defaultShowScheduled,setValue:async c=>{e.settings.calendarViewSettings.defaultShowScheduled=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.defaultEventVisibility.showDueDates.name"),desc:r("settings.appearance.defaultEventVisibility.showDueDates.description"),getValue:()=>e.settings.calendarViewSettings.defaultShowDue,setValue:async c=>{e.settings.calendarViewSettings.defaultShowDue=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.defaultEventVisibility.showDueWhenScheduled.name"),desc:r("settings.appearance.defaultEventVisibility.showDueWhenScheduled.description"),getValue:()=>e.settings.calendarViewSettings.defaultShowDueWhenScheduled,setValue:async c=>{e.settings.calendarViewSettings.defaultShowDueWhenScheduled=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.defaultEventVisibility.showTimeEntries.name"),desc:r("settings.appearance.defaultEventVisibility.showTimeEntries.description"),getValue:()=>e.settings.calendarViewSettings.defaultShowTimeEntries,setValue:async c=>{e.settings.calendarViewSettings.defaultShowTimeEntries=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.defaultEventVisibility.showRecurringTasks.name"),desc:r("settings.appearance.defaultEventVisibility.showRecurringTasks.description"),getValue:()=>e.settings.calendarViewSettings.defaultShowRecurring,setValue:async c=>{e.settings.calendarViewSettings.defaultShowRecurring=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.defaultEventVisibility.showICSEvents.name"),desc:r("settings.appearance.defaultEventVisibility.showICSEvents.description"),getValue:()=>e.settings.calendarViewSettings.defaultShowICSEvents,setValue:async c=>{e.settings.calendarViewSettings.defaultShowICSEvents=c,t()}}))}),kt(n,{heading:r("settings.appearance.timeSettings.header"),description:r("settings.appearance.timeSettings.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.appearance.timeSettings.timeSlotDuration.name"),desc:r("settings.appearance.timeSettings.timeSlotDuration.description"),options:[{value:"00:15:00",label:r("settings.appearance.timeSettings.timeSlotDuration.options.fifteenMinutes")},{value:"00:30:00",label:r("settings.appearance.timeSettings.timeSlotDuration.options.thirtyMinutes")},{value:"01:00:00",label:r("settings.appearance.timeSettings.timeSlotDuration.options.sixtyMinutes")}],getValue:()=>e.settings.calendarViewSettings.slotDuration,setValue:async c=>{kdt(c)&&(e.settings.calendarViewSettings.slotDuration=c,t())}})),o.addSetting(l=>void rn(l,{name:r("settings.appearance.timeSettings.startTime.name"),desc:r("settings.appearance.timeSettings.startTime.description"),placeholder:r("settings.appearance.timeSettings.startTime.placeholder"),debounceMs:500,getValue:()=>{let c=e.settings.calendarViewSettings.slotMinTime;return!c||c.length<5||!/^\d{2}:\d{2}:\d{2}$/.test(c)?"00:00":c.slice(0,5)},setValue:async c=>{if(!/^\d{2}:\d{2}$/.test(c)){new Fu.Notice("Invalid time format. Please use hh:mm format (e.g., 08:00)");return}let[d,u]=c.split(":").map(Number);if(d<0||d>23||u<0||u>59){new Fu.Notice("Invalid time. Hours must be 00-23 and minutes must be 00-59");return}e.settings.calendarViewSettings.slotMinTime=c+":00",t()}})),o.addSetting(l=>void rn(l,{name:r("settings.appearance.timeSettings.endTime.name"),desc:r("settings.appearance.timeSettings.endTime.description"),placeholder:r("settings.appearance.timeSettings.endTime.placeholder"),debounceMs:500,getValue:()=>{let c=e.settings.calendarViewSettings.slotMaxTime;return!c||c.length<5||!/^\d{2}:\d{2}:\d{2}$/.test(c)?"24:00":c.slice(0,5)},setValue:async c=>{if(!/^\d{2}:\d{2}$/.test(c)){new Fu.Notice("Invalid time format. Please use hh:mm format (e.g., 26:00)");return}let d=NF(c,"24:00:00",{maxHour:48,allowMaxHourOnlyAtZero:!0});if(!d.isValid){new Fu.Notice("Invalid time. Use 00:00-48:00; values after midnight use 24:00-48:00, such as 26:00 for 2 am next day");return}e.settings.calendarViewSettings.slotMaxTime=d.value,t()}})),o.addSetting(l=>void rn(l,{name:r("settings.appearance.timeSettings.initialScrollTime.name"),desc:r("settings.appearance.timeSettings.initialScrollTime.description"),placeholder:r("settings.appearance.timeSettings.initialScrollTime.placeholder"),debounceMs:500,getValue:()=>{let c=e.settings.calendarViewSettings.scrollTime;return!c||c.length<5||!/^\d{2}:\d{2}:\d{2}$/.test(c)?"08:00":c.slice(0,5)},setValue:async c=>{if(!/^\d{2}:\d{2}$/.test(c)){new Fu.Notice("Invalid time format. Please use hh:mm format (e.g., 08:00)");return}let[d,u]=c.split(":").map(Number);if(d<0||d>23||u<0||u>59){new Fu.Notice("Invalid time. Hours must be 00-23 and minutes must be 00-59");return}e.settings.calendarViewSettings.scrollTime=c+":00",t()}})),o.addSetting(l=>void ui(l,{name:r("settings.appearance.timeSettings.eventMinHeight.name"),desc:r("settings.appearance.timeSettings.eventMinHeight.description"),placeholder:r("settings.appearance.timeSettings.eventMinHeight.placeholder"),min:5,max:100,debounceMs:300,getValue:()=>e.settings.calendarViewSettings.eventMinHeight,setValue:async c=>{e.settings.calendarViewSettings.eventMinHeight=c,t()}}))}),kt(n,{heading:r("settings.appearance.uiElements.header"),description:r("settings.appearance.uiElements.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.appearance.uiElements.showTrackedTasksInStatusBar.name"),desc:r("settings.appearance.uiElements.showTrackedTasksInStatusBar.description"),getValue:()=>e.settings.showTrackedTasksInStatusBar,setValue:async c=>{e.settings.showTrackedTasksInStatusBar=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.uiElements.showRelationshipsWidget.name"),desc:r("settings.appearance.uiElements.showRelationshipsWidget.description"),getValue:()=>e.settings.showRelationships,setValue:async c=>{e.settings.showRelationships=c,t(),XT(n,e,t)}})),e.settings.showRelationships&&o.addSetting(l=>void Ur(l,{name:r("settings.appearance.uiElements.relationshipsPosition.name"),desc:r("settings.appearance.uiElements.relationshipsPosition.description"),options:[{value:"top",label:r("settings.appearance.uiElements.relationshipsPosition.options.top")},{value:"bottom",label:r("settings.appearance.uiElements.relationshipsPosition.options.bottom")}],getValue:()=>e.settings.relationshipsPosition,setValue:async c=>{e.settings.relationshipsPosition=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.uiElements.showTaskCardInNote.name"),desc:r("settings.appearance.uiElements.showTaskCardInNote.description"),getValue:()=>e.settings.showTaskCardInNote,setValue:async c=>{e.settings.showTaskCardInNote=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.uiElements.showCompletedTaskStrikethrough.name"),desc:r("settings.appearance.uiElements.showCompletedTaskStrikethrough.description"),getValue:()=>e.settings.showCompletedTaskStrikethrough,setValue:async c=>{e.settings.showCompletedTaskStrikethrough=c,t(),e.app.workspace.trigger("tasknotes:refresh-views")}})),o.addSetting(l=>void me(l,{name:r("settings.appearance.uiElements.showExpandableSubtasks.name"),desc:r("settings.appearance.uiElements.showExpandableSubtasks.description"),getValue:()=>e.settings.showExpandableSubtasks,setValue:async c=>{e.settings.showExpandableSubtasks=c,t(),XT(n,e,t)}})),e.settings.showExpandableSubtasks&&(o.addSetting(l=>void me(l,{name:r("settings.appearance.uiElements.expandSubtasksByDefault.name"),desc:r("settings.appearance.uiElements.expandSubtasksByDefault.description"),getValue:()=>e.settings.expandSubtasksByDefault,setValue:async c=>{e.settings.expandSubtasksByDefault=c,t()}})),o.addSetting(l=>void Ur(l,{name:r("settings.appearance.uiElements.subtaskChevronPosition.name"),desc:r("settings.appearance.uiElements.subtaskChevronPosition.description"),options:[{value:"left",label:r("settings.appearance.uiElements.subtaskChevronPosition.options.left")},{value:"right",label:r("settings.appearance.uiElements.subtaskChevronPosition.options.right")}],getValue:()=>e.settings.subtaskChevronPosition,setValue:async c=>{e.settings.subtaskChevronPosition=c,t()}}))),o.addSetting(l=>void Ur(l,{name:r("settings.appearance.uiElements.viewsButtonAlignment.name"),desc:r("settings.appearance.uiElements.viewsButtonAlignment.description"),options:[{value:"left",label:r("settings.appearance.uiElements.viewsButtonAlignment.options.left")},{value:"right",label:r("settings.appearance.uiElements.viewsButtonAlignment.options.right")}],getValue:()=>e.settings.viewsButtonAlignment,setValue:async c=>{e.settings.viewsButtonAlignment=c,t()}}))}),kt(n,{heading:r("settings.general.taskInteraction.header"),description:r("settings.general.taskInteraction.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.general.taskInteraction.singleClick.name"),desc:r("settings.general.taskInteraction.singleClick.description"),options:[{value:"edit",label:r("settings.general.taskInteraction.actions.edit")},{value:"openNote",label:r("settings.general.taskInteraction.actions.openNote")}],getValue:()=>e.settings.singleClickAction,setValue:async c=>{e.settings.singleClickAction=c,t()}})),o.addSetting(l=>void Ur(l,{name:r("settings.general.taskInteraction.doubleClick.name"),desc:r("settings.general.taskInteraction.doubleClick.description"),options:[{value:"edit",label:r("settings.general.taskInteraction.actions.edit")},{value:"openNote",label:r("settings.general.taskInteraction.actions.openNote")},{value:"none",label:r("settings.general.taskInteraction.actions.none")}],getValue:()=>e.settings.doubleClickAction,setValue:async c=>{e.settings.doubleClickAction=c,t()}}))})}var z8=require("obsidian");tc();var r1=require("obsidian"),O8=class extends r1.Modal{constructor(e,t){super(e.app),this.plugin=e,this.hasExistingData=t}t(e,t){return this.plugin.i18n.translate(e,t)}show(){return new Promise(e=>{this.resolve=e,this.open()})}onOpen(){let{contentEl:e}=this;e.empty();let t=this.hasExistingData?"migrate":"switch",r=this.t(`modals.storageLocation.title.${t}`);new r1.Setting(e).setName(r).setHeading();let a=this.t(`modals.storageLocation.message.${t}`),s=e.createEl("p").createEl("strong");s.textContent=a,e.createEl("br"),e.createEl("p",{text:this.t("modals.storageLocation.whatThisMeans")});let o=e.createEl("ul");[this.t("modals.storageLocation.bullets.dailyNotesRequired"),this.t("modals.storageLocation.bullets.storedInNotes"),this.hasExistingData?this.t("modals.storageLocation.bullets.migrateData"):this.t("modals.storageLocation.bullets.futureSessions"),this.t("modals.storageLocation.bullets.dataLongevity")].forEach(m=>{let f=o.createEl("li");f.textContent=m}),e.createEl("br");let c=e.createEl("p");if(this.hasExistingData){let m=c.createEl("strong");m.textContent=this.t("modals.storageLocation.finalNote.migrate")}else c.textContent=this.t("modals.storageLocation.finalNote.switch");let d=e.createDiv({cls:"modal-button-container"});d.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-display-none-6b99de8b","tn-static-min-height-800px-997b4c8c"),d.classList.add("tn-static-display-flex-75816cae"),d.classList.remove("tn-static-display-flex-8bb39979","tn-static-gap-0-5rem-ce2fca4d","tn-static-gap-12px-ed7b3d87","tn-static-gap-6px-f0abc1db","tn-static-gap-8px-33fcd4c3"),d.classList.add("tn-static-gap-10px-f3d7ce77"),d.classList.remove("tn-static-justify-content-center-03c4bb6f","tn-static-justify-content-space-between-a562f4fd"),d.classList.add("tn-static-justify-content-flex-end-455f8cca"),d.classList.remove("tn-static-font-size-12px-b0cc7e05","tn-static-margin-top-0-5rem-3dc98b5e","tn-static-margin-top-0-d462248a","tn-static-margin-top-12px-91e0f558","tn-static-margin-top-16px-1b0f4999","tn-static-margin-top-1rem-2239d6d5","tn-static-margin-top-30px-2fbbbcd4","tn-static-margin-top-4px-96ad6099","tn-static-margin-top-8px-8a77e5a3","tn-static-margin-top-8px-f4f01e68"),d.classList.add("tn-static-margin-top-20px-a26bda7d"),d.createEl("button",{text:this.t("common.cancel")}).addEventListener("click",()=>{this.resolve(!1),this.close()});let p=d.createEl("button",{text:this.hasExistingData?this.t("modals.storageLocation.buttons.migrate"):this.t("modals.storageLocation.buttons.switch"),cls:"mod-cta"});p.addEventListener("click",()=>{this.resolve(!0),this.close()}),window.setTimeout(()=>{p.focus()},50)}onClose(){let{contentEl:e}=this;e.empty(),this.resolve&&this.resolve(!1)}};async function QRe(n,e){return new O8(n,e).show()}var JRe={code:"en",name:"English",chronoLocale:"en",dateTriggers:{due:["due","deadline","must be done by","by"],scheduled:["scheduled for","start on","begin on","work on","on"]},recurrence:{frequencies:{daily:["daily","every day"],weekly:["weekly","every week"],monthly:["monthly","every month"],yearly:["yearly","annually","every year"]},every:["every"],other:["other"],weekdays:{monday:["monday"],tuesday:["tuesday"],wednesday:["wednesday"],thursday:["thursday"],friday:["friday"],saturday:["saturday"],sunday:["sunday"]},pluralWeekdays:{monday:["mondays"],tuesday:["tuesdays"],wednesday:["wednesdays"],thursday:["thursdays"],friday:["fridays"],saturday:["saturdays"],sunday:["sundays"]},ordinals:{first:["first"],second:["second"],third:["third"],fourth:["fourth"],last:["last"]},periods:{day:["day","days"],week:["week","weeks"],month:["month","months"],year:["year","years"]}},timeEstimate:{hours:["h","hr","hrs","hour","hours"],minutes:["m","min","mins","minute","minutes"]},fallbackStatus:{open:["todo","to do","open"],inProgress:["in progress","in-progress","doing"],done:["done","completed","finished"],cancelled:["cancelled","canceled"],waiting:["waiting","blocked","on hold"]},fallbackPriority:{urgent:["urgent","critical","highest"],high:["high","important"],normal:["medium","normal"],low:["low","minor"]}};var XRe={code:"es",name:"Español",chronoLocale:"es",dateTriggers:{due:["vence","fecha límite","debe terminarse","para el","antes del"],scheduled:["programado para","programado el","comenzar el","empezar el","trabajar en","el"]},recurrence:{frequencies:{daily:["diario","diaria","diariamente","cada día","todos los días","a diario"],weekly:["semanal","semanalmente","cada semana","todas las semanas","por semana"],monthly:["mensual","mensualmente","cada mes","todos los meses","por mes"],yearly:["anual","anualmente","cada año","todos los años","por año"]},every:["cada","todos los","todas las"],other:["otro","otra"],weekdays:{monday:["lunes"],tuesday:["martes"],wednesday:["miércoles"],thursday:["jueves"],friday:["viernes"],saturday:["sábado"],sunday:["domingo"]},pluralWeekdays:{monday:["lunes"],tuesday:["martes"],wednesday:["miércoles"],thursday:["jueves"],friday:["viernes"],saturday:["sábados"],sunday:["domingos"]},ordinals:{first:["primer","primera","primero"],second:["segundo","segunda"],third:["tercer","tercera","tercero"],fourth:["cuarto","cuarta"],last:["último","última"]},periods:{day:["día","días"],week:["semana","semanas"],month:["mes","meses"],year:["año","años"]}},timeEstimate:{hours:["h","hr","hrs","hora","horas"],minutes:["m","min","mins","minuto","minutos"]},fallbackStatus:{open:["pendiente","por hacer","abierto","todo"],inProgress:["en progreso","en curso","haciendo","trabajando"],done:["hecho","terminado","completado","finalizado"],cancelled:["cancelado","anulado"],waiting:["esperando","bloqueado","en espera"]},fallbackPriority:{urgent:["urgente","crítico","crítica","máximo","máxima","prioritario","prioritaria"],high:["alto","alta","importante","elevado","elevada"],normal:["medio","media","normal","regular","estándar"],low:["bajo","baja","menor","mínimo","mínima"]}};var e_e={code:"fr",name:"Français",chronoLocale:"fr",dateTriggers:{due:["échéance","date limite","doit être terminé","pour le","avant le"],scheduled:["programmé pour","programmé le","commencer le","débuter le","travailler sur","le"]},recurrence:{frequencies:{daily:["quotidien","quotidienne","quotidiennement","chaque jour","tous les jours","journalier","journalière"],weekly:["hebdomadaire","chaque semaine","toutes les semaines","par semaine"],monthly:["mensuel","mensuelle","mensuellement","chaque mois","tous les mois","par mois"],yearly:["annuel","annuelle","annuellement","chaque année","tous les ans","par an","par année"]},every:["chaque","tous les","toutes les"],other:["autre"],weekdays:{monday:["lundi"],tuesday:["mardi"],wednesday:["mercredi"],thursday:["jeudi"],friday:["vendredi"],saturday:["samedi"],sunday:["dimanche"]},pluralWeekdays:{monday:["lundis"],tuesday:["mardis"],wednesday:["mercredis"],thursday:["jeudis"],friday:["vendredis"],saturday:["samedis"],sunday:["dimanches"]},ordinals:{first:["premier","première"],second:["deuxième","second","seconde"],third:["troisième"],fourth:["quatrième"],last:["dernier","dernière"]},periods:{day:["jour","jours"],week:["semaine","semaines"],month:["mois"],year:["an","ans","année","années"]}},timeEstimate:{hours:["h","hr","hrs","heure","heures"],minutes:["m","min","mins","minute","minutes"]},fallbackStatus:{open:["à faire","ouvert","en attente","todo"],inProgress:["en cours","en progression","en train de faire"],done:["terminé","fini","accompli","fait"],cancelled:["annulé","abandonné"],waiting:["en attente","bloqué","suspendu"]},fallbackPriority:{urgent:["urgent","urgente","critique","maximum","prioritaire"],high:["élevé","élevée","haut","haute","important","importante","supérieur","supérieure"],normal:["moyen","moyenne","normal","normale","standard","régulier","régulière"],low:["faible","bas","basse","mineur","mineure","minimum"]}};var t_e={code:"de",name:"Deutsch",chronoLocale:"de",dateTriggers:{due:["fällig","termin","abgabe","deadline","bis zum","bis"],scheduled:["geplant für","geplant am","beginnen am","anfangen am","arbeiten an","am"]},recurrence:{frequencies:{daily:["täglich","jeden Tag","alle Tage","tagaus tagein"],weekly:["wöchentlich","jede Woche","alle Wochen"],monthly:["monatlich","jeden Monat","alle Monate"],yearly:["jährlich","jedes Jahr","alle Jahre"]},every:["jede","jeden","jedes","alle"],other:["andere","anderen","anderes"],weekdays:{monday:["montag"],tuesday:["dienstag"],wednesday:["mittwoch"],thursday:["donnerstag"],friday:["freitag"],saturday:["samstag"],sunday:["sonntag"]},pluralWeekdays:{monday:["montags"],tuesday:["dienstags"],wednesday:["mittwochs"],thursday:["donnerstags"],friday:["freitags"],saturday:["samstags"],sunday:["sonntags"]},ordinals:{first:["erste","ersten","erster"],second:["zweite","zweiten","zweiter"],third:["dritte","dritten","dritter"],fourth:["vierte","vierten","vierter"],last:["letzte","letzten","letzter"]},periods:{day:["tag","tage"],week:["woche","wochen"],month:["monat","monate"],year:["jahr","jahre"]}},timeEstimate:{hours:["h","std","stunde","stunden"],minutes:["m","min","minute","minuten"]},fallbackStatus:{open:["offen","zu erledigen","ausstehend","todo"],inProgress:["in bearbeitung","wird bearbeitet","läuft","in arbeit"],done:["erledigt","fertig","abgeschlossen","gemacht"],cancelled:["abgebrochen","storniert","abgesagt"],waiting:["wartend","warten","blockiert","pausiert"]},fallbackPriority:{urgent:["dringend","eilig","kritisch","sofort","höchste"],high:["hoch","hohe","wichtig","prioritär"],normal:["normal","mittel","mittlere","standard"],low:["niedrig","niedrige","gering","geringe"]}};var r_e={code:"ru",name:"Русский",chronoLocale:"ru",dateTriggers:{due:["срок","дедлайн","до","к","сдать до"],scheduled:["запланировано на","начать","работать над","на"]},recurrence:{frequencies:{daily:["ежедневно","каждый день","ежедневный","каждодневный"],weekly:["еженедельно","каждую неделю","еженедельный"],monthly:["ежемесячно","каждый месяц","ежемесячный"],yearly:["ежегодно","каждый год","ежегодный"]},every:["каждый","каждую","каждое","все"],other:["другой","другую","другое"],weekdays:{monday:["понедельник"],tuesday:["вторник"],wednesday:["среда"],thursday:["четверг"],friday:["пятница"],saturday:["суббота"],sunday:["воскресенье"]},pluralWeekdays:{monday:["по понедельникам"],tuesday:["по вторникам"],wednesday:["по средам"],thursday:["по четвергам"],friday:["по пятницам"],saturday:["по субботам"],sunday:["по воскресеньям"]},ordinals:{first:["первый","первая","первое"],second:["второй","вторая","второе"],third:["третий","третья","третье"],fourth:["четвертый","четвертая","четвертое"],last:["последний","последняя","последнее"]},periods:{day:["день","дни"],week:["неделя","недели"],month:["месяц","месяцы"],year:["год","годы"]}},timeEstimate:{hours:["ч","час","часа","часов"],minutes:["м","мин","минута","минуты","минут"]},fallbackStatus:{open:["открыто","к выполнению","новое","todo"],inProgress:["в работе","выполняется","в процессе"],done:["выполнено","готово","завершено","сделано"],cancelled:["отменено","отменён","отменена"],waiting:["ожидание","заблокировано","на паузе"]},fallbackPriority:{urgent:["срочно","критично","экстренно","немедленно"],high:["высокий","высокая","важно","приоритетно"],normal:["нормальный","нормальная","средний","средняя"],low:["низкий","низкая","неважно","можно позже"]}};var n_e={code:"zh",name:"中文",chronoLocale:"zh",dateTriggers:{due:["截止","到期","期限","在","之前"],scheduled:["安排在","计划在","开始在","在"]},recurrence:{frequencies:{daily:["每天","每日","天天","日常"],weekly:["每周","每星期","周周"],monthly:["每月","每个月","月月"],yearly:["每年","年年","每一年"]},every:["每","每个","每一个"],other:["其他","另一个"],weekdays:{monday:["周一","星期一","礼拜一"],tuesday:["周二","星期二","礼拜二"],wednesday:["周三","星期三","礼拜三"],thursday:["周四","星期四","礼拜四"],friday:["周五","星期五","礼拜五"],saturday:["周六","星期六","礼拜六"],sunday:["周日","星期日","礼拜日"]},pluralWeekdays:{monday:["周一","星期一","礼拜一"],tuesday:["周二","星期二","礼拜二"],wednesday:["周三","星期三","礼拜三"],thursday:["周四","星期四","礼拜四"],friday:["周五","星期五","礼拜五"],saturday:["周六","星期六","礼拜六"],sunday:["周日","星期日","礼拜日"]},ordinals:{first:["第一个","第一","首个"],second:["第二个","第二"],third:["第三个","第三"],fourth:["第四个","第四"],last:["最后一个","最后","末尾"]},periods:{day:["天","日"],week:["周","星期"],month:["月","个月"],year:["年"]}},timeEstimate:{hours:["小时","时","个小时"],minutes:["分钟","分","个分钟"]},fallbackStatus:{open:["待办","未完成","开放","新建"],inProgress:["进行中","正在处理","处理中","工作中"],done:["完成","已完成","结束","搞定"],cancelled:["取消","已取消","废弃"],waiting:["等待","暂停","阻塞","待定"]},fallbackPriority:{urgent:["紧急","急迫","立即","马上"],high:["高","重要","优先","高优先级"],normal:["正常","普通","中等","标准"],low:["低","不重要","低优先级","次要"]}};var a_e={code:"ja",name:"日本語",chronoLocale:"ja",dateTriggers:{due:["期限","締切","〆切","まで","までに","に"],scheduled:["予定","計画","開始","から","に開始","を開始"]},recurrence:{frequencies:{daily:["毎日","日々","毎日毎日","連日"],weekly:["毎週","週毎","週一","毎週毎週"],monthly:["毎月","月毎","月一","毎月毎月"],yearly:["毎年","年毎","年一","毎年毎年","年次"]},every:["毎","各","全て"],other:["他の","別の","異なる"],weekdays:{monday:["月曜日","月曜","月","げつようび"],tuesday:["火曜日","火曜","火","かようび"],wednesday:["水曜日","水曜","水","すいようび"],thursday:["木曜日","木曜","木","もくようび"],friday:["金曜日","金曜","金","きんようび"],saturday:["土曜日","土曜","土","どようび"],sunday:["日曜日","日曜","日","にちようび"]},pluralWeekdays:{monday:["月曜日","月曜","月","げつようび"],tuesday:["火曜日","火曜","火","かようび"],wednesday:["水曜日","水曜","水","すいようび"],thursday:["木曜日","木曜","木","もくようび"],friday:["金曜日","金曜","金","きんようび"],saturday:["土曜日","土曜","土","どようび"],sunday:["日曜日","日曜","日","にちようび"]},ordinals:{first:["最初の","第一の","一番目の","初回"],second:["二番目の","第二の","次の"],third:["三番目の","第三の"],fourth:["四番目の","第四の"],last:["最後の","最終の","終わりの"]},periods:{day:["日","日間"],week:["週","週間"],month:["月","月間","ヶ月"],year:["年","年間"]}},timeEstimate:{hours:["時間","時","じかん"],minutes:["分","分間","ふん","ぷん"]},fallbackStatus:{open:["未着手","新規","オープン","開始前","待機"],inProgress:["進行中","作業中","実行中","処理中","進行"],done:["完了","終了","済み","終わり","達成"],cancelled:["キャンセル","中止","取消","廃止","停止"],waiting:["待機","保留","ブロック","一時停止","待ち"]},fallbackPriority:{urgent:["緊急","至急","急務","最優先","すぐに"],high:["高","重要","優先","高優先度","重点"],normal:["普通","通常","標準","一般","ノーマル"],low:["低","軽微","後回し","低優先度","余裕"]}};var i_e={code:"it",name:"Italiano",chronoLocale:"it",dateTriggers:{due:["scadenza","entro","entro il","deve essere fatto entro","per il","termine"],scheduled:["programmato per","programmato il","iniziare il","lavorare su","il","per"]},recurrence:{frequencies:{daily:["giornaliero","giornaliera","quotidiano","quotidiana","ogni giorno","tutti i giorni","giornalmente"],weekly:["settimanale","ogni settimana","tutte le settimane","settimanalmente","alla settimana"],monthly:["mensile","ogni mese","tutti i mesi","mensilmente","al mese"],yearly:["annuale","ogni anno","tutti gli anni","annualmente","all'anno"]},every:["ogni","tutti i","tutte le"],other:["altro","altra","altri","altre"],weekdays:{monday:["lunedì"],tuesday:["martedì"],wednesday:["mercoledì"],thursday:["giovedì"],friday:["venerdì"],saturday:["sabato"],sunday:["domenica"]},pluralWeekdays:{monday:["lunedì"],tuesday:["martedì"],wednesday:["mercoledì"],thursday:["giovedì"],friday:["venerdì"],saturday:["sabati"],sunday:["domeniche"]},ordinals:{first:["primo","prima"],second:["secondo","seconda"],third:["terzo","terza"],fourth:["quarto","quarta"],last:["ultimo","ultima"]},periods:{day:["giorno","giorni"],week:["settimana","settimane"],month:["mese","mesi"],year:["anno","anni"]}},timeEstimate:{hours:["h","hr","ore","ora","o"],minutes:["m","min","minuto","minuti"]},fallbackStatus:{open:["da fare","aperto","pendente","todo","in sospeso"],inProgress:["in corso","in progresso","facendo","lavorando"],done:["fatto","completato","finito","terminato","chiuso"],cancelled:["cancellato","annullato","rimosso"],waiting:["in attesa","aspettando","bloccato","fermo"]},fallbackPriority:{urgent:["urgente","critico","critica","massimo","massima","prioritario","prioritaria"],high:["alto","alta","importante","elevato","elevata"],normal:["medio","media","normale","regolare","standard"],low:["basso","bassa","minore","minimo","minima"]}};var s_e={code:"nl",name:"Nederlands",chronoLocale:"nl",dateTriggers:{due:["vervalt op","deadline","moet klaar zijn op","tegen","uiterlijk","voor"],scheduled:["gepland voor","gepland op","beginnen op","werken aan","op","voor"]},recurrence:{frequencies:{daily:["dagelijks","elke dag","alle dagen","per dag"],weekly:["wekelijks","elke week","alle weken","per week"],monthly:["maandelijks","elke maand","alle maanden","per maand"],yearly:["jaarlijks","elk jaar","alle jaren","per jaar"]},every:["elke","alle","iedere"],other:["andere","ander"],weekdays:{monday:["maandag"],tuesday:["dinsdag"],wednesday:["woensdag"],thursday:["donderdag"],friday:["vrijdag"],saturday:["zaterdag"],sunday:["zondag"]},pluralWeekdays:{monday:["maandagen"],tuesday:["dinsdagen"],wednesday:["woensdagen"],thursday:["donderdagen"],friday:["vrijdagen"],saturday:["zaterdagen"],sunday:["zondagen"]},ordinals:{first:["eerste"],second:["tweede"],third:["derde"],fourth:["vierde"],last:["laatste"]},periods:{day:["dag","dagen"],week:["week","weken"],month:["maand","maanden"],year:["jaar","jaren"]}},timeEstimate:{hours:["u","uur","uren","h"],minutes:["m","min","minuut","minuten"]},fallbackStatus:{open:["te doen","open","nog te doen","todo","openstaand"],inProgress:["bezig","in behandeling","aan het werk","lopend","in uitvoering"],done:["klaar","voltooid","gedaan","afgerond","gesloten"],cancelled:["geannuleerd","afgezegd","ingetrokken"],waiting:["wachtend","in de wacht","geblokkeerd","uitgesteld"]},fallbackPriority:{urgent:["urgent","kritiek","hoogste","spoed","direct"],high:["hoog","hoge","belangrijk","belangrijke"],normal:["normaal","normale","gemiddeld","standaard"],low:["laag","lage","klein","kleine","onbelangrijk"]}};var o_e={code:"pt",name:"Português",chronoLocale:"pt",dateTriggers:{due:["vencimento","prazo","deve estar pronto até","até","para","limite"],scheduled:["programado para","agendado para","começar em","trabalhar em","em","no"]},recurrence:{frequencies:{daily:["diário","diária","diariamente","todos os dias","cada dia","por dia"],weekly:["semanal","semanalmente","toda semana","todas as semanas","por semana"],monthly:["mensal","mensalmente","todo mês","todos os meses","por mês"],yearly:["anual","anualmente","todo ano","todos os anos","por ano"]},every:["todo","toda","todos","todas","cada"],other:["outro","outra","outros","outras"],weekdays:{monday:["segunda","segunda-feira"],tuesday:["terça","terça-feira"],wednesday:["quarta","quarta-feira"],thursday:["quinta","quinta-feira"],friday:["sexta","sexta-feira"],saturday:["sábado"],sunday:["domingo"]},pluralWeekdays:{monday:["segundas","segundas-feiras"],tuesday:["terças","terças-feiras"],wednesday:["quartas","quartas-feiras"],thursday:["quintas","quintas-feiras"],friday:["sextas","sextas-feiras"],saturday:["sábados"],sunday:["domingos"]},ordinals:{first:["primeiro","primeira"],second:["segundo","segunda"],third:["terceiro","terceira"],fourth:["quarto","quarta"],last:["último","última"]},periods:{day:["dia","dias"],week:["semana","semanas"],month:["mês","meses"],year:["ano","anos"]}},timeEstimate:{hours:["h","hr","hora","horas"],minutes:["m","min","minuto","minutos"]},fallbackStatus:{open:["a fazer","pendente","aberto","todo","por fazer"],inProgress:["em andamento","em progresso","fazendo","trabalhando","executando"],done:["feito","concluído","terminado","finalizado","completo"],cancelled:["cancelado","anulado","suspenso"],waiting:["aguardando","esperando","bloqueado","em espera"]},fallbackPriority:{urgent:["urgente","crítico","crítica","máximo","máxima","prioritário","prioritária"],high:["alto","alta","importante","elevado","elevada"],normal:["médio","média","normal","regular","padrão"],low:["baixo","baixa","menor","mínimo","mínima"]}};var l_e={code:"sv",name:"Svenska",chronoLocale:"sv",dateTriggers:{due:["förfaller","deadline","måste vara klar","senast","till","innan"],scheduled:["schemalagd","planerad för","börja","arbeta med","den","på"]},recurrence:{frequencies:{daily:["dagligen","varje dag","alla dagar","per dag"],weekly:["veckovis","varje vecka","alla veckor","per vecka"],monthly:["månadsvis","varje månad","alla månader","per månad"],yearly:["årligen","varje år","alla år","per år"]},every:["varje","alla","var"],other:["annan","annat","andra"],weekdays:{monday:["måndag"],tuesday:["tisdag"],wednesday:["onsdag"],thursday:["torsdag"],friday:["fredag"],saturday:["lördag"],sunday:["söndag"]},pluralWeekdays:{monday:["måndagar"],tuesday:["tisdagar"],wednesday:["onsdagar"],thursday:["torsdagar"],friday:["fredagar"],saturday:["lördagar"],sunday:["söndagar"]},ordinals:{first:["första"],second:["andra"],third:["tredje"],fourth:["fjärde"],last:["sista"]},periods:{day:["dag","dagar"],week:["vecka","veckor"],month:["månad","månader"],year:["år"]}},timeEstimate:{hours:["t","tim","timme","timmar","h"],minutes:["m","min","minut","minuter"]},fallbackStatus:{open:["att göra","öppen","kvar","todo","väntande"],inProgress:["pågående","arbetar","gör","i process","under arbete"],done:["klar","färdig","slutförd","avslutad","gjord"],cancelled:["avbruten","inställd","avbokad"],waiting:["väntar","blockerad","pausad","vilande"]},fallbackPriority:{urgent:["brådskande","kritisk","högsta","akut","omedelbar"],high:["hög","viktig","förhöjd","prioriterad"],normal:["normal","medel","standard","vanlig"],low:["låg","mindre","minimal","obetydlig"]}};var c_e={code:"uk",name:"Українська",chronoLocale:"uk",dateTriggers:{due:["термін","дедлайн","має бути готово до","до","не пізніше","крайній термін"],scheduled:["заплановано на","запланований","почати","працювати над","на","в"]},recurrence:{frequencies:{daily:["щодня","щоденно","кожен день","всі дні","на день"],weekly:["щотижня","щотижнево","кожен тиждень","всі тижні","на тиждень"],monthly:["щомісяця","щомісячно","кожен місяць","всі місяці","на місяць"],yearly:["щороку","щорічно","кожен рік","всі роки","на рік"]},every:["кожен","кожна","кожне","всі"],other:["інший","інша","інше","інші"],weekdays:{monday:["понеділок"],tuesday:["вівторок"],wednesday:["середа"],thursday:["четвер"],friday:["п'ятниця"],saturday:["субота"],sunday:["неділя"]},pluralWeekdays:{monday:["понеділки"],tuesday:["вівторки"],wednesday:["середи"],thursday:["четверги"],friday:["п'ятниці"],saturday:["суботи"],sunday:["неділі"]},ordinals:{first:["перший","перша","перше"],second:["другий","друга","друге"],third:["третій","третя","третє"],fourth:["четвертий","четверта","четверте"],last:["останній","остання","останнє"]},periods:{day:["день","дні","днів"],week:["тиждень","тижні","тижнів"],month:["місяць","місяці","місяців"],year:["рік","роки","років"]}},timeEstimate:{hours:["г","год","година","години","годин"],minutes:["хв","мін","хвилина","хвилини","хвилин"]},fallbackStatus:{open:["зробити","відкритий","очікує","todo","в очікуванні"],inProgress:["в роботі","виконується","роблю","працюю","в процесі"],done:["готово","виконано","завершено","закінчено","зроблено"],cancelled:["скасовано","відмінено","припинено"],waiting:["чекаю","очікую","заблоковано","призупинено"]},fallbackPriority:{urgent:["терміново","критично","найвищий","невідкладно","пріоритетно"],high:["високий","висока","важливо","підвищений"],normal:["середній","середня","нормально","звичайно","стандартно"],low:["низький","низька","менший","мінімальний","незначний"]}};var Tdt={en:JRe,es:XRe,fr:e_e,de:t_e,ru:r_e,zh:n_e,ja:a_e,it:i_e,nl:s_e,pt:o_e,sv:l_e,uk:c_e};function d_e(){return Object.values(Tdt).map(n=>({value:n.code,label:n.name}))}Ll();va();async function bdt(n){if(!n.pomodoroService){let{PomodoroService:e}=await Promise.resolve().then(()=>(lq(),obe));n.pomodoroService=new e(n),await n.pomodoroService.initialize()}return n.pomodoroService}function os(n,e,t){n.empty();let r=(o,l)=>e.i18n.translate(o,l),a=NP(e),i=e.settings.inlineVisibleProperties||["status","priority","due","scheduled","recurrence"],s=t1(e,i);kt(n,{heading:r("settings.features.inlineTasks.header"),description:r("settings.features.inlineTasks.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.overlays.taskLinkToggle.name"),desc:r("settings.features.overlays.taskLinkToggle.description"),getValue:()=>e.settings.enableTaskLinkOverlay,setValue:async c=>{e.settings.enableTaskLinkOverlay=c,t(),os(n,e,t)}})),e.settings.enableTaskLinkOverlay&&(o.addSetting(l=>void me(l,{name:r("settings.features.overlays.aliasExclusion.name"),desc:r("settings.features.overlays.aliasExclusion.description"),getValue:()=>e.settings.disableOverlayOnAlias,setValue:async c=>{e.settings.disableOverlayOnAlias=c,t()}})),o.addSetting(l=>{l.setName("Inline task card properties").setDesc("Select which properties to show in inline task cards.").addButton(c=>{c.setButtonText("Configure").onClick(()=>{new JT(e.app,a,i,async u=>{e.settings.inlineVisibleProperties=u,t(),new z8.Notice("Inline task card properties updated"),os(n,e,t)},"Select Inline Task Card Properties","Choose which properties to display in inline task cards.").open()})})}),o.addSetting(l=>{l.setDesc(`Currently showing: ${s.join(", ")}`),l.settingEl.addClass("settings-view__group-description")})),o.addSetting(l=>void me(l,{name:r("settings.features.instantConvert.toggle.name"),desc:r("settings.features.instantConvert.toggle.description"),getValue:()=>e.settings.enableInstantTaskConvert,setValue:async c=>{e.settings.enableInstantTaskConvert=c,t(),os(n,e,t)}})),e.settings.enableInstantTaskConvert&&o.addSetting(l=>void me(l,{name:r("settings.features.instantConvert.preserveCheckbox.name"),desc:r("settings.features.instantConvert.preserveCheckbox.description"),getValue:()=>e.settings.preserveCheckboxOnConvert,setValue:async c=>{e.settings.preserveCheckboxOnConvert=c,t()}}))}),kt(n,{heading:r("settings.features.nlp.header"),description:r("settings.features.nlp.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.nlp.enable.name"),desc:r("settings.features.nlp.enable.description"),getValue:()=>e.settings.enableNaturalLanguageInput,setValue:async c=>{e.settings.enableNaturalLanguageInput=c,t(),os(n,e,t)}})),e.settings.enableNaturalLanguageInput&&(o.addSetting(l=>void me(l,{name:r("settings.features.nlp.defaultToScheduled.name"),desc:r("settings.features.nlp.defaultToScheduled.description"),getValue:()=>e.settings.nlpDefaultToScheduled,setValue:async c=>{e.settings.nlpDefaultToScheduled=c,t()}})),o.addSetting(l=>void Ur(l,{name:r("settings.features.nlp.language.name"),desc:r("settings.features.nlp.language.description"),options:d_e(),getValue:()=>e.settings.nlpLanguage,setValue:async c=>{e.settings.nlpLanguage=c,t()}})))}),kt(n,{heading:r("settings.features.taskCreation.header"),description:r("settings.features.taskCreation.description")},o=>{o.addSetting(l=>void Ur(l,{name:r("settings.features.taskCreation.openAfterCreate.name"),desc:r("settings.features.taskCreation.openAfterCreate.description"),options:[{value:"none",label:r("settings.features.taskCreation.openAfterCreate.options.none")},{value:"same-tab",label:r("settings.features.taskCreation.openAfterCreate.options.sameTab")},{value:"new-tab",label:r("settings.features.taskCreation.openAfterCreate.options.newTab")}],getValue:()=>e.settings.openTaskAfterCreation,setValue:async c=>{e.settings.openTaskAfterCreation=c,t()}}))}),kt(n,{heading:r("settings.defaults.header.bodyTemplate"),description:r("settings.defaults.description.bodyTemplate")},o=>{o.addSetting(l=>void me(l,{name:r("settings.defaults.bodyTemplate.useBodyTemplate.name"),desc:r("settings.defaults.bodyTemplate.useBodyTemplate.description"),getValue:()=>e.settings.taskCreationDefaults.useBodyTemplate,setValue:async c=>{e.settings.taskCreationDefaults.useBodyTemplate=c,t(),os(n,e,t)}})),e.settings.taskCreationDefaults.useBodyTemplate&&o.addSetting(l=>void rn(l,{name:r("settings.defaults.bodyTemplate.bodyTemplateFile.name"),desc:r("settings.defaults.bodyTemplate.bodyTemplateFile.description"),placeholder:r("settings.defaults.bodyTemplate.bodyTemplateFile.placeholder"),getValue:()=>e.settings.taskCreationDefaults.bodyTemplate,setValue:async c=>{e.settings.taskCreationDefaults.bodyTemplate=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.defaults.bodyTemplate.useOccurrenceBodyTemplate.name"),desc:r("settings.defaults.bodyTemplate.useOccurrenceBodyTemplate.description"),getValue:()=>e.settings.taskCreationDefaults.useOccurrenceBodyTemplate,setValue:async c=>{e.settings.taskCreationDefaults.useOccurrenceBodyTemplate=c,t(),os(n,e,t)}})),e.settings.taskCreationDefaults.useOccurrenceBodyTemplate&&o.addSetting(l=>void rn(l,{name:r("settings.defaults.bodyTemplate.occurrenceBodyTemplateFile.name"),desc:r("settings.defaults.bodyTemplate.occurrenceBodyTemplateFile.description"),placeholder:r("settings.defaults.bodyTemplate.occurrenceBodyTemplateFile.placeholder"),getValue:()=>e.settings.taskCreationDefaults.occurrenceBodyTemplate,setValue:async c=>{e.settings.taskCreationDefaults.occurrenceBodyTemplate=c,t()}})),(e.settings.taskCreationDefaults.useBodyTemplate||e.settings.taskCreationDefaults.useOccurrenceBodyTemplate)&&o.addSetting(l=>{let c=[r("settings.defaults.bodyTemplate.variables.title"),r("settings.defaults.bodyTemplate.variables.details"),r("settings.defaults.bodyTemplate.variables.date"),r("settings.defaults.bodyTemplate.variables.time"),r("settings.defaults.bodyTemplate.variables.priority"),r("settings.defaults.bodyTemplate.variables.status"),r("settings.defaults.bodyTemplate.variables.contexts"),r("settings.defaults.bodyTemplate.variables.tags"),r("settings.defaults.bodyTemplate.variables.projects")];l.setName(r("settings.defaults.bodyTemplate.variablesHeader")),l.setDesc(c.join(" • "))}),o.addSetting(l=>void me(l,{name:r("settings.defaults.instantConversion.useDefaultsOnInstantConvert.name"),desc:r("settings.defaults.instantConversion.useDefaultsOnInstantConvert.description"),getValue:()=>e.settings.useDefaultsOnInstantConvert,setValue:async c=>{e.settings.useDefaultsOnInstantConvert=c,t()}}))}),kt(n,{heading:r("settings.features.pomodoro.header"),description:r("settings.features.pomodoro.description")},o=>{o.addSetting(l=>void ui(l,{name:r("settings.features.pomodoro.workDuration.name"),desc:r("settings.features.pomodoro.workDuration.description"),placeholder:"25",min:1,max:120,getValue:()=>e.settings.pomodoroWorkDuration,setValue:async c=>{e.settings.pomodoroWorkDuration=c,t()}})),o.addSetting(l=>void ui(l,{name:r("settings.features.pomodoro.shortBreak.name"),desc:r("settings.features.pomodoro.shortBreak.description"),placeholder:"5",min:1,max:60,getValue:()=>e.settings.pomodoroShortBreakDuration,setValue:async c=>{e.settings.pomodoroShortBreakDuration=c,t()}})),o.addSetting(l=>void ui(l,{name:r("settings.features.pomodoro.longBreak.name"),desc:r("settings.features.pomodoro.longBreak.description"),placeholder:"15",min:1,max:120,getValue:()=>e.settings.pomodoroLongBreakDuration,setValue:async c=>{e.settings.pomodoroLongBreakDuration=c,t()}})),o.addSetting(l=>void ui(l,{name:r("settings.features.pomodoro.longBreakInterval.name"),desc:r("settings.features.pomodoro.longBreakInterval.description"),placeholder:"4",min:1,max:10,getValue:()=>e.settings.pomodoroLongBreakInterval,setValue:async c=>{e.settings.pomodoroLongBreakInterval=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.pomodoro.autoStartBreaks.name"),desc:r("settings.features.pomodoro.autoStartBreaks.description"),getValue:()=>e.settings.pomodoroAutoStartBreaks,setValue:async c=>{e.settings.pomodoroAutoStartBreaks=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.pomodoro.autoStartWork.name"),desc:r("settings.features.pomodoro.autoStartWork.description"),getValue:()=>e.settings.pomodoroAutoStartWork,setValue:async c=>{e.settings.pomodoroAutoStartWork=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.pomodoro.notifications.name"),desc:r("settings.features.pomodoro.notifications.description"),getValue:()=>e.settings.pomodoroNotifications,setValue:async c=>{e.settings.pomodoroNotifications=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.pomodoro.statusBar.name"),desc:r("settings.features.pomodoro.statusBar.description"),getValue:()=>e.settings.showPomodoroInStatusBar,setValue:async c=>{var d;e.settings.showPomodoroInStatusBar=c,t(),(d=e.statusBarService)==null||d.updateVisibility()}})),o.addSetting(l=>void me(l,{name:r("settings.features.pomodoroSound.enabledName"),desc:r("settings.features.pomodoroSound.enabledDesc"),getValue:()=>e.settings.pomodoroSoundEnabled,setValue:async c=>{e.settings.pomodoroSoundEnabled=c,t(),os(n,e,t)}})),e.settings.pomodoroSoundEnabled&&o.addSetting(l=>void ui(l,{name:r("settings.features.pomodoroSound.volumeName"),desc:r("settings.features.pomodoroSound.volumeDesc"),placeholder:"50",min:0,max:100,getValue:()=>e.settings.pomodoroSoundVolume,setValue:async c=>{e.settings.pomodoroSoundVolume=c,t()}})),o.addSetting(l=>void Ur(l,{name:r("settings.features.dataStorage.name"),desc:r("settings.features.dataStorage.description"),options:[{value:"plugin",label:r("settings.features.dataStorage.pluginData")},{value:"daily-notes",label:r("settings.features.dataStorage.dailyNotes")}],getValue:()=>e.settings.pomodoroStorageLocation,setValue:async c=>{let d=c;if(d!==e.settings.pomodoroStorageLocation){let u=await e.loadData(),p=Array.isArray(u==null?void 0:u.pomodoroHistory)&&u.pomodoroHistory.length>0;if(await QRe(e,p))try{d==="daily-notes"&&await(await bdt(e)).migrateTodailyNotes(),e.settings.pomodoroStorageLocation=d,t(),new z8.Notice(r("settings.features.dataStorage.notices.locationChanged",{location:r(d==="plugin"?"settings.features.dataStorage.pluginData":"settings.features.dataStorage.dailyNotes")}))}catch(f){os(n,e,t)}else os(n,e,t)}}})),o.addSetting(l=>void Ur(l,{name:r("settings.features.pomodoro.mobileSidebar.name"),desc:r("settings.features.pomodoro.mobileSidebar.description"),options:[{value:"tab",label:r("settings.features.pomodoro.mobileSidebar.tab")},{value:"left",label:r("settings.features.pomodoro.mobileSidebar.left")},{value:"right",label:r("settings.features.pomodoro.mobileSidebar.right")}],getValue:()=>e.settings.pomodoroMobileSidebar,setValue:async c=>{e.settings.pomodoroMobileSidebar=c,t()}}))}),kt(n,{heading:r("settings.features.notifications.header"),description:r("settings.features.notifications.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.notifications.enableName"),desc:r("settings.features.notifications.enableDesc"),getValue:()=>e.settings.enableNotifications,setValue:async c=>{e.settings.enableNotifications=c,t(),os(n,e,t)}})),e.settings.enableNotifications&&(o.addSetting(l=>void Ur(l,{name:r("settings.features.notifications.typeName"),desc:r("settings.features.notifications.typeDesc"),options:[{value:"in-app",label:r("settings.features.notifications.inAppLabel")},{value:"system",label:r("settings.features.notifications.systemLabel")}],getValue:()=>e.settings.notificationType,setValue:async c=>{e.settings.notificationType=c,t()}})),o.addSetting(l=>void Xl(l,{name:r("settings.features.notifications.testReminderName"),desc:r("settings.features.notifications.testReminderDesc"),buttonText:r("settings.features.notifications.testReminderButton"),onClick:async()=>{var c;await((c=e.notificationService)==null?void 0:c.sendTestReminderNotification())}})),o.addSetting(l=>void me(l,{name:r("settings.features.notifications.soundEnabledName"),desc:r("settings.features.notifications.soundEnabledDesc"),getValue:()=>e.settings.notificationSoundEnabled,setValue:async c=>{e.settings.notificationSoundEnabled=c,t(),os(n,e,t)}})),e.settings.notificationSoundEnabled&&(o.addSetting(l=>void ui(l,{name:r("settings.features.notifications.soundVolumeName"),desc:r("settings.features.notifications.soundVolumeDesc"),placeholder:"50",min:0,max:100,getValue:()=>e.settings.notificationSoundVolume,setValue:async c=>{e.settings.notificationSoundVolume=c,t()}})),o.addSetting(l=>void Xl(l,{name:r("settings.features.notifications.soundPreviewName"),desc:r("settings.features.notifications.soundPreviewDesc"),buttonText:r("settings.features.notifications.soundPreviewButton"),onClick:()=>{var c;(c=e.notificationService)==null||c.playNotificationSound()}}))))}),kt(n,{heading:r("settings.features.performance.header"),description:r("settings.features.performance.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.overdue.hideCompletedName"),desc:r("settings.features.overdue.hideCompletedDesc"),getValue:()=>e.settings.hideCompletedFromOverdue,setValue:async c=>{e.settings.hideCompletedFromOverdue=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.indexing.disableName"),desc:r("settings.features.indexing.disableDesc"),getValue:()=>e.settings.disableNoteIndexing,setValue:async c=>{e.settings.disableNoteIndexing=c,t()}})),e.settings.suggestionDebounceMs!==void 0&&o.addSetting(l=>void ui(l,{name:r("settings.features.suggestions.debounceName"),desc:r("settings.features.suggestions.debounceDesc"),placeholder:"300",min:0,max:2e3,getValue:()=>e.settings.suggestionDebounceMs||0,setValue:async c=>{e.settings.suggestionDebounceMs=c>0?c:void 0,t()}}))}),kt(n,{heading:r("settings.features.timeTrackingSection.header"),description:r("settings.features.timeTrackingSection.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.timeTracking.autoStopName"),desc:r("settings.features.timeTracking.autoStopDesc"),getValue:()=>e.settings.autoStopTimeTrackingOnComplete,setValue:async c=>{e.settings.autoStopTimeTrackingOnComplete=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.timeTracking.stopNotificationName"),desc:r("settings.features.timeTracking.stopNotificationDesc"),getValue:()=>e.settings.autoStopTimeTrackingNotification,setValue:async c=>{e.settings.autoStopTimeTrackingNotification=c,t()}}))}),kt(n,{heading:r("settings.features.recurringSection.header"),description:r("settings.features.recurringSection.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.recurring.maintainOffsetName"),desc:r("settings.features.recurring.maintainOffsetDesc"),getValue:()=>e.settings.maintainDueDateOffsetInRecurring,setValue:async c=>{e.settings.maintainDueDateOffsetInRecurring=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.recurring.resetCheckboxesName"),desc:r("settings.features.recurring.resetCheckboxesDesc"),getValue:()=>e.settings.resetCheckboxesOnRecurrence,setValue:async c=>{e.settings.resetCheckboxesOnRecurrence=c,t()}}))}),kt(n,{heading:r("settings.features.timeblocking.header"),description:r("settings.features.timeblocking.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.timeblocking.enableName"),desc:r("settings.features.timeblocking.enableDesc"),getValue:()=>e.settings.calendarViewSettings.enableTimeblocking,setValue:async c=>{e.settings.calendarViewSettings.enableTimeblocking=c,t(),os(n,e,t)}})),e.settings.calendarViewSettings.enableTimeblocking&&(o.addSetting(l=>void Ur(l,{name:"Attachment Search Order",desc:"Controls how files are ordered in the Add Attachment search window for timeblocks.",options:[{value:"name-asc",label:"Name (A to Z)"},{value:"name-desc",label:"Name (Z to A)"},{value:"path-asc",label:"Path (A to Z)"},{value:"path-desc",label:"Path (Z to A)"},{value:"created-recent",label:"Created (Newest first)"},{value:"created-oldest",label:"Created (Oldest first)"},{value:"modified-recent",label:"Modified (Newest first)"},{value:"modified-oldest",label:"Modified (Oldest first)"}],getValue:()=>e.settings.calendarViewSettings.timeblockAttachmentSearchOrder,setValue:async c=>{e.settings.calendarViewSettings.timeblockAttachmentSearchOrder=c,t()}})),o.addSetting(l=>void me(l,{name:r("settings.features.timeblocking.showBlocksName"),desc:r("settings.features.timeblocking.showBlocksDesc"),getValue:()=>e.settings.calendarViewSettings.defaultShowTimeblocks,setValue:async c=>{e.settings.calendarViewSettings.defaultShowTimeblocks=c,t()}})),o.addSetting(l=>{l.setName(r("settings.features.timeblocking.defaultColorName")).setDesc(r("settings.features.timeblocking.defaultColorDesc")).addText(c=>{qf(c.inputEl),c.setValue(xd(e.settings.calendarViewSettings.defaultTimeblockColor)),c.onChange(d=>{e.settings.calendarViewSettings.defaultTimeblockColor=hr(d,e.settings.calendarViewSettings.defaultTimeblockColor),t()})})}),o.addSetting(l=>{l.setDesc(r("settings.features.timeblocking.usage")),l.settingEl.addClass("settings-view__group-description")}))}),kt(n,{heading:r("settings.features.debugLogging.header"),description:r("settings.features.debugLogging.description")},o=>{o.addSetting(l=>void me(l,{name:r("settings.features.debugLogging.enableName"),desc:r("settings.features.debugLogging.enableDesc"),getValue:()=>e.settings.enableDebugLogging,setValue:async c=>{e.settings.enableDebugLogging=c,t()}}))})}var fe=require("obsidian");var u_e=require("obsidian");q();var wdt=M({tag:"Api/LoadAPIEndpoints"});function Sdt(n){return n instanceof Error?n.message:String(n)}function Cdt(n=8080,e={}){var a;let t={url:`http://localhost:${n}/api/docs`,throw:!1},r=(a=e.apiAuthToken)==null?void 0:a.trim();return r&&(t.headers={Authorization:`Bearer ${r}`}),t}async function p_e(n,e=8080,t={}){let r=n.createEl("p",{text:"Loading API endpoints...",attr:{style:"color: var(--text-muted); font-style: italic; margin: 16px 0;"}});try{let a=await(0,u_e.requestUrl)(Cdt(e,t));if(a.status<200||a.status>=300)throw new Error(`API unavailable (${a.status})`);let i=a.json;r.remove();let s={};if(i.paths)for(let[o,l]of Object.entries(i.paths))for(let[c,d]of Object.entries(l)){let p=(d.tags||["General"])[0];s[p]||(s[p]=[]),s[p].push({method:c.toUpperCase(),path:o,summary:d.summary||d.description||"No description"})}Object.keys(s).length>0?Object.entries(s).forEach(([o,l])=>{n.createEl("h5",{text:o,attr:{style:"margin: 16px 0 8px 0; font-weight: 600; color: var(--text-normal);"}});let c=n.createEl("ul");l.forEach(d=>{c.createEl("li",{text:`${d.method} ${d.path} - ${d.summary}`})})}):n.createEl("p",{text:"No API endpoints found in specification.",attr:{style:"color: var(--text-muted); margin: 16px 0;"}})}catch(a){wdt.error("Error loading API endpoints:",{category:"provider",operation:"loading-api-endpoints",error:a}),r.remove(),n.createEl("p",{text:`API server not accessible (${Sdt(a)}). Ensure the TaskNotes API server is running on port ${e}.`,attr:{style:"color: var(--text-muted); font-style: italic; margin: 16px 0;"}})}}Bk();tc();Fi();Sq();va();q();var $o=M({tag:"Settings/Tabs/IntegrationsTab"});function Lu(n,e){let r=new Date().getTime()-n.getTime(),a=Math.floor(r/1e3),i=Math.floor(a/60),s=Math.floor(i/60),o=Math.floor(s/24);return o>0?e("settings.integrations.timeFormats.daysAgo",{days:o,plural:o>1?"s":""}):s>0?e("settings.integrations.timeFormats.hoursAgo",{hours:s,plural:s>1?"s":""}):i>0?e("settings.integrations.timeFormats.minutesAgo",{minutes:i,plural:i>1?"s":""}):e("settings.integrations.timeFormats.justNow")}function B8(n){return n instanceof Error?n.message:String(n)}var xdt=["title","zettel","timestamp","custom"],Edt=["series","instance"];function Ddt(n){return xdt.some(e=>e===n)}function Pdt(n){return Edt.some(e=>e===n)}function Adt(n){return Array.isArray(n)?n.filter(e=>e>0).join(", "):typeof n=="number"&&n>0?n.toString():""}function Mdt(n){let e=n.split(/[,\s]+/).map(r=>Math.trunc(Number(r.trim()))).filter(r=>Number.isFinite(r)&&r>0).map(r=>Math.min(r,_s.MAX_REMINDER_MINUTES)),t=Array.from(new Set(e));return t.length===0?null:t.length===1?t[0]:t}function m_e(n,e,t,r){var d;let a=n.oauthService,i=a==null?void 0:a.getCredentials(e),s=Ge("text",t,(d=i==null?void 0:i.clientId)!=null?d:""),o=Ge("text",i!=null&&i.clientSecret?"Stored securely - enter a new value to replace":r,"");o.setAttribute("type","password");let l=()=>{if(!a)return;let u=a.getCredentials(e),p=s.value.trim();!p&&!(u!=null&&u.clientSecret)||a.setCredentials(e,{clientId:p,...u!=null&&u.clientSecret?{clientSecret:u.clientSecret}:{}})},c=()=>{if(!a)return;let u=o.value.trim();u&&(a.setCredentials(e,{clientId:s.value.trim(),clientSecret:u}),o.value="",o.placeholder="Stored securely - enter a new value to replace")};return s.addEventListener("blur",l),o.addEventListener("blur",c),{clientIdInput:s,clientSecretInput:o,persistPendingValues:()=>{c(),l()},hasStoredCredentials:i!==null}}var f_e=[{id:"task.created",label:"Task Created",desc:"When new tasks are created"},{id:"task.updated",label:"Task Updated",desc:"When tasks are modified"},{id:"task.completed",label:"Task Completed",desc:"When tasks are marked complete"},{id:"task.deleted",label:"Task Deleted",desc:"When tasks are deleted"},{id:"task.archived",label:"Task Archived",desc:"When tasks are archived"},{id:"task.unarchived",label:"Task Unarchived",desc:"When tasks are unarchived"},{id:"time.started",label:"Time Started",desc:"When time tracking starts"},{id:"time.stopped",label:"Time Stopped",desc:"When time tracking stops"},{id:"pomodoro.started",label:"Pomodoro Started",desc:"When pomodoro sessions begin"},{id:"pomodoro.completed",label:"Pomodoro Completed",desc:"When pomodoro sessions finish"},{id:"pomodoro.interrupted",label:"Pomodoro Interrupted",desc:"When pomodoro sessions are stopped"},{id:"recurring.instance.completed",label:"Recurring Instance Completed",desc:"When recurring task instances complete"},{id:"reminder.triggered",label:"Reminder Triggered",desc:"When task reminders activate"}];function Ng(n,e,t){n.empty();let r=(d,u)=>e.i18n.translate(d,u),a=x_(e.settings);kt(n,{heading:r("settings.integrations.mdbaseSpec.header")},d=>{d.addSetting(u=>{me(u,{name:r("settings.integrations.mdbaseSpec.enable.name"),desc:"",getValue:()=>e.settings.enableMdbaseSpec,setValue:f=>{e.settings.enableMdbaseSpec=f,t()}});let p=u.descEl;p.createSpan({text:r("settings.integrations.mdbaseSpec.enable.description")+" "}),p.createEl("a",{text:r("settings.integrations.mdbaseSpec.learnMore"),href:"https://mdbase.dev"}).setAttr("target","_blank")})}),kt(n,{heading:"OAuth Calendar Integration"},d=>{d.addSetting(u=>{u.setDesc("Connect your Google calendar or Microsoft outlook to sync events directly into tasknotes.");let p=u.descEl;p.createSpan({text:" You'll need to create OAuth credentials with Google and/or Microsoft. This takes approximately 15 minutes for initial setup. "}),p.createEl("a",{text:"View calendar setup guide",href:"https://callumalpass.github.io/tasknotes/calendar-setup"}).setAttr("target","_blank")}),d.addSetting(u=>void me(u,{name:r("settings.integrations.mobileCalendar.disable.name"),desc:r("settings.integrations.mobileCalendar.disable.description"),getValue:()=>e.settings.disableCalendarOnMobile,setValue:async p=>{e.settings.disableCalendarOnMobile=p,t(),fe.Platform.isMobile&&Ng(n,e,t)}})),a&&d.addSetting(u=>{u.setName(r("settings.integrations.mobileCalendar.status.name")),u.setDesc(r("settings.integrations.mobileCalendar.status.description"))})});let i=n.createDiv("google-calendar-integration-container"),s=async()=>{if(i.empty(),!e.oauthService){sr(i,{header:{primaryText:"Google Calendar",secondaryText:"OAuth service not available",meta:[pi("Error","inactive")]}});return}let d=await e.oauthService.isConnected("google"),u=d?await e.oauthService.getConnection("google"):null;if(d&&u){let p=u.connectedAt?new Date(u.connectedAt):null,m=p?Lu(p,r):"",f=activeWindow.createDiv();f.className="tasknotes-calendar-info",f.textContent=p?`Connected ${m}`:"Connected";let h=activeWindow.createDiv();if(h.className="tasknotes-calendar-info",u.lastRefreshed){let g=new Date(u.lastRefreshed);h.textContent=`Last refreshed ${Lu(g,r)}`}else h.textContent="Never refreshed";sr(i,{collapsible:!0,defaultCollapsed:!1,colorIndicator:{color:"#4285F4"},header:{primaryText:"Google Calendar",secondaryText:"OAuth 2.0 Connection",meta:[pi("Connected","active")]},content:{sections:[{rows:[{label:"Status:",input:f},{label:"Sync:",input:h}]}]},actions:{buttons:[{text:"Refresh Now",icon:"refresh-cw",variant:"primary",onClick:async()=>{try{e.googleCalendarService&&(await e.googleCalendarService.refresh(),new fe.Notice("Google calendar refreshed successfully"),s())}catch(g){$o.error("Failed to refresh:",{category:"configuration",operation:"refresh",error:g}),new fe.Notice("Failed to refresh Google calendar")}}},{text:"Disconnect",icon:"log-out",variant:"warning",onClick:async()=>{try{let g=e.oauthService;if(!g)return;await g.disconnect("google"),new fe.Notice("Disconnected from Google calendar"),s()}catch(g){$o.error("Failed to disconnect:",{category:"configuration",operation:"disconnect",error:g}),new fe.Notice("Failed to disconnect from Google calendar")}}}]}})}else{let p=activeWindow.createDiv();p.className="tasknotes-calendar-help",p.textContent="Connect your Google calendar account to sync events directly into tasknotes. Events will automatically refresh every 15 minutes.";let m=[{rows:[{label:"Info:",input:p,fullWidth:!0}]}],f=m_e(e,"google","your-client-id.apps.googleusercontent.com","your-client-secret"),h=activeWindow.createDiv();h.className="tasknotes-credential-note",h.textContent="Enter your OAUTH app credentials from Google cloud console. Obsidian secret storage encrypts credentials at rest when supported by the operating system.",m.push({rows:[{label:"Client ID:",input:f.clientIdInput},{label:"Client Secret:",input:f.clientSecretInput},{label:"",input:h,fullWidth:!0}]}),sr(i,{collapsible:!0,defaultCollapsed:!1,colorIndicator:{color:"#9AA0A6"},header:{primaryText:"Google Calendar",secondaryText:"OAuth 2.0 Connection",meta:[pi("Not Connected","inactive")]},content:{sections:m},actions:{buttons:[{text:"Connect Google Calendar",icon:"link",variant:"primary",onClick:async()=>{try{let g=e.oauthService;if(!g)return;f.persistPendingValues(),await g.authenticate("google"),new fe.Notice("Google calendar connected successfully!"),s()}catch(g){$o.error("Failed to connect:",{category:"configuration",operation:"connect",error:g}),new fe.Notice(`Failed to connect: ${B8(g)}`)}}},...f.hasStoredCredentials?[{text:"Forget saved credentials",icon:"trash-2",variant:"warning",onClick:async()=>{await ur(e.app,{title:"Forget Google OAuth credentials?",message:"This removes the saved client ID and client secret from Obsidian Secret Storage.",confirmText:"Forget credentials",isDestructive:!0})&&(e.oauthService.clearCredentials("google"),new fe.Notice("Forgot Google OAUTH credentials"),s())}}]:[]]}})}};s();let o=n.createDiv("microsoft-calendar-integration-container"),l=async()=>{var p;if(o.empty(),!e.oauthService){sr(o,{header:{primaryText:"Microsoft Outlook Calendar",secondaryText:"OAuth service not available",meta:[pi("Error","inactive")]}});return}let d=await e.oauthService.isConnected("microsoft"),u=d?await e.oauthService.getConnection("microsoft"):null;if(d&&u){let m=u.connectedAt?new Date(u.connectedAt):null,f=m?Lu(m,r):"",h=activeWindow.createDiv();h.className="tasknotes-calendar-info",h.textContent=m?`Connected ${f}`:"Connected";let g=activeWindow.createDiv();if(g.className="tasknotes-calendar-info",u.lastRefreshed){let b=new Date(u.lastRefreshed);g.textContent=`OAuth token refreshed ${Lu(b,r)}`}else g.textContent="Token not refreshed yet";let v=(p=e.microsoftCalendarService)==null?void 0:p.getSyncStatus(),k=activeWindow.createDiv();if(k.className="tasknotes-calendar-info",!e.microsoftCalendarService)k.addClass("tasknotes-calendar-info--warning"),k.textContent="Calendar sync service not available";else if(v!=null&&v.lastError){k.addClass("tasknotes-calendar-info--warning");let b=v.lastAttempt?new Date(v.lastAttempt):null,w=b?` ${Lu(b,r)}`:"";k.textContent=`Calendar sync failed${w}: ${v.lastError}`}else if(v!=null&&v.lastSuccess){let b=new Date(v.lastSuccess);k.textContent=`Calendar sync succeeded ${Lu(b,r)} (${v.eventsLoaded} events)`}else if(v!=null&&v.lastAttempt){let b=new Date(v.lastAttempt);k.textContent=`Calendar sync checked ${Lu(b,r)}`}else k.textContent="Calendar events not refreshed yet";let T=[{label:"Status:",input:h},{label:"Token:",input:g},{label:"Sync:",input:k}];if(v!=null&&v.calendarErrors.length){let b=activeWindow.createDiv();b.className="tasknotes-calendar-info tasknotes-calendar-info--warning";let w=v.calendarErrors[0],S=w.calendarName||w.calendarId||"Microsoft calendar";b.textContent=v.calendarErrors.length===1?`${S}: ${w.message}`:`${v.calendarErrors.length} calendars failed. First error: ${S}: ${w.message}`,T.push({label:"Issue:",input:b,fullWidth:!0})}sr(o,{collapsible:!0,defaultCollapsed:!1,colorIndicator:{color:"#0078D4"},header:{primaryText:"Microsoft Outlook Calendar",secondaryText:"OAuth 2.0 Connection",meta:[pi("Connected","active")]},content:{sections:[{rows:T}]},actions:{buttons:[{text:"Refresh Now",icon:"refresh-cw",variant:"primary",onClick:async()=>{try{if(e.microsoftCalendarService){await e.microsoftCalendarService.refresh();let b=e.microsoftCalendarService.getSyncStatus();b.lastError?new fe.Notice(`Microsoft calendar refresh had errors: ${b.lastError}`):new fe.Notice("Microsoft calendar refreshed successfully"),l()}}catch(b){$o.error("Failed to refresh:",{category:"configuration",operation:"refresh",error:b}),new fe.Notice(`Failed to refresh Microsoft calendar: ${B8(b)}`)}}},{text:"Disconnect",icon:"log-out",variant:"warning",onClick:async()=>{try{let b=e.oauthService;if(!b)return;await b.disconnect("microsoft"),new fe.Notice("Disconnected from Microsoft calendar"),l()}catch(b){$o.error("Failed to disconnect:",{category:"configuration",operation:"disconnect",error:b}),new fe.Notice("Failed to disconnect from Microsoft calendar")}}}]}})}else{let m=activeWindow.createDiv();m.className="tasknotes-calendar-help",m.textContent="Connect your Microsoft outlook calendar to sync events directly into tasknotes.";let f=[{rows:[{label:"Info:",input:m,fullWidth:!0}]}],h=m_e(e,"microsoft","your-microsoft-client-id","your-microsoft-client-secret"),g=activeWindow.createDiv();g.className="tasknotes-credential-note",g.textContent="Enter your OAUTH app credentials from azure portal. Obsidian secret storage encrypts credentials at rest when supported by the operating system.",f.push({rows:[{label:"Client ID:",input:h.clientIdInput},{label:"Client Secret:",input:h.clientSecretInput},{label:"",input:g,fullWidth:!0}]}),sr(o,{collapsible:!0,defaultCollapsed:!1,colorIndicator:{color:"#737373"},header:{primaryText:"Microsoft Outlook Calendar",secondaryText:"OAuth 2.0 Connection",meta:[pi("Not Connected","inactive")]},content:{sections:f},actions:{buttons:[{text:"Connect Microsoft Calendar",icon:"link",variant:"primary",onClick:async()=>{try{let v=e.oauthService;if(!v)return;h.persistPendingValues(),await v.authenticate("microsoft"),new fe.Notice("Microsoft calendar connected successfully!"),l()}catch(v){$o.error("Failed to connect:",{category:"configuration",operation:"connect",error:v}),new fe.Notice(`Failed to connect: ${B8(v)}`)}}},...h.hasStoredCredentials?[{text:"Forget saved credentials",icon:"trash-2",variant:"warning",onClick:async()=>{await ur(e.app,{title:"Forget Microsoft OAuth credentials?",message:"This removes the saved client ID and client secret from Obsidian Secret Storage.",confirmText:"Forget credentials",isDestructive:!0})&&(e.oauthService.clearCredentials("microsoft"),new fe.Notice("Forgot Microsoft OAUTH credentials"),l())}}]:[]]}})}};l(),kt(n,{heading:r("settings.integrations.googleCalendarExport.header"),description:r("settings.integrations.googleCalendarExport.description")},d=>{d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.enable.name"),desc:r("settings.integrations.googleCalendarExport.enable.description"),getValue:()=>e.settings.googleCalendarExport.enabled,setValue:async p=>{e.settings.googleCalendarExport.enabled=p,t()}})),d.addSetting(u=>{u.setName(r("settings.integrations.googleCalendarExport.targetCalendar.name")),u.setDesc(r("settings.integrations.googleCalendarExport.targetCalendar.description"));let p=u.controlEl.createEl("select",{cls:"dropdown"});p.classList.remove("tn-static-width-100-0466783d","tn-static-width-12px-fbf353fb","tn-static-width-16px-7375d50b","tn-static-width-1px-aa77e27e","tn-static-width-60px-bd09c419","tn-static-width-80px-8573bae3"),p.classList.add("tn-static-width-200px-2acaf3b5"),p.createEl("option",{text:r("settings.integrations.googleCalendarExport.targetCalendar.placeholder"),value:""});let m=async()=>{for(;p.options.length>1;)p.remove(1);if(e.oauthService&&await e.oauthService.isConnected("google")&&e.googleCalendarService){let k=e.googleCalendarService.getAvailableCalendars();for(let T of k){let b=p.createEl("option",{text:T.summary+(T.primary?r("settings.integrations.googleCalendarExport.targetCalendar.primarySuffix"):""),value:T.id});T.id===e.settings.googleCalendarExport.targetCalendarId&&(b.selected=!0)}}else p.createEl("option",{text:r("settings.integrations.googleCalendarExport.targetCalendar.connectFirst"),value:""})};m();let f=null,h=null,g=()=>{f&&(f(),f=null),h&&(h.disconnect(),h=null)};f=e.googleCalendarService.on("data-changed",()=>{if(!p.isConnected){g();return}m()}),h=new MutationObserver(()=>{p.isConnected||g()}),h.observe(n.ownerDocument.body,{childList:!0,subtree:!0}),p.addEventListener("change",()=>{e.settings.googleCalendarExport.targetCalendarId=p.value,t()})}),d.addSetting(u=>void Ur(u,{name:r("settings.integrations.googleCalendarExport.syncTrigger.name"),desc:r("settings.integrations.googleCalendarExport.syncTrigger.description"),options:[{value:"scheduled",label:r("settings.integrations.googleCalendarExport.syncTrigger.options.scheduled")},{value:"due",label:r("settings.integrations.googleCalendarExport.syncTrigger.options.due")},{value:"both",label:r("settings.integrations.googleCalendarExport.syncTrigger.options.both")}],getValue:()=>e.settings.googleCalendarExport.syncTrigger,setValue:async p=>{e.settings.googleCalendarExport.syncTrigger=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.allDayEvents.name"),desc:r("settings.integrations.googleCalendarExport.allDayEvents.description"),getValue:()=>e.settings.googleCalendarExport.createAsAllDay,setValue:async p=>{e.settings.googleCalendarExport.createAsAllDay=p,t()}})),d.addSetting(u=>void ui(u,{name:r("settings.integrations.googleCalendarExport.defaultDuration.name"),desc:r("settings.integrations.googleCalendarExport.defaultDuration.description"),getValue:()=>e.settings.googleCalendarExport.defaultEventDuration,setValue:async p=>{e.settings.googleCalendarExport.defaultEventDuration=p,t()},min:15,max:480})),d.addSetting(u=>void rn(u,{name:r("settings.integrations.googleCalendarExport.eventTitleTemplate.name"),desc:r("settings.integrations.googleCalendarExport.eventTitleTemplate.description"),placeholder:r("settings.integrations.googleCalendarExport.eventTitleTemplate.placeholder"),getValue:()=>e.settings.googleCalendarExport.eventTitleTemplate,setValue:async p=>{e.settings.googleCalendarExport.eventTitleTemplate=p||"{{title}}",t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.includeDescription.name"),desc:r("settings.integrations.googleCalendarExport.includeDescription.description"),getValue:()=>e.settings.googleCalendarExport.includeDescription,setValue:async p=>{e.settings.googleCalendarExport.includeDescription=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.includeObsidianLink.name"),desc:r("settings.integrations.googleCalendarExport.includeObsidianLink.description"),getValue:()=>e.settings.googleCalendarExport.includeObsidianLink,setValue:async p=>{e.settings.googleCalendarExport.includeObsidianLink=p,t()}})),d.addSetting(u=>void rn(u,{name:r("settings.integrations.googleCalendarExport.defaultReminder.name"),desc:r("settings.integrations.googleCalendarExport.defaultReminder.description"),getValue:()=>Adt(e.settings.googleCalendarExport.defaultReminderMinutes),setValue:async p=>{e.settings.googleCalendarExport.defaultReminderMinutes=Mdt(p),t()},placeholder:"60, 1440"})),d.addSetting(u=>{u.setName(r("settings.integrations.googleCalendarExport.automaticSyncBehavior.header")),u.setHeading()}),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.syncOnCreate.name"),desc:r("settings.integrations.googleCalendarExport.syncOnCreate.description"),getValue:()=>e.settings.googleCalendarExport.syncOnTaskCreate,setValue:async p=>{e.settings.googleCalendarExport.syncOnTaskCreate=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.syncOnUpdate.name"),desc:r("settings.integrations.googleCalendarExport.syncOnUpdate.description"),getValue:()=>e.settings.googleCalendarExport.syncOnTaskUpdate,setValue:async p=>{e.settings.googleCalendarExport.syncOnTaskUpdate=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.syncOnComplete.name"),desc:r("settings.integrations.googleCalendarExport.syncOnComplete.description"),getValue:()=>e.settings.googleCalendarExport.syncOnTaskComplete,setValue:async p=>{e.settings.googleCalendarExport.syncOnTaskComplete=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.googleCalendarExport.syncOnDelete.name"),desc:r("settings.integrations.googleCalendarExport.syncOnDelete.description"),getValue:()=>e.settings.googleCalendarExport.syncOnTaskDelete,setValue:async p=>{e.settings.googleCalendarExport.syncOnTaskDelete=p,t()}})),d.addSetting(u=>{u.setName(r("settings.integrations.googleCalendarExport.manualSyncActions.header")),u.setHeading()}),d.addSetting(u=>void Xl(u,{name:r("settings.integrations.googleCalendarExport.syncAllTasks.name"),desc:r("settings.integrations.googleCalendarExport.syncAllTasks.description"),buttonText:r("settings.integrations.googleCalendarExport.syncAllTasks.buttonText"),onClick:async()=>{var m;if(!((m=e.taskCalendarSyncService)!=null&&m.isEnabled())){new fe.Notice(r("settings.integrations.googleCalendarExport.notices.notEnabledOrConfigured"));return}let p=await e.taskCalendarSyncService.syncAllTasks();new fe.Notice(r("settings.integrations.googleCalendarExport.notices.syncResults",{synced:p.synced,failed:p.failed,skipped:p.skipped}))}})),d.addSetting(u=>void Xl(u,{name:r("settings.integrations.googleCalendarExport.unlinkAllTasks.name"),desc:r("settings.integrations.googleCalendarExport.unlinkAllTasks.description"),buttonText:r("settings.integrations.googleCalendarExport.unlinkAllTasks.buttonText"),onClick:async()=>{if(!e.taskCalendarSyncService){new fe.Notice(r("settings.integrations.googleCalendarExport.notices.serviceNotAvailable"));return}await ur(e.app,{title:r("settings.integrations.googleCalendarExport.unlinkAllTasks.confirmTitle"),message:r("settings.integrations.googleCalendarExport.unlinkAllTasks.confirmMessage"),confirmText:r("settings.integrations.googleCalendarExport.unlinkAllTasks.confirmButtonText"),isDestructive:!0})&&await e.taskCalendarSyncService.unlinkAllTasks(!1)}}))}),kt(n,{heading:r("settings.integrations.calendarSubscriptions.header"),description:r("settings.integrations.calendarSubscriptions.description")},d=>{d.addSetting(u=>void rn(u,{name:r("settings.integrations.calendarSubscriptions.defaultNoteTemplate.name"),desc:r("settings.integrations.calendarSubscriptions.defaultNoteTemplate.description"),placeholder:r("settings.integrations.calendarSubscriptions.defaultNoteTemplate.placeholder"),getValue:()=>e.settings.icsIntegration.defaultNoteTemplate,setValue:async p=>{e.settings.icsIntegration.defaultNoteTemplate=p,t()}})),d.addSetting(u=>void rn(u,{name:r("settings.integrations.calendarSubscriptions.defaultNoteFolder.name"),desc:r("settings.integrations.calendarSubscriptions.defaultNoteFolder.description"),placeholder:r("settings.integrations.calendarSubscriptions.defaultNoteFolder.placeholder"),getValue:()=>e.settings.icsIntegration.defaultNoteFolder,setValue:async p=>{e.settings.icsIntegration.defaultNoteFolder=p,t()}})),d.addSetting(u=>void Ur(u,{name:r("settings.integrations.calendarSubscriptions.filenameFormat.name"),desc:r("settings.integrations.calendarSubscriptions.filenameFormat.description"),options:[{value:"title",label:r("settings.integrations.calendarSubscriptions.filenameFormat.options.title")},{value:"zettel",label:r("settings.integrations.calendarSubscriptions.filenameFormat.options.zettel")},{value:"timestamp",label:r("settings.integrations.calendarSubscriptions.filenameFormat.options.timestamp")},{value:"custom",label:r("settings.integrations.calendarSubscriptions.filenameFormat.options.custom")}],getValue:()=>e.settings.icsIntegration.icsNoteFilenameFormat,setValue:async p=>{Ddt(p)&&(e.settings.icsIntegration.icsNoteFilenameFormat=p,t(),Ng(n,e,t))}})),e.settings.icsIntegration.icsNoteFilenameFormat==="custom"&&d.addSetting(u=>void rn(u,{name:r("settings.integrations.calendarSubscriptions.customTemplate.name"),desc:r("settings.integrations.calendarSubscriptions.customTemplate.description"),placeholder:r("settings.integrations.calendarSubscriptions.customTemplate.placeholder"),getValue:()=>e.settings.icsIntegration.customICSNoteFilenameTemplate,setValue:async p=>{e.settings.icsIntegration.customICSNoteFilenameTemplate=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.calendarSubscriptions.useICSEndAsDue.name"),desc:r("settings.integrations.calendarSubscriptions.useICSEndAsDue.description"),getValue:()=>{var p;return(p=e.settings.icsIntegration.useICSEndAsDue)!=null?p:!1},setValue:async p=>{e.settings.icsIntegration.useICSEndAsDue=p,t()}})),d.addSetting(u=>void Ur(u,{name:r("settings.integrations.calendarSubscriptions.recurringEventRelatedNotesMode.name"),desc:r("settings.integrations.calendarSubscriptions.recurringEventRelatedNotesMode.description"),options:[{value:"series",label:r("settings.integrations.calendarSubscriptions.recurringEventRelatedNotesMode.options.series")},{value:"instance",label:r("settings.integrations.calendarSubscriptions.recurringEventRelatedNotesMode.options.instance")}],getValue:()=>{var p;return(p=e.settings.icsIntegration.recurringEventRelatedNotesMode)!=null?p:"series"},setValue:async p=>{Pdt(p)&&(e.settings.icsIntegration.recurringEventRelatedNotesMode=p,t())}}))}),kt(n,{heading:r("settings.integrations.subscriptionsList.header")},d=>{d.addSetting(u=>void Xl(u,{name:r("settings.integrations.subscriptionsList.addSubscription.name"),desc:r("settings.integrations.subscriptionsList.addSubscription.description"),buttonText:r("settings.integrations.subscriptionsList.addSubscription.buttonText"),onClick:async()=>{let p={name:r("settings.integrations.subscriptionsList.newCalendarName"),url:"",color:"#6366f1",enabled:!1,type:"remote",refreshInterval:60};if(!e.icsSubscriptionService){new fe.Notice(r("settings.integrations.subscriptionsList.notices.serviceUnavailable"));return}try{await e.icsSubscriptionService.addSubscription(p),new fe.Notice(r("settings.integrations.subscriptionsList.notices.addSuccess")),eb(c,e,t)}catch(m){$o.error("Error adding subscription:",{category:"provider",operation:"adding-subscription",error:m}),new fe.Notice(r("settings.integrations.subscriptionsList.notices.addFailure"))}}})),d.addSetting(u=>void Xl(u,{name:r("settings.integrations.subscriptionsList.refreshAll.name"),desc:r("settings.integrations.subscriptionsList.refreshAll.description"),buttonText:r("settings.integrations.subscriptionsList.refreshAll.buttonText"),onClick:async()=>{if(e.icsSubscriptionService)try{await e.icsSubscriptionService.refreshAllSubscriptions(),new fe.Notice(r("settings.integrations.subscriptionsList.notices.refreshSuccess"))}catch(p){$o.error("Error refreshing subscriptions:",{category:"provider",operation:"refreshing-subscriptions",error:p}),new fe.Notice(r("settings.integrations.subscriptionsList.notices.refreshFailure"))}}}))});let c=n.createDiv("ics-subscriptions-container");if(eb(c,e,t),kt(n,{heading:r("settings.integrations.autoExport.header"),description:r("settings.integrations.autoExport.description")},d=>{d.addSetting(u=>void me(u,{name:r("settings.integrations.autoExport.enable.name"),desc:r("settings.integrations.autoExport.enable.description"),getValue:()=>e.settings.icsIntegration.enableAutoExport,setValue:async p=>{e.settings.icsIntegration.enableAutoExport=p,t(),new fe.Notice(r("settings.integrations.autoExport.notices.reloadRequired")),Ng(n,e,t)}})),e.settings.icsIntegration.enableAutoExport&&(d.addSetting(u=>void rn(u,{name:r("settings.integrations.autoExport.filePath.name"),desc:r("settings.integrations.autoExport.filePath.description"),placeholder:r("settings.integrations.autoExport.filePath.placeholder"),getValue:()=>e.settings.icsIntegration.autoExportPath,setValue:async p=>{e.settings.icsIntegration.autoExportPath=p||"tasknotes-calendar.ics",t()}})),d.addSetting(u=>void ui(u,{name:r("settings.integrations.autoExport.interval.name"),desc:r("settings.integrations.autoExport.interval.description"),placeholder:r("settings.integrations.autoExport.interval.placeholder"),min:5,max:1440,getValue:()=>e.settings.icsIntegration.autoExportInterval,setValue:async p=>{e.settings.icsIntegration.autoExportInterval=Math.max(5,p||60),t(),e.autoExportService&&e.autoExportService.updateInterval(e.settings.icsIntegration.autoExportInterval)}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.autoExport.useDuration.name"),desc:r("settings.integrations.autoExport.useDuration.description"),getValue:()=>{var p;return(p=e.settings.icsIntegration.useDurationForExport)!=null?p:!1},setValue:async p=>{e.settings.icsIntegration.useDurationForExport=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.autoExport.excludeCompleted.name"),desc:r("settings.integrations.autoExport.excludeCompleted.description"),getValue:()=>{var p;return(p=e.settings.icsIntegration.excludeCompletedFromExport)!=null?p:!1},setValue:async p=>{e.settings.icsIntegration.excludeCompletedFromExport=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.autoExport.excludeArchived.name"),desc:r("settings.integrations.autoExport.excludeArchived.description"),getValue:()=>{var p;return(p=e.settings.icsIntegration.excludeArchivedFromExport)!=null?p:!1},setValue:async p=>{e.settings.icsIntegration.excludeArchivedFromExport=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.autoExport.requireDueDate.name"),desc:r("settings.integrations.autoExport.requireDueDate.description"),getValue:()=>{var p;return(p=e.settings.icsIntegration.requireDueDateForExport)!=null?p:!1},setValue:async p=>{e.settings.icsIntegration.requireDueDateForExport=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.autoExport.requireScheduledDate.name"),desc:r("settings.integrations.autoExport.requireScheduledDate.description"),getValue:()=>{var p;return(p=e.settings.icsIntegration.requireScheduledDateForExport)!=null?p:!1},setValue:async p=>{e.settings.icsIntegration.requireScheduledDateForExport=p,t()}})),d.addSetting(u=>void Xl(u,{name:r("settings.integrations.autoExport.exportNow.name"),desc:r("settings.integrations.autoExport.exportNow.description"),buttonText:r("settings.integrations.autoExport.exportNow.buttonText"),onClick:async()=>{if(e.autoExportService)try{await e.autoExportService.exportNow(),new fe.Notice(r("settings.integrations.autoExport.notices.exportSuccess")),Ng(n,e,t)}catch(p){$o.error("Manual export failed:",{category:"provider",operation:"manual-export",error:p}),new fe.Notice(r("settings.integrations.autoExport.notices.exportFailure"))}else new fe.Notice(r("settings.integrations.autoExport.notices.serviceUnavailable"))}})),d.addSetting(u=>{u.setName(r("settings.integrations.autoExport.status.title"));let p=u.descEl;if(e.autoExportService){let m=e.autoExportService.getLastExportTime(),f=e.autoExportService.getNextExportTime(),h=m?r("settings.integrations.autoExport.status.lastExport",{time:m.toLocaleString()}):r("settings.integrations.autoExport.status.noExports"),g=f?r("settings.integrations.autoExport.status.nextExport",{time:f.toLocaleString()}):r("settings.integrations.autoExport.status.notScheduled");p.textContent=h+`
`+g}else p.textContent=r("settings.integrations.autoExport.status.serviceNotInitialized"),p.addClass("tasknotes-auto-export-status__error")}))}),!fe.Platform.isMobile){if(kt(n,{heading:r("settings.integrations.httpApi.header"),description:r("settings.integrations.httpApi.description")},d=>{d.addSetting(u=>void me(u,{name:r("settings.integrations.httpApi.enable.name"),desc:r("settings.integrations.httpApi.enable.description"),getValue:()=>e.settings.enableAPI,setValue:async p=>{e.settings.enableAPI=p,t(),Ng(n,e,t)}})),e.settings.enableAPI&&(d.addSetting(u=>void ui(u,{name:r("settings.integrations.httpApi.port.name"),desc:r("settings.integrations.httpApi.port.description"),placeholder:r("settings.integrations.httpApi.port.placeholder"),min:1024,max:65535,getValue:()=>e.settings.apiPort,setValue:async p=>{e.settings.apiPort=p,t()}})),d.addSetting(u=>void rn(u,{name:r("settings.integrations.httpApi.authToken.name"),desc:r("settings.integrations.httpApi.authToken.description"),placeholder:r("settings.integrations.httpApi.authToken.placeholder"),getValue:()=>e.settings.apiAuthToken,setValue:async p=>{e.settings.apiAuthToken=p,t()}})),d.addSetting(u=>void me(u,{name:r("settings.integrations.httpApi.mcp.enable.name"),desc:r("settings.integrations.httpApi.mcp.enable.description"),getValue:()=>e.settings.enableMCP,setValue:async p=>{e.settings.enableMCP=p,t()}})))}),e.settings.enableAPI){let d=n.createDiv("tasknotes-settings__help-section"),u=d.createDiv("tasknotes-settings__collapsible-header"),p=u.createDiv("tasknotes-settings__collapsible-header-content"),m=p.createSpan("tasknotes-settings__collapsible-icon");m.textContent=r("settings.integrations.httpApi.endpoints.expandIcon"),p.createSpan({text:r("settings.integrations.httpApi.endpoints.header"),cls:"tasknotes-settings__collapsible-title"});let f=d.createDiv("tasknotes-settings__collapsible-content");f.classList.remove("tn-static-display-block-2a1b75c9","tn-static-display-flex-4d51fc62","tn-static-display-flex-75816cae","tn-static-display-flex-8bb39979","tn-static-display-inline-block-60e32dcb","tn-static-display-inline-cccfa456","tn-static-display-inline-flex-f984c520","tn-static-min-height-800px-997b4c8c"),f.classList.add("tn-static-display-none-6b99de8b"),u.addEventListener("click",()=>{let h=f.style.display!=="none";f.style.display=h?"none":"block",m.textContent=r(h?"settings.integrations.httpApi.endpoints.expandIcon":"settings.integrations.httpApi.endpoints.collapseIcon")}),p_e(f,e.settings.apiPort,{apiAuthToken:e.settings.apiAuthToken})}kt(n,{heading:r("settings.integrations.webhooks.header"),description:r("settings.integrations.webhooks.description.overview")+" "+r("settings.integrations.webhooks.description.usage")},d=>{d.addSetting(u=>void Xl(u,{name:r("settings.integrations.webhooks.addWebhook.name"),desc:r("settings.integrations.webhooks.addWebhook.description"),buttonText:r("settings.integrations.webhooks.addWebhook.buttonText"),onClick:async()=>{new U8(e.app,m=>{var h;let f={id:`wh_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,url:m.url||"",events:m.events||[],secret:Idt(),active:!0,createdAt:new Date().toISOString(),failureCount:0,successCount:0,transformFile:m.transformFile,corsHeaders:m.corsHeaders};e.settings.webhooks||(e.settings.webhooks=[]),e.settings.webhooks.push(f),t(),n1(((h=n.querySelector(".tasknotes-webhooks-container"))==null?void 0:h.parentElement)||n,e,t),new j8(e.app,f.secret).open(),new fe.Notice(r("settings.integrations.webhooks.notices.created"))}).open()}}))}),n1(n,e,t)}}function eb(n,e,t){n.empty();let r=(i,s)=>e.i18n.translate(i,s);if(!e.icsSubscriptionService){ec(n,r("settings.integrations.subscriptionsList.notices.serviceUnavailable"));return}let a=e.icsSubscriptionService.getSubscriptions();if(a.length===0){let i=n.createDiv("tasknotes-webhooks-empty-state");i.createSpan("tasknotes-webhooks-empty-icon"),i.createSpan({text:r("settings.integrations.subscriptionsList.emptyState"),cls:"tasknotes-webhooks-empty-text"});return}a.forEach(i=>{let s=nn(i.enabled,w=>{i.enabled=w,t()}),o=Ge("text","Calendar name",i.name),l=activeWindow.createEl("select");l.className="tasknotes-settings__card-input";let c=activeWindow.createEl("option");c.value="remote",c.textContent="Remote URL",c.selected=i.type==="remote",l.appendChild(c);let d=activeWindow.createEl("option");d.value="local",d.textContent="Local file",d.selected=i.type==="local",l.appendChild(d);let u;if(i.type==="remote")u=yM("ICS/iCal URL",i.url);else{let w=Ge("text","Local file path (e.g., Calendar.ics)",i.filePath||"");w.setAttribute("placeholder","Calendar.ics"),u=w}let p=sv(i.color),m=hp(5,1440,5,i.refreshInterval||60),f=async w=>{try{let S=e.icsSubscriptionService;if(!S)return;await S.updateSubscription(i.id,w),t(),eb(n,e,t)}catch(S){$o.error("Error updating subscription:",{category:"provider",operation:"updating-subscription",error:S}),new fe.Notice(r("settings.integrations.subscriptionsList.notices.updateFailure")),eb(n,e,t)}};o.addEventListener("blur",()=>{f({name:o.value.trim()})}),p.addEventListener("change",()=>{f({color:ov(p,i.color||"#3788d8")})}),m.addEventListener("blur",()=>{let w=parseInt(m.value)||60;f({refreshInterval:w})}),l.addEventListener("change",()=>{zi(async()=>{let w=l.value;i.type=w,w==="remote"?(i.url=i.filePath||"",i.filePath=void 0):(i.filePath=i.url||"",i.url=void 0),t();let S=l.closest(".tasknotes-settings__card");if(S){let C=S.querySelector(".tasknotes-settings__card-config-row:nth-child(4)");if(C){let x=C.querySelector("input");x&&x.remove();let E;if(w==="remote")E=yM("ICS/iCal URL",i.url);else{let A=Ge("text","Local file path (e.g., Calendar.ics)",i.filePath||"");A.setAttribute("placeholder","Calendar.ics"),E=A}E.addEventListener("blur",()=>{let A=E.value.trim();if(i.type==="remote"){let R=w2(A);f({url:R})}else f({filePath:A})}),C.appendChild(E);let _=C.querySelector(".tasknotes-settings__card-config-label");_&&(_.textContent=w==="remote"?"URL:":"File Path:");let F=S.querySelector(".tasknotes-settings__card-secondary-text");F&&(F.textContent=w==="remote"?"Remote Calendar":"Local File");let I=S.querySelector(".tasknotes-settings__card-meta .info-badge");I&&(I.textContent=w==="remote"?"Remote":"Local File")}}})}),u.addEventListener("blur",()=>{let w=u.value.trim();if(i.type==="remote"){let S=w2(w);f({url:S})}else f({filePath:w})});let h=pi(i.enabled?"Enabled":"Disabled",i.enabled?"active":"inactive"),g=cv(i.type==="remote"?"Remote":"Local File"),v=[h,g],k=e.icsSubscriptionService.getLastFetched(i.id);if(k){let w=new Date(k),S=Lu(w,r),C=cv(`Synced ${S}`);v.push(C)}let T=e.icsSubscriptionService.getLastError(i.id);if(T){let w=pi("Error","inactive");w.title=T,v.push(w)}let b=[{label:"Enabled:",input:s},{label:"Name:",input:o},{label:"Type:",input:l},{label:i.type==="remote"?"URL:":"File Path:",input:u},{label:"Color:",input:p},{label:"Refresh (min):",input:m}];sr(n,{id:i.id,collapsible:!0,defaultCollapsed:!0,colorIndicator:{color:i.color},header:{primaryText:i.name,secondaryText:i.type==="remote"?"Remote Calendar":"Local File",meta:v,actions:[ol(async()=>{if(await ur(e.app,{title:r("settings.integrations.subscriptionsList.confirmDelete.title"),message:r("settings.integrations.subscriptionsList.confirmDelete.message",{name:i.name}),confirmText:r("settings.integrations.subscriptionsList.confirmDelete.confirmText"),cancelText:r("common.cancel"),isDestructive:!0}))try{let S=e.icsSubscriptionService;if(!S)return;await S.removeSubscription(i.id),new fe.Notice(r("settings.integrations.subscriptionsList.notices.deleteSuccess",{name:i.name})),t(),eb(n,e,t)}catch(S){$o.error("Error deleting subscription:",{category:"provider",operation:"deleting-subscription",error:S}),new fe.Notice(r("settings.integrations.subscriptionsList.notices.deleteFailure"))}},"Delete subscription")]},content:{sections:[{rows:b}]},actions:{buttons:[{text:r("settings.integrations.subscriptionsList.refreshNow"),icon:"refresh-cw",variant:i.enabled?"primary":"secondary",disabled:!i.enabled,onClick:async()=>{if(!i.enabled){new fe.Notice(r("settings.integrations.subscriptionsList.notices.enableFirst"));return}try{let w=e.icsSubscriptionService;if(!w)return;await w.refreshSubscription(i.id),new fe.Notice(r("settings.integrations.subscriptionsList.notices.refreshSuccess",{name:i.name})),eb(n,e,t)}catch(w){$o.error("Error refreshing subscription:",{category:"provider",operation:"refreshing-subscription",error:w}),new fe.Notice(r("settings.integrations.subscriptionsList.notices.refreshFailure"))}}}]}})})}function n1(n,e,t){let r=(s,o)=>e.i18n.translate(s,o),a=n.querySelector(".tasknotes-webhooks-container");a&&a.remove();let i=n.createDiv("tasknotes-webhooks-container");if(!e.settings.webhooks||e.settings.webhooks.length===0){rc(i,r("settings.integrations.webhooks.emptyState.message"),r("settings.integrations.webhooks.emptyState.buttonText"),()=>{var o;let s=(o=n.closest(".settings-tab-content"))==null?void 0:o.querySelector("button.tn-btn--primary");s&&s.click()});return}e.settings.webhooks.forEach((s,o)=>{let l=pi(s.active?"Active":"Inactive",s.active?"active":"inactive"),c=cv(`Success: ${s.successCount||0}`),d=cv(`Failed: ${s.failureCount||0}`),u=yM("Webhook URL",s.url),p=nn(s.active,v=>{s.active=v,t();let k=p.closest(".tasknotes-settings__card");if(k){let T=k.querySelector(".tasknotes-settings__card-status-badge--active, .tasknotes-settings__card-status-badge--inactive");T&&(T.textContent=s.active?"Active":"Inactive",T.className=s.active?"tasknotes-settings__card-status-badge tasknotes-settings__card-status-badge--active":"tasknotes-settings__card-status-badge tasknotes-settings__card-status-badge--inactive");let b=k.querySelector('[aria-label*="Test"]');b&&(b.disabled=!s.active||!s.url)}new fe.Notice(s.active?r("settings.integrations.webhooks.notices.enabled"):r("settings.integrations.webhooks.notices.disabled"))});u.addEventListener("blur",()=>{u.value.trim()!==s.url&&(s.url=u.value.trim(),t(),new fe.Notice(r("settings.integrations.webhooks.notices.urlUpdated")))});let m=s.createdAt?new Date(s.createdAt):null,f=m?r("settings.integrations.webhooks.statusLabels.created",{timeAgo:Lu(m,r)}):"Creation date unknown",h=activeWindow.createDiv();if(h.className="tasknotes-webhook-events",s.events.length===0){let v=activeWindow.createSpan();v.className="tasknotes-webhook-events--empty",v.textContent=r("settings.integrations.webhooks.eventsDisplay.noEvents"),h.appendChild(v)}else s.events.forEach(v=>{h.appendChild(cv(v))});let g=activeWindow.createSpan();s.transformFile?(g.className="tasknotes-transform-file",g.textContent=s.transformFile):(g.className="tasknotes-transform-file--empty",g.textContent=r("settings.integrations.webhooks.transformDisplay.noTransform")),sr(i,{id:s.id,collapsible:!0,defaultCollapsed:!0,header:{primaryText:r("settings.integrations.webhooks.cardHeader"),secondaryText:f,meta:[l,c,d],actions:[ol(async()=>{await ur(e.app,{title:r("settings.integrations.webhooks.confirmDelete.title"),message:r("settings.integrations.webhooks.confirmDelete.message",{url:s.url}),confirmText:r("settings.integrations.webhooks.confirmDelete.confirmText"),cancelText:r("common.cancel"),isDestructive:!0})&&(e.settings.webhooks.splice(o,1),t(),n1(n,e,t),new fe.Notice(r("settings.integrations.webhooks.notices.deleted")))})]},content:{sections:[{rows:[{label:r("settings.integrations.webhooks.cardFields.active"),input:p},{label:r("settings.integrations.webhooks.cardFields.url"),input:u},{label:r("settings.integrations.webhooks.cardFields.events"),input:h},{label:r("settings.integrations.webhooks.cardFields.transform"),input:g}]}]},actions:{buttons:[{text:r("settings.integrations.webhooks.editEvents"),icon:"settings",variant:"secondary",onClick:async()=>{new $8(e.app,s,k=>{Object.assign(s,k),t(),n1(n,e,t),new fe.Notice(r("settings.integrations.webhooks.notices.updated"))}).open()}}]}})})}function Idt(){return Array.from(crypto.getRandomValues(new Uint8Array(32))).map(n=>n.toString(16).padStart(2,"0")).join("")}var j8=class extends fe.Modal{constructor(e,t){super(e),this.secret=t}onOpen(){let{contentEl:e}=this;e.empty(),e.addClass("tasknotes-webhook-modal");let t=e.createDiv({cls:"tasknotes-webhook-secret-notice"}),r=t.createDiv({cls:"tasknotes-webhook-secret-title"}),a=r.createSpan();(0,fe.setIcon)(a,"shield-check"),r.createSpan({text:"Webhook Secret Generated"});let i=t.createDiv({cls:"tasknotes-webhook-secret-content"});i.createEl("p",{text:"Your webhook secret has been generated. Save this secret as you won't be able to view it again:"}),i.createEl("code",{text:this.secret,cls:"tasknotes-webhook-secret-code"}),i.createEl("p",{text:"Use this secret to verify webhook payloads in your receiving application."});let o=e.createDiv({cls:"tasknotes-webhook-modal-buttons"}).createEl("button",{text:"Got it",cls:"tasknotes-webhook-modal-btn save"});o.onclick=()=>this.close()}onClose(){let{contentEl:e}=this;e.empty()}},$8=class extends fe.Modal{constructor(e,t,r){var a;super(e),this.selectedEvents=[...t.events],this.transformFile=t.transformFile||"",this.corsHeaders=(a=t.corsHeaders)!=null?a:!0,this.onSubmit=r}onOpen(){let{contentEl:e}=this;e.empty(),e.addClass("tasknotes-webhook-modal");let t=e.createDiv({cls:"tasknotes-webhook-modal-header"}),r=t.createSpan({cls:"tasknotes-webhook-modal-icon"});(0,fe.setIcon)(r,"webhook"),t.createEl("h2",{text:"Edit webhook",cls:"tasknotes-webhook-modal-title"});let a=e.createDiv({cls:"tasknotes-webhook-modal-section"}),i=a.createDiv({cls:"tasknotes-webhook-modal-subsection-header"}),s=i.createSpan();(0,fe.setIcon)(s,"zap"),i.createEl("h3",{text:"Events to subscribe to"});let o=a.createDiv({cls:"tasknotes-webhook-events-list"});f_e.forEach(T=>{new fe.Setting(o).setName(T.label).setDesc(T.desc).addToggle(b=>(b.toggleEl.setAttribute("aria-label",`Subscribe to ${T.label} events`),b.setValue(this.selectedEvents.includes(T.id)).onChange(w=>{if(w)this.selectedEvents.push(T.id);else{let S=this.selectedEvents.indexOf(T.id);S>-1&&this.selectedEvents.splice(S,1)}})))});let l=e.createDiv({cls:"tasknotes-webhook-modal-section"}),c=l.createDiv({cls:"tasknotes-webhook-modal-subsection-header"}),d=c.createSpan();(0,fe.setIcon)(d,"file-code"),c.createEl("h3",{text:"Transform configuration (optional)"}),new fe.Setting(l).setName("Transform file").setDesc("Path to a .json template file in your vault that transforms webhook payloads").addText(T=>(T.inputEl.setAttribute("aria-label","Transform file path"),T.setPlaceholder("simple-template.json").setValue(this.transformFile).onChange(b=>{this.transformFile=b})));let u=e.createDiv({cls:"tasknotes-webhook-modal-section"}),p=u.createDiv({cls:"tasknotes-webhook-modal-subsection-header"}),m=p.createSpan();(0,fe.setIcon)(m,"settings"),p.createEl("h3",{text:"Headers configuration"}),new fe.Setting(u).setName("Include custom headers").setDesc("Include tasknotes headers (event type, signature, delivery ID). Turn off for Discord, Slack, and other services with strict cors policies.").addToggle(T=>(T.toggleEl.setAttribute("aria-label","Include custom headers"),T.setValue(this.corsHeaders).onChange(b=>{this.corsHeaders=b})));let f=e.createDiv({cls:"tasknotes-webhook-modal-buttons"}),h=f.createEl("button",{text:"Cancel",cls:"tasknotes-webhook-modal-btn cancel",attr:{"aria-label":"Cancel webhook editing"}}),g=h.createSpan({cls:"tasknotes-webhook-modal-btn-icon"});(0,fe.setIcon)(g,"x"),h.onclick=()=>this.close();let v=f.createEl("button",{text:"Save changes",cls:"tasknotes-webhook-modal-btn save mod-cta",attr:{"aria-label":"Save webhook changes"}}),k=v.createSpan({cls:"tasknotes-webhook-modal-btn-icon"});(0,fe.setIcon)(k,"save"),v.onclick=()=>{if(this.selectedEvents.length===0){new fe.Notice("Please select at least one event");return}zi(()=>this.onSubmit({events:this.selectedEvents,transformFile:this.transformFile.trim()||void 0,corsHeaders:this.corsHeaders})),this.close()}}onClose(){let{contentEl:e}=this;e.empty()}},U8=class extends fe.Modal{constructor(t,r){super(t);this.url="";this.selectedEvents=[];this.transformFile="";this.corsHeaders=!0;this.onSubmit=r}onOpen(){let{contentEl:t}=this;t.empty(),t.addClass("tasknotes-webhook-modal");let r=t.createDiv({cls:"tasknotes-webhook-modal-header"}),a=r.createSpan({cls:"tasknotes-webhook-modal-icon"});(0,fe.setIcon)(a,"webhook"),r.createEl("h2",{text:"Add webhook",cls:"tasknotes-webhook-modal-title"});let i=t.createDiv({cls:"tasknotes-webhook-modal-section"});new fe.Setting(i).setName("Webhook URL").setDesc("The endpoint where webhook payloads will be sent").addText(I=>(I.inputEl.setAttribute("aria-label","Webhook URL"),I.setPlaceholder("HTTPS://your-service.com/webhook").setValue(this.url).onChange(A=>{this.url=A})));let s=t.createDiv({cls:"tasknotes-webhook-modal-section"}),o=s.createDiv({cls:"tasknotes-webhook-modal-subsection-header"}),l=o.createSpan();(0,fe.setIcon)(l,"zap"),o.createEl("h3",{text:"Events to subscribe to"});let c=s.createDiv({cls:"tasknotes-webhook-events-list"});f_e.forEach(I=>{new fe.Setting(c).setName(I.label).setDesc(I.desc).addToggle(A=>(A.toggleEl.setAttribute("aria-label",`Subscribe to ${I.label} events`),A.setValue(this.selectedEvents.includes(I.id)).onChange(R=>{if(R)this.selectedEvents.push(I.id);else{let O=this.selectedEvents.indexOf(I.id);O>-1&&this.selectedEvents.splice(O,1)}})))});let d=t.createDiv({cls:"tasknotes-webhook-modal-section"}),u=d.createDiv({cls:"tasknotes-webhook-modal-subsection-header"}),p=u.createSpan();(0,fe.setIcon)(p,"file-code"),u.createEl("h3",{text:"Transform configuration (optional)"}),new fe.Setting(d).setName("Transform file").setDesc("Path to a .json template file in your vault that transforms webhook payloads").addText(I=>(I.inputEl.setAttribute("aria-label","Transform file path"),I.setPlaceholder("simple-template.json").setValue(this.transformFile).onChange(A=>{this.transformFile=A})));let m=d.createDiv({cls:"tasknotes-webhook-transform-help"}),f=m.createDiv({cls:"tasknotes-webhook-help-header"}),h=f.createSpan();(0,fe.setIcon)(h,"info"),f.createSpan({text:"JSON transform templates customize webhook payloads:"});let g=m.createEl("ul",{cls:"tasknotes-webhook-help-list"}),v=g.createEl("li");v.createEl("strong",{text:".json files:"}),v.appendText(" Templates with "),v.createEl("code",{text:"${data.task.title}"});let k=g.createEl("li");k.createEl("strong",{text:"Leave empty:"}),k.appendText(" Send raw data");let T=m.createDiv({cls:"tasknotes-webhook-help-example"});T.createEl("strong",{text:"Example:"}),T.appendText(" "),T.createEl("code",{text:"simple-template.json"});let b=t.createDiv({cls:"tasknotes-webhook-modal-section"}),w=b.createDiv({cls:"tasknotes-webhook-modal-subsection-header"}),S=w.createSpan();(0,fe.setIcon)(S,"settings"),w.createEl("h3",{text:"Headers configuration"}),new fe.Setting(b).setName("Include custom headers").setDesc("Include tasknotes headers (event type, signature, delivery ID). Turn off for Discord, Slack, and other services with strict cors policies.").addToggle(I=>(I.toggleEl.setAttribute("aria-label","Include custom headers"),I.setValue(this.corsHeaders).onChange(A=>{this.corsHeaders=A})));let C=t.createDiv({cls:"tasknotes-webhook-modal-buttons"}),x=C.createEl("button",{text:"Cancel",cls:"tasknotes-webhook-modal-btn cancel",attr:{"aria-label":"Cancel webhook creation"}}),E=x.createSpan({cls:"tasknotes-webhook-modal-btn-icon"});(0,fe.setIcon)(E,"x"),x.onclick=()=>this.close();let _=C.createEl("button",{text:"Add webhook",cls:"tasknotes-webhook-modal-btn save mod-cta",attr:{"aria-label":"Create webhook"}}),F=_.createSpan({cls:"tasknotes-webhook-modal-btn-icon"});(0,fe.setIcon)(F,"plus"),_.onclick=()=>{if(!this.url.trim()){new fe.Notice("Webhook URL is required");return}if(this.selectedEvents.length===0){new fe.Notice("Please select at least one event");return}zi(()=>this.onSubmit({url:this.url.trim(),events:this.selectedEvents,transformFile:this.transformFile.trim()||void 0,corsHeaders:this.corsHeaders})),this.close()}}onClose(){let{contentEl:t}=this;t.empty()}};va();var H8=".tasknotes-settings__card[data-card-id]",a1=class{constructor(){this.collapsed=new Map}bind(e,t){e.addEventListener(T2,r=>{let a=r.target;a.matches(H8)&&this.collapsed.set(this.key(a,e,t),a.classList.contains("tasknotes-settings__card--collapsed"))})}restore(e,t){e.querySelectorAll(H8).forEach(r=>{let a=this.collapsed.get(this.key(r,e,t));a!==void 0&&b2(r,a)})}key(e,t,r){var s;let a=[],i=e;for(;i&&i!==t&&t.contains(i);)i.matches(H8)&&a.unshift((s=i.dataset.cardId)!=null?s:""),i=i.parentElement;return JSON.stringify([r,...a])}};var i1=class extends Vm.PluginSettingTab{constructor(t,r){super(t,r);this.activeTab="general";this.tabContents={};this.cardExpansionState=new a1;this.debouncedSave=iv(()=>this.plugin.saveSettings(),500);this.plugin=r,(0,Vm.requireApiVersion)("1.11.0")&&(this.icon="tasknotes-simple"),this.plugin.registerEvent(this.plugin.i18n.on("locale-changed",()=>{this.containerEl.isConnected&&((0,Vm.requireApiVersion)("1.13.0")?this.update():this.renderSettings(this.containerEl))}))}getSettingDefinitions(){return[{name:this.plugin.i18n.translate("common.appName"),aliases:this.getTabConfigurations().map(t=>this.plugin.i18n.translate(t.nameKey)),render:t=>{t.settingEl.empty(),this.renderSettings(t.settingEl)}}]}display(){this.renderSettings(this.containerEl)}renderSettings(t){this.tabContents={},t.empty(),t.addClass("tasknotes-settings"),t.addClass("tasknotes-plugin"),t.addClass("settings-view");let r=u=>this.plugin.i18n.translate(u),a=t.createDiv("settings-view__toolbar"),i=a.createDiv("settings-tab-nav settings-view__tab-nav"),s=this.getTabConfigurations(),o=Vm.Platform.isMobile?s.filter(u=>u.id!=="integrations"||this.hasNonAPIIntegrations()):s;Vm.Platform.isMobile&&this.activeTab==="integrations"&&!this.hasNonAPIIntegrations()&&(this.activeTab="general"),o.forEach(u=>{let p=this.activeTab===u.id,m=r(u.nameKey),f=i.createEl("button",{text:m,cls:p?"settings-tab-button settings-view__tab-button active settings-view__tab-button--active is-active vertical-tab-nav-item":"settings-tab-button settings-view__tab-button vertical-tab-nav-item",attr:{role:"tab","aria-selected":p.toString(),"aria-controls":`settings-tab-${u.id}`,id:`tab-button-${u.id}`,tabindex:p?"0":"-1"}});f.addEventListener("click",()=>{this.switchTab(u.id)}),f.addEventListener("keydown",h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){h.preventDefault();let g=o.findIndex(T=>T.id===u.id),v=h.key==="ArrowRight"?(g+1)%o.length:(g-1+o.length)%o.length,k=o[v].id;this.switchTab(k)}})}),a.createDiv("settings-header").createEl("a",{text:r("settings.header.documentation"),href:r("settings.header.documentationUrl"),cls:"settings-header-link"}).setAttr("target","_blank");let d=t.createDiv("settings-tab-contents settings-view__tab-contents");o.forEach(u=>{let p=d.createDiv("settings-tab-content settings-view__tab-content");p.setAttribute("role","tabpanel"),p.setAttribute("id",`settings-tab-${u.id}`),p.setAttribute("aria-labelledby",`tab-button-${u.id}`),this.cardExpansionState.bind(p,u.id),this.activeTab===u.id&&(p.addClass("active"),p.addClass("settings-view__tab-content--active"),this.renderTabContent(u,p)),this.tabContents[u.id]=p})}renderTabContent(t,r){t.renderFn(r,this.plugin,this.debouncedSave),this.cardExpansionState.restore(r,t.id)}switchTab(t){this.activeTab=t,this.containerEl.querySelectorAll(".settings-tab-button").forEach(a=>{let i=a.id===`tab-button-${t}`;a.classList.toggle("active",i),a.classList.toggle("settings-view__tab-button--active",i),a.classList.toggle("is-active",i),a.setAttribute("aria-selected",i.toString()),a.setAttribute("tabindex",i?"0":"-1")}),this.containerEl.querySelectorAll(".settings-tab-content").forEach(a=>{let i=a.id===`settings-tab-${t}`;a.classList.toggle("active",i),a.classList.toggle("settings-view__tab-content--active",i)});let r=this.tabContents[t];if(r&&r.children.length===0){let a=this.getTabConfigurations().find(i=>i.id===t);a&&this.renderTabContent(a,r)}window.setTimeout(()=>{let a=this.containerEl.querySelector(`#tab-button-${t}`);a&&a.focus()},50)}getTabConfigurations(){return[{id:"general",nameKey:"settings.tabs.general",renderFn:ZT},{id:"task-properties",nameKey:"settings.tabs.taskProperties",renderFn:KRe},{id:"modal-fields",nameKey:"settings.tabs.modalFields",renderFn:XO},{id:"appearance",nameKey:"settings.tabs.appearance",renderFn:XT},{id:"features",nameKey:"settings.tabs.features",renderFn:os},{id:"integrations",nameKey:"settings.tabs.integrations",renderFn:Ng}]}hasNonAPIIntegrations(){return!0}hide(){this.debouncedSave.flush()}};var tb=require("obsidian");q();var RP=M({tag:"Utils/PerformanceMonitor"}),Wm=class Wm{constructor(){this.metrics=new Map;this.markers=new Map;this.enabled=!0;this.mutationObservers=new Set;this.performanceObservers=new Set}static getInstance(){return Wm.instance||(Wm.instance=new Wm),Wm.instance}startTimer(e){this.enabled&&this.markers.set(e,performance.now())}endTimer(e){if(!this.enabled)return 0;let t=this.markers.get(e);if(t===void 0)return e.includes("-measure-")||RP.warn(`No start marker found for operation: ${e}`,{category:"configuration",operation:"no-start-marker-found-operation"}),0;let r=performance.now()-t;return this.recordMetric(e,r),this.markers.delete(e),r}async measure(e,t){if(!this.enabled)return t();let r=performance.now();try{return await t()}finally{let a=performance.now()-r;this.recordMetric(e,a)}}measureSync(e,t){if(!this.enabled)return t();let r=performance.now();try{return t()}finally{let a=performance.now()-r;this.recordMetric(e,a)}}recordMetric(e,t){if(!this.enabled)return;this.metrics.has(e)||this.metrics.set(e,[]);let r=this.metrics.get(e);r.push(t),r.length>50&&r.splice(0,r.length-50)}getStats(e){let t=this.metrics.get(e);if(!t||t.length===0)return null;let r=[...t].sort((s,o)=>s-o),a=r.length,i=r.reduce((s,o)=>s+o,0);return{count:a,average:i/a,min:r[0],max:r[a-1],median:r[Math.floor(a/2)],p95:r[Math.floor(a*.95)]}}getAllStats(){let e={};for(let[t]of this.metrics)e[t]=this.getStats(t);return e}logSummary(){this.enabled&&this.getAllStats()}monitorDOMMutations(e){if(!this.enabled)return()=>{};let t=0,r=performance.now(),a=new MutationObserver(i=>{t+=i.length;let s=performance.now()-r;t>100&&s<1e3&&RP.warn(`High DOM mutation rate: ${t} mutations in ${s.toFixed(2)}ms`,{category:"configuration",operation:"high-dom-mutation-rate"})});return a.observe(e,{childList:!0,subtree:!0,attributes:!0}),this.mutationObservers.add(a),()=>{a.disconnect(),this.mutationObservers.delete(a),this.recordMetric("dom-mutations",t)}}recordMemoryUsage(e){if(!this.enabled||!("memory"in performance))return;let t=performance.memory;if(!t)return;let r={used:t.usedJSHeapSize/1024/1024,total:t.totalJSHeapSize/1024/1024,limit:t.jsHeapSizeLimit/1024/1024},a=e?`memory-${e}`:"memory-usage";this.recordMetric(a,r.used),r.used>100&&RP.warn(`High memory usage: ${r.used.toFixed(2)}MB`,{category:"configuration",operation:"high-memory-usage"})}trackLongTasks(){if(!this.enabled||!("PerformanceObserver"in window))return()=>{};let e=new PerformanceObserver(t=>{for(let r of t.getEntries())r.duration>50&&(RP.warn(`Long task detected: ${r.duration.toFixed(2)}ms`,{category:"persistence",operation:"long-task-detected"}),this.recordMetric("long-task",r.duration))});try{e.observe({entryTypes:["longtask"]}),this.performanceObservers.add(e)}catch(t){RP.warn("Long task monitoring not supported",{category:"persistence",operation:"long-task-monitoring-not-supported"})}return()=>{e.disconnect(),this.performanceObservers.delete(e)}}mark(e){if(this.enabled)try{performance.mark(`tasknotes-${e}`)}catch(t){}}measureBetweenMarks(e,t,r){if(this.enabled)try{performance.measure(`tasknotes-${r}`,`tasknotes-${e}`,`tasknotes-${t}`)}catch(a){}}clear(){this.metrics.clear(),this.markers.clear()}destroy(){for(let e of this.mutationObservers)e.disconnect();this.mutationObservers.clear();for(let e of this.performanceObservers)e.disconnect();this.performanceObservers.clear(),this.clear(),Wm.instance=null}setEnabled(e){this.enabled=e,e||this.clear()}exportData(){let e={timestamp:new Date().toISOString(),stats:this.getAllStats(),platform:{isDesktop:tb.Platform.isDesktop,isMobile:tb.Platform.isMobile,isWin:tb.Platform.isWin,isMacOS:tb.Platform.isMacOS,isLinux:tb.Platform.isLinux},memoryInfo:"memory"in performance?performance.memory:null};return JSON.stringify(e,null,2)}};Wm.instance=null;var V8=Wm;var _P=V8.getInstance();var D_e=require("obsidian");function Ia(n){return JSON.stringify(n,null,2)}function h_e(n){return{title:n.title,path:n.path,status:n.status,priority:n.priority}}Wl();xe();yt();TC();function W8(n){if(!n)return;let e=n.split(",").map(t=>t.trim()).filter(t=>t.length>0);return e.length>0?e:void 0}function Ndt(n){if(!n)return;let e=Number(n);if(!Number.isFinite(e)||e<0)throw new Error("--estimate must be a non-negative number of minutes");return e}function g_e(n){return`rem_${Date.now()}_${n}_${Math.random().toString(36).slice(2,11)}`}function Rdt(n){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(n)?`${n}:00`:n}function _dt(n,e){let t=n.trim();if(t.startsWith("at:")){let s=Rdt(t.slice(3).trim());if(!s)throw new Error("Absolute reminders must use at:YYYY-MM-DDTHH:MM or full ISO datetime");return{id:g_e(e),type:"absolute",description:"Reminder",absoluteTime:s}}let r=t.indexOf(":");if(r===-1)throw new Error("Reminder shorthand must use due:<offset>, scheduled:<offset>, or at:<datetime>");let a=t.slice(0,r).trim(),i=t.slice(r+1).trim();if(a!=="due"&&a!=="scheduled"||!i)throw new Error("Relative reminders must use due:<offset> or scheduled:<offset> with ISO 8601 durations like -PT1H");return{id:g_e(e),type:"relative",description:"Reminder",relatedTo:a,offset:i}}function Fdt(n){if(!n)return;let e=n.trim();if(!e)return;if(e.startsWith("[")){let r=JSON.parse(e);if(!Array.isArray(r))throw new Error("--reminders JSON must be an array");return r}let t=e.split(";").map(r=>r.trim()).filter(r=>r.length>0).map((r,a)=>_dt(r,a));return t.length>0?t:void 0}function Ldt(n){if(n){if(n!=="scheduled"&&n!=="completion")throw new Error("--recurrence-anchor must be either 'scheduled' or 'completion'");return n}}function y_e(n,e){var m,f;let t=(m=e.text)==null?void 0:m.trim(),r=(f=e.title)==null?void 0:f.trim(),a=e.literal==="true",i,s=!1;if(t&&!a){let h=Nn.fromPlugin(n).parseInput(t);i=Vd(n,h,{creationContext:"api"}),s=!0}else{let h=qe(),g=r||t;if(!g)throw new Error("Either --text or --title is required");i={title:g,status:n.settings.defaultTaskStatus,priority:n.settings.defaultTaskPriority,dateCreated:h,dateModified:h,creationContext:"api"}}if((!i.title||i.title.trim()===""||i.title==="Untitled Task")&&!r)throw new Error("Could not derive a task title from --text; pass --title to override");r&&(i.title=r),e.details&&(i.details=e.details),e.status&&(i.status=e.status),e.priority&&(i.priority=e.priority),e.due&&(i.due=e.due),e.scheduled&&(i.scheduled=e.scheduled);let o=W8(e.tags);o&&(i.tags=o.map(h=>ha(h)));let l=W8(e.contexts);l&&(i.contexts=l);let c=W8(e.projects);c&&(i.projects=c),e.recurrence&&(i.recurrence=e.recurrence);let d=Ldt(e["recurrence-anchor"]);d&&(i.recurrence_anchor=d);let u=Ndt(e.estimate);u!==void 0&&(i.timeEstimate=u);let p=Fdt(e.reminders);return p&&(i.reminders=p),{taskData:i,usedNlp:s}}var v_e={command:"capture",description:"Create a TaskNotes task from free text or explicit flags",flags:{text:{value:"<text>",description:"Task text to parse with NLP unless --literal is set"},title:{value:"<title>",description:"Explicit task title; overrides NLP-derived title"},details:{value:"<details>",description:"Task details/body; overrides NLP-derived details"},status:{value:"<status>",description:"Explicit task status"},priority:{value:"<priority>",description:"Explicit task priority"},due:{value:"<date>",description:"Due date or datetime (YYYY-MM-DD or YYYY-MM-DDTHH:MM)"},scheduled:{value:"<date>",description:"Scheduled date or datetime (YYYY-MM-DD or YYYY-MM-DDTHH:MM)"},tags:{value:"<tag1,tag2>",description:"Comma-separated tags; overrides NLP-derived tags"},contexts:{value:"<ctx1,ctx2>",description:"Comma-separated contexts; overrides NLP-derived contexts"},projects:{value:"<proj1,proj2>",description:"Comma-separated projects; overrides NLP-derived projects"},recurrence:{value:"<rrule>",description:"Explicit recurrence rule"},"recurrence-anchor":{value:"<scheduled|completion>",description:"How recurring tasks advance: from the scheduled date or completion date"},reminders:{value:"<spec>",description:"Reminder spec(s): due:-PT1H;scheduled:-PT30M;at:2026-04-02T09:00 or a JSON array"},estimate:{value:"<minutes>",description:"Time estimate in minutes"},literal:{description:"Treat --text as a literal title instead of parsing it with NLP"}},async handler(n,e){let{taskData:t,usedNlp:r}=y_e(n,e),a=await n.taskService.createTask(t);return Ia({...h_e(a.taskInfo),usedNlp:r})}};function q8(n){let e=n==null?void 0:n.trim();return e&&e.length>0?e:void 0}function k_e(n){return n.slice(0,5).map(e=>`${e.title} (${e.path})`).join(", ")}async function qm(n,e){let t=q8(e.path),r=q8(e.title),a=q8(e.query);if(t){let s=await n.cacheManager.getTaskInfo(t);if(!s)throw new Error(`Task not found for path: ${t}`);return s}let i=await n.cacheManager.getAllTasks();if(r){let s=i.filter(o=>o.title===r);if(s.length===1)return s[0];throw s.length>1?new Error(`Multiple tasks matched title "${r}": ${k_e(s)}`):new Error(`Task not found for title: ${r}`)}if(a){let s=a.toLowerCase(),o=i.filter(l=>l.title.toLowerCase().includes(s)||l.path.toLowerCase().includes(s));if(o.length===1)return o[0];throw o.length>1?new Error(`Multiple tasks matched query "${a}": ${k_e(o)}`):new Error(`Task not found for query: ${a}`)}throw new Error("A task reference is required: pass path, title, or query")}function Odt(n){let e=(n==null?void 0:n.trim())||"status";switch(e){case"status":case"start":case"pause":case"resume":case"stop":case"short-break":case"long-break":return e;default:throw new Error("--action must be one of: status, start, pause, resume, stop, short-break, long-break")}}function zdt(n){if(!n)return;let e=Number(n);if(!Number.isFinite(e)||e<=0)throw new Error("--duration must be a positive number of minutes");return e}function Bdt(n){return!!(n.path||n.title||n.query)}async function jdt(n,e,t){if(!Bdt(e)){if(t)throw new Error("A task reference is required: pass path, title, or query");return}return qm(n,{path:e.path,title:e.title,query:e.query})}async function Rg(n,e){var a,i,s;let t=e.currentSession,r=t!=null&&t.taskPath?await n.cacheManager.getTaskInfo(t.taskPath):null;return{isRunning:e.isRunning,timeRemaining:e.timeRemaining,nextSessionType:(a=e.nextSessionType)!=null?a:null,currentSession:t?{id:t.id,type:t.type,startTime:t.startTime,endTime:(i=t.endTime)!=null?i:null,plannedDuration:t.plannedDuration,completed:t.completed,interrupted:(s=t.interrupted)!=null?s:!1,task:r?{title:r.title,path:r.path}:t.taskPath?{title:null,path:t.taskPath}:null}:null}}var T_e={command:"pomodoro",description:"Control TaskNotes Pomodoro sessions or inspect the current Pomodoro state",flags:{action:{value:"<status|start|pause|resume|stop|short-break|long-break>",description:"Pomodoro action to perform (default: status)"},path:{value:"<path>",description:"Exact task file path for action=start"},title:{value:"<title>",description:"Exact task title for action=start"},query:{value:"<text>",description:"Substring match against task title or path for action=start"},duration:{value:"<minutes>",description:"Optional work-session duration override for action=start"}},async handler(n,e){let t=Odt(e.action),r=zdt(e.duration);switch(t){case"status":return Ia(await Rg(n,n.pomodoroService.getState()));case"start":{let a=await jdt(n,e,!1);return await n.pomodoroService.startPomodoro(a,r),Ia(await Rg(n,n.pomodoroService.getState()))}case"pause":return await n.pomodoroService.pausePomodoro(),Ia(await Rg(n,n.pomodoroService.getState()));case"resume":return await n.pomodoroService.resumePomodoro(),Ia(await Rg(n,n.pomodoroService.getState()));case"stop":return await n.pomodoroService.stopPomodoro(),Ia(await Rg(n,n.pomodoroService.getState()));case"short-break":return await n.pomodoroService.startBreak(!1),Ia(await Rg(n,n.pomodoroService.getState()));case"long-break":return await n.pomodoroService.startBreak(!0),Ia(await Rg(n,n.pomodoroService.getState()))}}};function $dt(n){return b_e(n)}function b_e(n){var e,t;return(t=(e=n.timeEntries)==null?void 0:e.find(r=>!r.endTime))!=null?t:null}async function w_e(n,e,t){let r=await n.taskService.startTimeTracking(e),a=t==null?void 0:t.trim();if(a&&r.timeEntries&&r.timeEntries.length>0){let i=r.timeEntries[r.timeEntries.length-1];i&&!i.endTime&&(i.description=a,r=await n.taskService.updateTask(r,{timeEntries:r.timeEntries}))}return r}async function S_e(n,e){let t=await e();if(t)return t;let a=(await n.cacheManager.getAllTasks()).filter(i=>!!$dt(i));if(a.length===1)return a[0];throw a.length>1?new Error("Multiple tasks have active time tracking; pass path, title, or query"):new Error("No active time tracking session found")}function s1(n){var t,r;let e=b_e(n);return{title:n.title,path:n.path,status:n.status,priority:n.priority,activeTimeEntry:e?{startTime:e.startTime,description:e.description}:null,totalTimeEntries:(r=(t=n.timeEntries)==null?void 0:t.length)!=null?r:0}}var C_e={command:"start-time",description:"Start time tracking for a task",flags:{path:{value:"<path>",description:"Exact task file path"},title:{value:"<title>",description:"Exact task title"},query:{value:"<text>",description:"Substring match against task title or path"},description:{value:"<text>",description:"Optional description for the started time entry"}},async handler(n,e){let t=await qm(n,{path:e.path,title:e.title,query:e.query}),r=await w_e(n,t,e.description);return Ia(s1(r))}};function Udt(n){return!!(n.path||n.title||n.query)}var x_e={command:"stop-time",description:"Stop time tracking for a task, or for the only active session if unambiguous",flags:{path:{value:"<path>",description:"Exact task file path"},title:{value:"<title>",description:"Exact task title"},query:{value:"<text>",description:"Substring match against task title or path"}},async handler(n,e){let t=await S_e(n,async()=>Udt(e)?qm(n,{path:e.path,title:e.title,query:e.query}):null),r=await n.taskService.stopTimeTracking(t);return Ia(s1(r))}};CE();function Hdt(n){return!!(n.path||n.title||n.query)}var E_e={command:"time-status",description:"Show active time-tracking sessions, or detailed status for a specific task",flags:{path:{value:"<path>",description:"Exact task file path"},title:{value:"<title>",description:"Exact task title"},query:{value:"<text>",description:"Substring match against task title or path"}},async handler(n,e){if(Hdt(e)){let r=await qm(n,{path:e.path,title:e.title,query:e.query});return Ia(pm(r,a=>n.getActiveTimeSession(a)))}let t=await n.cacheManager.getAllTasks();return Ia(Qk(t,r=>n.getActiveTimeSession(r)))}};var Vdt=[T_e,E_e,C_e,x_e,v_e];function P_e(n){var e;if((0,D_e.requireApiVersion)("1.12.2")&&typeof n.registerCliHandler=="function")for(let t of Vdt)n.registerCliHandler(`${n.manifest.id}:${t.command}`,t.description,(e=t.flags)!=null?e:null,r=>t.handler(n,r))}var Gm=require("obsidian");q();Fi();var Wdt=M({tag:"Commands/TaskNotesCommands"});function A_e(n){return[{id:"open-calendar-view",nameKey:"commands.openCalendarView",callback:async e=>{await e.activateCalendarView()}},{id:"open-advanced-calendar-view",nameKey:"commands.openAdvancedCalendarView",callback:async e=>{await e.openBasesFileForCommand("open-advanced-calendar-view")}},{id:"open-tasks-view",nameKey:"commands.openTasksView",callback:async e=>{await e.openBasesFileForCommand("open-tasks-view")}},{id:"open-agenda-view",nameKey:"commands.openAgendaView",callback:async e=>{await e.openBasesFileForCommand("open-agenda-view")}},{id:"open-pomodoro-view",nameKey:"commands.openPomodoroView",callback:async e=>{await e.activatePomodoroView()}},{id:"open-kanban-view",nameKey:"commands.openKanbanView",callback:async e=>{await e.openBasesFileForCommand("open-kanban-view")}},{id:"update-default-base-files",nameKey:"commands.updateDefaultBaseFiles",callback:async e=>{await ur(e.app,{title:e.i18n.translate("settings.integrations.basesIntegration.updateDefaultFiles.confirmTitle"),message:e.i18n.translate("settings.integrations.basesIntegration.updateDefaultFiles.confirmMessage"),confirmText:e.i18n.translate("settings.integrations.basesIntegration.updateDefaultFiles.confirmText"),isDestructive:!1})&&await e.createDefaultBasesFiles({overwriteExisting:!0})}},{id:"open-pomodoro-stats",nameKey:"commands.openPomodoroStats",callback:async e=>{await e.activatePomodoroStatsView()}},{id:"open-statistics",nameKey:"commands.openStatisticsView",callback:async e=>{await e.activateStatsView()}},{id:"create-new-task",nameKey:"commands.createNewTask",callback:e=>{e.openTaskCreationModal()}},{id:"convert-current-note-to-task",nameKey:"commands.convertCurrentNoteToTask.name",callback:async e=>{await e.convertCurrentNoteToTask()}},{id:"convert-to-tasknote",nameKey:"commands.convertToTaskNote",editorCallback:async(e,t)=>{await e.convertTaskToTaskNote(t)}},{id:"batch-convert-all-tasks",nameKey:"commands.convertAllTasksInNote",editorCallback:async(e,t)=>{await e.batchConvertAllTasks(t)}},{id:"insert-tasknote-link",nameKey:"commands.insertTaskNoteLink",editorCallback:(e,t)=>{e.insertTaskNoteLink(t)}},{id:"create-inline-task",nameKey:"commands.createInlineTask",editorCallback:async(e,t)=>{await e.createInlineTask(t)}},{id:"quick-actions-current-task",nameKey:"commands.quickActionsCurrentTask",callback:async e=>{await e.openQuickActionsForCurrentTask()}},{id:"quick-actions-task-under-cursor",nameKey:"commands.quickActionsTaskUnderCursor",editorCallback:async(e,t,r)=>{await e.openQuickActionsForTaskUnderCursor(t,r.file)}},{id:"edit-current-task",nameKey:"commands.editCurrentTask",callback:async e=>{await e.openTaskEditModalForCurrentTask()}},{id:"cycle-current-task-status",nameKey:"commands.cycleCurrentTaskStatus",callback:async e=>{await e.cycleCurrentTaskStatus()}},{id:"cycle-current-task-priority",nameKey:"commands.cycleCurrentTaskPriority",callback:async e=>{await e.cycleCurrentTaskPriority()}},{id:"add-project-to-current-task",nameKey:"commands.addProjectToCurrentTask",callback:async e=>{await e.addProjectToCurrentTask()}},{id:"add-subtask-to-current-note",nameKey:"commands.addSubtaskToCurrentNote",callback:async e=>{await e.addSubtaskToCurrentNote()}},{id:"go-to-today",nameKey:"commands.goToTodayNote",callback:async e=>{await e.navigateToCurrentDailyNote()}},{id:"start-pomodoro",nameKey:"commands.startPomodoro",callback:async e=>{let t=e.pomodoroService.getState();if(t.currentSession&&!t.isRunning){await e.pomodoroService.resumePomodoro();return}t.nextSessionType==="short-break"?await e.pomodoroService.startBreak(!1):t.nextSessionType==="long-break"?await e.pomodoroService.startBreak(!0):await e.pomodoroService.startPomodoroWithLastSelectedTask()}},{id:"stop-pomodoro",nameKey:"commands.stopPomodoro",callback:async e=>{await e.pomodoroService.stopPomodoro()}},{id:"pause-pomodoro",nameKey:"commands.pauseResumePomodoro",callback:async e=>{let t=e.pomodoroService.getState();t.isRunning?await e.pomodoroService.pausePomodoro():t.currentSession&&await e.pomodoroService.resumePomodoro()}},{id:"refresh-cache",nameKey:"commands.refreshCache",callback:async e=>{await e.refreshCache()}},{id:"export-all-tasks-ics",nameKey:"commands.exportAllTasksIcs",callback:async e=>{var t,r,a,i,s;try{let o=await e.cacheManager.getAllTasks(),{downloadAllTasksICSFile:l}=await Promise.resolve().then(()=>(M2(),Ece));l(o,e.i18n.translate.bind(e.i18n),{useDurationForExport:(t=e.settings.icsIntegration.useDurationForExport)!=null?t:!1,excludeArchived:(r=e.settings.icsIntegration.excludeArchivedFromExport)!=null?r:!1,excludeCompleted:(a=e.settings.icsIntegration.excludeCompletedFromExport)!=null?a:!1,completedStatuses:e.statusManager.getCompletedStatuses(),requireDueDate:(i=e.settings.icsIntegration.requireDueDateForExport)!=null?i:!1,requireScheduledDate:(s=e.settings.icsIntegration.requireScheduledDateForExport)!=null?s:!1,includeObsidianLink:!0,vaultName:e.app.vault.getName()})}catch(o){Wdt.error("Error exporting all tasks as ICS:",{category:"provider",operation:"exporting-all-tasks-as-ics",error:o}),new Gm.Notice(e.i18n.translate("notices.exportTasksFailed"))}}},{id:"sync-all-tasks-google-calendar",nameKey:"commands.syncAllTasksGoogleCalendar",callback:async e=>{var t;if(!((t=e.taskCalendarSyncService)!=null&&t.isEnabled())){new Gm.Notice(e.i18n.translate("settings.integrations.googleCalendarExport.notices.notEnabled"));return}await e.taskCalendarSyncService.syncAllTasks()}},{id:"sync-current-task-google-calendar",nameKey:"commands.syncCurrentTaskGoogleCalendar",callback:async e=>{var a;if(!((a=e.taskCalendarSyncService)!=null&&a.isEnabled())){new Gm.Notice(e.i18n.translate("settings.integrations.googleCalendarExport.notices.notEnabled"));return}let t=e.app.workspace.getActiveFile();if(!t){new Gm.Notice(e.i18n.translate("settings.integrations.googleCalendarExport.notices.noActiveFile"));return}let r=await e.cacheManager.getTaskInfo(t.path);if(!r){new Gm.Notice(e.i18n.translate("settings.integrations.googleCalendarExport.notices.notATask"));return}if(!e.taskCalendarSyncService.shouldSyncTask(r)){new Gm.Notice(e.i18n.translate("settings.integrations.googleCalendarExport.notices.noDateToSync"));return}await e.taskCalendarSyncService.syncTaskToCalendar(r),new Gm.Notice(e.i18n.translate("settings.integrations.googleCalendarExport.notices.taskSynced"))}},{id:"view-release-notes",nameKey:"commands.viewReleaseNotes",callback:async e=>{await e.activateReleaseNotesView()}},{id:"start-time-tracking-current-task",nameKey:"commands.startTimeTrackingCurrentTask",callback:async e=>{await e.setCurrentTaskTimeTracking("start")}},{id:"stop-time-tracking-current-task",nameKey:"commands.stopTimeTrackingCurrentTask",callback:async e=>{await e.setCurrentTaskTimeTracking("stop")}},{id:"start-time-tracking-with-selector",nameKey:"commands.startTimeTrackingWithSelector",callback:async e=>{await e.openTaskSelectorForTimeTracking()}},{id:"edit-time-entries",nameKey:"commands.editTimeEntries",callback:async e=>{await e.openTaskSelectorForTimeEntryEditor()}},{id:"create-or-open-task",nameKey:"commands.createOrOpenTask",callback:async e=>{await e.openTaskSelectorWithCreate()}},{id:"create-or-open-task-with-time-tracking",nameKey:"commands.createOrOpenTaskWithTracking",callback:async e=>{await e.openTaskSelectorWithCreateAndStartTracking()}},{id:"rollover-overdue-scheduled-tasks",nameKey:"commands.rolloverOverdueScheduledTasks",callback:async e=>{await e.rolloverOverdueScheduledTasks()}}]}var o1=class{constructor(e){this.plugin=e;this.definitions=[];this.registeredCommands=new Map}register(){this.definitions=A_e(this.plugin),this.registerCommands()}refreshTranslations(){var a,i;if(!this.definitions.length)return;let e=this.plugin.app.commands;if(!e)return;let t=e,r=t.removeCommand;if(typeof r=="function"){for(let s of this.registeredCommands.values())r.call(e,s);this.registerCommands();return}for(let s of this.definitions){let o=(a=this.registeredCommands.get(s.id))!=null?a:`${this.plugin.manifest.id}:${s.id}`,l=(i=t.commands)==null?void 0:i[o];l&&(l.name=this.plugin.i18n.translate(s.nameKey),typeof t.updateCommand=="function"&&t.updateCommand(o,l))}}registerCommands(){this.registeredCommands.clear();for(let e of this.definitions){let t={id:e.id,name:this.plugin.i18n.translate(e.nameKey)};e.callback&&(t.callback=()=>{var a;(a=e.callback)==null||a.call(e,this.plugin)}),e.editorCallback&&(t.editorCallback=(a,i)=>{var s;(s=e.editorCallback)==null||s.call(e,this.plugin,a,i)}),e.checkCallback&&(t.checkCallback=e.checkCallback),e.hotkeys&&(t.hotkeys=e.hotkeys);let r=this.plugin.addCommand(t);this.registeredCommands.set(e.id,r.id)}}};var _g=require("obsidian");Pr();MW();Wd();var l1=class{constructor(e){this.plugin=e}getLeafOfType(e){let t=this.plugin.app.workspace.getLeavesOfType(e);return t.length>0?t[0]:null}async revealLeafReady(e){let{workspace:t}=this.plugin.app;t.setActiveLeaf(e,{focus:!0}),await t.revealLeaf(e),e.isDeferred&&await e.loadIfDeferred()}async activateView(e){let{workspace:t}=this.plugin.app,r=this.getLeafOfType(e);return r||(r=t.getLeaf("tab"),await r.setViewState({type:e,active:!0})),await this.revealLeafReady(r),r}async activateCalendarView(){await this.openBasesFileForCommand("open-calendar-view")}async activateAgendaView(){return this.activateView(RX)}async activatePomodoroView(){if(_g.Platform.isMobile&&this.plugin.settings.pomodoroMobileSidebar!=="tab"){let{workspace:e}=this.plugin.app,t=this.getLeafOfType(ld);if(!t){let r=this.plugin.settings.pomodoroMobileSidebar==="left"?e.getLeftLeaf(!1):e.getRightLeaf(!1);if(r)t=r,await t.setViewState({type:ld,active:!0});else return this.activateView(ld)}return await this.revealLeafReady(t),t}return this.activateView(ld)}async activatePomodoroStatsView(){return this.activateView(Kg)}async activateStatsView(){return this.activateView(Zg)}async activateReleaseNotesView(){return this.activateView(nE)}getLeafFilePath(e){var r,a,i,s;let t=((a=(r=e.view)==null?void 0:r.file)==null?void 0:a.path)||((s=(i=e.view)==null?void 0:i.getState)==null?void 0:s.call(i).file);return t?(0,_g.normalizePath)(t):null}findLeafForFile(e){var a;let t=this.plugin.app.workspace,r=null;return(a=t.iterateAllLeaves)==null||a.call(t,i=>{!r&&this.getLeafFilePath(i)===e&&(r=i)}),r}async openBasesFileForCommand(e){let t=this.plugin.settings.commandFileMapping[e];if(!t){Ze(`No file configured for command: ${e}`);return}let r=(0,_g.normalizePath)(t);if(!await this.plugin.app.vault.adapter.exists(r)){Ze(`File not found: ${r}
Please configure a valid file in Settings → TaskNotes → View Commands, or use the "Create Default Files" button.`,1e4);return}let i=this.plugin.app.vault.getAbstractFileByPath(r);if(!i){Ze(`File not found in vault: ${r}
The file exists but Obsidian cannot find it. Try reloading the vault.`);return}if(!(i instanceof _g.TFile)){Ze(`Path is not a file: ${r}`);return}let s=this.findLeafForFile(r);if(s){await this.revealLeafReady(s);return}await this.plugin.app.workspace.getLeaf("tab").openFile(i)}};var __e=require("obsidian");Pr();var Pl=require("obsidian");rz();var c1=class extends Pl.Modal{constructor(t,r,a,i){super(t);this.keyboardHandler=null;this.totalEl=null;this.descriptionEditors=[];this.plugin=r,this.task=a,this.timeEntries=JSON.parse(JSON.stringify(a.timeEntries||[])),this.onSave=i,this.translate=r.i18n.translate.bind(r.i18n)}onOpen(){let{contentEl:t}=this;this.cleanupDescriptionEditors(),t.empty(),t.addClass("time-entry-editor-modal"),this.titleEl.setText(this.translate("modals.timeEntryEditor.title",{taskTitle:this.task.title})),this.keyboardHandler&&this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=c=>{c.key==="Enter"&&(c.ctrlKey||c.metaKey)&&(c.preventDefault(),this.save())},this.containerEl.addEventListener("keydown",this.keyboardHandler),this.entriesContainerEl=t.createDiv({cls:"time-entry-editor-modal__entries"}),this.renderEntries(),t.createDiv({cls:"time-entry-editor-modal__add-button-container"}).createEl("button",{text:this.translate("modals.timeEntryEditor.addEntry"),cls:"mod-cta"}).addEventListener("click",()=>this.addNewEntry());let i=t.createDiv({cls:"time-entry-editor-modal__footer"});this.totalEl=i.createDiv({cls:"time-entry-editor-modal__total"}),this.updateTotalDisplay();let s=i.createDiv({cls:"time-entry-editor-modal__buttons"});s.createEl("button",{text:this.translate("common.cancel")}).addEventListener("click",()=>this.close()),s.createEl("button",{text:this.translate("common.save"),cls:"mod-cta"}).addEventListener("click",()=>this.save())}renderEntries(){if(this.cleanupDescriptionEditors(),this.entriesContainerEl.empty(),this.timeEntries.length===0){this.entriesContainerEl.createDiv({cls:"time-entry-editor-modal__empty",text:this.translate("modals.timeEntryEditor.noEntries")});return}[...this.timeEntries].sort((r,a)=>new Date(a.startTime).getTime()-new Date(r.startTime).getTime()).forEach(r=>{let a=this.timeEntries.indexOf(r);this.renderEntry(r,a)})}renderEntry(t,r){let a=this.entriesContainerEl.createDiv({cls:"time-entry-editor-modal__entry"}),i=a.createDiv({cls:"time-entry-editor-modal__entry-header"}),s=new Date(t.startTime).toLocaleDateString();i.createSpan({cls:"time-entry-editor-modal__entry-date",text:s});let o=i.createEl("button",{cls:"time-entry-editor-modal__delete-button",attr:{"aria-label":this.translate("modals.timeEntryEditor.deleteEntry")}});(0,Pl.setIcon)(o,"trash-2"),o.addEventListener("click",()=>this.deleteEntry(r));let l=a.createDiv({cls:"time-entry-editor-modal__time-container"}),d=new Pl.Setting(l).setName(this.translate("modals.timeEntryEditor.startTime")).controlEl.createEl("input",{type:"datetime-local",cls:"time-entry-editor-modal__datetime-input"});d.value=this.formatDateTimeForInput(new Date(t.startTime)),d.addEventListener("change",()=>{let h=new Date(d.value);isNaN(h.getTime())||(t.startTime=h.toISOString(),this.updateTotalDisplay())});let p=new Pl.Setting(l).setName(this.translate("modals.timeEntryEditor.endTime")).controlEl.createEl("input",{type:"datetime-local",cls:"time-entry-editor-modal__datetime-input"});t.endTime&&(p.value=this.formatDateTimeForInput(new Date(t.endTime))),p.addEventListener("change",()=>{if(p.value){let h=new Date(p.value);isNaN(h.getTime())||(t.endTime=h.toISOString(),this.updateTotalDisplay())}else t.endTime=void 0,this.updateTotalDisplay()});let m=new Pl.Setting(l).setName(this.translate("modals.timeEntryEditor.description"));m.settingEl.addClass("time-entry-editor-modal__description-setting");let f=m.controlEl.createDiv({cls:"time-entry-editor-modal__description-editor-container"});this.renderLazyDescriptionEditor(t,f)}renderLazyDescriptionEditor(t,r){let a=r.createEl("textarea",{cls:"time-entry-editor-modal__description-editor-fallback",placeholder:this.translate("modals.timeEntryEditor.descriptionPlaceholder")});a.value=t.description||"",a.addEventListener("input",()=>{t.description=a.value||void 0}),a.addEventListener("keydown",o=>{o.key==="Enter"&&(o.ctrlKey||o.metaKey)?(o.preventDefault(),this.save()):o.key==="Escape"&&(o.preventDefault(),this.close())});let i=!1,s=()=>{if(i)return;i=!0,t.description=a.value||void 0,r.empty();let o=this.createDescriptionMarkdownEditor(t,r);o&&this.descriptionEditors.push(o),this.focusDescriptionEditor(r)};a.addEventListener("focus",s,{once:!0})}createDescriptionMarkdownEditor(t,r){return t0(this.app,r,{value:t.description||"",placeholder:this.translate("modals.timeEntryEditor.descriptionPlaceholder"),cls:"time-entry-editor-modal__description-editor",onChange:i=>{t.description=i||void 0},onSubmit:()=>this.save(),onEscape:()=>this.close(),onTab:()=>!1})}focusDescriptionEditor(t){window.setTimeout(()=>{let r=t.querySelector(".cm-content, textarea");r==null||r.focus()},0)}cleanupDescriptionEditors(){this.descriptionEditors.forEach(t=>t.destroy()),this.descriptionEditors=[]}updateTotalDisplay(){if(!this.totalEl)return;let t=this.calculateTotalMinutes(),r=Math.floor(t/60),a=t%60,i=r>0?this.translate("modals.timeEntryEditor.totalTime",{hours:r.toString(),minutes:a.toString()}):this.translate("modals.timeEntryEditor.totalMinutes",{minutes:t.toString()});this.totalEl.setText(i)}calculateDuration(t){if(!t.endTime){let i=new Date,s=new Date(t.startTime);return Math.round((i.getTime()-s.getTime())/6e4)}let r=new Date(t.startTime),a=new Date(t.endTime);return Math.round((a.getTime()-r.getTime())/6e4)}calculateTotalMinutes(){return this.timeEntries.reduce((t,r)=>{let a=this.calculateDuration(r);return t+a},0)}addNewEntry(){let t=new Date,a={startTime:new Date(t.getTime()-3600*1e3).toISOString(),endTime:t.toISOString(),description:""};this.timeEntries.push(a),this.renderEntries(),this.updateTotalDisplay()}deleteEntry(t){this.timeEntries.splice(t,1),this.renderEntries(),this.updateTotalDisplay()}formatDateTimeForInput(t){let r=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${r}-${a}-${i}T${s}:${o}`}save(){for(let r of this.timeEntries){if(!r.startTime){new Pl.Notice(this.translate("modals.timeEntryEditor.validation.missingStartTime"));return}if(r.endTime){let a=new Date(r.startTime);if(new Date(r.endTime)<=a){new Pl.Notice(this.translate("modals.timeEntryEditor.validation.endBeforeStart"));return}}}let t=this.timeEntries.map(r=>{let a={...r};return delete a.duration,a});this.onSave(t),this.close()}onClose(){this.cleanupDescriptionEditors(),this.totalEl=null,this.keyboardHandler&&(this.containerEl.removeEventListener("keydown",this.keyboardHandler),this.keyboardHandler=null);let{contentEl:t}=this;t.empty()}};Fi();co();var G8=/^(\d{4})-(\d{2})-(\d{2})$/,qdt=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d{1,3})?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function Y8(n){let e=Ydt(n),t=e.match(G8);if(t){let[,a,i,s]=t,o=Number(a),l=Number(i),c=Number(s);if(!I_e(o,l,c))throw new Error(`Invalid date "${n}".`);return new Date(Date.UTC(o,l-1,c,0,0,0,0))}if(!Kdt(e))throw new Error(`Invalid date "${n}".`);let r=new Date(e);if(!N_e(r))throw new Error(`Invalid date "${n}".`);return r}function Gdt(n){if(!N_e(n))return"";let e=n.getUTCFullYear(),t=String(n.getUTCMonth()+1).padStart(2,"0"),r=String(n.getUTCDate()).padStart(2,"0");return`${e}-${t}-${r}`}function FP(){let n=new Date,e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}function d1(n){if(!n)return"";let e=n.trim();if(G8.test(e))return e;let t=e.indexOf("T");if(t>-1)return e.slice(0,t);let r=e.indexOf(" ");return r>-1&&G8.test(e.slice(0,r))?e.slice(0,r):Gdt(Y8(e))}function M_e(n,e){try{return Y8(d1(n)).getTime()<Y8(d1(e)).getTime()}catch(t){return!1}}function Ydt(n,e="Date string cannot be empty"){if(!n||n.trim().length===0)throw new Error(e);return n.trim()}function Kdt(n){let e=n.match(qdt);if(!e)return!1;let[,t,r,a,i,s,o,,l,c,d]=e;return I_e(Number(t),Number(r),Number(a))&&Zdt(Number(i),Number(s),Number(o))&&Qdt(l,c,d)}function I_e(n,e,t){let r=new Date(Date.UTC(n,e-1,t,0,0,0,0));return r.getUTCFullYear()===n&&r.getUTCMonth()===e-1&&r.getUTCDate()===t}function Zdt(n,e,t){return n>=0&&n<=23&&e>=0&&e<=59&&t>=0&&t<=59}function Qdt(n,e,t){if(!n)return!0;let r=Number(e),a=Number(t);return!(r>14||a>59||r===14&&a!==0)}function N_e(n){return n instanceof Date&&!Number.isNaN(n.getTime())}yt();function Jdt(n,e=FP()){let t=n.indexOf("T");return t===-1?e:`${e}${n.slice(t)}`}function R_e(n,e,t=FP()){let r=[];for(let a of n){if(!a.scheduled||a.archived||e(a.status))continue;let i=d1(a.scheduled);!i||!M_e(i,t)||r.push({task:a,nextScheduled:Jdt(a.scheduled,t)})}return r}q();Wd();var Ym=M({tag:"Services/TaskActionCoordinator"}),u1=class{constructor(e){this.plugin=e}async openTaskFile(e){let t=this.plugin.app.vault.getAbstractFileByPath(e.path);t instanceof __e.TFile&&await this.plugin.app.workspace.getLeaf(!1).openFile(t)}async openTaskSelectorWithCreate(){let{openTaskSelectorWithCreate:e}=await Promise.resolve().then(()=>(co(),h2)),t=await e(this.plugin);(t.type==="selected"||t.type==="created")&&await this.openTaskFile(t.task)}async openTaskSelectorWithCreateAndStartTracking(){let{openTaskSelectorWithCreate:e}=await Promise.resolve().then(()=>(co(),h2)),t=new Date,r=await e(this.plugin,{targetDate:t});if(r.type==="selected"||r.type==="created"){let a=r.task;try{a=await this.startTimeTracking(r.task)}catch(i){}finally{await this.openTaskFile(a)}}}async startTimeTracking(e,t){try{let r=await this.plugin.taskService.startTimeTracking(e),a=t==null?void 0:t.trim();if(a&&r.timeEntries&&r.timeEntries.length>0){let i=r.timeEntries[r.timeEntries.length-1];i&&!i.endTime&&(i.description=a,r=await this.plugin.taskService.updateTask(r,{timeEntries:r.timeEntries}))}return Ze("Time tracking started"),this.requestStatusBarUpdate(),r}catch(r){throw Ym.error("Failed to start time tracking:",{category:"persistence",operation:"start-time-tracking",error:r}),r instanceof Error&&r.message==="Time tracking is already active for this task"?Ze("Time tracking is already active for this task"):Ze("Failed to start time tracking"),r}}async stopTimeTracking(e){try{let t=await this.plugin.taskService.stopTimeTracking(e);return Ze("Time tracking stopped"),this.requestStatusBarUpdate(),t}catch(t){throw Ym.error("Failed to stop time tracking:",{category:"persistence",operation:"stop-time-tracking",error:t}),t instanceof Error&&t.message==="No active time tracking session for this task"?Ze("No active time tracking session for this task"):Ze("Failed to stop time tracking"),t}}async openTaskSelectorForTimeTracking(){try{let e=new Date,r=(await this.plugin.cacheManager.getAllTasks()).filter(a=>!a.archived).filter(a=>!R0(a.timeEntries||[]));if(r.length===0){Ze(this.plugin.i18n.translate("modals.timeTracking.noTasksAvailable"));return}fn(this.plugin,r,a=>{(async()=>{if(a)try{await this.startTimeTracking(a),Ze(this.plugin.i18n.translate("modals.timeTracking.started",{taskTitle:a.title}))}catch(i){Ym.error("Error starting time tracking:",{category:"persistence",operation:"starting-time-tracking",error:i}),Ze(this.plugin.i18n.translate("modals.timeTracking.startFailed"))}})()},{targetDate:e})}catch(e){Ym.error("Error opening task selector for time tracking:",{category:"persistence",operation:"opening-task-selector-time-tracking",error:e}),Ze(this.plugin.i18n.translate("modals.timeTracking.startFailed"))}}async openTaskSelectorForTimeEntryEditor(){try{let t=(await this.plugin.cacheManager.getAllTasks()).filter(r=>!r.archived).filter(r=>r.timeEntries&&r.timeEntries.length>0);if(t.length===0){Ze(this.plugin.i18n.translate("modals.timeEntryEditor.noTasksWithEntries"));return}fn(this.plugin,t,r=>{r&&this.openTimeEntryEditor(r)})}catch(e){Ym.error("Error opening task selector for time entry editor:",{category:"persistence",operation:"opening-task-selector-time-entry-editor",error:e}),Ze(this.plugin.i18n.translate("modals.timeEntryEditor.openFailed"))}}async rolloverOverdueScheduledTasks(){try{let e=FP(),t=await this.plugin.cacheManager.getAllTasks(),r=R_e(t,l=>this.plugin.statusManager.isCompletedStatus(l),e);if(r.length===0){Ze("No overdue scheduled tasks to postpone");return}let a=r.length===1?"task":"tasks";if(!await ur(this.plugin.app,{title:"Postpone overdue scheduled tasks",message:`Move ${r.length} active overdue scheduled ${a} to today (${e})?`,confirmText:"Postpone",cancelText:this.plugin.i18n.translate("common.cancel")}))return;Ze(`Postponing ${r.length} ${a}...`);let s=0,o=0;for(let l of r)try{await this.plugin.taskService.updateProperty(l.task,"scheduled",l.nextScheduled),s++}catch(c){Ym.error(`[TaskActionCoordinator] Failed to postpone scheduled task ${l.task.path}:`,{category:"persistence",operation:"postpone-scheduled-task",error:c}),o++}o===0?Ze(`Postponed ${s} ${s===1?"task":"tasks"}`):Ze(`Postponed ${s} tasks, ${o} failed`),this.plugin.emitter.trigger(Ra)}catch(e){Ym.error("Failed to postpone overdue scheduled tasks:",{category:"persistence",operation:"postpone-overdue-scheduled-tasks",error:e}),Ze("Failed to postpone overdue scheduled tasks")}}openTimeEntryEditor(e,t){new c1(this.plugin.app,this.plugin,e,a=>{(async()=>{try{let i=a.map(s=>{let o={...s};return delete o.duration,o});await this.plugin.taskService.updateTask(e,{timeEntries:i}),t==null||t(),this.plugin.emitter.trigger(Ra),Ze(this.plugin.i18n.translate("modals.timeEntryEditor.saved"))}catch(i){Ym.error("Error saving time entries:",{category:"persistence",operation:"saving-time-entries",error:i}),Ze(this.plugin.i18n.translate("modals.timeEntryEditor.saveFailed"))}})()}).open()}requestStatusBarUpdate(){this.plugin.statusBarService&&window.setTimeout(()=>{this.plugin.statusBarService.requestUpdate()},50)}};Pr();q();Oi();var F_e=M({tag:"Services/SettingsLifecycleService"}),p1=class{constructor(e){this.plugin=e;this.previousCacheSettings=null;this.previousTimeTrackingSettings=null;this.autoStopTimeTrackingListener=null;this.saveSettingsPromise=null;this.saveSettingsRequested=!1}captureCurrentSettings(){this.updatePreviousCacheSettings(),this.updatePreviousTimeTrackingSettings()}setupTimeTrackingEventListeners(){this.autoStopTimeTrackingListener&&(this.plugin.emitter.offref(this.autoStopTimeTrackingListener),this.autoStopTimeTrackingListener=null),this.plugin.settings.autoStopTimeTrackingOnComplete&&(this.autoStopTimeTrackingListener=this.plugin.emitter.on(rt,async e=>{await this.handleAutoStopTimeTracking(e)})),this.updatePreviousTimeTrackingSettings()}async saveSettings(){this.saveSettingsRequested=!0,this.saveSettingsPromise||(this.saveSettingsPromise=this.drainSettingsSaves()),await this.saveSettingsPromise}async drainSettingsSaves(){try{for(;this.saveSettingsRequested;)this.saveSettingsRequested=!1,await this.plugin.saveSettingsDataOnly(),!this.saveSettingsRequested&&this.applySettingsSideEffects()}finally{this.saveSettingsPromise=null,this.saveSettingsRequested&&await this.saveSettings()}}applySettingsSideEffects(){var r,a,i,s,o,l,c,d,u,p,m,f;(a=(r=this.plugin.apiService)==null?void 0:r.syncWebhookSettings)==null||a.call(r);let e=this.haveCacheSettingsChanged(),t=this.haveTimeTrackingSettingsChanged();(i=this.plugin.fieldMapper)==null||i.updateMapping(this.plugin.settings.fieldMapping),(o=this.plugin.fieldMapper)==null||o.updateUserFields((s=this.plugin.settings.userFields)!=null?s:[]),(l=this.plugin.fieldMapper)==null||l.updateConfiguredValues(this.plugin.settings.customStatuses,this.plugin.settings.customPriorities),(c=this.plugin.statusManager)==null||c.updateStatuses(this.plugin.settings.customStatuses),(d=this.plugin.priorityManager)==null||d.updatePriorities(this.plugin.settings.customPriorities),e&&(F_e.debug("Cache-related settings changed, updating cache configuration",{category:"configuration",operation:"cache-related-settings-changed-updating-cache-configuration"}),this.plugin.cacheManager.updateConfig(this.plugin.settings),(u=this.plugin.dependencyCache)==null||u.updateConfig(this.plugin.settings),this.updatePreviousCacheSettings()),this.plugin.injectCustomStyles(),t&&this.setupTimeTrackingEventListeners(),(p=this.plugin.statusBarService)==null||p.updateVisibility(),(m=this.plugin.mdbaseSpecService)==null||m.onSettingsChanged(),(f=this.plugin.filterService)==null||f.refreshFilterOptions(),this.plugin.notifyDataChanged(),this.plugin.emitter.trigger("settings-changed",this.plugin.settings)}async onExternalSettingsChange(){var e,t,r,a,i,s,o,l,c,d,u;await this.plugin.loadSettings(),(t=(e=this.plugin.apiService)==null?void 0:e.syncWebhookSettings)==null||t.call(e),(r=this.plugin.fieldMapper)==null||r.updateMapping(this.plugin.settings.fieldMapping),(i=this.plugin.fieldMapper)==null||i.updateUserFields((a=this.plugin.settings.userFields)!=null?a:[]),(s=this.plugin.fieldMapper)==null||s.updateConfiguredValues(this.plugin.settings.customStatuses,this.plugin.settings.customPriorities),(o=this.plugin.statusManager)==null||o.updateStatuses(this.plugin.settings.customStatuses),(l=this.plugin.priorityManager)==null||l.updatePriorities(this.plugin.settings.customPriorities),this.plugin.cacheManager.updateConfig(this.plugin.settings),(c=this.plugin.dependencyCache)==null||c.updateConfig(this.plugin.settings),this.updatePreviousCacheSettings(),this.setupTimeTrackingEventListeners(),this.plugin.injectCustomStyles(),(d=this.plugin.statusBarService)==null||d.updateVisibility(),(u=this.plugin.filterService)==null||u.refreshFilterOptions(),this.plugin.notifyDataChanged(),this.plugin.emitter.trigger("settings-changed",this.plugin.settings)}destroy(){this.autoStopTimeTrackingListener&&(this.plugin.emitter.offref(this.autoStopTimeTrackingListener),this.autoStopTimeTrackingListener=null)}async handleAutoStopTimeTracking(e){let{originalTask:t,updatedTask:r}=e;if(!t||!r)return;let a=!1,i=this.plugin.statusManager.isCompletedStatus(t.status),s=this.plugin.statusManager.isCompletedStatus(r.status);if(!i&&s&&(a=!0),r.recurrence){let l=t.complete_instances||[];(r.complete_instances||[]).length>l.length&&(a=!0)}if(!(!a||!this.plugin.getActiveTimeSession(r)))try{await this.plugin.stopTimeTracking(r),this.plugin.settings.autoStopTimeTrackingNotification&&ve(this.plugin.emitter,`Auto-stopped time tracking for: ${r.title}`)}catch(l){F_e.error("Error auto-stopping time tracking:",{category:"configuration",operation:"auto-stopping-time-tracking",error:l})}}haveCacheSettingsChanged(){if(!this.previousCacheSettings)return!0;let e={taskTag:this.plugin.settings.taskTag,excludedFolders:this.plugin.settings.excludedFolders,disableNoteIndexing:this.plugin.settings.disableNoteIndexing,storeTitleInFilename:this.plugin.settings.storeTitleInFilename,fieldMapping:this.plugin.settings.fieldMapping};return e.taskTag!==this.previousCacheSettings.taskTag||e.excludedFolders!==this.previousCacheSettings.excludedFolders||e.disableNoteIndexing!==this.previousCacheSettings.disableNoteIndexing||e.storeTitleInFilename!==this.previousCacheSettings.storeTitleInFilename||JSON.stringify(e.fieldMapping)!==JSON.stringify(this.previousCacheSettings.fieldMapping)}haveTimeTrackingSettingsChanged(){return this.previousTimeTrackingSettings?this.plugin.settings.autoStopTimeTrackingOnComplete!==this.previousTimeTrackingSettings.autoStopTimeTrackingOnComplete:!0}updatePreviousCacheSettings(){this.previousCacheSettings={taskTag:this.plugin.settings.taskTag,excludedFolders:this.plugin.settings.excludedFolders,disableNoteIndexing:this.plugin.settings.disableNoteIndexing,storeTitleInFilename:this.plugin.settings.storeTitleInFilename,fieldMapping:JSON.parse(JSON.stringify(this.plugin.settings.fieldMapping))}}updatePreviousTimeTrackingSettings(){this.previousTimeTrackingSettings={autoStopTimeTrackingOnComplete:this.plugin.settings.autoStopTimeTrackingOnComplete}}};C3();qO();q();var Xdt=M({tag:"Bootstrap/PluginRuntime"});async function L_e(n){b8(),await w8(n),n.workspaceNavigationService=new l1(n),n.taskActionCoordinator=new u1(n),n.settingsLifecycleService=new p1(n),n.commandRegistry=new o1(n),n.settingsLifecycleService.captureCurrentSettings(),S8(n),n.commandRegistry.register(),P_e(n),n.addSettingTab(new i1(n.app,n))}async function O_e(n){var t,r,a,i,s,o,l,c,d,u,p,m,f,h,g,v,k,T,b,w,S,C,x,E,_,F,I;if((t=n.settings)!=null&&t.enableBases)try{S3(n),n.basesRegistered=!1}catch(A){Xdt.debug("[TaskNotes][Bases] Unregistration failed:",{category:"internal",operation:"unregistration",error:A})}let e=_P.getStats("cache-initialization");e&&e.count>0&&_P.logSummary(),(r=n.pomodoroService)==null||r.cleanup(),(a=n.filterService)==null||a.cleanup(),(i=n.viewPerformanceService)==null||i.destroy(),n.taskCardReadingModeCleanup&&(n.taskCardReadingModeCleanup(),n.taskCardReadingModeCleanup=null),n.relationshipsReadingModeCleanup&&(n.relationshipsReadingModeCleanup(),n.relationshipsReadingModeCleanup=null),(s=n.autoArchiveService)==null||s.stop(),(o=n.icsSubscriptionService)==null||o.destroy(),(l=n.autoExportService)==null||l.destroy(),(c=n.taskLinkDetectionService)==null||c.cleanup(),(d=n.dragDropManager)==null||d.destroy(),(u=n.apiService)==null||u.stop(),(p=n.oauthService)==null||p.destroy(),(m=n.taskFileLifecycleReconciliationService)==null||m.destroy(),(f=n.taskCalendarSyncService)==null||f.destroy(),(h=n.googleCalendarService)==null||h.destroy(),(g=n.microsoftCalendarService)==null||g.destroy(),(v=n.calendarProviderRegistry)==null||v.destroyAll(),(k=n.viewStateManager)==null||k.cleanup(),(T=n.statusBarService)==null||T.destroy(),(b=n.notificationService)==null||b.destroy(),(w=n.projectSubtasksService)==null||w.destroy(),(S=n.cacheManager)==null||S.destroy(),(C=n.dependencyCache)==null||C.destroy(),(x=n.requestDeduplicator)==null||x.cancelAll(),(E=n.domReconciler)==null||E.destroy(),(_=n.uiStateManager)==null||_.destroy(),(F=n.settingsLifecycleService)==null||F.destroy(),(I=n.performanceProfiler)==null||I.destroy(),typeof _P!="undefined"&&_P.destroy(),n.taskUpdateListenerForEditor&&n.emitter.offref(n.taskUpdateListenerForEditor),n.initializationComplete=!1}var LP=require("obsidian");jf();async function K8(n,e){if(!e)return;let r=(0,LP.normalizePath)(e).split("/").filter(i=>i.length>0);if(r.length===0)return;let a="";for(let i of r)if(a=a?`${a}/${i}`:i,!await n.adapter.exists(a))try{await n.createFolder(a)}catch(s){if(!await n.adapter.exists(a))throw s}}async function z_e(n,e={}){var s,o,l;let t=[],r=[],a=[],i=e.overwriteExisting===!0;try{let c=n.app.vault,d=c.adapter,u={...Vn.commandFileMapping,...(s=n.settings.commandFileMapping)!=null?s:{}};n.settings.commandFileMapping=u;for(let[p,m]of Object.entries(u)){if(!m)continue;let f=(0,LP.normalizePath)(m),h=n.generateTemplate(p);if(!h){a.push(m);continue}if(await d.exists(f)){if(!i){a.push(m);continue}let k=c.getAbstractFileByPath(f);if(!(k instanceof LP.TFile)){(o=n.warn)==null||o.call(n,`[TaskNotes][Bases] Cannot update default Bases file because path is not a file: ${f}`),a.push(m);continue}await c.modify(k,h),r.push(m);continue}let g=f.lastIndexOf("/"),v=g>=0?f.substring(0,g):"";v&&await K8(c,v),await c.create(f,h),t.push(m)}}catch(c){(l=n.warn)==null||l.call(n,"[TaskNotes][Bases] Failed to ensure Bases command files:",c)}return{created:t,updated:r,skipped:a}}var m1=require("obsidian");var eut="TaskNotes/Start Here.md",tut=["# Start Here with TaskNotes","","This note is a small tour of TaskNotes inside your own vault. Work through it in place, then keep it as a reference or delete it when you no longer need it.","","TaskNotes works best when three things feel connected:","","1. Capture a task quickly.","2. Store the task as a normal Markdown note.","3. Review tasks through Bases views.","","## Before you start","","- [ ] Enable the Obsidian **Bases** core plugin.","- [ ] Confirm TaskNotes has created the default `.base` files in `TaskNotes/Views/`.","- [ ] Open the command palette and run **TaskNotes: Open tasks view**.","","TaskNotes creates missing default `.base` files automatically on startup when **Auto-create default files** is enabled. If the files are missing, use **Settings -> TaskNotes -> General -> Views & base files -> Create files**.","","## 1. Create a task from the command palette","","Run **TaskNotes: Create new task** and create a real task you intend to do soon.","","Try a title like:","","```text","Review my TaskNotes setup tomorrow #admin","```","","After saving, TaskNotes creates a Markdown note for that task. Open the task note and look at the YAML properties at the top. Those properties are what Bases reads for filtering, sorting, grouping, and calendar placement.","","## 2. Convert inline tasks into TaskNotes","","The checkboxes below are ordinary Markdown tasks. Convert each one into a TaskNote from the line's inline action or the command palette.","","- [ ] Create a TaskNotes inbox task due tomorrow #admin","- [ ] Schedule a 20 minute planning task for next Monday #planning","- [ ] Make a task linked to an active project note","","After conversion, notice a few things:","","- The source line can stay in this note as context.","- The actual task now lives as its own Markdown note, so it can appear in TaskNotes views.","- The converted line links to the TaskNote. Right-click that TaskNote link to open the task menu, then try changing a property such as status, priority, due date, scheduled date, or project.","","## 3. Review your tasks","","The embedded views below use the default TaskNotes Bases files.","","### Task list","","![[TaskNotes/Views/tasks-default.base]]","","Use this when you want a straightforward list of everything open.","","### Agenda","","![[TaskNotes/Views/agenda-default.base]]","","Use this when you care about due dates, scheduled dates, and what needs attention soon.","","### Mini calendar","","![[TaskNotes/Views/mini-calendar-default.base]]","","Use this when you want a compact calendar alongside your notes.","","### Calendar","","![[TaskNotes/Views/calendar-default.base]]","","Use this when you want a larger calendar for scheduled work, due dates, timeblocks, and calendar events.","","### Kanban","","![[TaskNotes/Views/kanban-default.base]]","","Use this when you want to move work through statuses like open, in progress, and done.","","## 4. Adjust only what gets in your way","","The defaults are enough to start. Visit settings later when you know what you want to change:","","- If task files are going to the wrong place, check **Settings -> TaskNotes -> General**.","- If converted inline tasks should be created somewhere else, check **Settings -> TaskNotes -> Inline Task Settings**.","- If the task modal shows too much or too little, check **Settings -> TaskNotes -> Modal Fields**.","- If your vault uses different property names, statuses, priorities, or custom fields, check **Settings -> TaskNotes -> Task Properties**.","","## 5. Make it yours","","Try adding one custom property to a task, such as `energy`, `client`, or `area`. Because tasks are Markdown notes, custom properties can be used in Bases without locking you into a separate task database.","","## 6. Contextual views","","You can embed Bases views inside daily notes, project notes, meeting notes, or task notes. Advanced Bases filters can use the current note as context, so one view can show tasks related to whatever note it is embedded in.","","TaskNotes uses this pattern for the Relationships widget in task notes. When you are ready to customize views, see the TaskNotes documentation for examples.","","Useful next experiments:","","- Duplicate `TaskNotes/Views/tasks-default.base` and make a view for one project.","- Add a group to a Base view, such as status or priority.","- Add a filter for tasks due this week.","- Link a task to a project note and use backlinks to see where it is mentioned.","","## More help and extensions","","- Documentation: [tasknotes.dev](https://tasknotes.dev/)","- Problems or bugs: [open an issue on GitHub](https://github.com/callumalpass/tasknotes/issues)","- Companion plugins:"," - [Canvas Bases](https://tasknotes.dev/companion-plugins/canvas-bases/) adds canvas-style boards and JSON Canvas snapshots for Bases views, with optional TaskNotes badges, actions, and relationship edges."," - [TaskNotes Workflows](https://tasknotes.dev/companion-plugins/tasknotes-workflows/) adds Markdown-defined automation for TaskNotes events, schedules, manual commands, and task actions.","","## Finished","","Now you know the core idea: tasks are notes, properties make them queryable, and Bases turns them into views."].join(`
`)+`
`;async function B_e(n){var t,r;if(n.settings.starterNoteCreated)return"already-created";if(!n.shouldCreateStarterNote)return"not-first-install";let e=(0,m1.normalizePath)(eut);try{let a=n.app.vault,i=await a.adapter.exists(e),s,o="created";if(i){let l=a.getAbstractFileByPath(e);if(!(l instanceof m1.TFile))return(t=n.warn)==null||t.call(n,`[TaskNotes][StarterNote] Starter note path exists but is not a file: ${e}`),"path-not-file";s=l,o="opened-existing"}else{let l=e.lastIndexOf("/"),c=l>=0?e.substring(0,l):"";c&&await K8(a,c),s=await a.create(e,tut)}return n.settings.starterNoteCreated=!0,await n.saveSettings(),await n.app.workspace.getLeaf("tab").openFile(s),o}catch(a){return(r=n.warn)==null||r.call(n,"[TaskNotes][StarterNote] Failed to create starter note:",a),"failed"}}var OP=require("obsidian"),rut="https://github.com/callumalpass/tasknotes/releases/latest/download/manifest.json",nut="https://raw.githubusercontent.com/callumalpass/tasknotes/main/versions.json",Z8="obsidian://show-plugin?id=tasknotes";function j_e(n){let[e,t=""]=n.trim().split("-",2);return{numbers:e.split(".").map(a=>{let i=Number.parseInt(a,10);return Number.isFinite(i)?i:0}),prerelease:t?t.split("."):[]}}function aut(n,e){let t=Number.parseInt(n,10),r=Number.parseInt(e,10),a=String(t)===n,i=String(r)===e;return a&&i?Math.sign(t-r):a?-1:i?1:n.localeCompare(e)}function U_e(n,e){var s,o;let t=j_e(n),r=j_e(e),a=Math.max(t.numbers.length,r.numbers.length,3);for(let l=0;l<a;l++){let c=((s=t.numbers[l])!=null?s:0)-((o=r.numbers[l])!=null?o:0);if(c!==0)return Math.sign(c)}if(t.prerelease.length===0&&r.prerelease.length===0)return 0;if(t.prerelease.length===0)return 1;if(r.prerelease.length===0)return-1;let i=Math.max(t.prerelease.length,r.prerelease.length);for(let l=0;l<i;l++){let c=t.prerelease[l],d=r.prerelease[l];if(c===void 0)return-1;if(d===void 0)return 1;let u=aut(c,d);if(u!==0)return u}return 0}function H_e(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}async function $_e(n){return(await(0,OP.requestUrl)({url:n,method:"GET"})).json}function iut(n){if(!H_e(n))return null;let e=typeof n.version=="string"?n.version.trim():"";return e?{version:e,minAppVersion:typeof n.minAppVersion=="string"?n.minAppVersion.trim():void 0}:null}function sut(n){if(!H_e(n))return{};let e={};for(let[t,r]of Object.entries(n))typeof r=="string"&&t.trim()&&(e[t]=r);return e}function out(n,e,t=OP.requireApiVersion){var a,i;if(!n.minAppVersion||t(n.minAppVersion))return(a=n.version)!=null?a:null;let r=Object.entries(e).filter(([,s])=>t(s)).map(([s])=>s).sort(U_e);return(i=r[r.length-1])!=null?i:null}function V_e(n,e,t){return!e||U_e(e,n)<=0?!1:t!==e}async function W_e(){var t;let n=iut(await $_e(rut));if(!n)return null;if(!n.minAppVersion||(0,OP.requireApiVersion)(n.minAppVersion))return(t=n.version)!=null?t:null;let e=sut(await $_e(nut));return out(n,e)}xe();yt();dr();function G_e({path:n,basename:e,content:t,frontmatter:r={},settings:a,fieldMapper:i,now:s=qe(),adapters:o={}}){var u,p,m,f;let l=i==null?void 0:i.mapFromFrontmatter(r,n,a.storeTitleInFilename),c=ls(l?l.scheduled:r.scheduled),d=c!=null?c:lut(a.taskCreationDefaults,(u=o.calculateDefaultDateTime)!=null?u:Ol);return{path:n,title:ls(l?l.title:r.title)||e,status:(p=ls(l?l.status:r.status))!=null?p:a.defaultTaskStatus,priority:(m=ls(l?l.priority:r.priority))!=null?m:a.defaultTaskPriority,archived:!1,due:ls(l?l.due:r.due),scheduled:d,contexts:rb(l?l.contexts:r.contexts),projects:rb(l?l.projects:r.projects),tags:(f=rb(l?l.tags:r.tags))!=null?f:[],timeEstimate:q_e(l?l.timeEstimate:r.timeEstimate),recurrence:ls(l?l.recurrence:r.recurrence),dateCreated:ls(l?l.dateCreated:r.dateCreated)||s,dateModified:s,details:cut(t)}}function lut(n,e){if(n.defaultScheduledDate!=="none")return e(n.defaultScheduledDate,n.defaultScheduledTime)||void 0}function cut(n){let e=n.match(/^---\n[\s\S]*?\n---\n*/);return e?n.slice(e[0].length).trim():n.trim()}function ls(n){if(n!=null){if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n)}}function rb(n){if(n!=null)return L0(n)}function q_e(n){if(typeof n=="number")return n;if(typeof n=="string"&&n.trim()!==""){let e=Number(n);return Number.isNaN(e)?void 0:e}}function Y_e(n,e){return e==="task-creation"?n.useParentNoteForTaskCreation:n.useParentNoteAsProject}function K_e(n,e){let t=n?{...n}:{},r=Object.keys(t).length>0,a=Array.isArray(t.projects)?t.projects:[];return!e||a.length>0?r?t:void 0:(t.projects=[e],t)}function Z_e(n,e){var r;let t=n;return typeof t.setQuery=="function"?(t.setQuery(e),!0):typeof((r=t.searchComponent)==null?void 0:r.setValue)=="function"?(t.searchComponent.setValue(e),!0):t.searchInputEl?(t.searchInputEl.value=e,typeof t.startSearch=="function"&&t.startSearch(),!0):!1}DC();var J_e=require("obsidian");jf();jf();function dut(n,e){return n!==null&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,e)}function Q8(n,e){return Object.keys(n).some(t=>!dut(e,t))}function Q_e(n){return n?Q8(Vn.fieldMapping,n.fieldMapping)||Q8(Vn.calendarViewSettings,n.calendarViewSettings)||Q8(Vn.commandFileMapping,n.commandFileMapping):!1}bb();q();var uut=M({tag:"Settings/SettingsPersistence"});function X_e(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function put(n){return new Promise(e=>window.setTimeout(e,n))}function mut(n){var t;let e=(t=n.manifest.dir)!=null?t:n.app.vault.configDir&&n.manifest.id?`${n.app.vault.configDir}/plugins/${n.manifest.id}`:void 0;return e?(0,J_e.normalizePath)(`${e}/data.json`):null}async function J8(n){let e=mut(n);if(!e)return!1;try{return await n.app.vault.adapter.exists(e)}catch(t){return uut.warn("[TaskNotes] Could not check settings data file existence:",{category:"configuration",operation:"check-settings-data-file-existence",error:t}),!1}}async function eFe(n,e={}){var i,s,o,l;let t=(i=e.retryCount)!=null?i:3,r=(s=e.retryDelayMs)!=null?s:50,a=(o=await n.loadData())!=null?o:null;if(a!==null)return{data:a,compromised:!1};if(!await J8(n))return{data:null,compromised:!1};for(let c=0;c<t;c++){await put(r);let d=(l=await n.loadData())!=null?l:null;if(d!==null)return{data:d,compromised:!1}}return{data:null,compromised:!0}}function fut(n){if(!n)return null;let e={...n};if(delete e.useNativeMetadataCache,typeof e.enableAPI=="undefined"&&(e.enableAPI=!1),typeof e.apiPort=="undefined"&&(e.apiPort=8080),typeof e.apiAuthToken=="undefined"&&(e.apiAuthToken=""),typeof e.enableMCP=="undefined"&&(e.enableMCP=!1),!e.nlpTriggers&&e.statusSuggestionTrigger!==void 0){e.nlpTriggers={triggers:[...S$.triggers]};let t=e.nlpTriggers.triggers.findIndex(r=>r.propertyId==="status");t!==-1&&e.statusSuggestionTrigger&&(e.nlpTriggers.triggers[t].trigger=e.statusSuggestionTrigger)}return e.modalFieldsConfig||(e.modalFieldsConfig=Nl(void 0,e.userFields)),e.enableBases===!1&&(e.enableBases=!0),e.taskFilenameFormat!=="custom"&&e.customFilenameTemplate==="{title}"&&(e.customFilenameTemplate="{{title}}"),e}function hut(n){let e=n==null?void 0:n.taskCreationDefaults;return!!(e&&!X_e(e,"useParentNoteForTaskCreation")&&typeof e.useParentNoteAsProject=="boolean")}function gut(n){let e={...Vn.taskCreationDefaults,...n||{}};return n&&!X_e(n,"useParentNoteForTaskCreation")&&typeof n.useParentNoteAsProject=="boolean"&&(e.useParentNoteForTaskCreation=n.useParentNoteAsProject),e}function tFe(n){var i;let e=fut(n),t=(n==null?void 0:n.taskFilenameFormat)!=="custom"&&(n==null?void 0:n.customFilenameTemplate)==="{title}"&&(e==null?void 0:e.customFilenameTemplate)==="{{title}}",r=hut(e);return{settings:{...Vn,...e,fieldMapping:{...Vn.fieldMapping,...(e==null?void 0:e.fieldMapping)||{}},taskCreationDefaults:gut(e==null?void 0:e.taskCreationDefaults),calendarViewSettings:{...Vn.calendarViewSettings,...(e==null?void 0:e.calendarViewSettings)||{}},commandFileMapping:{...Vn.commandFileMapping,...(e==null?void 0:e.commandFileMapping)||{}},icsIntegration:{...Vn.icsIntegration,...(e==null?void 0:e.icsIntegration)||{}},nlpTriggers:{...Vn.nlpTriggers,...(e==null?void 0:e.nlpTriggers)||{},triggers:((i=e==null?void 0:e.nlpTriggers)==null?void 0:i.triggers)||Vn.nlpTriggers.triggers},modalFieldsConfig:Nl(e==null?void 0:e.modalFieldsConfig,e==null?void 0:e.userFields),customStatuses:(e==null?void 0:e.customStatuses)||Vn.customStatuses,customPriorities:(e==null?void 0:e.customPriorities)||Vn.customPriorities,savedViews:(e==null?void 0:e.savedViews)||Vn.savedViews},shouldPersistMigratedSettings:Q_e(e)||t||r}}function rFe(n,e){let t=n?{...n}:{},r=Object.keys(Vn);for(let a of r)t[a]=e[a];return t}function nFe({timer:n=window,registerTimer:e,emitDateChanged:t,getDateKey:r=()=>new Date().toDateString(),getNow:a=()=>new Date,intervalMs:i=6e4}){let s=r(),o=null,l=()=>{let u=r();return u===s?!1:(s=u,t(),!0)},c=()=>{let u=yut(a());return o!==null&&n.clearTimeout(o),o=n.setTimeout(()=>{l(),c()},u),e(o),o},d=n.setInterval(l,i);return e(d),c(),{checkDateChange:l,scheduleNextMidnightCheck:c,getLastKnownDate:()=>s,getMidnightTimeout:()=>o}}function yut(n){let e=new Date(n);return e.setHours(24,0,0,0),e.getTime()-n.getTime()}q();h8();xE();var nb=require("obsidian");q();var vut=200,kut=250,Tut=M({tag:"Utils/PerformanceProfiler"});function but(){return typeof performance!="undefined"&&typeof performance.now=="function"?performance.now():Date.now()}function wut(){return typeof performance!="undefined"&&"memory"in performance}function aFe(n,e){if(n.length===0)return 0;let t=Math.min(n.length-1,Math.max(0,Math.ceil(n.length*e)-1));return n[t]}function Km(n){return Math.round(n*1e3)/1e3}function Sut(n,e){if(!(!n&&!e))return{...n||{},...e||{}}}var X8=class n{constructor(e={}){this.enabledOverride=null;this.metrics=new Map;this.counters=new Map;this.gauges=new Map;var t,r;this.namespace=((t=e.namespace)==null?void 0:t.trim())||"tasknotes",this.isEnabledCallback=e.isEnabled||(()=>!1),this.logger=e.logger||Tut,this.now=e.now||but,this.sampleLimit=Math.max(1,e.sampleLimit||vut),this.slowThresholdMs=Math.max(0,(r=e.slowThresholdMs)!=null?r:kut)}isEnabled(){var e;return(e=this.enabledOverride)!=null?e:this.isEnabledCallback()}enable(){this.enabledOverride=!0}disable(){this.enabledOverride=!1}clearEnabledOverride(){this.enabledOverride=null}child(e){return new n({namespace:[this.namespace,e].filter(Boolean).join("."),isEnabled:()=>this.isEnabled(),logger:this.logger,now:this.now,sampleLimit:this.sampleLimit,slowThresholdMs:this.slowThresholdMs})}start(e,t){if(!this.isEnabled())return{end:()=>0};let r=this.now(),a=!1;return{end:i=>{if(a)return 0;a=!0;let s=this.now()-r;return this.recordDuration(e,s,Sut(t,i)),s}}}async measureAsync(e,t,r){if(!this.isEnabled())return t();let a=this.start(e,r);try{let i=await t();return a.end(),i}catch(i){throw a.end({failed:!0}),i}}measureSync(e,t,r){if(!this.isEnabled())return t();let a=this.start(e,r);try{let i=t();return a.end(),i}catch(i){throw a.end({failed:!0}),i}}recordDuration(e,t,r){if(!this.isEnabled())return;let a=this.getMetricName(e),s=this.metrics.get(a)||{count:0,totalMs:0,minMs:Number.POSITIVE_INFINITY,maxMs:0,lastMs:0,samples:[]};s.count++,s.totalMs+=t,s.minMs=Math.min(s.minMs,t),s.maxMs=Math.max(s.maxMs,t),s.lastMs=t,s.lastDetails=r,s.samples.push(t),s.samples.length>this.sampleLimit&&s.samples.splice(0,s.samples.length-this.sampleLimit),this.metrics.set(a,s),t>=this.slowThresholdMs&&this.logger.warn("Slow operation recorded",{category:"internal",operation:"performance-profiler",details:{name:a,durationMs:Km(t),...r||{}}})}increment(e,t=1,r){if(!this.isEnabled())return;let a=this.getMetricName(e),i=this.counters.get(a)||{count:0};i.count+=t,i.lastDetails=r,this.counters.set(a,i)}recordGauge(e,t,r){this.isEnabled()&&this.gauges.set(this.getMetricName(e),{value:t,updatedAt:new Date().toISOString(),lastDetails:r})}getMetric(e){let t=this.metrics.get(this.getMetricName(e));return t?this.toMetricSnapshot(this.getMetricName(e),t):null}snapshot(){let e={},t={},r={};for(let[a,i]of this.metrics)e[a]=this.toMetricSnapshot(a,i);for(let[a,i]of this.counters)t[a]={name:a,count:i.count,lastDetails:i.lastDetails};for(let[a,i]of this.gauges)r[a]={name:a,value:i.value,updatedAt:i.updatedAt,lastDetails:i.lastDetails};return{generatedAt:new Date().toISOString(),enabled:this.isEnabled(),metrics:e,counters:t,gauges:r}}exportData(){return{...this.snapshot(),platform:{isDesktop:nb.Platform.isDesktop,isMobile:nb.Platform.isMobile,isWin:nb.Platform.isWin,isMacOS:nb.Platform.isMacOS,isLinux:nb.Platform.isLinux},memoryInfo:wut()?performance.memory:null}}reset(e){if(!e){this.metrics.clear(),this.counters.clear(),this.gauges.clear();return}let t=this.getMetricName(e);this.metrics.delete(t),this.counters.delete(t),this.gauges.delete(t)}destroy(){this.reset(),this.clearEnabledOverride()}getMetricName(e){let t=e.trim();return t.startsWith(`${this.namespace}.`)?t:`${this.namespace}.${t}`}toMetricSnapshot(e,t){let r=[...t.samples].sort((i,s)=>i-s),a=t.count===0?0:t.totalMs/t.count;return{name:e,count:t.count,totalMs:Km(t.totalMs),averageMs:Km(a),minMs:Km(t.minMs===Number.POSITIVE_INFINITY?0:t.minMs),maxMs:Km(t.maxMs),medianMs:Km(aFe(r,.5)),p95Ms:Km(aFe(r,.95)),lastMs:Km(t.lastMs),sampleCount:t.samples.length,lastDetails:t.lastDetails}}};function iFe(n={}){return new X8(n)}var mt=M({tag:"Main"});function xut(n){return n.setSubmenu()}var zP=class extends Te.Plugin{constructor(){super(...arguments);this.settingsLoadCompromised=!1;this.settingsDataSavePromise=null;this.settingsDataSaveRequested=!1;this.oauthSecretStorageReady=!1;this.taskUpdateListenerForEditor=null;this.relationshipsReadingModeCleanup=null;this.taskCardReadingModeCleanup=null;this.initializationComplete=!1;this.migrationComplete=!1;this.migrationPromise=null;this.shouldCreateStarterNoteOnStartup=!1;this.basesRegistered=!1;this.basesRegistrationRetryIntervalId=null;this.currentTaskTimeTrackingPending=!1}getSystemUILocale(){try{let t=(0,Te.getLanguage)();if(t)return t}catch(t){}return typeof navigator!="undefined"&&navigator.language?navigator.language:"en"}refreshLocalizedViews(){}async onload(){var t;this.readyPromise=new Promise(r=>{this.resolveReady=r}),await this.loadSettings(),this.performanceProfiler=iFe({isEnabled:()=>{var r;return((r=this.settings)==null?void 0:r.enableDebugLogging)===!0},logger:M({tag:"PerformanceProfiler",isDebugEnabled:()=>{var r;return((r=this.settings)==null?void 0:r.enableDebugLogging)===!0}})}),this.i18n=Wue({initialLocale:(t=this.settings.uiLanguage)!=null?t:"system",getSystemLocale:()=>this.getSystemUILocale()}),this.i18n.on("locale-changed",({current:r})=>{var i;if(!this.initializationComplete)return;let a=this.i18n.getNativeLanguageName(r);new Te.Notice(this.i18n.translate("notices.languageChanged",{language:a})),this.refreshLocalizedViews(),(i=this.commandRegistry)==null||i.refreshTranslations()}),await L_e(this),this.registerTaskNotesFileMenuActions(),this.migrationPromise=this.performEarlyMigrationCheck(),C8(this),DP(this),this.app.workspace.onLayoutReady(()=>{this.initializeAfterLayoutReady()}),this.resolveReady(),this.emitter.trigger(Lc.ready,{timestamp:new Date().toISOString()})}registerTaskNotesFileMenuActions(){this.registerEvent(this.app.workspace.on("file-menu",(t,r,a)=>{this.addTaskNotesFileMenuActions(t,r,a)}))}addTaskNotesFileMenuActions(t,r,a){if(a==="tasknotes-context-menu"||!(r instanceof Te.TFile))return;let i=this.app.metadataCache.getFileCache(r);if(!(i!=null&&i.frontmatter)||!this.cacheManager.isTaskFile(i.frontmatter))return;t.addSeparator(),t.addItem(o=>{o.setTitle(this.i18n.translate("modals.taskEdit.title")),o.setIcon("pencil"),o.setSection("tasknotes"),o.onClick(()=>{this.openTaskEditModalForFile(r)})});let s=this.cacheManager.getCachedTaskInfoSync(r.path);s&&t.addItem(o=>{o.setTitle(this.i18n.translate("common.appName")),o.setIcon("list-checks"),o.setSection("tasknotes");let l=xut(o);ll.addToMenu(l,{task:s,plugin:this,targetDate:Xt(),onUpdate:()=>{this.app.workspace.trigger("tasknotes:refresh-views")}})})}async initializeAfterLayoutReady(){await x8(this)}initializeServicesLazily(){Promise.resolve().then(()=>(qO(),URe)).then(({initializeServicesLazily:t})=>{t(this)})}async warmupProjectIndexes(){try{this.cacheManager.getTasksForDate(new Date().toISOString().split("T")[0])}catch(t){mt.error("[TaskNotes] Error during project index warmup:",{category:"internal",operation:"project-index-warmup",error:t})}}async onReady(){await this.readyPromise}setupStatusBarEventListeners(){this.statusBarService&&(this.registerEvent(this.emitter.on(rt,()=>{window.setTimeout(()=>{this.statusBarService.requestUpdate()},100)})),this.registerEvent(this.emitter.on(Ra,()=>{window.setTimeout(()=>{this.statusBarService.requestUpdate()},100)})),this.pomodoroService&&(this.registerEvent(this.emitter.on("pomodoro-start",()=>{window.setTimeout(()=>{this.statusBarService.requestUpdate()},100)})),this.registerEvent(this.emitter.on("pomodoro-stop",()=>{window.setTimeout(()=>{this.statusBarService.requestUpdate()},100)})),this.registerEvent(this.emitter.on("pomodoro-state-changed",()=>{window.setTimeout(()=>{this.statusBarService.requestUpdate()},100)}))))}setupTimeTrackingEventListeners(){this.settingsLifecycleService.setupTimeTrackingEventListeners()}async performEarlyMigrationCheck(){try{await this.viewStateManager.initializeSavedViews(),this.viewStateManager.needsMigration()&&await this.viewStateManager.performMigration(),this.migrationComplete=!0}catch(t){mt.error("Error during early migration check:",{category:"configuration",operation:"early-migration-check",error:t}),this.migrationComplete=!0}}async checkForVersionUpdate(){var t;try{let r=this.manifest.version,a=this.settings.lastSeenVersion;a&&a!==r&&(((t=this.settings.showReleaseNotesOnUpdate)!=null?t:!0)?window.setTimeout(()=>{(async()=>(await this.activateReleaseNotesView(),this.settings.lastSeenVersion=r,await this.saveSettings()))()},1500):(this.settings.lastSeenVersion=r,await this.saveSettings())),a||(this.settings.lastSeenVersion=r,await this.saveSettings())}catch(r){mt.error("Error checking for version update:",{category:"configuration",operation:"checking-version-update",error:r})}}async checkForNewReleaseOnStartup(){if(this.settings.checkForUpdatesOnStartup!==!1)try{let t=await W_e();if(!V_e(this.manifest.version,t,this.settings.lastNotifiedReleaseVersion))return;this.settings.lastNotifiedReleaseVersion=t,await this.saveSettingsDataOnly(),new Te.Notice(this.createReleaseAvailableNotice(t),15e3)}catch(t){mt.debug("Release check failed",{category:"provider",operation:"check-release",error:t})}}createReleaseAvailableNotice(t){let r=activeWindow.createFragment();r.appendText(this.i18n.translate("notices.releaseAvailable.message",{version:t})),r.appendText(" ");let a=activeWindow.createEl("a");return a.textContent=this.i18n.translate("notices.releaseAvailable.action"),a.href=Z8,a.addEventListener("click",i=>{i.preventDefault(),window.open(Z8,"_blank")}),r.appendChild(a),r}async waitForMigration(){for(this.migrationPromise&&await this.migrationPromise;!this.migrationComplete;)await new Promise(t=>window.setTimeout(t,50))}notifyDataChanged(t,r=!1,a=!0){t?(this.cacheManager.clearCacheEntry(t),this.taskLinkDetectionService&&this.taskLinkDetectionService.clearCacheForFile(t)):r&&(this.cacheManager.clearAllCaches(),this.taskLinkDetectionService&&this.taskLinkDetectionService.clearCache()),a&&window.requestAnimationFrame(()=>{this.emitter.trigger(Ra),this.emitter.trigger(Lc["cache.changed"],{filePath:t,force:r,timestamp:new Date().toISOString()})})}setupDateChangeDetection(){nFe({registerTimer:t=>this.registerInterval(t),emitDateChanged:()=>this.emitter.trigger(Ou)})}onunload(){var t;(t=this.emitter)==null||t.trigger(Lc.unloading,{timestamp:new Date().toISOString()}),O_e(this)}async pluginDataFileExists(){return J8(this)}async loadPluginDataForSafeWrite(t){let r=await this.loadData();return r==null&&await this.pluginDataFileExists()?(this.settingsLoadCompromised=!0,mt.warn("[TaskNotes] Skipping plugin data save because data.json exists but could not be read.",{category:"configuration",operation:"load-plugin-data-for-safe-write",details:{requestedOperation:t,settingsSavesBlocked:!0}}),null):r==null?{}:typeof r=="object"&&!Array.isArray(r)?r:(mt.warn("[TaskNotes] Skipping plugin data save because loaded plugin data was not an object.",{category:"configuration",operation:"load-plugin-data-for-safe-write",details:{requestedOperation:t,dataType:Array.isArray(r)?"array":typeof r}}),null)}async loadSettingsData(){this.settingsLoadCompromised=!1;let t=await eFe(this);if(this.settingsLoadCompromised=t.compromised,t.compromised&&mt.error("Settings data could not be read safely",{category:"internal",operation:"load-settings-data",details:{reason:"Settings data file exists, but Obsidian returned no settings data.",settingsSavesBlocked:!0}}),t.compromised)throw new Error("TaskNotes settings are unreadable; restore settings before loading the plugin.");return t.data}async loadSettings(){var i;let t=await this.loadSettingsData();if((i=this.oauthSecretStore)!=null||(this.oauthSecretStore=new WM(this.app.secretStorage)),this.oauthSecretStorageReady=!1,!this.settingsLoadCompromised){let s=Gue(t,this.oauthSecretStore);s.changed&&s.data&&await super.saveData(s.data),t=s.data,this.oauthSecretStorageReady=!0}let{settings:r,shouldPersistMigratedSettings:a}=tFe(t);this.settings=r,this.shouldCreateStarterNoteOnStartup=!r.lastSeenVersion,a&&window.setTimeout(()=>{(async()=>{try{await this.saveSettingsDataOnly()}catch(s){mt.error("Failed to save migrated settings:",{category:"configuration",operation:"save-migrated-settings",error:s})}})()},100)}async saveData(t){let r=this.oauthSecretStorageReady&&typeof t=="object"&&t!==null&&!Array.isArray(t)?dU(t):t;await super.saveData(r)}async saveSettings(){await this.settingsLifecycleService.saveSettings()}async saveSettingsDataOnly(){this.settingsDataSaveRequested=!0,this.settingsDataSavePromise||(this.settingsDataSavePromise=this.drainSettingsDataSaves()),await this.settingsDataSavePromise}async drainSettingsDataSaves(){try{for(;this.settingsDataSaveRequested;)this.settingsDataSaveRequested=!1,await this.writeSettingsDataOnlyOnce()}finally{this.settingsDataSavePromise=null,this.settingsDataSaveRequested&&await this.saveSettingsDataOnly()}}async writeSettingsDataOnlyOnce(){if(this.settingsLoadCompromised){mt.warn("[TaskNotes] Skipping settings save because settings data could not be read safely during startup.",{category:"configuration",operation:"skipping-settings-save-because-settings-data-read-safely-startup"});return}let t=await this.loadPluginDataForSafeWrite("save-settings-data-only");t&&await this.saveData(rFe(t,this.settings))}async onExternalSettingsChange(){await this.settingsLifecycleService.onExternalSettingsChange()}async revealLeafReady(t){await this.workspaceNavigationService.revealLeafReady(t)}async activateView(t){return this.workspaceNavigationService.activateView(t)}async activateCalendarView(){return this.workspaceNavigationService.activateCalendarView()}async activateAgendaView(){return this.workspaceNavigationService.activateAgendaView()}async activatePomodoroView(){return this.workspaceNavigationService.activatePomodoroView()}async activatePomodoroStatsView(){return this.workspaceNavigationService.activatePomodoroStatsView()}async activateStatsView(){return this.workspaceNavigationService.activateStatsView()}async activateReleaseNotesView(){return this.workspaceNavigationService.activateReleaseNotesView()}async openBasesFileForCommand(t){await this.workspaceNavigationService.openBasesFileForCommand(t)}async createDefaultBasesFiles(t={}){let{created:r,updated:a,skipped:i}=await this.ensureBasesViewFiles(t);r.length>0&&new Te.Notice(`Created ${r.length} default Bases file(s):
${r.join(`
`)}`,8e3),a.length>0&&new Te.Notice(`Updated ${a.length} default Bases file(s):
${a.join(`
`)}`,8e3),i.length>0&&r.length===0&&a.length===0&&new Te.Notice(`Default Bases files already exist:
${i.join(`
`)}`,8e3)}async updateDefaultBasesFiles(){return this.ensureBasesViewFiles({overwriteExisting:!0})}async ensureBasesViewFiles(t={}){return z_e({app:this.app,settings:this.settings,generateTemplate:r=>IX(r,this),warn:(r,a)=>{a===void 0?mt.warn(r,{category:"configuration",operation:"ensure-bases-view-files"}):mt.warn(r,{category:"configuration",operation:"ensure-bases-view-files",error:a})}},t)}async ensureStarterNote(){let t=this.shouldCreateStarterNoteOnStartup;this.shouldCreateStarterNoteOnStartup=!1,await B_e({app:this.app,settings:this.settings,shouldCreateStarterNote:t,saveSettings:()=>this.saveSettingsDataOnly(),warn:(r,a)=>{a===void 0?mt.warn(r,{category:"configuration",operation:"ensure-starter-note"}):mt.warn(r,{category:"configuration",operation:"ensure-starter-note",error:a})}})}async openTagsPane(t){let{workspace:r}=this.app;try{let a=r.getLeavesOfType("search").first();if(!a){let s=r.getLeftLeaf(!1);if(!s)return mt.warn("Could not get left leaf for search pane",{category:"configuration",operation:"get-left-leaf-search-pane"}),!1;try{await s.setViewState({type:"search",active:!0}),a=s}catch(o){return mt.warn("Failed to create search view:",{category:"persistence",operation:"create-search-view",error:o}),!1}}if(!a)return mt.warn("No search leaf available",{category:"configuration",operation:"no-search-leaf"}),!1;await this.revealLeafReady(a);let i=`tag:${t}`;return Z_e(a.view,i)?!0:(mt.warn("[TaskNotes] Could not find method to set search query",{category:"stale-data",operation:"find-method-set-search-query"}),new Te.Notice("Search pane opened but could not set tag query"),!1)}catch(a){return mt.error("[TaskNotes] Error opening search pane with tag:",{category:"internal",operation:"opening-search-pane-tag",error:a}),new Te.Notice(`Failed to open search pane for tag: ${t}`),!1}}getLeafOfType(t){return this.workspaceNavigationService.getLeafOfType(t)}getCalendarLeaf(){return this.getLeafOfType(NX)}async navigateToCurrentDailyNote(){let t=Xt();await this.navigateToDailyNote(t,{isAlreadyLocal:!0})}async navigateToDailyNote(t,r){try{if(!(0,Zm.appHasDailyNotesPluginLoaded)()){new Te.Notice("Daily notes core plugin is not enabled. Please enable it in settings > core plugins.");return}let a=r!=null&&r.isAlreadyLocal?t:bd(t),i=window.moment(a),s=(0,Zm.getAllDailyNotes)(),o=(0,Zm.getDailyNote)(i,s),l=!1;if(!o)try{o=await(0,Zm.createDailyNote)(i),l=!0}catch(c){let d=c instanceof Error?c.message:String(c);mt.error("Failed to create daily note:",{category:"persistence",operation:"create-daily-note",error:c}),new Te.Notice(`Failed to create daily note: ${d}`);return}o&&(await this.app.workspace.getLeaf(!1).openFile(o),l&&this.notifyDataChanged(o.path,!1,!0))}catch(a){let i=a instanceof Error?a.message:String(a);mt.error("Failed to navigate to daily note:",{category:"persistence",operation:"navigate-daily-note",error:a}),new Te.Notice(`Failed to navigate to daily note: ${i}`)}}injectCustomStyles(){var r;(r=activeDocument.getElementById("tasknotes-custom-styles"))==null||r.remove();let t=activeDocument.documentElement.style;for(let a=t.length-1;a>=0;a-=1){let i=t.item(a);(i.startsWith("--status-")||i.startsWith("--priority-"))&&t.removeProperty(i)}for(let[a,i]of[...this.statusManager.getStatusColorVariables(),...this.priorityManager.getPriorityColorVariables()])t.setProperty(a,i)}async updateTaskProperty(t,r,a,i={}){var s;try{let o=!1,l=(s=i.confirmClearInstances)!=null?s:i.silent?void 0:async d=>{let u=await this.confirmClearRescheduledInstances(d);return u||(o=!0),u},c=await this.taskService.updateProperty(t,r,a,{...i,confirmClearInstances:l});if(!i.silent&&!o)if(r==="status"){let d=typeof a=="string"?a:String(a),u=this.statusManager.getStatusConfig(d);new Te.Notice(`Task marked as '${(u==null?void 0:u.label)||d}'`)}else new Te.Notice(`Task ${r} updated`);return c}catch(o){throw mt.error(`Failed to update task ${r}:`,{category:"validation",operation:"update-task",error:o}),new Te.Notice(`Failed to update task ${r}`),o}}async confirmClearRescheduledInstances(t){let{showConfirmationModal:r}=await Promise.resolve().then(()=>(Fi(),nle)),a=Array.from(new Set([...t.complete,...t.skipped])).sort();return r(this.app,{title:this.i18n.translate("contextMenus.task.completion.clearInstancesConfirmTitle"),message:this.i18n.translate("contextMenus.task.completion.clearInstancesConfirmMessage",{dates:a.join(", ")}),confirmText:this.i18n.translate("contextMenus.task.completion.clearInstancesConfirmButton")})}async toggleRecurringTaskComplete(t,r){var a;try{let i=await this.taskService.resolveRecurringTaskActionDate(t,r),s=await this.taskService.toggleRecurringTaskCompleteWithOccurrenceNotes(t,i),o=s.path===t.path?s:await this.cacheManager.getTaskInfo(t.path)||t,l=ae(i),d=((a=o.complete_instances)==null?void 0:a.includes(l))?"completed":"marked incomplete",u=et(l);return new Te.Notice(`Recurring task ${d} for ${D(u,"MMM d")}`),o}catch(i){throw mt.error("Failed to toggle recurring task completion:",{category:"persistence",operation:"toggle-recurring-task-completion",error:i}),new Te.Notice("Failed to update recurring task"),i}}async toggleTaskArchive(t){try{let r=await this.taskService.toggleArchive(t),a=r.archived?"archived":"unarchived";return new Te.Notice(`Task ${a}`),r}catch(r){throw mt.error("Failed to toggle task archive:",{category:"persistence",operation:"toggle-task-archive",error:r}),new Te.Notice("Failed to update task archive status"),r}}async toggleTaskStatus(t){try{let r=await this.taskService.toggleStatus(t),a=this.statusManager.getStatusConfig(r.status);return new Te.Notice(`Task marked as '${(a==null?void 0:a.label)||r.status}'`),r}catch(r){throw mt.error("Failed to toggle task status:",{category:"persistence",operation:"toggle-task-status",error:r}),new Te.Notice("Failed to update task status"),r}}openTaskCreationModal(t){new kp(this.app,this,{prePopulatedValues:this.applyParentNoteProjectDefault(t,"task-creation")}).open()}applyParentNoteProjectDefault(t,r){if(!Y_e(this.settings.taskCreationDefaults,r))return t;let a=this.app.workspace.getActiveFile(),i=a?this.app.fileManager.generateMarkdownLink(a,a.path):void 0;return K_e(t,i)}async convertCurrentNoteToTask(){let t=this.app.workspace.getActiveFile();if(!t){new Te.Notice(this.i18n.translate("commands.convertCurrentNoteToTask.noActiveFile"));return}if(await this.cacheManager.getTaskInfo(t.path)){new Te.Notice(this.i18n.translate("commands.convertCurrentNoteToTask.alreadyTask"));return}let a=this.app.metadataCache.getFileCache(t),i=(a==null?void 0:a.frontmatter)||{},s=await this.app.vault.read(t),o=G_e({path:t.path,basename:t.basename,content:s,frontmatter:i,settings:this.settings,fieldMapper:this.fieldMapper});new RC(this.app,this,{task:o,onTaskUpdated:l=>{new Te.Notice(this.i18n.translate("commands.convertCurrentNoteToTask.success",{title:l.title}))}}).open()}async openTaskSelectorWithCreate(){await this.taskActionCoordinator.openTaskSelectorWithCreate()}async openTaskSelectorWithCreateAndStartTracking(){await this.taskActionCoordinator.openTaskSelectorWithCreateAndStartTracking()}async rolloverOverdueScheduledTasks(){await this.taskActionCoordinator.rolloverOverdueScheduledTasks()}async startTimeTracking(t,r){return this.taskActionCoordinator.startTimeTracking(t,r)}async stopTimeTracking(t){return this.taskActionCoordinator.stopTimeTracking(t)}getActiveTimeSession(t){return R0(t.timeEntries||[])}isRecurringTaskCompleteForDate(t,r){if(!t.recurrence)return!1;let a=ae(r);return(Array.isArray(t.complete_instances)?t.complete_instances:[]).includes(a)}formatTime(t){return _0(t)}async openTaskEditModal(t,r){new RC(this.app,this,{task:t,onTaskUpdated:r}).open()}async openDueDateModal(t){this.openTaskDatePicker(t,"due")}async openScheduledDateModal(t){this.openTaskDatePicker(t,"scheduled")}async openTaskDatePicker(t,r){try{let{DateTimePickerModal:a}=await Promise.resolve().then(()=>($y(),ele)),{getDatePart:i,getTimePart:s,combineDateAndTime:o}=await Promise.resolve().then(()=>(xe(),Gz)),l=(r==="due"?t.due:t.scheduled)||"";new a(this.app,{currentDate:i(l)||null,currentTime:s(l)||null,dateRole:r,plugin:this,onSelect:(d,u)=>{(async()=>{let p=d&&u?o(d,u):d||void 0;await this.taskService.updateProperty(t,r,p,{confirmClearInstances:m=>this.confirmClearRescheduledInstances(m)})})()}}).open()}catch(a){mt.error("Error loading DateTimePickerModal:",{category:"validation",operation:"loading-datetimepickermodal",error:a})}}async refreshCache(){try{let t=new Te.Notice("Refreshing tasknotes cache...",0);await this.cacheManager.clearAllCaches(),this.notifyDataChanged(void 0,!0,!0),this.emitter.trigger(Lc["cache.rebuilt"],{force:!0,timestamp:new Date().toISOString()}),t.hide(),new Te.Notice("Tasknotes cache refreshed successfully")}catch(t){mt.error("Error refreshing cache:",{category:"stale-data",operation:"refreshing-cache",error:t}),new Te.Notice("Failed to refresh cache. Please try again.")}}async convertTaskToTaskNote(t){try{let r=t.getCursor();if(!this.instantTaskConvertService){new Te.Notice("Task conversion service not available. Please try again.");return}await this.instantTaskConvertService.instantConvertTask(t,r.line)}catch(r){mt.error("Error converting task:",{category:"validation",operation:"converting-task",error:r}),new Te.Notice("Failed to convert task. Please try again.")}}async batchConvertAllTasks(t){try{if(!this.instantTaskConvertService){new Te.Notice("Task conversion service not available. Please try again.");return}await this.instantTaskConvertService.batchConvertAllTasks(t)}catch(r){mt.error("Error batch converting tasks:",{category:"validation",operation:"batch-converting-tasks",error:r}),new Te.Notice("Failed to batch convert tasks. Please try again.")}}async insertTaskNoteLink(t){try{let a=(await this.cacheManager.getAllTasks()).filter(i=>!i.archived);fn(this,a,i=>{if(i){let s=this.app.vault.getAbstractFileByPath(i.path);if(s instanceof Te.TFile){let o=this.app.workspace.getActiveFile(),l=(o==null?void 0:o.path)||"",c=this.app.fileManager.generateMarkdownLink(s,l,"",i.title),d=t.getCursor();t.replaceRange(c,d);let u={line:d.line,ch:d.ch+c.length};t.setCursor(u)}else new Te.Notice("Failed to create link - file not found")}})}catch(r){mt.error("Error inserting tasknote link:",{category:"persistence",operation:"inserting-tasknote-link",error:r}),new Te.Notice("Failed to insert tasknote link")}}async openTaskSelectorForTimeTracking(){await this.taskActionCoordinator.openTaskSelectorForTimeTracking()}async openTaskSelectorForTimeEntryEditor(){await this.taskActionCoordinator.openTaskSelectorForTimeEntryEditor()}openTimeEntryEditor(t,r){this.taskActionCoordinator.openTimeEntryEditor(t,r)}extractSelectionInfoForCommand(t,r){let a=t.getSelection();if(a&&a.trim()){let i=t.listSelections()[0],s=Math.min(i.anchor.line,i.head.line),o=Math.max(i.anchor.line,i.head.line),l=[];for(let p=s;p<=o;p++)l.push(t.getLine(p));let c=l[0],u=l.slice(1).join(`
`).trimEnd();return{taskLine:c,details:u,startLine:s,endLine:o,originalContent:l}}else{let i=t.getLine(r);return{taskLine:i,details:"",startLine:r,endLine:r,originalContent:[i]}}}async openQuickActionsForCurrentTask(){try{let t=this.app.workspace.getActiveFile();if(!t){new Te.Notice("No file is currently open");return}await this.openQuickActionsForTaskFile(t,"Current file is not a tasknote")}catch(t){mt.error("Error opening quick actions:",{category:"internal",operation:"opening-quick-actions",error:t}),new Te.Notice("Failed to open quick actions")}}async openQuickActionsForTaskUnderCursor(t,r){try{let a=r!=null?r:this.app.workspace.getActiveFile();if(!a){new Te.Notice("No file is currently open");return}let i=await this.getTaskLinkDetectionService(),s=this.getTaskLinkAtCursor(t,i);if(!s){new Te.Notice("No task link found");return}let o=await i.detectTaskLink(s.match,a.path,s.type);if(!o.isValidTaskLink||!o.taskInfo){new Te.Notice("No task link found");return}await this.openQuickActionsForTaskInfo(o.taskInfo)}catch(a){mt.error("Error opening quick actions for task under cursor:",{category:"persistence",operation:"opening-quick-actions-task-under-cursor",error:a}),new Te.Notice("Failed to open quick actions")}}async openTaskEditModalForCurrentTask(){let t=this.app.workspace.getActiveFile();if(!t){new Te.Notice("No file is currently open");return}await this.openTaskEditModalForFile(t,"Current file is not a tasknote")}async setCurrentTaskTimeTracking(t){if(!this.currentTaskTimeTrackingPending){this.currentTaskTimeTrackingPending=!0;try{let r=await this.getCurrentTaskForCommand();if(!r)return;try{t==="start"?await this.startTimeTracking(r):await this.stopTimeTracking(r)}catch(a){}}catch(r){mt.error("Failed to resolve current task for time tracking:",{category:"persistence",operation:"current-task-time-tracking",error:r}),new Te.Notice("Failed to load current task")}finally{this.currentTaskTimeTrackingPending=!1}}}async cycleCurrentTaskStatus(){try{let t=await this.getCurrentTaskForCommand();if(!t)return;let r=this.statusManager.getNextStatus(t.status);await this.updateTaskProperty(t,"status",r)}catch(t){mt.error("Failed to cycle current task status:",{category:"persistence",operation:"cycle-current-task-status",error:t}),new Te.Notice("Failed to cycle task status")}}async cycleCurrentTaskPriority(){try{let t=await this.getCurrentTaskForCommand();if(!t)return;let r=t.priority||this.settings.defaultTaskPriority,a=this.priorityManager.getNextPriority(r);await this.updateTaskProperty(t,"priority",a)}catch(t){mt.error("Failed to cycle current task priority:",{category:"persistence",operation:"cycle-current-task-priority",error:t}),new Te.Notice("Failed to cycle task priority")}}async getCurrentTaskForCommand(t="Current file is not a task"){let r=this.app.workspace.getActiveFile();if(!r)return new Te.Notice("No file is currently open"),null;let a=await this.cacheManager.getTaskInfo(r.path);return a||(new Te.Notice(t),null)}async getTaskLinkDetectionService(){if(!this.taskLinkDetectionService){let{TaskLinkDetectionService:t}=await Promise.resolve().then(()=>(DR(),_W));this.taskLinkDetectionService=new t(this)}return this.taskLinkDetectionService}getTaskLinkAtCursor(t,r){var o;let a=t.getCursor(),i=t.getLine(a.line);return(o=r.findWikilinks(i).find(l=>a.ch>=l.start&&a.ch<=l.end&&(l.type==="wikilink"||l.type==="markdown")))!=null?o:null}async openTaskEditModalForFile(t,r){try{let a=await this.cacheManager.getTaskInfo(t.path);if(!a){new Te.Notice(r!=null?r:this.i18n.translate("modals.taskEdit.notices.fileMissing",{path:t.path}));return}await this.openTaskEditModal(a)}catch(a){mt.error("Error opening task edit modal from file menu:",{category:"persistence",operation:"opening-task-edit-modal-file-menu",error:a}),new Te.Notice(this.i18n.translate("modals.taskEdit.notices.openNoteFailure"))}}async openQuickActionsForTaskFile(t,r="Selected file is not a tasknote"){let a=await this.cacheManager.getTaskInfo(t.path);if(!a){new Te.Notice(r);return}await this.openQuickActionsForTaskInfo(a)}async openQuickActionsForTaskInfo(t){let{TaskActionPaletteModal:r}=await Promise.resolve().then(()=>(lFe(),oFe)),a=new Date,i=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate()));new r(this.app,t,this,i).open()}async addProjectToCurrentTask(){try{let t=this.app.workspace.getActiveFile();if(!t){new Te.Notice("No file is currently open");return}let r=await this.cacheManager.getTaskInfo(t.path);if(!r){new Te.Notice("Current file is not a task");return}new Ys(this.app,this,i=>{if(!(i instanceof Te.TFile)){new Te.Notice(this.i18n.translate("contextMenus.task.organization.notices.projectSelectFailed"));return}this.addSelectedProjectToTask(r,i)}).open()}catch(t){mt.error("Failed to add project to current task:",{category:"persistence",operation:"add-project-current-task",error:t}),new Te.Notice(this.i18n.translate("contextMenus.task.organization.notices.addToProjectFailed"))}}async addSubtaskToCurrentNote(){try{let t=this.app.workspace.getActiveFile();if(!t){new Te.Notice("No file is currently open");return}let a=(await this.cacheManager.getAllTasks()).filter(i=>i.path!==t.path);if(a.length===0){new Te.Notice(this.i18n.translate("contextMenus.task.organization.notices.noEligibleSubtasks"));return}fn(this,a,i=>{i&&this.assignSelectedSubtaskToCurrentNote(t,i)})}catch(t){mt.error("Failed to add subtask to current note:",{category:"persistence",operation:"add-subtask-current-note",error:t}),new Te.Notice(this.i18n.translate("contextMenus.task.organization.notices.subtaskSelectFailed"))}}async addSelectedProjectToTask(t,r){try{await rv(this,t,r)}catch(a){mt.error("Failed to add selected project to task:",{category:"persistence",operation:"add-selected-project-task",error:a}),new Te.Notice(this.i18n.translate("contextMenus.task.organization.notices.addToProjectFailed"))}}async assignSelectedSubtaskToCurrentNote(t,r){try{await lM(this,t,r)}catch(a){mt.error("Failed to assign selected subtask to current note:",{category:"persistence",operation:"assign-selected-subtask-current-note",error:a}),new Te.Notice(this.i18n.translate("contextMenus.task.organization.notices.addAsSubtaskFailed"))}}async createInlineTask(t){try{let r=t.getCursor(),a=t.getLine(r.line),i=a.trim(),s;if(i==="")s={line:r.line,ch:r.ch};else{let d={line:r.line,ch:a.length};t.replaceRange(`
`,d),s={line:r.line+1,ch:0}}let o={editor:t,insertionPoint:s},l=this.applyParentNoteProjectDefault(void 0,"inline-creation");new kp(this.app,this,{prePopulatedValues:l,onTaskCreated:d=>{this.handleInlineTaskCreated(d,o)},creationContext:"modal-inline-creation"}).open()}catch(r){mt.error("Error creating inline task:",{category:"persistence",operation:"creating-inline-task",error:r}),new Te.Notice("Failed to create inline task")}}handleInlineTaskCreated(t,r){try{let{editor:a,insertionPoint:i}=r,s=this.app.vault.getAbstractFileByPath(t.path);if(!(s instanceof Te.TFile)){new Te.Notice("Failed to create link - file not found");return}let o=this.app.workspace.getActiveFile(),l=(o==null?void 0:o.path)||"",c=this.app.fileManager.generateMarkdownLink(s,l,"",qT(t.title));a.replaceRange(c,i);let d={line:i.line,ch:i.ch+c.length};a.setCursor(d),new Te.Notice(`Inline task "${t.title}" created and linked successfully`)}catch(a){mt.error("Error handling inline task creation:",{category:"persistence",operation:"handling-inline-task-creation",error:a}),new Te.Notice("Failed to insert task link")}}};var Eut=zP;
/*! Bundled license information:
reflect-metadata/Reflect.js:
(*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** *)
*/
/* nosourcemap */